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,1852 @@
|
|
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_X64_MACRO_ASSEMBLER_X64_H_
|
29
|
+
#define V8_X64_MACRO_ASSEMBLER_X64_H_
|
30
|
+
|
31
|
+
#include "assembler.h"
|
32
|
+
|
33
|
+
namespace v8 {
|
34
|
+
namespace internal {
|
35
|
+
|
36
|
+
// Flags used for the AllocateInNewSpace functions.
|
37
|
+
enum AllocationFlags {
|
38
|
+
// No special flags.
|
39
|
+
NO_ALLOCATION_FLAGS = 0,
|
40
|
+
// Return the pointer to the allocated already tagged as a heap object.
|
41
|
+
TAG_OBJECT = 1 << 0,
|
42
|
+
// The content of the result register already contains the allocation top in
|
43
|
+
// new space.
|
44
|
+
RESULT_CONTAINS_TOP = 1 << 1
|
45
|
+
};
|
46
|
+
|
47
|
+
// Default scratch register used by MacroAssembler (and other code that needs
|
48
|
+
// a spare register). The register isn't callee save, and not used by the
|
49
|
+
// function calling convention.
|
50
|
+
static const Register kScratchRegister = { 10 }; // r10.
|
51
|
+
static const Register kSmiConstantRegister = { 15 }; // r15 (callee save).
|
52
|
+
static const Register kRootRegister = { 13 }; // r13 (callee save).
|
53
|
+
// Value of smi in kSmiConstantRegister.
|
54
|
+
static const int kSmiConstantRegisterValue = 1;
|
55
|
+
|
56
|
+
// Convenience for platform-independent signatures.
|
57
|
+
typedef Operand MemOperand;
|
58
|
+
|
59
|
+
// Forward declaration.
|
60
|
+
class JumpTarget;
|
61
|
+
class PostCallGenerator;
|
62
|
+
|
63
|
+
struct SmiIndex {
|
64
|
+
SmiIndex(Register index_register, ScaleFactor scale)
|
65
|
+
: reg(index_register),
|
66
|
+
scale(scale) {}
|
67
|
+
Register reg;
|
68
|
+
ScaleFactor scale;
|
69
|
+
};
|
70
|
+
|
71
|
+
// MacroAssembler implements a collection of frequently used macros.
|
72
|
+
class MacroAssembler: public Assembler {
|
73
|
+
public:
|
74
|
+
MacroAssembler(void* buffer, int size);
|
75
|
+
|
76
|
+
void LoadRoot(Register destination, Heap::RootListIndex index);
|
77
|
+
void CompareRoot(Register with, Heap::RootListIndex index);
|
78
|
+
void CompareRoot(const Operand& with, Heap::RootListIndex index);
|
79
|
+
void PushRoot(Heap::RootListIndex index);
|
80
|
+
void StoreRoot(Register source, Heap::RootListIndex index);
|
81
|
+
|
82
|
+
// ---------------------------------------------------------------------------
|
83
|
+
// GC Support
|
84
|
+
|
85
|
+
// For page containing |object| mark region covering |addr| dirty.
|
86
|
+
// RecordWriteHelper only works if the object is not in new
|
87
|
+
// space.
|
88
|
+
void RecordWriteHelper(Register object,
|
89
|
+
Register addr,
|
90
|
+
Register scratch);
|
91
|
+
|
92
|
+
// Check if object is in new space. The condition cc can be equal or
|
93
|
+
// not_equal. If it is equal a jump will be done if the object is on new
|
94
|
+
// space. The register scratch can be object itself, but it will be clobbered.
|
95
|
+
template <typename LabelType>
|
96
|
+
void InNewSpace(Register object,
|
97
|
+
Register scratch,
|
98
|
+
Condition cc,
|
99
|
+
LabelType* branch);
|
100
|
+
|
101
|
+
// For page containing |object| mark region covering [object+offset]
|
102
|
+
// dirty. |object| is the object being stored into, |value| is the
|
103
|
+
// object being stored. If |offset| is zero, then the |scratch|
|
104
|
+
// register contains the array index into the elements array
|
105
|
+
// represented as an untagged 32-bit integer. All registers are
|
106
|
+
// clobbered by the operation. RecordWrite filters out smis so it
|
107
|
+
// does not update the write barrier if the value is a smi.
|
108
|
+
void RecordWrite(Register object,
|
109
|
+
int offset,
|
110
|
+
Register value,
|
111
|
+
Register scratch);
|
112
|
+
|
113
|
+
// For page containing |object| mark region covering [address]
|
114
|
+
// dirty. |object| is the object being stored into, |value| is the
|
115
|
+
// object being stored. All registers are clobbered by the
|
116
|
+
// operation. RecordWrite filters out smis so it does not update
|
117
|
+
// the write barrier if the value is a smi.
|
118
|
+
void RecordWrite(Register object,
|
119
|
+
Register address,
|
120
|
+
Register value);
|
121
|
+
|
122
|
+
// For page containing |object| mark region covering [object+offset] dirty.
|
123
|
+
// The value is known to not be a smi.
|
124
|
+
// object is the object being stored into, value is the object being stored.
|
125
|
+
// If offset is zero, then the scratch register contains the array index into
|
126
|
+
// the elements array represented as an untagged 32-bit integer.
|
127
|
+
// All registers are clobbered by the operation.
|
128
|
+
void RecordWriteNonSmi(Register object,
|
129
|
+
int offset,
|
130
|
+
Register value,
|
131
|
+
Register scratch);
|
132
|
+
|
133
|
+
#ifdef ENABLE_DEBUGGER_SUPPORT
|
134
|
+
// ---------------------------------------------------------------------------
|
135
|
+
// Debugger Support
|
136
|
+
|
137
|
+
void DebugBreak();
|
138
|
+
#endif
|
139
|
+
|
140
|
+
// ---------------------------------------------------------------------------
|
141
|
+
// Activation frames
|
142
|
+
|
143
|
+
void EnterInternalFrame() { EnterFrame(StackFrame::INTERNAL); }
|
144
|
+
void LeaveInternalFrame() { LeaveFrame(StackFrame::INTERNAL); }
|
145
|
+
|
146
|
+
void EnterConstructFrame() { EnterFrame(StackFrame::CONSTRUCT); }
|
147
|
+
void LeaveConstructFrame() { LeaveFrame(StackFrame::CONSTRUCT); }
|
148
|
+
|
149
|
+
// Enter specific kind of exit frame; either in normal or
|
150
|
+
// debug mode. Expects the number of arguments in register rax and
|
151
|
+
// sets up the number of arguments in register rdi and the pointer
|
152
|
+
// to the first argument in register rsi.
|
153
|
+
//
|
154
|
+
// Allocates arg_stack_space * kPointerSize memory (not GCed) on the stack
|
155
|
+
// accessible via StackSpaceOperand.
|
156
|
+
void EnterExitFrame(int arg_stack_space = 0, bool save_doubles = false);
|
157
|
+
|
158
|
+
// Enter specific kind of exit frame. Allocates arg_stack_space * kPointerSize
|
159
|
+
// memory (not GCed) on the stack accessible via StackSpaceOperand.
|
160
|
+
void EnterApiExitFrame(int arg_stack_space);
|
161
|
+
|
162
|
+
// Leave the current exit frame. Expects/provides the return value in
|
163
|
+
// register rax:rdx (untouched) and the pointer to the first
|
164
|
+
// argument in register rsi.
|
165
|
+
void LeaveExitFrame(bool save_doubles = false);
|
166
|
+
|
167
|
+
// Leave the current exit frame. Expects/provides the return value in
|
168
|
+
// register rax (untouched).
|
169
|
+
void LeaveApiExitFrame();
|
170
|
+
|
171
|
+
// Push and pop the registers that can hold pointers.
|
172
|
+
void PushSafepointRegisters() { Pushad(); }
|
173
|
+
void PopSafepointRegisters() { Popad(); }
|
174
|
+
// Store the value in register src in the safepoint register stack
|
175
|
+
// slot for register dst.
|
176
|
+
void StoreToSafepointRegisterSlot(Register dst, Register src);
|
177
|
+
void LoadFromSafepointRegisterSlot(Register dst, Register src);
|
178
|
+
|
179
|
+
// ---------------------------------------------------------------------------
|
180
|
+
// JavaScript invokes
|
181
|
+
|
182
|
+
// Invoke the JavaScript function code by either calling or jumping.
|
183
|
+
void InvokeCode(Register code,
|
184
|
+
const ParameterCount& expected,
|
185
|
+
const ParameterCount& actual,
|
186
|
+
InvokeFlag flag,
|
187
|
+
PostCallGenerator* post_call_generator = NULL);
|
188
|
+
|
189
|
+
void InvokeCode(Handle<Code> code,
|
190
|
+
const ParameterCount& expected,
|
191
|
+
const ParameterCount& actual,
|
192
|
+
RelocInfo::Mode rmode,
|
193
|
+
InvokeFlag flag,
|
194
|
+
PostCallGenerator* post_call_generator = NULL);
|
195
|
+
|
196
|
+
// Invoke the JavaScript function in the given register. Changes the
|
197
|
+
// current context to the context in the function before invoking.
|
198
|
+
void InvokeFunction(Register function,
|
199
|
+
const ParameterCount& actual,
|
200
|
+
InvokeFlag flag,
|
201
|
+
PostCallGenerator* post_call_generator = NULL);
|
202
|
+
|
203
|
+
void InvokeFunction(JSFunction* function,
|
204
|
+
const ParameterCount& actual,
|
205
|
+
InvokeFlag flag,
|
206
|
+
PostCallGenerator* post_call_generator = NULL);
|
207
|
+
|
208
|
+
// Invoke specified builtin JavaScript function. Adds an entry to
|
209
|
+
// the unresolved list if the name does not resolve.
|
210
|
+
void InvokeBuiltin(Builtins::JavaScript id,
|
211
|
+
InvokeFlag flag,
|
212
|
+
PostCallGenerator* post_call_generator = NULL);
|
213
|
+
|
214
|
+
// Store the function for the given builtin in the target register.
|
215
|
+
void GetBuiltinFunction(Register target, Builtins::JavaScript id);
|
216
|
+
|
217
|
+
// Store the code object for the given builtin in the target register.
|
218
|
+
void GetBuiltinEntry(Register target, Builtins::JavaScript id);
|
219
|
+
|
220
|
+
|
221
|
+
// ---------------------------------------------------------------------------
|
222
|
+
// Smi tagging, untagging and operations on tagged smis.
|
223
|
+
|
224
|
+
void InitializeSmiConstantRegister() {
|
225
|
+
movq(kSmiConstantRegister,
|
226
|
+
reinterpret_cast<uint64_t>(Smi::FromInt(kSmiConstantRegisterValue)),
|
227
|
+
RelocInfo::NONE);
|
228
|
+
}
|
229
|
+
|
230
|
+
// Conversions between tagged smi values and non-tagged integer values.
|
231
|
+
|
232
|
+
// Tag an integer value. The result must be known to be a valid smi value.
|
233
|
+
// Only uses the low 32 bits of the src register. Sets the N and Z flags
|
234
|
+
// based on the value of the resulting smi.
|
235
|
+
void Integer32ToSmi(Register dst, Register src);
|
236
|
+
|
237
|
+
// Stores an integer32 value into a memory field that already holds a smi.
|
238
|
+
void Integer32ToSmiField(const Operand& dst, Register src);
|
239
|
+
|
240
|
+
// Adds constant to src and tags the result as a smi.
|
241
|
+
// Result must be a valid smi.
|
242
|
+
void Integer64PlusConstantToSmi(Register dst, Register src, int constant);
|
243
|
+
|
244
|
+
// Convert smi to 32-bit integer. I.e., not sign extended into
|
245
|
+
// high 32 bits of destination.
|
246
|
+
void SmiToInteger32(Register dst, Register src);
|
247
|
+
void SmiToInteger32(Register dst, const Operand& src);
|
248
|
+
|
249
|
+
// Convert smi to 64-bit integer (sign extended if necessary).
|
250
|
+
void SmiToInteger64(Register dst, Register src);
|
251
|
+
void SmiToInteger64(Register dst, const Operand& src);
|
252
|
+
|
253
|
+
// Multiply a positive smi's integer value by a power of two.
|
254
|
+
// Provides result as 64-bit integer value.
|
255
|
+
void PositiveSmiTimesPowerOfTwoToInteger64(Register dst,
|
256
|
+
Register src,
|
257
|
+
int power);
|
258
|
+
|
259
|
+
// Divide a positive smi's integer value by a power of two.
|
260
|
+
// Provides result as 32-bit integer value.
|
261
|
+
void PositiveSmiDivPowerOfTwoToInteger32(Register dst,
|
262
|
+
Register src,
|
263
|
+
int power);
|
264
|
+
|
265
|
+
|
266
|
+
// Simple comparison of smis.
|
267
|
+
void SmiCompare(Register dst, Register src);
|
268
|
+
void SmiCompare(Register dst, Smi* src);
|
269
|
+
void SmiCompare(Register dst, const Operand& src);
|
270
|
+
void SmiCompare(const Operand& dst, Register src);
|
271
|
+
void SmiCompare(const Operand& dst, Smi* src);
|
272
|
+
// Compare the int32 in src register to the value of the smi stored at dst.
|
273
|
+
void SmiCompareInteger32(const Operand& dst, Register src);
|
274
|
+
// Sets sign and zero flags depending on value of smi in register.
|
275
|
+
void SmiTest(Register src);
|
276
|
+
|
277
|
+
// Functions performing a check on a known or potential smi. Returns
|
278
|
+
// a condition that is satisfied if the check is successful.
|
279
|
+
|
280
|
+
// Is the value a tagged smi.
|
281
|
+
Condition CheckSmi(Register src);
|
282
|
+
Condition CheckSmi(const Operand& src);
|
283
|
+
|
284
|
+
// Is the value a non-negative tagged smi.
|
285
|
+
Condition CheckNonNegativeSmi(Register src);
|
286
|
+
|
287
|
+
// Are both values tagged smis.
|
288
|
+
Condition CheckBothSmi(Register first, Register second);
|
289
|
+
|
290
|
+
// Are both values non-negative tagged smis.
|
291
|
+
Condition CheckBothNonNegativeSmi(Register first, Register second);
|
292
|
+
|
293
|
+
// Are either value a tagged smi.
|
294
|
+
Condition CheckEitherSmi(Register first,
|
295
|
+
Register second,
|
296
|
+
Register scratch = kScratchRegister);
|
297
|
+
|
298
|
+
// Is the value the minimum smi value (since we are using
|
299
|
+
// two's complement numbers, negating the value is known to yield
|
300
|
+
// a non-smi value).
|
301
|
+
Condition CheckIsMinSmi(Register src);
|
302
|
+
|
303
|
+
// Checks whether an 32-bit integer value is a valid for conversion
|
304
|
+
// to a smi.
|
305
|
+
Condition CheckInteger32ValidSmiValue(Register src);
|
306
|
+
|
307
|
+
// Checks whether an 32-bit unsigned integer value is a valid for
|
308
|
+
// conversion to a smi.
|
309
|
+
Condition CheckUInteger32ValidSmiValue(Register src);
|
310
|
+
|
311
|
+
// Check whether src is a Smi, and set dst to zero if it is a smi,
|
312
|
+
// and to one if it isn't.
|
313
|
+
void CheckSmiToIndicator(Register dst, Register src);
|
314
|
+
void CheckSmiToIndicator(Register dst, const Operand& src);
|
315
|
+
|
316
|
+
// Test-and-jump functions. Typically combines a check function
|
317
|
+
// above with a conditional jump.
|
318
|
+
|
319
|
+
// Jump if the value cannot be represented by a smi.
|
320
|
+
template <typename LabelType>
|
321
|
+
void JumpIfNotValidSmiValue(Register src, LabelType* on_invalid);
|
322
|
+
|
323
|
+
// Jump if the unsigned integer value cannot be represented by a smi.
|
324
|
+
template <typename LabelType>
|
325
|
+
void JumpIfUIntNotValidSmiValue(Register src, LabelType* on_invalid);
|
326
|
+
|
327
|
+
// Jump to label if the value is a tagged smi.
|
328
|
+
template <typename LabelType>
|
329
|
+
void JumpIfSmi(Register src, LabelType* on_smi);
|
330
|
+
|
331
|
+
// Jump to label if the value is not a tagged smi.
|
332
|
+
template <typename LabelType>
|
333
|
+
void JumpIfNotSmi(Register src, LabelType* on_not_smi);
|
334
|
+
|
335
|
+
// Jump to label if the value is not a non-negative tagged smi.
|
336
|
+
template <typename LabelType>
|
337
|
+
void JumpUnlessNonNegativeSmi(Register src, LabelType* on_not_smi);
|
338
|
+
|
339
|
+
// Jump to label if the value, which must be a tagged smi, has value equal
|
340
|
+
// to the constant.
|
341
|
+
template <typename LabelType>
|
342
|
+
void JumpIfSmiEqualsConstant(Register src,
|
343
|
+
Smi* constant,
|
344
|
+
LabelType* on_equals);
|
345
|
+
|
346
|
+
// Jump if either or both register are not smi values.
|
347
|
+
template <typename LabelType>
|
348
|
+
void JumpIfNotBothSmi(Register src1,
|
349
|
+
Register src2,
|
350
|
+
LabelType* on_not_both_smi);
|
351
|
+
|
352
|
+
// Jump if either or both register are not non-negative smi values.
|
353
|
+
template <typename LabelType>
|
354
|
+
void JumpUnlessBothNonNegativeSmi(Register src1, Register src2,
|
355
|
+
LabelType* on_not_both_smi);
|
356
|
+
|
357
|
+
// Operations on tagged smi values.
|
358
|
+
|
359
|
+
// Smis represent a subset of integers. The subset is always equivalent to
|
360
|
+
// a two's complement interpretation of a fixed number of bits.
|
361
|
+
|
362
|
+
// Optimistically adds an integer constant to a supposed smi.
|
363
|
+
// If the src is not a smi, or the result is not a smi, jump to
|
364
|
+
// the label.
|
365
|
+
template <typename LabelType>
|
366
|
+
void SmiTryAddConstant(Register dst,
|
367
|
+
Register src,
|
368
|
+
Smi* constant,
|
369
|
+
LabelType* on_not_smi_result);
|
370
|
+
|
371
|
+
// Add an integer constant to a tagged smi, giving a tagged smi as result.
|
372
|
+
// No overflow testing on the result is done.
|
373
|
+
void SmiAddConstant(Register dst, Register src, Smi* constant);
|
374
|
+
|
375
|
+
// Add an integer constant to a tagged smi, giving a tagged smi as result.
|
376
|
+
// No overflow testing on the result is done.
|
377
|
+
void SmiAddConstant(const Operand& dst, Smi* constant);
|
378
|
+
|
379
|
+
// Add an integer constant to a tagged smi, giving a tagged smi as result,
|
380
|
+
// or jumping to a label if the result cannot be represented by a smi.
|
381
|
+
template <typename LabelType>
|
382
|
+
void SmiAddConstant(Register dst,
|
383
|
+
Register src,
|
384
|
+
Smi* constant,
|
385
|
+
LabelType* on_not_smi_result);
|
386
|
+
|
387
|
+
// Subtract an integer constant from a tagged smi, giving a tagged smi as
|
388
|
+
// result. No testing on the result is done. Sets the N and Z flags
|
389
|
+
// based on the value of the resulting integer.
|
390
|
+
void SmiSubConstant(Register dst, Register src, Smi* constant);
|
391
|
+
|
392
|
+
// Subtract an integer constant from a tagged smi, giving a tagged smi as
|
393
|
+
// result, or jumping to a label if the result cannot be represented by a smi.
|
394
|
+
template <typename LabelType>
|
395
|
+
void SmiSubConstant(Register dst,
|
396
|
+
Register src,
|
397
|
+
Smi* constant,
|
398
|
+
LabelType* on_not_smi_result);
|
399
|
+
|
400
|
+
// Negating a smi can give a negative zero or too large positive value.
|
401
|
+
// NOTICE: This operation jumps on success, not failure!
|
402
|
+
template <typename LabelType>
|
403
|
+
void SmiNeg(Register dst,
|
404
|
+
Register src,
|
405
|
+
LabelType* on_smi_result);
|
406
|
+
|
407
|
+
// Adds smi values and return the result as a smi.
|
408
|
+
// If dst is src1, then src1 will be destroyed, even if
|
409
|
+
// the operation is unsuccessful.
|
410
|
+
template <typename LabelType>
|
411
|
+
void SmiAdd(Register dst,
|
412
|
+
Register src1,
|
413
|
+
Register src2,
|
414
|
+
LabelType* on_not_smi_result);
|
415
|
+
|
416
|
+
void SmiAdd(Register dst,
|
417
|
+
Register src1,
|
418
|
+
Register src2);
|
419
|
+
|
420
|
+
// Subtracts smi values and return the result as a smi.
|
421
|
+
// If dst is src1, then src1 will be destroyed, even if
|
422
|
+
// the operation is unsuccessful.
|
423
|
+
template <typename LabelType>
|
424
|
+
void SmiSub(Register dst,
|
425
|
+
Register src1,
|
426
|
+
Register src2,
|
427
|
+
LabelType* on_not_smi_result);
|
428
|
+
|
429
|
+
void SmiSub(Register dst,
|
430
|
+
Register src1,
|
431
|
+
Register src2);
|
432
|
+
|
433
|
+
template <typename LabelType>
|
434
|
+
void SmiSub(Register dst,
|
435
|
+
Register src1,
|
436
|
+
const Operand& src2,
|
437
|
+
LabelType* on_not_smi_result);
|
438
|
+
|
439
|
+
void SmiSub(Register dst,
|
440
|
+
Register src1,
|
441
|
+
const Operand& src2);
|
442
|
+
|
443
|
+
// Multiplies smi values and return the result as a smi,
|
444
|
+
// if possible.
|
445
|
+
// If dst is src1, then src1 will be destroyed, even if
|
446
|
+
// the operation is unsuccessful.
|
447
|
+
template <typename LabelType>
|
448
|
+
void SmiMul(Register dst,
|
449
|
+
Register src1,
|
450
|
+
Register src2,
|
451
|
+
LabelType* on_not_smi_result);
|
452
|
+
|
453
|
+
// Divides one smi by another and returns the quotient.
|
454
|
+
// Clobbers rax and rdx registers.
|
455
|
+
template <typename LabelType>
|
456
|
+
void SmiDiv(Register dst,
|
457
|
+
Register src1,
|
458
|
+
Register src2,
|
459
|
+
LabelType* on_not_smi_result);
|
460
|
+
|
461
|
+
// Divides one smi by another and returns the remainder.
|
462
|
+
// Clobbers rax and rdx registers.
|
463
|
+
template <typename LabelType>
|
464
|
+
void SmiMod(Register dst,
|
465
|
+
Register src1,
|
466
|
+
Register src2,
|
467
|
+
LabelType* on_not_smi_result);
|
468
|
+
|
469
|
+
// Bitwise operations.
|
470
|
+
void SmiNot(Register dst, Register src);
|
471
|
+
void SmiAnd(Register dst, Register src1, Register src2);
|
472
|
+
void SmiOr(Register dst, Register src1, Register src2);
|
473
|
+
void SmiXor(Register dst, Register src1, Register src2);
|
474
|
+
void SmiAndConstant(Register dst, Register src1, Smi* constant);
|
475
|
+
void SmiOrConstant(Register dst, Register src1, Smi* constant);
|
476
|
+
void SmiXorConstant(Register dst, Register src1, Smi* constant);
|
477
|
+
|
478
|
+
void SmiShiftLeftConstant(Register dst,
|
479
|
+
Register src,
|
480
|
+
int shift_value);
|
481
|
+
template <typename LabelType>
|
482
|
+
void SmiShiftLogicalRightConstant(Register dst,
|
483
|
+
Register src,
|
484
|
+
int shift_value,
|
485
|
+
LabelType* on_not_smi_result);
|
486
|
+
void SmiShiftArithmeticRightConstant(Register dst,
|
487
|
+
Register src,
|
488
|
+
int shift_value);
|
489
|
+
|
490
|
+
// Shifts a smi value to the left, and returns the result if that is a smi.
|
491
|
+
// Uses and clobbers rcx, so dst may not be rcx.
|
492
|
+
void SmiShiftLeft(Register dst,
|
493
|
+
Register src1,
|
494
|
+
Register src2);
|
495
|
+
// Shifts a smi value to the right, shifting in zero bits at the top, and
|
496
|
+
// returns the unsigned intepretation of the result if that is a smi.
|
497
|
+
// Uses and clobbers rcx, so dst may not be rcx.
|
498
|
+
template <typename LabelType>
|
499
|
+
void SmiShiftLogicalRight(Register dst,
|
500
|
+
Register src1,
|
501
|
+
Register src2,
|
502
|
+
LabelType* on_not_smi_result);
|
503
|
+
// Shifts a smi value to the right, sign extending the top, and
|
504
|
+
// returns the signed intepretation of the result. That will always
|
505
|
+
// be a valid smi value, since it's numerically smaller than the
|
506
|
+
// original.
|
507
|
+
// Uses and clobbers rcx, so dst may not be rcx.
|
508
|
+
void SmiShiftArithmeticRight(Register dst,
|
509
|
+
Register src1,
|
510
|
+
Register src2);
|
511
|
+
|
512
|
+
// Specialized operations
|
513
|
+
|
514
|
+
// Select the non-smi register of two registers where exactly one is a
|
515
|
+
// smi. If neither are smis, jump to the failure label.
|
516
|
+
template <typename LabelType>
|
517
|
+
void SelectNonSmi(Register dst,
|
518
|
+
Register src1,
|
519
|
+
Register src2,
|
520
|
+
LabelType* on_not_smis);
|
521
|
+
|
522
|
+
// Converts, if necessary, a smi to a combination of number and
|
523
|
+
// multiplier to be used as a scaled index.
|
524
|
+
// The src register contains a *positive* smi value. The shift is the
|
525
|
+
// power of two to multiply the index value by (e.g.
|
526
|
+
// to index by smi-value * kPointerSize, pass the smi and kPointerSizeLog2).
|
527
|
+
// The returned index register may be either src or dst, depending
|
528
|
+
// on what is most efficient. If src and dst are different registers,
|
529
|
+
// src is always unchanged.
|
530
|
+
SmiIndex SmiToIndex(Register dst, Register src, int shift);
|
531
|
+
|
532
|
+
// Converts a positive smi to a negative index.
|
533
|
+
SmiIndex SmiToNegativeIndex(Register dst, Register src, int shift);
|
534
|
+
|
535
|
+
// Basic Smi operations.
|
536
|
+
void Move(Register dst, Smi* source) {
|
537
|
+
LoadSmiConstant(dst, source);
|
538
|
+
}
|
539
|
+
|
540
|
+
void Move(const Operand& dst, Smi* source) {
|
541
|
+
Register constant = GetSmiConstant(source);
|
542
|
+
movq(dst, constant);
|
543
|
+
}
|
544
|
+
|
545
|
+
void Push(Smi* smi);
|
546
|
+
void Test(const Operand& dst, Smi* source);
|
547
|
+
|
548
|
+
// ---------------------------------------------------------------------------
|
549
|
+
// String macros.
|
550
|
+
|
551
|
+
// If object is a string, its map is loaded into object_map.
|
552
|
+
template <typename LabelType>
|
553
|
+
void JumpIfNotString(Register object,
|
554
|
+
Register object_map,
|
555
|
+
LabelType* not_string);
|
556
|
+
|
557
|
+
|
558
|
+
template <typename LabelType>
|
559
|
+
void JumpIfNotBothSequentialAsciiStrings(Register first_object,
|
560
|
+
Register second_object,
|
561
|
+
Register scratch1,
|
562
|
+
Register scratch2,
|
563
|
+
LabelType* on_not_both_flat_ascii);
|
564
|
+
|
565
|
+
// Check whether the instance type represents a flat ascii string. Jump to the
|
566
|
+
// label if not. If the instance type can be scratched specify same register
|
567
|
+
// for both instance type and scratch.
|
568
|
+
template <typename LabelType>
|
569
|
+
void JumpIfInstanceTypeIsNotSequentialAscii(
|
570
|
+
Register instance_type,
|
571
|
+
Register scratch,
|
572
|
+
LabelType *on_not_flat_ascii_string);
|
573
|
+
|
574
|
+
template <typename LabelType>
|
575
|
+
void JumpIfBothInstanceTypesAreNotSequentialAscii(
|
576
|
+
Register first_object_instance_type,
|
577
|
+
Register second_object_instance_type,
|
578
|
+
Register scratch1,
|
579
|
+
Register scratch2,
|
580
|
+
LabelType* on_fail);
|
581
|
+
|
582
|
+
// ---------------------------------------------------------------------------
|
583
|
+
// Macro instructions.
|
584
|
+
|
585
|
+
// Load a register with a long value as efficiently as possible.
|
586
|
+
void Set(Register dst, int64_t x);
|
587
|
+
void Set(const Operand& dst, int64_t x);
|
588
|
+
|
589
|
+
// Move if the registers are not identical.
|
590
|
+
void Move(Register target, Register source);
|
591
|
+
|
592
|
+
// Handle support
|
593
|
+
void Move(Register dst, Handle<Object> source);
|
594
|
+
void Move(const Operand& dst, Handle<Object> source);
|
595
|
+
void Cmp(Register dst, Handle<Object> source);
|
596
|
+
void Cmp(const Operand& dst, Handle<Object> source);
|
597
|
+
void Push(Handle<Object> source);
|
598
|
+
|
599
|
+
// Emit code to discard a non-negative number of pointer-sized elements
|
600
|
+
// from the stack, clobbering only the rsp register.
|
601
|
+
void Drop(int stack_elements);
|
602
|
+
|
603
|
+
void Call(Label* target) { call(target); }
|
604
|
+
|
605
|
+
// Control Flow
|
606
|
+
void Jump(Address destination, RelocInfo::Mode rmode);
|
607
|
+
void Jump(ExternalReference ext);
|
608
|
+
void Jump(Handle<Code> code_object, RelocInfo::Mode rmode);
|
609
|
+
|
610
|
+
void Call(Address destination, RelocInfo::Mode rmode);
|
611
|
+
void Call(ExternalReference ext);
|
612
|
+
void Call(Handle<Code> code_object, RelocInfo::Mode rmode);
|
613
|
+
|
614
|
+
// Emit call to the code we are currently generating.
|
615
|
+
void CallSelf() {
|
616
|
+
Handle<Code> self(reinterpret_cast<Code**>(CodeObject().location()));
|
617
|
+
Call(self, RelocInfo::CODE_TARGET);
|
618
|
+
}
|
619
|
+
|
620
|
+
// Non-x64 instructions.
|
621
|
+
// Push/pop all general purpose registers.
|
622
|
+
// Does not push rsp/rbp nor any of the assembler's special purpose registers
|
623
|
+
// (kScratchRegister, kSmiConstantRegister, kRootRegister).
|
624
|
+
void Pushad();
|
625
|
+
void Popad();
|
626
|
+
// Sets the stack as after performing Popad, without actually loading the
|
627
|
+
// registers.
|
628
|
+
void Dropad();
|
629
|
+
|
630
|
+
// Compare object type for heap object.
|
631
|
+
// Always use unsigned comparisons: above and below, not less and greater.
|
632
|
+
// Incoming register is heap_object and outgoing register is map.
|
633
|
+
// They may be the same register, and may be kScratchRegister.
|
634
|
+
void CmpObjectType(Register heap_object, InstanceType type, Register map);
|
635
|
+
|
636
|
+
// Compare instance type for map.
|
637
|
+
// Always use unsigned comparisons: above and below, not less and greater.
|
638
|
+
void CmpInstanceType(Register map, InstanceType type);
|
639
|
+
|
640
|
+
// Check if the map of an object is equal to a specified map and
|
641
|
+
// branch to label if not. Skip the smi check if not required
|
642
|
+
// (object is known to be a heap object)
|
643
|
+
void CheckMap(Register obj,
|
644
|
+
Handle<Map> map,
|
645
|
+
Label* fail,
|
646
|
+
bool is_heap_object);
|
647
|
+
|
648
|
+
// Check if the object in register heap_object is a string. Afterwards the
|
649
|
+
// register map contains the object map and the register instance_type
|
650
|
+
// contains the instance_type. The registers map and instance_type can be the
|
651
|
+
// same in which case it contains the instance type afterwards. Either of the
|
652
|
+
// registers map and instance_type can be the same as heap_object.
|
653
|
+
Condition IsObjectStringType(Register heap_object,
|
654
|
+
Register map,
|
655
|
+
Register instance_type);
|
656
|
+
|
657
|
+
// FCmp compares and pops the two values on top of the FPU stack.
|
658
|
+
// The flag results are similar to integer cmp, but requires unsigned
|
659
|
+
// jcc instructions (je, ja, jae, jb, jbe, je, and jz).
|
660
|
+
void FCmp();
|
661
|
+
|
662
|
+
// Abort execution if argument is not a number. Used in debug code.
|
663
|
+
void AbortIfNotNumber(Register object);
|
664
|
+
|
665
|
+
// Abort execution if argument is a smi. Used in debug code.
|
666
|
+
void AbortIfSmi(Register object);
|
667
|
+
|
668
|
+
// Abort execution if argument is not a smi. Used in debug code.
|
669
|
+
void AbortIfNotSmi(Register object);
|
670
|
+
|
671
|
+
// Abort execution if argument is a string. Used in debug code.
|
672
|
+
void AbortIfNotString(Register object);
|
673
|
+
|
674
|
+
// Abort execution if argument is not the root value with the given index.
|
675
|
+
void AbortIfNotRootValue(Register src,
|
676
|
+
Heap::RootListIndex root_value_index,
|
677
|
+
const char* message);
|
678
|
+
|
679
|
+
// ---------------------------------------------------------------------------
|
680
|
+
// Exception handling
|
681
|
+
|
682
|
+
// Push a new try handler and link into try handler chain. The return
|
683
|
+
// address must be pushed before calling this helper.
|
684
|
+
void PushTryHandler(CodeLocation try_location, HandlerType type);
|
685
|
+
|
686
|
+
// Unlink the stack handler on top of the stack from the try handler chain.
|
687
|
+
void PopTryHandler();
|
688
|
+
|
689
|
+
// Activate the top handler in the try hander chain and pass the
|
690
|
+
// thrown value.
|
691
|
+
void Throw(Register value);
|
692
|
+
|
693
|
+
// Propagate an uncatchable exception out of the current JS stack.
|
694
|
+
void ThrowUncatchable(UncatchableExceptionType type, Register value);
|
695
|
+
|
696
|
+
// ---------------------------------------------------------------------------
|
697
|
+
// Inline caching support
|
698
|
+
|
699
|
+
// Generate code for checking access rights - used for security checks
|
700
|
+
// on access to global objects across environments. The holder register
|
701
|
+
// is left untouched, but the scratch register and kScratchRegister,
|
702
|
+
// which must be different, are clobbered.
|
703
|
+
void CheckAccessGlobalProxy(Register holder_reg,
|
704
|
+
Register scratch,
|
705
|
+
Label* miss);
|
706
|
+
|
707
|
+
|
708
|
+
// ---------------------------------------------------------------------------
|
709
|
+
// Allocation support
|
710
|
+
|
711
|
+
// Allocate an object in new space. If the new space is exhausted control
|
712
|
+
// continues at the gc_required label. The allocated object is returned in
|
713
|
+
// result and end of the new object is returned in result_end. The register
|
714
|
+
// scratch can be passed as no_reg in which case an additional object
|
715
|
+
// reference will be added to the reloc info. The returned pointers in result
|
716
|
+
// and result_end have not yet been tagged as heap objects. If
|
717
|
+
// result_contains_top_on_entry is true the content of result is known to be
|
718
|
+
// the allocation top on entry (could be result_end from a previous call to
|
719
|
+
// AllocateInNewSpace). If result_contains_top_on_entry is true scratch
|
720
|
+
// should be no_reg as it is never used.
|
721
|
+
void AllocateInNewSpace(int object_size,
|
722
|
+
Register result,
|
723
|
+
Register result_end,
|
724
|
+
Register scratch,
|
725
|
+
Label* gc_required,
|
726
|
+
AllocationFlags flags);
|
727
|
+
|
728
|
+
void AllocateInNewSpace(int header_size,
|
729
|
+
ScaleFactor element_size,
|
730
|
+
Register element_count,
|
731
|
+
Register result,
|
732
|
+
Register result_end,
|
733
|
+
Register scratch,
|
734
|
+
Label* gc_required,
|
735
|
+
AllocationFlags flags);
|
736
|
+
|
737
|
+
void AllocateInNewSpace(Register object_size,
|
738
|
+
Register result,
|
739
|
+
Register result_end,
|
740
|
+
Register scratch,
|
741
|
+
Label* gc_required,
|
742
|
+
AllocationFlags flags);
|
743
|
+
|
744
|
+
// Undo allocation in new space. The object passed and objects allocated after
|
745
|
+
// it will no longer be allocated. Make sure that no pointers are left to the
|
746
|
+
// object(s) no longer allocated as they would be invalid when allocation is
|
747
|
+
// un-done.
|
748
|
+
void UndoAllocationInNewSpace(Register object);
|
749
|
+
|
750
|
+
// Allocate a heap number in new space with undefined value. Returns
|
751
|
+
// tagged pointer in result register, or jumps to gc_required if new
|
752
|
+
// space is full.
|
753
|
+
void AllocateHeapNumber(Register result,
|
754
|
+
Register scratch,
|
755
|
+
Label* gc_required);
|
756
|
+
|
757
|
+
// Allocate a sequential string. All the header fields of the string object
|
758
|
+
// are initialized.
|
759
|
+
void AllocateTwoByteString(Register result,
|
760
|
+
Register length,
|
761
|
+
Register scratch1,
|
762
|
+
Register scratch2,
|
763
|
+
Register scratch3,
|
764
|
+
Label* gc_required);
|
765
|
+
void AllocateAsciiString(Register result,
|
766
|
+
Register length,
|
767
|
+
Register scratch1,
|
768
|
+
Register scratch2,
|
769
|
+
Register scratch3,
|
770
|
+
Label* gc_required);
|
771
|
+
|
772
|
+
// Allocate a raw cons string object. Only the map field of the result is
|
773
|
+
// initialized.
|
774
|
+
void AllocateConsString(Register result,
|
775
|
+
Register scratch1,
|
776
|
+
Register scratch2,
|
777
|
+
Label* gc_required);
|
778
|
+
void AllocateAsciiConsString(Register result,
|
779
|
+
Register scratch1,
|
780
|
+
Register scratch2,
|
781
|
+
Label* gc_required);
|
782
|
+
|
783
|
+
// ---------------------------------------------------------------------------
|
784
|
+
// Support functions.
|
785
|
+
|
786
|
+
// Check if result is zero and op is negative.
|
787
|
+
void NegativeZeroTest(Register result, Register op, Label* then_label);
|
788
|
+
|
789
|
+
// Check if result is zero and op is negative in code using jump targets.
|
790
|
+
void NegativeZeroTest(CodeGenerator* cgen,
|
791
|
+
Register result,
|
792
|
+
Register op,
|
793
|
+
JumpTarget* then_target);
|
794
|
+
|
795
|
+
// Check if result is zero and any of op1 and op2 are negative.
|
796
|
+
// Register scratch is destroyed, and it must be different from op2.
|
797
|
+
void NegativeZeroTest(Register result, Register op1, Register op2,
|
798
|
+
Register scratch, Label* then_label);
|
799
|
+
|
800
|
+
// Try to get function prototype of a function and puts the value in
|
801
|
+
// the result register. Checks that the function really is a
|
802
|
+
// function and jumps to the miss label if the fast checks fail. The
|
803
|
+
// function register will be untouched; the other register may be
|
804
|
+
// clobbered.
|
805
|
+
void TryGetFunctionPrototype(Register function,
|
806
|
+
Register result,
|
807
|
+
Label* miss);
|
808
|
+
|
809
|
+
// Generates code for reporting that an illegal operation has
|
810
|
+
// occurred.
|
811
|
+
void IllegalOperation(int num_arguments);
|
812
|
+
|
813
|
+
// Picks out an array index from the hash field.
|
814
|
+
// Register use:
|
815
|
+
// hash - holds the index's hash. Clobbered.
|
816
|
+
// index - holds the overwritten index on exit.
|
817
|
+
void IndexFromHash(Register hash, Register index);
|
818
|
+
|
819
|
+
// Find the function context up the context chain.
|
820
|
+
void LoadContext(Register dst, int context_chain_length);
|
821
|
+
|
822
|
+
// Load the global function with the given index.
|
823
|
+
void LoadGlobalFunction(int index, Register function);
|
824
|
+
|
825
|
+
// Load the initial map from the global function. The registers
|
826
|
+
// function and map can be the same.
|
827
|
+
void LoadGlobalFunctionInitialMap(Register function, Register map);
|
828
|
+
|
829
|
+
// ---------------------------------------------------------------------------
|
830
|
+
// Runtime calls
|
831
|
+
|
832
|
+
// Call a code stub.
|
833
|
+
void CallStub(CodeStub* stub);
|
834
|
+
|
835
|
+
// Call a code stub and return the code object called. Try to generate
|
836
|
+
// the code if necessary. Do not perform a GC but instead return a retry
|
837
|
+
// after GC failure.
|
838
|
+
MUST_USE_RESULT MaybeObject* TryCallStub(CodeStub* stub);
|
839
|
+
|
840
|
+
// Tail call a code stub (jump).
|
841
|
+
void TailCallStub(CodeStub* stub);
|
842
|
+
|
843
|
+
// Tail call a code stub (jump) and return the code object called. Try to
|
844
|
+
// generate the code if necessary. Do not perform a GC but instead return
|
845
|
+
// a retry after GC failure.
|
846
|
+
MUST_USE_RESULT MaybeObject* TryTailCallStub(CodeStub* stub);
|
847
|
+
|
848
|
+
// Return from a code stub after popping its arguments.
|
849
|
+
void StubReturn(int argc);
|
850
|
+
|
851
|
+
// Call a runtime routine.
|
852
|
+
void CallRuntime(Runtime::Function* f, int num_arguments);
|
853
|
+
|
854
|
+
// Call a runtime function and save the value of XMM registers.
|
855
|
+
void CallRuntimeSaveDoubles(Runtime::FunctionId id);
|
856
|
+
|
857
|
+
// Call a runtime function, returning the CodeStub object called.
|
858
|
+
// Try to generate the stub code if necessary. Do not perform a GC
|
859
|
+
// but instead return a retry after GC failure.
|
860
|
+
MUST_USE_RESULT MaybeObject* TryCallRuntime(Runtime::Function* f,
|
861
|
+
int num_arguments);
|
862
|
+
|
863
|
+
// Convenience function: Same as above, but takes the fid instead.
|
864
|
+
void CallRuntime(Runtime::FunctionId id, int num_arguments);
|
865
|
+
|
866
|
+
// Convenience function: Same as above, but takes the fid instead.
|
867
|
+
MUST_USE_RESULT MaybeObject* TryCallRuntime(Runtime::FunctionId id,
|
868
|
+
int num_arguments);
|
869
|
+
|
870
|
+
// Convenience function: call an external reference.
|
871
|
+
void CallExternalReference(const ExternalReference& ext,
|
872
|
+
int num_arguments);
|
873
|
+
|
874
|
+
// Tail call of a runtime routine (jump).
|
875
|
+
// Like JumpToExternalReference, but also takes care of passing the number
|
876
|
+
// of parameters.
|
877
|
+
void TailCallExternalReference(const ExternalReference& ext,
|
878
|
+
int num_arguments,
|
879
|
+
int result_size);
|
880
|
+
|
881
|
+
MUST_USE_RESULT MaybeObject* TryTailCallExternalReference(
|
882
|
+
const ExternalReference& ext, int num_arguments, int result_size);
|
883
|
+
|
884
|
+
// Convenience function: tail call a runtime routine (jump).
|
885
|
+
void TailCallRuntime(Runtime::FunctionId fid,
|
886
|
+
int num_arguments,
|
887
|
+
int result_size);
|
888
|
+
|
889
|
+
MUST_USE_RESULT MaybeObject* TryTailCallRuntime(Runtime::FunctionId fid,
|
890
|
+
int num_arguments,
|
891
|
+
int result_size);
|
892
|
+
|
893
|
+
// Jump to a runtime routine.
|
894
|
+
void JumpToExternalReference(const ExternalReference& ext, int result_size);
|
895
|
+
|
896
|
+
// Jump to a runtime routine.
|
897
|
+
MaybeObject* TryJumpToExternalReference(const ExternalReference& ext,
|
898
|
+
int result_size);
|
899
|
+
|
900
|
+
// Prepares stack to put arguments (aligns and so on).
|
901
|
+
// WIN64 calling convention requires to put the pointer to the return value
|
902
|
+
// slot into rcx (rcx must be preserverd until TryCallApiFunctionAndReturn).
|
903
|
+
// Saves context (rsi). Clobbers rax. Allocates arg_stack_space * kPointerSize
|
904
|
+
// inside the exit frame (not GCed) accessible via StackSpaceOperand.
|
905
|
+
void PrepareCallApiFunction(int arg_stack_space);
|
906
|
+
|
907
|
+
// Calls an API function. Allocates HandleScope, extracts
|
908
|
+
// returned value from handle and propagates exceptions.
|
909
|
+
// Clobbers r12, r14, rbx and caller-save registers. Restores context.
|
910
|
+
// On return removes stack_space * kPointerSize (GCed).
|
911
|
+
MUST_USE_RESULT MaybeObject* TryCallApiFunctionAndReturn(
|
912
|
+
ApiFunction* function, int stack_space);
|
913
|
+
|
914
|
+
// Before calling a C-function from generated code, align arguments on stack.
|
915
|
+
// After aligning the frame, arguments must be stored in esp[0], esp[4],
|
916
|
+
// etc., not pushed. The argument count assumes all arguments are word sized.
|
917
|
+
// The number of slots reserved for arguments depends on platform. On Windows
|
918
|
+
// stack slots are reserved for the arguments passed in registers. On other
|
919
|
+
// platforms stack slots are only reserved for the arguments actually passed
|
920
|
+
// on the stack.
|
921
|
+
void PrepareCallCFunction(int num_arguments);
|
922
|
+
|
923
|
+
// Calls a C function and cleans up the space for arguments allocated
|
924
|
+
// by PrepareCallCFunction. The called function is not allowed to trigger a
|
925
|
+
// garbage collection, since that might move the code and invalidate the
|
926
|
+
// return address (unless this is somehow accounted for by the called
|
927
|
+
// function).
|
928
|
+
void CallCFunction(ExternalReference function, int num_arguments);
|
929
|
+
void CallCFunction(Register function, int num_arguments);
|
930
|
+
|
931
|
+
// Calculate the number of stack slots to reserve for arguments when calling a
|
932
|
+
// C function.
|
933
|
+
int ArgumentStackSlotsForCFunctionCall(int num_arguments);
|
934
|
+
|
935
|
+
// ---------------------------------------------------------------------------
|
936
|
+
// Utilities
|
937
|
+
|
938
|
+
void Ret();
|
939
|
+
|
940
|
+
// Return and drop arguments from stack, where the number of arguments
|
941
|
+
// may be bigger than 2^16 - 1. Requires a scratch register.
|
942
|
+
void Ret(int bytes_dropped, Register scratch);
|
943
|
+
|
944
|
+
Handle<Object> CodeObject() { return code_object_; }
|
945
|
+
|
946
|
+
|
947
|
+
// ---------------------------------------------------------------------------
|
948
|
+
// StatsCounter support
|
949
|
+
|
950
|
+
void SetCounter(StatsCounter* counter, int value);
|
951
|
+
void IncrementCounter(StatsCounter* counter, int value);
|
952
|
+
void DecrementCounter(StatsCounter* counter, int value);
|
953
|
+
|
954
|
+
|
955
|
+
// ---------------------------------------------------------------------------
|
956
|
+
// Debugging
|
957
|
+
|
958
|
+
// Calls Abort(msg) if the condition cc is not satisfied.
|
959
|
+
// Use --debug_code to enable.
|
960
|
+
void Assert(Condition cc, const char* msg);
|
961
|
+
|
962
|
+
void AssertFastElements(Register elements);
|
963
|
+
|
964
|
+
// Like Assert(), but always enabled.
|
965
|
+
void Check(Condition cc, const char* msg);
|
966
|
+
|
967
|
+
// Print a message to stdout and abort execution.
|
968
|
+
void Abort(const char* msg);
|
969
|
+
|
970
|
+
// Check that the stack is aligned.
|
971
|
+
void CheckStackAlignment();
|
972
|
+
|
973
|
+
// Verify restrictions about code generated in stubs.
|
974
|
+
void set_generating_stub(bool value) { generating_stub_ = value; }
|
975
|
+
bool generating_stub() { return generating_stub_; }
|
976
|
+
void set_allow_stub_calls(bool value) { allow_stub_calls_ = value; }
|
977
|
+
bool allow_stub_calls() { return allow_stub_calls_; }
|
978
|
+
|
979
|
+
private:
|
980
|
+
// Order general registers are pushed by Pushad.
|
981
|
+
// rax, rcx, rdx, rbx, rsi, rdi, r8, r9, r11, r12, r14.
|
982
|
+
static int kSafepointPushRegisterIndices[Register::kNumRegisters];
|
983
|
+
static const int kNumSafepointSavedRegisters = 11;
|
984
|
+
|
985
|
+
bool generating_stub_;
|
986
|
+
bool allow_stub_calls_;
|
987
|
+
|
988
|
+
// Returns a register holding the smi value. The register MUST NOT be
|
989
|
+
// modified. It may be the "smi 1 constant" register.
|
990
|
+
Register GetSmiConstant(Smi* value);
|
991
|
+
|
992
|
+
// Moves the smi value to the destination register.
|
993
|
+
void LoadSmiConstant(Register dst, Smi* value);
|
994
|
+
|
995
|
+
// This handle will be patched with the code object on installation.
|
996
|
+
Handle<Object> code_object_;
|
997
|
+
|
998
|
+
// Helper functions for generating invokes.
|
999
|
+
template <typename LabelType>
|
1000
|
+
void InvokePrologue(const ParameterCount& expected,
|
1001
|
+
const ParameterCount& actual,
|
1002
|
+
Handle<Code> code_constant,
|
1003
|
+
Register code_register,
|
1004
|
+
LabelType* done,
|
1005
|
+
InvokeFlag flag,
|
1006
|
+
PostCallGenerator* post_call_generator);
|
1007
|
+
|
1008
|
+
// Activation support.
|
1009
|
+
void EnterFrame(StackFrame::Type type);
|
1010
|
+
void LeaveFrame(StackFrame::Type type);
|
1011
|
+
|
1012
|
+
void EnterExitFramePrologue(bool save_rax);
|
1013
|
+
|
1014
|
+
// Allocates arg_stack_space * kPointerSize memory (not GCed) on the stack
|
1015
|
+
// accessible via StackSpaceOperand.
|
1016
|
+
void EnterExitFrameEpilogue(int arg_stack_space, bool save_doubles);
|
1017
|
+
|
1018
|
+
void LeaveExitFrameEpilogue();
|
1019
|
+
|
1020
|
+
// Allocation support helpers.
|
1021
|
+
// Loads the top of new-space into the result register.
|
1022
|
+
// Otherwise the address of the new-space top is loaded into scratch (if
|
1023
|
+
// scratch is valid), and the new-space top is loaded into result.
|
1024
|
+
void LoadAllocationTopHelper(Register result,
|
1025
|
+
Register scratch,
|
1026
|
+
AllocationFlags flags);
|
1027
|
+
// Update allocation top with value in result_end register.
|
1028
|
+
// If scratch is valid, it contains the address of the allocation top.
|
1029
|
+
void UpdateAllocationTopHelper(Register result_end, Register scratch);
|
1030
|
+
|
1031
|
+
// Helper for PopHandleScope. Allowed to perform a GC and returns
|
1032
|
+
// NULL if gc_allowed. Does not perform a GC if !gc_allowed, and
|
1033
|
+
// possibly returns a failure object indicating an allocation failure.
|
1034
|
+
Object* PopHandleScopeHelper(Register saved,
|
1035
|
+
Register scratch,
|
1036
|
+
bool gc_allowed);
|
1037
|
+
|
1038
|
+
|
1039
|
+
// Compute memory operands for safepoint stack slots.
|
1040
|
+
Operand SafepointRegisterSlot(Register reg);
|
1041
|
+
static int SafepointRegisterStackIndex(int reg_code) {
|
1042
|
+
return kNumSafepointRegisters - kSafepointPushRegisterIndices[reg_code] - 1;
|
1043
|
+
}
|
1044
|
+
|
1045
|
+
// Needs access to SafepointRegisterStackIndex for optimized frame
|
1046
|
+
// traversal.
|
1047
|
+
friend class OptimizedFrame;
|
1048
|
+
};
|
1049
|
+
|
1050
|
+
|
1051
|
+
// The code patcher is used to patch (typically) small parts of code e.g. for
|
1052
|
+
// debugging and other types of instrumentation. When using the code patcher
|
1053
|
+
// the exact number of bytes specified must be emitted. Is not legal to emit
|
1054
|
+
// relocation information. If any of these constraints are violated it causes
|
1055
|
+
// an assertion.
|
1056
|
+
class CodePatcher {
|
1057
|
+
public:
|
1058
|
+
CodePatcher(byte* address, int size);
|
1059
|
+
virtual ~CodePatcher();
|
1060
|
+
|
1061
|
+
// Macro assembler to emit code.
|
1062
|
+
MacroAssembler* masm() { return &masm_; }
|
1063
|
+
|
1064
|
+
private:
|
1065
|
+
byte* address_; // The address of the code being patched.
|
1066
|
+
int size_; // Number of bytes of the expected patch size.
|
1067
|
+
MacroAssembler masm_; // Macro assembler used to generate the code.
|
1068
|
+
};
|
1069
|
+
|
1070
|
+
|
1071
|
+
// Helper class for generating code or data associated with the code
|
1072
|
+
// right after a call instruction. As an example this can be used to
|
1073
|
+
// generate safepoint data after calls for crankshaft.
|
1074
|
+
class PostCallGenerator {
|
1075
|
+
public:
|
1076
|
+
PostCallGenerator() { }
|
1077
|
+
virtual ~PostCallGenerator() { }
|
1078
|
+
virtual void Generate() = 0;
|
1079
|
+
};
|
1080
|
+
|
1081
|
+
|
1082
|
+
// -----------------------------------------------------------------------------
|
1083
|
+
// Static helper functions.
|
1084
|
+
|
1085
|
+
// Generate an Operand for loading a field from an object.
|
1086
|
+
static inline Operand FieldOperand(Register object, int offset) {
|
1087
|
+
return Operand(object, offset - kHeapObjectTag);
|
1088
|
+
}
|
1089
|
+
|
1090
|
+
|
1091
|
+
// Generate an Operand for loading an indexed field from an object.
|
1092
|
+
static inline Operand FieldOperand(Register object,
|
1093
|
+
Register index,
|
1094
|
+
ScaleFactor scale,
|
1095
|
+
int offset) {
|
1096
|
+
return Operand(object, index, scale, offset - kHeapObjectTag);
|
1097
|
+
}
|
1098
|
+
|
1099
|
+
|
1100
|
+
static inline Operand ContextOperand(Register context, int index) {
|
1101
|
+
return Operand(context, Context::SlotOffset(index));
|
1102
|
+
}
|
1103
|
+
|
1104
|
+
|
1105
|
+
static inline Operand GlobalObjectOperand() {
|
1106
|
+
return ContextOperand(rsi, Context::GLOBAL_INDEX);
|
1107
|
+
}
|
1108
|
+
|
1109
|
+
|
1110
|
+
// Provides access to exit frame stack space (not GCed).
|
1111
|
+
static inline Operand StackSpaceOperand(int index) {
|
1112
|
+
#ifdef _WIN64
|
1113
|
+
const int kShaddowSpace = 4;
|
1114
|
+
return Operand(rsp, (index + kShaddowSpace) * kPointerSize);
|
1115
|
+
#else
|
1116
|
+
return Operand(rsp, index * kPointerSize);
|
1117
|
+
#endif
|
1118
|
+
}
|
1119
|
+
|
1120
|
+
|
1121
|
+
|
1122
|
+
#ifdef GENERATED_CODE_COVERAGE
|
1123
|
+
extern void LogGeneratedCodeCoverage(const char* file_line);
|
1124
|
+
#define CODE_COVERAGE_STRINGIFY(x) #x
|
1125
|
+
#define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x)
|
1126
|
+
#define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
|
1127
|
+
#define ACCESS_MASM(masm) { \
|
1128
|
+
byte* x64_coverage_function = \
|
1129
|
+
reinterpret_cast<byte*>(FUNCTION_ADDR(LogGeneratedCodeCoverage)); \
|
1130
|
+
masm->pushfd(); \
|
1131
|
+
masm->pushad(); \
|
1132
|
+
masm->push(Immediate(reinterpret_cast<int>(&__FILE_LINE__))); \
|
1133
|
+
masm->call(x64_coverage_function, RelocInfo::RUNTIME_ENTRY); \
|
1134
|
+
masm->pop(rax); \
|
1135
|
+
masm->popad(); \
|
1136
|
+
masm->popfd(); \
|
1137
|
+
} \
|
1138
|
+
masm->
|
1139
|
+
#else
|
1140
|
+
#define ACCESS_MASM(masm) masm->
|
1141
|
+
#endif
|
1142
|
+
|
1143
|
+
// -----------------------------------------------------------------------------
|
1144
|
+
// Template implementations.
|
1145
|
+
|
1146
|
+
static int kSmiShift = kSmiTagSize + kSmiShiftSize;
|
1147
|
+
|
1148
|
+
|
1149
|
+
template <typename LabelType>
|
1150
|
+
void MacroAssembler::SmiNeg(Register dst,
|
1151
|
+
Register src,
|
1152
|
+
LabelType* on_smi_result) {
|
1153
|
+
if (dst.is(src)) {
|
1154
|
+
ASSERT(!dst.is(kScratchRegister));
|
1155
|
+
movq(kScratchRegister, src);
|
1156
|
+
neg(dst); // Low 32 bits are retained as zero by negation.
|
1157
|
+
// Test if result is zero or Smi::kMinValue.
|
1158
|
+
cmpq(dst, kScratchRegister);
|
1159
|
+
j(not_equal, on_smi_result);
|
1160
|
+
movq(src, kScratchRegister);
|
1161
|
+
} else {
|
1162
|
+
movq(dst, src);
|
1163
|
+
neg(dst);
|
1164
|
+
cmpq(dst, src);
|
1165
|
+
// If the result is zero or Smi::kMinValue, negation failed to create a smi.
|
1166
|
+
j(not_equal, on_smi_result);
|
1167
|
+
}
|
1168
|
+
}
|
1169
|
+
|
1170
|
+
|
1171
|
+
template <typename LabelType>
|
1172
|
+
void MacroAssembler::SmiAdd(Register dst,
|
1173
|
+
Register src1,
|
1174
|
+
Register src2,
|
1175
|
+
LabelType* on_not_smi_result) {
|
1176
|
+
ASSERT_NOT_NULL(on_not_smi_result);
|
1177
|
+
ASSERT(!dst.is(src2));
|
1178
|
+
if (dst.is(src1)) {
|
1179
|
+
movq(kScratchRegister, src1);
|
1180
|
+
addq(kScratchRegister, src2);
|
1181
|
+
j(overflow, on_not_smi_result);
|
1182
|
+
movq(dst, kScratchRegister);
|
1183
|
+
} else {
|
1184
|
+
movq(dst, src1);
|
1185
|
+
addq(dst, src2);
|
1186
|
+
j(overflow, on_not_smi_result);
|
1187
|
+
}
|
1188
|
+
}
|
1189
|
+
|
1190
|
+
|
1191
|
+
template <typename LabelType>
|
1192
|
+
void MacroAssembler::SmiSub(Register dst,
|
1193
|
+
Register src1,
|
1194
|
+
Register src2,
|
1195
|
+
LabelType* on_not_smi_result) {
|
1196
|
+
ASSERT_NOT_NULL(on_not_smi_result);
|
1197
|
+
ASSERT(!dst.is(src2));
|
1198
|
+
if (dst.is(src1)) {
|
1199
|
+
cmpq(dst, src2);
|
1200
|
+
j(overflow, on_not_smi_result);
|
1201
|
+
subq(dst, src2);
|
1202
|
+
} else {
|
1203
|
+
movq(dst, src1);
|
1204
|
+
subq(dst, src2);
|
1205
|
+
j(overflow, on_not_smi_result);
|
1206
|
+
}
|
1207
|
+
}
|
1208
|
+
|
1209
|
+
|
1210
|
+
template <typename LabelType>
|
1211
|
+
void MacroAssembler::SmiSub(Register dst,
|
1212
|
+
Register src1,
|
1213
|
+
const Operand& src2,
|
1214
|
+
LabelType* on_not_smi_result) {
|
1215
|
+
ASSERT_NOT_NULL(on_not_smi_result);
|
1216
|
+
if (dst.is(src1)) {
|
1217
|
+
movq(kScratchRegister, src2);
|
1218
|
+
cmpq(src1, kScratchRegister);
|
1219
|
+
j(overflow, on_not_smi_result);
|
1220
|
+
subq(src1, kScratchRegister);
|
1221
|
+
} else {
|
1222
|
+
movq(dst, src1);
|
1223
|
+
subq(dst, src2);
|
1224
|
+
j(overflow, on_not_smi_result);
|
1225
|
+
}
|
1226
|
+
}
|
1227
|
+
|
1228
|
+
|
1229
|
+
template <typename LabelType>
|
1230
|
+
void MacroAssembler::SmiMul(Register dst,
|
1231
|
+
Register src1,
|
1232
|
+
Register src2,
|
1233
|
+
LabelType* on_not_smi_result) {
|
1234
|
+
ASSERT(!dst.is(src2));
|
1235
|
+
ASSERT(!dst.is(kScratchRegister));
|
1236
|
+
ASSERT(!src1.is(kScratchRegister));
|
1237
|
+
ASSERT(!src2.is(kScratchRegister));
|
1238
|
+
|
1239
|
+
if (dst.is(src1)) {
|
1240
|
+
NearLabel failure, zero_correct_result;
|
1241
|
+
movq(kScratchRegister, src1); // Create backup for later testing.
|
1242
|
+
SmiToInteger64(dst, src1);
|
1243
|
+
imul(dst, src2);
|
1244
|
+
j(overflow, &failure);
|
1245
|
+
|
1246
|
+
// Check for negative zero result. If product is zero, and one
|
1247
|
+
// argument is negative, go to slow case.
|
1248
|
+
NearLabel correct_result;
|
1249
|
+
testq(dst, dst);
|
1250
|
+
j(not_zero, &correct_result);
|
1251
|
+
|
1252
|
+
movq(dst, kScratchRegister);
|
1253
|
+
xor_(dst, src2);
|
1254
|
+
j(positive, &zero_correct_result); // Result was positive zero.
|
1255
|
+
|
1256
|
+
bind(&failure); // Reused failure exit, restores src1.
|
1257
|
+
movq(src1, kScratchRegister);
|
1258
|
+
jmp(on_not_smi_result);
|
1259
|
+
|
1260
|
+
bind(&zero_correct_result);
|
1261
|
+
Set(dst, 0);
|
1262
|
+
|
1263
|
+
bind(&correct_result);
|
1264
|
+
} else {
|
1265
|
+
SmiToInteger64(dst, src1);
|
1266
|
+
imul(dst, src2);
|
1267
|
+
j(overflow, on_not_smi_result);
|
1268
|
+
// Check for negative zero result. If product is zero, and one
|
1269
|
+
// argument is negative, go to slow case.
|
1270
|
+
NearLabel correct_result;
|
1271
|
+
testq(dst, dst);
|
1272
|
+
j(not_zero, &correct_result);
|
1273
|
+
// One of src1 and src2 is zero, the check whether the other is
|
1274
|
+
// negative.
|
1275
|
+
movq(kScratchRegister, src1);
|
1276
|
+
xor_(kScratchRegister, src2);
|
1277
|
+
j(negative, on_not_smi_result);
|
1278
|
+
bind(&correct_result);
|
1279
|
+
}
|
1280
|
+
}
|
1281
|
+
|
1282
|
+
|
1283
|
+
template <typename LabelType>
|
1284
|
+
void MacroAssembler::SmiTryAddConstant(Register dst,
|
1285
|
+
Register src,
|
1286
|
+
Smi* constant,
|
1287
|
+
LabelType* on_not_smi_result) {
|
1288
|
+
// Does not assume that src is a smi.
|
1289
|
+
ASSERT_EQ(static_cast<int>(1), static_cast<int>(kSmiTagMask));
|
1290
|
+
ASSERT_EQ(0, kSmiTag);
|
1291
|
+
ASSERT(!dst.is(kScratchRegister));
|
1292
|
+
ASSERT(!src.is(kScratchRegister));
|
1293
|
+
|
1294
|
+
JumpIfNotSmi(src, on_not_smi_result);
|
1295
|
+
Register tmp = (dst.is(src) ? kScratchRegister : dst);
|
1296
|
+
LoadSmiConstant(tmp, constant);
|
1297
|
+
addq(tmp, src);
|
1298
|
+
j(overflow, on_not_smi_result);
|
1299
|
+
if (dst.is(src)) {
|
1300
|
+
movq(dst, tmp);
|
1301
|
+
}
|
1302
|
+
}
|
1303
|
+
|
1304
|
+
|
1305
|
+
template <typename LabelType>
|
1306
|
+
void MacroAssembler::SmiAddConstant(Register dst,
|
1307
|
+
Register src,
|
1308
|
+
Smi* constant,
|
1309
|
+
LabelType* on_not_smi_result) {
|
1310
|
+
if (constant->value() == 0) {
|
1311
|
+
if (!dst.is(src)) {
|
1312
|
+
movq(dst, src);
|
1313
|
+
}
|
1314
|
+
} else if (dst.is(src)) {
|
1315
|
+
ASSERT(!dst.is(kScratchRegister));
|
1316
|
+
|
1317
|
+
LoadSmiConstant(kScratchRegister, constant);
|
1318
|
+
addq(kScratchRegister, src);
|
1319
|
+
j(overflow, on_not_smi_result);
|
1320
|
+
movq(dst, kScratchRegister);
|
1321
|
+
} else {
|
1322
|
+
LoadSmiConstant(dst, constant);
|
1323
|
+
addq(dst, src);
|
1324
|
+
j(overflow, on_not_smi_result);
|
1325
|
+
}
|
1326
|
+
}
|
1327
|
+
|
1328
|
+
|
1329
|
+
template <typename LabelType>
|
1330
|
+
void MacroAssembler::SmiSubConstant(Register dst,
|
1331
|
+
Register src,
|
1332
|
+
Smi* constant,
|
1333
|
+
LabelType* on_not_smi_result) {
|
1334
|
+
if (constant->value() == 0) {
|
1335
|
+
if (!dst.is(src)) {
|
1336
|
+
movq(dst, src);
|
1337
|
+
}
|
1338
|
+
} else if (dst.is(src)) {
|
1339
|
+
ASSERT(!dst.is(kScratchRegister));
|
1340
|
+
if (constant->value() == Smi::kMinValue) {
|
1341
|
+
// Subtracting min-value from any non-negative value will overflow.
|
1342
|
+
// We test the non-negativeness before doing the subtraction.
|
1343
|
+
testq(src, src);
|
1344
|
+
j(not_sign, on_not_smi_result);
|
1345
|
+
LoadSmiConstant(kScratchRegister, constant);
|
1346
|
+
subq(dst, kScratchRegister);
|
1347
|
+
} else {
|
1348
|
+
// Subtract by adding the negation.
|
1349
|
+
LoadSmiConstant(kScratchRegister, Smi::FromInt(-constant->value()));
|
1350
|
+
addq(kScratchRegister, dst);
|
1351
|
+
j(overflow, on_not_smi_result);
|
1352
|
+
movq(dst, kScratchRegister);
|
1353
|
+
}
|
1354
|
+
} else {
|
1355
|
+
if (constant->value() == Smi::kMinValue) {
|
1356
|
+
// Subtracting min-value from any non-negative value will overflow.
|
1357
|
+
// We test the non-negativeness before doing the subtraction.
|
1358
|
+
testq(src, src);
|
1359
|
+
j(not_sign, on_not_smi_result);
|
1360
|
+
LoadSmiConstant(dst, constant);
|
1361
|
+
// Adding and subtracting the min-value gives the same result, it only
|
1362
|
+
// differs on the overflow bit, which we don't check here.
|
1363
|
+
addq(dst, src);
|
1364
|
+
} else {
|
1365
|
+
// Subtract by adding the negation.
|
1366
|
+
LoadSmiConstant(dst, Smi::FromInt(-(constant->value())));
|
1367
|
+
addq(dst, src);
|
1368
|
+
j(overflow, on_not_smi_result);
|
1369
|
+
}
|
1370
|
+
}
|
1371
|
+
}
|
1372
|
+
|
1373
|
+
|
1374
|
+
template <typename LabelType>
|
1375
|
+
void MacroAssembler::SmiDiv(Register dst,
|
1376
|
+
Register src1,
|
1377
|
+
Register src2,
|
1378
|
+
LabelType* on_not_smi_result) {
|
1379
|
+
ASSERT(!src1.is(kScratchRegister));
|
1380
|
+
ASSERT(!src2.is(kScratchRegister));
|
1381
|
+
ASSERT(!dst.is(kScratchRegister));
|
1382
|
+
ASSERT(!src2.is(rax));
|
1383
|
+
ASSERT(!src2.is(rdx));
|
1384
|
+
ASSERT(!src1.is(rdx));
|
1385
|
+
|
1386
|
+
// Check for 0 divisor (result is +/-Infinity).
|
1387
|
+
NearLabel positive_divisor;
|
1388
|
+
testq(src2, src2);
|
1389
|
+
j(zero, on_not_smi_result);
|
1390
|
+
|
1391
|
+
if (src1.is(rax)) {
|
1392
|
+
movq(kScratchRegister, src1);
|
1393
|
+
}
|
1394
|
+
SmiToInteger32(rax, src1);
|
1395
|
+
// We need to rule out dividing Smi::kMinValue by -1, since that would
|
1396
|
+
// overflow in idiv and raise an exception.
|
1397
|
+
// We combine this with negative zero test (negative zero only happens
|
1398
|
+
// when dividing zero by a negative number).
|
1399
|
+
|
1400
|
+
// We overshoot a little and go to slow case if we divide min-value
|
1401
|
+
// by any negative value, not just -1.
|
1402
|
+
NearLabel safe_div;
|
1403
|
+
testl(rax, Immediate(0x7fffffff));
|
1404
|
+
j(not_zero, &safe_div);
|
1405
|
+
testq(src2, src2);
|
1406
|
+
if (src1.is(rax)) {
|
1407
|
+
j(positive, &safe_div);
|
1408
|
+
movq(src1, kScratchRegister);
|
1409
|
+
jmp(on_not_smi_result);
|
1410
|
+
} else {
|
1411
|
+
j(negative, on_not_smi_result);
|
1412
|
+
}
|
1413
|
+
bind(&safe_div);
|
1414
|
+
|
1415
|
+
SmiToInteger32(src2, src2);
|
1416
|
+
// Sign extend src1 into edx:eax.
|
1417
|
+
cdq();
|
1418
|
+
idivl(src2);
|
1419
|
+
Integer32ToSmi(src2, src2);
|
1420
|
+
// Check that the remainder is zero.
|
1421
|
+
testl(rdx, rdx);
|
1422
|
+
if (src1.is(rax)) {
|
1423
|
+
NearLabel smi_result;
|
1424
|
+
j(zero, &smi_result);
|
1425
|
+
movq(src1, kScratchRegister);
|
1426
|
+
jmp(on_not_smi_result);
|
1427
|
+
bind(&smi_result);
|
1428
|
+
} else {
|
1429
|
+
j(not_zero, on_not_smi_result);
|
1430
|
+
}
|
1431
|
+
if (!dst.is(src1) && src1.is(rax)) {
|
1432
|
+
movq(src1, kScratchRegister);
|
1433
|
+
}
|
1434
|
+
Integer32ToSmi(dst, rax);
|
1435
|
+
}
|
1436
|
+
|
1437
|
+
|
1438
|
+
template <typename LabelType>
|
1439
|
+
void MacroAssembler::SmiMod(Register dst,
|
1440
|
+
Register src1,
|
1441
|
+
Register src2,
|
1442
|
+
LabelType* on_not_smi_result) {
|
1443
|
+
ASSERT(!dst.is(kScratchRegister));
|
1444
|
+
ASSERT(!src1.is(kScratchRegister));
|
1445
|
+
ASSERT(!src2.is(kScratchRegister));
|
1446
|
+
ASSERT(!src2.is(rax));
|
1447
|
+
ASSERT(!src2.is(rdx));
|
1448
|
+
ASSERT(!src1.is(rdx));
|
1449
|
+
ASSERT(!src1.is(src2));
|
1450
|
+
|
1451
|
+
testq(src2, src2);
|
1452
|
+
j(zero, on_not_smi_result);
|
1453
|
+
|
1454
|
+
if (src1.is(rax)) {
|
1455
|
+
movq(kScratchRegister, src1);
|
1456
|
+
}
|
1457
|
+
SmiToInteger32(rax, src1);
|
1458
|
+
SmiToInteger32(src2, src2);
|
1459
|
+
|
1460
|
+
// Test for the edge case of dividing Smi::kMinValue by -1 (will overflow).
|
1461
|
+
NearLabel safe_div;
|
1462
|
+
cmpl(rax, Immediate(Smi::kMinValue));
|
1463
|
+
j(not_equal, &safe_div);
|
1464
|
+
cmpl(src2, Immediate(-1));
|
1465
|
+
j(not_equal, &safe_div);
|
1466
|
+
// Retag inputs and go slow case.
|
1467
|
+
Integer32ToSmi(src2, src2);
|
1468
|
+
if (src1.is(rax)) {
|
1469
|
+
movq(src1, kScratchRegister);
|
1470
|
+
}
|
1471
|
+
jmp(on_not_smi_result);
|
1472
|
+
bind(&safe_div);
|
1473
|
+
|
1474
|
+
// Sign extend eax into edx:eax.
|
1475
|
+
cdq();
|
1476
|
+
idivl(src2);
|
1477
|
+
// Restore smi tags on inputs.
|
1478
|
+
Integer32ToSmi(src2, src2);
|
1479
|
+
if (src1.is(rax)) {
|
1480
|
+
movq(src1, kScratchRegister);
|
1481
|
+
}
|
1482
|
+
// Check for a negative zero result. If the result is zero, and the
|
1483
|
+
// dividend is negative, go slow to return a floating point negative zero.
|
1484
|
+
NearLabel smi_result;
|
1485
|
+
testl(rdx, rdx);
|
1486
|
+
j(not_zero, &smi_result);
|
1487
|
+
testq(src1, src1);
|
1488
|
+
j(negative, on_not_smi_result);
|
1489
|
+
bind(&smi_result);
|
1490
|
+
Integer32ToSmi(dst, rdx);
|
1491
|
+
}
|
1492
|
+
|
1493
|
+
|
1494
|
+
template <typename LabelType>
|
1495
|
+
void MacroAssembler::SmiShiftLogicalRightConstant(
|
1496
|
+
Register dst, Register src, int shift_value, LabelType* on_not_smi_result) {
|
1497
|
+
// Logic right shift interprets its result as an *unsigned* number.
|
1498
|
+
if (dst.is(src)) {
|
1499
|
+
UNIMPLEMENTED(); // Not used.
|
1500
|
+
} else {
|
1501
|
+
movq(dst, src);
|
1502
|
+
if (shift_value == 0) {
|
1503
|
+
testq(dst, dst);
|
1504
|
+
j(negative, on_not_smi_result);
|
1505
|
+
}
|
1506
|
+
shr(dst, Immediate(shift_value + kSmiShift));
|
1507
|
+
shl(dst, Immediate(kSmiShift));
|
1508
|
+
}
|
1509
|
+
}
|
1510
|
+
|
1511
|
+
|
1512
|
+
template <typename LabelType>
|
1513
|
+
void MacroAssembler::SmiShiftLogicalRight(Register dst,
|
1514
|
+
Register src1,
|
1515
|
+
Register src2,
|
1516
|
+
LabelType* on_not_smi_result) {
|
1517
|
+
ASSERT(!dst.is(kScratchRegister));
|
1518
|
+
ASSERT(!src1.is(kScratchRegister));
|
1519
|
+
ASSERT(!src2.is(kScratchRegister));
|
1520
|
+
ASSERT(!dst.is(rcx));
|
1521
|
+
// dst and src1 can be the same, because the one case that bails out
|
1522
|
+
// is a shift by 0, which leaves dst, and therefore src1, unchanged.
|
1523
|
+
NearLabel result_ok;
|
1524
|
+
if (src1.is(rcx) || src2.is(rcx)) {
|
1525
|
+
movq(kScratchRegister, rcx);
|
1526
|
+
}
|
1527
|
+
if (!dst.is(src1)) {
|
1528
|
+
movq(dst, src1);
|
1529
|
+
}
|
1530
|
+
SmiToInteger32(rcx, src2);
|
1531
|
+
orl(rcx, Immediate(kSmiShift));
|
1532
|
+
shr_cl(dst); // Shift is rcx modulo 0x1f + 32.
|
1533
|
+
shl(dst, Immediate(kSmiShift));
|
1534
|
+
testq(dst, dst);
|
1535
|
+
if (src1.is(rcx) || src2.is(rcx)) {
|
1536
|
+
NearLabel positive_result;
|
1537
|
+
j(positive, &positive_result);
|
1538
|
+
if (src1.is(rcx)) {
|
1539
|
+
movq(src1, kScratchRegister);
|
1540
|
+
} else {
|
1541
|
+
movq(src2, kScratchRegister);
|
1542
|
+
}
|
1543
|
+
jmp(on_not_smi_result);
|
1544
|
+
bind(&positive_result);
|
1545
|
+
} else {
|
1546
|
+
j(negative, on_not_smi_result); // src2 was zero and src1 negative.
|
1547
|
+
}
|
1548
|
+
}
|
1549
|
+
|
1550
|
+
|
1551
|
+
template <typename LabelType>
|
1552
|
+
void MacroAssembler::SelectNonSmi(Register dst,
|
1553
|
+
Register src1,
|
1554
|
+
Register src2,
|
1555
|
+
LabelType* on_not_smis) {
|
1556
|
+
ASSERT(!dst.is(kScratchRegister));
|
1557
|
+
ASSERT(!src1.is(kScratchRegister));
|
1558
|
+
ASSERT(!src2.is(kScratchRegister));
|
1559
|
+
ASSERT(!dst.is(src1));
|
1560
|
+
ASSERT(!dst.is(src2));
|
1561
|
+
// Both operands must not be smis.
|
1562
|
+
#ifdef DEBUG
|
1563
|
+
if (allow_stub_calls()) { // Check contains a stub call.
|
1564
|
+
Condition not_both_smis = NegateCondition(CheckBothSmi(src1, src2));
|
1565
|
+
Check(not_both_smis, "Both registers were smis in SelectNonSmi.");
|
1566
|
+
}
|
1567
|
+
#endif
|
1568
|
+
ASSERT_EQ(0, kSmiTag);
|
1569
|
+
ASSERT_EQ(0, Smi::FromInt(0));
|
1570
|
+
movl(kScratchRegister, Immediate(kSmiTagMask));
|
1571
|
+
and_(kScratchRegister, src1);
|
1572
|
+
testl(kScratchRegister, src2);
|
1573
|
+
// If non-zero then both are smis.
|
1574
|
+
j(not_zero, on_not_smis);
|
1575
|
+
|
1576
|
+
// Exactly one operand is a smi.
|
1577
|
+
ASSERT_EQ(1, static_cast<int>(kSmiTagMask));
|
1578
|
+
// kScratchRegister still holds src1 & kSmiTag, which is either zero or one.
|
1579
|
+
subq(kScratchRegister, Immediate(1));
|
1580
|
+
// If src1 is a smi, then scratch register all 1s, else it is all 0s.
|
1581
|
+
movq(dst, src1);
|
1582
|
+
xor_(dst, src2);
|
1583
|
+
and_(dst, kScratchRegister);
|
1584
|
+
// If src1 is a smi, dst holds src1 ^ src2, else it is zero.
|
1585
|
+
xor_(dst, src1);
|
1586
|
+
// If src1 is a smi, dst is src2, else it is src1, i.e., the non-smi.
|
1587
|
+
}
|
1588
|
+
|
1589
|
+
|
1590
|
+
template <typename LabelType>
|
1591
|
+
void MacroAssembler::JumpIfSmi(Register src, LabelType* on_smi) {
|
1592
|
+
ASSERT_EQ(0, kSmiTag);
|
1593
|
+
Condition smi = CheckSmi(src);
|
1594
|
+
j(smi, on_smi);
|
1595
|
+
}
|
1596
|
+
|
1597
|
+
|
1598
|
+
template <typename LabelType>
|
1599
|
+
void MacroAssembler::JumpIfNotSmi(Register src, LabelType* on_not_smi) {
|
1600
|
+
Condition smi = CheckSmi(src);
|
1601
|
+
j(NegateCondition(smi), on_not_smi);
|
1602
|
+
}
|
1603
|
+
|
1604
|
+
|
1605
|
+
template <typename LabelType>
|
1606
|
+
void MacroAssembler::JumpUnlessNonNegativeSmi(
|
1607
|
+
Register src, LabelType* on_not_smi_or_negative) {
|
1608
|
+
Condition non_negative_smi = CheckNonNegativeSmi(src);
|
1609
|
+
j(NegateCondition(non_negative_smi), on_not_smi_or_negative);
|
1610
|
+
}
|
1611
|
+
|
1612
|
+
|
1613
|
+
template <typename LabelType>
|
1614
|
+
void MacroAssembler::JumpIfSmiEqualsConstant(Register src,
|
1615
|
+
Smi* constant,
|
1616
|
+
LabelType* on_equals) {
|
1617
|
+
SmiCompare(src, constant);
|
1618
|
+
j(equal, on_equals);
|
1619
|
+
}
|
1620
|
+
|
1621
|
+
|
1622
|
+
template <typename LabelType>
|
1623
|
+
void MacroAssembler::JumpIfNotValidSmiValue(Register src,
|
1624
|
+
LabelType* on_invalid) {
|
1625
|
+
Condition is_valid = CheckInteger32ValidSmiValue(src);
|
1626
|
+
j(NegateCondition(is_valid), on_invalid);
|
1627
|
+
}
|
1628
|
+
|
1629
|
+
|
1630
|
+
template <typename LabelType>
|
1631
|
+
void MacroAssembler::JumpIfUIntNotValidSmiValue(Register src,
|
1632
|
+
LabelType* on_invalid) {
|
1633
|
+
Condition is_valid = CheckUInteger32ValidSmiValue(src);
|
1634
|
+
j(NegateCondition(is_valid), on_invalid);
|
1635
|
+
}
|
1636
|
+
|
1637
|
+
|
1638
|
+
template <typename LabelType>
|
1639
|
+
void MacroAssembler::JumpIfNotBothSmi(Register src1,
|
1640
|
+
Register src2,
|
1641
|
+
LabelType* on_not_both_smi) {
|
1642
|
+
Condition both_smi = CheckBothSmi(src1, src2);
|
1643
|
+
j(NegateCondition(both_smi), on_not_both_smi);
|
1644
|
+
}
|
1645
|
+
|
1646
|
+
|
1647
|
+
template <typename LabelType>
|
1648
|
+
void MacroAssembler::JumpUnlessBothNonNegativeSmi(Register src1,
|
1649
|
+
Register src2,
|
1650
|
+
LabelType* on_not_both_smi) {
|
1651
|
+
Condition both_smi = CheckBothNonNegativeSmi(src1, src2);
|
1652
|
+
j(NegateCondition(both_smi), on_not_both_smi);
|
1653
|
+
}
|
1654
|
+
|
1655
|
+
|
1656
|
+
template <typename LabelType>
|
1657
|
+
void MacroAssembler::JumpIfNotString(Register object,
|
1658
|
+
Register object_map,
|
1659
|
+
LabelType* not_string) {
|
1660
|
+
Condition is_smi = CheckSmi(object);
|
1661
|
+
j(is_smi, not_string);
|
1662
|
+
CmpObjectType(object, FIRST_NONSTRING_TYPE, object_map);
|
1663
|
+
j(above_equal, not_string);
|
1664
|
+
}
|
1665
|
+
|
1666
|
+
|
1667
|
+
template <typename LabelType>
|
1668
|
+
void MacroAssembler::JumpIfNotBothSequentialAsciiStrings(Register first_object,
|
1669
|
+
Register second_object,
|
1670
|
+
Register scratch1,
|
1671
|
+
Register scratch2,
|
1672
|
+
LabelType* on_fail) {
|
1673
|
+
// Check that both objects are not smis.
|
1674
|
+
Condition either_smi = CheckEitherSmi(first_object, second_object);
|
1675
|
+
j(either_smi, on_fail);
|
1676
|
+
|
1677
|
+
// Load instance type for both strings.
|
1678
|
+
movq(scratch1, FieldOperand(first_object, HeapObject::kMapOffset));
|
1679
|
+
movq(scratch2, FieldOperand(second_object, HeapObject::kMapOffset));
|
1680
|
+
movzxbl(scratch1, FieldOperand(scratch1, Map::kInstanceTypeOffset));
|
1681
|
+
movzxbl(scratch2, FieldOperand(scratch2, Map::kInstanceTypeOffset));
|
1682
|
+
|
1683
|
+
// Check that both are flat ascii strings.
|
1684
|
+
ASSERT(kNotStringTag != 0);
|
1685
|
+
const int kFlatAsciiStringMask =
|
1686
|
+
kIsNotStringMask | kStringRepresentationMask | kStringEncodingMask;
|
1687
|
+
const int kFlatAsciiStringTag = ASCII_STRING_TYPE;
|
1688
|
+
|
1689
|
+
andl(scratch1, Immediate(kFlatAsciiStringMask));
|
1690
|
+
andl(scratch2, Immediate(kFlatAsciiStringMask));
|
1691
|
+
// Interleave the bits to check both scratch1 and scratch2 in one test.
|
1692
|
+
ASSERT_EQ(0, kFlatAsciiStringMask & (kFlatAsciiStringMask << 3));
|
1693
|
+
lea(scratch1, Operand(scratch1, scratch2, times_8, 0));
|
1694
|
+
cmpl(scratch1,
|
1695
|
+
Immediate(kFlatAsciiStringTag + (kFlatAsciiStringTag << 3)));
|
1696
|
+
j(not_equal, on_fail);
|
1697
|
+
}
|
1698
|
+
|
1699
|
+
|
1700
|
+
template <typename LabelType>
|
1701
|
+
void MacroAssembler::JumpIfInstanceTypeIsNotSequentialAscii(
|
1702
|
+
Register instance_type,
|
1703
|
+
Register scratch,
|
1704
|
+
LabelType *failure) {
|
1705
|
+
if (!scratch.is(instance_type)) {
|
1706
|
+
movl(scratch, instance_type);
|
1707
|
+
}
|
1708
|
+
|
1709
|
+
const int kFlatAsciiStringMask =
|
1710
|
+
kIsNotStringMask | kStringRepresentationMask | kStringEncodingMask;
|
1711
|
+
|
1712
|
+
andl(scratch, Immediate(kFlatAsciiStringMask));
|
1713
|
+
cmpl(scratch, Immediate(kStringTag | kSeqStringTag | kAsciiStringTag));
|
1714
|
+
j(not_equal, failure);
|
1715
|
+
}
|
1716
|
+
|
1717
|
+
|
1718
|
+
template <typename LabelType>
|
1719
|
+
void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialAscii(
|
1720
|
+
Register first_object_instance_type,
|
1721
|
+
Register second_object_instance_type,
|
1722
|
+
Register scratch1,
|
1723
|
+
Register scratch2,
|
1724
|
+
LabelType* on_fail) {
|
1725
|
+
// Load instance type for both strings.
|
1726
|
+
movq(scratch1, first_object_instance_type);
|
1727
|
+
movq(scratch2, second_object_instance_type);
|
1728
|
+
|
1729
|
+
// Check that both are flat ascii strings.
|
1730
|
+
ASSERT(kNotStringTag != 0);
|
1731
|
+
const int kFlatAsciiStringMask =
|
1732
|
+
kIsNotStringMask | kStringRepresentationMask | kStringEncodingMask;
|
1733
|
+
const int kFlatAsciiStringTag = ASCII_STRING_TYPE;
|
1734
|
+
|
1735
|
+
andl(scratch1, Immediate(kFlatAsciiStringMask));
|
1736
|
+
andl(scratch2, Immediate(kFlatAsciiStringMask));
|
1737
|
+
// Interleave the bits to check both scratch1 and scratch2 in one test.
|
1738
|
+
ASSERT_EQ(0, kFlatAsciiStringMask & (kFlatAsciiStringMask << 3));
|
1739
|
+
lea(scratch1, Operand(scratch1, scratch2, times_8, 0));
|
1740
|
+
cmpl(scratch1,
|
1741
|
+
Immediate(kFlatAsciiStringTag + (kFlatAsciiStringTag << 3)));
|
1742
|
+
j(not_equal, on_fail);
|
1743
|
+
}
|
1744
|
+
|
1745
|
+
|
1746
|
+
template <typename LabelType>
|
1747
|
+
void MacroAssembler::InNewSpace(Register object,
|
1748
|
+
Register scratch,
|
1749
|
+
Condition cc,
|
1750
|
+
LabelType* branch) {
|
1751
|
+
if (Serializer::enabled()) {
|
1752
|
+
// Can't do arithmetic on external references if it might get serialized.
|
1753
|
+
// The mask isn't really an address. We load it as an external reference in
|
1754
|
+
// case the size of the new space is different between the snapshot maker
|
1755
|
+
// and the running system.
|
1756
|
+
if (scratch.is(object)) {
|
1757
|
+
movq(kScratchRegister, ExternalReference::new_space_mask());
|
1758
|
+
and_(scratch, kScratchRegister);
|
1759
|
+
} else {
|
1760
|
+
movq(scratch, ExternalReference::new_space_mask());
|
1761
|
+
and_(scratch, object);
|
1762
|
+
}
|
1763
|
+
movq(kScratchRegister, ExternalReference::new_space_start());
|
1764
|
+
cmpq(scratch, kScratchRegister);
|
1765
|
+
j(cc, branch);
|
1766
|
+
} else {
|
1767
|
+
ASSERT(is_int32(static_cast<int64_t>(Heap::NewSpaceMask())));
|
1768
|
+
intptr_t new_space_start =
|
1769
|
+
reinterpret_cast<intptr_t>(Heap::NewSpaceStart());
|
1770
|
+
movq(kScratchRegister, -new_space_start, RelocInfo::NONE);
|
1771
|
+
if (scratch.is(object)) {
|
1772
|
+
addq(scratch, kScratchRegister);
|
1773
|
+
} else {
|
1774
|
+
lea(scratch, Operand(object, kScratchRegister, times_1, 0));
|
1775
|
+
}
|
1776
|
+
and_(scratch, Immediate(static_cast<int32_t>(Heap::NewSpaceMask())));
|
1777
|
+
j(cc, branch);
|
1778
|
+
}
|
1779
|
+
}
|
1780
|
+
|
1781
|
+
|
1782
|
+
template <typename LabelType>
|
1783
|
+
void MacroAssembler::InvokePrologue(const ParameterCount& expected,
|
1784
|
+
const ParameterCount& actual,
|
1785
|
+
Handle<Code> code_constant,
|
1786
|
+
Register code_register,
|
1787
|
+
LabelType* done,
|
1788
|
+
InvokeFlag flag,
|
1789
|
+
PostCallGenerator* post_call_generator) {
|
1790
|
+
bool definitely_matches = false;
|
1791
|
+
NearLabel invoke;
|
1792
|
+
if (expected.is_immediate()) {
|
1793
|
+
ASSERT(actual.is_immediate());
|
1794
|
+
if (expected.immediate() == actual.immediate()) {
|
1795
|
+
definitely_matches = true;
|
1796
|
+
} else {
|
1797
|
+
Set(rax, actual.immediate());
|
1798
|
+
if (expected.immediate() ==
|
1799
|
+
SharedFunctionInfo::kDontAdaptArgumentsSentinel) {
|
1800
|
+
// Don't worry about adapting arguments for built-ins that
|
1801
|
+
// don't want that done. Skip adaption code by making it look
|
1802
|
+
// like we have a match between expected and actual number of
|
1803
|
+
// arguments.
|
1804
|
+
definitely_matches = true;
|
1805
|
+
} else {
|
1806
|
+
Set(rbx, expected.immediate());
|
1807
|
+
}
|
1808
|
+
}
|
1809
|
+
} else {
|
1810
|
+
if (actual.is_immediate()) {
|
1811
|
+
// Expected is in register, actual is immediate. This is the
|
1812
|
+
// case when we invoke function values without going through the
|
1813
|
+
// IC mechanism.
|
1814
|
+
cmpq(expected.reg(), Immediate(actual.immediate()));
|
1815
|
+
j(equal, &invoke);
|
1816
|
+
ASSERT(expected.reg().is(rbx));
|
1817
|
+
Set(rax, actual.immediate());
|
1818
|
+
} else if (!expected.reg().is(actual.reg())) {
|
1819
|
+
// Both expected and actual are in (different) registers. This
|
1820
|
+
// is the case when we invoke functions using call and apply.
|
1821
|
+
cmpq(expected.reg(), actual.reg());
|
1822
|
+
j(equal, &invoke);
|
1823
|
+
ASSERT(actual.reg().is(rax));
|
1824
|
+
ASSERT(expected.reg().is(rbx));
|
1825
|
+
}
|
1826
|
+
}
|
1827
|
+
|
1828
|
+
if (!definitely_matches) {
|
1829
|
+
Handle<Code> adaptor =
|
1830
|
+
Handle<Code>(Builtins::builtin(Builtins::ArgumentsAdaptorTrampoline));
|
1831
|
+
if (!code_constant.is_null()) {
|
1832
|
+
movq(rdx, code_constant, RelocInfo::EMBEDDED_OBJECT);
|
1833
|
+
addq(rdx, Immediate(Code::kHeaderSize - kHeapObjectTag));
|
1834
|
+
} else if (!code_register.is(rdx)) {
|
1835
|
+
movq(rdx, code_register);
|
1836
|
+
}
|
1837
|
+
|
1838
|
+
if (flag == CALL_FUNCTION) {
|
1839
|
+
Call(adaptor, RelocInfo::CODE_TARGET);
|
1840
|
+
if (post_call_generator != NULL) post_call_generator->Generate();
|
1841
|
+
jmp(done);
|
1842
|
+
} else {
|
1843
|
+
Jump(adaptor, RelocInfo::CODE_TARGET);
|
1844
|
+
}
|
1845
|
+
bind(&invoke);
|
1846
|
+
}
|
1847
|
+
}
|
1848
|
+
|
1849
|
+
|
1850
|
+
} } // namespace v8::internal
|
1851
|
+
|
1852
|
+
#endif // V8_X64_MACRO_ASSEMBLER_X64_H_
|