therubyracer 0.8.1.pre2 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of therubyracer might be problematic. Click here for more details.
- data/Changelog.md +2 -1
- data/README.md +6 -3
- data/ext/v8/upstream/3.1.8/.gitignore +31 -0
- data/ext/v8/upstream/3.1.8/AUTHORS +40 -0
- data/ext/v8/upstream/3.1.8/ChangeLog +2566 -0
- data/ext/v8/upstream/3.1.8/LICENSE +52 -0
- data/ext/v8/upstream/3.1.8/LICENSE.strongtalk +29 -0
- data/ext/v8/upstream/3.1.8/LICENSE.v8 +26 -0
- data/ext/v8/upstream/3.1.8/LICENSE.valgrind +45 -0
- data/ext/v8/upstream/3.1.8/SConstruct +1192 -0
- data/ext/v8/upstream/3.1.8/build/README.txt +25 -0
- data/ext/v8/upstream/3.1.8/build/all.gyp +18 -0
- data/ext/v8/upstream/3.1.8/build/armu.gypi +32 -0
- data/ext/v8/upstream/3.1.8/build/common.gypi +82 -0
- data/ext/v8/upstream/3.1.8/build/gyp_v8 +145 -0
- data/ext/v8/upstream/3.1.8/include/v8-debug.h +384 -0
- data/ext/v8/upstream/3.1.8/include/v8-preparser.h +116 -0
- data/ext/v8/upstream/3.1.8/include/v8-profiler.h +426 -0
- data/ext/v8/upstream/3.1.8/include/v8-testing.h +99 -0
- data/ext/v8/upstream/3.1.8/include/v8.h +3846 -0
- data/ext/v8/upstream/3.1.8/include/v8stdint.h +53 -0
- data/ext/v8/upstream/3.1.8/preparser/preparser-process.cc +206 -0
- data/ext/v8/upstream/3.1.8/src/SConscript +356 -0
- data/ext/v8/upstream/3.1.8/src/accessors.cc +907 -0
- data/ext/v8/upstream/3.1.8/src/accessors.h +121 -0
- data/ext/v8/upstream/3.1.8/src/allocation.cc +204 -0
- data/ext/v8/upstream/3.1.8/src/allocation.h +176 -0
- data/ext/v8/upstream/3.1.8/src/api.cc +5191 -0
- data/ext/v8/upstream/3.1.8/src/api.h +508 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/apinatives.js +0 -0
- data/ext/v8/upstream/3.1.8/src/apiutils.h +80 -0
- data/ext/v8/upstream/3.1.8/src/arguments.h +105 -0
- data/ext/v8/upstream/3.1.8/src/arm/assembler-arm-inl.h +352 -0
- data/ext/v8/upstream/3.1.8/src/arm/assembler-arm.cc +2756 -0
- data/ext/v8/upstream/3.1.8/src/arm/assembler-arm.h +1294 -0
- data/ext/v8/upstream/3.1.8/src/arm/builtins-arm.cc +1628 -0
- data/ext/v8/upstream/3.1.8/src/arm/code-stubs-arm.cc +6783 -0
- data/ext/v8/upstream/3.1.8/src/arm/code-stubs-arm.h +657 -0
- data/ext/v8/upstream/3.1.8/src/arm/codegen-arm-inl.h +48 -0
- data/ext/v8/upstream/3.1.8/src/arm/codegen-arm.cc +7403 -0
- data/ext/v8/upstream/3.1.8/src/arm/codegen-arm.h +595 -0
- data/ext/v8/upstream/3.1.8/src/arm/constants-arm.cc +152 -0
- data/ext/v8/upstream/3.1.8/src/arm/constants-arm.h +769 -0
- data/ext/v8/upstream/3.1.8/src/arm/cpu-arm.cc +147 -0
- data/ext/v8/upstream/3.1.8/src/arm/debug-arm.cc +315 -0
- data/ext/v8/upstream/3.1.8/src/arm/deoptimizer-arm.cc +700 -0
- data/ext/v8/upstream/3.1.8/src/arm/disasm-arm.cc +1439 -0
- data/ext/v8/upstream/3.1.8/src/arm/frames-arm.cc +45 -0
- data/ext/v8/upstream/3.1.8/src/arm/frames-arm.h +168 -0
- data/ext/v8/upstream/3.1.8/src/arm/full-codegen-arm.cc +4230 -0
- data/ext/v8/upstream/3.1.8/src/arm/ic-arm.cc +1799 -0
- data/ext/v8/upstream/3.1.8/src/arm/jump-target-arm.cc +174 -0
- data/ext/v8/upstream/3.1.8/src/arm/lithium-arm.cc +2041 -0
- data/ext/v8/upstream/3.1.8/src/arm/lithium-arm.h +2046 -0
- data/ext/v8/upstream/3.1.8/src/arm/lithium-codegen-arm.cc +3822 -0
- data/ext/v8/upstream/3.1.8/src/arm/lithium-codegen-arm.h +312 -0
- data/ext/v8/upstream/3.1.8/src/arm/lithium-gap-resolver-arm.cc +303 -0
- data/ext/v8/upstream/3.1.8/src/arm/lithium-gap-resolver-arm.h +84 -0
- data/ext/v8/upstream/3.1.8/src/arm/macro-assembler-arm.cc +2701 -0
- data/ext/v8/upstream/3.1.8/src/arm/macro-assembler-arm.h +1015 -0
- data/ext/v8/upstream/3.1.8/src/arm/regexp-macro-assembler-arm.cc +1280 -0
- data/ext/v8/upstream/3.1.8/src/arm/regexp-macro-assembler-arm.h +252 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm.h +0 -0
- data/ext/v8/upstream/3.1.8/src/arm/simulator-arm.cc +3165 -0
- data/ext/v8/upstream/3.1.8/src/arm/simulator-arm.h +402 -0
- data/ext/v8/upstream/3.1.8/src/arm/stub-cache-arm.cc +4077 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/virtual-frame-arm-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/arm/virtual-frame-arm.cc +843 -0
- data/ext/v8/upstream/3.1.8/src/arm/virtual-frame-arm.h +520 -0
- data/ext/v8/upstream/3.1.8/src/array.js +1231 -0
- data/ext/v8/upstream/3.1.8/src/assembler.cc +973 -0
- data/ext/v8/upstream/3.1.8/src/assembler.h +787 -0
- data/ext/v8/upstream/3.1.8/src/ast-inl.h +107 -0
- data/ext/v8/upstream/3.1.8/src/ast.cc +1067 -0
- data/ext/v8/upstream/3.1.8/src/ast.h +2177 -0
- data/ext/v8/upstream/3.1.8/src/atomicops.h +165 -0
- data/ext/v8/upstream/3.1.8/src/atomicops_internals_arm_gcc.h +145 -0
- data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_gcc.cc +126 -0
- data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_gcc.h +287 -0
- data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_macosx.h +301 -0
- data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_msvc.h +203 -0
- data/ext/v8/upstream/3.1.8/src/bignum-dtoa.cc +655 -0
- data/ext/v8/upstream/3.1.8/src/bignum-dtoa.h +81 -0
- data/ext/v8/upstream/3.1.8/src/bignum.cc +768 -0
- data/ext/v8/upstream/3.1.8/src/bignum.h +140 -0
- data/ext/v8/upstream/3.1.8/src/bootstrapper.cc +1888 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/bootstrapper.h +0 -0
- data/ext/v8/upstream/3.1.8/src/builtins.cc +1586 -0
- data/ext/v8/upstream/3.1.8/src/builtins.h +339 -0
- data/ext/v8/upstream/3.1.8/src/bytecodes-irregexp.h +105 -0
- data/ext/v8/upstream/3.1.8/src/cached-powers.cc +177 -0
- data/ext/v8/upstream/3.1.8/src/cached-powers.h +65 -0
- data/ext/v8/upstream/3.1.8/src/char-predicates-inl.h +94 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/char-predicates.h +0 -0
- data/ext/v8/upstream/3.1.8/src/checks.cc +110 -0
- data/ext/v8/upstream/3.1.8/src/checks.h +292 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/circular-queue-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/circular-queue.cc +122 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/circular-queue.h +0 -0
- data/ext/v8/upstream/3.1.8/src/code-stubs.cc +230 -0
- data/ext/v8/upstream/3.1.8/src/code-stubs.h +950 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/code.h +0 -0
- data/ext/v8/upstream/3.1.8/src/codegen-inl.h +64 -0
- data/ext/v8/upstream/3.1.8/src/codegen.cc +495 -0
- data/ext/v8/upstream/3.1.8/src/codegen.h +245 -0
- data/ext/v8/upstream/3.1.8/src/compilation-cache.cc +654 -0
- data/ext/v8/upstream/3.1.8/src/compilation-cache.h +112 -0
- data/ext/v8/upstream/3.1.8/src/compiler.cc +806 -0
- data/ext/v8/upstream/3.1.8/src/compiler.h +290 -0
- data/ext/v8/upstream/3.1.8/src/contexts.cc +320 -0
- data/ext/v8/upstream/3.1.8/src/contexts.h +376 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/conversions-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/conversions.cc +1069 -0
- data/ext/v8/upstream/3.1.8/src/conversions.h +122 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/counters.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/counters.h +242 -0
- data/ext/v8/upstream/3.1.8/src/cpu-profiler-inl.h +100 -0
- data/ext/v8/upstream/3.1.8/src/cpu-profiler.cc +554 -0
- data/ext/v8/upstream/3.1.8/src/cpu-profiler.h +291 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/cpu.h +0 -0
- data/ext/v8/upstream/3.1.8/src/d8-debug.cc +367 -0
- data/ext/v8/upstream/3.1.8/src/d8-debug.h +157 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-posix.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-readline.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-windows.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/d8.cc +792 -0
- data/ext/v8/upstream/3.1.8/src/d8.gyp +85 -0
- data/ext/v8/upstream/3.1.8/src/d8.h +231 -0
- data/ext/v8/upstream/3.1.8/src/d8.js +2798 -0
- data/ext/v8/upstream/3.1.8/src/data-flow.cc +545 -0
- data/ext/v8/upstream/3.1.8/src/data-flow.h +379 -0
- data/ext/v8/upstream/3.1.8/src/date.js +1103 -0
- data/ext/v8/upstream/3.1.8/src/dateparser-inl.h +125 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/dateparser.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/dateparser.h +263 -0
- data/ext/v8/upstream/3.1.8/src/debug-agent.cc +446 -0
- data/ext/v8/upstream/3.1.8/src/debug-agent.h +131 -0
- data/ext/v8/upstream/3.1.8/src/debug-debugger.js +2569 -0
- data/ext/v8/upstream/3.1.8/src/debug.cc +3085 -0
- data/ext/v8/upstream/3.1.8/src/debug.h +1025 -0
- data/ext/v8/upstream/3.1.8/src/deoptimizer.cc +1185 -0
- data/ext/v8/upstream/3.1.8/src/deoptimizer.h +529 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/disasm.h +0 -0
- data/ext/v8/upstream/3.1.8/src/disassembler.cc +338 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/disassembler.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/diy-fp.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/diy-fp.h +0 -0
- data/ext/v8/upstream/3.1.8/src/double.h +238 -0
- data/ext/v8/upstream/3.1.8/src/dtoa.cc +103 -0
- data/ext/v8/upstream/3.1.8/src/dtoa.h +85 -0
- data/ext/v8/upstream/3.1.8/src/execution.cc +735 -0
- data/ext/v8/upstream/3.1.8/src/execution.h +322 -0
- data/ext/v8/upstream/3.1.8/src/extensions/experimental/experimental.gyp +53 -0
- data/ext/v8/upstream/3.1.8/src/extensions/experimental/i18n-extension.cc +264 -0
- data/ext/v8/upstream/3.1.8/src/extensions/experimental/i18n-extension.h +64 -0
- data/ext/v8/upstream/3.1.8/src/extensions/externalize-string-extension.cc +141 -0
- data/ext/v8/upstream/3.1.8/src/extensions/externalize-string-extension.h +50 -0
- data/ext/v8/upstream/3.1.8/src/extensions/gc-extension.cc +58 -0
- data/ext/v8/upstream/3.1.8/src/extensions/gc-extension.h +49 -0
- data/ext/v8/upstream/3.1.8/src/factory.cc +1087 -0
- data/ext/v8/upstream/3.1.8/src/factory.h +432 -0
- data/ext/v8/upstream/3.1.8/src/fast-dtoa.cc +736 -0
- data/ext/v8/upstream/3.1.8/src/fast-dtoa.h +83 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/fixed-dtoa.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/fixed-dtoa.h +0 -0
- data/ext/v8/upstream/3.1.8/src/flag-definitions.h +552 -0
- data/ext/v8/upstream/3.1.8/src/flags.cc +551 -0
- data/ext/v8/upstream/3.1.8/src/flags.h +79 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/frame-element.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/frame-element.h +277 -0
- data/ext/v8/upstream/3.1.8/src/frames-inl.h +210 -0
- data/ext/v8/upstream/3.1.8/src/frames.cc +1232 -0
- data/ext/v8/upstream/3.1.8/src/frames.h +826 -0
- data/ext/v8/upstream/3.1.8/src/full-codegen.cc +1382 -0
- data/ext/v8/upstream/3.1.8/src/full-codegen.h +751 -0
- data/ext/v8/upstream/3.1.8/src/func-name-inferrer.cc +90 -0
- data/ext/v8/upstream/3.1.8/src/func-name-inferrer.h +111 -0
- data/ext/v8/upstream/3.1.8/src/gdb-jit.cc +1547 -0
- data/ext/v8/upstream/3.1.8/src/gdb-jit.h +138 -0
- data/ext/v8/upstream/3.1.8/src/global-handles.cc +534 -0
- data/ext/v8/upstream/3.1.8/src/global-handles.h +181 -0
- data/ext/v8/upstream/3.1.8/src/globals.h +325 -0
- data/ext/v8/upstream/3.1.8/src/handles-inl.h +80 -0
- data/ext/v8/upstream/3.1.8/src/handles.cc +910 -0
- data/ext/v8/upstream/3.1.8/src/handles.h +424 -0
- data/ext/v8/upstream/3.1.8/src/hashmap.cc +230 -0
- data/ext/v8/upstream/3.1.8/src/hashmap.h +121 -0
- data/ext/v8/upstream/3.1.8/src/heap-inl.h +587 -0
- data/ext/v8/upstream/3.1.8/src/heap-profiler.cc +1128 -0
- data/ext/v8/upstream/3.1.8/src/heap-profiler.h +381 -0
- data/ext/v8/upstream/3.1.8/src/heap.cc +5610 -0
- data/ext/v8/upstream/3.1.8/src/heap.h +2218 -0
- data/ext/v8/upstream/3.1.8/src/hydrogen-instructions.cc +1490 -0
- data/ext/v8/upstream/3.1.8/src/hydrogen-instructions.h +3493 -0
- data/ext/v8/upstream/3.1.8/src/hydrogen.cc +6056 -0
- data/ext/v8/upstream/3.1.8/src/hydrogen.h +1091 -0
- data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32-inl.h +429 -0
- data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32.cc +2800 -0
- data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32.h +1093 -0
- data/ext/v8/upstream/3.1.8/src/ia32/builtins-ia32.cc +1590 -0
- data/ext/v8/upstream/3.1.8/src/ia32/code-stubs-ia32.cc +6624 -0
- data/ext/v8/upstream/3.1.8/src/ia32/code-stubs-ia32.h +536 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/codegen-ia32-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/ia32/codegen-ia32.cc +10354 -0
- data/ext/v8/upstream/3.1.8/src/ia32/codegen-ia32.h +798 -0
- data/ext/v8/upstream/3.1.8/src/ia32/cpu-ia32.cc +87 -0
- data/ext/v8/upstream/3.1.8/src/ia32/debug-ia32.cc +309 -0
- data/ext/v8/upstream/3.1.8/src/ia32/deoptimizer-ia32.cc +664 -0
- data/ext/v8/upstream/3.1.8/src/ia32/disasm-ia32.cc +1597 -0
- data/ext/v8/upstream/3.1.8/src/ia32/frames-ia32.cc +45 -0
- data/ext/v8/upstream/3.1.8/src/ia32/frames-ia32.h +140 -0
- data/ext/v8/upstream/3.1.8/src/ia32/full-codegen-ia32.cc +4278 -0
- data/ext/v8/upstream/3.1.8/src/ia32/ic-ia32.cc +1786 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/jump-target-ia32.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-codegen-ia32.cc +3880 -0
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-codegen-ia32.h +309 -0
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-gap-resolver-ia32.cc +460 -0
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-gap-resolver-ia32.h +110 -0
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-ia32.cc +2095 -0
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-ia32.h +2127 -0
- data/ext/v8/upstream/3.1.8/src/ia32/macro-assembler-ia32.cc +2031 -0
- data/ext/v8/upstream/3.1.8/src/ia32/macro-assembler-ia32.h +798 -0
- data/ext/v8/upstream/3.1.8/src/ia32/regexp-macro-assembler-ia32.cc +1253 -0
- data/ext/v8/upstream/3.1.8/src/ia32/regexp-macro-assembler-ia32.h +215 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/simulator-ia32.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/ia32/simulator-ia32.h +72 -0
- data/ext/v8/upstream/3.1.8/src/ia32/stub-cache-ia32.cc +3732 -0
- data/ext/v8/upstream/3.1.8/src/ia32/virtual-frame-ia32.cc +1360 -0
- data/ext/v8/upstream/3.1.8/src/ia32/virtual-frame-ia32.h +646 -0
- data/ext/v8/upstream/3.1.8/src/ic-inl.h +129 -0
- data/ext/v8/upstream/3.1.8/src/ic.cc +2333 -0
- data/ext/v8/upstream/3.1.8/src/ic.h +639 -0
- data/ext/v8/upstream/3.1.8/src/inspector.cc +63 -0
- data/ext/v8/upstream/3.1.8/src/inspector.h +62 -0
- data/ext/v8/upstream/3.1.8/src/interpreter-irregexp.cc +655 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/interpreter-irregexp.h +0 -0
- data/ext/v8/upstream/3.1.8/src/json.js +342 -0
- data/ext/v8/upstream/3.1.8/src/jsregexp.cc +5340 -0
- data/ext/v8/upstream/3.1.8/src/jsregexp.h +1484 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-heavy-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/jump-target-heavy.cc +430 -0
- data/ext/v8/upstream/3.1.8/src/jump-target-heavy.h +244 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-light-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/jump-target-light.cc +111 -0
- data/ext/v8/upstream/3.1.8/src/jump-target-light.h +193 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target.h +0 -0
- data/ext/v8/upstream/3.1.8/src/list-inl.h +206 -0
- data/ext/v8/upstream/3.1.8/src/list.h +164 -0
- data/ext/v8/upstream/3.1.8/src/lithium-allocator-inl.h +140 -0
- data/ext/v8/upstream/3.1.8/src/lithium-allocator.cc +2093 -0
- data/ext/v8/upstream/3.1.8/src/lithium-allocator.h +644 -0
- data/ext/v8/upstream/3.1.8/src/lithium.cc +168 -0
- data/ext/v8/upstream/3.1.8/src/lithium.h +592 -0
- data/ext/v8/upstream/3.1.8/src/liveedit-debugger.js +1082 -0
- data/ext/v8/upstream/3.1.8/src/liveedit.cc +1650 -0
- data/ext/v8/upstream/3.1.8/src/liveedit.h +174 -0
- data/ext/v8/upstream/3.1.8/src/liveobjectlist-inl.h +126 -0
- data/ext/v8/upstream/3.1.8/src/liveobjectlist.cc +2527 -0
- data/ext/v8/upstream/3.1.8/src/liveobjectlist.h +322 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/log-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/log-utils.cc +336 -0
- data/ext/v8/upstream/3.1.8/src/log-utils.h +232 -0
- data/ext/v8/upstream/3.1.8/src/log.cc +1608 -0
- data/ext/v8/upstream/3.1.8/src/log.h +379 -0
- data/ext/v8/upstream/3.1.8/src/macro-assembler.h +120 -0
- data/ext/v8/upstream/3.1.8/src/macros.py +178 -0
- data/ext/v8/upstream/3.1.8/src/mark-compact.cc +2957 -0
- data/ext/v8/upstream/3.1.8/src/mark-compact.h +433 -0
- data/ext/v8/upstream/3.1.8/src/math.js +264 -0
- data/ext/v8/upstream/3.1.8/src/memory.h +82 -0
- data/ext/v8/upstream/3.1.8/src/messages.cc +164 -0
- data/ext/v8/upstream/3.1.8/src/messages.h +114 -0
- data/ext/v8/upstream/3.1.8/src/messages.js +1071 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/assembler-mips-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/assembler-mips.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/mips/assembler-mips.h +667 -0
- data/ext/v8/upstream/3.1.8/src/mips/builtins-mips.cc +205 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/codegen-mips-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/codegen-mips.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/mips/codegen-mips.h +431 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/constants-mips.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/constants-mips.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/cpu-mips.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/mips/debug-mips.cc +127 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/disasm-mips.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/fast-codegen-mips.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/mips/frames-mips.cc +96 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/frames-mips.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/full-codegen-mips.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/mips/ic-mips.cc +208 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/jump-target-mips.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/macro-assembler-mips.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/macro-assembler-mips.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips.h +0 -0
- data/ext/v8/upstream/3.1.8/src/mips/simulator-mips.cc +1650 -0
- data/ext/v8/upstream/3.1.8/src/mips/simulator-mips.h +311 -0
- data/ext/v8/upstream/3.1.8/src/mips/stub-cache-mips.cc +418 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/virtual-frame-mips.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/virtual-frame-mips.h +0 -0
- data/ext/v8/upstream/3.1.8/src/mirror-debugger.js +2380 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mksnapshot.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/natives.h +0 -0
- data/ext/v8/upstream/3.1.8/src/objects-debug.cc +722 -0
- data/ext/v8/upstream/3.1.8/src/objects-inl.h +3946 -0
- data/ext/v8/upstream/3.1.8/src/objects-printer.cc +801 -0
- data/ext/v8/upstream/3.1.8/src/objects-visiting.cc +142 -0
- data/ext/v8/upstream/3.1.8/src/objects-visiting.h +401 -0
- data/ext/v8/upstream/3.1.8/src/objects.cc +10044 -0
- data/ext/v8/upstream/3.1.8/src/objects.h +6571 -0
- data/ext/v8/upstream/3.1.8/src/parser.cc +5165 -0
- data/ext/v8/upstream/3.1.8/src/parser.h +802 -0
- data/ext/v8/upstream/3.1.8/src/platform-cygwin.cc +745 -0
- data/ext/v8/upstream/3.1.8/src/platform-freebsd.cc +702 -0
- data/ext/v8/upstream/3.1.8/src/platform-linux.cc +981 -0
- data/ext/v8/upstream/3.1.8/src/platform-macos.cc +732 -0
- data/ext/v8/upstream/3.1.8/src/platform-nullos.cc +498 -0
- data/ext/v8/upstream/3.1.8/src/platform-openbsd.cc +657 -0
- data/ext/v8/upstream/3.1.8/src/platform-posix.cc +399 -0
- data/ext/v8/upstream/3.1.8/src/platform-solaris.cc +714 -0
- data/ext/v8/upstream/3.1.8/src/platform-win32.cc +1974 -0
- data/ext/v8/upstream/3.1.8/src/platform.h +636 -0
- data/ext/v8/upstream/3.1.8/src/preparse-data.cc +183 -0
- data/ext/v8/upstream/3.1.8/src/preparse-data.h +249 -0
- data/ext/v8/upstream/3.1.8/src/preparser-api.cc +213 -0
- data/ext/v8/upstream/3.1.8/src/preparser.cc +1205 -0
- data/ext/v8/upstream/3.1.8/src/preparser.h +278 -0
- data/ext/v8/upstream/3.1.8/src/prettyprinter.cc +1539 -0
- data/ext/v8/upstream/3.1.8/src/prettyprinter.h +223 -0
- data/ext/v8/upstream/3.1.8/src/profile-generator-inl.h +128 -0
- data/ext/v8/upstream/3.1.8/src/profile-generator.cc +2899 -0
- data/ext/v8/upstream/3.1.8/src/profile-generator.h +1151 -0
- data/ext/v8/upstream/3.1.8/src/property.cc +96 -0
- data/ext/v8/upstream/3.1.8/src/property.h +337 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-macro-assembler-irregexp-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-irregexp.cc +470 -0
- data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-irregexp.h +142 -0
- data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-tracer.cc +373 -0
- data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-tracer.h +104 -0
- data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler.cc +257 -0
- data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler.h +231 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-stack.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-stack.h +0 -0
- data/ext/v8/upstream/3.1.8/src/regexp.js +483 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator.h +0 -0
- data/ext/v8/upstream/3.1.8/src/rewriter.cc +1023 -0
- data/ext/v8/upstream/3.1.8/src/rewriter.h +59 -0
- data/ext/v8/upstream/3.1.8/src/runtime-profiler.cc +443 -0
- data/ext/v8/upstream/3.1.8/src/runtime-profiler.h +77 -0
- data/ext/v8/upstream/3.1.8/src/runtime.cc +11592 -0
- data/ext/v8/upstream/3.1.8/src/runtime.h +582 -0
- data/ext/v8/upstream/3.1.8/src/runtime.js +643 -0
- data/ext/v8/upstream/3.1.8/src/safepoint-table.cc +253 -0
- data/ext/v8/upstream/3.1.8/src/safepoint-table.h +263 -0
- data/ext/v8/upstream/3.1.8/src/scanner-base.cc +971 -0
- data/ext/v8/upstream/3.1.8/src/scanner-base.h +653 -0
- data/ext/v8/upstream/3.1.8/src/scanner.cc +586 -0
- data/ext/v8/upstream/3.1.8/src/scanner.h +194 -0
- data/ext/v8/upstream/3.1.8/src/scopeinfo.cc +636 -0
- data/ext/v8/upstream/3.1.8/src/scopeinfo.h +238 -0
- data/ext/v8/upstream/3.1.8/src/scopes.cc +1063 -0
- data/ext/v8/upstream/3.1.8/src/scopes.h +494 -0
- data/ext/v8/upstream/3.1.8/src/serialize.cc +1535 -0
- data/ext/v8/upstream/3.1.8/src/serialize.h +584 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/shell.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/simulator.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/smart-pointer.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot-common.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot-empty.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot.h +0 -0
- data/ext/v8/upstream/3.1.8/src/spaces-inl.h +524 -0
- data/ext/v8/upstream/3.1.8/src/spaces.cc +3254 -0
- data/ext/v8/upstream/3.1.8/src/spaces.h +2362 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/splay-tree-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/splay-tree.h +0 -0
- data/ext/v8/upstream/3.1.8/src/string-search.cc +40 -0
- data/ext/v8/upstream/3.1.8/src/string-search.h +567 -0
- data/ext/v8/upstream/3.1.8/src/string-stream.cc +584 -0
- data/ext/v8/upstream/3.1.8/src/string-stream.h +191 -0
- data/ext/v8/upstream/3.1.8/src/string.js +915 -0
- data/ext/v8/upstream/3.1.8/src/strtod.cc +440 -0
- data/ext/v8/upstream/3.1.8/src/strtod.h +40 -0
- data/ext/v8/upstream/3.1.8/src/stub-cache.cc +1878 -0
- data/ext/v8/upstream/3.1.8/src/stub-cache.h +849 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/third_party/valgrind/valgrind.h +0 -0
- data/ext/v8/upstream/3.1.8/src/token.cc +63 -0
- data/ext/v8/upstream/3.1.8/src/token.h +288 -0
- data/ext/v8/upstream/3.1.8/src/top.cc +1152 -0
- data/ext/v8/upstream/3.1.8/src/top.h +608 -0
- data/ext/v8/upstream/3.1.8/src/type-info.cc +406 -0
- data/ext/v8/upstream/3.1.8/src/type-info.h +283 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/unbound-queue-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/unbound-queue.h +0 -0
- data/ext/v8/upstream/3.1.8/src/unicode-inl.h +238 -0
- data/ext/v8/upstream/3.1.8/src/unicode.cc +1624 -0
- data/ext/v8/upstream/3.1.8/src/unicode.h +280 -0
- data/ext/v8/upstream/3.1.8/src/uri.js +402 -0
- data/ext/v8/upstream/3.1.8/src/utils.cc +371 -0
- data/ext/v8/upstream/3.1.8/src/utils.h +793 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/v8-counters.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/v8-counters.h +290 -0
- data/ext/v8/upstream/3.1.8/src/v8.cc +270 -0
- data/ext/v8/upstream/3.1.8/src/v8.h +127 -0
- data/ext/v8/upstream/3.1.8/src/v8checks.h +64 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/v8dll-main.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/v8globals.h +480 -0
- data/ext/v8/upstream/3.1.8/src/v8natives.js +1252 -0
- data/ext/v8/upstream/3.1.8/src/v8preparserdll-main.cc +39 -0
- data/ext/v8/upstream/3.1.8/src/v8threads.cc +440 -0
- data/ext/v8/upstream/3.1.8/src/v8threads.h +157 -0
- data/ext/v8/upstream/3.1.8/src/v8utils.h +354 -0
- data/ext/v8/upstream/3.1.8/src/variables.cc +132 -0
- data/ext/v8/upstream/3.1.8/src/variables.h +212 -0
- data/ext/v8/upstream/3.1.8/src/version.cc +95 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/version.h +0 -0
- data/ext/v8/upstream/3.1.8/src/virtual-frame-heavy-inl.h +190 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-heavy.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-light-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-light.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/virtual-frame.h +59 -0
- data/ext/v8/upstream/3.1.8/src/vm-state-inl.h +134 -0
- data/ext/v8/upstream/3.1.8/src/vm-state.h +68 -0
- data/ext/v8/upstream/3.1.8/src/win32-headers.h +95 -0
- data/ext/v8/upstream/3.1.8/src/x64/assembler-x64-inl.h +455 -0
- data/ext/v8/upstream/3.1.8/src/x64/assembler-x64.cc +3162 -0
- data/ext/v8/upstream/3.1.8/src/x64/assembler-x64.h +1584 -0
- data/ext/v8/upstream/3.1.8/src/x64/builtins-x64.cc +1492 -0
- data/ext/v8/upstream/3.1.8/src/x64/code-stubs-x64.cc +5150 -0
- data/ext/v8/upstream/3.1.8/src/x64/code-stubs-x64.h +519 -0
- data/ext/v8/upstream/3.1.8/src/x64/codegen-x64-inl.h +46 -0
- data/ext/v8/upstream/3.1.8/src/x64/codegen-x64.cc +8835 -0
- data/ext/v8/upstream/3.1.8/src/x64/codegen-x64.h +750 -0
- data/ext/v8/upstream/3.1.8/src/x64/cpu-x64.cc +86 -0
- data/ext/v8/upstream/3.1.8/src/x64/debug-x64.cc +316 -0
- data/ext/v8/upstream/3.1.8/src/x64/deoptimizer-x64.cc +781 -0
- data/ext/v8/upstream/3.1.8/src/x64/disasm-x64.cc +1737 -0
- data/ext/v8/upstream/3.1.8/src/x64/frames-x64.cc +45 -0
- data/ext/v8/upstream/3.1.8/src/x64/frames-x64.h +130 -0
- data/ext/v8/upstream/3.1.8/src/x64/full-codegen-x64.cc +3984 -0
- data/ext/v8/upstream/3.1.8/src/x64/ic-x64.cc +1761 -0
- data/ext/v8/upstream/3.1.8/src/x64/jump-target-x64.cc +437 -0
- data/ext/v8/upstream/3.1.8/src/x64/lithium-codegen-x64.cc +3639 -0
- data/ext/v8/upstream/3.1.8/src/x64/lithium-codegen-x64.h +305 -0
- data/ext/v8/upstream/3.1.8/src/x64/lithium-gap-resolver-x64.cc +320 -0
- data/ext/v8/upstream/3.1.8/src/x64/lithium-gap-resolver-x64.h +74 -0
- data/ext/v8/upstream/3.1.8/src/x64/lithium-x64.cc +2044 -0
- data/ext/v8/upstream/3.1.8/src/x64/lithium-x64.h +2052 -0
- data/ext/v8/upstream/3.1.8/src/x64/macro-assembler-x64.cc +2660 -0
- data/ext/v8/upstream/3.1.8/src/x64/macro-assembler-x64.h +1852 -0
- data/ext/v8/upstream/3.1.8/src/x64/regexp-macro-assembler-x64.cc +1382 -0
- data/ext/v8/upstream/3.1.8/src/x64/regexp-macro-assembler-x64.h +278 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/simulator-x64.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/x64/simulator-x64.h +71 -0
- data/ext/v8/upstream/3.1.8/src/x64/stub-cache-x64.cc +3509 -0
- data/ext/v8/upstream/3.1.8/src/x64/virtual-frame-x64.cc +1292 -0
- data/ext/v8/upstream/3.1.8/src/x64/virtual-frame-x64.h +593 -0
- data/ext/v8/upstream/3.1.8/src/zone-inl.h +83 -0
- data/ext/v8/upstream/3.1.8/src/zone.cc +195 -0
- data/ext/v8/upstream/3.1.8/src/zone.h +233 -0
- data/ext/v8/upstream/3.1.8/tools/codemap.js +265 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/consarray.js +0 -0
- data/ext/v8/upstream/3.1.8/tools/csvparser.js +78 -0
- data/ext/v8/upstream/3.1.8/tools/disasm.py +92 -0
- data/ext/v8/upstream/3.1.8/tools/gc-nvp-trace-processor.py +328 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/generate-ten-powers.scm +0 -0
- data/ext/v8/upstream/3.1.8/tools/grokdump.py +840 -0
- data/ext/v8/upstream/3.1.8/tools/gyp/v8.gyp +869 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/js2c.py +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/jsmin.py +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/linux-tick-processor +0 -0
- data/ext/v8/upstream/3.1.8/tools/ll_prof.py +919 -0
- data/ext/v8/upstream/3.1.8/tools/logreader.js +185 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/mac-nm +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/mac-tick-processor +0 -0
- data/ext/v8/upstream/3.1.8/tools/oom_dump/README +31 -0
- data/ext/v8/upstream/3.1.8/tools/oom_dump/SConstruct +42 -0
- data/ext/v8/upstream/3.1.8/tools/oom_dump/oom_dump.cc +288 -0
- data/ext/v8/upstream/3.1.8/tools/presubmit.py +305 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/process-heap-prof.py +0 -0
- data/ext/v8/upstream/3.1.8/tools/profile.js +751 -0
- data/ext/v8/upstream/3.1.8/tools/profile_view.js +219 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/run-valgrind.py +0 -0
- data/ext/v8/upstream/3.1.8/tools/splaytree.js +316 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/stats-viewer.py +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/tickprocessor-driver.js +0 -0
- data/ext/v8/upstream/3.1.8/tools/tickprocessor.js +863 -0
- data/ext/v8/upstream/3.1.8/tools/utils.py +96 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/README.txt +70 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/arm.vsprops +0 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/common.vsprops +34 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8_arm.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8js2c.cmd +0 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/debug.vsprops +17 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/ia32.vsprops +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/js2c.cmd +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/release.vsprops +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8.sln +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_arm.sln +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_arm.vcproj +0 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base.vcproj +1296 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base_arm.vcproj +1234 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base_x64.vcproj +1296 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest_arm.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_mksnapshot.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_mksnapshot_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample_arm.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample_x64.vcproj +0 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample.vcproj +147 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample_arm.vcproj +147 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample_x64.vcproj +163 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_cc.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_cc_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_x64.sln +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/x64.vsprops +0 -0
- data/ext/v8/upstream/3.1.8/tools/windows-tick-processor.bat +30 -0
- data/ext/v8/upstream/Makefile +2 -1
- data/ext/v8/v8_template.cpp +2 -2
- data/lib/v8/version.rb +1 -1
- data/spec/redjs/jsapi_spec.rb +2 -2
- metadata +552 -490
- data/ext/v8/upstream/2.3.3/.gitignore +0 -26
- data/ext/v8/upstream/2.3.3/AUTHORS +0 -31
- data/ext/v8/upstream/2.3.3/ChangeLog +0 -1916
- data/ext/v8/upstream/2.3.3/LICENSE +0 -55
- data/ext/v8/upstream/2.3.3/SConstruct +0 -1154
- data/ext/v8/upstream/2.3.3/include/v8-debug.h +0 -381
- data/ext/v8/upstream/2.3.3/include/v8-profiler.h +0 -353
- data/ext/v8/upstream/2.3.3/include/v8.h +0 -3616
- data/ext/v8/upstream/2.3.3/src/SConscript +0 -330
- data/ext/v8/upstream/2.3.3/src/accessors.cc +0 -661
- data/ext/v8/upstream/2.3.3/src/accessors.h +0 -114
- data/ext/v8/upstream/2.3.3/src/allocation.cc +0 -198
- data/ext/v8/upstream/2.3.3/src/allocation.h +0 -169
- data/ext/v8/upstream/2.3.3/src/api.cc +0 -4795
- data/ext/v8/upstream/2.3.3/src/api.h +0 -485
- data/ext/v8/upstream/2.3.3/src/apiutils.h +0 -69
- data/ext/v8/upstream/2.3.3/src/arguments.h +0 -96
- data/ext/v8/upstream/2.3.3/src/arm/assembler-arm-inl.h +0 -305
- data/ext/v8/upstream/2.3.3/src/arm/assembler-arm.cc +0 -2580
- data/ext/v8/upstream/2.3.3/src/arm/assembler-arm.h +0 -1275
- data/ext/v8/upstream/2.3.3/src/arm/builtins-arm.cc +0 -1320
- data/ext/v8/upstream/2.3.3/src/arm/codegen-arm-inl.h +0 -48
- data/ext/v8/upstream/2.3.3/src/arm/codegen-arm.cc +0 -11398
- data/ext/v8/upstream/2.3.3/src/arm/codegen-arm.h +0 -1102
- data/ext/v8/upstream/2.3.3/src/arm/constants-arm.cc +0 -154
- data/ext/v8/upstream/2.3.3/src/arm/constants-arm.h +0 -388
- data/ext/v8/upstream/2.3.3/src/arm/cpu-arm.cc +0 -142
- data/ext/v8/upstream/2.3.3/src/arm/debug-arm.cc +0 -309
- data/ext/v8/upstream/2.3.3/src/arm/disasm-arm.cc +0 -1459
- data/ext/v8/upstream/2.3.3/src/arm/fast-codegen-arm.cc +0 -241
- data/ext/v8/upstream/2.3.3/src/arm/frames-arm.cc +0 -123
- data/ext/v8/upstream/2.3.3/src/arm/frames-arm.h +0 -162
- data/ext/v8/upstream/2.3.3/src/arm/full-codegen-arm.cc +0 -3178
- data/ext/v8/upstream/2.3.3/src/arm/ic-arm.cc +0 -2258
- data/ext/v8/upstream/2.3.3/src/arm/jump-target-arm.cc +0 -164
- data/ext/v8/upstream/2.3.3/src/arm/macro-assembler-arm.cc +0 -1892
- data/ext/v8/upstream/2.3.3/src/arm/macro-assembler-arm.h +0 -727
- data/ext/v8/upstream/2.3.3/src/arm/regexp-macro-assembler-arm.cc +0 -1261
- data/ext/v8/upstream/2.3.3/src/arm/regexp-macro-assembler-arm.h +0 -266
- data/ext/v8/upstream/2.3.3/src/arm/simulator-arm.cc +0 -2822
- data/ext/v8/upstream/2.3.3/src/arm/simulator-arm.h +0 -361
- data/ext/v8/upstream/2.3.3/src/arm/stub-cache-arm.cc +0 -2387
- data/ext/v8/upstream/2.3.3/src/arm/virtual-frame-arm.cc +0 -834
- data/ext/v8/upstream/2.3.3/src/arm/virtual-frame-arm.h +0 -519
- data/ext/v8/upstream/2.3.3/src/array.js +0 -1127
- data/ext/v8/upstream/2.3.3/src/assembler.cc +0 -801
- data/ext/v8/upstream/2.3.3/src/assembler.h +0 -573
- data/ext/v8/upstream/2.3.3/src/ast-inl.h +0 -81
- data/ext/v8/upstream/2.3.3/src/ast.cc +0 -1152
- data/ext/v8/upstream/2.3.3/src/ast.h +0 -2106
- data/ext/v8/upstream/2.3.3/src/bootstrapper.cc +0 -1819
- data/ext/v8/upstream/2.3.3/src/builtins.cc +0 -1529
- data/ext/v8/upstream/2.3.3/src/builtins.h +0 -263
- data/ext/v8/upstream/2.3.3/src/bytecodes-irregexp.h +0 -104
- data/ext/v8/upstream/2.3.3/src/cached-powers.h +0 -119
- data/ext/v8/upstream/2.3.3/src/char-predicates-inl.h +0 -86
- data/ext/v8/upstream/2.3.3/src/checks.cc +0 -100
- data/ext/v8/upstream/2.3.3/src/checks.h +0 -310
- data/ext/v8/upstream/2.3.3/src/circular-queue.cc +0 -121
- data/ext/v8/upstream/2.3.3/src/code-stubs.cc +0 -177
- data/ext/v8/upstream/2.3.3/src/code-stubs.h +0 -177
- data/ext/v8/upstream/2.3.3/src/codegen-inl.h +0 -60
- data/ext/v8/upstream/2.3.3/src/codegen.cc +0 -516
- data/ext/v8/upstream/2.3.3/src/codegen.h +0 -897
- data/ext/v8/upstream/2.3.3/src/compilation-cache.cc +0 -562
- data/ext/v8/upstream/2.3.3/src/compilation-cache.h +0 -102
- data/ext/v8/upstream/2.3.3/src/compiler.cc +0 -654
- data/ext/v8/upstream/2.3.3/src/compiler.h +0 -299
- data/ext/v8/upstream/2.3.3/src/contexts.cc +0 -256
- data/ext/v8/upstream/2.3.3/src/contexts.h +0 -342
- data/ext/v8/upstream/2.3.3/src/conversions.cc +0 -1119
- data/ext/v8/upstream/2.3.3/src/conversions.h +0 -123
- data/ext/v8/upstream/2.3.3/src/counters.h +0 -239
- data/ext/v8/upstream/2.3.3/src/cpu-profiler-inl.h +0 -100
- data/ext/v8/upstream/2.3.3/src/cpu-profiler.cc +0 -538
- data/ext/v8/upstream/2.3.3/src/cpu-profiler.h +0 -285
- data/ext/v8/upstream/2.3.3/src/d8-debug.cc +0 -356
- data/ext/v8/upstream/2.3.3/src/d8-debug.h +0 -155
- data/ext/v8/upstream/2.3.3/src/d8.cc +0 -783
- data/ext/v8/upstream/2.3.3/src/d8.h +0 -227
- data/ext/v8/upstream/2.3.3/src/d8.js +0 -1683
- data/ext/v8/upstream/2.3.3/src/data-flow.cc +0 -758
- data/ext/v8/upstream/2.3.3/src/data-flow.h +0 -278
- data/ext/v8/upstream/2.3.3/src/date.js +0 -1059
- data/ext/v8/upstream/2.3.3/src/dateparser-inl.h +0 -123
- data/ext/v8/upstream/2.3.3/src/dateparser.h +0 -244
- data/ext/v8/upstream/2.3.3/src/debug-agent.cc +0 -427
- data/ext/v8/upstream/2.3.3/src/debug-agent.h +0 -129
- data/ext/v8/upstream/2.3.3/src/debug-debugger.js +0 -2227
- data/ext/v8/upstream/2.3.3/src/debug.cc +0 -3005
- data/ext/v8/upstream/2.3.3/src/debug.h +0 -993
- data/ext/v8/upstream/2.3.3/src/disassembler.cc +0 -312
- data/ext/v8/upstream/2.3.3/src/double.h +0 -169
- data/ext/v8/upstream/2.3.3/src/dtoa-config.c +0 -92
- data/ext/v8/upstream/2.3.3/src/dtoa.cc +0 -77
- data/ext/v8/upstream/2.3.3/src/dtoa.h +0 -81
- data/ext/v8/upstream/2.3.3/src/execution.cc +0 -809
- data/ext/v8/upstream/2.3.3/src/execution.h +0 -336
- data/ext/v8/upstream/2.3.3/src/factory.cc +0 -1003
- data/ext/v8/upstream/2.3.3/src/factory.h +0 -410
- data/ext/v8/upstream/2.3.3/src/fast-codegen.cc +0 -746
- data/ext/v8/upstream/2.3.3/src/fast-codegen.h +0 -161
- data/ext/v8/upstream/2.3.3/src/fast-dtoa.cc +0 -505
- data/ext/v8/upstream/2.3.3/src/fast-dtoa.h +0 -58
- data/ext/v8/upstream/2.3.3/src/flag-definitions.h +0 -455
- data/ext/v8/upstream/2.3.3/src/flags.cc +0 -551
- data/ext/v8/upstream/2.3.3/src/flags.h +0 -81
- data/ext/v8/upstream/2.3.3/src/flow-graph.cc +0 -763
- data/ext/v8/upstream/2.3.3/src/flow-graph.h +0 -180
- data/ext/v8/upstream/2.3.3/src/frame-element.h +0 -273
- data/ext/v8/upstream/2.3.3/src/frames-inl.h +0 -217
- data/ext/v8/upstream/2.3.3/src/frames.cc +0 -826
- data/ext/v8/upstream/2.3.3/src/frames.h +0 -682
- data/ext/v8/upstream/2.3.3/src/full-codegen.cc +0 -1443
- data/ext/v8/upstream/2.3.3/src/full-codegen.h +0 -548
- data/ext/v8/upstream/2.3.3/src/func-name-inferrer.cc +0 -76
- data/ext/v8/upstream/2.3.3/src/func-name-inferrer.h +0 -135
- data/ext/v8/upstream/2.3.3/src/global-handles.cc +0 -520
- data/ext/v8/upstream/2.3.3/src/global-handles.h +0 -180
- data/ext/v8/upstream/2.3.3/src/globals.h +0 -669
- data/ext/v8/upstream/2.3.3/src/handles-inl.h +0 -76
- data/ext/v8/upstream/2.3.3/src/handles.cc +0 -825
- data/ext/v8/upstream/2.3.3/src/handles.h +0 -393
- data/ext/v8/upstream/2.3.3/src/hashmap.cc +0 -226
- data/ext/v8/upstream/2.3.3/src/hashmap.h +0 -120
- data/ext/v8/upstream/2.3.3/src/heap-inl.h +0 -493
- data/ext/v8/upstream/2.3.3/src/heap-profiler.cc +0 -779
- data/ext/v8/upstream/2.3.3/src/heap-profiler.h +0 -323
- data/ext/v8/upstream/2.3.3/src/heap.cc +0 -4994
- data/ext/v8/upstream/2.3.3/src/heap.h +0 -1984
- data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32-inl.h +0 -360
- data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32.cc +0 -2600
- data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32.h +0 -969
- data/ext/v8/upstream/2.3.3/src/ia32/builtins-ia32.cc +0 -1261
- data/ext/v8/upstream/2.3.3/src/ia32/codegen-ia32.cc +0 -13968
- data/ext/v8/upstream/2.3.3/src/ia32/codegen-ia32.h +0 -1097
- data/ext/v8/upstream/2.3.3/src/ia32/cpu-ia32.cc +0 -83
- data/ext/v8/upstream/2.3.3/src/ia32/debug-ia32.cc +0 -309
- data/ext/v8/upstream/2.3.3/src/ia32/disasm-ia32.cc +0 -1471
- data/ext/v8/upstream/2.3.3/src/ia32/fast-codegen-ia32.cc +0 -954
- data/ext/v8/upstream/2.3.3/src/ia32/fast-codegen-ia32.h +0 -155
- data/ext/v8/upstream/2.3.3/src/ia32/frames-ia32.cc +0 -115
- data/ext/v8/upstream/2.3.3/src/ia32/frames-ia32.h +0 -135
- data/ext/v8/upstream/2.3.3/src/ia32/full-codegen-ia32.cc +0 -3281
- data/ext/v8/upstream/2.3.3/src/ia32/ic-ia32.cc +0 -1966
- data/ext/v8/upstream/2.3.3/src/ia32/macro-assembler-ia32.cc +0 -1610
- data/ext/v8/upstream/2.3.3/src/ia32/macro-assembler-ia32.h +0 -610
- data/ext/v8/upstream/2.3.3/src/ia32/regexp-macro-assembler-ia32.cc +0 -1247
- data/ext/v8/upstream/2.3.3/src/ia32/regexp-macro-assembler-ia32.h +0 -214
- data/ext/v8/upstream/2.3.3/src/ia32/simulator-ia32.h +0 -62
- data/ext/v8/upstream/2.3.3/src/ia32/stub-cache-ia32.cc +0 -2750
- data/ext/v8/upstream/2.3.3/src/ia32/virtual-frame-ia32.cc +0 -1334
- data/ext/v8/upstream/2.3.3/src/ia32/virtual-frame-ia32.h +0 -627
- data/ext/v8/upstream/2.3.3/src/ic-inl.h +0 -120
- data/ext/v8/upstream/2.3.3/src/ic.cc +0 -1827
- data/ext/v8/upstream/2.3.3/src/ic.h +0 -515
- data/ext/v8/upstream/2.3.3/src/interpreter-irregexp.cc +0 -646
- data/ext/v8/upstream/2.3.3/src/json.js +0 -268
- data/ext/v8/upstream/2.3.3/src/jsregexp.cc +0 -5283
- data/ext/v8/upstream/2.3.3/src/jsregexp.h +0 -1463
- data/ext/v8/upstream/2.3.3/src/jump-target-heavy.cc +0 -429
- data/ext/v8/upstream/2.3.3/src/jump-target-heavy.h +0 -244
- data/ext/v8/upstream/2.3.3/src/jump-target-light.cc +0 -110
- data/ext/v8/upstream/2.3.3/src/jump-target-light.h +0 -192
- data/ext/v8/upstream/2.3.3/src/list-inl.h +0 -166
- data/ext/v8/upstream/2.3.3/src/list.h +0 -159
- data/ext/v8/upstream/2.3.3/src/liveedit-debugger.js +0 -1057
- data/ext/v8/upstream/2.3.3/src/liveedit.cc +0 -1480
- data/ext/v8/upstream/2.3.3/src/liveedit.h +0 -170
- data/ext/v8/upstream/2.3.3/src/log-utils.cc +0 -497
- data/ext/v8/upstream/2.3.3/src/log-utils.h +0 -289
- data/ext/v8/upstream/2.3.3/src/log.cc +0 -1561
- data/ext/v8/upstream/2.3.3/src/log.h +0 -384
- data/ext/v8/upstream/2.3.3/src/macro-assembler.h +0 -86
- data/ext/v8/upstream/2.3.3/src/macros.py +0 -177
- data/ext/v8/upstream/2.3.3/src/mark-compact.cc +0 -2330
- data/ext/v8/upstream/2.3.3/src/mark-compact.h +0 -451
- data/ext/v8/upstream/2.3.3/src/math.js +0 -264
- data/ext/v8/upstream/2.3.3/src/memory.h +0 -74
- data/ext/v8/upstream/2.3.3/src/messages.cc +0 -183
- data/ext/v8/upstream/2.3.3/src/messages.h +0 -113
- data/ext/v8/upstream/2.3.3/src/messages.js +0 -982
- data/ext/v8/upstream/2.3.3/src/mips/assembler-mips.h +0 -668
- data/ext/v8/upstream/2.3.3/src/mips/builtins-mips.cc +0 -205
- data/ext/v8/upstream/2.3.3/src/mips/codegen-mips.h +0 -434
- data/ext/v8/upstream/2.3.3/src/mips/debug-mips.cc +0 -131
- data/ext/v8/upstream/2.3.3/src/mips/frames-mips.cc +0 -102
- data/ext/v8/upstream/2.3.3/src/mips/ic-mips.cc +0 -220
- data/ext/v8/upstream/2.3.3/src/mips/simulator-mips.cc +0 -1651
- data/ext/v8/upstream/2.3.3/src/mips/simulator-mips.h +0 -311
- data/ext/v8/upstream/2.3.3/src/mips/stub-cache-mips.cc +0 -403
- data/ext/v8/upstream/2.3.3/src/mirror-debugger.js +0 -2380
- data/ext/v8/upstream/2.3.3/src/objects-debug.cc +0 -1366
- data/ext/v8/upstream/2.3.3/src/objects-inl.h +0 -3333
- data/ext/v8/upstream/2.3.3/src/objects.cc +0 -8820
- data/ext/v8/upstream/2.3.3/src/objects.h +0 -5373
- data/ext/v8/upstream/2.3.3/src/oprofile-agent.cc +0 -108
- data/ext/v8/upstream/2.3.3/src/oprofile-agent.h +0 -77
- data/ext/v8/upstream/2.3.3/src/parser.cc +0 -5207
- data/ext/v8/upstream/2.3.3/src/parser.h +0 -197
- data/ext/v8/upstream/2.3.3/src/platform-freebsd.cc +0 -667
- data/ext/v8/upstream/2.3.3/src/platform-linux.cc +0 -862
- data/ext/v8/upstream/2.3.3/src/platform-macos.cc +0 -665
- data/ext/v8/upstream/2.3.3/src/platform-nullos.cc +0 -454
- data/ext/v8/upstream/2.3.3/src/platform-openbsd.cc +0 -622
- data/ext/v8/upstream/2.3.3/src/platform-posix.cc +0 -362
- data/ext/v8/upstream/2.3.3/src/platform-solaris.cc +0 -653
- data/ext/v8/upstream/2.3.3/src/platform-win32.cc +0 -1911
- data/ext/v8/upstream/2.3.3/src/platform.h +0 -577
- data/ext/v8/upstream/2.3.3/src/powers-ten.h +0 -2461
- data/ext/v8/upstream/2.3.3/src/prettyprinter.cc +0 -1531
- data/ext/v8/upstream/2.3.3/src/prettyprinter.h +0 -221
- data/ext/v8/upstream/2.3.3/src/profile-generator-inl.h +0 -148
- data/ext/v8/upstream/2.3.3/src/profile-generator.cc +0 -1830
- data/ext/v8/upstream/2.3.3/src/profile-generator.h +0 -853
- data/ext/v8/upstream/2.3.3/src/property.cc +0 -96
- data/ext/v8/upstream/2.3.3/src/property.h +0 -315
- data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-irregexp.cc +0 -464
- data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-irregexp.h +0 -141
- data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-tracer.cc +0 -356
- data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-tracer.h +0 -103
- data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler.cc +0 -261
- data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler.h +0 -228
- data/ext/v8/upstream/2.3.3/src/regexp.js +0 -549
- data/ext/v8/upstream/2.3.3/src/rewriter.cc +0 -1038
- data/ext/v8/upstream/2.3.3/src/rewriter.h +0 -54
- data/ext/v8/upstream/2.3.3/src/runtime.cc +0 -10599
- data/ext/v8/upstream/2.3.3/src/runtime.h +0 -459
- data/ext/v8/upstream/2.3.3/src/runtime.js +0 -629
- data/ext/v8/upstream/2.3.3/src/scanner.cc +0 -1346
- data/ext/v8/upstream/2.3.3/src/scanner.h +0 -503
- data/ext/v8/upstream/2.3.3/src/scopeinfo.cc +0 -637
- data/ext/v8/upstream/2.3.3/src/scopeinfo.h +0 -233
- data/ext/v8/upstream/2.3.3/src/scopes.cc +0 -962
- data/ext/v8/upstream/2.3.3/src/scopes.h +0 -400
- data/ext/v8/upstream/2.3.3/src/serialize.cc +0 -1461
- data/ext/v8/upstream/2.3.3/src/serialize.h +0 -581
- data/ext/v8/upstream/2.3.3/src/spaces-inl.h +0 -483
- data/ext/v8/upstream/2.3.3/src/spaces.cc +0 -2901
- data/ext/v8/upstream/2.3.3/src/spaces.h +0 -2197
- data/ext/v8/upstream/2.3.3/src/string-stream.cc +0 -584
- data/ext/v8/upstream/2.3.3/src/string-stream.h +0 -189
- data/ext/v8/upstream/2.3.3/src/string.js +0 -1006
- data/ext/v8/upstream/2.3.3/src/stub-cache.cc +0 -1379
- data/ext/v8/upstream/2.3.3/src/stub-cache.h +0 -756
- data/ext/v8/upstream/2.3.3/src/third_party/dtoa/COPYING +0 -15
- data/ext/v8/upstream/2.3.3/src/third_party/dtoa/dtoa.c +0 -3334
- data/ext/v8/upstream/2.3.3/src/token.cc +0 -56
- data/ext/v8/upstream/2.3.3/src/token.h +0 -270
- data/ext/v8/upstream/2.3.3/src/top.cc +0 -1067
- data/ext/v8/upstream/2.3.3/src/top.h +0 -463
- data/ext/v8/upstream/2.3.3/src/type-info.cc +0 -53
- data/ext/v8/upstream/2.3.3/src/type-info.h +0 -244
- data/ext/v8/upstream/2.3.3/src/unicode-inl.h +0 -238
- data/ext/v8/upstream/2.3.3/src/unicode.cc +0 -749
- data/ext/v8/upstream/2.3.3/src/unicode.h +0 -279
- data/ext/v8/upstream/2.3.3/src/uri.js +0 -415
- data/ext/v8/upstream/2.3.3/src/utils.cc +0 -285
- data/ext/v8/upstream/2.3.3/src/utils.h +0 -745
- data/ext/v8/upstream/2.3.3/src/v8-counters.h +0 -250
- data/ext/v8/upstream/2.3.3/src/v8.cc +0 -228
- data/ext/v8/upstream/2.3.3/src/v8.h +0 -121
- data/ext/v8/upstream/2.3.3/src/v8natives.js +0 -1188
- data/ext/v8/upstream/2.3.3/src/v8threads.cc +0 -461
- data/ext/v8/upstream/2.3.3/src/v8threads.h +0 -159
- data/ext/v8/upstream/2.3.3/src/variables.cc +0 -119
- data/ext/v8/upstream/2.3.3/src/variables.h +0 -205
- data/ext/v8/upstream/2.3.3/src/version.cc +0 -88
- data/ext/v8/upstream/2.3.3/src/virtual-frame-heavy-inl.h +0 -192
- data/ext/v8/upstream/2.3.3/src/virtual-frame.h +0 -46
- data/ext/v8/upstream/2.3.3/src/vm-state-inl.h +0 -137
- data/ext/v8/upstream/2.3.3/src/vm-state.cc +0 -39
- data/ext/v8/upstream/2.3.3/src/vm-state.h +0 -77
- data/ext/v8/upstream/2.3.3/src/x64/assembler-x64-inl.h +0 -400
- data/ext/v8/upstream/2.3.3/src/x64/assembler-x64.cc +0 -2963
- data/ext/v8/upstream/2.3.3/src/x64/assembler-x64.h +0 -1438
- data/ext/v8/upstream/2.3.3/src/x64/builtins-x64.cc +0 -1296
- data/ext/v8/upstream/2.3.3/src/x64/codegen-x64-inl.h +0 -46
- data/ext/v8/upstream/2.3.3/src/x64/codegen-x64.cc +0 -12491
- data/ext/v8/upstream/2.3.3/src/x64/codegen-x64.h +0 -1090
- data/ext/v8/upstream/2.3.3/src/x64/cpu-x64.cc +0 -83
- data/ext/v8/upstream/2.3.3/src/x64/debug-x64.cc +0 -267
- data/ext/v8/upstream/2.3.3/src/x64/disasm-x64.cc +0 -1696
- data/ext/v8/upstream/2.3.3/src/x64/fast-codegen-x64.cc +0 -250
- data/ext/v8/upstream/2.3.3/src/x64/frames-x64.cc +0 -113
- data/ext/v8/upstream/2.3.3/src/x64/frames-x64.h +0 -125
- data/ext/v8/upstream/2.3.3/src/x64/full-codegen-x64.cc +0 -3270
- data/ext/v8/upstream/2.3.3/src/x64/ic-x64.cc +0 -1907
- data/ext/v8/upstream/2.3.3/src/x64/jump-target-x64.cc +0 -437
- data/ext/v8/upstream/2.3.3/src/x64/macro-assembler-x64.cc +0 -2793
- data/ext/v8/upstream/2.3.3/src/x64/macro-assembler-x64.h +0 -916
- data/ext/v8/upstream/2.3.3/src/x64/regexp-macro-assembler-x64.cc +0 -1374
- data/ext/v8/upstream/2.3.3/src/x64/regexp-macro-assembler-x64.h +0 -277
- data/ext/v8/upstream/2.3.3/src/x64/simulator-x64.h +0 -63
- data/ext/v8/upstream/2.3.3/src/x64/stub-cache-x64.cc +0 -2560
- data/ext/v8/upstream/2.3.3/src/x64/virtual-frame-x64.cc +0 -1264
- data/ext/v8/upstream/2.3.3/src/x64/virtual-frame-x64.h +0 -590
- data/ext/v8/upstream/2.3.3/src/zone-inl.h +0 -82
- data/ext/v8/upstream/2.3.3/src/zone.cc +0 -194
- data/ext/v8/upstream/2.3.3/src/zone.h +0 -221
- data/ext/v8/upstream/2.3.3/tools/codemap.js +0 -270
- data/ext/v8/upstream/2.3.3/tools/csvparser.js +0 -83
- data/ext/v8/upstream/2.3.3/tools/gc-nvp-trace-processor.py +0 -317
- data/ext/v8/upstream/2.3.3/tools/gyp/v8.gyp +0 -749
- data/ext/v8/upstream/2.3.3/tools/linux-tick-processor.py +0 -78
- data/ext/v8/upstream/2.3.3/tools/logreader.js +0 -338
- data/ext/v8/upstream/2.3.3/tools/oprofile/annotate +0 -7
- data/ext/v8/upstream/2.3.3/tools/oprofile/common +0 -19
- data/ext/v8/upstream/2.3.3/tools/oprofile/dump +0 -7
- data/ext/v8/upstream/2.3.3/tools/oprofile/report +0 -7
- data/ext/v8/upstream/2.3.3/tools/oprofile/reset +0 -7
- data/ext/v8/upstream/2.3.3/tools/oprofile/run +0 -14
- data/ext/v8/upstream/2.3.3/tools/oprofile/shutdown +0 -7
- data/ext/v8/upstream/2.3.3/tools/oprofile/start +0 -7
- data/ext/v8/upstream/2.3.3/tools/presubmit.py +0 -299
- data/ext/v8/upstream/2.3.3/tools/profile.js +0 -691
- data/ext/v8/upstream/2.3.3/tools/profile_view.js +0 -224
- data/ext/v8/upstream/2.3.3/tools/splaytree.js +0 -322
- data/ext/v8/upstream/2.3.3/tools/splaytree.py +0 -226
- data/ext/v8/upstream/2.3.3/tools/tickprocessor.js +0 -862
- data/ext/v8/upstream/2.3.3/tools/tickprocessor.py +0 -571
- data/ext/v8/upstream/2.3.3/tools/utils.py +0 -88
- data/ext/v8/upstream/2.3.3/tools/visual_studio/README.txt +0 -71
- data/ext/v8/upstream/2.3.3/tools/visual_studio/common.vsprops +0 -34
- data/ext/v8/upstream/2.3.3/tools/visual_studio/debug.vsprops +0 -17
- data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base.vcproj +0 -1143
- data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base_arm.vcproj +0 -1115
- data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base_x64.vcproj +0 -1096
- data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample.vcproj +0 -145
- data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample_arm.vcproj +0 -145
- data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample_x64.vcproj +0 -161
- data/ext/v8/upstream/2.3.3/tools/windows-tick-processor.bat +0 -29
- data/ext/v8/upstream/2.3.3/tools/windows-tick-processor.py +0 -137
@@ -1,400 +0,0 @@
|
|
1
|
-
// Copyright 2006-2008 the V8 project authors. All rights reserved.
|
2
|
-
// Redistribution and use in source and binary forms, with or without
|
3
|
-
// modification, are permitted provided that the following conditions are
|
4
|
-
// met:
|
5
|
-
//
|
6
|
-
// * Redistributions of source code must retain the above copyright
|
7
|
-
// notice, this list of conditions and the following disclaimer.
|
8
|
-
// * Redistributions in binary form must reproduce the above
|
9
|
-
// copyright notice, this list of conditions and the following
|
10
|
-
// disclaimer in the documentation and/or other materials provided
|
11
|
-
// with the distribution.
|
12
|
-
// * Neither the name of Google Inc. nor the names of its
|
13
|
-
// contributors may be used to endorse or promote products derived
|
14
|
-
// from this software without specific prior written permission.
|
15
|
-
//
|
16
|
-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
17
|
-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
18
|
-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
19
|
-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
20
|
-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
21
|
-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
22
|
-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
24
|
-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
25
|
-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
26
|
-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
-
|
28
|
-
#ifndef V8_SCOPES_H_
|
29
|
-
#define V8_SCOPES_H_
|
30
|
-
|
31
|
-
#include "ast.h"
|
32
|
-
#include "hashmap.h"
|
33
|
-
|
34
|
-
namespace v8 {
|
35
|
-
namespace internal {
|
36
|
-
|
37
|
-
|
38
|
-
// A hash map to support fast variable declaration and lookup.
|
39
|
-
class VariableMap: public HashMap {
|
40
|
-
public:
|
41
|
-
VariableMap();
|
42
|
-
|
43
|
-
// Dummy constructor. This constructor doesn't set up the map
|
44
|
-
// properly so don't use it unless you have a good reason.
|
45
|
-
explicit VariableMap(bool gotta_love_static_overloading);
|
46
|
-
|
47
|
-
virtual ~VariableMap();
|
48
|
-
|
49
|
-
Variable* Declare(Scope* scope,
|
50
|
-
Handle<String> name,
|
51
|
-
Variable::Mode mode,
|
52
|
-
bool is_valid_lhs,
|
53
|
-
Variable::Kind kind);
|
54
|
-
|
55
|
-
Variable* Lookup(Handle<String> name);
|
56
|
-
};
|
57
|
-
|
58
|
-
|
59
|
-
// The dynamic scope part holds hash maps for the variables that will
|
60
|
-
// be looked up dynamically from within eval and with scopes. The objects
|
61
|
-
// are allocated on-demand from Scope::NonLocal to avoid wasting memory
|
62
|
-
// and setup time for scopes that don't need them.
|
63
|
-
class DynamicScopePart : public ZoneObject {
|
64
|
-
public:
|
65
|
-
VariableMap* GetMap(Variable::Mode mode) {
|
66
|
-
int index = mode - Variable::DYNAMIC;
|
67
|
-
ASSERT(index >= 0 && index < 3);
|
68
|
-
return &maps_[index];
|
69
|
-
}
|
70
|
-
|
71
|
-
private:
|
72
|
-
VariableMap maps_[3];
|
73
|
-
};
|
74
|
-
|
75
|
-
|
76
|
-
// Global invariants after AST construction: Each reference (i.e. identifier)
|
77
|
-
// to a JavaScript variable (including global properties) is represented by a
|
78
|
-
// VariableProxy node. Immediately after AST construction and before variable
|
79
|
-
// allocation, most VariableProxy nodes are "unresolved", i.e. not bound to a
|
80
|
-
// corresponding variable (though some are bound during parse time). Variable
|
81
|
-
// allocation binds each unresolved VariableProxy to one Variable and assigns
|
82
|
-
// a location. Note that many VariableProxy nodes may refer to the same Java-
|
83
|
-
// Script variable.
|
84
|
-
|
85
|
-
class Scope: public ZoneObject {
|
86
|
-
public:
|
87
|
-
// ---------------------------------------------------------------------------
|
88
|
-
// Construction
|
89
|
-
|
90
|
-
enum Type {
|
91
|
-
EVAL_SCOPE, // the top-level scope for an 'eval' source
|
92
|
-
FUNCTION_SCOPE, // the top-level scope for a function
|
93
|
-
GLOBAL_SCOPE // the top-level scope for a program or a top-level eval
|
94
|
-
};
|
95
|
-
|
96
|
-
Scope(Scope* outer_scope, Type type);
|
97
|
-
|
98
|
-
virtual ~Scope() { }
|
99
|
-
|
100
|
-
// The scope name is only used for printing/debugging.
|
101
|
-
void SetScopeName(Handle<String> scope_name) { scope_name_ = scope_name; }
|
102
|
-
|
103
|
-
void Initialize(bool inside_with);
|
104
|
-
|
105
|
-
|
106
|
-
// ---------------------------------------------------------------------------
|
107
|
-
// Declarations
|
108
|
-
|
109
|
-
// Lookup a variable in this scope. Returns the variable or NULL if not found.
|
110
|
-
virtual Variable* LocalLookup(Handle<String> name);
|
111
|
-
|
112
|
-
// Lookup a variable in this scope or outer scopes.
|
113
|
-
// Returns the variable or NULL if not found.
|
114
|
-
virtual Variable* Lookup(Handle<String> name);
|
115
|
-
|
116
|
-
// Declare the function variable for a function literal. This variable
|
117
|
-
// is in an intermediate scope between this function scope and the the
|
118
|
-
// outer scope. Only possible for function scopes; at most one variable.
|
119
|
-
Variable* DeclareFunctionVar(Handle<String> name);
|
120
|
-
|
121
|
-
// Declare a local variable in this scope. If the variable has been
|
122
|
-
// declared before, the previously declared variable is returned.
|
123
|
-
virtual Variable* DeclareLocal(Handle<String> name, Variable::Mode mode);
|
124
|
-
|
125
|
-
// Declare an implicit global variable in this scope which must be a
|
126
|
-
// global scope. The variable was introduced (possibly from an inner
|
127
|
-
// scope) by a reference to an unresolved variable with no intervening
|
128
|
-
// with statements or eval calls.
|
129
|
-
Variable* DeclareGlobal(Handle<String> name);
|
130
|
-
|
131
|
-
// Add a parameter to the parameter list. The parameter must have been
|
132
|
-
// declared via Declare. The same parameter may occur more than once in
|
133
|
-
// the parameter list; they must be added in source order, from left to
|
134
|
-
// right.
|
135
|
-
void AddParameter(Variable* var);
|
136
|
-
|
137
|
-
// Create a new unresolved variable.
|
138
|
-
virtual VariableProxy* NewUnresolved(Handle<String> name, bool inside_with);
|
139
|
-
|
140
|
-
// Remove a unresolved variable. During parsing, an unresolved variable
|
141
|
-
// may have been added optimistically, but then only the variable name
|
142
|
-
// was used (typically for labels). If the variable was not declared, the
|
143
|
-
// addition introduced a new unresolved variable which may end up being
|
144
|
-
// allocated globally as a "ghost" variable. RemoveUnresolved removes
|
145
|
-
// such a variable again if it was added; otherwise this is a no-op.
|
146
|
-
void RemoveUnresolved(VariableProxy* var);
|
147
|
-
|
148
|
-
// Creates a new temporary variable in this scope and binds a proxy to it.
|
149
|
-
// The name is only used for printing and cannot be used to find the variable.
|
150
|
-
// In particular, the only way to get hold of the temporary is by keeping the
|
151
|
-
// VariableProxy* around.
|
152
|
-
virtual VariableProxy* NewTemporary(Handle<String> name);
|
153
|
-
|
154
|
-
// Adds the specific declaration node to the list of declarations in
|
155
|
-
// this scope. The declarations are processed as part of entering
|
156
|
-
// the scope; see codegen.cc:ProcessDeclarations.
|
157
|
-
void AddDeclaration(Declaration* declaration);
|
158
|
-
|
159
|
-
// ---------------------------------------------------------------------------
|
160
|
-
// Illegal redeclaration support.
|
161
|
-
|
162
|
-
// Set an expression node that will be executed when the scope is
|
163
|
-
// entered. We only keep track of one illegal redeclaration node per
|
164
|
-
// scope - the first one - so if you try to set it multiple times
|
165
|
-
// the additional requests will be silently ignored.
|
166
|
-
void SetIllegalRedeclaration(Expression* expression);
|
167
|
-
|
168
|
-
// Visit the illegal redeclaration expression. Do not call if the
|
169
|
-
// scope doesn't have an illegal redeclaration node.
|
170
|
-
void VisitIllegalRedeclaration(AstVisitor* visitor);
|
171
|
-
|
172
|
-
// Check if the scope has (at least) one illegal redeclaration.
|
173
|
-
bool HasIllegalRedeclaration() const { return illegal_redecl_ != NULL; }
|
174
|
-
|
175
|
-
|
176
|
-
// ---------------------------------------------------------------------------
|
177
|
-
// Scope-specific info.
|
178
|
-
|
179
|
-
// Inform the scope that the corresponding code contains a with statement.
|
180
|
-
void RecordWithStatement() { scope_contains_with_ = true; }
|
181
|
-
|
182
|
-
// Inform the scope that the corresponding code contains an eval call.
|
183
|
-
void RecordEvalCall() { scope_calls_eval_ = true; }
|
184
|
-
|
185
|
-
|
186
|
-
// ---------------------------------------------------------------------------
|
187
|
-
// Predicates.
|
188
|
-
|
189
|
-
// Specific scope types.
|
190
|
-
bool is_eval_scope() const { return type_ == EVAL_SCOPE; }
|
191
|
-
bool is_function_scope() const { return type_ == FUNCTION_SCOPE; }
|
192
|
-
bool is_global_scope() const { return type_ == GLOBAL_SCOPE; }
|
193
|
-
|
194
|
-
// Information about which scopes calls eval.
|
195
|
-
bool calls_eval() const { return scope_calls_eval_; }
|
196
|
-
bool outer_scope_calls_eval() const { return outer_scope_calls_eval_; }
|
197
|
-
|
198
|
-
// Is this scope inside a with statement.
|
199
|
-
bool inside_with() const { return scope_inside_with_; }
|
200
|
-
// Does this scope contain a with statement.
|
201
|
-
bool contains_with() const { return scope_contains_with_; }
|
202
|
-
|
203
|
-
// The scope immediately surrounding this scope, or NULL.
|
204
|
-
Scope* outer_scope() const { return outer_scope_; }
|
205
|
-
|
206
|
-
// ---------------------------------------------------------------------------
|
207
|
-
// Accessors.
|
208
|
-
|
209
|
-
// A new variable proxy corresponding to the (function) receiver.
|
210
|
-
VariableProxy* receiver() const {
|
211
|
-
VariableProxy* proxy =
|
212
|
-
new VariableProxy(Factory::this_symbol(), true, false);
|
213
|
-
proxy->BindTo(receiver_);
|
214
|
-
return proxy;
|
215
|
-
}
|
216
|
-
|
217
|
-
// The variable holding the function literal for named function
|
218
|
-
// literals, or NULL.
|
219
|
-
// Only valid for function scopes.
|
220
|
-
Variable* function() const {
|
221
|
-
ASSERT(is_function_scope());
|
222
|
-
return function_;
|
223
|
-
}
|
224
|
-
|
225
|
-
// Parameters. The left-most parameter has index 0.
|
226
|
-
// Only valid for function scopes.
|
227
|
-
Variable* parameter(int index) const {
|
228
|
-
ASSERT(is_function_scope());
|
229
|
-
return params_[index];
|
230
|
-
}
|
231
|
-
|
232
|
-
int num_parameters() const { return params_.length(); }
|
233
|
-
|
234
|
-
// The local variable 'arguments' if we need to allocate it; NULL otherwise.
|
235
|
-
// If arguments() exist, arguments_shadow() exists, too.
|
236
|
-
VariableProxy* arguments() const { return arguments_; }
|
237
|
-
|
238
|
-
// The '.arguments' shadow variable if we need to allocate it; NULL otherwise.
|
239
|
-
// If arguments_shadow() exist, arguments() exists, too.
|
240
|
-
VariableProxy* arguments_shadow() const { return arguments_shadow_; }
|
241
|
-
|
242
|
-
// Declarations list.
|
243
|
-
ZoneList<Declaration*>* declarations() { return &decls_; }
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
// ---------------------------------------------------------------------------
|
248
|
-
// Variable allocation.
|
249
|
-
|
250
|
-
// Collect all used locals in this scope.
|
251
|
-
template<class Allocator>
|
252
|
-
void CollectUsedVariables(List<Variable*, Allocator>* locals);
|
253
|
-
|
254
|
-
// Resolve and fill in the allocation information for all variables
|
255
|
-
// in this scopes. Must be called *after* all scopes have been
|
256
|
-
// processed (parsed) to ensure that unresolved variables can be
|
257
|
-
// resolved properly.
|
258
|
-
//
|
259
|
-
// In the case of code compiled and run using 'eval', the context
|
260
|
-
// parameter is the context in which eval was called. In all other
|
261
|
-
// cases the context parameter is an empty handle.
|
262
|
-
void AllocateVariables(Handle<Context> context);
|
263
|
-
|
264
|
-
// Result of variable allocation.
|
265
|
-
int num_stack_slots() const { return num_stack_slots_; }
|
266
|
-
int num_heap_slots() const { return num_heap_slots_; }
|
267
|
-
|
268
|
-
// Make sure this scope and all outer scopes are eagerly compiled.
|
269
|
-
void ForceEagerCompilation() { force_eager_compilation_ = true; }
|
270
|
-
|
271
|
-
// Determine if we can use lazy compilation for this scope.
|
272
|
-
bool AllowsLazyCompilation() const;
|
273
|
-
|
274
|
-
// True if the outer context of this scope is always the global context.
|
275
|
-
bool HasTrivialOuterContext() const;
|
276
|
-
|
277
|
-
// The number of contexts between this and scope; zero if this == scope.
|
278
|
-
int ContextChainLength(Scope* scope);
|
279
|
-
|
280
|
-
// ---------------------------------------------------------------------------
|
281
|
-
// Debugging.
|
282
|
-
|
283
|
-
#ifdef DEBUG
|
284
|
-
void Print(int n = 0); // n = indentation; n < 0 => don't print recursively
|
285
|
-
#endif
|
286
|
-
|
287
|
-
// ---------------------------------------------------------------------------
|
288
|
-
// Implementation.
|
289
|
-
protected:
|
290
|
-
friend class ParserFactory;
|
291
|
-
|
292
|
-
explicit Scope(Type type);
|
293
|
-
|
294
|
-
// Scope tree.
|
295
|
-
Scope* outer_scope_; // the immediately enclosing outer scope, or NULL
|
296
|
-
ZoneList<Scope*> inner_scopes_; // the immediately enclosed inner scopes
|
297
|
-
|
298
|
-
// The scope type.
|
299
|
-
Type type_;
|
300
|
-
|
301
|
-
// Debugging support.
|
302
|
-
Handle<String> scope_name_;
|
303
|
-
|
304
|
-
// The variables declared in this scope:
|
305
|
-
//
|
306
|
-
// All user-declared variables (incl. parameters). For global scopes
|
307
|
-
// variables may be implicitly 'declared' by being used (possibly in
|
308
|
-
// an inner scope) with no intervening with statements or eval calls.
|
309
|
-
VariableMap variables_;
|
310
|
-
// Compiler-allocated (user-invisible) temporaries.
|
311
|
-
ZoneList<Variable*> temps_;
|
312
|
-
// Parameter list in source order.
|
313
|
-
ZoneList<Variable*> params_;
|
314
|
-
// Variables that must be looked up dynamically.
|
315
|
-
DynamicScopePart* dynamics_;
|
316
|
-
// Unresolved variables referred to from this scope.
|
317
|
-
ZoneList<VariableProxy*> unresolved_;
|
318
|
-
// Declarations.
|
319
|
-
ZoneList<Declaration*> decls_;
|
320
|
-
// Convenience variable.
|
321
|
-
Variable* receiver_;
|
322
|
-
// Function variable, if any; function scopes only.
|
323
|
-
Variable* function_;
|
324
|
-
// Convenience variable; function scopes only.
|
325
|
-
VariableProxy* arguments_;
|
326
|
-
// Convenience variable; function scopes only.
|
327
|
-
VariableProxy* arguments_shadow_;
|
328
|
-
|
329
|
-
// Illegal redeclaration.
|
330
|
-
Expression* illegal_redecl_;
|
331
|
-
|
332
|
-
// Scope-specific information.
|
333
|
-
bool scope_inside_with_; // this scope is inside a 'with' of some outer scope
|
334
|
-
bool scope_contains_with_; // this scope contains a 'with' statement
|
335
|
-
bool scope_calls_eval_; // this scope contains an 'eval' call
|
336
|
-
|
337
|
-
// Computed via PropagateScopeInfo.
|
338
|
-
bool outer_scope_calls_eval_;
|
339
|
-
bool inner_scope_calls_eval_;
|
340
|
-
bool outer_scope_is_eval_scope_;
|
341
|
-
bool force_eager_compilation_;
|
342
|
-
|
343
|
-
// Computed via AllocateVariables; function scopes only.
|
344
|
-
int num_stack_slots_;
|
345
|
-
int num_heap_slots_;
|
346
|
-
|
347
|
-
// Create a non-local variable with a given name.
|
348
|
-
// These variables are looked up dynamically at runtime.
|
349
|
-
Variable* NonLocal(Handle<String> name, Variable::Mode mode);
|
350
|
-
|
351
|
-
// Variable resolution.
|
352
|
-
Variable* LookupRecursive(Handle<String> name,
|
353
|
-
bool inner_lookup,
|
354
|
-
Variable** invalidated_local);
|
355
|
-
void ResolveVariable(Scope* global_scope,
|
356
|
-
Handle<Context> context,
|
357
|
-
VariableProxy* proxy);
|
358
|
-
void ResolveVariablesRecursively(Scope* global_scope,
|
359
|
-
Handle<Context> context);
|
360
|
-
|
361
|
-
// Scope analysis.
|
362
|
-
bool PropagateScopeInfo(bool outer_scope_calls_eval,
|
363
|
-
bool outer_scope_is_eval_scope);
|
364
|
-
bool HasTrivialContext() const;
|
365
|
-
|
366
|
-
// Predicates.
|
367
|
-
bool MustAllocate(Variable* var);
|
368
|
-
bool MustAllocateInContext(Variable* var);
|
369
|
-
bool HasArgumentsParameter();
|
370
|
-
|
371
|
-
// Variable allocation.
|
372
|
-
void AllocateStackSlot(Variable* var);
|
373
|
-
void AllocateHeapSlot(Variable* var);
|
374
|
-
void AllocateParameterLocals();
|
375
|
-
void AllocateNonParameterLocal(Variable* var);
|
376
|
-
void AllocateNonParameterLocals();
|
377
|
-
void AllocateVariablesRecursively();
|
378
|
-
};
|
379
|
-
|
380
|
-
|
381
|
-
class DummyScope : public Scope {
|
382
|
-
public:
|
383
|
-
DummyScope() : Scope(GLOBAL_SCOPE) {
|
384
|
-
outer_scope_ = this;
|
385
|
-
}
|
386
|
-
|
387
|
-
virtual Variable* Lookup(Handle<String> name) { return NULL; }
|
388
|
-
virtual Variable* Declare(Handle<String> name, Variable::Mode mode) {
|
389
|
-
return NULL;
|
390
|
-
}
|
391
|
-
virtual VariableProxy* NewUnresolved(Handle<String> name, bool inside_with) {
|
392
|
-
return NULL;
|
393
|
-
}
|
394
|
-
virtual VariableProxy* NewTemporary(Handle<String> name) { return NULL; }
|
395
|
-
};
|
396
|
-
|
397
|
-
|
398
|
-
} } // namespace v8::internal
|
399
|
-
|
400
|
-
#endif // V8_SCOPES_H_
|
@@ -1,1461 +0,0 @@
|
|
1
|
-
// Copyright 2006-2008 the V8 project authors. All rights reserved.
|
2
|
-
// Redistribution and use in source and binary forms, with or without
|
3
|
-
// modification, are permitted provided that the following conditions are
|
4
|
-
// met:
|
5
|
-
//
|
6
|
-
// * Redistributions of source code must retain the above copyright
|
7
|
-
// notice, this list of conditions and the following disclaimer.
|
8
|
-
// * Redistributions in binary form must reproduce the above
|
9
|
-
// copyright notice, this list of conditions and the following
|
10
|
-
// disclaimer in the documentation and/or other materials provided
|
11
|
-
// with the distribution.
|
12
|
-
// * Neither the name of Google Inc. nor the names of its
|
13
|
-
// contributors may be used to endorse or promote products derived
|
14
|
-
// from this software without specific prior written permission.
|
15
|
-
//
|
16
|
-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
17
|
-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
18
|
-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
19
|
-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
20
|
-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
21
|
-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
22
|
-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
24
|
-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
25
|
-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
26
|
-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
-
|
28
|
-
#include "v8.h"
|
29
|
-
|
30
|
-
#include "accessors.h"
|
31
|
-
#include "api.h"
|
32
|
-
#include "execution.h"
|
33
|
-
#include "global-handles.h"
|
34
|
-
#include "ic-inl.h"
|
35
|
-
#include "natives.h"
|
36
|
-
#include "platform.h"
|
37
|
-
#include "runtime.h"
|
38
|
-
#include "serialize.h"
|
39
|
-
#include "stub-cache.h"
|
40
|
-
#include "v8threads.h"
|
41
|
-
#include "top.h"
|
42
|
-
#include "bootstrapper.h"
|
43
|
-
|
44
|
-
namespace v8 {
|
45
|
-
namespace internal {
|
46
|
-
|
47
|
-
|
48
|
-
// -----------------------------------------------------------------------------
|
49
|
-
// Coding of external references.
|
50
|
-
|
51
|
-
// The encoding of an external reference. The type is in the high word.
|
52
|
-
// The id is in the low word.
|
53
|
-
static uint32_t EncodeExternal(TypeCode type, uint16_t id) {
|
54
|
-
return static_cast<uint32_t>(type) << 16 | id;
|
55
|
-
}
|
56
|
-
|
57
|
-
|
58
|
-
static int* GetInternalPointer(StatsCounter* counter) {
|
59
|
-
// All counters refer to dummy_counter, if deserializing happens without
|
60
|
-
// setting up counters.
|
61
|
-
static int dummy_counter = 0;
|
62
|
-
return counter->Enabled() ? counter->GetInternalPointer() : &dummy_counter;
|
63
|
-
}
|
64
|
-
|
65
|
-
|
66
|
-
// ExternalReferenceTable is a helper class that defines the relationship
|
67
|
-
// between external references and their encodings. It is used to build
|
68
|
-
// hashmaps in ExternalReferenceEncoder and ExternalReferenceDecoder.
|
69
|
-
class ExternalReferenceTable {
|
70
|
-
public:
|
71
|
-
static ExternalReferenceTable* instance() {
|
72
|
-
if (!instance_) instance_ = new ExternalReferenceTable();
|
73
|
-
return instance_;
|
74
|
-
}
|
75
|
-
|
76
|
-
int size() const { return refs_.length(); }
|
77
|
-
|
78
|
-
Address address(int i) { return refs_[i].address; }
|
79
|
-
|
80
|
-
uint32_t code(int i) { return refs_[i].code; }
|
81
|
-
|
82
|
-
const char* name(int i) { return refs_[i].name; }
|
83
|
-
|
84
|
-
int max_id(int code) { return max_id_[code]; }
|
85
|
-
|
86
|
-
private:
|
87
|
-
static ExternalReferenceTable* instance_;
|
88
|
-
|
89
|
-
ExternalReferenceTable() : refs_(64) { PopulateTable(); }
|
90
|
-
~ExternalReferenceTable() { }
|
91
|
-
|
92
|
-
struct ExternalReferenceEntry {
|
93
|
-
Address address;
|
94
|
-
uint32_t code;
|
95
|
-
const char* name;
|
96
|
-
};
|
97
|
-
|
98
|
-
void PopulateTable();
|
99
|
-
|
100
|
-
// For a few types of references, we can get their address from their id.
|
101
|
-
void AddFromId(TypeCode type, uint16_t id, const char* name);
|
102
|
-
|
103
|
-
// For other types of references, the caller will figure out the address.
|
104
|
-
void Add(Address address, TypeCode type, uint16_t id, const char* name);
|
105
|
-
|
106
|
-
List<ExternalReferenceEntry> refs_;
|
107
|
-
int max_id_[kTypeCodeCount];
|
108
|
-
};
|
109
|
-
|
110
|
-
|
111
|
-
ExternalReferenceTable* ExternalReferenceTable::instance_ = NULL;
|
112
|
-
|
113
|
-
|
114
|
-
void ExternalReferenceTable::AddFromId(TypeCode type,
|
115
|
-
uint16_t id,
|
116
|
-
const char* name) {
|
117
|
-
Address address;
|
118
|
-
switch (type) {
|
119
|
-
case C_BUILTIN: {
|
120
|
-
ExternalReference ref(static_cast<Builtins::CFunctionId>(id));
|
121
|
-
address = ref.address();
|
122
|
-
break;
|
123
|
-
}
|
124
|
-
case BUILTIN: {
|
125
|
-
ExternalReference ref(static_cast<Builtins::Name>(id));
|
126
|
-
address = ref.address();
|
127
|
-
break;
|
128
|
-
}
|
129
|
-
case RUNTIME_FUNCTION: {
|
130
|
-
ExternalReference ref(static_cast<Runtime::FunctionId>(id));
|
131
|
-
address = ref.address();
|
132
|
-
break;
|
133
|
-
}
|
134
|
-
case IC_UTILITY: {
|
135
|
-
ExternalReference ref(IC_Utility(static_cast<IC::UtilityId>(id)));
|
136
|
-
address = ref.address();
|
137
|
-
break;
|
138
|
-
}
|
139
|
-
default:
|
140
|
-
UNREACHABLE();
|
141
|
-
return;
|
142
|
-
}
|
143
|
-
Add(address, type, id, name);
|
144
|
-
}
|
145
|
-
|
146
|
-
|
147
|
-
void ExternalReferenceTable::Add(Address address,
|
148
|
-
TypeCode type,
|
149
|
-
uint16_t id,
|
150
|
-
const char* name) {
|
151
|
-
ASSERT_NE(NULL, address);
|
152
|
-
ExternalReferenceEntry entry;
|
153
|
-
entry.address = address;
|
154
|
-
entry.code = EncodeExternal(type, id);
|
155
|
-
entry.name = name;
|
156
|
-
ASSERT_NE(0, entry.code);
|
157
|
-
refs_.Add(entry);
|
158
|
-
if (id > max_id_[type]) max_id_[type] = id;
|
159
|
-
}
|
160
|
-
|
161
|
-
|
162
|
-
void ExternalReferenceTable::PopulateTable() {
|
163
|
-
for (int type_code = 0; type_code < kTypeCodeCount; type_code++) {
|
164
|
-
max_id_[type_code] = 0;
|
165
|
-
}
|
166
|
-
|
167
|
-
// The following populates all of the different type of external references
|
168
|
-
// into the ExternalReferenceTable.
|
169
|
-
//
|
170
|
-
// NOTE: This function was originally 100k of code. It has since been
|
171
|
-
// rewritten to be mostly table driven, as the callback macro style tends to
|
172
|
-
// very easily cause code bloat. Please be careful in the future when adding
|
173
|
-
// new references.
|
174
|
-
|
175
|
-
struct RefTableEntry {
|
176
|
-
TypeCode type;
|
177
|
-
uint16_t id;
|
178
|
-
const char* name;
|
179
|
-
};
|
180
|
-
|
181
|
-
static const RefTableEntry ref_table[] = {
|
182
|
-
// Builtins
|
183
|
-
#define DEF_ENTRY_C(name, ignored) \
|
184
|
-
{ C_BUILTIN, \
|
185
|
-
Builtins::c_##name, \
|
186
|
-
"Builtins::" #name },
|
187
|
-
|
188
|
-
BUILTIN_LIST_C(DEF_ENTRY_C)
|
189
|
-
#undef DEF_ENTRY_C
|
190
|
-
|
191
|
-
#define DEF_ENTRY_C(name, ignored) \
|
192
|
-
{ BUILTIN, \
|
193
|
-
Builtins::name, \
|
194
|
-
"Builtins::" #name },
|
195
|
-
#define DEF_ENTRY_A(name, kind, state) DEF_ENTRY_C(name, ignored)
|
196
|
-
|
197
|
-
BUILTIN_LIST_C(DEF_ENTRY_C)
|
198
|
-
BUILTIN_LIST_A(DEF_ENTRY_A)
|
199
|
-
BUILTIN_LIST_DEBUG_A(DEF_ENTRY_A)
|
200
|
-
#undef DEF_ENTRY_C
|
201
|
-
#undef DEF_ENTRY_A
|
202
|
-
|
203
|
-
// Runtime functions
|
204
|
-
#define RUNTIME_ENTRY(name, nargs, ressize) \
|
205
|
-
{ RUNTIME_FUNCTION, \
|
206
|
-
Runtime::k##name, \
|
207
|
-
"Runtime::" #name },
|
208
|
-
|
209
|
-
RUNTIME_FUNCTION_LIST(RUNTIME_ENTRY)
|
210
|
-
#undef RUNTIME_ENTRY
|
211
|
-
|
212
|
-
// IC utilities
|
213
|
-
#define IC_ENTRY(name) \
|
214
|
-
{ IC_UTILITY, \
|
215
|
-
IC::k##name, \
|
216
|
-
"IC::" #name },
|
217
|
-
|
218
|
-
IC_UTIL_LIST(IC_ENTRY)
|
219
|
-
#undef IC_ENTRY
|
220
|
-
}; // end of ref_table[].
|
221
|
-
|
222
|
-
for (size_t i = 0; i < ARRAY_SIZE(ref_table); ++i) {
|
223
|
-
AddFromId(ref_table[i].type, ref_table[i].id, ref_table[i].name);
|
224
|
-
}
|
225
|
-
|
226
|
-
#ifdef ENABLE_DEBUGGER_SUPPORT
|
227
|
-
// Debug addresses
|
228
|
-
Add(Debug_Address(Debug::k_after_break_target_address).address(),
|
229
|
-
DEBUG_ADDRESS,
|
230
|
-
Debug::k_after_break_target_address << kDebugIdShift,
|
231
|
-
"Debug::after_break_target_address()");
|
232
|
-
Add(Debug_Address(Debug::k_debug_break_slot_address).address(),
|
233
|
-
DEBUG_ADDRESS,
|
234
|
-
Debug::k_debug_break_slot_address << kDebugIdShift,
|
235
|
-
"Debug::debug_break_slot_address()");
|
236
|
-
Add(Debug_Address(Debug::k_debug_break_return_address).address(),
|
237
|
-
DEBUG_ADDRESS,
|
238
|
-
Debug::k_debug_break_return_address << kDebugIdShift,
|
239
|
-
"Debug::debug_break_return_address()");
|
240
|
-
const char* debug_register_format = "Debug::register_address(%i)";
|
241
|
-
int dr_format_length = StrLength(debug_register_format);
|
242
|
-
for (int i = 0; i < kNumJSCallerSaved; ++i) {
|
243
|
-
Vector<char> name = Vector<char>::New(dr_format_length + 1);
|
244
|
-
OS::SNPrintF(name, debug_register_format, i);
|
245
|
-
Add(Debug_Address(Debug::k_register_address, i).address(),
|
246
|
-
DEBUG_ADDRESS,
|
247
|
-
Debug::k_register_address << kDebugIdShift | i,
|
248
|
-
name.start());
|
249
|
-
}
|
250
|
-
#endif
|
251
|
-
|
252
|
-
// Stat counters
|
253
|
-
struct StatsRefTableEntry {
|
254
|
-
StatsCounter* counter;
|
255
|
-
uint16_t id;
|
256
|
-
const char* name;
|
257
|
-
};
|
258
|
-
|
259
|
-
static const StatsRefTableEntry stats_ref_table[] = {
|
260
|
-
#define COUNTER_ENTRY(name, caption) \
|
261
|
-
{ &Counters::name, \
|
262
|
-
Counters::k_##name, \
|
263
|
-
"Counters::" #name },
|
264
|
-
|
265
|
-
STATS_COUNTER_LIST_1(COUNTER_ENTRY)
|
266
|
-
STATS_COUNTER_LIST_2(COUNTER_ENTRY)
|
267
|
-
#undef COUNTER_ENTRY
|
268
|
-
}; // end of stats_ref_table[].
|
269
|
-
|
270
|
-
for (size_t i = 0; i < ARRAY_SIZE(stats_ref_table); ++i) {
|
271
|
-
Add(reinterpret_cast<Address>(
|
272
|
-
GetInternalPointer(stats_ref_table[i].counter)),
|
273
|
-
STATS_COUNTER,
|
274
|
-
stats_ref_table[i].id,
|
275
|
-
stats_ref_table[i].name);
|
276
|
-
}
|
277
|
-
|
278
|
-
// Top addresses
|
279
|
-
const char* top_address_format = "Top::%s";
|
280
|
-
|
281
|
-
const char* AddressNames[] = {
|
282
|
-
#define C(name) #name,
|
283
|
-
TOP_ADDRESS_LIST(C)
|
284
|
-
TOP_ADDRESS_LIST_PROF(C)
|
285
|
-
NULL
|
286
|
-
#undef C
|
287
|
-
};
|
288
|
-
|
289
|
-
int top_format_length = StrLength(top_address_format) - 2;
|
290
|
-
for (uint16_t i = 0; i < Top::k_top_address_count; ++i) {
|
291
|
-
const char* address_name = AddressNames[i];
|
292
|
-
Vector<char> name =
|
293
|
-
Vector<char>::New(top_format_length + StrLength(address_name) + 1);
|
294
|
-
const char* chars = name.start();
|
295
|
-
OS::SNPrintF(name, top_address_format, address_name);
|
296
|
-
Add(Top::get_address_from_id((Top::AddressId)i), TOP_ADDRESS, i, chars);
|
297
|
-
}
|
298
|
-
|
299
|
-
// Extensions
|
300
|
-
Add(FUNCTION_ADDR(GCExtension::GC), EXTENSION, 1,
|
301
|
-
"GCExtension::GC");
|
302
|
-
|
303
|
-
// Accessors
|
304
|
-
#define ACCESSOR_DESCRIPTOR_DECLARATION(name) \
|
305
|
-
Add((Address)&Accessors::name, \
|
306
|
-
ACCESSOR, \
|
307
|
-
Accessors::k##name, \
|
308
|
-
"Accessors::" #name);
|
309
|
-
|
310
|
-
ACCESSOR_DESCRIPTOR_LIST(ACCESSOR_DESCRIPTOR_DECLARATION)
|
311
|
-
#undef ACCESSOR_DESCRIPTOR_DECLARATION
|
312
|
-
|
313
|
-
// Stub cache tables
|
314
|
-
Add(SCTableReference::keyReference(StubCache::kPrimary).address(),
|
315
|
-
STUB_CACHE_TABLE,
|
316
|
-
1,
|
317
|
-
"StubCache::primary_->key");
|
318
|
-
Add(SCTableReference::valueReference(StubCache::kPrimary).address(),
|
319
|
-
STUB_CACHE_TABLE,
|
320
|
-
2,
|
321
|
-
"StubCache::primary_->value");
|
322
|
-
Add(SCTableReference::keyReference(StubCache::kSecondary).address(),
|
323
|
-
STUB_CACHE_TABLE,
|
324
|
-
3,
|
325
|
-
"StubCache::secondary_->key");
|
326
|
-
Add(SCTableReference::valueReference(StubCache::kSecondary).address(),
|
327
|
-
STUB_CACHE_TABLE,
|
328
|
-
4,
|
329
|
-
"StubCache::secondary_->value");
|
330
|
-
|
331
|
-
// Runtime entries
|
332
|
-
Add(ExternalReference::perform_gc_function().address(),
|
333
|
-
RUNTIME_ENTRY,
|
334
|
-
1,
|
335
|
-
"Runtime::PerformGC");
|
336
|
-
Add(ExternalReference::fill_heap_number_with_random_function().address(),
|
337
|
-
RUNTIME_ENTRY,
|
338
|
-
2,
|
339
|
-
"V8::FillHeapNumberWithRandom");
|
340
|
-
|
341
|
-
Add(ExternalReference::random_uint32_function().address(),
|
342
|
-
RUNTIME_ENTRY,
|
343
|
-
3,
|
344
|
-
"V8::Random");
|
345
|
-
|
346
|
-
// Miscellaneous
|
347
|
-
Add(ExternalReference::the_hole_value_location().address(),
|
348
|
-
UNCLASSIFIED,
|
349
|
-
2,
|
350
|
-
"Factory::the_hole_value().location()");
|
351
|
-
Add(ExternalReference::roots_address().address(),
|
352
|
-
UNCLASSIFIED,
|
353
|
-
3,
|
354
|
-
"Heap::roots_address()");
|
355
|
-
Add(ExternalReference::address_of_stack_limit().address(),
|
356
|
-
UNCLASSIFIED,
|
357
|
-
4,
|
358
|
-
"StackGuard::address_of_jslimit()");
|
359
|
-
Add(ExternalReference::address_of_real_stack_limit().address(),
|
360
|
-
UNCLASSIFIED,
|
361
|
-
5,
|
362
|
-
"StackGuard::address_of_real_jslimit()");
|
363
|
-
#ifndef V8_INTERPRETED_REGEXP
|
364
|
-
Add(ExternalReference::address_of_regexp_stack_limit().address(),
|
365
|
-
UNCLASSIFIED,
|
366
|
-
6,
|
367
|
-
"RegExpStack::limit_address()");
|
368
|
-
Add(ExternalReference::address_of_regexp_stack_memory_address().address(),
|
369
|
-
UNCLASSIFIED,
|
370
|
-
7,
|
371
|
-
"RegExpStack::memory_address()");
|
372
|
-
Add(ExternalReference::address_of_regexp_stack_memory_size().address(),
|
373
|
-
UNCLASSIFIED,
|
374
|
-
8,
|
375
|
-
"RegExpStack::memory_size()");
|
376
|
-
Add(ExternalReference::address_of_static_offsets_vector().address(),
|
377
|
-
UNCLASSIFIED,
|
378
|
-
9,
|
379
|
-
"OffsetsVector::static_offsets_vector");
|
380
|
-
#endif // V8_INTERPRETED_REGEXP
|
381
|
-
Add(ExternalReference::new_space_start().address(),
|
382
|
-
UNCLASSIFIED,
|
383
|
-
10,
|
384
|
-
"Heap::NewSpaceStart()");
|
385
|
-
Add(ExternalReference::new_space_mask().address(),
|
386
|
-
UNCLASSIFIED,
|
387
|
-
11,
|
388
|
-
"Heap::NewSpaceMask()");
|
389
|
-
Add(ExternalReference::heap_always_allocate_scope_depth().address(),
|
390
|
-
UNCLASSIFIED,
|
391
|
-
12,
|
392
|
-
"Heap::always_allocate_scope_depth()");
|
393
|
-
Add(ExternalReference::new_space_allocation_limit_address().address(),
|
394
|
-
UNCLASSIFIED,
|
395
|
-
13,
|
396
|
-
"Heap::NewSpaceAllocationLimitAddress()");
|
397
|
-
Add(ExternalReference::new_space_allocation_top_address().address(),
|
398
|
-
UNCLASSIFIED,
|
399
|
-
14,
|
400
|
-
"Heap::NewSpaceAllocationTopAddress()");
|
401
|
-
#ifdef ENABLE_DEBUGGER_SUPPORT
|
402
|
-
Add(ExternalReference::debug_break().address(),
|
403
|
-
UNCLASSIFIED,
|
404
|
-
15,
|
405
|
-
"Debug::Break()");
|
406
|
-
Add(ExternalReference::debug_step_in_fp_address().address(),
|
407
|
-
UNCLASSIFIED,
|
408
|
-
16,
|
409
|
-
"Debug::step_in_fp_addr()");
|
410
|
-
#endif
|
411
|
-
Add(ExternalReference::double_fp_operation(Token::ADD).address(),
|
412
|
-
UNCLASSIFIED,
|
413
|
-
17,
|
414
|
-
"add_two_doubles");
|
415
|
-
Add(ExternalReference::double_fp_operation(Token::SUB).address(),
|
416
|
-
UNCLASSIFIED,
|
417
|
-
18,
|
418
|
-
"sub_two_doubles");
|
419
|
-
Add(ExternalReference::double_fp_operation(Token::MUL).address(),
|
420
|
-
UNCLASSIFIED,
|
421
|
-
19,
|
422
|
-
"mul_two_doubles");
|
423
|
-
Add(ExternalReference::double_fp_operation(Token::DIV).address(),
|
424
|
-
UNCLASSIFIED,
|
425
|
-
20,
|
426
|
-
"div_two_doubles");
|
427
|
-
Add(ExternalReference::double_fp_operation(Token::MOD).address(),
|
428
|
-
UNCLASSIFIED,
|
429
|
-
21,
|
430
|
-
"mod_two_doubles");
|
431
|
-
Add(ExternalReference::compare_doubles().address(),
|
432
|
-
UNCLASSIFIED,
|
433
|
-
22,
|
434
|
-
"compare_doubles");
|
435
|
-
#ifndef V8_INTERPRETED_REGEXP
|
436
|
-
Add(ExternalReference::re_case_insensitive_compare_uc16().address(),
|
437
|
-
UNCLASSIFIED,
|
438
|
-
23,
|
439
|
-
"NativeRegExpMacroAssembler::CaseInsensitiveCompareUC16()");
|
440
|
-
Add(ExternalReference::re_check_stack_guard_state().address(),
|
441
|
-
UNCLASSIFIED,
|
442
|
-
24,
|
443
|
-
"RegExpMacroAssembler*::CheckStackGuardState()");
|
444
|
-
Add(ExternalReference::re_grow_stack().address(),
|
445
|
-
UNCLASSIFIED,
|
446
|
-
25,
|
447
|
-
"NativeRegExpMacroAssembler::GrowStack()");
|
448
|
-
Add(ExternalReference::re_word_character_map().address(),
|
449
|
-
UNCLASSIFIED,
|
450
|
-
26,
|
451
|
-
"NativeRegExpMacroAssembler::word_character_map");
|
452
|
-
#endif // V8_INTERPRETED_REGEXP
|
453
|
-
// Keyed lookup cache.
|
454
|
-
Add(ExternalReference::keyed_lookup_cache_keys().address(),
|
455
|
-
UNCLASSIFIED,
|
456
|
-
27,
|
457
|
-
"KeyedLookupCache::keys()");
|
458
|
-
Add(ExternalReference::keyed_lookup_cache_field_offsets().address(),
|
459
|
-
UNCLASSIFIED,
|
460
|
-
28,
|
461
|
-
"KeyedLookupCache::field_offsets()");
|
462
|
-
Add(ExternalReference::transcendental_cache_array_address().address(),
|
463
|
-
UNCLASSIFIED,
|
464
|
-
29,
|
465
|
-
"TranscendentalCache::caches()");
|
466
|
-
}
|
467
|
-
|
468
|
-
|
469
|
-
ExternalReferenceEncoder::ExternalReferenceEncoder()
|
470
|
-
: encodings_(Match) {
|
471
|
-
ExternalReferenceTable* external_references =
|
472
|
-
ExternalReferenceTable::instance();
|
473
|
-
for (int i = 0; i < external_references->size(); ++i) {
|
474
|
-
Put(external_references->address(i), i);
|
475
|
-
}
|
476
|
-
}
|
477
|
-
|
478
|
-
|
479
|
-
uint32_t ExternalReferenceEncoder::Encode(Address key) const {
|
480
|
-
int index = IndexOf(key);
|
481
|
-
return index >=0 ? ExternalReferenceTable::instance()->code(index) : 0;
|
482
|
-
}
|
483
|
-
|
484
|
-
|
485
|
-
const char* ExternalReferenceEncoder::NameOfAddress(Address key) const {
|
486
|
-
int index = IndexOf(key);
|
487
|
-
return index >=0 ? ExternalReferenceTable::instance()->name(index) : NULL;
|
488
|
-
}
|
489
|
-
|
490
|
-
|
491
|
-
int ExternalReferenceEncoder::IndexOf(Address key) const {
|
492
|
-
if (key == NULL) return -1;
|
493
|
-
HashMap::Entry* entry =
|
494
|
-
const_cast<HashMap &>(encodings_).Lookup(key, Hash(key), false);
|
495
|
-
return entry == NULL
|
496
|
-
? -1
|
497
|
-
: static_cast<int>(reinterpret_cast<intptr_t>(entry->value));
|
498
|
-
}
|
499
|
-
|
500
|
-
|
501
|
-
void ExternalReferenceEncoder::Put(Address key, int index) {
|
502
|
-
HashMap::Entry* entry = encodings_.Lookup(key, Hash(key), true);
|
503
|
-
entry->value = reinterpret_cast<void*>(index);
|
504
|
-
}
|
505
|
-
|
506
|
-
|
507
|
-
ExternalReferenceDecoder::ExternalReferenceDecoder()
|
508
|
-
: encodings_(NewArray<Address*>(kTypeCodeCount)) {
|
509
|
-
ExternalReferenceTable* external_references =
|
510
|
-
ExternalReferenceTable::instance();
|
511
|
-
for (int type = kFirstTypeCode; type < kTypeCodeCount; ++type) {
|
512
|
-
int max = external_references->max_id(type) + 1;
|
513
|
-
encodings_[type] = NewArray<Address>(max + 1);
|
514
|
-
}
|
515
|
-
for (int i = 0; i < external_references->size(); ++i) {
|
516
|
-
Put(external_references->code(i), external_references->address(i));
|
517
|
-
}
|
518
|
-
}
|
519
|
-
|
520
|
-
|
521
|
-
ExternalReferenceDecoder::~ExternalReferenceDecoder() {
|
522
|
-
for (int type = kFirstTypeCode; type < kTypeCodeCount; ++type) {
|
523
|
-
DeleteArray(encodings_[type]);
|
524
|
-
}
|
525
|
-
DeleteArray(encodings_);
|
526
|
-
}
|
527
|
-
|
528
|
-
|
529
|
-
bool Serializer::serialization_enabled_ = false;
|
530
|
-
bool Serializer::too_late_to_enable_now_ = false;
|
531
|
-
ExternalReferenceDecoder* Deserializer::external_reference_decoder_ = NULL;
|
532
|
-
|
533
|
-
|
534
|
-
Deserializer::Deserializer(SnapshotByteSource* source) : source_(source) {
|
535
|
-
}
|
536
|
-
|
537
|
-
|
538
|
-
// This routine both allocates a new object, and also keeps
|
539
|
-
// track of where objects have been allocated so that we can
|
540
|
-
// fix back references when deserializing.
|
541
|
-
Address Deserializer::Allocate(int space_index, Space* space, int size) {
|
542
|
-
Address address;
|
543
|
-
if (!SpaceIsLarge(space_index)) {
|
544
|
-
ASSERT(!SpaceIsPaged(space_index) ||
|
545
|
-
size <= Page::kPageSize - Page::kObjectStartOffset);
|
546
|
-
Object* new_allocation;
|
547
|
-
if (space_index == NEW_SPACE) {
|
548
|
-
new_allocation = reinterpret_cast<NewSpace*>(space)->AllocateRaw(size);
|
549
|
-
} else {
|
550
|
-
new_allocation = reinterpret_cast<PagedSpace*>(space)->AllocateRaw(size);
|
551
|
-
}
|
552
|
-
HeapObject* new_object = HeapObject::cast(new_allocation);
|
553
|
-
ASSERT(!new_object->IsFailure());
|
554
|
-
address = new_object->address();
|
555
|
-
high_water_[space_index] = address + size;
|
556
|
-
} else {
|
557
|
-
ASSERT(SpaceIsLarge(space_index));
|
558
|
-
ASSERT(size > Page::kPageSize - Page::kObjectStartOffset);
|
559
|
-
LargeObjectSpace* lo_space = reinterpret_cast<LargeObjectSpace*>(space);
|
560
|
-
Object* new_allocation;
|
561
|
-
if (space_index == kLargeData) {
|
562
|
-
new_allocation = lo_space->AllocateRaw(size);
|
563
|
-
} else if (space_index == kLargeFixedArray) {
|
564
|
-
new_allocation = lo_space->AllocateRawFixedArray(size);
|
565
|
-
} else {
|
566
|
-
ASSERT_EQ(kLargeCode, space_index);
|
567
|
-
new_allocation = lo_space->AllocateRawCode(size);
|
568
|
-
}
|
569
|
-
ASSERT(!new_allocation->IsFailure());
|
570
|
-
HeapObject* new_object = HeapObject::cast(new_allocation);
|
571
|
-
// Record all large objects in the same space.
|
572
|
-
address = new_object->address();
|
573
|
-
pages_[LO_SPACE].Add(address);
|
574
|
-
}
|
575
|
-
last_object_address_ = address;
|
576
|
-
return address;
|
577
|
-
}
|
578
|
-
|
579
|
-
|
580
|
-
// This returns the address of an object that has been described in the
|
581
|
-
// snapshot as being offset bytes back in a particular space.
|
582
|
-
HeapObject* Deserializer::GetAddressFromEnd(int space) {
|
583
|
-
int offset = source_->GetInt();
|
584
|
-
ASSERT(!SpaceIsLarge(space));
|
585
|
-
offset <<= kObjectAlignmentBits;
|
586
|
-
return HeapObject::FromAddress(high_water_[space] - offset);
|
587
|
-
}
|
588
|
-
|
589
|
-
|
590
|
-
// This returns the address of an object that has been described in the
|
591
|
-
// snapshot as being offset bytes into a particular space.
|
592
|
-
HeapObject* Deserializer::GetAddressFromStart(int space) {
|
593
|
-
int offset = source_->GetInt();
|
594
|
-
if (SpaceIsLarge(space)) {
|
595
|
-
// Large spaces have one object per 'page'.
|
596
|
-
return HeapObject::FromAddress(pages_[LO_SPACE][offset]);
|
597
|
-
}
|
598
|
-
offset <<= kObjectAlignmentBits;
|
599
|
-
if (space == NEW_SPACE) {
|
600
|
-
// New space has only one space - numbered 0.
|
601
|
-
return HeapObject::FromAddress(pages_[space][0] + offset);
|
602
|
-
}
|
603
|
-
ASSERT(SpaceIsPaged(space));
|
604
|
-
int page_of_pointee = offset >> kPageSizeBits;
|
605
|
-
Address object_address = pages_[space][page_of_pointee] +
|
606
|
-
(offset & Page::kPageAlignmentMask);
|
607
|
-
return HeapObject::FromAddress(object_address);
|
608
|
-
}
|
609
|
-
|
610
|
-
|
611
|
-
void Deserializer::Deserialize() {
|
612
|
-
// Don't GC while deserializing - just expand the heap.
|
613
|
-
AlwaysAllocateScope always_allocate;
|
614
|
-
// Don't use the free lists while deserializing.
|
615
|
-
LinearAllocationScope allocate_linearly;
|
616
|
-
// No active threads.
|
617
|
-
ASSERT_EQ(NULL, ThreadState::FirstInUse());
|
618
|
-
// No active handles.
|
619
|
-
ASSERT(HandleScopeImplementer::instance()->blocks()->is_empty());
|
620
|
-
// Make sure the entire partial snapshot cache is traversed, filling it with
|
621
|
-
// valid object pointers.
|
622
|
-
partial_snapshot_cache_length_ = kPartialSnapshotCacheCapacity;
|
623
|
-
ASSERT_EQ(NULL, external_reference_decoder_);
|
624
|
-
external_reference_decoder_ = new ExternalReferenceDecoder();
|
625
|
-
Heap::IterateStrongRoots(this, VISIT_ONLY_STRONG);
|
626
|
-
Heap::IterateWeakRoots(this, VISIT_ALL);
|
627
|
-
}
|
628
|
-
|
629
|
-
|
630
|
-
void Deserializer::DeserializePartial(Object** root) {
|
631
|
-
// Don't GC while deserializing - just expand the heap.
|
632
|
-
AlwaysAllocateScope always_allocate;
|
633
|
-
// Don't use the free lists while deserializing.
|
634
|
-
LinearAllocationScope allocate_linearly;
|
635
|
-
if (external_reference_decoder_ == NULL) {
|
636
|
-
external_reference_decoder_ = new ExternalReferenceDecoder();
|
637
|
-
}
|
638
|
-
VisitPointer(root);
|
639
|
-
}
|
640
|
-
|
641
|
-
|
642
|
-
Deserializer::~Deserializer() {
|
643
|
-
ASSERT(source_->AtEOF());
|
644
|
-
if (external_reference_decoder_ != NULL) {
|
645
|
-
delete external_reference_decoder_;
|
646
|
-
external_reference_decoder_ = NULL;
|
647
|
-
}
|
648
|
-
}
|
649
|
-
|
650
|
-
|
651
|
-
// This is called on the roots. It is the driver of the deserialization
|
652
|
-
// process. It is also called on the body of each function.
|
653
|
-
void Deserializer::VisitPointers(Object** start, Object** end) {
|
654
|
-
// The space must be new space. Any other space would cause ReadChunk to try
|
655
|
-
// to update the remembered using NULL as the address.
|
656
|
-
ReadChunk(start, end, NEW_SPACE, NULL);
|
657
|
-
}
|
658
|
-
|
659
|
-
|
660
|
-
// This routine writes the new object into the pointer provided and then
|
661
|
-
// returns true if the new object was in young space and false otherwise.
|
662
|
-
// The reason for this strange interface is that otherwise the object is
|
663
|
-
// written very late, which means the ByteArray map is not set up by the
|
664
|
-
// time we need to use it to mark the space at the end of a page free (by
|
665
|
-
// making it into a byte array).
|
666
|
-
void Deserializer::ReadObject(int space_number,
|
667
|
-
Space* space,
|
668
|
-
Object** write_back) {
|
669
|
-
int size = source_->GetInt() << kObjectAlignmentBits;
|
670
|
-
Address address = Allocate(space_number, space, size);
|
671
|
-
*write_back = HeapObject::FromAddress(address);
|
672
|
-
Object** current = reinterpret_cast<Object**>(address);
|
673
|
-
Object** limit = current + (size >> kPointerSizeLog2);
|
674
|
-
if (FLAG_log_snapshot_positions) {
|
675
|
-
LOG(SnapshotPositionEvent(address, source_->position()));
|
676
|
-
}
|
677
|
-
ReadChunk(current, limit, space_number, address);
|
678
|
-
|
679
|
-
if (space == Heap::map_space()) {
|
680
|
-
ASSERT(size == Map::kSize);
|
681
|
-
HeapObject* obj = HeapObject::FromAddress(address);
|
682
|
-
Map* map = reinterpret_cast<Map*>(obj);
|
683
|
-
map->set_scavenger(Heap::GetScavenger(map->instance_type(),
|
684
|
-
map->instance_size()));
|
685
|
-
}
|
686
|
-
}
|
687
|
-
|
688
|
-
|
689
|
-
// This macro is always used with a constant argument so it should all fold
|
690
|
-
// away to almost nothing in the generated code. It might be nicer to do this
|
691
|
-
// with the ternary operator but there are type issues with that.
|
692
|
-
#define ASSIGN_DEST_SPACE(space_number) \
|
693
|
-
Space* dest_space; \
|
694
|
-
if (space_number == NEW_SPACE) { \
|
695
|
-
dest_space = Heap::new_space(); \
|
696
|
-
} else if (space_number == OLD_POINTER_SPACE) { \
|
697
|
-
dest_space = Heap::old_pointer_space(); \
|
698
|
-
} else if (space_number == OLD_DATA_SPACE) { \
|
699
|
-
dest_space = Heap::old_data_space(); \
|
700
|
-
} else if (space_number == CODE_SPACE) { \
|
701
|
-
dest_space = Heap::code_space(); \
|
702
|
-
} else if (space_number == MAP_SPACE) { \
|
703
|
-
dest_space = Heap::map_space(); \
|
704
|
-
} else if (space_number == CELL_SPACE) { \
|
705
|
-
dest_space = Heap::cell_space(); \
|
706
|
-
} else { \
|
707
|
-
ASSERT(space_number >= LO_SPACE); \
|
708
|
-
dest_space = Heap::lo_space(); \
|
709
|
-
}
|
710
|
-
|
711
|
-
|
712
|
-
static const int kUnknownOffsetFromStart = -1;
|
713
|
-
|
714
|
-
|
715
|
-
void Deserializer::ReadChunk(Object** current,
|
716
|
-
Object** limit,
|
717
|
-
int source_space,
|
718
|
-
Address address) {
|
719
|
-
while (current < limit) {
|
720
|
-
int data = source_->Get();
|
721
|
-
switch (data) {
|
722
|
-
#define CASE_STATEMENT(where, how, within, space_number) \
|
723
|
-
case where + how + within + space_number: \
|
724
|
-
ASSERT((where & ~kPointedToMask) == 0); \
|
725
|
-
ASSERT((how & ~kHowToCodeMask) == 0); \
|
726
|
-
ASSERT((within & ~kWhereToPointMask) == 0); \
|
727
|
-
ASSERT((space_number & ~kSpaceMask) == 0);
|
728
|
-
|
729
|
-
#define CASE_BODY(where, how, within, space_number_if_any, offset_from_start) \
|
730
|
-
{ \
|
731
|
-
bool emit_write_barrier = false; \
|
732
|
-
bool current_was_incremented = false; \
|
733
|
-
int space_number = space_number_if_any == kAnyOldSpace ? \
|
734
|
-
(data & kSpaceMask) : space_number_if_any; \
|
735
|
-
if (where == kNewObject && how == kPlain && within == kStartOfObject) {\
|
736
|
-
ASSIGN_DEST_SPACE(space_number) \
|
737
|
-
ReadObject(space_number, dest_space, current); \
|
738
|
-
emit_write_barrier = \
|
739
|
-
(space_number == NEW_SPACE && source_space != NEW_SPACE); \
|
740
|
-
} else { \
|
741
|
-
Object* new_object = NULL; /* May not be a real Object pointer. */ \
|
742
|
-
if (where == kNewObject) { \
|
743
|
-
ASSIGN_DEST_SPACE(space_number) \
|
744
|
-
ReadObject(space_number, dest_space, &new_object); \
|
745
|
-
} else if (where == kRootArray) { \
|
746
|
-
int root_id = source_->GetInt(); \
|
747
|
-
new_object = Heap::roots_address()[root_id]; \
|
748
|
-
} else if (where == kPartialSnapshotCache) { \
|
749
|
-
int cache_index = source_->GetInt(); \
|
750
|
-
new_object = partial_snapshot_cache_[cache_index]; \
|
751
|
-
} else if (where == kExternalReference) { \
|
752
|
-
int reference_id = source_->GetInt(); \
|
753
|
-
Address address = \
|
754
|
-
external_reference_decoder_->Decode(reference_id); \
|
755
|
-
new_object = reinterpret_cast<Object*>(address); \
|
756
|
-
} else if (where == kBackref) { \
|
757
|
-
emit_write_barrier = \
|
758
|
-
(space_number == NEW_SPACE && source_space != NEW_SPACE); \
|
759
|
-
new_object = GetAddressFromEnd(data & kSpaceMask); \
|
760
|
-
} else { \
|
761
|
-
ASSERT(where == kFromStart); \
|
762
|
-
if (offset_from_start == kUnknownOffsetFromStart) { \
|
763
|
-
emit_write_barrier = \
|
764
|
-
(space_number == NEW_SPACE && source_space != NEW_SPACE); \
|
765
|
-
new_object = GetAddressFromStart(data & kSpaceMask); \
|
766
|
-
} else { \
|
767
|
-
Address object_address = pages_[space_number][0] + \
|
768
|
-
(offset_from_start << kObjectAlignmentBits); \
|
769
|
-
new_object = HeapObject::FromAddress(object_address); \
|
770
|
-
} \
|
771
|
-
} \
|
772
|
-
if (within == kFirstInstruction) { \
|
773
|
-
Code* new_code_object = reinterpret_cast<Code*>(new_object); \
|
774
|
-
new_object = reinterpret_cast<Object*>( \
|
775
|
-
new_code_object->instruction_start()); \
|
776
|
-
} \
|
777
|
-
if (how == kFromCode) { \
|
778
|
-
Address location_of_branch_data = \
|
779
|
-
reinterpret_cast<Address>(current); \
|
780
|
-
Assembler::set_target_at(location_of_branch_data, \
|
781
|
-
reinterpret_cast<Address>(new_object)); \
|
782
|
-
if (within == kFirstInstruction) { \
|
783
|
-
location_of_branch_data += Assembler::kCallTargetSize; \
|
784
|
-
current = reinterpret_cast<Object**>(location_of_branch_data); \
|
785
|
-
current_was_incremented = true; \
|
786
|
-
} \
|
787
|
-
} else { \
|
788
|
-
*current = new_object; \
|
789
|
-
} \
|
790
|
-
} \
|
791
|
-
if (emit_write_barrier) { \
|
792
|
-
Heap::RecordWrite(address, static_cast<int>( \
|
793
|
-
reinterpret_cast<Address>(current) - address)); \
|
794
|
-
} \
|
795
|
-
if (!current_was_incremented) { \
|
796
|
-
current++; /* Increment current if it wasn't done above. */ \
|
797
|
-
} \
|
798
|
-
break; \
|
799
|
-
} \
|
800
|
-
|
801
|
-
// This generates a case and a body for each space. The large object spaces are
|
802
|
-
// very rare in snapshots so they are grouped in one body.
|
803
|
-
#define ONE_PER_SPACE(where, how, within) \
|
804
|
-
CASE_STATEMENT(where, how, within, NEW_SPACE) \
|
805
|
-
CASE_BODY(where, how, within, NEW_SPACE, kUnknownOffsetFromStart) \
|
806
|
-
CASE_STATEMENT(where, how, within, OLD_DATA_SPACE) \
|
807
|
-
CASE_BODY(where, how, within, OLD_DATA_SPACE, kUnknownOffsetFromStart) \
|
808
|
-
CASE_STATEMENT(where, how, within, OLD_POINTER_SPACE) \
|
809
|
-
CASE_BODY(where, how, within, OLD_POINTER_SPACE, kUnknownOffsetFromStart) \
|
810
|
-
CASE_STATEMENT(where, how, within, CODE_SPACE) \
|
811
|
-
CASE_BODY(where, how, within, CODE_SPACE, kUnknownOffsetFromStart) \
|
812
|
-
CASE_STATEMENT(where, how, within, CELL_SPACE) \
|
813
|
-
CASE_BODY(where, how, within, CELL_SPACE, kUnknownOffsetFromStart) \
|
814
|
-
CASE_STATEMENT(where, how, within, MAP_SPACE) \
|
815
|
-
CASE_BODY(where, how, within, MAP_SPACE, kUnknownOffsetFromStart) \
|
816
|
-
CASE_STATEMENT(where, how, within, kLargeData) \
|
817
|
-
CASE_STATEMENT(where, how, within, kLargeCode) \
|
818
|
-
CASE_STATEMENT(where, how, within, kLargeFixedArray) \
|
819
|
-
CASE_BODY(where, how, within, kAnyOldSpace, kUnknownOffsetFromStart)
|
820
|
-
|
821
|
-
// This generates a case and a body for the new space (which has to do extra
|
822
|
-
// write barrier handling) and handles the other spaces with 8 fall-through
|
823
|
-
// cases and one body.
|
824
|
-
#define ALL_SPACES(where, how, within) \
|
825
|
-
CASE_STATEMENT(where, how, within, NEW_SPACE) \
|
826
|
-
CASE_BODY(where, how, within, NEW_SPACE, kUnknownOffsetFromStart) \
|
827
|
-
CASE_STATEMENT(where, how, within, OLD_DATA_SPACE) \
|
828
|
-
CASE_STATEMENT(where, how, within, OLD_POINTER_SPACE) \
|
829
|
-
CASE_STATEMENT(where, how, within, CODE_SPACE) \
|
830
|
-
CASE_STATEMENT(where, how, within, CELL_SPACE) \
|
831
|
-
CASE_STATEMENT(where, how, within, MAP_SPACE) \
|
832
|
-
CASE_STATEMENT(where, how, within, kLargeData) \
|
833
|
-
CASE_STATEMENT(where, how, within, kLargeCode) \
|
834
|
-
CASE_STATEMENT(where, how, within, kLargeFixedArray) \
|
835
|
-
CASE_BODY(where, how, within, kAnyOldSpace, kUnknownOffsetFromStart)
|
836
|
-
|
837
|
-
#define EMIT_COMMON_REFERENCE_PATTERNS(pseudo_space_number, \
|
838
|
-
space_number, \
|
839
|
-
offset_from_start) \
|
840
|
-
CASE_STATEMENT(kFromStart, kPlain, kStartOfObject, pseudo_space_number) \
|
841
|
-
CASE_BODY(kFromStart, kPlain, kStartOfObject, space_number, offset_from_start)
|
842
|
-
|
843
|
-
// We generate 15 cases and bodies that process special tags that combine
|
844
|
-
// the raw data tag and the length into one byte.
|
845
|
-
#define RAW_CASE(index, size) \
|
846
|
-
case kRawData + index: { \
|
847
|
-
byte* raw_data_out = reinterpret_cast<byte*>(current); \
|
848
|
-
source_->CopyRaw(raw_data_out, size); \
|
849
|
-
current = reinterpret_cast<Object**>(raw_data_out + size); \
|
850
|
-
break; \
|
851
|
-
}
|
852
|
-
COMMON_RAW_LENGTHS(RAW_CASE)
|
853
|
-
#undef RAW_CASE
|
854
|
-
|
855
|
-
// Deserialize a chunk of raw data that doesn't have one of the popular
|
856
|
-
// lengths.
|
857
|
-
case kRawData: {
|
858
|
-
int size = source_->GetInt();
|
859
|
-
byte* raw_data_out = reinterpret_cast<byte*>(current);
|
860
|
-
source_->CopyRaw(raw_data_out, size);
|
861
|
-
current = reinterpret_cast<Object**>(raw_data_out + size);
|
862
|
-
break;
|
863
|
-
}
|
864
|
-
|
865
|
-
// Deserialize a new object and write a pointer to it to the current
|
866
|
-
// object.
|
867
|
-
ONE_PER_SPACE(kNewObject, kPlain, kStartOfObject)
|
868
|
-
// Deserialize a new code object and write a pointer to its first
|
869
|
-
// instruction to the current code object.
|
870
|
-
ONE_PER_SPACE(kNewObject, kFromCode, kFirstInstruction)
|
871
|
-
// Find a recently deserialized object using its offset from the current
|
872
|
-
// allocation point and write a pointer to it to the current object.
|
873
|
-
ALL_SPACES(kBackref, kPlain, kStartOfObject)
|
874
|
-
// Find a recently deserialized code object using its offset from the
|
875
|
-
// current allocation point and write a pointer to its first instruction
|
876
|
-
// to the current code object.
|
877
|
-
ALL_SPACES(kBackref, kFromCode, kFirstInstruction)
|
878
|
-
// Find an already deserialized object using its offset from the start
|
879
|
-
// and write a pointer to it to the current object.
|
880
|
-
ALL_SPACES(kFromStart, kPlain, kStartOfObject)
|
881
|
-
// Find an already deserialized code object using its offset from the
|
882
|
-
// start and write a pointer to its first instruction to the current code
|
883
|
-
// object.
|
884
|
-
ALL_SPACES(kFromStart, kFromCode, kFirstInstruction)
|
885
|
-
// Find an already deserialized object at one of the predetermined popular
|
886
|
-
// offsets from the start and write a pointer to it in the current object.
|
887
|
-
COMMON_REFERENCE_PATTERNS(EMIT_COMMON_REFERENCE_PATTERNS)
|
888
|
-
// Find an object in the roots array and write a pointer to it to the
|
889
|
-
// current object.
|
890
|
-
CASE_STATEMENT(kRootArray, kPlain, kStartOfObject, 0)
|
891
|
-
CASE_BODY(kRootArray, kPlain, kStartOfObject, 0, kUnknownOffsetFromStart)
|
892
|
-
// Find an object in the partial snapshots cache and write a pointer to it
|
893
|
-
// to the current object.
|
894
|
-
CASE_STATEMENT(kPartialSnapshotCache, kPlain, kStartOfObject, 0)
|
895
|
-
CASE_BODY(kPartialSnapshotCache,
|
896
|
-
kPlain,
|
897
|
-
kStartOfObject,
|
898
|
-
0,
|
899
|
-
kUnknownOffsetFromStart)
|
900
|
-
// Find an external reference and write a pointer to it to the current
|
901
|
-
// object.
|
902
|
-
CASE_STATEMENT(kExternalReference, kPlain, kStartOfObject, 0)
|
903
|
-
CASE_BODY(kExternalReference,
|
904
|
-
kPlain,
|
905
|
-
kStartOfObject,
|
906
|
-
0,
|
907
|
-
kUnknownOffsetFromStart)
|
908
|
-
// Find an external reference and write a pointer to it in the current
|
909
|
-
// code object.
|
910
|
-
CASE_STATEMENT(kExternalReference, kFromCode, kStartOfObject, 0)
|
911
|
-
CASE_BODY(kExternalReference,
|
912
|
-
kFromCode,
|
913
|
-
kStartOfObject,
|
914
|
-
0,
|
915
|
-
kUnknownOffsetFromStart)
|
916
|
-
|
917
|
-
#undef CASE_STATEMENT
|
918
|
-
#undef CASE_BODY
|
919
|
-
#undef ONE_PER_SPACE
|
920
|
-
#undef ALL_SPACES
|
921
|
-
#undef EMIT_COMMON_REFERENCE_PATTERNS
|
922
|
-
#undef ASSIGN_DEST_SPACE
|
923
|
-
|
924
|
-
case kNewPage: {
|
925
|
-
int space = source_->Get();
|
926
|
-
pages_[space].Add(last_object_address_);
|
927
|
-
if (space == CODE_SPACE) {
|
928
|
-
CPU::FlushICache(last_object_address_, Page::kPageSize);
|
929
|
-
}
|
930
|
-
break;
|
931
|
-
}
|
932
|
-
|
933
|
-
case kNativesStringResource: {
|
934
|
-
int index = source_->Get();
|
935
|
-
Vector<const char> source_vector = Natives::GetScriptSource(index);
|
936
|
-
NativesExternalStringResource* resource =
|
937
|
-
new NativesExternalStringResource(source_vector.start());
|
938
|
-
*current++ = reinterpret_cast<Object*>(resource);
|
939
|
-
break;
|
940
|
-
}
|
941
|
-
|
942
|
-
case kSynchronize: {
|
943
|
-
// If we get here then that indicates that you have a mismatch between
|
944
|
-
// the number of GC roots when serializing and deserializing.
|
945
|
-
UNREACHABLE();
|
946
|
-
}
|
947
|
-
|
948
|
-
default:
|
949
|
-
UNREACHABLE();
|
950
|
-
}
|
951
|
-
}
|
952
|
-
ASSERT_EQ(current, limit);
|
953
|
-
}
|
954
|
-
|
955
|
-
|
956
|
-
void SnapshotByteSink::PutInt(uintptr_t integer, const char* description) {
|
957
|
-
const int max_shift = ((kPointerSize * kBitsPerByte) / 7) * 7;
|
958
|
-
for (int shift = max_shift; shift > 0; shift -= 7) {
|
959
|
-
if (integer >= static_cast<uintptr_t>(1u) << shift) {
|
960
|
-
Put((static_cast<int>((integer >> shift)) & 0x7f) | 0x80, "IntPart");
|
961
|
-
}
|
962
|
-
}
|
963
|
-
PutSection(static_cast<int>(integer & 0x7f), "IntLastPart");
|
964
|
-
}
|
965
|
-
|
966
|
-
#ifdef DEBUG
|
967
|
-
|
968
|
-
void Deserializer::Synchronize(const char* tag) {
|
969
|
-
int data = source_->Get();
|
970
|
-
// If this assert fails then that indicates that you have a mismatch between
|
971
|
-
// the number of GC roots when serializing and deserializing.
|
972
|
-
ASSERT_EQ(kSynchronize, data);
|
973
|
-
do {
|
974
|
-
int character = source_->Get();
|
975
|
-
if (character == 0) break;
|
976
|
-
if (FLAG_debug_serialization) {
|
977
|
-
PrintF("%c", character);
|
978
|
-
}
|
979
|
-
} while (true);
|
980
|
-
if (FLAG_debug_serialization) {
|
981
|
-
PrintF("\n");
|
982
|
-
}
|
983
|
-
}
|
984
|
-
|
985
|
-
|
986
|
-
void Serializer::Synchronize(const char* tag) {
|
987
|
-
sink_->Put(kSynchronize, tag);
|
988
|
-
int character;
|
989
|
-
do {
|
990
|
-
character = *tag++;
|
991
|
-
sink_->PutSection(character, "TagCharacter");
|
992
|
-
} while (character != 0);
|
993
|
-
}
|
994
|
-
|
995
|
-
#endif
|
996
|
-
|
997
|
-
Serializer::Serializer(SnapshotByteSink* sink)
|
998
|
-
: sink_(sink),
|
999
|
-
current_root_index_(0),
|
1000
|
-
external_reference_encoder_(new ExternalReferenceEncoder),
|
1001
|
-
large_object_total_(0) {
|
1002
|
-
for (int i = 0; i <= LAST_SPACE; i++) {
|
1003
|
-
fullness_[i] = 0;
|
1004
|
-
}
|
1005
|
-
}
|
1006
|
-
|
1007
|
-
|
1008
|
-
Serializer::~Serializer() {
|
1009
|
-
delete external_reference_encoder_;
|
1010
|
-
}
|
1011
|
-
|
1012
|
-
|
1013
|
-
void StartupSerializer::SerializeStrongReferences() {
|
1014
|
-
// No active threads.
|
1015
|
-
CHECK_EQ(NULL, ThreadState::FirstInUse());
|
1016
|
-
// No active or weak handles.
|
1017
|
-
CHECK(HandleScopeImplementer::instance()->blocks()->is_empty());
|
1018
|
-
CHECK_EQ(0, GlobalHandles::NumberOfWeakHandles());
|
1019
|
-
// We don't support serializing installed extensions.
|
1020
|
-
for (RegisteredExtension* ext = RegisteredExtension::first_extension();
|
1021
|
-
ext != NULL;
|
1022
|
-
ext = ext->next()) {
|
1023
|
-
CHECK_NE(v8::INSTALLED, ext->state());
|
1024
|
-
}
|
1025
|
-
Heap::IterateStrongRoots(this, VISIT_ONLY_STRONG);
|
1026
|
-
}
|
1027
|
-
|
1028
|
-
|
1029
|
-
void PartialSerializer::Serialize(Object** object) {
|
1030
|
-
this->VisitPointer(object);
|
1031
|
-
|
1032
|
-
// After we have done the partial serialization the partial snapshot cache
|
1033
|
-
// will contain some references needed to decode the partial snapshot. We
|
1034
|
-
// fill it up with undefineds so it has a predictable length so the
|
1035
|
-
// deserialization code doesn't need to know the length.
|
1036
|
-
for (int index = partial_snapshot_cache_length_;
|
1037
|
-
index < kPartialSnapshotCacheCapacity;
|
1038
|
-
index++) {
|
1039
|
-
partial_snapshot_cache_[index] = Heap::undefined_value();
|
1040
|
-
startup_serializer_->VisitPointer(&partial_snapshot_cache_[index]);
|
1041
|
-
}
|
1042
|
-
partial_snapshot_cache_length_ = kPartialSnapshotCacheCapacity;
|
1043
|
-
}
|
1044
|
-
|
1045
|
-
|
1046
|
-
void Serializer::VisitPointers(Object** start, Object** end) {
|
1047
|
-
for (Object** current = start; current < end; current++) {
|
1048
|
-
if ((*current)->IsSmi()) {
|
1049
|
-
sink_->Put(kRawData, "RawData");
|
1050
|
-
sink_->PutInt(kPointerSize, "length");
|
1051
|
-
for (int i = 0; i < kPointerSize; i++) {
|
1052
|
-
sink_->Put(reinterpret_cast<byte*>(current)[i], "Byte");
|
1053
|
-
}
|
1054
|
-
} else {
|
1055
|
-
SerializeObject(*current, kPlain, kStartOfObject);
|
1056
|
-
}
|
1057
|
-
}
|
1058
|
-
}
|
1059
|
-
|
1060
|
-
|
1061
|
-
Object* SerializerDeserializer::partial_snapshot_cache_[
|
1062
|
-
kPartialSnapshotCacheCapacity];
|
1063
|
-
int SerializerDeserializer::partial_snapshot_cache_length_ = 0;
|
1064
|
-
|
1065
|
-
|
1066
|
-
// This ensures that the partial snapshot cache keeps things alive during GC and
|
1067
|
-
// tracks their movement. When it is called during serialization of the startup
|
1068
|
-
// snapshot the partial snapshot is empty, so nothing happens. When the partial
|
1069
|
-
// (context) snapshot is created, this array is populated with the pointers that
|
1070
|
-
// the partial snapshot will need. As that happens we emit serialized objects to
|
1071
|
-
// the startup snapshot that correspond to the elements of this cache array. On
|
1072
|
-
// deserialization we therefore need to visit the cache array. This fills it up
|
1073
|
-
// with pointers to deserialized objects.
|
1074
|
-
void SerializerDeserializer::Iterate(ObjectVisitor* visitor) {
|
1075
|
-
visitor->VisitPointers(
|
1076
|
-
&partial_snapshot_cache_[0],
|
1077
|
-
&partial_snapshot_cache_[partial_snapshot_cache_length_]);
|
1078
|
-
}
|
1079
|
-
|
1080
|
-
|
1081
|
-
// When deserializing we need to set the size of the snapshot cache. This means
|
1082
|
-
// the root iteration code (above) will iterate over array elements, writing the
|
1083
|
-
// references to deserialized objects in them.
|
1084
|
-
void SerializerDeserializer::SetSnapshotCacheSize(int size) {
|
1085
|
-
partial_snapshot_cache_length_ = size;
|
1086
|
-
}
|
1087
|
-
|
1088
|
-
|
1089
|
-
int PartialSerializer::PartialSnapshotCacheIndex(HeapObject* heap_object) {
|
1090
|
-
for (int i = 0; i < partial_snapshot_cache_length_; i++) {
|
1091
|
-
Object* entry = partial_snapshot_cache_[i];
|
1092
|
-
if (entry == heap_object) return i;
|
1093
|
-
}
|
1094
|
-
|
1095
|
-
// We didn't find the object in the cache. So we add it to the cache and
|
1096
|
-
// then visit the pointer so that it becomes part of the startup snapshot
|
1097
|
-
// and we can refer to it from the partial snapshot.
|
1098
|
-
int length = partial_snapshot_cache_length_;
|
1099
|
-
CHECK(length < kPartialSnapshotCacheCapacity);
|
1100
|
-
partial_snapshot_cache_[length] = heap_object;
|
1101
|
-
startup_serializer_->VisitPointer(&partial_snapshot_cache_[length]);
|
1102
|
-
// We don't recurse from the startup snapshot generator into the partial
|
1103
|
-
// snapshot generator.
|
1104
|
-
ASSERT(length == partial_snapshot_cache_length_);
|
1105
|
-
return partial_snapshot_cache_length_++;
|
1106
|
-
}
|
1107
|
-
|
1108
|
-
|
1109
|
-
int PartialSerializer::RootIndex(HeapObject* heap_object) {
|
1110
|
-
for (int i = 0; i < Heap::kRootListLength; i++) {
|
1111
|
-
Object* root = Heap::roots_address()[i];
|
1112
|
-
if (root == heap_object) return i;
|
1113
|
-
}
|
1114
|
-
return kInvalidRootIndex;
|
1115
|
-
}
|
1116
|
-
|
1117
|
-
|
1118
|
-
// Encode the location of an already deserialized object in order to write its
|
1119
|
-
// location into a later object. We can encode the location as an offset from
|
1120
|
-
// the start of the deserialized objects or as an offset backwards from the
|
1121
|
-
// current allocation pointer.
|
1122
|
-
void Serializer::SerializeReferenceToPreviousObject(
|
1123
|
-
int space,
|
1124
|
-
int address,
|
1125
|
-
HowToCode how_to_code,
|
1126
|
-
WhereToPoint where_to_point) {
|
1127
|
-
int offset = CurrentAllocationAddress(space) - address;
|
1128
|
-
bool from_start = true;
|
1129
|
-
if (SpaceIsPaged(space)) {
|
1130
|
-
// For paged space it is simple to encode back from current allocation if
|
1131
|
-
// the object is on the same page as the current allocation pointer.
|
1132
|
-
if ((CurrentAllocationAddress(space) >> kPageSizeBits) ==
|
1133
|
-
(address >> kPageSizeBits)) {
|
1134
|
-
from_start = false;
|
1135
|
-
address = offset;
|
1136
|
-
}
|
1137
|
-
} else if (space == NEW_SPACE) {
|
1138
|
-
// For new space it is always simple to encode back from current allocation.
|
1139
|
-
if (offset < address) {
|
1140
|
-
from_start = false;
|
1141
|
-
address = offset;
|
1142
|
-
}
|
1143
|
-
}
|
1144
|
-
// If we are actually dealing with real offsets (and not a numbering of
|
1145
|
-
// all objects) then we should shift out the bits that are always 0.
|
1146
|
-
if (!SpaceIsLarge(space)) address >>= kObjectAlignmentBits;
|
1147
|
-
if (from_start) {
|
1148
|
-
#define COMMON_REFS_CASE(pseudo_space, actual_space, offset) \
|
1149
|
-
if (space == actual_space && address == offset && \
|
1150
|
-
how_to_code == kPlain && where_to_point == kStartOfObject) { \
|
1151
|
-
sink_->Put(kFromStart + how_to_code + where_to_point + \
|
1152
|
-
pseudo_space, "RefSer"); \
|
1153
|
-
} else /* NOLINT */
|
1154
|
-
COMMON_REFERENCE_PATTERNS(COMMON_REFS_CASE)
|
1155
|
-
#undef COMMON_REFS_CASE
|
1156
|
-
{ /* NOLINT */
|
1157
|
-
sink_->Put(kFromStart + how_to_code + where_to_point + space, "RefSer");
|
1158
|
-
sink_->PutInt(address, "address");
|
1159
|
-
}
|
1160
|
-
} else {
|
1161
|
-
sink_->Put(kBackref + how_to_code + where_to_point + space, "BackRefSer");
|
1162
|
-
sink_->PutInt(address, "address");
|
1163
|
-
}
|
1164
|
-
}
|
1165
|
-
|
1166
|
-
|
1167
|
-
void StartupSerializer::SerializeObject(
|
1168
|
-
Object* o,
|
1169
|
-
HowToCode how_to_code,
|
1170
|
-
WhereToPoint where_to_point) {
|
1171
|
-
CHECK(o->IsHeapObject());
|
1172
|
-
HeapObject* heap_object = HeapObject::cast(o);
|
1173
|
-
|
1174
|
-
if (address_mapper_.IsMapped(heap_object)) {
|
1175
|
-
int space = SpaceOfAlreadySerializedObject(heap_object);
|
1176
|
-
int address = address_mapper_.MappedTo(heap_object);
|
1177
|
-
SerializeReferenceToPreviousObject(space,
|
1178
|
-
address,
|
1179
|
-
how_to_code,
|
1180
|
-
where_to_point);
|
1181
|
-
} else {
|
1182
|
-
// Object has not yet been serialized. Serialize it here.
|
1183
|
-
ObjectSerializer object_serializer(this,
|
1184
|
-
heap_object,
|
1185
|
-
sink_,
|
1186
|
-
how_to_code,
|
1187
|
-
where_to_point);
|
1188
|
-
object_serializer.Serialize();
|
1189
|
-
}
|
1190
|
-
}
|
1191
|
-
|
1192
|
-
|
1193
|
-
void StartupSerializer::SerializeWeakReferences() {
|
1194
|
-
for (int i = partial_snapshot_cache_length_;
|
1195
|
-
i < kPartialSnapshotCacheCapacity;
|
1196
|
-
i++) {
|
1197
|
-
sink_->Put(kRootArray + kPlain + kStartOfObject, "RootSerialization");
|
1198
|
-
sink_->PutInt(Heap::kUndefinedValueRootIndex, "root_index");
|
1199
|
-
}
|
1200
|
-
Heap::IterateWeakRoots(this, VISIT_ALL);
|
1201
|
-
}
|
1202
|
-
|
1203
|
-
|
1204
|
-
void PartialSerializer::SerializeObject(
|
1205
|
-
Object* o,
|
1206
|
-
HowToCode how_to_code,
|
1207
|
-
WhereToPoint where_to_point) {
|
1208
|
-
CHECK(o->IsHeapObject());
|
1209
|
-
HeapObject* heap_object = HeapObject::cast(o);
|
1210
|
-
|
1211
|
-
int root_index;
|
1212
|
-
if ((root_index = RootIndex(heap_object)) != kInvalidRootIndex) {
|
1213
|
-
sink_->Put(kRootArray + how_to_code + where_to_point, "RootSerialization");
|
1214
|
-
sink_->PutInt(root_index, "root_index");
|
1215
|
-
return;
|
1216
|
-
}
|
1217
|
-
|
1218
|
-
if (ShouldBeInThePartialSnapshotCache(heap_object)) {
|
1219
|
-
int cache_index = PartialSnapshotCacheIndex(heap_object);
|
1220
|
-
sink_->Put(kPartialSnapshotCache + how_to_code + where_to_point,
|
1221
|
-
"PartialSnapshotCache");
|
1222
|
-
sink_->PutInt(cache_index, "partial_snapshot_cache_index");
|
1223
|
-
return;
|
1224
|
-
}
|
1225
|
-
|
1226
|
-
// Pointers from the partial snapshot to the objects in the startup snapshot
|
1227
|
-
// should go through the root array or through the partial snapshot cache.
|
1228
|
-
// If this is not the case you may have to add something to the root array.
|
1229
|
-
ASSERT(!startup_serializer_->address_mapper()->IsMapped(heap_object));
|
1230
|
-
// All the symbols that the partial snapshot needs should be either in the
|
1231
|
-
// root table or in the partial snapshot cache.
|
1232
|
-
ASSERT(!heap_object->IsSymbol());
|
1233
|
-
|
1234
|
-
if (address_mapper_.IsMapped(heap_object)) {
|
1235
|
-
int space = SpaceOfAlreadySerializedObject(heap_object);
|
1236
|
-
int address = address_mapper_.MappedTo(heap_object);
|
1237
|
-
SerializeReferenceToPreviousObject(space,
|
1238
|
-
address,
|
1239
|
-
how_to_code,
|
1240
|
-
where_to_point);
|
1241
|
-
} else {
|
1242
|
-
// Object has not yet been serialized. Serialize it here.
|
1243
|
-
ObjectSerializer serializer(this,
|
1244
|
-
heap_object,
|
1245
|
-
sink_,
|
1246
|
-
how_to_code,
|
1247
|
-
where_to_point);
|
1248
|
-
serializer.Serialize();
|
1249
|
-
}
|
1250
|
-
}
|
1251
|
-
|
1252
|
-
|
1253
|
-
void Serializer::ObjectSerializer::Serialize() {
|
1254
|
-
int space = Serializer::SpaceOfObject(object_);
|
1255
|
-
int size = object_->Size();
|
1256
|
-
|
1257
|
-
sink_->Put(kNewObject + reference_representation_ + space,
|
1258
|
-
"ObjectSerialization");
|
1259
|
-
sink_->PutInt(size >> kObjectAlignmentBits, "Size in words");
|
1260
|
-
|
1261
|
-
LOG(SnapshotPositionEvent(object_->address(), sink_->Position()));
|
1262
|
-
|
1263
|
-
// Mark this object as already serialized.
|
1264
|
-
bool start_new_page;
|
1265
|
-
int offset = serializer_->Allocate(space, size, &start_new_page);
|
1266
|
-
serializer_->address_mapper()->AddMapping(object_, offset);
|
1267
|
-
if (start_new_page) {
|
1268
|
-
sink_->Put(kNewPage, "NewPage");
|
1269
|
-
sink_->PutSection(space, "NewPageSpace");
|
1270
|
-
}
|
1271
|
-
|
1272
|
-
// Serialize the map (first word of the object).
|
1273
|
-
serializer_->SerializeObject(object_->map(), kPlain, kStartOfObject);
|
1274
|
-
|
1275
|
-
// Serialize the rest of the object.
|
1276
|
-
CHECK_EQ(0, bytes_processed_so_far_);
|
1277
|
-
bytes_processed_so_far_ = kPointerSize;
|
1278
|
-
object_->IterateBody(object_->map()->instance_type(), size, this);
|
1279
|
-
OutputRawData(object_->address() + size);
|
1280
|
-
}
|
1281
|
-
|
1282
|
-
|
1283
|
-
void Serializer::ObjectSerializer::VisitPointers(Object** start,
|
1284
|
-
Object** end) {
|
1285
|
-
Object** current = start;
|
1286
|
-
while (current < end) {
|
1287
|
-
while (current < end && (*current)->IsSmi()) current++;
|
1288
|
-
if (current < end) OutputRawData(reinterpret_cast<Address>(current));
|
1289
|
-
|
1290
|
-
while (current < end && !(*current)->IsSmi()) {
|
1291
|
-
serializer_->SerializeObject(*current, kPlain, kStartOfObject);
|
1292
|
-
bytes_processed_so_far_ += kPointerSize;
|
1293
|
-
current++;
|
1294
|
-
}
|
1295
|
-
}
|
1296
|
-
}
|
1297
|
-
|
1298
|
-
|
1299
|
-
void Serializer::ObjectSerializer::VisitExternalReferences(Address* start,
|
1300
|
-
Address* end) {
|
1301
|
-
Address references_start = reinterpret_cast<Address>(start);
|
1302
|
-
OutputRawData(references_start);
|
1303
|
-
|
1304
|
-
for (Address* current = start; current < end; current++) {
|
1305
|
-
sink_->Put(kExternalReference + kPlain + kStartOfObject, "ExternalRef");
|
1306
|
-
int reference_id = serializer_->EncodeExternalReference(*current);
|
1307
|
-
sink_->PutInt(reference_id, "reference id");
|
1308
|
-
}
|
1309
|
-
bytes_processed_so_far_ += static_cast<int>((end - start) * kPointerSize);
|
1310
|
-
}
|
1311
|
-
|
1312
|
-
|
1313
|
-
void Serializer::ObjectSerializer::VisitRuntimeEntry(RelocInfo* rinfo) {
|
1314
|
-
Address target_start = rinfo->target_address_address();
|
1315
|
-
OutputRawData(target_start);
|
1316
|
-
Address target = rinfo->target_address();
|
1317
|
-
uint32_t encoding = serializer_->EncodeExternalReference(target);
|
1318
|
-
CHECK(target == NULL ? encoding == 0 : encoding != 0);
|
1319
|
-
int representation;
|
1320
|
-
// Can't use a ternary operator because of gcc.
|
1321
|
-
if (rinfo->IsCodedSpecially()) {
|
1322
|
-
representation = kStartOfObject + kFromCode;
|
1323
|
-
} else {
|
1324
|
-
representation = kStartOfObject + kPlain;
|
1325
|
-
}
|
1326
|
-
sink_->Put(kExternalReference + representation, "ExternalReference");
|
1327
|
-
sink_->PutInt(encoding, "reference id");
|
1328
|
-
bytes_processed_so_far_ += rinfo->target_address_size();
|
1329
|
-
}
|
1330
|
-
|
1331
|
-
|
1332
|
-
void Serializer::ObjectSerializer::VisitCodeTarget(RelocInfo* rinfo) {
|
1333
|
-
CHECK(RelocInfo::IsCodeTarget(rinfo->rmode()));
|
1334
|
-
Address target_start = rinfo->target_address_address();
|
1335
|
-
OutputRawData(target_start);
|
1336
|
-
Code* target = Code::GetCodeFromTargetAddress(rinfo->target_address());
|
1337
|
-
serializer_->SerializeObject(target, kFromCode, kFirstInstruction);
|
1338
|
-
bytes_processed_so_far_ += rinfo->target_address_size();
|
1339
|
-
}
|
1340
|
-
|
1341
|
-
|
1342
|
-
void Serializer::ObjectSerializer::VisitExternalAsciiString(
|
1343
|
-
v8::String::ExternalAsciiStringResource** resource_pointer) {
|
1344
|
-
Address references_start = reinterpret_cast<Address>(resource_pointer);
|
1345
|
-
OutputRawData(references_start);
|
1346
|
-
for (int i = 0; i < Natives::GetBuiltinsCount(); i++) {
|
1347
|
-
Object* source = Heap::natives_source_cache()->get(i);
|
1348
|
-
if (!source->IsUndefined()) {
|
1349
|
-
ExternalAsciiString* string = ExternalAsciiString::cast(source);
|
1350
|
-
typedef v8::String::ExternalAsciiStringResource Resource;
|
1351
|
-
Resource* resource = string->resource();
|
1352
|
-
if (resource == *resource_pointer) {
|
1353
|
-
sink_->Put(kNativesStringResource, "NativesStringResource");
|
1354
|
-
sink_->PutSection(i, "NativesStringResourceEnd");
|
1355
|
-
bytes_processed_so_far_ += sizeof(resource);
|
1356
|
-
return;
|
1357
|
-
}
|
1358
|
-
}
|
1359
|
-
}
|
1360
|
-
// One of the strings in the natives cache should match the resource. We
|
1361
|
-
// can't serialize any other kinds of external strings.
|
1362
|
-
UNREACHABLE();
|
1363
|
-
}
|
1364
|
-
|
1365
|
-
|
1366
|
-
void Serializer::ObjectSerializer::OutputRawData(Address up_to) {
|
1367
|
-
Address object_start = object_->address();
|
1368
|
-
int up_to_offset = static_cast<int>(up_to - object_start);
|
1369
|
-
int skipped = up_to_offset - bytes_processed_so_far_;
|
1370
|
-
// This assert will fail if the reloc info gives us the target_address_address
|
1371
|
-
// locations in a non-ascending order. Luckily that doesn't happen.
|
1372
|
-
ASSERT(skipped >= 0);
|
1373
|
-
if (skipped != 0) {
|
1374
|
-
Address base = object_start + bytes_processed_so_far_;
|
1375
|
-
#define RAW_CASE(index, length) \
|
1376
|
-
if (skipped == length) { \
|
1377
|
-
sink_->PutSection(kRawData + index, "RawDataFixed"); \
|
1378
|
-
} else /* NOLINT */
|
1379
|
-
COMMON_RAW_LENGTHS(RAW_CASE)
|
1380
|
-
#undef RAW_CASE
|
1381
|
-
{ /* NOLINT */
|
1382
|
-
sink_->Put(kRawData, "RawData");
|
1383
|
-
sink_->PutInt(skipped, "length");
|
1384
|
-
}
|
1385
|
-
for (int i = 0; i < skipped; i++) {
|
1386
|
-
unsigned int data = base[i];
|
1387
|
-
sink_->PutSection(data, "Byte");
|
1388
|
-
}
|
1389
|
-
bytes_processed_so_far_ += skipped;
|
1390
|
-
}
|
1391
|
-
}
|
1392
|
-
|
1393
|
-
|
1394
|
-
int Serializer::SpaceOfObject(HeapObject* object) {
|
1395
|
-
for (int i = FIRST_SPACE; i <= LAST_SPACE; i++) {
|
1396
|
-
AllocationSpace s = static_cast<AllocationSpace>(i);
|
1397
|
-
if (Heap::InSpace(object, s)) {
|
1398
|
-
if (i == LO_SPACE) {
|
1399
|
-
if (object->IsCode()) {
|
1400
|
-
return kLargeCode;
|
1401
|
-
} else if (object->IsFixedArray()) {
|
1402
|
-
return kLargeFixedArray;
|
1403
|
-
} else {
|
1404
|
-
return kLargeData;
|
1405
|
-
}
|
1406
|
-
}
|
1407
|
-
return i;
|
1408
|
-
}
|
1409
|
-
}
|
1410
|
-
UNREACHABLE();
|
1411
|
-
return 0;
|
1412
|
-
}
|
1413
|
-
|
1414
|
-
|
1415
|
-
int Serializer::SpaceOfAlreadySerializedObject(HeapObject* object) {
|
1416
|
-
for (int i = FIRST_SPACE; i <= LAST_SPACE; i++) {
|
1417
|
-
AllocationSpace s = static_cast<AllocationSpace>(i);
|
1418
|
-
if (Heap::InSpace(object, s)) {
|
1419
|
-
return i;
|
1420
|
-
}
|
1421
|
-
}
|
1422
|
-
UNREACHABLE();
|
1423
|
-
return 0;
|
1424
|
-
}
|
1425
|
-
|
1426
|
-
|
1427
|
-
int Serializer::Allocate(int space, int size, bool* new_page) {
|
1428
|
-
CHECK(space >= 0 && space < kNumberOfSpaces);
|
1429
|
-
if (SpaceIsLarge(space)) {
|
1430
|
-
// In large object space we merely number the objects instead of trying to
|
1431
|
-
// determine some sort of address.
|
1432
|
-
*new_page = true;
|
1433
|
-
large_object_total_ += size;
|
1434
|
-
return fullness_[LO_SPACE]++;
|
1435
|
-
}
|
1436
|
-
*new_page = false;
|
1437
|
-
if (fullness_[space] == 0) {
|
1438
|
-
*new_page = true;
|
1439
|
-
}
|
1440
|
-
if (SpaceIsPaged(space)) {
|
1441
|
-
// Paged spaces are a little special. We encode their addresses as if the
|
1442
|
-
// pages were all contiguous and each page were filled up in the range
|
1443
|
-
// 0 - Page::kObjectAreaSize. In practice the pages may not be contiguous
|
1444
|
-
// and allocation does not start at offset 0 in the page, but this scheme
|
1445
|
-
// means the deserializer can get the page number quickly by shifting the
|
1446
|
-
// serialized address.
|
1447
|
-
CHECK(IsPowerOf2(Page::kPageSize));
|
1448
|
-
int used_in_this_page = (fullness_[space] & (Page::kPageSize - 1));
|
1449
|
-
CHECK(size <= Page::kObjectAreaSize);
|
1450
|
-
if (used_in_this_page + size > Page::kObjectAreaSize) {
|
1451
|
-
*new_page = true;
|
1452
|
-
fullness_[space] = RoundUp(fullness_[space], Page::kPageSize);
|
1453
|
-
}
|
1454
|
-
}
|
1455
|
-
int allocation_address = fullness_[space];
|
1456
|
-
fullness_[space] = allocation_address + size;
|
1457
|
-
return allocation_address;
|
1458
|
-
}
|
1459
|
-
|
1460
|
-
|
1461
|
-
} } // namespace v8::internal
|