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
@@ -0,0 +1,174 @@
|
|
1
|
+
// Copyright 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
|
+
#if defined(V8_TARGET_ARCH_ARM)
|
31
|
+
|
32
|
+
#include "codegen-inl.h"
|
33
|
+
#include "jump-target-inl.h"
|
34
|
+
#include "register-allocator-inl.h"
|
35
|
+
#include "virtual-frame-inl.h"
|
36
|
+
|
37
|
+
namespace v8 {
|
38
|
+
namespace internal {
|
39
|
+
|
40
|
+
// -------------------------------------------------------------------------
|
41
|
+
// JumpTarget implementation.
|
42
|
+
|
43
|
+
#define __ ACCESS_MASM(cgen()->masm())
|
44
|
+
|
45
|
+
void JumpTarget::DoJump() {
|
46
|
+
ASSERT(cgen()->has_valid_frame());
|
47
|
+
// Live non-frame registers are not allowed at unconditional jumps
|
48
|
+
// because we have no way of invalidating the corresponding results
|
49
|
+
// which are still live in the C++ code.
|
50
|
+
ASSERT(cgen()->HasValidEntryRegisters());
|
51
|
+
|
52
|
+
if (entry_frame_set_) {
|
53
|
+
if (entry_label_.is_bound()) {
|
54
|
+
// If we already bound and generated code at the destination then it
|
55
|
+
// is too late to ask for less optimistic type assumptions.
|
56
|
+
ASSERT(entry_frame_.IsCompatibleWith(cgen()->frame()));
|
57
|
+
}
|
58
|
+
// There already a frame expectation at the target.
|
59
|
+
cgen()->frame()->MergeTo(&entry_frame_);
|
60
|
+
cgen()->DeleteFrame();
|
61
|
+
} else {
|
62
|
+
// Clone the current frame to use as the expected one at the target.
|
63
|
+
set_entry_frame(cgen()->frame());
|
64
|
+
// Zap the fall-through frame since the jump was unconditional.
|
65
|
+
RegisterFile empty;
|
66
|
+
cgen()->SetFrame(NULL, &empty);
|
67
|
+
}
|
68
|
+
if (entry_label_.is_bound()) {
|
69
|
+
// You can't jump backwards to an already bound label unless you admitted
|
70
|
+
// up front that this was a bidirectional jump target. Bidirectional jump
|
71
|
+
// targets will zap their type info when bound in case some later virtual
|
72
|
+
// frame with less precise type info branches to them.
|
73
|
+
ASSERT(direction_ != FORWARD_ONLY);
|
74
|
+
}
|
75
|
+
__ jmp(&entry_label_);
|
76
|
+
}
|
77
|
+
|
78
|
+
|
79
|
+
void JumpTarget::DoBranch(Condition cond, Hint ignored) {
|
80
|
+
ASSERT(cgen()->has_valid_frame());
|
81
|
+
|
82
|
+
if (entry_frame_set_) {
|
83
|
+
if (entry_label_.is_bound()) {
|
84
|
+
// If we already bound and generated code at the destination then it
|
85
|
+
// is too late to ask for less optimistic type assumptions.
|
86
|
+
ASSERT(entry_frame_.IsCompatibleWith(cgen()->frame()));
|
87
|
+
}
|
88
|
+
// We have an expected frame to merge to on the backward edge.
|
89
|
+
cgen()->frame()->MergeTo(&entry_frame_, cond);
|
90
|
+
} else {
|
91
|
+
// Clone the current frame to use as the expected one at the target.
|
92
|
+
set_entry_frame(cgen()->frame());
|
93
|
+
}
|
94
|
+
if (entry_label_.is_bound()) {
|
95
|
+
// You can't branch backwards to an already bound label unless you admitted
|
96
|
+
// up front that this was a bidirectional jump target. Bidirectional jump
|
97
|
+
// targets will zap their type info when bound in case some later virtual
|
98
|
+
// frame with less precise type info branches to them.
|
99
|
+
ASSERT(direction_ != FORWARD_ONLY);
|
100
|
+
}
|
101
|
+
__ b(cond, &entry_label_);
|
102
|
+
if (cond == al) {
|
103
|
+
cgen()->DeleteFrame();
|
104
|
+
}
|
105
|
+
}
|
106
|
+
|
107
|
+
|
108
|
+
void JumpTarget::Call() {
|
109
|
+
// Call is used to push the address of the catch block on the stack as
|
110
|
+
// a return address when compiling try/catch and try/finally. We
|
111
|
+
// fully spill the frame before making the call. The expected frame
|
112
|
+
// at the label (which should be the only one) is the spilled current
|
113
|
+
// frame plus an in-memory return address. The "fall-through" frame
|
114
|
+
// at the return site is the spilled current frame.
|
115
|
+
ASSERT(cgen()->has_valid_frame());
|
116
|
+
// There are no non-frame references across the call.
|
117
|
+
ASSERT(cgen()->HasValidEntryRegisters());
|
118
|
+
ASSERT(!is_linked());
|
119
|
+
|
120
|
+
// Calls are always 'forward' so we use a copy of the current frame (plus
|
121
|
+
// one for a return address) as the expected frame.
|
122
|
+
ASSERT(!entry_frame_set_);
|
123
|
+
VirtualFrame target_frame = *cgen()->frame();
|
124
|
+
target_frame.Adjust(1);
|
125
|
+
set_entry_frame(&target_frame);
|
126
|
+
|
127
|
+
__ bl(&entry_label_);
|
128
|
+
}
|
129
|
+
|
130
|
+
|
131
|
+
void JumpTarget::DoBind() {
|
132
|
+
ASSERT(!is_bound());
|
133
|
+
|
134
|
+
// Live non-frame registers are not allowed at the start of a basic
|
135
|
+
// block.
|
136
|
+
ASSERT(!cgen()->has_valid_frame() || cgen()->HasValidEntryRegisters());
|
137
|
+
|
138
|
+
if (cgen()->has_valid_frame()) {
|
139
|
+
if (direction_ != FORWARD_ONLY) cgen()->frame()->ForgetTypeInfo();
|
140
|
+
// If there is a current frame we can use it on the fall through.
|
141
|
+
if (!entry_frame_set_) {
|
142
|
+
entry_frame_ = *cgen()->frame();
|
143
|
+
entry_frame_set_ = true;
|
144
|
+
} else {
|
145
|
+
cgen()->frame()->MergeTo(&entry_frame_);
|
146
|
+
// On fall through we may have to merge both ways.
|
147
|
+
if (direction_ != FORWARD_ONLY) {
|
148
|
+
// This will not need to adjust the virtual frame entries that are
|
149
|
+
// register allocated since that was done above and they now match.
|
150
|
+
// But it does need to adjust the entry_frame_ of this jump target
|
151
|
+
// to make it potentially less optimistic. Later code can branch back
|
152
|
+
// to this jump target and we need to assert that that code does not
|
153
|
+
// have weaker assumptions about types.
|
154
|
+
entry_frame_.MergeTo(cgen()->frame());
|
155
|
+
}
|
156
|
+
}
|
157
|
+
} else {
|
158
|
+
// If there is no current frame we must have an entry frame which we can
|
159
|
+
// copy.
|
160
|
+
ASSERT(entry_frame_set_);
|
161
|
+
RegisterFile empty;
|
162
|
+
cgen()->SetFrame(new VirtualFrame(&entry_frame_), &empty);
|
163
|
+
}
|
164
|
+
|
165
|
+
__ bind(&entry_label_);
|
166
|
+
}
|
167
|
+
|
168
|
+
|
169
|
+
#undef __
|
170
|
+
|
171
|
+
|
172
|
+
} } // namespace v8::internal
|
173
|
+
|
174
|
+
#endif // V8_TARGET_ARCH_ARM
|
@@ -0,0 +1,2041 @@
|
|
1
|
+
// Copyright 2011 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 "lithium-allocator-inl.h"
|
29
|
+
#include "arm/lithium-arm.h"
|
30
|
+
#include "arm/lithium-codegen-arm.h"
|
31
|
+
|
32
|
+
namespace v8 {
|
33
|
+
namespace internal {
|
34
|
+
|
35
|
+
#define DEFINE_COMPILE(type) \
|
36
|
+
void L##type::CompileToNative(LCodeGen* generator) { \
|
37
|
+
generator->Do##type(this); \
|
38
|
+
}
|
39
|
+
LITHIUM_CONCRETE_INSTRUCTION_LIST(DEFINE_COMPILE)
|
40
|
+
#undef DEFINE_COMPILE
|
41
|
+
|
42
|
+
LOsrEntry::LOsrEntry() {
|
43
|
+
for (int i = 0; i < Register::kNumAllocatableRegisters; ++i) {
|
44
|
+
register_spills_[i] = NULL;
|
45
|
+
}
|
46
|
+
for (int i = 0; i < DoubleRegister::kNumAllocatableRegisters; ++i) {
|
47
|
+
double_register_spills_[i] = NULL;
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
51
|
+
|
52
|
+
void LOsrEntry::MarkSpilledRegister(int allocation_index,
|
53
|
+
LOperand* spill_operand) {
|
54
|
+
ASSERT(spill_operand->IsStackSlot());
|
55
|
+
ASSERT(register_spills_[allocation_index] == NULL);
|
56
|
+
register_spills_[allocation_index] = spill_operand;
|
57
|
+
}
|
58
|
+
|
59
|
+
|
60
|
+
#ifdef DEBUG
|
61
|
+
void LInstruction::VerifyCall() {
|
62
|
+
// Call instructions can use only fixed registers as
|
63
|
+
// temporaries and outputs because all registers
|
64
|
+
// are blocked by the calling convention.
|
65
|
+
// Inputs must use a fixed register.
|
66
|
+
ASSERT(Output() == NULL ||
|
67
|
+
LUnallocated::cast(Output())->HasFixedPolicy() ||
|
68
|
+
!LUnallocated::cast(Output())->HasRegisterPolicy());
|
69
|
+
for (UseIterator it(this); it.HasNext(); it.Advance()) {
|
70
|
+
LOperand* operand = it.Next();
|
71
|
+
ASSERT(LUnallocated::cast(operand)->HasFixedPolicy() ||
|
72
|
+
!LUnallocated::cast(operand)->HasRegisterPolicy());
|
73
|
+
}
|
74
|
+
for (TempIterator it(this); it.HasNext(); it.Advance()) {
|
75
|
+
LOperand* operand = it.Next();
|
76
|
+
ASSERT(LUnallocated::cast(operand)->HasFixedPolicy() ||
|
77
|
+
!LUnallocated::cast(operand)->HasRegisterPolicy());
|
78
|
+
}
|
79
|
+
}
|
80
|
+
#endif
|
81
|
+
|
82
|
+
|
83
|
+
void LOsrEntry::MarkSpilledDoubleRegister(int allocation_index,
|
84
|
+
LOperand* spill_operand) {
|
85
|
+
ASSERT(spill_operand->IsDoubleStackSlot());
|
86
|
+
ASSERT(double_register_spills_[allocation_index] == NULL);
|
87
|
+
double_register_spills_[allocation_index] = spill_operand;
|
88
|
+
}
|
89
|
+
|
90
|
+
|
91
|
+
void LInstruction::PrintTo(StringStream* stream) {
|
92
|
+
stream->Add("%s ", this->Mnemonic());
|
93
|
+
|
94
|
+
PrintOutputOperandTo(stream);
|
95
|
+
|
96
|
+
PrintDataTo(stream);
|
97
|
+
|
98
|
+
if (HasEnvironment()) {
|
99
|
+
stream->Add(" ");
|
100
|
+
environment()->PrintTo(stream);
|
101
|
+
}
|
102
|
+
|
103
|
+
if (HasPointerMap()) {
|
104
|
+
stream->Add(" ");
|
105
|
+
pointer_map()->PrintTo(stream);
|
106
|
+
}
|
107
|
+
}
|
108
|
+
|
109
|
+
|
110
|
+
template<int R, int I, int T>
|
111
|
+
void LTemplateInstruction<R, I, T>::PrintDataTo(StringStream* stream) {
|
112
|
+
stream->Add("= ");
|
113
|
+
inputs_.PrintOperandsTo(stream);
|
114
|
+
}
|
115
|
+
|
116
|
+
|
117
|
+
template<int R, int I, int T>
|
118
|
+
void LTemplateInstruction<R, I, T>::PrintOutputOperandTo(StringStream* stream) {
|
119
|
+
results_.PrintOperandsTo(stream);
|
120
|
+
}
|
121
|
+
|
122
|
+
|
123
|
+
template<typename T, int N>
|
124
|
+
void OperandContainer<T, N>::PrintOperandsTo(StringStream* stream) {
|
125
|
+
for (int i = 0; i < N; i++) {
|
126
|
+
if (i > 0) stream->Add(" ");
|
127
|
+
elems_[i]->PrintTo(stream);
|
128
|
+
}
|
129
|
+
}
|
130
|
+
|
131
|
+
|
132
|
+
void LLabel::PrintDataTo(StringStream* stream) {
|
133
|
+
LGap::PrintDataTo(stream);
|
134
|
+
LLabel* rep = replacement();
|
135
|
+
if (rep != NULL) {
|
136
|
+
stream->Add(" Dead block replaced with B%d", rep->block_id());
|
137
|
+
}
|
138
|
+
}
|
139
|
+
|
140
|
+
|
141
|
+
bool LGap::IsRedundant() const {
|
142
|
+
for (int i = 0; i < 4; i++) {
|
143
|
+
if (parallel_moves_[i] != NULL && !parallel_moves_[i]->IsRedundant()) {
|
144
|
+
return false;
|
145
|
+
}
|
146
|
+
}
|
147
|
+
|
148
|
+
return true;
|
149
|
+
}
|
150
|
+
|
151
|
+
|
152
|
+
void LGap::PrintDataTo(StringStream* stream) const {
|
153
|
+
for (int i = 0; i < 4; i++) {
|
154
|
+
stream->Add("(");
|
155
|
+
if (parallel_moves_[i] != NULL) {
|
156
|
+
parallel_moves_[i]->PrintDataTo(stream);
|
157
|
+
}
|
158
|
+
stream->Add(") ");
|
159
|
+
}
|
160
|
+
}
|
161
|
+
|
162
|
+
|
163
|
+
const char* LArithmeticD::Mnemonic() const {
|
164
|
+
switch (op()) {
|
165
|
+
case Token::ADD: return "add-d";
|
166
|
+
case Token::SUB: return "sub-d";
|
167
|
+
case Token::MUL: return "mul-d";
|
168
|
+
case Token::DIV: return "div-d";
|
169
|
+
case Token::MOD: return "mod-d";
|
170
|
+
default:
|
171
|
+
UNREACHABLE();
|
172
|
+
return NULL;
|
173
|
+
}
|
174
|
+
}
|
175
|
+
|
176
|
+
|
177
|
+
const char* LArithmeticT::Mnemonic() const {
|
178
|
+
switch (op()) {
|
179
|
+
case Token::ADD: return "add-t";
|
180
|
+
case Token::SUB: return "sub-t";
|
181
|
+
case Token::MUL: return "mul-t";
|
182
|
+
case Token::MOD: return "mod-t";
|
183
|
+
case Token::DIV: return "div-t";
|
184
|
+
case Token::BIT_AND: return "bit-and-t";
|
185
|
+
case Token::BIT_OR: return "bit-or-t";
|
186
|
+
case Token::BIT_XOR: return "bit-xor-t";
|
187
|
+
case Token::SHL: return "shl-t";
|
188
|
+
case Token::SAR: return "sar-t";
|
189
|
+
case Token::SHR: return "shr-t";
|
190
|
+
default:
|
191
|
+
UNREACHABLE();
|
192
|
+
return NULL;
|
193
|
+
}
|
194
|
+
}
|
195
|
+
|
196
|
+
|
197
|
+
void LGoto::PrintDataTo(StringStream* stream) {
|
198
|
+
stream->Add("B%d", block_id());
|
199
|
+
}
|
200
|
+
|
201
|
+
|
202
|
+
void LBranch::PrintDataTo(StringStream* stream) {
|
203
|
+
stream->Add("B%d | B%d on ", true_block_id(), false_block_id());
|
204
|
+
InputAt(0)->PrintTo(stream);
|
205
|
+
}
|
206
|
+
|
207
|
+
|
208
|
+
void LCmpIDAndBranch::PrintDataTo(StringStream* stream) {
|
209
|
+
stream->Add("if ");
|
210
|
+
InputAt(0)->PrintTo(stream);
|
211
|
+
stream->Add(" %s ", Token::String(op()));
|
212
|
+
InputAt(1)->PrintTo(stream);
|
213
|
+
stream->Add(" then B%d else B%d", true_block_id(), false_block_id());
|
214
|
+
}
|
215
|
+
|
216
|
+
|
217
|
+
void LIsNullAndBranch::PrintDataTo(StringStream* stream) {
|
218
|
+
stream->Add("if ");
|
219
|
+
InputAt(0)->PrintTo(stream);
|
220
|
+
stream->Add(is_strict() ? " === null" : " == null");
|
221
|
+
stream->Add(" then B%d else B%d", true_block_id(), false_block_id());
|
222
|
+
}
|
223
|
+
|
224
|
+
|
225
|
+
void LIsObjectAndBranch::PrintDataTo(StringStream* stream) {
|
226
|
+
stream->Add("if is_object(");
|
227
|
+
InputAt(0)->PrintTo(stream);
|
228
|
+
stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
|
229
|
+
}
|
230
|
+
|
231
|
+
|
232
|
+
void LIsSmiAndBranch::PrintDataTo(StringStream* stream) {
|
233
|
+
stream->Add("if is_smi(");
|
234
|
+
InputAt(0)->PrintTo(stream);
|
235
|
+
stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
|
236
|
+
}
|
237
|
+
|
238
|
+
|
239
|
+
void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) {
|
240
|
+
stream->Add("if has_instance_type(");
|
241
|
+
InputAt(0)->PrintTo(stream);
|
242
|
+
stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
|
243
|
+
}
|
244
|
+
|
245
|
+
|
246
|
+
void LHasCachedArrayIndexAndBranch::PrintDataTo(StringStream* stream) {
|
247
|
+
stream->Add("if has_cached_array_index(");
|
248
|
+
InputAt(0)->PrintTo(stream);
|
249
|
+
stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
|
250
|
+
}
|
251
|
+
|
252
|
+
|
253
|
+
void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) {
|
254
|
+
stream->Add("if class_of_test(");
|
255
|
+
InputAt(0)->PrintTo(stream);
|
256
|
+
stream->Add(", \"%o\") then B%d else B%d",
|
257
|
+
*hydrogen()->class_name(),
|
258
|
+
true_block_id(),
|
259
|
+
false_block_id());
|
260
|
+
}
|
261
|
+
|
262
|
+
|
263
|
+
void LTypeofIs::PrintDataTo(StringStream* stream) {
|
264
|
+
InputAt(0)->PrintTo(stream);
|
265
|
+
stream->Add(" == \"%s\"", *hydrogen()->type_literal()->ToCString());
|
266
|
+
}
|
267
|
+
|
268
|
+
|
269
|
+
void LTypeofIsAndBranch::PrintDataTo(StringStream* stream) {
|
270
|
+
stream->Add("if typeof ");
|
271
|
+
InputAt(0)->PrintTo(stream);
|
272
|
+
stream->Add(" == \"%s\" then B%d else B%d",
|
273
|
+
*hydrogen()->type_literal()->ToCString(),
|
274
|
+
true_block_id(), false_block_id());
|
275
|
+
}
|
276
|
+
|
277
|
+
|
278
|
+
void LCallConstantFunction::PrintDataTo(StringStream* stream) {
|
279
|
+
stream->Add("#%d / ", arity());
|
280
|
+
}
|
281
|
+
|
282
|
+
|
283
|
+
void LUnaryMathOperation::PrintDataTo(StringStream* stream) {
|
284
|
+
stream->Add("/%s ", hydrogen()->OpName());
|
285
|
+
InputAt(0)->PrintTo(stream);
|
286
|
+
}
|
287
|
+
|
288
|
+
|
289
|
+
void LLoadContextSlot::PrintDataTo(StringStream* stream) {
|
290
|
+
InputAt(0)->PrintTo(stream);
|
291
|
+
stream->Add("[%d]", slot_index());
|
292
|
+
}
|
293
|
+
|
294
|
+
|
295
|
+
void LStoreContextSlot::PrintDataTo(StringStream* stream) {
|
296
|
+
InputAt(0)->PrintTo(stream);
|
297
|
+
stream->Add("[%d] <- ", slot_index());
|
298
|
+
InputAt(1)->PrintTo(stream);
|
299
|
+
}
|
300
|
+
|
301
|
+
|
302
|
+
void LCallKeyed::PrintDataTo(StringStream* stream) {
|
303
|
+
stream->Add("[r2] #%d / ", arity());
|
304
|
+
}
|
305
|
+
|
306
|
+
|
307
|
+
void LCallNamed::PrintDataTo(StringStream* stream) {
|
308
|
+
SmartPointer<char> name_string = name()->ToCString();
|
309
|
+
stream->Add("%s #%d / ", *name_string, arity());
|
310
|
+
}
|
311
|
+
|
312
|
+
|
313
|
+
void LCallGlobal::PrintDataTo(StringStream* stream) {
|
314
|
+
SmartPointer<char> name_string = name()->ToCString();
|
315
|
+
stream->Add("%s #%d / ", *name_string, arity());
|
316
|
+
}
|
317
|
+
|
318
|
+
|
319
|
+
void LCallKnownGlobal::PrintDataTo(StringStream* stream) {
|
320
|
+
stream->Add("#%d / ", arity());
|
321
|
+
}
|
322
|
+
|
323
|
+
|
324
|
+
void LCallNew::PrintDataTo(StringStream* stream) {
|
325
|
+
stream->Add("= ");
|
326
|
+
InputAt(0)->PrintTo(stream);
|
327
|
+
stream->Add(" #%d / ", arity());
|
328
|
+
}
|
329
|
+
|
330
|
+
|
331
|
+
void LClassOfTest::PrintDataTo(StringStream* stream) {
|
332
|
+
stream->Add("= class_of_test(");
|
333
|
+
InputAt(0)->PrintTo(stream);
|
334
|
+
stream->Add(", \"%o\")", *hydrogen()->class_name());
|
335
|
+
}
|
336
|
+
|
337
|
+
|
338
|
+
void LAccessArgumentsAt::PrintDataTo(StringStream* stream) {
|
339
|
+
arguments()->PrintTo(stream);
|
340
|
+
|
341
|
+
stream->Add(" length ");
|
342
|
+
length()->PrintTo(stream);
|
343
|
+
|
344
|
+
stream->Add(" index ");
|
345
|
+
index()->PrintTo(stream);
|
346
|
+
}
|
347
|
+
|
348
|
+
|
349
|
+
void LStoreNamedField::PrintDataTo(StringStream* stream) {
|
350
|
+
object()->PrintTo(stream);
|
351
|
+
stream->Add(".");
|
352
|
+
stream->Add(*String::cast(*name())->ToCString());
|
353
|
+
stream->Add(" <- ");
|
354
|
+
value()->PrintTo(stream);
|
355
|
+
}
|
356
|
+
|
357
|
+
|
358
|
+
void LStoreNamedGeneric::PrintDataTo(StringStream* stream) {
|
359
|
+
object()->PrintTo(stream);
|
360
|
+
stream->Add(".");
|
361
|
+
stream->Add(*String::cast(*name())->ToCString());
|
362
|
+
stream->Add(" <- ");
|
363
|
+
value()->PrintTo(stream);
|
364
|
+
}
|
365
|
+
|
366
|
+
|
367
|
+
void LStoreKeyedFastElement::PrintDataTo(StringStream* stream) {
|
368
|
+
object()->PrintTo(stream);
|
369
|
+
stream->Add("[");
|
370
|
+
key()->PrintTo(stream);
|
371
|
+
stream->Add("] <- ");
|
372
|
+
value()->PrintTo(stream);
|
373
|
+
}
|
374
|
+
|
375
|
+
|
376
|
+
void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) {
|
377
|
+
object()->PrintTo(stream);
|
378
|
+
stream->Add("[");
|
379
|
+
key()->PrintTo(stream);
|
380
|
+
stream->Add("] <- ");
|
381
|
+
value()->PrintTo(stream);
|
382
|
+
}
|
383
|
+
|
384
|
+
|
385
|
+
LChunk::LChunk(HGraph* graph)
|
386
|
+
: spill_slot_count_(0),
|
387
|
+
graph_(graph),
|
388
|
+
instructions_(32),
|
389
|
+
pointer_maps_(8),
|
390
|
+
inlined_closures_(1) {
|
391
|
+
}
|
392
|
+
|
393
|
+
|
394
|
+
int LChunk::GetNextSpillIndex(bool is_double) {
|
395
|
+
// Skip a slot if for a double-width slot.
|
396
|
+
if (is_double) spill_slot_count_++;
|
397
|
+
return spill_slot_count_++;
|
398
|
+
}
|
399
|
+
|
400
|
+
|
401
|
+
LOperand* LChunk::GetNextSpillSlot(bool is_double) {
|
402
|
+
int index = GetNextSpillIndex(is_double);
|
403
|
+
if (is_double) {
|
404
|
+
return LDoubleStackSlot::Create(index);
|
405
|
+
} else {
|
406
|
+
return LStackSlot::Create(index);
|
407
|
+
}
|
408
|
+
}
|
409
|
+
|
410
|
+
|
411
|
+
void LChunk::MarkEmptyBlocks() {
|
412
|
+
HPhase phase("Mark empty blocks", this);
|
413
|
+
for (int i = 0; i < graph()->blocks()->length(); ++i) {
|
414
|
+
HBasicBlock* block = graph()->blocks()->at(i);
|
415
|
+
int first = block->first_instruction_index();
|
416
|
+
int last = block->last_instruction_index();
|
417
|
+
LInstruction* first_instr = instructions()->at(first);
|
418
|
+
LInstruction* last_instr = instructions()->at(last);
|
419
|
+
|
420
|
+
LLabel* label = LLabel::cast(first_instr);
|
421
|
+
if (last_instr->IsGoto()) {
|
422
|
+
LGoto* goto_instr = LGoto::cast(last_instr);
|
423
|
+
if (!goto_instr->include_stack_check() &&
|
424
|
+
label->IsRedundant() &&
|
425
|
+
!label->is_loop_header()) {
|
426
|
+
bool can_eliminate = true;
|
427
|
+
for (int i = first + 1; i < last && can_eliminate; ++i) {
|
428
|
+
LInstruction* cur = instructions()->at(i);
|
429
|
+
if (cur->IsGap()) {
|
430
|
+
LGap* gap = LGap::cast(cur);
|
431
|
+
if (!gap->IsRedundant()) {
|
432
|
+
can_eliminate = false;
|
433
|
+
}
|
434
|
+
} else {
|
435
|
+
can_eliminate = false;
|
436
|
+
}
|
437
|
+
}
|
438
|
+
|
439
|
+
if (can_eliminate) {
|
440
|
+
label->set_replacement(GetLabel(goto_instr->block_id()));
|
441
|
+
}
|
442
|
+
}
|
443
|
+
}
|
444
|
+
}
|
445
|
+
}
|
446
|
+
|
447
|
+
|
448
|
+
void LChunk::AddInstruction(LInstruction* instr, HBasicBlock* block) {
|
449
|
+
LGap* gap = new LGap(block);
|
450
|
+
int index = -1;
|
451
|
+
if (instr->IsControl()) {
|
452
|
+
instructions_.Add(gap);
|
453
|
+
index = instructions_.length();
|
454
|
+
instructions_.Add(instr);
|
455
|
+
} else {
|
456
|
+
index = instructions_.length();
|
457
|
+
instructions_.Add(instr);
|
458
|
+
instructions_.Add(gap);
|
459
|
+
}
|
460
|
+
if (instr->HasPointerMap()) {
|
461
|
+
pointer_maps_.Add(instr->pointer_map());
|
462
|
+
instr->pointer_map()->set_lithium_position(index);
|
463
|
+
}
|
464
|
+
}
|
465
|
+
|
466
|
+
|
467
|
+
LConstantOperand* LChunk::DefineConstantOperand(HConstant* constant) {
|
468
|
+
return LConstantOperand::Create(constant->id());
|
469
|
+
}
|
470
|
+
|
471
|
+
|
472
|
+
int LChunk::GetParameterStackSlot(int index) const {
|
473
|
+
// The receiver is at index 0, the first parameter at index 1, so we
|
474
|
+
// shift all parameter indexes down by the number of parameters, and
|
475
|
+
// make sure they end up negative so they are distinguishable from
|
476
|
+
// spill slots.
|
477
|
+
int result = index - graph()->info()->scope()->num_parameters() - 1;
|
478
|
+
ASSERT(result < 0);
|
479
|
+
return result;
|
480
|
+
}
|
481
|
+
|
482
|
+
// A parameter relative to ebp in the arguments stub.
|
483
|
+
int LChunk::ParameterAt(int index) {
|
484
|
+
ASSERT(-1 <= index); // -1 is the receiver.
|
485
|
+
return (1 + graph()->info()->scope()->num_parameters() - index) *
|
486
|
+
kPointerSize;
|
487
|
+
}
|
488
|
+
|
489
|
+
|
490
|
+
LGap* LChunk::GetGapAt(int index) const {
|
491
|
+
return LGap::cast(instructions_[index]);
|
492
|
+
}
|
493
|
+
|
494
|
+
|
495
|
+
bool LChunk::IsGapAt(int index) const {
|
496
|
+
return instructions_[index]->IsGap();
|
497
|
+
}
|
498
|
+
|
499
|
+
|
500
|
+
int LChunk::NearestGapPos(int index) const {
|
501
|
+
while (!IsGapAt(index)) index--;
|
502
|
+
return index;
|
503
|
+
}
|
504
|
+
|
505
|
+
|
506
|
+
void LChunk::AddGapMove(int index, LOperand* from, LOperand* to) {
|
507
|
+
GetGapAt(index)->GetOrCreateParallelMove(LGap::START)->AddMove(from, to);
|
508
|
+
}
|
509
|
+
|
510
|
+
|
511
|
+
Handle<Object> LChunk::LookupLiteral(LConstantOperand* operand) const {
|
512
|
+
return HConstant::cast(graph_->LookupValue(operand->index()))->handle();
|
513
|
+
}
|
514
|
+
|
515
|
+
|
516
|
+
Representation LChunk::LookupLiteralRepresentation(
|
517
|
+
LConstantOperand* operand) const {
|
518
|
+
return graph_->LookupValue(operand->index())->representation();
|
519
|
+
}
|
520
|
+
|
521
|
+
|
522
|
+
LChunk* LChunkBuilder::Build() {
|
523
|
+
ASSERT(is_unused());
|
524
|
+
chunk_ = new LChunk(graph());
|
525
|
+
HPhase phase("Building chunk", chunk_);
|
526
|
+
status_ = BUILDING;
|
527
|
+
const ZoneList<HBasicBlock*>* blocks = graph()->blocks();
|
528
|
+
for (int i = 0; i < blocks->length(); i++) {
|
529
|
+
HBasicBlock* next = NULL;
|
530
|
+
if (i < blocks->length() - 1) next = blocks->at(i + 1);
|
531
|
+
DoBasicBlock(blocks->at(i), next);
|
532
|
+
if (is_aborted()) return NULL;
|
533
|
+
}
|
534
|
+
status_ = DONE;
|
535
|
+
return chunk_;
|
536
|
+
}
|
537
|
+
|
538
|
+
|
539
|
+
void LChunkBuilder::Abort(const char* format, ...) {
|
540
|
+
if (FLAG_trace_bailout) {
|
541
|
+
SmartPointer<char> debug_name = graph()->debug_name()->ToCString();
|
542
|
+
PrintF("Aborting LChunk building in @\"%s\": ", *debug_name);
|
543
|
+
va_list arguments;
|
544
|
+
va_start(arguments, format);
|
545
|
+
OS::VPrint(format, arguments);
|
546
|
+
va_end(arguments);
|
547
|
+
PrintF("\n");
|
548
|
+
}
|
549
|
+
status_ = ABORTED;
|
550
|
+
}
|
551
|
+
|
552
|
+
|
553
|
+
LRegister* LChunkBuilder::ToOperand(Register reg) {
|
554
|
+
return LRegister::Create(Register::ToAllocationIndex(reg));
|
555
|
+
}
|
556
|
+
|
557
|
+
|
558
|
+
LUnallocated* LChunkBuilder::ToUnallocated(Register reg) {
|
559
|
+
return new LUnallocated(LUnallocated::FIXED_REGISTER,
|
560
|
+
Register::ToAllocationIndex(reg));
|
561
|
+
}
|
562
|
+
|
563
|
+
|
564
|
+
LUnallocated* LChunkBuilder::ToUnallocated(DoubleRegister reg) {
|
565
|
+
return new LUnallocated(LUnallocated::FIXED_DOUBLE_REGISTER,
|
566
|
+
DoubleRegister::ToAllocationIndex(reg));
|
567
|
+
}
|
568
|
+
|
569
|
+
|
570
|
+
LOperand* LChunkBuilder::UseFixed(HValue* value, Register fixed_register) {
|
571
|
+
return Use(value, ToUnallocated(fixed_register));
|
572
|
+
}
|
573
|
+
|
574
|
+
|
575
|
+
LOperand* LChunkBuilder::UseFixedDouble(HValue* value, DoubleRegister reg) {
|
576
|
+
return Use(value, ToUnallocated(reg));
|
577
|
+
}
|
578
|
+
|
579
|
+
|
580
|
+
LOperand* LChunkBuilder::UseRegister(HValue* value) {
|
581
|
+
return Use(value, new LUnallocated(LUnallocated::MUST_HAVE_REGISTER));
|
582
|
+
}
|
583
|
+
|
584
|
+
|
585
|
+
LOperand* LChunkBuilder::UseRegisterAtStart(HValue* value) {
|
586
|
+
return Use(value,
|
587
|
+
new LUnallocated(LUnallocated::MUST_HAVE_REGISTER,
|
588
|
+
LUnallocated::USED_AT_START));
|
589
|
+
}
|
590
|
+
|
591
|
+
|
592
|
+
LOperand* LChunkBuilder::UseTempRegister(HValue* value) {
|
593
|
+
return Use(value, new LUnallocated(LUnallocated::WRITABLE_REGISTER));
|
594
|
+
}
|
595
|
+
|
596
|
+
|
597
|
+
LOperand* LChunkBuilder::Use(HValue* value) {
|
598
|
+
return Use(value, new LUnallocated(LUnallocated::NONE));
|
599
|
+
}
|
600
|
+
|
601
|
+
|
602
|
+
LOperand* LChunkBuilder::UseAtStart(HValue* value) {
|
603
|
+
return Use(value, new LUnallocated(LUnallocated::NONE,
|
604
|
+
LUnallocated::USED_AT_START));
|
605
|
+
}
|
606
|
+
|
607
|
+
|
608
|
+
LOperand* LChunkBuilder::UseOrConstant(HValue* value) {
|
609
|
+
return value->IsConstant()
|
610
|
+
? chunk_->DefineConstantOperand(HConstant::cast(value))
|
611
|
+
: Use(value);
|
612
|
+
}
|
613
|
+
|
614
|
+
|
615
|
+
LOperand* LChunkBuilder::UseOrConstantAtStart(HValue* value) {
|
616
|
+
return value->IsConstant()
|
617
|
+
? chunk_->DefineConstantOperand(HConstant::cast(value))
|
618
|
+
: UseAtStart(value);
|
619
|
+
}
|
620
|
+
|
621
|
+
|
622
|
+
LOperand* LChunkBuilder::UseRegisterOrConstant(HValue* value) {
|
623
|
+
return value->IsConstant()
|
624
|
+
? chunk_->DefineConstantOperand(HConstant::cast(value))
|
625
|
+
: UseRegister(value);
|
626
|
+
}
|
627
|
+
|
628
|
+
|
629
|
+
LOperand* LChunkBuilder::UseRegisterOrConstantAtStart(HValue* value) {
|
630
|
+
return value->IsConstant()
|
631
|
+
? chunk_->DefineConstantOperand(HConstant::cast(value))
|
632
|
+
: UseRegisterAtStart(value);
|
633
|
+
}
|
634
|
+
|
635
|
+
|
636
|
+
LOperand* LChunkBuilder::UseAny(HValue* value) {
|
637
|
+
return value->IsConstant()
|
638
|
+
? chunk_->DefineConstantOperand(HConstant::cast(value))
|
639
|
+
: Use(value, new LUnallocated(LUnallocated::ANY));
|
640
|
+
}
|
641
|
+
|
642
|
+
|
643
|
+
LOperand* LChunkBuilder::Use(HValue* value, LUnallocated* operand) {
|
644
|
+
if (value->EmitAtUses()) {
|
645
|
+
HInstruction* instr = HInstruction::cast(value);
|
646
|
+
VisitInstruction(instr);
|
647
|
+
}
|
648
|
+
allocator_->RecordUse(value, operand);
|
649
|
+
return operand;
|
650
|
+
}
|
651
|
+
|
652
|
+
|
653
|
+
template<int I, int T>
|
654
|
+
LInstruction* LChunkBuilder::Define(LTemplateInstruction<1, I, T>* instr,
|
655
|
+
LUnallocated* result) {
|
656
|
+
allocator_->RecordDefinition(current_instruction_, result);
|
657
|
+
instr->set_result(result);
|
658
|
+
return instr;
|
659
|
+
}
|
660
|
+
|
661
|
+
|
662
|
+
template<int I, int T>
|
663
|
+
LInstruction* LChunkBuilder::Define(LTemplateInstruction<1, I, T>* instr) {
|
664
|
+
return Define(instr, new LUnallocated(LUnallocated::NONE));
|
665
|
+
}
|
666
|
+
|
667
|
+
|
668
|
+
template<int I, int T>
|
669
|
+
LInstruction* LChunkBuilder::DefineAsRegister(
|
670
|
+
LTemplateInstruction<1, I, T>* instr) {
|
671
|
+
return Define(instr, new LUnallocated(LUnallocated::MUST_HAVE_REGISTER));
|
672
|
+
}
|
673
|
+
|
674
|
+
|
675
|
+
template<int I, int T>
|
676
|
+
LInstruction* LChunkBuilder::DefineAsSpilled(
|
677
|
+
LTemplateInstruction<1, I, T>* instr, int index) {
|
678
|
+
return Define(instr, new LUnallocated(LUnallocated::FIXED_SLOT, index));
|
679
|
+
}
|
680
|
+
|
681
|
+
|
682
|
+
template<int I, int T>
|
683
|
+
LInstruction* LChunkBuilder::DefineSameAsFirst(
|
684
|
+
LTemplateInstruction<1, I, T>* instr) {
|
685
|
+
return Define(instr, new LUnallocated(LUnallocated::SAME_AS_FIRST_INPUT));
|
686
|
+
}
|
687
|
+
|
688
|
+
|
689
|
+
template<int I, int T>
|
690
|
+
LInstruction* LChunkBuilder::DefineFixed(
|
691
|
+
LTemplateInstruction<1, I, T>* instr, Register reg) {
|
692
|
+
return Define(instr, ToUnallocated(reg));
|
693
|
+
}
|
694
|
+
|
695
|
+
|
696
|
+
template<int I, int T>
|
697
|
+
LInstruction* LChunkBuilder::DefineFixedDouble(
|
698
|
+
LTemplateInstruction<1, I, T>* instr, DoubleRegister reg) {
|
699
|
+
return Define(instr, ToUnallocated(reg));
|
700
|
+
}
|
701
|
+
|
702
|
+
|
703
|
+
LInstruction* LChunkBuilder::AssignEnvironment(LInstruction* instr) {
|
704
|
+
HEnvironment* hydrogen_env = current_block_->last_environment();
|
705
|
+
instr->set_environment(CreateEnvironment(hydrogen_env));
|
706
|
+
return instr;
|
707
|
+
}
|
708
|
+
|
709
|
+
|
710
|
+
LInstruction* LChunkBuilder::SetInstructionPendingDeoptimizationEnvironment(
|
711
|
+
LInstruction* instr, int ast_id) {
|
712
|
+
ASSERT(instruction_pending_deoptimization_environment_ == NULL);
|
713
|
+
ASSERT(pending_deoptimization_ast_id_ == AstNode::kNoNumber);
|
714
|
+
instruction_pending_deoptimization_environment_ = instr;
|
715
|
+
pending_deoptimization_ast_id_ = ast_id;
|
716
|
+
return instr;
|
717
|
+
}
|
718
|
+
|
719
|
+
|
720
|
+
void LChunkBuilder::ClearInstructionPendingDeoptimizationEnvironment() {
|
721
|
+
instruction_pending_deoptimization_environment_ = NULL;
|
722
|
+
pending_deoptimization_ast_id_ = AstNode::kNoNumber;
|
723
|
+
}
|
724
|
+
|
725
|
+
|
726
|
+
LInstruction* LChunkBuilder::MarkAsCall(LInstruction* instr,
|
727
|
+
HInstruction* hinstr,
|
728
|
+
CanDeoptimize can_deoptimize) {
|
729
|
+
#ifdef DEBUG
|
730
|
+
instr->VerifyCall();
|
731
|
+
#endif
|
732
|
+
instr->MarkAsCall();
|
733
|
+
instr = AssignPointerMap(instr);
|
734
|
+
|
735
|
+
if (hinstr->HasSideEffects()) {
|
736
|
+
ASSERT(hinstr->next()->IsSimulate());
|
737
|
+
HSimulate* sim = HSimulate::cast(hinstr->next());
|
738
|
+
instr = SetInstructionPendingDeoptimizationEnvironment(
|
739
|
+
instr, sim->ast_id());
|
740
|
+
}
|
741
|
+
|
742
|
+
// If instruction does not have side-effects lazy deoptimization
|
743
|
+
// after the call will try to deoptimize to the point before the call.
|
744
|
+
// Thus we still need to attach environment to this call even if
|
745
|
+
// call sequence can not deoptimize eagerly.
|
746
|
+
bool needs_environment =
|
747
|
+
(can_deoptimize == CAN_DEOPTIMIZE_EAGERLY) || !hinstr->HasSideEffects();
|
748
|
+
if (needs_environment && !instr->HasEnvironment()) {
|
749
|
+
instr = AssignEnvironment(instr);
|
750
|
+
}
|
751
|
+
|
752
|
+
return instr;
|
753
|
+
}
|
754
|
+
|
755
|
+
|
756
|
+
LInstruction* LChunkBuilder::MarkAsSaveDoubles(LInstruction* instr) {
|
757
|
+
instr->MarkAsSaveDoubles();
|
758
|
+
return instr;
|
759
|
+
}
|
760
|
+
|
761
|
+
|
762
|
+
LInstruction* LChunkBuilder::AssignPointerMap(LInstruction* instr) {
|
763
|
+
ASSERT(!instr->HasPointerMap());
|
764
|
+
instr->set_pointer_map(new LPointerMap(position_));
|
765
|
+
return instr;
|
766
|
+
}
|
767
|
+
|
768
|
+
|
769
|
+
LUnallocated* LChunkBuilder::TempRegister() {
|
770
|
+
LUnallocated* operand = new LUnallocated(LUnallocated::MUST_HAVE_REGISTER);
|
771
|
+
allocator_->RecordTemporary(operand);
|
772
|
+
return operand;
|
773
|
+
}
|
774
|
+
|
775
|
+
|
776
|
+
LOperand* LChunkBuilder::FixedTemp(Register reg) {
|
777
|
+
LUnallocated* operand = ToUnallocated(reg);
|
778
|
+
allocator_->RecordTemporary(operand);
|
779
|
+
return operand;
|
780
|
+
}
|
781
|
+
|
782
|
+
|
783
|
+
LOperand* LChunkBuilder::FixedTemp(DoubleRegister reg) {
|
784
|
+
LUnallocated* operand = ToUnallocated(reg);
|
785
|
+
allocator_->RecordTemporary(operand);
|
786
|
+
return operand;
|
787
|
+
}
|
788
|
+
|
789
|
+
|
790
|
+
LInstruction* LChunkBuilder::DoBlockEntry(HBlockEntry* instr) {
|
791
|
+
return new LLabel(instr->block());
|
792
|
+
}
|
793
|
+
|
794
|
+
|
795
|
+
LInstruction* LChunkBuilder::DoDeoptimize(HDeoptimize* instr) {
|
796
|
+
return AssignEnvironment(new LDeoptimize);
|
797
|
+
}
|
798
|
+
|
799
|
+
|
800
|
+
LInstruction* LChunkBuilder::DoBit(Token::Value op,
|
801
|
+
HBitwiseBinaryOperation* instr) {
|
802
|
+
if (instr->representation().IsInteger32()) {
|
803
|
+
ASSERT(instr->left()->representation().IsInteger32());
|
804
|
+
ASSERT(instr->right()->representation().IsInteger32());
|
805
|
+
|
806
|
+
LOperand* left = UseRegisterAtStart(instr->LeastConstantOperand());
|
807
|
+
LOperand* right = UseOrConstantAtStart(instr->MostConstantOperand());
|
808
|
+
return DefineSameAsFirst(new LBitI(op, left, right));
|
809
|
+
} else {
|
810
|
+
ASSERT(instr->representation().IsTagged());
|
811
|
+
ASSERT(instr->left()->representation().IsTagged());
|
812
|
+
ASSERT(instr->right()->representation().IsTagged());
|
813
|
+
|
814
|
+
LOperand* left = UseFixed(instr->left(), r1);
|
815
|
+
LOperand* right = UseFixed(instr->right(), r0);
|
816
|
+
LArithmeticT* result = new LArithmeticT(op, left, right);
|
817
|
+
return MarkAsCall(DefineFixed(result, r0), instr);
|
818
|
+
}
|
819
|
+
}
|
820
|
+
|
821
|
+
|
822
|
+
LInstruction* LChunkBuilder::DoShift(Token::Value op,
|
823
|
+
HBitwiseBinaryOperation* instr) {
|
824
|
+
if (instr->representation().IsTagged()) {
|
825
|
+
ASSERT(instr->left()->representation().IsTagged());
|
826
|
+
ASSERT(instr->right()->representation().IsTagged());
|
827
|
+
|
828
|
+
LOperand* left = UseFixed(instr->left(), r1);
|
829
|
+
LOperand* right = UseFixed(instr->right(), r0);
|
830
|
+
LArithmeticT* result = new LArithmeticT(op, left, right);
|
831
|
+
return MarkAsCall(DefineFixed(result, r0), instr);
|
832
|
+
}
|
833
|
+
|
834
|
+
ASSERT(instr->representation().IsInteger32());
|
835
|
+
ASSERT(instr->OperandAt(0)->representation().IsInteger32());
|
836
|
+
ASSERT(instr->OperandAt(1)->representation().IsInteger32());
|
837
|
+
LOperand* left = UseRegisterAtStart(instr->OperandAt(0));
|
838
|
+
|
839
|
+
HValue* right_value = instr->OperandAt(1);
|
840
|
+
LOperand* right = NULL;
|
841
|
+
int constant_value = 0;
|
842
|
+
if (right_value->IsConstant()) {
|
843
|
+
HConstant* constant = HConstant::cast(right_value);
|
844
|
+
right = chunk_->DefineConstantOperand(constant);
|
845
|
+
constant_value = constant->Integer32Value() & 0x1f;
|
846
|
+
} else {
|
847
|
+
right = UseRegister(right_value);
|
848
|
+
}
|
849
|
+
|
850
|
+
// Shift operations can only deoptimize if we do a logical shift
|
851
|
+
// by 0 and the result cannot be truncated to int32.
|
852
|
+
bool can_deopt = (op == Token::SHR && constant_value == 0);
|
853
|
+
if (can_deopt) {
|
854
|
+
bool can_truncate = true;
|
855
|
+
for (int i = 0; i < instr->uses()->length(); i++) {
|
856
|
+
if (!instr->uses()->at(i)->CheckFlag(HValue::kTruncatingToInt32)) {
|
857
|
+
can_truncate = false;
|
858
|
+
break;
|
859
|
+
}
|
860
|
+
}
|
861
|
+
can_deopt = !can_truncate;
|
862
|
+
}
|
863
|
+
|
864
|
+
LInstruction* result =
|
865
|
+
DefineSameAsFirst(new LShiftI(op, left, right, can_deopt));
|
866
|
+
if (can_deopt) AssignEnvironment(result);
|
867
|
+
return result;
|
868
|
+
}
|
869
|
+
|
870
|
+
|
871
|
+
LInstruction* LChunkBuilder::DoArithmeticD(Token::Value op,
|
872
|
+
HArithmeticBinaryOperation* instr) {
|
873
|
+
ASSERT(instr->representation().IsDouble());
|
874
|
+
ASSERT(instr->left()->representation().IsDouble());
|
875
|
+
ASSERT(instr->right()->representation().IsDouble());
|
876
|
+
LOperand* left = UseRegisterAtStart(instr->left());
|
877
|
+
LOperand* right = UseRegisterAtStart(instr->right());
|
878
|
+
LArithmeticD* result = new LArithmeticD(op, left, right);
|
879
|
+
return DefineSameAsFirst(result);
|
880
|
+
}
|
881
|
+
|
882
|
+
|
883
|
+
LInstruction* LChunkBuilder::DoArithmeticT(Token::Value op,
|
884
|
+
HArithmeticBinaryOperation* instr) {
|
885
|
+
ASSERT(op == Token::ADD ||
|
886
|
+
op == Token::DIV ||
|
887
|
+
op == Token::MOD ||
|
888
|
+
op == Token::MUL ||
|
889
|
+
op == Token::SUB);
|
890
|
+
HValue* left = instr->left();
|
891
|
+
HValue* right = instr->right();
|
892
|
+
ASSERT(left->representation().IsTagged());
|
893
|
+
ASSERT(right->representation().IsTagged());
|
894
|
+
LOperand* left_operand = UseFixed(left, r1);
|
895
|
+
LOperand* right_operand = UseFixed(right, r0);
|
896
|
+
LArithmeticT* result = new LArithmeticT(op, left_operand, right_operand);
|
897
|
+
return MarkAsCall(DefineFixed(result, r0), instr);
|
898
|
+
}
|
899
|
+
|
900
|
+
|
901
|
+
void LChunkBuilder::DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block) {
|
902
|
+
ASSERT(is_building());
|
903
|
+
current_block_ = block;
|
904
|
+
next_block_ = next_block;
|
905
|
+
if (block->IsStartBlock()) {
|
906
|
+
block->UpdateEnvironment(graph_->start_environment());
|
907
|
+
argument_count_ = 0;
|
908
|
+
} else if (block->predecessors()->length() == 1) {
|
909
|
+
// We have a single predecessor => copy environment and outgoing
|
910
|
+
// argument count from the predecessor.
|
911
|
+
ASSERT(block->phis()->length() == 0);
|
912
|
+
HBasicBlock* pred = block->predecessors()->at(0);
|
913
|
+
HEnvironment* last_environment = pred->last_environment();
|
914
|
+
ASSERT(last_environment != NULL);
|
915
|
+
// Only copy the environment, if it is later used again.
|
916
|
+
if (pred->end()->SecondSuccessor() == NULL) {
|
917
|
+
ASSERT(pred->end()->FirstSuccessor() == block);
|
918
|
+
} else {
|
919
|
+
if (pred->end()->FirstSuccessor()->block_id() > block->block_id() ||
|
920
|
+
pred->end()->SecondSuccessor()->block_id() > block->block_id()) {
|
921
|
+
last_environment = last_environment->Copy();
|
922
|
+
}
|
923
|
+
}
|
924
|
+
block->UpdateEnvironment(last_environment);
|
925
|
+
ASSERT(pred->argument_count() >= 0);
|
926
|
+
argument_count_ = pred->argument_count();
|
927
|
+
} else {
|
928
|
+
// We are at a state join => process phis.
|
929
|
+
HBasicBlock* pred = block->predecessors()->at(0);
|
930
|
+
// No need to copy the environment, it cannot be used later.
|
931
|
+
HEnvironment* last_environment = pred->last_environment();
|
932
|
+
for (int i = 0; i < block->phis()->length(); ++i) {
|
933
|
+
HPhi* phi = block->phis()->at(i);
|
934
|
+
last_environment->SetValueAt(phi->merged_index(), phi);
|
935
|
+
}
|
936
|
+
for (int i = 0; i < block->deleted_phis()->length(); ++i) {
|
937
|
+
last_environment->SetValueAt(block->deleted_phis()->at(i),
|
938
|
+
graph_->GetConstantUndefined());
|
939
|
+
}
|
940
|
+
block->UpdateEnvironment(last_environment);
|
941
|
+
// Pick up the outgoing argument count of one of the predecessors.
|
942
|
+
argument_count_ = pred->argument_count();
|
943
|
+
}
|
944
|
+
HInstruction* current = block->first();
|
945
|
+
int start = chunk_->instructions()->length();
|
946
|
+
while (current != NULL && !is_aborted()) {
|
947
|
+
// Code for constants in registers is generated lazily.
|
948
|
+
if (!current->EmitAtUses()) {
|
949
|
+
VisitInstruction(current);
|
950
|
+
}
|
951
|
+
current = current->next();
|
952
|
+
}
|
953
|
+
int end = chunk_->instructions()->length() - 1;
|
954
|
+
if (end >= start) {
|
955
|
+
block->set_first_instruction_index(start);
|
956
|
+
block->set_last_instruction_index(end);
|
957
|
+
}
|
958
|
+
block->set_argument_count(argument_count_);
|
959
|
+
next_block_ = NULL;
|
960
|
+
current_block_ = NULL;
|
961
|
+
}
|
962
|
+
|
963
|
+
|
964
|
+
void LChunkBuilder::VisitInstruction(HInstruction* current) {
|
965
|
+
HInstruction* old_current = current_instruction_;
|
966
|
+
current_instruction_ = current;
|
967
|
+
if (current->has_position()) position_ = current->position();
|
968
|
+
LInstruction* instr = current->CompileToLithium(this);
|
969
|
+
|
970
|
+
if (instr != NULL) {
|
971
|
+
if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) {
|
972
|
+
instr = AssignPointerMap(instr);
|
973
|
+
}
|
974
|
+
if (FLAG_stress_environments && !instr->HasEnvironment()) {
|
975
|
+
instr = AssignEnvironment(instr);
|
976
|
+
}
|
977
|
+
if (current->IsTest() && !instr->IsGoto()) {
|
978
|
+
ASSERT(instr->IsControl());
|
979
|
+
HTest* test = HTest::cast(current);
|
980
|
+
instr->set_hydrogen_value(test->value());
|
981
|
+
HBasicBlock* first = test->FirstSuccessor();
|
982
|
+
HBasicBlock* second = test->SecondSuccessor();
|
983
|
+
ASSERT(first != NULL && second != NULL);
|
984
|
+
instr->SetBranchTargets(first->block_id(), second->block_id());
|
985
|
+
} else {
|
986
|
+
instr->set_hydrogen_value(current);
|
987
|
+
}
|
988
|
+
|
989
|
+
chunk_->AddInstruction(instr, current_block_);
|
990
|
+
}
|
991
|
+
current_instruction_ = old_current;
|
992
|
+
}
|
993
|
+
|
994
|
+
|
995
|
+
LEnvironment* LChunkBuilder::CreateEnvironment(HEnvironment* hydrogen_env) {
|
996
|
+
if (hydrogen_env == NULL) return NULL;
|
997
|
+
|
998
|
+
LEnvironment* outer = CreateEnvironment(hydrogen_env->outer());
|
999
|
+
int ast_id = hydrogen_env->ast_id();
|
1000
|
+
ASSERT(ast_id != AstNode::kNoNumber);
|
1001
|
+
int value_count = hydrogen_env->length();
|
1002
|
+
LEnvironment* result = new LEnvironment(hydrogen_env->closure(),
|
1003
|
+
ast_id,
|
1004
|
+
hydrogen_env->parameter_count(),
|
1005
|
+
argument_count_,
|
1006
|
+
value_count,
|
1007
|
+
outer);
|
1008
|
+
int argument_index = 0;
|
1009
|
+
for (int i = 0; i < value_count; ++i) {
|
1010
|
+
HValue* value = hydrogen_env->values()->at(i);
|
1011
|
+
LOperand* op = NULL;
|
1012
|
+
if (value->IsArgumentsObject()) {
|
1013
|
+
op = NULL;
|
1014
|
+
} else if (value->IsPushArgument()) {
|
1015
|
+
op = new LArgument(argument_index++);
|
1016
|
+
} else {
|
1017
|
+
op = UseAny(value);
|
1018
|
+
}
|
1019
|
+
result->AddValue(op, value->representation());
|
1020
|
+
}
|
1021
|
+
|
1022
|
+
return result;
|
1023
|
+
}
|
1024
|
+
|
1025
|
+
|
1026
|
+
LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
|
1027
|
+
LInstruction* result = new LGoto(instr->FirstSuccessor()->block_id(),
|
1028
|
+
instr->include_stack_check());
|
1029
|
+
if (instr->include_stack_check()) result = AssignPointerMap(result);
|
1030
|
+
return result;
|
1031
|
+
}
|
1032
|
+
|
1033
|
+
|
1034
|
+
LInstruction* LChunkBuilder::DoTest(HTest* instr) {
|
1035
|
+
HValue* v = instr->value();
|
1036
|
+
if (v->EmitAtUses()) {
|
1037
|
+
if (v->IsClassOfTest()) {
|
1038
|
+
HClassOfTest* compare = HClassOfTest::cast(v);
|
1039
|
+
ASSERT(compare->value()->representation().IsTagged());
|
1040
|
+
|
1041
|
+
return new LClassOfTestAndBranch(UseTempRegister(compare->value()),
|
1042
|
+
TempRegister());
|
1043
|
+
} else if (v->IsCompare()) {
|
1044
|
+
HCompare* compare = HCompare::cast(v);
|
1045
|
+
Token::Value op = compare->token();
|
1046
|
+
HValue* left = compare->left();
|
1047
|
+
HValue* right = compare->right();
|
1048
|
+
Representation r = compare->GetInputRepresentation();
|
1049
|
+
if (r.IsInteger32()) {
|
1050
|
+
ASSERT(left->representation().IsInteger32());
|
1051
|
+
ASSERT(right->representation().IsInteger32());
|
1052
|
+
return new LCmpIDAndBranch(UseRegisterAtStart(left),
|
1053
|
+
UseRegisterAtStart(right));
|
1054
|
+
} else if (r.IsDouble()) {
|
1055
|
+
ASSERT(left->representation().IsDouble());
|
1056
|
+
ASSERT(right->representation().IsDouble());
|
1057
|
+
return new LCmpIDAndBranch(UseRegisterAtStart(left),
|
1058
|
+
UseRegisterAtStart(right));
|
1059
|
+
} else {
|
1060
|
+
ASSERT(left->representation().IsTagged());
|
1061
|
+
ASSERT(right->representation().IsTagged());
|
1062
|
+
bool reversed = op == Token::GT || op == Token::LTE;
|
1063
|
+
LOperand* left_operand = UseFixed(left, reversed ? r0 : r1);
|
1064
|
+
LOperand* right_operand = UseFixed(right, reversed ? r1 : r0);
|
1065
|
+
LInstruction* result = new LCmpTAndBranch(left_operand,
|
1066
|
+
right_operand);
|
1067
|
+
return MarkAsCall(result, instr);
|
1068
|
+
}
|
1069
|
+
} else if (v->IsIsSmi()) {
|
1070
|
+
HIsSmi* compare = HIsSmi::cast(v);
|
1071
|
+
ASSERT(compare->value()->representation().IsTagged());
|
1072
|
+
|
1073
|
+
return new LIsSmiAndBranch(Use(compare->value()));
|
1074
|
+
} else if (v->IsHasInstanceType()) {
|
1075
|
+
HHasInstanceType* compare = HHasInstanceType::cast(v);
|
1076
|
+
ASSERT(compare->value()->representation().IsTagged());
|
1077
|
+
return new LHasInstanceTypeAndBranch(
|
1078
|
+
UseRegisterAtStart(compare->value()));
|
1079
|
+
} else if (v->IsHasCachedArrayIndex()) {
|
1080
|
+
HHasCachedArrayIndex* compare = HHasCachedArrayIndex::cast(v);
|
1081
|
+
ASSERT(compare->value()->representation().IsTagged());
|
1082
|
+
|
1083
|
+
return new LHasCachedArrayIndexAndBranch(
|
1084
|
+
UseRegisterAtStart(compare->value()));
|
1085
|
+
} else if (v->IsIsNull()) {
|
1086
|
+
HIsNull* compare = HIsNull::cast(v);
|
1087
|
+
ASSERT(compare->value()->representation().IsTagged());
|
1088
|
+
|
1089
|
+
return new LIsNullAndBranch(UseRegisterAtStart(compare->value()));
|
1090
|
+
} else if (v->IsIsObject()) {
|
1091
|
+
HIsObject* compare = HIsObject::cast(v);
|
1092
|
+
ASSERT(compare->value()->representation().IsTagged());
|
1093
|
+
|
1094
|
+
LOperand* temp = TempRegister();
|
1095
|
+
return new LIsObjectAndBranch(UseRegisterAtStart(compare->value()), temp);
|
1096
|
+
} else if (v->IsCompareJSObjectEq()) {
|
1097
|
+
HCompareJSObjectEq* compare = HCompareJSObjectEq::cast(v);
|
1098
|
+
return new LCmpJSObjectEqAndBranch(UseRegisterAtStart(compare->left()),
|
1099
|
+
UseRegisterAtStart(compare->right()));
|
1100
|
+
} else if (v->IsInstanceOf()) {
|
1101
|
+
HInstanceOf* instance_of = HInstanceOf::cast(v);
|
1102
|
+
LInstruction* result =
|
1103
|
+
new LInstanceOfAndBranch(UseFixed(instance_of->left(), r0),
|
1104
|
+
UseFixed(instance_of->right(), r1));
|
1105
|
+
return MarkAsCall(result, instr);
|
1106
|
+
} else if (v->IsTypeofIs()) {
|
1107
|
+
HTypeofIs* typeof_is = HTypeofIs::cast(v);
|
1108
|
+
return new LTypeofIsAndBranch(UseTempRegister(typeof_is->value()));
|
1109
|
+
} else if (v->IsIsConstructCall()) {
|
1110
|
+
return new LIsConstructCallAndBranch(TempRegister());
|
1111
|
+
} else {
|
1112
|
+
if (v->IsConstant()) {
|
1113
|
+
if (HConstant::cast(v)->handle()->IsTrue()) {
|
1114
|
+
return new LGoto(instr->FirstSuccessor()->block_id());
|
1115
|
+
} else if (HConstant::cast(v)->handle()->IsFalse()) {
|
1116
|
+
return new LGoto(instr->SecondSuccessor()->block_id());
|
1117
|
+
}
|
1118
|
+
}
|
1119
|
+
Abort("Undefined compare before branch");
|
1120
|
+
return NULL;
|
1121
|
+
}
|
1122
|
+
}
|
1123
|
+
return new LBranch(UseRegisterAtStart(v));
|
1124
|
+
}
|
1125
|
+
|
1126
|
+
|
1127
|
+
LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) {
|
1128
|
+
ASSERT(instr->value()->representation().IsTagged());
|
1129
|
+
LOperand* value = UseRegisterAtStart(instr->value());
|
1130
|
+
LOperand* temp = TempRegister();
|
1131
|
+
return new LCmpMapAndBranch(value, temp);
|
1132
|
+
}
|
1133
|
+
|
1134
|
+
|
1135
|
+
LInstruction* LChunkBuilder::DoArgumentsLength(HArgumentsLength* length) {
|
1136
|
+
return DefineAsRegister(new LArgumentsLength(UseRegister(length->value())));
|
1137
|
+
}
|
1138
|
+
|
1139
|
+
|
1140
|
+
LInstruction* LChunkBuilder::DoArgumentsElements(HArgumentsElements* elems) {
|
1141
|
+
return DefineAsRegister(new LArgumentsElements);
|
1142
|
+
}
|
1143
|
+
|
1144
|
+
|
1145
|
+
LInstruction* LChunkBuilder::DoInstanceOf(HInstanceOf* instr) {
|
1146
|
+
LInstanceOf* result =
|
1147
|
+
new LInstanceOf(UseFixed(instr->left(), r0),
|
1148
|
+
UseFixed(instr->right(), r1));
|
1149
|
+
return MarkAsCall(DefineFixed(result, r0), instr);
|
1150
|
+
}
|
1151
|
+
|
1152
|
+
|
1153
|
+
LInstruction* LChunkBuilder::DoInstanceOfKnownGlobal(
|
1154
|
+
HInstanceOfKnownGlobal* instr) {
|
1155
|
+
LInstanceOfKnownGlobal* result =
|
1156
|
+
new LInstanceOfKnownGlobal(UseFixed(instr->value(), r0), FixedTemp(r4));
|
1157
|
+
return MarkAsCall(DefineFixed(result, r0), instr);
|
1158
|
+
}
|
1159
|
+
|
1160
|
+
|
1161
|
+
LInstruction* LChunkBuilder::DoApplyArguments(HApplyArguments* instr) {
|
1162
|
+
LOperand* function = UseFixed(instr->function(), r1);
|
1163
|
+
LOperand* receiver = UseFixed(instr->receiver(), r0);
|
1164
|
+
LOperand* length = UseFixed(instr->length(), r2);
|
1165
|
+
LOperand* elements = UseFixed(instr->elements(), r3);
|
1166
|
+
LApplyArguments* result = new LApplyArguments(function,
|
1167
|
+
receiver,
|
1168
|
+
length,
|
1169
|
+
elements);
|
1170
|
+
return MarkAsCall(DefineFixed(result, r0), instr, CAN_DEOPTIMIZE_EAGERLY);
|
1171
|
+
}
|
1172
|
+
|
1173
|
+
|
1174
|
+
LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) {
|
1175
|
+
++argument_count_;
|
1176
|
+
LOperand* argument = Use(instr->argument());
|
1177
|
+
return new LPushArgument(argument);
|
1178
|
+
}
|
1179
|
+
|
1180
|
+
|
1181
|
+
LInstruction* LChunkBuilder::DoContext(HContext* instr) {
|
1182
|
+
return DefineAsRegister(new LContext);
|
1183
|
+
}
|
1184
|
+
|
1185
|
+
|
1186
|
+
LInstruction* LChunkBuilder::DoOuterContext(HOuterContext* instr) {
|
1187
|
+
LOperand* context = UseRegisterAtStart(instr->value());
|
1188
|
+
return DefineAsRegister(new LOuterContext(context));
|
1189
|
+
}
|
1190
|
+
|
1191
|
+
|
1192
|
+
LInstruction* LChunkBuilder::DoGlobalObject(HGlobalObject* instr) {
|
1193
|
+
LOperand* context = UseRegisterAtStart(instr->value());
|
1194
|
+
return DefineAsRegister(new LGlobalObject(context));
|
1195
|
+
}
|
1196
|
+
|
1197
|
+
|
1198
|
+
LInstruction* LChunkBuilder::DoGlobalReceiver(HGlobalReceiver* instr) {
|
1199
|
+
LOperand* global_object = UseRegisterAtStart(instr->value());
|
1200
|
+
return DefineAsRegister(new LGlobalReceiver(global_object));
|
1201
|
+
}
|
1202
|
+
|
1203
|
+
|
1204
|
+
LInstruction* LChunkBuilder::DoCallConstantFunction(
|
1205
|
+
HCallConstantFunction* instr) {
|
1206
|
+
argument_count_ -= instr->argument_count();
|
1207
|
+
return MarkAsCall(DefineFixed(new LCallConstantFunction, r0), instr);
|
1208
|
+
}
|
1209
|
+
|
1210
|
+
|
1211
|
+
LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) {
|
1212
|
+
BuiltinFunctionId op = instr->op();
|
1213
|
+
LOperand* input = UseRegisterAtStart(instr->value());
|
1214
|
+
LOperand* temp = (op == kMathFloor) ? TempRegister() : NULL;
|
1215
|
+
LUnaryMathOperation* result = new LUnaryMathOperation(input, temp);
|
1216
|
+
switch (op) {
|
1217
|
+
case kMathAbs:
|
1218
|
+
return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result)));
|
1219
|
+
case kMathFloor:
|
1220
|
+
return AssignEnvironment(AssignPointerMap(DefineAsRegister(result)));
|
1221
|
+
case kMathSqrt:
|
1222
|
+
return DefineSameAsFirst(result);
|
1223
|
+
case kMathRound:
|
1224
|
+
return AssignEnvironment(DefineAsRegister(result));
|
1225
|
+
case kMathPowHalf:
|
1226
|
+
Abort("MathPowHalf LUnaryMathOperation not implemented");
|
1227
|
+
return NULL;
|
1228
|
+
case kMathLog:
|
1229
|
+
Abort("MathLog LUnaryMathOperation not implemented");
|
1230
|
+
return NULL;
|
1231
|
+
case kMathCos:
|
1232
|
+
Abort("MathCos LUnaryMathOperation not implemented");
|
1233
|
+
return NULL;
|
1234
|
+
case kMathSin:
|
1235
|
+
Abort("MathSin LUnaryMathOperation not implemented");
|
1236
|
+
return NULL;
|
1237
|
+
default:
|
1238
|
+
UNREACHABLE();
|
1239
|
+
return NULL;
|
1240
|
+
}
|
1241
|
+
}
|
1242
|
+
|
1243
|
+
|
1244
|
+
LInstruction* LChunkBuilder::DoCallKeyed(HCallKeyed* instr) {
|
1245
|
+
ASSERT(instr->key()->representation().IsTagged());
|
1246
|
+
argument_count_ -= instr->argument_count();
|
1247
|
+
LOperand* key = UseFixed(instr->key(), r2);
|
1248
|
+
return MarkAsCall(DefineFixed(new LCallKeyed(key), r0), instr);
|
1249
|
+
}
|
1250
|
+
|
1251
|
+
|
1252
|
+
LInstruction* LChunkBuilder::DoCallNamed(HCallNamed* instr) {
|
1253
|
+
argument_count_ -= instr->argument_count();
|
1254
|
+
return MarkAsCall(DefineFixed(new LCallNamed, r0), instr);
|
1255
|
+
}
|
1256
|
+
|
1257
|
+
|
1258
|
+
LInstruction* LChunkBuilder::DoCallGlobal(HCallGlobal* instr) {
|
1259
|
+
argument_count_ -= instr->argument_count();
|
1260
|
+
return MarkAsCall(DefineFixed(new LCallGlobal, r0), instr);
|
1261
|
+
}
|
1262
|
+
|
1263
|
+
|
1264
|
+
LInstruction* LChunkBuilder::DoCallKnownGlobal(HCallKnownGlobal* instr) {
|
1265
|
+
argument_count_ -= instr->argument_count();
|
1266
|
+
return MarkAsCall(DefineFixed(new LCallKnownGlobal, r0), instr);
|
1267
|
+
}
|
1268
|
+
|
1269
|
+
|
1270
|
+
LInstruction* LChunkBuilder::DoCallNew(HCallNew* instr) {
|
1271
|
+
LOperand* constructor = UseFixed(instr->constructor(), r1);
|
1272
|
+
argument_count_ -= instr->argument_count();
|
1273
|
+
LCallNew* result = new LCallNew(constructor);
|
1274
|
+
return MarkAsCall(DefineFixed(result, r0), instr);
|
1275
|
+
}
|
1276
|
+
|
1277
|
+
|
1278
|
+
LInstruction* LChunkBuilder::DoCallFunction(HCallFunction* instr) {
|
1279
|
+
argument_count_ -= instr->argument_count();
|
1280
|
+
return MarkAsCall(DefineFixed(new LCallFunction, r0), instr);
|
1281
|
+
}
|
1282
|
+
|
1283
|
+
|
1284
|
+
LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) {
|
1285
|
+
argument_count_ -= instr->argument_count();
|
1286
|
+
return MarkAsCall(DefineFixed(new LCallRuntime, r0), instr);
|
1287
|
+
}
|
1288
|
+
|
1289
|
+
|
1290
|
+
LInstruction* LChunkBuilder::DoShr(HShr* instr) {
|
1291
|
+
return DoShift(Token::SHR, instr);
|
1292
|
+
}
|
1293
|
+
|
1294
|
+
|
1295
|
+
LInstruction* LChunkBuilder::DoSar(HSar* instr) {
|
1296
|
+
return DoShift(Token::SAR, instr);
|
1297
|
+
}
|
1298
|
+
|
1299
|
+
|
1300
|
+
LInstruction* LChunkBuilder::DoShl(HShl* instr) {
|
1301
|
+
return DoShift(Token::SHL, instr);
|
1302
|
+
}
|
1303
|
+
|
1304
|
+
|
1305
|
+
LInstruction* LChunkBuilder::DoBitAnd(HBitAnd* instr) {
|
1306
|
+
return DoBit(Token::BIT_AND, instr);
|
1307
|
+
}
|
1308
|
+
|
1309
|
+
|
1310
|
+
LInstruction* LChunkBuilder::DoBitNot(HBitNot* instr) {
|
1311
|
+
ASSERT(instr->value()->representation().IsInteger32());
|
1312
|
+
ASSERT(instr->representation().IsInteger32());
|
1313
|
+
return DefineSameAsFirst(new LBitNotI(UseRegisterAtStart(instr->value())));
|
1314
|
+
}
|
1315
|
+
|
1316
|
+
|
1317
|
+
LInstruction* LChunkBuilder::DoBitOr(HBitOr* instr) {
|
1318
|
+
return DoBit(Token::BIT_OR, instr);
|
1319
|
+
}
|
1320
|
+
|
1321
|
+
|
1322
|
+
LInstruction* LChunkBuilder::DoBitXor(HBitXor* instr) {
|
1323
|
+
return DoBit(Token::BIT_XOR, instr);
|
1324
|
+
}
|
1325
|
+
|
1326
|
+
|
1327
|
+
LInstruction* LChunkBuilder::DoDiv(HDiv* instr) {
|
1328
|
+
if (instr->representation().IsDouble()) {
|
1329
|
+
return DoArithmeticD(Token::DIV, instr);
|
1330
|
+
} else if (instr->representation().IsInteger32()) {
|
1331
|
+
// TODO(1042) The fixed register allocation
|
1332
|
+
// is needed because we call GenericBinaryOpStub from
|
1333
|
+
// the generated code, which requires registers r0
|
1334
|
+
// and r1 to be used. We should remove that
|
1335
|
+
// when we provide a native implementation.
|
1336
|
+
LOperand* dividend = UseFixed(instr->left(), r0);
|
1337
|
+
LOperand* divisor = UseFixed(instr->right(), r1);
|
1338
|
+
return AssignEnvironment(AssignPointerMap(
|
1339
|
+
DefineFixed(new LDivI(dividend, divisor), r0)));
|
1340
|
+
} else {
|
1341
|
+
return DoArithmeticT(Token::DIV, instr);
|
1342
|
+
}
|
1343
|
+
}
|
1344
|
+
|
1345
|
+
|
1346
|
+
LInstruction* LChunkBuilder::DoMod(HMod* instr) {
|
1347
|
+
if (instr->representation().IsInteger32()) {
|
1348
|
+
// TODO(1042) The fixed register allocation
|
1349
|
+
// is needed because we call GenericBinaryOpStub from
|
1350
|
+
// the generated code, which requires registers r0
|
1351
|
+
// and r1 to be used. We should remove that
|
1352
|
+
// when we provide a native implementation.
|
1353
|
+
ASSERT(instr->left()->representation().IsInteger32());
|
1354
|
+
ASSERT(instr->right()->representation().IsInteger32());
|
1355
|
+
LOperand* value = UseFixed(instr->left(), r0);
|
1356
|
+
LOperand* divisor = UseFixed(instr->right(), r1);
|
1357
|
+
LInstruction* result = DefineFixed(new LModI(value, divisor), r0);
|
1358
|
+
result = AssignEnvironment(AssignPointerMap(result));
|
1359
|
+
return result;
|
1360
|
+
} else if (instr->representation().IsTagged()) {
|
1361
|
+
return DoArithmeticT(Token::MOD, instr);
|
1362
|
+
} else {
|
1363
|
+
ASSERT(instr->representation().IsDouble());
|
1364
|
+
// We call a C function for double modulo. It can't trigger a GC.
|
1365
|
+
// We need to use fixed result register for the call.
|
1366
|
+
// TODO(fschneider): Allow any register as input registers.
|
1367
|
+
LOperand* left = UseFixedDouble(instr->left(), d1);
|
1368
|
+
LOperand* right = UseFixedDouble(instr->right(), d2);
|
1369
|
+
LArithmeticD* result = new LArithmeticD(Token::MOD, left, right);
|
1370
|
+
return MarkAsCall(DefineFixedDouble(result, d1), instr);
|
1371
|
+
}
|
1372
|
+
}
|
1373
|
+
|
1374
|
+
|
1375
|
+
LInstruction* LChunkBuilder::DoMul(HMul* instr) {
|
1376
|
+
if (instr->representation().IsInteger32()) {
|
1377
|
+
ASSERT(instr->left()->representation().IsInteger32());
|
1378
|
+
ASSERT(instr->right()->representation().IsInteger32());
|
1379
|
+
LOperand* left = UseRegisterAtStart(instr->LeastConstantOperand());
|
1380
|
+
LOperand* right = UseOrConstant(instr->MostConstantOperand());
|
1381
|
+
LOperand* temp = NULL;
|
1382
|
+
if (instr->CheckFlag(HValue::kBailoutOnMinusZero)) {
|
1383
|
+
temp = TempRegister();
|
1384
|
+
}
|
1385
|
+
LMulI* mul = new LMulI(left, right, temp);
|
1386
|
+
return AssignEnvironment(DefineSameAsFirst(mul));
|
1387
|
+
} else if (instr->representation().IsDouble()) {
|
1388
|
+
return DoArithmeticD(Token::MUL, instr);
|
1389
|
+
} else {
|
1390
|
+
return DoArithmeticT(Token::MUL, instr);
|
1391
|
+
}
|
1392
|
+
}
|
1393
|
+
|
1394
|
+
|
1395
|
+
LInstruction* LChunkBuilder::DoSub(HSub* instr) {
|
1396
|
+
if (instr->representation().IsInteger32()) {
|
1397
|
+
ASSERT(instr->left()->representation().IsInteger32());
|
1398
|
+
ASSERT(instr->right()->representation().IsInteger32());
|
1399
|
+
LOperand* left = UseRegisterAtStart(instr->left());
|
1400
|
+
LOperand* right = UseOrConstantAtStart(instr->right());
|
1401
|
+
LSubI* sub = new LSubI(left, right);
|
1402
|
+
LInstruction* result = DefineSameAsFirst(sub);
|
1403
|
+
if (instr->CheckFlag(HValue::kCanOverflow)) {
|
1404
|
+
result = AssignEnvironment(result);
|
1405
|
+
}
|
1406
|
+
return result;
|
1407
|
+
} else if (instr->representation().IsDouble()) {
|
1408
|
+
return DoArithmeticD(Token::SUB, instr);
|
1409
|
+
} else {
|
1410
|
+
return DoArithmeticT(Token::SUB, instr);
|
1411
|
+
}
|
1412
|
+
}
|
1413
|
+
|
1414
|
+
|
1415
|
+
LInstruction* LChunkBuilder::DoAdd(HAdd* instr) {
|
1416
|
+
if (instr->representation().IsInteger32()) {
|
1417
|
+
ASSERT(instr->left()->representation().IsInteger32());
|
1418
|
+
ASSERT(instr->right()->representation().IsInteger32());
|
1419
|
+
LOperand* left = UseRegisterAtStart(instr->LeastConstantOperand());
|
1420
|
+
LOperand* right = UseOrConstantAtStart(instr->MostConstantOperand());
|
1421
|
+
LAddI* add = new LAddI(left, right);
|
1422
|
+
LInstruction* result = DefineSameAsFirst(add);
|
1423
|
+
if (instr->CheckFlag(HValue::kCanOverflow)) {
|
1424
|
+
result = AssignEnvironment(result);
|
1425
|
+
}
|
1426
|
+
return result;
|
1427
|
+
} else if (instr->representation().IsDouble()) {
|
1428
|
+
return DoArithmeticD(Token::ADD, instr);
|
1429
|
+
} else {
|
1430
|
+
ASSERT(instr->representation().IsTagged());
|
1431
|
+
return DoArithmeticT(Token::ADD, instr);
|
1432
|
+
}
|
1433
|
+
}
|
1434
|
+
|
1435
|
+
|
1436
|
+
LInstruction* LChunkBuilder::DoPower(HPower* instr) {
|
1437
|
+
ASSERT(instr->representation().IsDouble());
|
1438
|
+
// We call a C function for double power. It can't trigger a GC.
|
1439
|
+
// We need to use fixed result register for the call.
|
1440
|
+
Representation exponent_type = instr->right()->representation();
|
1441
|
+
ASSERT(instr->left()->representation().IsDouble());
|
1442
|
+
LOperand* left = UseFixedDouble(instr->left(), d1);
|
1443
|
+
LOperand* right = exponent_type.IsDouble() ?
|
1444
|
+
UseFixedDouble(instr->right(), d2) :
|
1445
|
+
UseFixed(instr->right(), r0);
|
1446
|
+
LPower* result = new LPower(left, right);
|
1447
|
+
return MarkAsCall(DefineFixedDouble(result, d3),
|
1448
|
+
instr,
|
1449
|
+
CAN_DEOPTIMIZE_EAGERLY);
|
1450
|
+
}
|
1451
|
+
|
1452
|
+
|
1453
|
+
LInstruction* LChunkBuilder::DoCompare(HCompare* instr) {
|
1454
|
+
Token::Value op = instr->token();
|
1455
|
+
Representation r = instr->GetInputRepresentation();
|
1456
|
+
if (r.IsInteger32()) {
|
1457
|
+
ASSERT(instr->left()->representation().IsInteger32());
|
1458
|
+
ASSERT(instr->right()->representation().IsInteger32());
|
1459
|
+
LOperand* left = UseRegisterAtStart(instr->left());
|
1460
|
+
LOperand* right = UseRegisterAtStart(instr->right());
|
1461
|
+
return DefineAsRegister(new LCmpID(left, right));
|
1462
|
+
} else if (r.IsDouble()) {
|
1463
|
+
ASSERT(instr->left()->representation().IsDouble());
|
1464
|
+
ASSERT(instr->right()->representation().IsDouble());
|
1465
|
+
LOperand* left = UseRegisterAtStart(instr->left());
|
1466
|
+
LOperand* right = UseRegisterAtStart(instr->right());
|
1467
|
+
return DefineAsRegister(new LCmpID(left, right));
|
1468
|
+
} else {
|
1469
|
+
ASSERT(instr->left()->representation().IsTagged());
|
1470
|
+
ASSERT(instr->right()->representation().IsTagged());
|
1471
|
+
bool reversed = (op == Token::GT || op == Token::LTE);
|
1472
|
+
LOperand* left = UseFixed(instr->left(), reversed ? r0 : r1);
|
1473
|
+
LOperand* right = UseFixed(instr->right(), reversed ? r1 : r0);
|
1474
|
+
LCmpT* result = new LCmpT(left, right);
|
1475
|
+
return MarkAsCall(DefineFixed(result, r0), instr);
|
1476
|
+
}
|
1477
|
+
}
|
1478
|
+
|
1479
|
+
|
1480
|
+
LInstruction* LChunkBuilder::DoCompareJSObjectEq(
|
1481
|
+
HCompareJSObjectEq* instr) {
|
1482
|
+
LOperand* left = UseRegisterAtStart(instr->left());
|
1483
|
+
LOperand* right = UseRegisterAtStart(instr->right());
|
1484
|
+
LCmpJSObjectEq* result = new LCmpJSObjectEq(left, right);
|
1485
|
+
return DefineAsRegister(result);
|
1486
|
+
}
|
1487
|
+
|
1488
|
+
|
1489
|
+
LInstruction* LChunkBuilder::DoIsNull(HIsNull* instr) {
|
1490
|
+
ASSERT(instr->value()->representation().IsTagged());
|
1491
|
+
LOperand* value = UseRegisterAtStart(instr->value());
|
1492
|
+
|
1493
|
+
return DefineAsRegister(new LIsNull(value));
|
1494
|
+
}
|
1495
|
+
|
1496
|
+
|
1497
|
+
LInstruction* LChunkBuilder::DoIsObject(HIsObject* instr) {
|
1498
|
+
ASSERT(instr->value()->representation().IsTagged());
|
1499
|
+
LOperand* value = UseRegisterAtStart(instr->value());
|
1500
|
+
|
1501
|
+
return DefineAsRegister(new LIsObject(value));
|
1502
|
+
}
|
1503
|
+
|
1504
|
+
|
1505
|
+
LInstruction* LChunkBuilder::DoIsSmi(HIsSmi* instr) {
|
1506
|
+
ASSERT(instr->value()->representation().IsTagged());
|
1507
|
+
LOperand* value = UseAtStart(instr->value());
|
1508
|
+
|
1509
|
+
return DefineAsRegister(new LIsSmi(value));
|
1510
|
+
}
|
1511
|
+
|
1512
|
+
|
1513
|
+
LInstruction* LChunkBuilder::DoHasInstanceType(HHasInstanceType* instr) {
|
1514
|
+
ASSERT(instr->value()->representation().IsTagged());
|
1515
|
+
LOperand* value = UseRegisterAtStart(instr->value());
|
1516
|
+
|
1517
|
+
return DefineAsRegister(new LHasInstanceType(value));
|
1518
|
+
}
|
1519
|
+
|
1520
|
+
|
1521
|
+
LInstruction* LChunkBuilder::DoGetCachedArrayIndex(
|
1522
|
+
HGetCachedArrayIndex* instr) {
|
1523
|
+
ASSERT(instr->value()->representation().IsTagged());
|
1524
|
+
LOperand* value = UseRegister(instr->value());
|
1525
|
+
|
1526
|
+
return DefineAsRegister(new LGetCachedArrayIndex(value));
|
1527
|
+
}
|
1528
|
+
|
1529
|
+
|
1530
|
+
LInstruction* LChunkBuilder::DoHasCachedArrayIndex(
|
1531
|
+
HHasCachedArrayIndex* instr) {
|
1532
|
+
ASSERT(instr->value()->representation().IsTagged());
|
1533
|
+
LOperand* value = UseRegister(instr->value());
|
1534
|
+
|
1535
|
+
return DefineAsRegister(new LHasCachedArrayIndex(value));
|
1536
|
+
}
|
1537
|
+
|
1538
|
+
|
1539
|
+
LInstruction* LChunkBuilder::DoClassOfTest(HClassOfTest* instr) {
|
1540
|
+
ASSERT(instr->value()->representation().IsTagged());
|
1541
|
+
LOperand* value = UseTempRegister(instr->value());
|
1542
|
+
return DefineSameAsFirst(new LClassOfTest(value));
|
1543
|
+
}
|
1544
|
+
|
1545
|
+
|
1546
|
+
LInstruction* LChunkBuilder::DoJSArrayLength(HJSArrayLength* instr) {
|
1547
|
+
LOperand* array = UseRegisterAtStart(instr->value());
|
1548
|
+
return DefineAsRegister(new LJSArrayLength(array));
|
1549
|
+
}
|
1550
|
+
|
1551
|
+
|
1552
|
+
LInstruction* LChunkBuilder::DoPixelArrayLength(HPixelArrayLength* instr) {
|
1553
|
+
LOperand* array = UseRegisterAtStart(instr->value());
|
1554
|
+
return DefineAsRegister(new LPixelArrayLength(array));
|
1555
|
+
}
|
1556
|
+
|
1557
|
+
|
1558
|
+
LInstruction* LChunkBuilder::DoFixedArrayLength(HFixedArrayLength* instr) {
|
1559
|
+
LOperand* array = UseRegisterAtStart(instr->value());
|
1560
|
+
return DefineAsRegister(new LFixedArrayLength(array));
|
1561
|
+
}
|
1562
|
+
|
1563
|
+
|
1564
|
+
LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) {
|
1565
|
+
LOperand* object = UseRegister(instr->value());
|
1566
|
+
LValueOf* result = new LValueOf(object, TempRegister());
|
1567
|
+
return AssignEnvironment(DefineSameAsFirst(result));
|
1568
|
+
}
|
1569
|
+
|
1570
|
+
|
1571
|
+
LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) {
|
1572
|
+
return AssignEnvironment(new LBoundsCheck(UseRegisterAtStart(instr->index()),
|
1573
|
+
UseRegister(instr->length())));
|
1574
|
+
}
|
1575
|
+
|
1576
|
+
|
1577
|
+
LInstruction* LChunkBuilder::DoAbnormalExit(HAbnormalExit* instr) {
|
1578
|
+
// The control instruction marking the end of a block that completed
|
1579
|
+
// abruptly (e.g., threw an exception). There is nothing specific to do.
|
1580
|
+
return NULL;
|
1581
|
+
}
|
1582
|
+
|
1583
|
+
|
1584
|
+
LInstruction* LChunkBuilder::DoThrow(HThrow* instr) {
|
1585
|
+
LOperand* value = UseFixed(instr->value(), r0);
|
1586
|
+
return MarkAsCall(new LThrow(value), instr);
|
1587
|
+
}
|
1588
|
+
|
1589
|
+
|
1590
|
+
LInstruction* LChunkBuilder::DoChange(HChange* instr) {
|
1591
|
+
Representation from = instr->from();
|
1592
|
+
Representation to = instr->to();
|
1593
|
+
if (from.IsTagged()) {
|
1594
|
+
if (to.IsDouble()) {
|
1595
|
+
LOperand* value = UseRegister(instr->value());
|
1596
|
+
LNumberUntagD* res = new LNumberUntagD(value);
|
1597
|
+
return AssignEnvironment(DefineAsRegister(res));
|
1598
|
+
} else {
|
1599
|
+
ASSERT(to.IsInteger32());
|
1600
|
+
LOperand* value = UseRegister(instr->value());
|
1601
|
+
bool needs_check = !instr->value()->type().IsSmi();
|
1602
|
+
LInstruction* res = NULL;
|
1603
|
+
if (needs_check) {
|
1604
|
+
res = DefineSameAsFirst(new LTaggedToI(value, FixedTemp(d1)));
|
1605
|
+
} else {
|
1606
|
+
res = DefineSameAsFirst(new LSmiUntag(value, needs_check));
|
1607
|
+
}
|
1608
|
+
if (needs_check) {
|
1609
|
+
res = AssignEnvironment(res);
|
1610
|
+
}
|
1611
|
+
return res;
|
1612
|
+
}
|
1613
|
+
} else if (from.IsDouble()) {
|
1614
|
+
if (to.IsTagged()) {
|
1615
|
+
LOperand* value = UseRegister(instr->value());
|
1616
|
+
LOperand* temp1 = TempRegister();
|
1617
|
+
LOperand* temp2 = TempRegister();
|
1618
|
+
|
1619
|
+
// Make sure that the temp and result_temp registers are
|
1620
|
+
// different.
|
1621
|
+
LUnallocated* result_temp = TempRegister();
|
1622
|
+
LNumberTagD* result = new LNumberTagD(value, temp1, temp2);
|
1623
|
+
Define(result, result_temp);
|
1624
|
+
return AssignPointerMap(result);
|
1625
|
+
} else {
|
1626
|
+
ASSERT(to.IsInteger32());
|
1627
|
+
LOperand* value = UseRegister(instr->value());
|
1628
|
+
LDoubleToI* res = new LDoubleToI(value, TempRegister());
|
1629
|
+
return AssignEnvironment(DefineAsRegister(res));
|
1630
|
+
}
|
1631
|
+
} else if (from.IsInteger32()) {
|
1632
|
+
if (to.IsTagged()) {
|
1633
|
+
HValue* val = instr->value();
|
1634
|
+
LOperand* value = UseRegister(val);
|
1635
|
+
if (val->HasRange() && val->range()->IsInSmiRange()) {
|
1636
|
+
return DefineSameAsFirst(new LSmiTag(value));
|
1637
|
+
} else {
|
1638
|
+
LNumberTagI* result = new LNumberTagI(value);
|
1639
|
+
return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result)));
|
1640
|
+
}
|
1641
|
+
} else {
|
1642
|
+
ASSERT(to.IsDouble());
|
1643
|
+
LOperand* value = Use(instr->value());
|
1644
|
+
return DefineAsRegister(new LInteger32ToDouble(value));
|
1645
|
+
}
|
1646
|
+
}
|
1647
|
+
UNREACHABLE();
|
1648
|
+
return NULL;
|
1649
|
+
}
|
1650
|
+
|
1651
|
+
|
1652
|
+
LInstruction* LChunkBuilder::DoCheckNonSmi(HCheckNonSmi* instr) {
|
1653
|
+
LOperand* value = UseRegisterAtStart(instr->value());
|
1654
|
+
return AssignEnvironment(new LCheckSmi(value, eq));
|
1655
|
+
}
|
1656
|
+
|
1657
|
+
|
1658
|
+
LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) {
|
1659
|
+
LOperand* value = UseRegisterAtStart(instr->value());
|
1660
|
+
LInstruction* result = new LCheckInstanceType(value);
|
1661
|
+
return AssignEnvironment(result);
|
1662
|
+
}
|
1663
|
+
|
1664
|
+
|
1665
|
+
LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) {
|
1666
|
+
LOperand* temp1 = TempRegister();
|
1667
|
+
LOperand* temp2 = TempRegister();
|
1668
|
+
LInstruction* result = new LCheckPrototypeMaps(temp1, temp2);
|
1669
|
+
return AssignEnvironment(result);
|
1670
|
+
}
|
1671
|
+
|
1672
|
+
|
1673
|
+
LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) {
|
1674
|
+
LOperand* value = UseRegisterAtStart(instr->value());
|
1675
|
+
return AssignEnvironment(new LCheckSmi(value, ne));
|
1676
|
+
}
|
1677
|
+
|
1678
|
+
|
1679
|
+
LInstruction* LChunkBuilder::DoCheckFunction(HCheckFunction* instr) {
|
1680
|
+
LOperand* value = UseRegisterAtStart(instr->value());
|
1681
|
+
return AssignEnvironment(new LCheckFunction(value));
|
1682
|
+
}
|
1683
|
+
|
1684
|
+
|
1685
|
+
LInstruction* LChunkBuilder::DoCheckMap(HCheckMap* instr) {
|
1686
|
+
LOperand* value = UseRegisterAtStart(instr->value());
|
1687
|
+
LInstruction* result = new LCheckMap(value);
|
1688
|
+
return AssignEnvironment(result);
|
1689
|
+
}
|
1690
|
+
|
1691
|
+
|
1692
|
+
LInstruction* LChunkBuilder::DoReturn(HReturn* instr) {
|
1693
|
+
return new LReturn(UseFixed(instr->value(), r0));
|
1694
|
+
}
|
1695
|
+
|
1696
|
+
|
1697
|
+
LInstruction* LChunkBuilder::DoConstant(HConstant* instr) {
|
1698
|
+
Representation r = instr->representation();
|
1699
|
+
if (r.IsInteger32()) {
|
1700
|
+
return DefineAsRegister(new LConstantI);
|
1701
|
+
} else if (r.IsDouble()) {
|
1702
|
+
return DefineAsRegister(new LConstantD);
|
1703
|
+
} else if (r.IsTagged()) {
|
1704
|
+
return DefineAsRegister(new LConstantT);
|
1705
|
+
} else {
|
1706
|
+
UNREACHABLE();
|
1707
|
+
return NULL;
|
1708
|
+
}
|
1709
|
+
}
|
1710
|
+
|
1711
|
+
|
1712
|
+
LInstruction* LChunkBuilder::DoLoadGlobal(HLoadGlobal* instr) {
|
1713
|
+
LLoadGlobal* result = new LLoadGlobal();
|
1714
|
+
return instr->check_hole_value()
|
1715
|
+
? AssignEnvironment(DefineAsRegister(result))
|
1716
|
+
: DefineAsRegister(result);
|
1717
|
+
}
|
1718
|
+
|
1719
|
+
|
1720
|
+
LInstruction* LChunkBuilder::DoStoreGlobal(HStoreGlobal* instr) {
|
1721
|
+
if (instr->check_hole_value()) {
|
1722
|
+
LOperand* temp = TempRegister();
|
1723
|
+
LOperand* value = UseRegister(instr->value());
|
1724
|
+
return AssignEnvironment(new LStoreGlobal(value, temp));
|
1725
|
+
} else {
|
1726
|
+
LOperand* value = UseRegisterAtStart(instr->value());
|
1727
|
+
return new LStoreGlobal(value, NULL);
|
1728
|
+
}
|
1729
|
+
}
|
1730
|
+
|
1731
|
+
|
1732
|
+
LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) {
|
1733
|
+
LOperand* context = UseRegisterAtStart(instr->value());
|
1734
|
+
return DefineAsRegister(new LLoadContextSlot(context));
|
1735
|
+
}
|
1736
|
+
|
1737
|
+
|
1738
|
+
LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) {
|
1739
|
+
LOperand* context;
|
1740
|
+
LOperand* value;
|
1741
|
+
if (instr->NeedsWriteBarrier()) {
|
1742
|
+
context = UseTempRegister(instr->context());
|
1743
|
+
value = UseTempRegister(instr->value());
|
1744
|
+
} else {
|
1745
|
+
context = UseRegister(instr->context());
|
1746
|
+
value = UseRegister(instr->value());
|
1747
|
+
}
|
1748
|
+
return new LStoreContextSlot(context, value);
|
1749
|
+
}
|
1750
|
+
|
1751
|
+
|
1752
|
+
LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
|
1753
|
+
return DefineAsRegister(
|
1754
|
+
new LLoadNamedField(UseRegisterAtStart(instr->object())));
|
1755
|
+
}
|
1756
|
+
|
1757
|
+
|
1758
|
+
LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
|
1759
|
+
LOperand* object = UseFixed(instr->object(), r0);
|
1760
|
+
LInstruction* result = DefineFixed(new LLoadNamedGeneric(object), r0);
|
1761
|
+
return MarkAsCall(result, instr);
|
1762
|
+
}
|
1763
|
+
|
1764
|
+
|
1765
|
+
LInstruction* LChunkBuilder::DoLoadFunctionPrototype(
|
1766
|
+
HLoadFunctionPrototype* instr) {
|
1767
|
+
return AssignEnvironment(DefineAsRegister(
|
1768
|
+
new LLoadFunctionPrototype(UseRegister(instr->function()))));
|
1769
|
+
}
|
1770
|
+
|
1771
|
+
|
1772
|
+
LInstruction* LChunkBuilder::DoLoadElements(HLoadElements* instr) {
|
1773
|
+
LOperand* input = UseRegisterAtStart(instr->value());
|
1774
|
+
return DefineAsRegister(new LLoadElements(input));
|
1775
|
+
}
|
1776
|
+
|
1777
|
+
|
1778
|
+
LInstruction* LChunkBuilder::DoLoadPixelArrayExternalPointer(
|
1779
|
+
HLoadPixelArrayExternalPointer* instr) {
|
1780
|
+
LOperand* input = UseRegisterAtStart(instr->value());
|
1781
|
+
return DefineAsRegister(new LLoadPixelArrayExternalPointer(input));
|
1782
|
+
}
|
1783
|
+
|
1784
|
+
|
1785
|
+
LInstruction* LChunkBuilder::DoLoadKeyedFastElement(
|
1786
|
+
HLoadKeyedFastElement* instr) {
|
1787
|
+
ASSERT(instr->representation().IsTagged());
|
1788
|
+
ASSERT(instr->key()->representation().IsInteger32());
|
1789
|
+
LOperand* obj = UseRegisterAtStart(instr->object());
|
1790
|
+
LOperand* key = UseRegisterAtStart(instr->key());
|
1791
|
+
LLoadKeyedFastElement* result = new LLoadKeyedFastElement(obj, key);
|
1792
|
+
return AssignEnvironment(DefineSameAsFirst(result));
|
1793
|
+
}
|
1794
|
+
|
1795
|
+
|
1796
|
+
LInstruction* LChunkBuilder::DoLoadPixelArrayElement(
|
1797
|
+
HLoadPixelArrayElement* instr) {
|
1798
|
+
ASSERT(instr->representation().IsInteger32());
|
1799
|
+
ASSERT(instr->key()->representation().IsInteger32());
|
1800
|
+
LOperand* external_pointer =
|
1801
|
+
UseRegisterAtStart(instr->external_pointer());
|
1802
|
+
LOperand* key = UseRegisterAtStart(instr->key());
|
1803
|
+
LLoadPixelArrayElement* result =
|
1804
|
+
new LLoadPixelArrayElement(external_pointer, key);
|
1805
|
+
return DefineAsRegister(result);
|
1806
|
+
}
|
1807
|
+
|
1808
|
+
|
1809
|
+
LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
|
1810
|
+
LOperand* object = UseFixed(instr->object(), r1);
|
1811
|
+
LOperand* key = UseFixed(instr->key(), r0);
|
1812
|
+
|
1813
|
+
LInstruction* result =
|
1814
|
+
DefineFixed(new LLoadKeyedGeneric(object, key), r0);
|
1815
|
+
return MarkAsCall(result, instr);
|
1816
|
+
}
|
1817
|
+
|
1818
|
+
|
1819
|
+
LInstruction* LChunkBuilder::DoStoreKeyedFastElement(
|
1820
|
+
HStoreKeyedFastElement* instr) {
|
1821
|
+
bool needs_write_barrier = instr->NeedsWriteBarrier();
|
1822
|
+
ASSERT(instr->value()->representation().IsTagged());
|
1823
|
+
ASSERT(instr->object()->representation().IsTagged());
|
1824
|
+
ASSERT(instr->key()->representation().IsInteger32());
|
1825
|
+
|
1826
|
+
LOperand* obj = UseTempRegister(instr->object());
|
1827
|
+
LOperand* val = needs_write_barrier
|
1828
|
+
? UseTempRegister(instr->value())
|
1829
|
+
: UseRegisterAtStart(instr->value());
|
1830
|
+
LOperand* key = needs_write_barrier
|
1831
|
+
? UseTempRegister(instr->key())
|
1832
|
+
: UseRegisterOrConstantAtStart(instr->key());
|
1833
|
+
|
1834
|
+
return AssignEnvironment(new LStoreKeyedFastElement(obj, key, val));
|
1835
|
+
}
|
1836
|
+
|
1837
|
+
|
1838
|
+
LInstruction* LChunkBuilder::DoStorePixelArrayElement(
|
1839
|
+
HStorePixelArrayElement* instr) {
|
1840
|
+
Abort("DoStorePixelArrayElement not implemented");
|
1841
|
+
return NULL;
|
1842
|
+
}
|
1843
|
+
|
1844
|
+
|
1845
|
+
LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
|
1846
|
+
LOperand* obj = UseFixed(instr->object(), r2);
|
1847
|
+
LOperand* key = UseFixed(instr->key(), r1);
|
1848
|
+
LOperand* val = UseFixed(instr->value(), r0);
|
1849
|
+
|
1850
|
+
ASSERT(instr->object()->representation().IsTagged());
|
1851
|
+
ASSERT(instr->key()->representation().IsTagged());
|
1852
|
+
ASSERT(instr->value()->representation().IsTagged());
|
1853
|
+
|
1854
|
+
return MarkAsCall(new LStoreKeyedGeneric(obj, key, val), instr);
|
1855
|
+
}
|
1856
|
+
|
1857
|
+
|
1858
|
+
LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
|
1859
|
+
bool needs_write_barrier = instr->NeedsWriteBarrier();
|
1860
|
+
|
1861
|
+
LOperand* obj = needs_write_barrier
|
1862
|
+
? UseTempRegister(instr->object())
|
1863
|
+
: UseRegisterAtStart(instr->object());
|
1864
|
+
|
1865
|
+
LOperand* val = needs_write_barrier
|
1866
|
+
? UseTempRegister(instr->value())
|
1867
|
+
: UseRegister(instr->value());
|
1868
|
+
|
1869
|
+
return new LStoreNamedField(obj, val);
|
1870
|
+
}
|
1871
|
+
|
1872
|
+
|
1873
|
+
LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
|
1874
|
+
LOperand* obj = UseFixed(instr->object(), r1);
|
1875
|
+
LOperand* val = UseFixed(instr->value(), r0);
|
1876
|
+
|
1877
|
+
LInstruction* result = new LStoreNamedGeneric(obj, val);
|
1878
|
+
return MarkAsCall(result, instr);
|
1879
|
+
}
|
1880
|
+
|
1881
|
+
|
1882
|
+
LInstruction* LChunkBuilder::DoStringCharCodeAt(HStringCharCodeAt* instr) {
|
1883
|
+
LOperand* string = UseRegister(instr->string());
|
1884
|
+
LOperand* index = UseRegisterOrConstant(instr->index());
|
1885
|
+
LStringCharCodeAt* result = new LStringCharCodeAt(string, index);
|
1886
|
+
return AssignEnvironment(AssignPointerMap(DefineAsRegister(result)));
|
1887
|
+
}
|
1888
|
+
|
1889
|
+
|
1890
|
+
LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) {
|
1891
|
+
LOperand* string = UseRegisterAtStart(instr->value());
|
1892
|
+
return DefineAsRegister(new LStringLength(string));
|
1893
|
+
}
|
1894
|
+
|
1895
|
+
|
1896
|
+
LInstruction* LChunkBuilder::DoArrayLiteral(HArrayLiteral* instr) {
|
1897
|
+
return MarkAsCall(DefineFixed(new LArrayLiteral, r0), instr);
|
1898
|
+
}
|
1899
|
+
|
1900
|
+
|
1901
|
+
LInstruction* LChunkBuilder::DoObjectLiteral(HObjectLiteral* instr) {
|
1902
|
+
return MarkAsCall(DefineFixed(new LObjectLiteral, r0), instr);
|
1903
|
+
}
|
1904
|
+
|
1905
|
+
|
1906
|
+
LInstruction* LChunkBuilder::DoRegExpLiteral(HRegExpLiteral* instr) {
|
1907
|
+
return MarkAsCall(DefineFixed(new LRegExpLiteral, r0), instr);
|
1908
|
+
}
|
1909
|
+
|
1910
|
+
|
1911
|
+
LInstruction* LChunkBuilder::DoFunctionLiteral(HFunctionLiteral* instr) {
|
1912
|
+
return MarkAsCall(DefineFixed(new LFunctionLiteral, r0), instr);
|
1913
|
+
}
|
1914
|
+
|
1915
|
+
|
1916
|
+
LInstruction* LChunkBuilder::DoDeleteProperty(HDeleteProperty* instr) {
|
1917
|
+
LOperand* object = UseFixed(instr->object(), r0);
|
1918
|
+
LOperand* key = UseFixed(instr->key(), r1);
|
1919
|
+
LDeleteProperty* result = new LDeleteProperty(object, key);
|
1920
|
+
return MarkAsCall(DefineFixed(result, r0), instr);
|
1921
|
+
}
|
1922
|
+
|
1923
|
+
|
1924
|
+
LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) {
|
1925
|
+
allocator_->MarkAsOsrEntry();
|
1926
|
+
current_block_->last_environment()->set_ast_id(instr->ast_id());
|
1927
|
+
return AssignEnvironment(new LOsrEntry);
|
1928
|
+
}
|
1929
|
+
|
1930
|
+
|
1931
|
+
LInstruction* LChunkBuilder::DoParameter(HParameter* instr) {
|
1932
|
+
int spill_index = chunk()->GetParameterStackSlot(instr->index());
|
1933
|
+
return DefineAsSpilled(new LParameter, spill_index);
|
1934
|
+
}
|
1935
|
+
|
1936
|
+
|
1937
|
+
LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) {
|
1938
|
+
int spill_index = chunk()->GetNextSpillIndex(false); // Not double-width.
|
1939
|
+
return DefineAsSpilled(new LUnknownOSRValue, spill_index);
|
1940
|
+
}
|
1941
|
+
|
1942
|
+
|
1943
|
+
LInstruction* LChunkBuilder::DoCallStub(HCallStub* instr) {
|
1944
|
+
argument_count_ -= instr->argument_count();
|
1945
|
+
return MarkAsCall(DefineFixed(new LCallStub, r0), instr);
|
1946
|
+
}
|
1947
|
+
|
1948
|
+
|
1949
|
+
LInstruction* LChunkBuilder::DoArgumentsObject(HArgumentsObject* instr) {
|
1950
|
+
// There are no real uses of the arguments object.
|
1951
|
+
// arguments.length and element access are supported directly on
|
1952
|
+
// stack arguments, and any real arguments object use causes a bailout.
|
1953
|
+
// So this value is never used.
|
1954
|
+
return NULL;
|
1955
|
+
}
|
1956
|
+
|
1957
|
+
|
1958
|
+
LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) {
|
1959
|
+
LOperand* arguments = UseRegister(instr->arguments());
|
1960
|
+
LOperand* length = UseTempRegister(instr->length());
|
1961
|
+
LOperand* index = UseRegister(instr->index());
|
1962
|
+
LAccessArgumentsAt* result = new LAccessArgumentsAt(arguments, length, index);
|
1963
|
+
return AssignEnvironment(DefineAsRegister(result));
|
1964
|
+
}
|
1965
|
+
|
1966
|
+
|
1967
|
+
LInstruction* LChunkBuilder::DoTypeof(HTypeof* instr) {
|
1968
|
+
LTypeof* result = new LTypeof(UseFixed(instr->value(), r0));
|
1969
|
+
return MarkAsCall(DefineFixed(result, r0), instr);
|
1970
|
+
}
|
1971
|
+
|
1972
|
+
|
1973
|
+
LInstruction* LChunkBuilder::DoTypeofIs(HTypeofIs* instr) {
|
1974
|
+
return DefineSameAsFirst(new LTypeofIs(UseRegister(instr->value())));
|
1975
|
+
}
|
1976
|
+
|
1977
|
+
|
1978
|
+
LInstruction* LChunkBuilder::DoIsConstructCall(HIsConstructCall* instr) {
|
1979
|
+
return DefineAsRegister(new LIsConstructCall());
|
1980
|
+
}
|
1981
|
+
|
1982
|
+
|
1983
|
+
LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) {
|
1984
|
+
HEnvironment* env = current_block_->last_environment();
|
1985
|
+
ASSERT(env != NULL);
|
1986
|
+
|
1987
|
+
env->set_ast_id(instr->ast_id());
|
1988
|
+
|
1989
|
+
env->Drop(instr->pop_count());
|
1990
|
+
for (int i = 0; i < instr->values()->length(); ++i) {
|
1991
|
+
HValue* value = instr->values()->at(i);
|
1992
|
+
if (instr->HasAssignedIndexAt(i)) {
|
1993
|
+
env->Bind(instr->GetAssignedIndexAt(i), value);
|
1994
|
+
} else {
|
1995
|
+
env->Push(value);
|
1996
|
+
}
|
1997
|
+
}
|
1998
|
+
|
1999
|
+
ASSERT(env->length() == instr->environment_length());
|
2000
|
+
|
2001
|
+
// If there is an instruction pending deoptimization environment create a
|
2002
|
+
// lazy bailout instruction to capture the environment.
|
2003
|
+
if (pending_deoptimization_ast_id_ == instr->ast_id()) {
|
2004
|
+
LInstruction* result = new LLazyBailout;
|
2005
|
+
result = AssignEnvironment(result);
|
2006
|
+
instruction_pending_deoptimization_environment_->
|
2007
|
+
set_deoptimization_environment(result->environment());
|
2008
|
+
ClearInstructionPendingDeoptimizationEnvironment();
|
2009
|
+
return result;
|
2010
|
+
}
|
2011
|
+
|
2012
|
+
return NULL;
|
2013
|
+
}
|
2014
|
+
|
2015
|
+
|
2016
|
+
LInstruction* LChunkBuilder::DoStackCheck(HStackCheck* instr) {
|
2017
|
+
return MarkAsCall(new LStackCheck, instr);
|
2018
|
+
}
|
2019
|
+
|
2020
|
+
|
2021
|
+
LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) {
|
2022
|
+
HEnvironment* outer = current_block_->last_environment();
|
2023
|
+
HConstant* undefined = graph()->GetConstantUndefined();
|
2024
|
+
HEnvironment* inner = outer->CopyForInlining(instr->closure(),
|
2025
|
+
instr->function(),
|
2026
|
+
false,
|
2027
|
+
undefined);
|
2028
|
+
current_block_->UpdateEnvironment(inner);
|
2029
|
+
chunk_->AddInlinedClosure(instr->closure());
|
2030
|
+
return NULL;
|
2031
|
+
}
|
2032
|
+
|
2033
|
+
|
2034
|
+
LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
|
2035
|
+
HEnvironment* outer = current_block_->last_environment()->outer();
|
2036
|
+
current_block_->UpdateEnvironment(outer);
|
2037
|
+
return NULL;
|
2038
|
+
}
|
2039
|
+
|
2040
|
+
|
2041
|
+
} } // namespace v8::internal
|