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