therubyracer 0.8.1.pre2 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of therubyracer might be problematic. Click here for more details.
- data/Changelog.md +2 -1
- data/README.md +6 -3
- data/ext/v8/upstream/3.1.8/.gitignore +31 -0
- data/ext/v8/upstream/3.1.8/AUTHORS +40 -0
- data/ext/v8/upstream/3.1.8/ChangeLog +2566 -0
- data/ext/v8/upstream/3.1.8/LICENSE +52 -0
- data/ext/v8/upstream/3.1.8/LICENSE.strongtalk +29 -0
- data/ext/v8/upstream/3.1.8/LICENSE.v8 +26 -0
- data/ext/v8/upstream/3.1.8/LICENSE.valgrind +45 -0
- data/ext/v8/upstream/3.1.8/SConstruct +1192 -0
- data/ext/v8/upstream/3.1.8/build/README.txt +25 -0
- data/ext/v8/upstream/3.1.8/build/all.gyp +18 -0
- data/ext/v8/upstream/3.1.8/build/armu.gypi +32 -0
- data/ext/v8/upstream/3.1.8/build/common.gypi +82 -0
- data/ext/v8/upstream/3.1.8/build/gyp_v8 +145 -0
- data/ext/v8/upstream/3.1.8/include/v8-debug.h +384 -0
- data/ext/v8/upstream/3.1.8/include/v8-preparser.h +116 -0
- data/ext/v8/upstream/3.1.8/include/v8-profiler.h +426 -0
- data/ext/v8/upstream/3.1.8/include/v8-testing.h +99 -0
- data/ext/v8/upstream/3.1.8/include/v8.h +3846 -0
- data/ext/v8/upstream/3.1.8/include/v8stdint.h +53 -0
- data/ext/v8/upstream/3.1.8/preparser/preparser-process.cc +206 -0
- data/ext/v8/upstream/3.1.8/src/SConscript +356 -0
- data/ext/v8/upstream/3.1.8/src/accessors.cc +907 -0
- data/ext/v8/upstream/3.1.8/src/accessors.h +121 -0
- data/ext/v8/upstream/3.1.8/src/allocation.cc +204 -0
- data/ext/v8/upstream/3.1.8/src/allocation.h +176 -0
- data/ext/v8/upstream/3.1.8/src/api.cc +5191 -0
- data/ext/v8/upstream/3.1.8/src/api.h +508 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/apinatives.js +0 -0
- data/ext/v8/upstream/3.1.8/src/apiutils.h +80 -0
- data/ext/v8/upstream/3.1.8/src/arguments.h +105 -0
- data/ext/v8/upstream/3.1.8/src/arm/assembler-arm-inl.h +352 -0
- data/ext/v8/upstream/3.1.8/src/arm/assembler-arm.cc +2756 -0
- data/ext/v8/upstream/3.1.8/src/arm/assembler-arm.h +1294 -0
- data/ext/v8/upstream/3.1.8/src/arm/builtins-arm.cc +1628 -0
- data/ext/v8/upstream/3.1.8/src/arm/code-stubs-arm.cc +6783 -0
- data/ext/v8/upstream/3.1.8/src/arm/code-stubs-arm.h +657 -0
- data/ext/v8/upstream/3.1.8/src/arm/codegen-arm-inl.h +48 -0
- data/ext/v8/upstream/3.1.8/src/arm/codegen-arm.cc +7403 -0
- data/ext/v8/upstream/3.1.8/src/arm/codegen-arm.h +595 -0
- data/ext/v8/upstream/3.1.8/src/arm/constants-arm.cc +152 -0
- data/ext/v8/upstream/3.1.8/src/arm/constants-arm.h +769 -0
- data/ext/v8/upstream/3.1.8/src/arm/cpu-arm.cc +147 -0
- data/ext/v8/upstream/3.1.8/src/arm/debug-arm.cc +315 -0
- data/ext/v8/upstream/3.1.8/src/arm/deoptimizer-arm.cc +700 -0
- data/ext/v8/upstream/3.1.8/src/arm/disasm-arm.cc +1439 -0
- data/ext/v8/upstream/3.1.8/src/arm/frames-arm.cc +45 -0
- data/ext/v8/upstream/3.1.8/src/arm/frames-arm.h +168 -0
- data/ext/v8/upstream/3.1.8/src/arm/full-codegen-arm.cc +4230 -0
- data/ext/v8/upstream/3.1.8/src/arm/ic-arm.cc +1799 -0
- data/ext/v8/upstream/3.1.8/src/arm/jump-target-arm.cc +174 -0
- data/ext/v8/upstream/3.1.8/src/arm/lithium-arm.cc +2041 -0
- data/ext/v8/upstream/3.1.8/src/arm/lithium-arm.h +2046 -0
- data/ext/v8/upstream/3.1.8/src/arm/lithium-codegen-arm.cc +3822 -0
- data/ext/v8/upstream/3.1.8/src/arm/lithium-codegen-arm.h +312 -0
- data/ext/v8/upstream/3.1.8/src/arm/lithium-gap-resolver-arm.cc +303 -0
- data/ext/v8/upstream/3.1.8/src/arm/lithium-gap-resolver-arm.h +84 -0
- data/ext/v8/upstream/3.1.8/src/arm/macro-assembler-arm.cc +2701 -0
- data/ext/v8/upstream/3.1.8/src/arm/macro-assembler-arm.h +1015 -0
- data/ext/v8/upstream/3.1.8/src/arm/regexp-macro-assembler-arm.cc +1280 -0
- data/ext/v8/upstream/3.1.8/src/arm/regexp-macro-assembler-arm.h +252 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm.h +0 -0
- data/ext/v8/upstream/3.1.8/src/arm/simulator-arm.cc +3165 -0
- data/ext/v8/upstream/3.1.8/src/arm/simulator-arm.h +402 -0
- data/ext/v8/upstream/3.1.8/src/arm/stub-cache-arm.cc +4077 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/virtual-frame-arm-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/arm/virtual-frame-arm.cc +843 -0
- data/ext/v8/upstream/3.1.8/src/arm/virtual-frame-arm.h +520 -0
- data/ext/v8/upstream/3.1.8/src/array.js +1231 -0
- data/ext/v8/upstream/3.1.8/src/assembler.cc +973 -0
- data/ext/v8/upstream/3.1.8/src/assembler.h +787 -0
- data/ext/v8/upstream/3.1.8/src/ast-inl.h +107 -0
- data/ext/v8/upstream/3.1.8/src/ast.cc +1067 -0
- data/ext/v8/upstream/3.1.8/src/ast.h +2177 -0
- data/ext/v8/upstream/3.1.8/src/atomicops.h +165 -0
- data/ext/v8/upstream/3.1.8/src/atomicops_internals_arm_gcc.h +145 -0
- data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_gcc.cc +126 -0
- data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_gcc.h +287 -0
- data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_macosx.h +301 -0
- data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_msvc.h +203 -0
- data/ext/v8/upstream/3.1.8/src/bignum-dtoa.cc +655 -0
- data/ext/v8/upstream/3.1.8/src/bignum-dtoa.h +81 -0
- data/ext/v8/upstream/3.1.8/src/bignum.cc +768 -0
- data/ext/v8/upstream/3.1.8/src/bignum.h +140 -0
- data/ext/v8/upstream/3.1.8/src/bootstrapper.cc +1888 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/bootstrapper.h +0 -0
- data/ext/v8/upstream/3.1.8/src/builtins.cc +1586 -0
- data/ext/v8/upstream/3.1.8/src/builtins.h +339 -0
- data/ext/v8/upstream/3.1.8/src/bytecodes-irregexp.h +105 -0
- data/ext/v8/upstream/3.1.8/src/cached-powers.cc +177 -0
- data/ext/v8/upstream/3.1.8/src/cached-powers.h +65 -0
- data/ext/v8/upstream/3.1.8/src/char-predicates-inl.h +94 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/char-predicates.h +0 -0
- data/ext/v8/upstream/3.1.8/src/checks.cc +110 -0
- data/ext/v8/upstream/3.1.8/src/checks.h +292 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/circular-queue-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/circular-queue.cc +122 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/circular-queue.h +0 -0
- data/ext/v8/upstream/3.1.8/src/code-stubs.cc +230 -0
- data/ext/v8/upstream/3.1.8/src/code-stubs.h +950 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/code.h +0 -0
- data/ext/v8/upstream/3.1.8/src/codegen-inl.h +64 -0
- data/ext/v8/upstream/3.1.8/src/codegen.cc +495 -0
- data/ext/v8/upstream/3.1.8/src/codegen.h +245 -0
- data/ext/v8/upstream/3.1.8/src/compilation-cache.cc +654 -0
- data/ext/v8/upstream/3.1.8/src/compilation-cache.h +112 -0
- data/ext/v8/upstream/3.1.8/src/compiler.cc +806 -0
- data/ext/v8/upstream/3.1.8/src/compiler.h +290 -0
- data/ext/v8/upstream/3.1.8/src/contexts.cc +320 -0
- data/ext/v8/upstream/3.1.8/src/contexts.h +376 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/conversions-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/conversions.cc +1069 -0
- data/ext/v8/upstream/3.1.8/src/conversions.h +122 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/counters.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/counters.h +242 -0
- data/ext/v8/upstream/3.1.8/src/cpu-profiler-inl.h +100 -0
- data/ext/v8/upstream/3.1.8/src/cpu-profiler.cc +554 -0
- data/ext/v8/upstream/3.1.8/src/cpu-profiler.h +291 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/cpu.h +0 -0
- data/ext/v8/upstream/3.1.8/src/d8-debug.cc +367 -0
- data/ext/v8/upstream/3.1.8/src/d8-debug.h +157 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-posix.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-readline.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-windows.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/d8.cc +792 -0
- data/ext/v8/upstream/3.1.8/src/d8.gyp +85 -0
- data/ext/v8/upstream/3.1.8/src/d8.h +231 -0
- data/ext/v8/upstream/3.1.8/src/d8.js +2798 -0
- data/ext/v8/upstream/3.1.8/src/data-flow.cc +545 -0
- data/ext/v8/upstream/3.1.8/src/data-flow.h +379 -0
- data/ext/v8/upstream/3.1.8/src/date.js +1103 -0
- data/ext/v8/upstream/3.1.8/src/dateparser-inl.h +125 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/dateparser.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/dateparser.h +263 -0
- data/ext/v8/upstream/3.1.8/src/debug-agent.cc +446 -0
- data/ext/v8/upstream/3.1.8/src/debug-agent.h +131 -0
- data/ext/v8/upstream/3.1.8/src/debug-debugger.js +2569 -0
- data/ext/v8/upstream/3.1.8/src/debug.cc +3085 -0
- data/ext/v8/upstream/3.1.8/src/debug.h +1025 -0
- data/ext/v8/upstream/3.1.8/src/deoptimizer.cc +1185 -0
- data/ext/v8/upstream/3.1.8/src/deoptimizer.h +529 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/disasm.h +0 -0
- data/ext/v8/upstream/3.1.8/src/disassembler.cc +338 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/disassembler.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/diy-fp.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/diy-fp.h +0 -0
- data/ext/v8/upstream/3.1.8/src/double.h +238 -0
- data/ext/v8/upstream/3.1.8/src/dtoa.cc +103 -0
- data/ext/v8/upstream/3.1.8/src/dtoa.h +85 -0
- data/ext/v8/upstream/3.1.8/src/execution.cc +735 -0
- data/ext/v8/upstream/3.1.8/src/execution.h +322 -0
- data/ext/v8/upstream/3.1.8/src/extensions/experimental/experimental.gyp +53 -0
- data/ext/v8/upstream/3.1.8/src/extensions/experimental/i18n-extension.cc +264 -0
- data/ext/v8/upstream/3.1.8/src/extensions/experimental/i18n-extension.h +64 -0
- data/ext/v8/upstream/3.1.8/src/extensions/externalize-string-extension.cc +141 -0
- data/ext/v8/upstream/3.1.8/src/extensions/externalize-string-extension.h +50 -0
- data/ext/v8/upstream/3.1.8/src/extensions/gc-extension.cc +58 -0
- data/ext/v8/upstream/3.1.8/src/extensions/gc-extension.h +49 -0
- data/ext/v8/upstream/3.1.8/src/factory.cc +1087 -0
- data/ext/v8/upstream/3.1.8/src/factory.h +432 -0
- data/ext/v8/upstream/3.1.8/src/fast-dtoa.cc +736 -0
- data/ext/v8/upstream/3.1.8/src/fast-dtoa.h +83 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/fixed-dtoa.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/fixed-dtoa.h +0 -0
- data/ext/v8/upstream/3.1.8/src/flag-definitions.h +552 -0
- data/ext/v8/upstream/3.1.8/src/flags.cc +551 -0
- data/ext/v8/upstream/3.1.8/src/flags.h +79 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/frame-element.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/frame-element.h +277 -0
- data/ext/v8/upstream/3.1.8/src/frames-inl.h +210 -0
- data/ext/v8/upstream/3.1.8/src/frames.cc +1232 -0
- data/ext/v8/upstream/3.1.8/src/frames.h +826 -0
- data/ext/v8/upstream/3.1.8/src/full-codegen.cc +1382 -0
- data/ext/v8/upstream/3.1.8/src/full-codegen.h +751 -0
- data/ext/v8/upstream/3.1.8/src/func-name-inferrer.cc +90 -0
- data/ext/v8/upstream/3.1.8/src/func-name-inferrer.h +111 -0
- data/ext/v8/upstream/3.1.8/src/gdb-jit.cc +1547 -0
- data/ext/v8/upstream/3.1.8/src/gdb-jit.h +138 -0
- data/ext/v8/upstream/3.1.8/src/global-handles.cc +534 -0
- data/ext/v8/upstream/3.1.8/src/global-handles.h +181 -0
- data/ext/v8/upstream/3.1.8/src/globals.h +325 -0
- data/ext/v8/upstream/3.1.8/src/handles-inl.h +80 -0
- data/ext/v8/upstream/3.1.8/src/handles.cc +910 -0
- data/ext/v8/upstream/3.1.8/src/handles.h +424 -0
- data/ext/v8/upstream/3.1.8/src/hashmap.cc +230 -0
- data/ext/v8/upstream/3.1.8/src/hashmap.h +121 -0
- data/ext/v8/upstream/3.1.8/src/heap-inl.h +587 -0
- data/ext/v8/upstream/3.1.8/src/heap-profiler.cc +1128 -0
- data/ext/v8/upstream/3.1.8/src/heap-profiler.h +381 -0
- data/ext/v8/upstream/3.1.8/src/heap.cc +5610 -0
- data/ext/v8/upstream/3.1.8/src/heap.h +2218 -0
- data/ext/v8/upstream/3.1.8/src/hydrogen-instructions.cc +1490 -0
- data/ext/v8/upstream/3.1.8/src/hydrogen-instructions.h +3493 -0
- data/ext/v8/upstream/3.1.8/src/hydrogen.cc +6056 -0
- data/ext/v8/upstream/3.1.8/src/hydrogen.h +1091 -0
- data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32-inl.h +429 -0
- data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32.cc +2800 -0
- data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32.h +1093 -0
- data/ext/v8/upstream/3.1.8/src/ia32/builtins-ia32.cc +1590 -0
- data/ext/v8/upstream/3.1.8/src/ia32/code-stubs-ia32.cc +6624 -0
- data/ext/v8/upstream/3.1.8/src/ia32/code-stubs-ia32.h +536 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/codegen-ia32-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/ia32/codegen-ia32.cc +10354 -0
- data/ext/v8/upstream/3.1.8/src/ia32/codegen-ia32.h +798 -0
- data/ext/v8/upstream/3.1.8/src/ia32/cpu-ia32.cc +87 -0
- data/ext/v8/upstream/3.1.8/src/ia32/debug-ia32.cc +309 -0
- data/ext/v8/upstream/3.1.8/src/ia32/deoptimizer-ia32.cc +664 -0
- data/ext/v8/upstream/3.1.8/src/ia32/disasm-ia32.cc +1597 -0
- data/ext/v8/upstream/3.1.8/src/ia32/frames-ia32.cc +45 -0
- data/ext/v8/upstream/3.1.8/src/ia32/frames-ia32.h +140 -0
- data/ext/v8/upstream/3.1.8/src/ia32/full-codegen-ia32.cc +4278 -0
- data/ext/v8/upstream/3.1.8/src/ia32/ic-ia32.cc +1786 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/jump-target-ia32.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-codegen-ia32.cc +3880 -0
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-codegen-ia32.h +309 -0
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-gap-resolver-ia32.cc +460 -0
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-gap-resolver-ia32.h +110 -0
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-ia32.cc +2095 -0
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-ia32.h +2127 -0
- data/ext/v8/upstream/3.1.8/src/ia32/macro-assembler-ia32.cc +2031 -0
- data/ext/v8/upstream/3.1.8/src/ia32/macro-assembler-ia32.h +798 -0
- data/ext/v8/upstream/3.1.8/src/ia32/regexp-macro-assembler-ia32.cc +1253 -0
- data/ext/v8/upstream/3.1.8/src/ia32/regexp-macro-assembler-ia32.h +215 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/simulator-ia32.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/ia32/simulator-ia32.h +72 -0
- data/ext/v8/upstream/3.1.8/src/ia32/stub-cache-ia32.cc +3732 -0
- data/ext/v8/upstream/3.1.8/src/ia32/virtual-frame-ia32.cc +1360 -0
- data/ext/v8/upstream/3.1.8/src/ia32/virtual-frame-ia32.h +646 -0
- data/ext/v8/upstream/3.1.8/src/ic-inl.h +129 -0
- data/ext/v8/upstream/3.1.8/src/ic.cc +2333 -0
- data/ext/v8/upstream/3.1.8/src/ic.h +639 -0
- data/ext/v8/upstream/3.1.8/src/inspector.cc +63 -0
- data/ext/v8/upstream/3.1.8/src/inspector.h +62 -0
- data/ext/v8/upstream/3.1.8/src/interpreter-irregexp.cc +655 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/interpreter-irregexp.h +0 -0
- data/ext/v8/upstream/3.1.8/src/json.js +342 -0
- data/ext/v8/upstream/3.1.8/src/jsregexp.cc +5340 -0
- data/ext/v8/upstream/3.1.8/src/jsregexp.h +1484 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-heavy-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/jump-target-heavy.cc +430 -0
- data/ext/v8/upstream/3.1.8/src/jump-target-heavy.h +244 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-light-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/jump-target-light.cc +111 -0
- data/ext/v8/upstream/3.1.8/src/jump-target-light.h +193 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target.h +0 -0
- data/ext/v8/upstream/3.1.8/src/list-inl.h +206 -0
- data/ext/v8/upstream/3.1.8/src/list.h +164 -0
- data/ext/v8/upstream/3.1.8/src/lithium-allocator-inl.h +140 -0
- data/ext/v8/upstream/3.1.8/src/lithium-allocator.cc +2093 -0
- data/ext/v8/upstream/3.1.8/src/lithium-allocator.h +644 -0
- data/ext/v8/upstream/3.1.8/src/lithium.cc +168 -0
- data/ext/v8/upstream/3.1.8/src/lithium.h +592 -0
- data/ext/v8/upstream/3.1.8/src/liveedit-debugger.js +1082 -0
- data/ext/v8/upstream/3.1.8/src/liveedit.cc +1650 -0
- data/ext/v8/upstream/3.1.8/src/liveedit.h +174 -0
- data/ext/v8/upstream/3.1.8/src/liveobjectlist-inl.h +126 -0
- data/ext/v8/upstream/3.1.8/src/liveobjectlist.cc +2527 -0
- data/ext/v8/upstream/3.1.8/src/liveobjectlist.h +322 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/log-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/log-utils.cc +336 -0
- data/ext/v8/upstream/3.1.8/src/log-utils.h +232 -0
- data/ext/v8/upstream/3.1.8/src/log.cc +1608 -0
- data/ext/v8/upstream/3.1.8/src/log.h +379 -0
- data/ext/v8/upstream/3.1.8/src/macro-assembler.h +120 -0
- data/ext/v8/upstream/3.1.8/src/macros.py +178 -0
- data/ext/v8/upstream/3.1.8/src/mark-compact.cc +2957 -0
- data/ext/v8/upstream/3.1.8/src/mark-compact.h +433 -0
- data/ext/v8/upstream/3.1.8/src/math.js +264 -0
- data/ext/v8/upstream/3.1.8/src/memory.h +82 -0
- data/ext/v8/upstream/3.1.8/src/messages.cc +164 -0
- data/ext/v8/upstream/3.1.8/src/messages.h +114 -0
- data/ext/v8/upstream/3.1.8/src/messages.js +1071 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/assembler-mips-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/assembler-mips.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/mips/assembler-mips.h +667 -0
- data/ext/v8/upstream/3.1.8/src/mips/builtins-mips.cc +205 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/codegen-mips-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/codegen-mips.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/mips/codegen-mips.h +431 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/constants-mips.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/constants-mips.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/cpu-mips.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/mips/debug-mips.cc +127 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/disasm-mips.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/fast-codegen-mips.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/mips/frames-mips.cc +96 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/frames-mips.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/full-codegen-mips.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/mips/ic-mips.cc +208 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/jump-target-mips.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/macro-assembler-mips.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/macro-assembler-mips.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips.h +0 -0
- data/ext/v8/upstream/3.1.8/src/mips/simulator-mips.cc +1650 -0
- data/ext/v8/upstream/3.1.8/src/mips/simulator-mips.h +311 -0
- data/ext/v8/upstream/3.1.8/src/mips/stub-cache-mips.cc +418 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/virtual-frame-mips.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/virtual-frame-mips.h +0 -0
- data/ext/v8/upstream/3.1.8/src/mirror-debugger.js +2380 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mksnapshot.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/natives.h +0 -0
- data/ext/v8/upstream/3.1.8/src/objects-debug.cc +722 -0
- data/ext/v8/upstream/3.1.8/src/objects-inl.h +3946 -0
- data/ext/v8/upstream/3.1.8/src/objects-printer.cc +801 -0
- data/ext/v8/upstream/3.1.8/src/objects-visiting.cc +142 -0
- data/ext/v8/upstream/3.1.8/src/objects-visiting.h +401 -0
- data/ext/v8/upstream/3.1.8/src/objects.cc +10044 -0
- data/ext/v8/upstream/3.1.8/src/objects.h +6571 -0
- data/ext/v8/upstream/3.1.8/src/parser.cc +5165 -0
- data/ext/v8/upstream/3.1.8/src/parser.h +802 -0
- data/ext/v8/upstream/3.1.8/src/platform-cygwin.cc +745 -0
- data/ext/v8/upstream/3.1.8/src/platform-freebsd.cc +702 -0
- data/ext/v8/upstream/3.1.8/src/platform-linux.cc +981 -0
- data/ext/v8/upstream/3.1.8/src/platform-macos.cc +732 -0
- data/ext/v8/upstream/3.1.8/src/platform-nullos.cc +498 -0
- data/ext/v8/upstream/3.1.8/src/platform-openbsd.cc +657 -0
- data/ext/v8/upstream/3.1.8/src/platform-posix.cc +399 -0
- data/ext/v8/upstream/3.1.8/src/platform-solaris.cc +714 -0
- data/ext/v8/upstream/3.1.8/src/platform-win32.cc +1974 -0
- data/ext/v8/upstream/3.1.8/src/platform.h +636 -0
- data/ext/v8/upstream/3.1.8/src/preparse-data.cc +183 -0
- data/ext/v8/upstream/3.1.8/src/preparse-data.h +249 -0
- data/ext/v8/upstream/3.1.8/src/preparser-api.cc +213 -0
- data/ext/v8/upstream/3.1.8/src/preparser.cc +1205 -0
- data/ext/v8/upstream/3.1.8/src/preparser.h +278 -0
- data/ext/v8/upstream/3.1.8/src/prettyprinter.cc +1539 -0
- data/ext/v8/upstream/3.1.8/src/prettyprinter.h +223 -0
- data/ext/v8/upstream/3.1.8/src/profile-generator-inl.h +128 -0
- data/ext/v8/upstream/3.1.8/src/profile-generator.cc +2899 -0
- data/ext/v8/upstream/3.1.8/src/profile-generator.h +1151 -0
- data/ext/v8/upstream/3.1.8/src/property.cc +96 -0
- data/ext/v8/upstream/3.1.8/src/property.h +337 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-macro-assembler-irregexp-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-irregexp.cc +470 -0
- data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-irregexp.h +142 -0
- data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-tracer.cc +373 -0
- data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-tracer.h +104 -0
- data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler.cc +257 -0
- data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler.h +231 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-stack.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-stack.h +0 -0
- data/ext/v8/upstream/3.1.8/src/regexp.js +483 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator.h +0 -0
- data/ext/v8/upstream/3.1.8/src/rewriter.cc +1023 -0
- data/ext/v8/upstream/3.1.8/src/rewriter.h +59 -0
- data/ext/v8/upstream/3.1.8/src/runtime-profiler.cc +443 -0
- data/ext/v8/upstream/3.1.8/src/runtime-profiler.h +77 -0
- data/ext/v8/upstream/3.1.8/src/runtime.cc +11592 -0
- data/ext/v8/upstream/3.1.8/src/runtime.h +582 -0
- data/ext/v8/upstream/3.1.8/src/runtime.js +643 -0
- data/ext/v8/upstream/3.1.8/src/safepoint-table.cc +253 -0
- data/ext/v8/upstream/3.1.8/src/safepoint-table.h +263 -0
- data/ext/v8/upstream/3.1.8/src/scanner-base.cc +971 -0
- data/ext/v8/upstream/3.1.8/src/scanner-base.h +653 -0
- data/ext/v8/upstream/3.1.8/src/scanner.cc +586 -0
- data/ext/v8/upstream/3.1.8/src/scanner.h +194 -0
- data/ext/v8/upstream/3.1.8/src/scopeinfo.cc +636 -0
- data/ext/v8/upstream/3.1.8/src/scopeinfo.h +238 -0
- data/ext/v8/upstream/3.1.8/src/scopes.cc +1063 -0
- data/ext/v8/upstream/3.1.8/src/scopes.h +494 -0
- data/ext/v8/upstream/3.1.8/src/serialize.cc +1535 -0
- data/ext/v8/upstream/3.1.8/src/serialize.h +584 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/shell.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/simulator.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/smart-pointer.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot-common.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot-empty.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot.h +0 -0
- data/ext/v8/upstream/3.1.8/src/spaces-inl.h +524 -0
- data/ext/v8/upstream/3.1.8/src/spaces.cc +3254 -0
- data/ext/v8/upstream/3.1.8/src/spaces.h +2362 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/splay-tree-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/splay-tree.h +0 -0
- data/ext/v8/upstream/3.1.8/src/string-search.cc +40 -0
- data/ext/v8/upstream/3.1.8/src/string-search.h +567 -0
- data/ext/v8/upstream/3.1.8/src/string-stream.cc +584 -0
- data/ext/v8/upstream/3.1.8/src/string-stream.h +191 -0
- data/ext/v8/upstream/3.1.8/src/string.js +915 -0
- data/ext/v8/upstream/3.1.8/src/strtod.cc +440 -0
- data/ext/v8/upstream/3.1.8/src/strtod.h +40 -0
- data/ext/v8/upstream/3.1.8/src/stub-cache.cc +1878 -0
- data/ext/v8/upstream/3.1.8/src/stub-cache.h +849 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/third_party/valgrind/valgrind.h +0 -0
- data/ext/v8/upstream/3.1.8/src/token.cc +63 -0
- data/ext/v8/upstream/3.1.8/src/token.h +288 -0
- data/ext/v8/upstream/3.1.8/src/top.cc +1152 -0
- data/ext/v8/upstream/3.1.8/src/top.h +608 -0
- data/ext/v8/upstream/3.1.8/src/type-info.cc +406 -0
- data/ext/v8/upstream/3.1.8/src/type-info.h +283 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/unbound-queue-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/unbound-queue.h +0 -0
- data/ext/v8/upstream/3.1.8/src/unicode-inl.h +238 -0
- data/ext/v8/upstream/3.1.8/src/unicode.cc +1624 -0
- data/ext/v8/upstream/3.1.8/src/unicode.h +280 -0
- data/ext/v8/upstream/3.1.8/src/uri.js +402 -0
- data/ext/v8/upstream/3.1.8/src/utils.cc +371 -0
- data/ext/v8/upstream/3.1.8/src/utils.h +793 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/v8-counters.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/v8-counters.h +290 -0
- data/ext/v8/upstream/3.1.8/src/v8.cc +270 -0
- data/ext/v8/upstream/3.1.8/src/v8.h +127 -0
- data/ext/v8/upstream/3.1.8/src/v8checks.h +64 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/v8dll-main.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/v8globals.h +480 -0
- data/ext/v8/upstream/3.1.8/src/v8natives.js +1252 -0
- data/ext/v8/upstream/3.1.8/src/v8preparserdll-main.cc +39 -0
- data/ext/v8/upstream/3.1.8/src/v8threads.cc +440 -0
- data/ext/v8/upstream/3.1.8/src/v8threads.h +157 -0
- data/ext/v8/upstream/3.1.8/src/v8utils.h +354 -0
- data/ext/v8/upstream/3.1.8/src/variables.cc +132 -0
- data/ext/v8/upstream/3.1.8/src/variables.h +212 -0
- data/ext/v8/upstream/3.1.8/src/version.cc +95 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/version.h +0 -0
- data/ext/v8/upstream/3.1.8/src/virtual-frame-heavy-inl.h +190 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-heavy.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-light-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-light.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/virtual-frame.h +59 -0
- data/ext/v8/upstream/3.1.8/src/vm-state-inl.h +134 -0
- data/ext/v8/upstream/3.1.8/src/vm-state.h +68 -0
- data/ext/v8/upstream/3.1.8/src/win32-headers.h +95 -0
- data/ext/v8/upstream/3.1.8/src/x64/assembler-x64-inl.h +455 -0
- data/ext/v8/upstream/3.1.8/src/x64/assembler-x64.cc +3162 -0
- data/ext/v8/upstream/3.1.8/src/x64/assembler-x64.h +1584 -0
- data/ext/v8/upstream/3.1.8/src/x64/builtins-x64.cc +1492 -0
- data/ext/v8/upstream/3.1.8/src/x64/code-stubs-x64.cc +5150 -0
- data/ext/v8/upstream/3.1.8/src/x64/code-stubs-x64.h +519 -0
- data/ext/v8/upstream/3.1.8/src/x64/codegen-x64-inl.h +46 -0
- data/ext/v8/upstream/3.1.8/src/x64/codegen-x64.cc +8835 -0
- data/ext/v8/upstream/3.1.8/src/x64/codegen-x64.h +750 -0
- data/ext/v8/upstream/3.1.8/src/x64/cpu-x64.cc +86 -0
- data/ext/v8/upstream/3.1.8/src/x64/debug-x64.cc +316 -0
- data/ext/v8/upstream/3.1.8/src/x64/deoptimizer-x64.cc +781 -0
- data/ext/v8/upstream/3.1.8/src/x64/disasm-x64.cc +1737 -0
- data/ext/v8/upstream/3.1.8/src/x64/frames-x64.cc +45 -0
- data/ext/v8/upstream/3.1.8/src/x64/frames-x64.h +130 -0
- data/ext/v8/upstream/3.1.8/src/x64/full-codegen-x64.cc +3984 -0
- data/ext/v8/upstream/3.1.8/src/x64/ic-x64.cc +1761 -0
- data/ext/v8/upstream/3.1.8/src/x64/jump-target-x64.cc +437 -0
- data/ext/v8/upstream/3.1.8/src/x64/lithium-codegen-x64.cc +3639 -0
- data/ext/v8/upstream/3.1.8/src/x64/lithium-codegen-x64.h +305 -0
- data/ext/v8/upstream/3.1.8/src/x64/lithium-gap-resolver-x64.cc +320 -0
- data/ext/v8/upstream/3.1.8/src/x64/lithium-gap-resolver-x64.h +74 -0
- data/ext/v8/upstream/3.1.8/src/x64/lithium-x64.cc +2044 -0
- data/ext/v8/upstream/3.1.8/src/x64/lithium-x64.h +2052 -0
- data/ext/v8/upstream/3.1.8/src/x64/macro-assembler-x64.cc +2660 -0
- data/ext/v8/upstream/3.1.8/src/x64/macro-assembler-x64.h +1852 -0
- data/ext/v8/upstream/3.1.8/src/x64/regexp-macro-assembler-x64.cc +1382 -0
- data/ext/v8/upstream/3.1.8/src/x64/regexp-macro-assembler-x64.h +278 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/simulator-x64.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/x64/simulator-x64.h +71 -0
- data/ext/v8/upstream/3.1.8/src/x64/stub-cache-x64.cc +3509 -0
- data/ext/v8/upstream/3.1.8/src/x64/virtual-frame-x64.cc +1292 -0
- data/ext/v8/upstream/3.1.8/src/x64/virtual-frame-x64.h +593 -0
- data/ext/v8/upstream/3.1.8/src/zone-inl.h +83 -0
- data/ext/v8/upstream/3.1.8/src/zone.cc +195 -0
- data/ext/v8/upstream/3.1.8/src/zone.h +233 -0
- data/ext/v8/upstream/3.1.8/tools/codemap.js +265 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/consarray.js +0 -0
- data/ext/v8/upstream/3.1.8/tools/csvparser.js +78 -0
- data/ext/v8/upstream/3.1.8/tools/disasm.py +92 -0
- data/ext/v8/upstream/3.1.8/tools/gc-nvp-trace-processor.py +328 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/generate-ten-powers.scm +0 -0
- data/ext/v8/upstream/3.1.8/tools/grokdump.py +840 -0
- data/ext/v8/upstream/3.1.8/tools/gyp/v8.gyp +869 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/js2c.py +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/jsmin.py +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/linux-tick-processor +0 -0
- data/ext/v8/upstream/3.1.8/tools/ll_prof.py +919 -0
- data/ext/v8/upstream/3.1.8/tools/logreader.js +185 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/mac-nm +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/mac-tick-processor +0 -0
- data/ext/v8/upstream/3.1.8/tools/oom_dump/README +31 -0
- data/ext/v8/upstream/3.1.8/tools/oom_dump/SConstruct +42 -0
- data/ext/v8/upstream/3.1.8/tools/oom_dump/oom_dump.cc +288 -0
- data/ext/v8/upstream/3.1.8/tools/presubmit.py +305 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/process-heap-prof.py +0 -0
- data/ext/v8/upstream/3.1.8/tools/profile.js +751 -0
- data/ext/v8/upstream/3.1.8/tools/profile_view.js +219 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/run-valgrind.py +0 -0
- data/ext/v8/upstream/3.1.8/tools/splaytree.js +316 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/stats-viewer.py +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/tickprocessor-driver.js +0 -0
- data/ext/v8/upstream/3.1.8/tools/tickprocessor.js +863 -0
- data/ext/v8/upstream/3.1.8/tools/utils.py +96 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/README.txt +70 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/arm.vsprops +0 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/common.vsprops +34 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8_arm.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8js2c.cmd +0 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/debug.vsprops +17 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/ia32.vsprops +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/js2c.cmd +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/release.vsprops +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8.sln +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_arm.sln +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_arm.vcproj +0 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base.vcproj +1296 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base_arm.vcproj +1234 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base_x64.vcproj +1296 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest_arm.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_mksnapshot.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_mksnapshot_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample_arm.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample_x64.vcproj +0 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample.vcproj +147 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample_arm.vcproj +147 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample_x64.vcproj +163 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_cc.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_cc_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_x64.sln +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/x64.vsprops +0 -0
- data/ext/v8/upstream/3.1.8/tools/windows-tick-processor.bat +30 -0
- data/ext/v8/upstream/Makefile +2 -1
- data/ext/v8/v8_template.cpp +2 -2
- data/lib/v8/version.rb +1 -1
- data/spec/redjs/jsapi_spec.rb +2 -2
- metadata +552 -490
- data/ext/v8/upstream/2.3.3/.gitignore +0 -26
- data/ext/v8/upstream/2.3.3/AUTHORS +0 -31
- data/ext/v8/upstream/2.3.3/ChangeLog +0 -1916
- data/ext/v8/upstream/2.3.3/LICENSE +0 -55
- data/ext/v8/upstream/2.3.3/SConstruct +0 -1154
- data/ext/v8/upstream/2.3.3/include/v8-debug.h +0 -381
- data/ext/v8/upstream/2.3.3/include/v8-profiler.h +0 -353
- data/ext/v8/upstream/2.3.3/include/v8.h +0 -3616
- data/ext/v8/upstream/2.3.3/src/SConscript +0 -330
- data/ext/v8/upstream/2.3.3/src/accessors.cc +0 -661
- data/ext/v8/upstream/2.3.3/src/accessors.h +0 -114
- data/ext/v8/upstream/2.3.3/src/allocation.cc +0 -198
- data/ext/v8/upstream/2.3.3/src/allocation.h +0 -169
- data/ext/v8/upstream/2.3.3/src/api.cc +0 -4795
- data/ext/v8/upstream/2.3.3/src/api.h +0 -485
- data/ext/v8/upstream/2.3.3/src/apiutils.h +0 -69
- data/ext/v8/upstream/2.3.3/src/arguments.h +0 -96
- data/ext/v8/upstream/2.3.3/src/arm/assembler-arm-inl.h +0 -305
- data/ext/v8/upstream/2.3.3/src/arm/assembler-arm.cc +0 -2580
- data/ext/v8/upstream/2.3.3/src/arm/assembler-arm.h +0 -1275
- data/ext/v8/upstream/2.3.3/src/arm/builtins-arm.cc +0 -1320
- data/ext/v8/upstream/2.3.3/src/arm/codegen-arm-inl.h +0 -48
- data/ext/v8/upstream/2.3.3/src/arm/codegen-arm.cc +0 -11398
- data/ext/v8/upstream/2.3.3/src/arm/codegen-arm.h +0 -1102
- data/ext/v8/upstream/2.3.3/src/arm/constants-arm.cc +0 -154
- data/ext/v8/upstream/2.3.3/src/arm/constants-arm.h +0 -388
- data/ext/v8/upstream/2.3.3/src/arm/cpu-arm.cc +0 -142
- data/ext/v8/upstream/2.3.3/src/arm/debug-arm.cc +0 -309
- data/ext/v8/upstream/2.3.3/src/arm/disasm-arm.cc +0 -1459
- data/ext/v8/upstream/2.3.3/src/arm/fast-codegen-arm.cc +0 -241
- data/ext/v8/upstream/2.3.3/src/arm/frames-arm.cc +0 -123
- data/ext/v8/upstream/2.3.3/src/arm/frames-arm.h +0 -162
- data/ext/v8/upstream/2.3.3/src/arm/full-codegen-arm.cc +0 -3178
- data/ext/v8/upstream/2.3.3/src/arm/ic-arm.cc +0 -2258
- data/ext/v8/upstream/2.3.3/src/arm/jump-target-arm.cc +0 -164
- data/ext/v8/upstream/2.3.3/src/arm/macro-assembler-arm.cc +0 -1892
- data/ext/v8/upstream/2.3.3/src/arm/macro-assembler-arm.h +0 -727
- data/ext/v8/upstream/2.3.3/src/arm/regexp-macro-assembler-arm.cc +0 -1261
- data/ext/v8/upstream/2.3.3/src/arm/regexp-macro-assembler-arm.h +0 -266
- data/ext/v8/upstream/2.3.3/src/arm/simulator-arm.cc +0 -2822
- data/ext/v8/upstream/2.3.3/src/arm/simulator-arm.h +0 -361
- data/ext/v8/upstream/2.3.3/src/arm/stub-cache-arm.cc +0 -2387
- data/ext/v8/upstream/2.3.3/src/arm/virtual-frame-arm.cc +0 -834
- data/ext/v8/upstream/2.3.3/src/arm/virtual-frame-arm.h +0 -519
- data/ext/v8/upstream/2.3.3/src/array.js +0 -1127
- data/ext/v8/upstream/2.3.3/src/assembler.cc +0 -801
- data/ext/v8/upstream/2.3.3/src/assembler.h +0 -573
- data/ext/v8/upstream/2.3.3/src/ast-inl.h +0 -81
- data/ext/v8/upstream/2.3.3/src/ast.cc +0 -1152
- data/ext/v8/upstream/2.3.3/src/ast.h +0 -2106
- data/ext/v8/upstream/2.3.3/src/bootstrapper.cc +0 -1819
- data/ext/v8/upstream/2.3.3/src/builtins.cc +0 -1529
- data/ext/v8/upstream/2.3.3/src/builtins.h +0 -263
- data/ext/v8/upstream/2.3.3/src/bytecodes-irregexp.h +0 -104
- data/ext/v8/upstream/2.3.3/src/cached-powers.h +0 -119
- data/ext/v8/upstream/2.3.3/src/char-predicates-inl.h +0 -86
- data/ext/v8/upstream/2.3.3/src/checks.cc +0 -100
- data/ext/v8/upstream/2.3.3/src/checks.h +0 -310
- data/ext/v8/upstream/2.3.3/src/circular-queue.cc +0 -121
- data/ext/v8/upstream/2.3.3/src/code-stubs.cc +0 -177
- data/ext/v8/upstream/2.3.3/src/code-stubs.h +0 -177
- data/ext/v8/upstream/2.3.3/src/codegen-inl.h +0 -60
- data/ext/v8/upstream/2.3.3/src/codegen.cc +0 -516
- data/ext/v8/upstream/2.3.3/src/codegen.h +0 -897
- data/ext/v8/upstream/2.3.3/src/compilation-cache.cc +0 -562
- data/ext/v8/upstream/2.3.3/src/compilation-cache.h +0 -102
- data/ext/v8/upstream/2.3.3/src/compiler.cc +0 -654
- data/ext/v8/upstream/2.3.3/src/compiler.h +0 -299
- data/ext/v8/upstream/2.3.3/src/contexts.cc +0 -256
- data/ext/v8/upstream/2.3.3/src/contexts.h +0 -342
- data/ext/v8/upstream/2.3.3/src/conversions.cc +0 -1119
- data/ext/v8/upstream/2.3.3/src/conversions.h +0 -123
- data/ext/v8/upstream/2.3.3/src/counters.h +0 -239
- data/ext/v8/upstream/2.3.3/src/cpu-profiler-inl.h +0 -100
- data/ext/v8/upstream/2.3.3/src/cpu-profiler.cc +0 -538
- data/ext/v8/upstream/2.3.3/src/cpu-profiler.h +0 -285
- data/ext/v8/upstream/2.3.3/src/d8-debug.cc +0 -356
- data/ext/v8/upstream/2.3.3/src/d8-debug.h +0 -155
- data/ext/v8/upstream/2.3.3/src/d8.cc +0 -783
- data/ext/v8/upstream/2.3.3/src/d8.h +0 -227
- data/ext/v8/upstream/2.3.3/src/d8.js +0 -1683
- data/ext/v8/upstream/2.3.3/src/data-flow.cc +0 -758
- data/ext/v8/upstream/2.3.3/src/data-flow.h +0 -278
- data/ext/v8/upstream/2.3.3/src/date.js +0 -1059
- data/ext/v8/upstream/2.3.3/src/dateparser-inl.h +0 -123
- data/ext/v8/upstream/2.3.3/src/dateparser.h +0 -244
- data/ext/v8/upstream/2.3.3/src/debug-agent.cc +0 -427
- data/ext/v8/upstream/2.3.3/src/debug-agent.h +0 -129
- data/ext/v8/upstream/2.3.3/src/debug-debugger.js +0 -2227
- data/ext/v8/upstream/2.3.3/src/debug.cc +0 -3005
- data/ext/v8/upstream/2.3.3/src/debug.h +0 -993
- data/ext/v8/upstream/2.3.3/src/disassembler.cc +0 -312
- data/ext/v8/upstream/2.3.3/src/double.h +0 -169
- data/ext/v8/upstream/2.3.3/src/dtoa-config.c +0 -92
- data/ext/v8/upstream/2.3.3/src/dtoa.cc +0 -77
- data/ext/v8/upstream/2.3.3/src/dtoa.h +0 -81
- data/ext/v8/upstream/2.3.3/src/execution.cc +0 -809
- data/ext/v8/upstream/2.3.3/src/execution.h +0 -336
- data/ext/v8/upstream/2.3.3/src/factory.cc +0 -1003
- data/ext/v8/upstream/2.3.3/src/factory.h +0 -410
- data/ext/v8/upstream/2.3.3/src/fast-codegen.cc +0 -746
- data/ext/v8/upstream/2.3.3/src/fast-codegen.h +0 -161
- data/ext/v8/upstream/2.3.3/src/fast-dtoa.cc +0 -505
- data/ext/v8/upstream/2.3.3/src/fast-dtoa.h +0 -58
- data/ext/v8/upstream/2.3.3/src/flag-definitions.h +0 -455
- data/ext/v8/upstream/2.3.3/src/flags.cc +0 -551
- data/ext/v8/upstream/2.3.3/src/flags.h +0 -81
- data/ext/v8/upstream/2.3.3/src/flow-graph.cc +0 -763
- data/ext/v8/upstream/2.3.3/src/flow-graph.h +0 -180
- data/ext/v8/upstream/2.3.3/src/frame-element.h +0 -273
- data/ext/v8/upstream/2.3.3/src/frames-inl.h +0 -217
- data/ext/v8/upstream/2.3.3/src/frames.cc +0 -826
- data/ext/v8/upstream/2.3.3/src/frames.h +0 -682
- data/ext/v8/upstream/2.3.3/src/full-codegen.cc +0 -1443
- data/ext/v8/upstream/2.3.3/src/full-codegen.h +0 -548
- data/ext/v8/upstream/2.3.3/src/func-name-inferrer.cc +0 -76
- data/ext/v8/upstream/2.3.3/src/func-name-inferrer.h +0 -135
- data/ext/v8/upstream/2.3.3/src/global-handles.cc +0 -520
- data/ext/v8/upstream/2.3.3/src/global-handles.h +0 -180
- data/ext/v8/upstream/2.3.3/src/globals.h +0 -669
- data/ext/v8/upstream/2.3.3/src/handles-inl.h +0 -76
- data/ext/v8/upstream/2.3.3/src/handles.cc +0 -825
- data/ext/v8/upstream/2.3.3/src/handles.h +0 -393
- data/ext/v8/upstream/2.3.3/src/hashmap.cc +0 -226
- data/ext/v8/upstream/2.3.3/src/hashmap.h +0 -120
- data/ext/v8/upstream/2.3.3/src/heap-inl.h +0 -493
- data/ext/v8/upstream/2.3.3/src/heap-profiler.cc +0 -779
- data/ext/v8/upstream/2.3.3/src/heap-profiler.h +0 -323
- data/ext/v8/upstream/2.3.3/src/heap.cc +0 -4994
- data/ext/v8/upstream/2.3.3/src/heap.h +0 -1984
- data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32-inl.h +0 -360
- data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32.cc +0 -2600
- data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32.h +0 -969
- data/ext/v8/upstream/2.3.3/src/ia32/builtins-ia32.cc +0 -1261
- data/ext/v8/upstream/2.3.3/src/ia32/codegen-ia32.cc +0 -13968
- data/ext/v8/upstream/2.3.3/src/ia32/codegen-ia32.h +0 -1097
- data/ext/v8/upstream/2.3.3/src/ia32/cpu-ia32.cc +0 -83
- data/ext/v8/upstream/2.3.3/src/ia32/debug-ia32.cc +0 -309
- data/ext/v8/upstream/2.3.3/src/ia32/disasm-ia32.cc +0 -1471
- data/ext/v8/upstream/2.3.3/src/ia32/fast-codegen-ia32.cc +0 -954
- data/ext/v8/upstream/2.3.3/src/ia32/fast-codegen-ia32.h +0 -155
- data/ext/v8/upstream/2.3.3/src/ia32/frames-ia32.cc +0 -115
- data/ext/v8/upstream/2.3.3/src/ia32/frames-ia32.h +0 -135
- data/ext/v8/upstream/2.3.3/src/ia32/full-codegen-ia32.cc +0 -3281
- data/ext/v8/upstream/2.3.3/src/ia32/ic-ia32.cc +0 -1966
- data/ext/v8/upstream/2.3.3/src/ia32/macro-assembler-ia32.cc +0 -1610
- data/ext/v8/upstream/2.3.3/src/ia32/macro-assembler-ia32.h +0 -610
- data/ext/v8/upstream/2.3.3/src/ia32/regexp-macro-assembler-ia32.cc +0 -1247
- data/ext/v8/upstream/2.3.3/src/ia32/regexp-macro-assembler-ia32.h +0 -214
- data/ext/v8/upstream/2.3.3/src/ia32/simulator-ia32.h +0 -62
- data/ext/v8/upstream/2.3.3/src/ia32/stub-cache-ia32.cc +0 -2750
- data/ext/v8/upstream/2.3.3/src/ia32/virtual-frame-ia32.cc +0 -1334
- data/ext/v8/upstream/2.3.3/src/ia32/virtual-frame-ia32.h +0 -627
- data/ext/v8/upstream/2.3.3/src/ic-inl.h +0 -120
- data/ext/v8/upstream/2.3.3/src/ic.cc +0 -1827
- data/ext/v8/upstream/2.3.3/src/ic.h +0 -515
- data/ext/v8/upstream/2.3.3/src/interpreter-irregexp.cc +0 -646
- data/ext/v8/upstream/2.3.3/src/json.js +0 -268
- data/ext/v8/upstream/2.3.3/src/jsregexp.cc +0 -5283
- data/ext/v8/upstream/2.3.3/src/jsregexp.h +0 -1463
- data/ext/v8/upstream/2.3.3/src/jump-target-heavy.cc +0 -429
- data/ext/v8/upstream/2.3.3/src/jump-target-heavy.h +0 -244
- data/ext/v8/upstream/2.3.3/src/jump-target-light.cc +0 -110
- data/ext/v8/upstream/2.3.3/src/jump-target-light.h +0 -192
- data/ext/v8/upstream/2.3.3/src/list-inl.h +0 -166
- data/ext/v8/upstream/2.3.3/src/list.h +0 -159
- data/ext/v8/upstream/2.3.3/src/liveedit-debugger.js +0 -1057
- data/ext/v8/upstream/2.3.3/src/liveedit.cc +0 -1480
- data/ext/v8/upstream/2.3.3/src/liveedit.h +0 -170
- data/ext/v8/upstream/2.3.3/src/log-utils.cc +0 -497
- data/ext/v8/upstream/2.3.3/src/log-utils.h +0 -289
- data/ext/v8/upstream/2.3.3/src/log.cc +0 -1561
- data/ext/v8/upstream/2.3.3/src/log.h +0 -384
- data/ext/v8/upstream/2.3.3/src/macro-assembler.h +0 -86
- data/ext/v8/upstream/2.3.3/src/macros.py +0 -177
- data/ext/v8/upstream/2.3.3/src/mark-compact.cc +0 -2330
- data/ext/v8/upstream/2.3.3/src/mark-compact.h +0 -451
- data/ext/v8/upstream/2.3.3/src/math.js +0 -264
- data/ext/v8/upstream/2.3.3/src/memory.h +0 -74
- data/ext/v8/upstream/2.3.3/src/messages.cc +0 -183
- data/ext/v8/upstream/2.3.3/src/messages.h +0 -113
- data/ext/v8/upstream/2.3.3/src/messages.js +0 -982
- data/ext/v8/upstream/2.3.3/src/mips/assembler-mips.h +0 -668
- data/ext/v8/upstream/2.3.3/src/mips/builtins-mips.cc +0 -205
- data/ext/v8/upstream/2.3.3/src/mips/codegen-mips.h +0 -434
- data/ext/v8/upstream/2.3.3/src/mips/debug-mips.cc +0 -131
- data/ext/v8/upstream/2.3.3/src/mips/frames-mips.cc +0 -102
- data/ext/v8/upstream/2.3.3/src/mips/ic-mips.cc +0 -220
- data/ext/v8/upstream/2.3.3/src/mips/simulator-mips.cc +0 -1651
- data/ext/v8/upstream/2.3.3/src/mips/simulator-mips.h +0 -311
- data/ext/v8/upstream/2.3.3/src/mips/stub-cache-mips.cc +0 -403
- data/ext/v8/upstream/2.3.3/src/mirror-debugger.js +0 -2380
- data/ext/v8/upstream/2.3.3/src/objects-debug.cc +0 -1366
- data/ext/v8/upstream/2.3.3/src/objects-inl.h +0 -3333
- data/ext/v8/upstream/2.3.3/src/objects.cc +0 -8820
- data/ext/v8/upstream/2.3.3/src/objects.h +0 -5373
- data/ext/v8/upstream/2.3.3/src/oprofile-agent.cc +0 -108
- data/ext/v8/upstream/2.3.3/src/oprofile-agent.h +0 -77
- data/ext/v8/upstream/2.3.3/src/parser.cc +0 -5207
- data/ext/v8/upstream/2.3.3/src/parser.h +0 -197
- data/ext/v8/upstream/2.3.3/src/platform-freebsd.cc +0 -667
- data/ext/v8/upstream/2.3.3/src/platform-linux.cc +0 -862
- data/ext/v8/upstream/2.3.3/src/platform-macos.cc +0 -665
- data/ext/v8/upstream/2.3.3/src/platform-nullos.cc +0 -454
- data/ext/v8/upstream/2.3.3/src/platform-openbsd.cc +0 -622
- data/ext/v8/upstream/2.3.3/src/platform-posix.cc +0 -362
- data/ext/v8/upstream/2.3.3/src/platform-solaris.cc +0 -653
- data/ext/v8/upstream/2.3.3/src/platform-win32.cc +0 -1911
- data/ext/v8/upstream/2.3.3/src/platform.h +0 -577
- data/ext/v8/upstream/2.3.3/src/powers-ten.h +0 -2461
- data/ext/v8/upstream/2.3.3/src/prettyprinter.cc +0 -1531
- data/ext/v8/upstream/2.3.3/src/prettyprinter.h +0 -221
- data/ext/v8/upstream/2.3.3/src/profile-generator-inl.h +0 -148
- data/ext/v8/upstream/2.3.3/src/profile-generator.cc +0 -1830
- data/ext/v8/upstream/2.3.3/src/profile-generator.h +0 -853
- data/ext/v8/upstream/2.3.3/src/property.cc +0 -96
- data/ext/v8/upstream/2.3.3/src/property.h +0 -315
- data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-irregexp.cc +0 -464
- data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-irregexp.h +0 -141
- data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-tracer.cc +0 -356
- data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-tracer.h +0 -103
- data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler.cc +0 -261
- data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler.h +0 -228
- data/ext/v8/upstream/2.3.3/src/regexp.js +0 -549
- data/ext/v8/upstream/2.3.3/src/rewriter.cc +0 -1038
- data/ext/v8/upstream/2.3.3/src/rewriter.h +0 -54
- data/ext/v8/upstream/2.3.3/src/runtime.cc +0 -10599
- data/ext/v8/upstream/2.3.3/src/runtime.h +0 -459
- data/ext/v8/upstream/2.3.3/src/runtime.js +0 -629
- data/ext/v8/upstream/2.3.3/src/scanner.cc +0 -1346
- data/ext/v8/upstream/2.3.3/src/scanner.h +0 -503
- data/ext/v8/upstream/2.3.3/src/scopeinfo.cc +0 -637
- data/ext/v8/upstream/2.3.3/src/scopeinfo.h +0 -233
- data/ext/v8/upstream/2.3.3/src/scopes.cc +0 -962
- data/ext/v8/upstream/2.3.3/src/scopes.h +0 -400
- data/ext/v8/upstream/2.3.3/src/serialize.cc +0 -1461
- data/ext/v8/upstream/2.3.3/src/serialize.h +0 -581
- data/ext/v8/upstream/2.3.3/src/spaces-inl.h +0 -483
- data/ext/v8/upstream/2.3.3/src/spaces.cc +0 -2901
- data/ext/v8/upstream/2.3.3/src/spaces.h +0 -2197
- data/ext/v8/upstream/2.3.3/src/string-stream.cc +0 -584
- data/ext/v8/upstream/2.3.3/src/string-stream.h +0 -189
- data/ext/v8/upstream/2.3.3/src/string.js +0 -1006
- data/ext/v8/upstream/2.3.3/src/stub-cache.cc +0 -1379
- data/ext/v8/upstream/2.3.3/src/stub-cache.h +0 -756
- data/ext/v8/upstream/2.3.3/src/third_party/dtoa/COPYING +0 -15
- data/ext/v8/upstream/2.3.3/src/third_party/dtoa/dtoa.c +0 -3334
- data/ext/v8/upstream/2.3.3/src/token.cc +0 -56
- data/ext/v8/upstream/2.3.3/src/token.h +0 -270
- data/ext/v8/upstream/2.3.3/src/top.cc +0 -1067
- data/ext/v8/upstream/2.3.3/src/top.h +0 -463
- data/ext/v8/upstream/2.3.3/src/type-info.cc +0 -53
- data/ext/v8/upstream/2.3.3/src/type-info.h +0 -244
- data/ext/v8/upstream/2.3.3/src/unicode-inl.h +0 -238
- data/ext/v8/upstream/2.3.3/src/unicode.cc +0 -749
- data/ext/v8/upstream/2.3.3/src/unicode.h +0 -279
- data/ext/v8/upstream/2.3.3/src/uri.js +0 -415
- data/ext/v8/upstream/2.3.3/src/utils.cc +0 -285
- data/ext/v8/upstream/2.3.3/src/utils.h +0 -745
- data/ext/v8/upstream/2.3.3/src/v8-counters.h +0 -250
- data/ext/v8/upstream/2.3.3/src/v8.cc +0 -228
- data/ext/v8/upstream/2.3.3/src/v8.h +0 -121
- data/ext/v8/upstream/2.3.3/src/v8natives.js +0 -1188
- data/ext/v8/upstream/2.3.3/src/v8threads.cc +0 -461
- data/ext/v8/upstream/2.3.3/src/v8threads.h +0 -159
- data/ext/v8/upstream/2.3.3/src/variables.cc +0 -119
- data/ext/v8/upstream/2.3.3/src/variables.h +0 -205
- data/ext/v8/upstream/2.3.3/src/version.cc +0 -88
- data/ext/v8/upstream/2.3.3/src/virtual-frame-heavy-inl.h +0 -192
- data/ext/v8/upstream/2.3.3/src/virtual-frame.h +0 -46
- data/ext/v8/upstream/2.3.3/src/vm-state-inl.h +0 -137
- data/ext/v8/upstream/2.3.3/src/vm-state.cc +0 -39
- data/ext/v8/upstream/2.3.3/src/vm-state.h +0 -77
- data/ext/v8/upstream/2.3.3/src/x64/assembler-x64-inl.h +0 -400
- data/ext/v8/upstream/2.3.3/src/x64/assembler-x64.cc +0 -2963
- data/ext/v8/upstream/2.3.3/src/x64/assembler-x64.h +0 -1438
- data/ext/v8/upstream/2.3.3/src/x64/builtins-x64.cc +0 -1296
- data/ext/v8/upstream/2.3.3/src/x64/codegen-x64-inl.h +0 -46
- data/ext/v8/upstream/2.3.3/src/x64/codegen-x64.cc +0 -12491
- data/ext/v8/upstream/2.3.3/src/x64/codegen-x64.h +0 -1090
- data/ext/v8/upstream/2.3.3/src/x64/cpu-x64.cc +0 -83
- data/ext/v8/upstream/2.3.3/src/x64/debug-x64.cc +0 -267
- data/ext/v8/upstream/2.3.3/src/x64/disasm-x64.cc +0 -1696
- data/ext/v8/upstream/2.3.3/src/x64/fast-codegen-x64.cc +0 -250
- data/ext/v8/upstream/2.3.3/src/x64/frames-x64.cc +0 -113
- data/ext/v8/upstream/2.3.3/src/x64/frames-x64.h +0 -125
- data/ext/v8/upstream/2.3.3/src/x64/full-codegen-x64.cc +0 -3270
- data/ext/v8/upstream/2.3.3/src/x64/ic-x64.cc +0 -1907
- data/ext/v8/upstream/2.3.3/src/x64/jump-target-x64.cc +0 -437
- data/ext/v8/upstream/2.3.3/src/x64/macro-assembler-x64.cc +0 -2793
- data/ext/v8/upstream/2.3.3/src/x64/macro-assembler-x64.h +0 -916
- data/ext/v8/upstream/2.3.3/src/x64/regexp-macro-assembler-x64.cc +0 -1374
- data/ext/v8/upstream/2.3.3/src/x64/regexp-macro-assembler-x64.h +0 -277
- data/ext/v8/upstream/2.3.3/src/x64/simulator-x64.h +0 -63
- data/ext/v8/upstream/2.3.3/src/x64/stub-cache-x64.cc +0 -2560
- data/ext/v8/upstream/2.3.3/src/x64/virtual-frame-x64.cc +0 -1264
- data/ext/v8/upstream/2.3.3/src/x64/virtual-frame-x64.h +0 -590
- data/ext/v8/upstream/2.3.3/src/zone-inl.h +0 -82
- data/ext/v8/upstream/2.3.3/src/zone.cc +0 -194
- data/ext/v8/upstream/2.3.3/src/zone.h +0 -221
- data/ext/v8/upstream/2.3.3/tools/codemap.js +0 -270
- data/ext/v8/upstream/2.3.3/tools/csvparser.js +0 -83
- data/ext/v8/upstream/2.3.3/tools/gc-nvp-trace-processor.py +0 -317
- data/ext/v8/upstream/2.3.3/tools/gyp/v8.gyp +0 -749
- data/ext/v8/upstream/2.3.3/tools/linux-tick-processor.py +0 -78
- data/ext/v8/upstream/2.3.3/tools/logreader.js +0 -338
- data/ext/v8/upstream/2.3.3/tools/oprofile/annotate +0 -7
- data/ext/v8/upstream/2.3.3/tools/oprofile/common +0 -19
- data/ext/v8/upstream/2.3.3/tools/oprofile/dump +0 -7
- data/ext/v8/upstream/2.3.3/tools/oprofile/report +0 -7
- data/ext/v8/upstream/2.3.3/tools/oprofile/reset +0 -7
- data/ext/v8/upstream/2.3.3/tools/oprofile/run +0 -14
- data/ext/v8/upstream/2.3.3/tools/oprofile/shutdown +0 -7
- data/ext/v8/upstream/2.3.3/tools/oprofile/start +0 -7
- data/ext/v8/upstream/2.3.3/tools/presubmit.py +0 -299
- data/ext/v8/upstream/2.3.3/tools/profile.js +0 -691
- data/ext/v8/upstream/2.3.3/tools/profile_view.js +0 -224
- data/ext/v8/upstream/2.3.3/tools/splaytree.js +0 -322
- data/ext/v8/upstream/2.3.3/tools/splaytree.py +0 -226
- data/ext/v8/upstream/2.3.3/tools/tickprocessor.js +0 -862
- data/ext/v8/upstream/2.3.3/tools/tickprocessor.py +0 -571
- data/ext/v8/upstream/2.3.3/tools/utils.py +0 -88
- data/ext/v8/upstream/2.3.3/tools/visual_studio/README.txt +0 -71
- data/ext/v8/upstream/2.3.3/tools/visual_studio/common.vsprops +0 -34
- data/ext/v8/upstream/2.3.3/tools/visual_studio/debug.vsprops +0 -17
- data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base.vcproj +0 -1143
- data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base_arm.vcproj +0 -1115
- data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base_x64.vcproj +0 -1096
- data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample.vcproj +0 -145
- data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample_arm.vcproj +0 -145
- data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample_x64.vcproj +0 -161
- data/ext/v8/upstream/2.3.3/tools/windows-tick-processor.bat +0 -29
- data/ext/v8/upstream/2.3.3/tools/windows-tick-processor.py +0 -137
@@ -1,164 +0,0 @@
|
|
1
|
-
// Copyright 2008 the V8 project authors. All rights reserved.
|
2
|
-
// Redistribution and use in source and binary forms, with or without
|
3
|
-
// modification, are permitted provided that the following conditions are
|
4
|
-
// met:
|
5
|
-
//
|
6
|
-
// * Redistributions of source code must retain the above copyright
|
7
|
-
// notice, this list of conditions and the following disclaimer.
|
8
|
-
// * Redistributions in binary form must reproduce the above
|
9
|
-
// copyright notice, this list of conditions and the following
|
10
|
-
// disclaimer in the documentation and/or other materials provided
|
11
|
-
// with the distribution.
|
12
|
-
// * Neither the name of Google Inc. nor the names of its
|
13
|
-
// contributors may be used to endorse or promote products derived
|
14
|
-
// from this software without specific prior written permission.
|
15
|
-
//
|
16
|
-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
17
|
-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
18
|
-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
19
|
-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
20
|
-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
21
|
-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
22
|
-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
24
|
-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
25
|
-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
26
|
-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
-
|
28
|
-
#include "v8.h"
|
29
|
-
|
30
|
-
#if defined(V8_TARGET_ARCH_ARM)
|
31
|
-
|
32
|
-
#include "codegen-inl.h"
|
33
|
-
#include "jump-target-inl.h"
|
34
|
-
#include "register-allocator-inl.h"
|
35
|
-
#include "virtual-frame-inl.h"
|
36
|
-
|
37
|
-
namespace v8 {
|
38
|
-
namespace internal {
|
39
|
-
|
40
|
-
// -------------------------------------------------------------------------
|
41
|
-
// JumpTarget implementation.
|
42
|
-
|
43
|
-
#define __ ACCESS_MASM(cgen()->masm())
|
44
|
-
|
45
|
-
void JumpTarget::DoJump() {
|
46
|
-
ASSERT(cgen()->has_valid_frame());
|
47
|
-
// Live non-frame registers are not allowed at unconditional jumps
|
48
|
-
// because we have no way of invalidating the corresponding results
|
49
|
-
// which are still live in the C++ code.
|
50
|
-
ASSERT(cgen()->HasValidEntryRegisters());
|
51
|
-
|
52
|
-
if (entry_frame_set_) {
|
53
|
-
if (entry_label_.is_bound()) {
|
54
|
-
// If we already bound and generated code at the destination then it
|
55
|
-
// is too late to ask for less optimistic type assumptions.
|
56
|
-
ASSERT(entry_frame_.IsCompatibleWith(cgen()->frame()));
|
57
|
-
}
|
58
|
-
// There already a frame expectation at the target.
|
59
|
-
cgen()->frame()->MergeTo(&entry_frame_);
|
60
|
-
cgen()->DeleteFrame();
|
61
|
-
} else {
|
62
|
-
// Clone the current frame to use as the expected one at the target.
|
63
|
-
set_entry_frame(cgen()->frame());
|
64
|
-
// Zap the fall-through frame since the jump was unconditional.
|
65
|
-
RegisterFile empty;
|
66
|
-
cgen()->SetFrame(NULL, &empty);
|
67
|
-
}
|
68
|
-
if (entry_label_.is_bound()) {
|
69
|
-
// You can't jump backwards to an already bound label unless you admitted
|
70
|
-
// up front that this was a bidirectional jump target. Bidirectional jump
|
71
|
-
// targets will zap their type info when bound in case some later virtual
|
72
|
-
// frame with less precise type info branches to them.
|
73
|
-
ASSERT(direction_ != FORWARD_ONLY);
|
74
|
-
}
|
75
|
-
__ jmp(&entry_label_);
|
76
|
-
}
|
77
|
-
|
78
|
-
|
79
|
-
void JumpTarget::DoBranch(Condition cc, Hint ignored) {
|
80
|
-
ASSERT(cgen()->has_valid_frame());
|
81
|
-
|
82
|
-
if (entry_frame_set_) {
|
83
|
-
if (entry_label_.is_bound()) {
|
84
|
-
// If we already bound and generated code at the destination then it
|
85
|
-
// is too late to ask for less optimistic type assumptions.
|
86
|
-
ASSERT(entry_frame_.IsCompatibleWith(cgen()->frame()));
|
87
|
-
}
|
88
|
-
// We have an expected frame to merge to on the backward edge.
|
89
|
-
cgen()->frame()->MergeTo(&entry_frame_, cc);
|
90
|
-
} else {
|
91
|
-
// Clone the current frame to use as the expected one at the target.
|
92
|
-
set_entry_frame(cgen()->frame());
|
93
|
-
}
|
94
|
-
if (entry_label_.is_bound()) {
|
95
|
-
// You can't branch backwards to an already bound label unless you admitted
|
96
|
-
// up front that this was a bidirectional jump target. Bidirectional jump
|
97
|
-
// targets will zap their type info when bound in case some later virtual
|
98
|
-
// frame with less precise type info branches to them.
|
99
|
-
ASSERT(direction_ != FORWARD_ONLY);
|
100
|
-
}
|
101
|
-
__ b(cc, &entry_label_);
|
102
|
-
if (cc == al) {
|
103
|
-
cgen()->DeleteFrame();
|
104
|
-
}
|
105
|
-
}
|
106
|
-
|
107
|
-
|
108
|
-
void JumpTarget::Call() {
|
109
|
-
// Call is used to push the address of the catch block on the stack as
|
110
|
-
// a return address when compiling try/catch and try/finally. We
|
111
|
-
// fully spill the frame before making the call. The expected frame
|
112
|
-
// at the label (which should be the only one) is the spilled current
|
113
|
-
// frame plus an in-memory return address. The "fall-through" frame
|
114
|
-
// at the return site is the spilled current frame.
|
115
|
-
ASSERT(cgen()->has_valid_frame());
|
116
|
-
// There are no non-frame references across the call.
|
117
|
-
ASSERT(cgen()->HasValidEntryRegisters());
|
118
|
-
ASSERT(!is_linked());
|
119
|
-
|
120
|
-
// Calls are always 'forward' so we use a copy of the current frame (plus
|
121
|
-
// one for a return address) as the expected frame.
|
122
|
-
ASSERT(!entry_frame_set_);
|
123
|
-
VirtualFrame target_frame = *cgen()->frame();
|
124
|
-
target_frame.Adjust(1);
|
125
|
-
set_entry_frame(&target_frame);
|
126
|
-
|
127
|
-
__ bl(&entry_label_);
|
128
|
-
}
|
129
|
-
|
130
|
-
|
131
|
-
void JumpTarget::DoBind() {
|
132
|
-
ASSERT(!is_bound());
|
133
|
-
|
134
|
-
// Live non-frame registers are not allowed at the start of a basic
|
135
|
-
// block.
|
136
|
-
ASSERT(!cgen()->has_valid_frame() || cgen()->HasValidEntryRegisters());
|
137
|
-
|
138
|
-
if (cgen()->has_valid_frame()) {
|
139
|
-
if (direction_ != FORWARD_ONLY) cgen()->frame()->ForgetTypeInfo();
|
140
|
-
// If there is a current frame we can use it on the fall through.
|
141
|
-
if (!entry_frame_set_) {
|
142
|
-
entry_frame_ = *cgen()->frame();
|
143
|
-
entry_frame_set_ = true;
|
144
|
-
} else {
|
145
|
-
cgen()->frame()->MergeTo(&entry_frame_);
|
146
|
-
}
|
147
|
-
} else {
|
148
|
-
// If there is no current frame we must have an entry frame which we can
|
149
|
-
// copy.
|
150
|
-
ASSERT(entry_frame_set_);
|
151
|
-
RegisterFile empty;
|
152
|
-
cgen()->SetFrame(new VirtualFrame(&entry_frame_), &empty);
|
153
|
-
}
|
154
|
-
|
155
|
-
__ bind(&entry_label_);
|
156
|
-
}
|
157
|
-
|
158
|
-
|
159
|
-
#undef __
|
160
|
-
|
161
|
-
|
162
|
-
} } // namespace v8::internal
|
163
|
-
|
164
|
-
#endif // V8_TARGET_ARCH_ARM
|
@@ -1,1892 +0,0 @@
|
|
1
|
-
// Copyright 2006-2009 the V8 project authors. All rights reserved.
|
2
|
-
// Redistribution and use in source and binary forms, with or without
|
3
|
-
// modification, are permitted provided that the following conditions are
|
4
|
-
// met:
|
5
|
-
//
|
6
|
-
// * Redistributions of source code must retain the above copyright
|
7
|
-
// notice, this list of conditions and the following disclaimer.
|
8
|
-
// * Redistributions in binary form must reproduce the above
|
9
|
-
// copyright notice, this list of conditions and the following
|
10
|
-
// disclaimer in the documentation and/or other materials provided
|
11
|
-
// with the distribution.
|
12
|
-
// * Neither the name of Google Inc. nor the names of its
|
13
|
-
// contributors may be used to endorse or promote products derived
|
14
|
-
// from this software without specific prior written permission.
|
15
|
-
//
|
16
|
-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
17
|
-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
18
|
-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
19
|
-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
20
|
-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
21
|
-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
22
|
-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
24
|
-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
25
|
-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
26
|
-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
-
|
28
|
-
#include "v8.h"
|
29
|
-
|
30
|
-
#if defined(V8_TARGET_ARCH_ARM)
|
31
|
-
|
32
|
-
#include "bootstrapper.h"
|
33
|
-
#include "codegen-inl.h"
|
34
|
-
#include "debug.h"
|
35
|
-
#include "runtime.h"
|
36
|
-
|
37
|
-
namespace v8 {
|
38
|
-
namespace internal {
|
39
|
-
|
40
|
-
MacroAssembler::MacroAssembler(void* buffer, int size)
|
41
|
-
: Assembler(buffer, size),
|
42
|
-
generating_stub_(false),
|
43
|
-
allow_stub_calls_(true),
|
44
|
-
code_object_(Heap::undefined_value()) {
|
45
|
-
}
|
46
|
-
|
47
|
-
|
48
|
-
// We always generate arm code, never thumb code, even if V8 is compiled to
|
49
|
-
// thumb, so we require inter-working support
|
50
|
-
#if defined(__thumb__) && !defined(USE_THUMB_INTERWORK)
|
51
|
-
#error "flag -mthumb-interwork missing"
|
52
|
-
#endif
|
53
|
-
|
54
|
-
|
55
|
-
// We do not support thumb inter-working with an arm architecture not supporting
|
56
|
-
// the blx instruction (below v5t). If you know what CPU you are compiling for
|
57
|
-
// you can use -march=armv7 or similar.
|
58
|
-
#if defined(USE_THUMB_INTERWORK) && !defined(CAN_USE_THUMB_INSTRUCTIONS)
|
59
|
-
# error "For thumb inter-working we require an architecture which supports blx"
|
60
|
-
#endif
|
61
|
-
|
62
|
-
|
63
|
-
// Using bx does not yield better code, so use it only when required
|
64
|
-
#if defined(USE_THUMB_INTERWORK)
|
65
|
-
#define USE_BX 1
|
66
|
-
#endif
|
67
|
-
|
68
|
-
|
69
|
-
void MacroAssembler::Jump(Register target, Condition cond) {
|
70
|
-
#if USE_BX
|
71
|
-
bx(target, cond);
|
72
|
-
#else
|
73
|
-
mov(pc, Operand(target), LeaveCC, cond);
|
74
|
-
#endif
|
75
|
-
}
|
76
|
-
|
77
|
-
|
78
|
-
void MacroAssembler::Jump(intptr_t target, RelocInfo::Mode rmode,
|
79
|
-
Condition cond) {
|
80
|
-
#if USE_BX
|
81
|
-
mov(ip, Operand(target, rmode), LeaveCC, cond);
|
82
|
-
bx(ip, cond);
|
83
|
-
#else
|
84
|
-
mov(pc, Operand(target, rmode), LeaveCC, cond);
|
85
|
-
#endif
|
86
|
-
}
|
87
|
-
|
88
|
-
|
89
|
-
void MacroAssembler::Jump(byte* target, RelocInfo::Mode rmode,
|
90
|
-
Condition cond) {
|
91
|
-
ASSERT(!RelocInfo::IsCodeTarget(rmode));
|
92
|
-
Jump(reinterpret_cast<intptr_t>(target), rmode, cond);
|
93
|
-
}
|
94
|
-
|
95
|
-
|
96
|
-
void MacroAssembler::Jump(Handle<Code> code, RelocInfo::Mode rmode,
|
97
|
-
Condition cond) {
|
98
|
-
ASSERT(RelocInfo::IsCodeTarget(rmode));
|
99
|
-
// 'code' is always generated ARM code, never THUMB code
|
100
|
-
Jump(reinterpret_cast<intptr_t>(code.location()), rmode, cond);
|
101
|
-
}
|
102
|
-
|
103
|
-
|
104
|
-
void MacroAssembler::Call(Register target, Condition cond) {
|
105
|
-
#if USE_BLX
|
106
|
-
blx(target, cond);
|
107
|
-
#else
|
108
|
-
// set lr for return at current pc + 8
|
109
|
-
mov(lr, Operand(pc), LeaveCC, cond);
|
110
|
-
mov(pc, Operand(target), LeaveCC, cond);
|
111
|
-
#endif
|
112
|
-
}
|
113
|
-
|
114
|
-
|
115
|
-
void MacroAssembler::Call(intptr_t target, RelocInfo::Mode rmode,
|
116
|
-
Condition cond) {
|
117
|
-
#if USE_BLX
|
118
|
-
// On ARMv5 and after the recommended call sequence is:
|
119
|
-
// ldr ip, [pc, #...]
|
120
|
-
// blx ip
|
121
|
-
|
122
|
-
// The two instructions (ldr and blx) could be separated by a constant
|
123
|
-
// pool and the code would still work. The issue comes from the
|
124
|
-
// patching code which expect the ldr to be just above the blx.
|
125
|
-
{ BlockConstPoolScope block_const_pool(this);
|
126
|
-
// Statement positions are expected to be recorded when the target
|
127
|
-
// address is loaded. The mov method will automatically record
|
128
|
-
// positions when pc is the target, since this is not the case here
|
129
|
-
// we have to do it explicitly.
|
130
|
-
WriteRecordedPositions();
|
131
|
-
|
132
|
-
mov(ip, Operand(target, rmode), LeaveCC, cond);
|
133
|
-
blx(ip, cond);
|
134
|
-
}
|
135
|
-
|
136
|
-
ASSERT(kCallTargetAddressOffset == 2 * kInstrSize);
|
137
|
-
#else
|
138
|
-
// Set lr for return at current pc + 8.
|
139
|
-
mov(lr, Operand(pc), LeaveCC, cond);
|
140
|
-
// Emit a ldr<cond> pc, [pc + offset of target in constant pool].
|
141
|
-
mov(pc, Operand(target, rmode), LeaveCC, cond);
|
142
|
-
|
143
|
-
ASSERT(kCallTargetAddressOffset == kInstrSize);
|
144
|
-
#endif
|
145
|
-
}
|
146
|
-
|
147
|
-
|
148
|
-
void MacroAssembler::Call(byte* target, RelocInfo::Mode rmode,
|
149
|
-
Condition cond) {
|
150
|
-
ASSERT(!RelocInfo::IsCodeTarget(rmode));
|
151
|
-
Call(reinterpret_cast<intptr_t>(target), rmode, cond);
|
152
|
-
}
|
153
|
-
|
154
|
-
|
155
|
-
void MacroAssembler::Call(Handle<Code> code, RelocInfo::Mode rmode,
|
156
|
-
Condition cond) {
|
157
|
-
ASSERT(RelocInfo::IsCodeTarget(rmode));
|
158
|
-
// 'code' is always generated ARM code, never THUMB code
|
159
|
-
Call(reinterpret_cast<intptr_t>(code.location()), rmode, cond);
|
160
|
-
}
|
161
|
-
|
162
|
-
|
163
|
-
void MacroAssembler::Ret(Condition cond) {
|
164
|
-
#if USE_BX
|
165
|
-
bx(lr, cond);
|
166
|
-
#else
|
167
|
-
mov(pc, Operand(lr), LeaveCC, cond);
|
168
|
-
#endif
|
169
|
-
}
|
170
|
-
|
171
|
-
|
172
|
-
void MacroAssembler::StackLimitCheck(Label* on_stack_overflow) {
|
173
|
-
LoadRoot(ip, Heap::kStackLimitRootIndex);
|
174
|
-
cmp(sp, Operand(ip));
|
175
|
-
b(lo, on_stack_overflow);
|
176
|
-
}
|
177
|
-
|
178
|
-
|
179
|
-
void MacroAssembler::Drop(int count, Condition cond) {
|
180
|
-
if (count > 0) {
|
181
|
-
add(sp, sp, Operand(count * kPointerSize), LeaveCC, cond);
|
182
|
-
}
|
183
|
-
}
|
184
|
-
|
185
|
-
|
186
|
-
void MacroAssembler::Swap(Register reg1,
|
187
|
-
Register reg2,
|
188
|
-
Register scratch,
|
189
|
-
Condition cond) {
|
190
|
-
if (scratch.is(no_reg)) {
|
191
|
-
eor(reg1, reg1, Operand(reg2), LeaveCC, cond);
|
192
|
-
eor(reg2, reg2, Operand(reg1), LeaveCC, cond);
|
193
|
-
eor(reg1, reg1, Operand(reg2), LeaveCC, cond);
|
194
|
-
} else {
|
195
|
-
mov(scratch, reg1, LeaveCC, cond);
|
196
|
-
mov(reg1, reg2, LeaveCC, cond);
|
197
|
-
mov(reg2, scratch, LeaveCC, cond);
|
198
|
-
}
|
199
|
-
}
|
200
|
-
|
201
|
-
|
202
|
-
void MacroAssembler::Call(Label* target) {
|
203
|
-
bl(target);
|
204
|
-
}
|
205
|
-
|
206
|
-
|
207
|
-
void MacroAssembler::Move(Register dst, Handle<Object> value) {
|
208
|
-
mov(dst, Operand(value));
|
209
|
-
}
|
210
|
-
|
211
|
-
|
212
|
-
void MacroAssembler::Move(Register dst, Register src) {
|
213
|
-
if (!dst.is(src)) {
|
214
|
-
mov(dst, src);
|
215
|
-
}
|
216
|
-
}
|
217
|
-
|
218
|
-
|
219
|
-
void MacroAssembler::And(Register dst, Register src1, const Operand& src2,
|
220
|
-
Condition cond) {
|
221
|
-
if (!CpuFeatures::IsSupported(ARMv7) || src2.is_single_instruction()) {
|
222
|
-
and_(dst, src1, src2, LeaveCC, cond);
|
223
|
-
return;
|
224
|
-
}
|
225
|
-
int32_t immediate = src2.immediate();
|
226
|
-
if (immediate == 0) {
|
227
|
-
mov(dst, Operand(0), LeaveCC, cond);
|
228
|
-
return;
|
229
|
-
}
|
230
|
-
if (IsPowerOf2(immediate + 1) && ((immediate & 1) != 0)) {
|
231
|
-
ubfx(dst, src1, 0, WhichPowerOf2(immediate + 1), cond);
|
232
|
-
return;
|
233
|
-
}
|
234
|
-
and_(dst, src1, src2, LeaveCC, cond);
|
235
|
-
}
|
236
|
-
|
237
|
-
|
238
|
-
void MacroAssembler::Ubfx(Register dst, Register src1, int lsb, int width,
|
239
|
-
Condition cond) {
|
240
|
-
ASSERT(lsb < 32);
|
241
|
-
if (!CpuFeatures::IsSupported(ARMv7)) {
|
242
|
-
int mask = (1 << (width + lsb)) - 1 - ((1 << lsb) - 1);
|
243
|
-
and_(dst, src1, Operand(mask), LeaveCC, cond);
|
244
|
-
if (lsb != 0) {
|
245
|
-
mov(dst, Operand(dst, LSR, lsb), LeaveCC, cond);
|
246
|
-
}
|
247
|
-
} else {
|
248
|
-
ubfx(dst, src1, lsb, width, cond);
|
249
|
-
}
|
250
|
-
}
|
251
|
-
|
252
|
-
|
253
|
-
void MacroAssembler::Sbfx(Register dst, Register src1, int lsb, int width,
|
254
|
-
Condition cond) {
|
255
|
-
ASSERT(lsb < 32);
|
256
|
-
if (!CpuFeatures::IsSupported(ARMv7)) {
|
257
|
-
int mask = (1 << (width + lsb)) - 1 - ((1 << lsb) - 1);
|
258
|
-
and_(dst, src1, Operand(mask), LeaveCC, cond);
|
259
|
-
int shift_up = 32 - lsb - width;
|
260
|
-
int shift_down = lsb + shift_up;
|
261
|
-
if (shift_up != 0) {
|
262
|
-
mov(dst, Operand(dst, LSL, shift_up), LeaveCC, cond);
|
263
|
-
}
|
264
|
-
if (shift_down != 0) {
|
265
|
-
mov(dst, Operand(dst, ASR, shift_down), LeaveCC, cond);
|
266
|
-
}
|
267
|
-
} else {
|
268
|
-
sbfx(dst, src1, lsb, width, cond);
|
269
|
-
}
|
270
|
-
}
|
271
|
-
|
272
|
-
|
273
|
-
void MacroAssembler::Bfc(Register dst, int lsb, int width, Condition cond) {
|
274
|
-
ASSERT(lsb < 32);
|
275
|
-
if (!CpuFeatures::IsSupported(ARMv7)) {
|
276
|
-
int mask = (1 << (width + lsb)) - 1 - ((1 << lsb) - 1);
|
277
|
-
bic(dst, dst, Operand(mask));
|
278
|
-
} else {
|
279
|
-
bfc(dst, lsb, width, cond);
|
280
|
-
}
|
281
|
-
}
|
282
|
-
|
283
|
-
|
284
|
-
void MacroAssembler::Usat(Register dst, int satpos, const Operand& src,
|
285
|
-
Condition cond) {
|
286
|
-
if (!CpuFeatures::IsSupported(ARMv7)) {
|
287
|
-
ASSERT(!dst.is(pc) && !src.rm().is(pc));
|
288
|
-
ASSERT((satpos >= 0) && (satpos <= 31));
|
289
|
-
|
290
|
-
// These asserts are required to ensure compatibility with the ARMv7
|
291
|
-
// implementation.
|
292
|
-
ASSERT((src.shift_op() == ASR) || (src.shift_op() == LSL));
|
293
|
-
ASSERT(src.rs().is(no_reg));
|
294
|
-
|
295
|
-
Label done;
|
296
|
-
int satval = (1 << satpos) - 1;
|
297
|
-
|
298
|
-
if (cond != al) {
|
299
|
-
b(NegateCondition(cond), &done); // Skip saturate if !condition.
|
300
|
-
}
|
301
|
-
if (!(src.is_reg() && dst.is(src.rm()))) {
|
302
|
-
mov(dst, src);
|
303
|
-
}
|
304
|
-
tst(dst, Operand(~satval));
|
305
|
-
b(eq, &done);
|
306
|
-
mov(dst, Operand(0), LeaveCC, mi); // 0 if negative.
|
307
|
-
mov(dst, Operand(satval), LeaveCC, pl); // satval if positive.
|
308
|
-
bind(&done);
|
309
|
-
} else {
|
310
|
-
usat(dst, satpos, src, cond);
|
311
|
-
}
|
312
|
-
}
|
313
|
-
|
314
|
-
|
315
|
-
void MacroAssembler::SmiJumpTable(Register index, Vector<Label*> targets) {
|
316
|
-
// Empty the const pool.
|
317
|
-
CheckConstPool(true, true);
|
318
|
-
add(pc, pc, Operand(index,
|
319
|
-
LSL,
|
320
|
-
assembler::arm::Instr::kInstrSizeLog2 - kSmiTagSize));
|
321
|
-
BlockConstPoolBefore(pc_offset() + (targets.length() + 1) * kInstrSize);
|
322
|
-
nop(); // Jump table alignment.
|
323
|
-
for (int i = 0; i < targets.length(); i++) {
|
324
|
-
b(targets[i]);
|
325
|
-
}
|
326
|
-
}
|
327
|
-
|
328
|
-
|
329
|
-
void MacroAssembler::LoadRoot(Register destination,
|
330
|
-
Heap::RootListIndex index,
|
331
|
-
Condition cond) {
|
332
|
-
ldr(destination, MemOperand(roots, index << kPointerSizeLog2), cond);
|
333
|
-
}
|
334
|
-
|
335
|
-
|
336
|
-
void MacroAssembler::StoreRoot(Register source,
|
337
|
-
Heap::RootListIndex index,
|
338
|
-
Condition cond) {
|
339
|
-
str(source, MemOperand(roots, index << kPointerSizeLog2), cond);
|
340
|
-
}
|
341
|
-
|
342
|
-
|
343
|
-
void MacroAssembler::RecordWriteHelper(Register object,
|
344
|
-
Register address,
|
345
|
-
Register scratch) {
|
346
|
-
if (FLAG_debug_code) {
|
347
|
-
// Check that the object is not in new space.
|
348
|
-
Label not_in_new_space;
|
349
|
-
InNewSpace(object, scratch, ne, ¬_in_new_space);
|
350
|
-
Abort("new-space object passed to RecordWriteHelper");
|
351
|
-
bind(¬_in_new_space);
|
352
|
-
}
|
353
|
-
|
354
|
-
// Calculate page address.
|
355
|
-
Bfc(object, 0, kPageSizeBits);
|
356
|
-
|
357
|
-
// Calculate region number.
|
358
|
-
Ubfx(address, address, Page::kRegionSizeLog2,
|
359
|
-
kPageSizeBits - Page::kRegionSizeLog2);
|
360
|
-
|
361
|
-
// Mark region dirty.
|
362
|
-
ldr(scratch, MemOperand(object, Page::kDirtyFlagOffset));
|
363
|
-
mov(ip, Operand(1));
|
364
|
-
orr(scratch, scratch, Operand(ip, LSL, address));
|
365
|
-
str(scratch, MemOperand(object, Page::kDirtyFlagOffset));
|
366
|
-
}
|
367
|
-
|
368
|
-
|
369
|
-
void MacroAssembler::InNewSpace(Register object,
|
370
|
-
Register scratch,
|
371
|
-
Condition cc,
|
372
|
-
Label* branch) {
|
373
|
-
ASSERT(cc == eq || cc == ne);
|
374
|
-
and_(scratch, object, Operand(ExternalReference::new_space_mask()));
|
375
|
-
cmp(scratch, Operand(ExternalReference::new_space_start()));
|
376
|
-
b(cc, branch);
|
377
|
-
}
|
378
|
-
|
379
|
-
|
380
|
-
// Will clobber 4 registers: object, offset, scratch, ip. The
|
381
|
-
// register 'object' contains a heap object pointer. The heap object
|
382
|
-
// tag is shifted away.
|
383
|
-
void MacroAssembler::RecordWrite(Register object,
|
384
|
-
Operand offset,
|
385
|
-
Register scratch0,
|
386
|
-
Register scratch1) {
|
387
|
-
// The compiled code assumes that record write doesn't change the
|
388
|
-
// context register, so we check that none of the clobbered
|
389
|
-
// registers are cp.
|
390
|
-
ASSERT(!object.is(cp) && !scratch0.is(cp) && !scratch1.is(cp));
|
391
|
-
|
392
|
-
Label done;
|
393
|
-
|
394
|
-
// First, test that the object is not in the new space. We cannot set
|
395
|
-
// region marks for new space pages.
|
396
|
-
InNewSpace(object, scratch0, eq, &done);
|
397
|
-
|
398
|
-
// Add offset into the object.
|
399
|
-
add(scratch0, object, offset);
|
400
|
-
|
401
|
-
// Record the actual write.
|
402
|
-
RecordWriteHelper(object, scratch0, scratch1);
|
403
|
-
|
404
|
-
bind(&done);
|
405
|
-
|
406
|
-
// Clobber all input registers when running with the debug-code flag
|
407
|
-
// turned on to provoke errors.
|
408
|
-
if (FLAG_debug_code) {
|
409
|
-
mov(object, Operand(BitCast<int32_t>(kZapValue)));
|
410
|
-
mov(scratch0, Operand(BitCast<int32_t>(kZapValue)));
|
411
|
-
mov(scratch1, Operand(BitCast<int32_t>(kZapValue)));
|
412
|
-
}
|
413
|
-
}
|
414
|
-
|
415
|
-
|
416
|
-
// Will clobber 4 registers: object, address, scratch, ip. The
|
417
|
-
// register 'object' contains a heap object pointer. The heap object
|
418
|
-
// tag is shifted away.
|
419
|
-
void MacroAssembler::RecordWrite(Register object,
|
420
|
-
Register address,
|
421
|
-
Register scratch) {
|
422
|
-
// The compiled code assumes that record write doesn't change the
|
423
|
-
// context register, so we check that none of the clobbered
|
424
|
-
// registers are cp.
|
425
|
-
ASSERT(!object.is(cp) && !address.is(cp) && !scratch.is(cp));
|
426
|
-
|
427
|
-
Label done;
|
428
|
-
|
429
|
-
// First, test that the object is not in the new space. We cannot set
|
430
|
-
// region marks for new space pages.
|
431
|
-
InNewSpace(object, scratch, eq, &done);
|
432
|
-
|
433
|
-
// Record the actual write.
|
434
|
-
RecordWriteHelper(object, address, scratch);
|
435
|
-
|
436
|
-
bind(&done);
|
437
|
-
|
438
|
-
// Clobber all input registers when running with the debug-code flag
|
439
|
-
// turned on to provoke errors.
|
440
|
-
if (FLAG_debug_code) {
|
441
|
-
mov(object, Operand(BitCast<int32_t>(kZapValue)));
|
442
|
-
mov(address, Operand(BitCast<int32_t>(kZapValue)));
|
443
|
-
mov(scratch, Operand(BitCast<int32_t>(kZapValue)));
|
444
|
-
}
|
445
|
-
}
|
446
|
-
|
447
|
-
|
448
|
-
void MacroAssembler::Ldrd(Register dst1, Register dst2,
|
449
|
-
const MemOperand& src, Condition cond) {
|
450
|
-
ASSERT(src.rm().is(no_reg));
|
451
|
-
ASSERT(!dst1.is(lr)); // r14.
|
452
|
-
ASSERT_EQ(0, dst1.code() % 2);
|
453
|
-
ASSERT_EQ(dst1.code() + 1, dst2.code());
|
454
|
-
|
455
|
-
// Generate two ldr instructions if ldrd is not available.
|
456
|
-
if (CpuFeatures::IsSupported(ARMv7)) {
|
457
|
-
CpuFeatures::Scope scope(ARMv7);
|
458
|
-
ldrd(dst1, dst2, src, cond);
|
459
|
-
} else {
|
460
|
-
MemOperand src2(src);
|
461
|
-
src2.set_offset(src2.offset() + 4);
|
462
|
-
if (dst1.is(src.rn())) {
|
463
|
-
ldr(dst2, src2, cond);
|
464
|
-
ldr(dst1, src, cond);
|
465
|
-
} else {
|
466
|
-
ldr(dst1, src, cond);
|
467
|
-
ldr(dst2, src2, cond);
|
468
|
-
}
|
469
|
-
}
|
470
|
-
}
|
471
|
-
|
472
|
-
|
473
|
-
void MacroAssembler::Strd(Register src1, Register src2,
|
474
|
-
const MemOperand& dst, Condition cond) {
|
475
|
-
ASSERT(dst.rm().is(no_reg));
|
476
|
-
ASSERT(!src1.is(lr)); // r14.
|
477
|
-
ASSERT_EQ(0, src1.code() % 2);
|
478
|
-
ASSERT_EQ(src1.code() + 1, src2.code());
|
479
|
-
|
480
|
-
// Generate two str instructions if strd is not available.
|
481
|
-
if (CpuFeatures::IsSupported(ARMv7)) {
|
482
|
-
CpuFeatures::Scope scope(ARMv7);
|
483
|
-
strd(src1, src2, dst, cond);
|
484
|
-
} else {
|
485
|
-
MemOperand dst2(dst);
|
486
|
-
dst2.set_offset(dst2.offset() + 4);
|
487
|
-
str(src1, dst, cond);
|
488
|
-
str(src2, dst2, cond);
|
489
|
-
}
|
490
|
-
}
|
491
|
-
|
492
|
-
|
493
|
-
void MacroAssembler::EnterFrame(StackFrame::Type type) {
|
494
|
-
// r0-r3: preserved
|
495
|
-
stm(db_w, sp, cp.bit() | fp.bit() | lr.bit());
|
496
|
-
mov(ip, Operand(Smi::FromInt(type)));
|
497
|
-
push(ip);
|
498
|
-
mov(ip, Operand(CodeObject()));
|
499
|
-
push(ip);
|
500
|
-
add(fp, sp, Operand(3 * kPointerSize)); // Adjust FP to point to saved FP.
|
501
|
-
}
|
502
|
-
|
503
|
-
|
504
|
-
void MacroAssembler::LeaveFrame(StackFrame::Type type) {
|
505
|
-
// r0: preserved
|
506
|
-
// r1: preserved
|
507
|
-
// r2: preserved
|
508
|
-
|
509
|
-
// Drop the execution stack down to the frame pointer and restore
|
510
|
-
// the caller frame pointer and return address.
|
511
|
-
mov(sp, fp);
|
512
|
-
ldm(ia_w, sp, fp.bit() | lr.bit());
|
513
|
-
}
|
514
|
-
|
515
|
-
|
516
|
-
void MacroAssembler::EnterExitFrame(ExitFrame::Mode mode) {
|
517
|
-
// Compute the argv pointer and keep it in a callee-saved register.
|
518
|
-
// r0 is argc.
|
519
|
-
add(r6, sp, Operand(r0, LSL, kPointerSizeLog2));
|
520
|
-
sub(r6, r6, Operand(kPointerSize));
|
521
|
-
|
522
|
-
// Compute callee's stack pointer before making changes and save it as
|
523
|
-
// ip register so that it is restored as sp register on exit, thereby
|
524
|
-
// popping the args.
|
525
|
-
|
526
|
-
// ip = sp + kPointerSize * #args;
|
527
|
-
add(ip, sp, Operand(r0, LSL, kPointerSizeLog2));
|
528
|
-
|
529
|
-
// Prepare the stack to be aligned when calling into C. After this point there
|
530
|
-
// are 5 pushes before the call into C, so the stack needs to be aligned after
|
531
|
-
// 5 pushes.
|
532
|
-
int frame_alignment = ActivationFrameAlignment();
|
533
|
-
int frame_alignment_mask = frame_alignment - 1;
|
534
|
-
if (frame_alignment != kPointerSize) {
|
535
|
-
// The following code needs to be more general if this assert does not hold.
|
536
|
-
ASSERT(frame_alignment == 2 * kPointerSize);
|
537
|
-
// With 5 pushes left the frame must be unaligned at this point.
|
538
|
-
mov(r7, Operand(Smi::FromInt(0)));
|
539
|
-
tst(sp, Operand((frame_alignment - kPointerSize) & frame_alignment_mask));
|
540
|
-
push(r7, eq); // Push if aligned to make it unaligned.
|
541
|
-
}
|
542
|
-
|
543
|
-
// Push in reverse order: caller_fp, sp_on_exit, and caller_pc.
|
544
|
-
stm(db_w, sp, fp.bit() | ip.bit() | lr.bit());
|
545
|
-
mov(fp, Operand(sp)); // Setup new frame pointer.
|
546
|
-
|
547
|
-
mov(ip, Operand(CodeObject()));
|
548
|
-
push(ip); // Accessed from ExitFrame::code_slot.
|
549
|
-
|
550
|
-
// Save the frame pointer and the context in top.
|
551
|
-
mov(ip, Operand(ExternalReference(Top::k_c_entry_fp_address)));
|
552
|
-
str(fp, MemOperand(ip));
|
553
|
-
mov(ip, Operand(ExternalReference(Top::k_context_address)));
|
554
|
-
str(cp, MemOperand(ip));
|
555
|
-
|
556
|
-
// Setup argc and the builtin function in callee-saved registers.
|
557
|
-
mov(r4, Operand(r0));
|
558
|
-
mov(r5, Operand(r1));
|
559
|
-
|
560
|
-
|
561
|
-
#ifdef ENABLE_DEBUGGER_SUPPORT
|
562
|
-
// Save the state of all registers to the stack from the memory
|
563
|
-
// location. This is needed to allow nested break points.
|
564
|
-
if (mode == ExitFrame::MODE_DEBUG) {
|
565
|
-
// Use sp as base to push.
|
566
|
-
CopyRegistersFromMemoryToStack(sp, kJSCallerSaved);
|
567
|
-
}
|
568
|
-
#endif
|
569
|
-
}
|
570
|
-
|
571
|
-
|
572
|
-
void MacroAssembler::InitializeNewString(Register string,
|
573
|
-
Register length,
|
574
|
-
Heap::RootListIndex map_index,
|
575
|
-
Register scratch1,
|
576
|
-
Register scratch2) {
|
577
|
-
mov(scratch1, Operand(length, LSL, kSmiTagSize));
|
578
|
-
LoadRoot(scratch2, map_index);
|
579
|
-
str(scratch1, FieldMemOperand(string, String::kLengthOffset));
|
580
|
-
mov(scratch1, Operand(String::kEmptyHashField));
|
581
|
-
str(scratch2, FieldMemOperand(string, HeapObject::kMapOffset));
|
582
|
-
str(scratch1, FieldMemOperand(string, String::kHashFieldOffset));
|
583
|
-
}
|
584
|
-
|
585
|
-
|
586
|
-
int MacroAssembler::ActivationFrameAlignment() {
|
587
|
-
#if defined(V8_HOST_ARCH_ARM)
|
588
|
-
// Running on the real platform. Use the alignment as mandated by the local
|
589
|
-
// environment.
|
590
|
-
// Note: This will break if we ever start generating snapshots on one ARM
|
591
|
-
// platform for another ARM platform with a different alignment.
|
592
|
-
return OS::ActivationFrameAlignment();
|
593
|
-
#else // defined(V8_HOST_ARCH_ARM)
|
594
|
-
// If we are using the simulator then we should always align to the expected
|
595
|
-
// alignment. As the simulator is used to generate snapshots we do not know
|
596
|
-
// if the target platform will need alignment, so this is controlled from a
|
597
|
-
// flag.
|
598
|
-
return FLAG_sim_stack_alignment;
|
599
|
-
#endif // defined(V8_HOST_ARCH_ARM)
|
600
|
-
}
|
601
|
-
|
602
|
-
|
603
|
-
void MacroAssembler::LeaveExitFrame(ExitFrame::Mode mode) {
|
604
|
-
#ifdef ENABLE_DEBUGGER_SUPPORT
|
605
|
-
// Restore the memory copy of the registers by digging them out from
|
606
|
-
// the stack. This is needed to allow nested break points.
|
607
|
-
if (mode == ExitFrame::MODE_DEBUG) {
|
608
|
-
// This code intentionally clobbers r2 and r3.
|
609
|
-
const int kCallerSavedSize = kNumJSCallerSaved * kPointerSize;
|
610
|
-
const int kOffset = ExitFrameConstants::kCodeOffset - kCallerSavedSize;
|
611
|
-
add(r3, fp, Operand(kOffset));
|
612
|
-
CopyRegistersFromStackToMemory(r3, r2, kJSCallerSaved);
|
613
|
-
}
|
614
|
-
#endif
|
615
|
-
|
616
|
-
// Clear top frame.
|
617
|
-
mov(r3, Operand(0));
|
618
|
-
mov(ip, Operand(ExternalReference(Top::k_c_entry_fp_address)));
|
619
|
-
str(r3, MemOperand(ip));
|
620
|
-
|
621
|
-
// Restore current context from top and clear it in debug mode.
|
622
|
-
mov(ip, Operand(ExternalReference(Top::k_context_address)));
|
623
|
-
ldr(cp, MemOperand(ip));
|
624
|
-
#ifdef DEBUG
|
625
|
-
str(r3, MemOperand(ip));
|
626
|
-
#endif
|
627
|
-
|
628
|
-
// Pop the arguments, restore registers, and return.
|
629
|
-
mov(sp, Operand(fp)); // respect ABI stack constraint
|
630
|
-
ldm(ia, sp, fp.bit() | sp.bit() | pc.bit());
|
631
|
-
}
|
632
|
-
|
633
|
-
|
634
|
-
void MacroAssembler::InvokePrologue(const ParameterCount& expected,
|
635
|
-
const ParameterCount& actual,
|
636
|
-
Handle<Code> code_constant,
|
637
|
-
Register code_reg,
|
638
|
-
Label* done,
|
639
|
-
InvokeFlag flag) {
|
640
|
-
bool definitely_matches = false;
|
641
|
-
Label regular_invoke;
|
642
|
-
|
643
|
-
// Check whether the expected and actual arguments count match. If not,
|
644
|
-
// setup registers according to contract with ArgumentsAdaptorTrampoline:
|
645
|
-
// r0: actual arguments count
|
646
|
-
// r1: function (passed through to callee)
|
647
|
-
// r2: expected arguments count
|
648
|
-
// r3: callee code entry
|
649
|
-
|
650
|
-
// The code below is made a lot easier because the calling code already sets
|
651
|
-
// up actual and expected registers according to the contract if values are
|
652
|
-
// passed in registers.
|
653
|
-
ASSERT(actual.is_immediate() || actual.reg().is(r0));
|
654
|
-
ASSERT(expected.is_immediate() || expected.reg().is(r2));
|
655
|
-
ASSERT((!code_constant.is_null() && code_reg.is(no_reg)) || code_reg.is(r3));
|
656
|
-
|
657
|
-
if (expected.is_immediate()) {
|
658
|
-
ASSERT(actual.is_immediate());
|
659
|
-
if (expected.immediate() == actual.immediate()) {
|
660
|
-
definitely_matches = true;
|
661
|
-
} else {
|
662
|
-
mov(r0, Operand(actual.immediate()));
|
663
|
-
const int sentinel = SharedFunctionInfo::kDontAdaptArgumentsSentinel;
|
664
|
-
if (expected.immediate() == sentinel) {
|
665
|
-
// Don't worry about adapting arguments for builtins that
|
666
|
-
// don't want that done. Skip adaption code by making it look
|
667
|
-
// like we have a match between expected and actual number of
|
668
|
-
// arguments.
|
669
|
-
definitely_matches = true;
|
670
|
-
} else {
|
671
|
-
mov(r2, Operand(expected.immediate()));
|
672
|
-
}
|
673
|
-
}
|
674
|
-
} else {
|
675
|
-
if (actual.is_immediate()) {
|
676
|
-
cmp(expected.reg(), Operand(actual.immediate()));
|
677
|
-
b(eq, ®ular_invoke);
|
678
|
-
mov(r0, Operand(actual.immediate()));
|
679
|
-
} else {
|
680
|
-
cmp(expected.reg(), Operand(actual.reg()));
|
681
|
-
b(eq, ®ular_invoke);
|
682
|
-
}
|
683
|
-
}
|
684
|
-
|
685
|
-
if (!definitely_matches) {
|
686
|
-
if (!code_constant.is_null()) {
|
687
|
-
mov(r3, Operand(code_constant));
|
688
|
-
add(r3, r3, Operand(Code::kHeaderSize - kHeapObjectTag));
|
689
|
-
}
|
690
|
-
|
691
|
-
Handle<Code> adaptor =
|
692
|
-
Handle<Code>(Builtins::builtin(Builtins::ArgumentsAdaptorTrampoline));
|
693
|
-
if (flag == CALL_FUNCTION) {
|
694
|
-
Call(adaptor, RelocInfo::CODE_TARGET);
|
695
|
-
b(done);
|
696
|
-
} else {
|
697
|
-
Jump(adaptor, RelocInfo::CODE_TARGET);
|
698
|
-
}
|
699
|
-
bind(®ular_invoke);
|
700
|
-
}
|
701
|
-
}
|
702
|
-
|
703
|
-
|
704
|
-
void MacroAssembler::InvokeCode(Register code,
|
705
|
-
const ParameterCount& expected,
|
706
|
-
const ParameterCount& actual,
|
707
|
-
InvokeFlag flag) {
|
708
|
-
Label done;
|
709
|
-
|
710
|
-
InvokePrologue(expected, actual, Handle<Code>::null(), code, &done, flag);
|
711
|
-
if (flag == CALL_FUNCTION) {
|
712
|
-
Call(code);
|
713
|
-
} else {
|
714
|
-
ASSERT(flag == JUMP_FUNCTION);
|
715
|
-
Jump(code);
|
716
|
-
}
|
717
|
-
|
718
|
-
// Continue here if InvokePrologue does handle the invocation due to
|
719
|
-
// mismatched parameter counts.
|
720
|
-
bind(&done);
|
721
|
-
}
|
722
|
-
|
723
|
-
|
724
|
-
void MacroAssembler::InvokeCode(Handle<Code> code,
|
725
|
-
const ParameterCount& expected,
|
726
|
-
const ParameterCount& actual,
|
727
|
-
RelocInfo::Mode rmode,
|
728
|
-
InvokeFlag flag) {
|
729
|
-
Label done;
|
730
|
-
|
731
|
-
InvokePrologue(expected, actual, code, no_reg, &done, flag);
|
732
|
-
if (flag == CALL_FUNCTION) {
|
733
|
-
Call(code, rmode);
|
734
|
-
} else {
|
735
|
-
Jump(code, rmode);
|
736
|
-
}
|
737
|
-
|
738
|
-
// Continue here if InvokePrologue does handle the invocation due to
|
739
|
-
// mismatched parameter counts.
|
740
|
-
bind(&done);
|
741
|
-
}
|
742
|
-
|
743
|
-
|
744
|
-
void MacroAssembler::InvokeFunction(Register fun,
|
745
|
-
const ParameterCount& actual,
|
746
|
-
InvokeFlag flag) {
|
747
|
-
// Contract with called JS functions requires that function is passed in r1.
|
748
|
-
ASSERT(fun.is(r1));
|
749
|
-
|
750
|
-
Register expected_reg = r2;
|
751
|
-
Register code_reg = r3;
|
752
|
-
|
753
|
-
ldr(code_reg, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset));
|
754
|
-
ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset));
|
755
|
-
ldr(expected_reg,
|
756
|
-
FieldMemOperand(code_reg,
|
757
|
-
SharedFunctionInfo::kFormalParameterCountOffset));
|
758
|
-
mov(expected_reg, Operand(expected_reg, ASR, kSmiTagSize));
|
759
|
-
ldr(code_reg,
|
760
|
-
MemOperand(code_reg, SharedFunctionInfo::kCodeOffset - kHeapObjectTag));
|
761
|
-
add(code_reg, code_reg, Operand(Code::kHeaderSize - kHeapObjectTag));
|
762
|
-
|
763
|
-
ParameterCount expected(expected_reg);
|
764
|
-
InvokeCode(code_reg, expected, actual, flag);
|
765
|
-
}
|
766
|
-
|
767
|
-
|
768
|
-
void MacroAssembler::InvokeFunction(JSFunction* function,
|
769
|
-
const ParameterCount& actual,
|
770
|
-
InvokeFlag flag) {
|
771
|
-
ASSERT(function->is_compiled());
|
772
|
-
|
773
|
-
// Get the function and setup the context.
|
774
|
-
mov(r1, Operand(Handle<JSFunction>(function)));
|
775
|
-
ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset));
|
776
|
-
|
777
|
-
// Invoke the cached code.
|
778
|
-
Handle<Code> code(function->code());
|
779
|
-
ParameterCount expected(function->shared()->formal_parameter_count());
|
780
|
-
InvokeCode(code, expected, actual, RelocInfo::CODE_TARGET, flag);
|
781
|
-
}
|
782
|
-
|
783
|
-
#ifdef ENABLE_DEBUGGER_SUPPORT
|
784
|
-
void MacroAssembler::SaveRegistersToMemory(RegList regs) {
|
785
|
-
ASSERT((regs & ~kJSCallerSaved) == 0);
|
786
|
-
// Copy the content of registers to memory location.
|
787
|
-
for (int i = 0; i < kNumJSCallerSaved; i++) {
|
788
|
-
int r = JSCallerSavedCode(i);
|
789
|
-
if ((regs & (1 << r)) != 0) {
|
790
|
-
Register reg = { r };
|
791
|
-
mov(ip, Operand(ExternalReference(Debug_Address::Register(i))));
|
792
|
-
str(reg, MemOperand(ip));
|
793
|
-
}
|
794
|
-
}
|
795
|
-
}
|
796
|
-
|
797
|
-
|
798
|
-
void MacroAssembler::RestoreRegistersFromMemory(RegList regs) {
|
799
|
-
ASSERT((regs & ~kJSCallerSaved) == 0);
|
800
|
-
// Copy the content of memory location to registers.
|
801
|
-
for (int i = kNumJSCallerSaved; --i >= 0;) {
|
802
|
-
int r = JSCallerSavedCode(i);
|
803
|
-
if ((regs & (1 << r)) != 0) {
|
804
|
-
Register reg = { r };
|
805
|
-
mov(ip, Operand(ExternalReference(Debug_Address::Register(i))));
|
806
|
-
ldr(reg, MemOperand(ip));
|
807
|
-
}
|
808
|
-
}
|
809
|
-
}
|
810
|
-
|
811
|
-
|
812
|
-
void MacroAssembler::CopyRegistersFromMemoryToStack(Register base,
|
813
|
-
RegList regs) {
|
814
|
-
ASSERT((regs & ~kJSCallerSaved) == 0);
|
815
|
-
// Copy the content of the memory location to the stack and adjust base.
|
816
|
-
for (int i = kNumJSCallerSaved; --i >= 0;) {
|
817
|
-
int r = JSCallerSavedCode(i);
|
818
|
-
if ((regs & (1 << r)) != 0) {
|
819
|
-
mov(ip, Operand(ExternalReference(Debug_Address::Register(i))));
|
820
|
-
ldr(ip, MemOperand(ip));
|
821
|
-
str(ip, MemOperand(base, 4, NegPreIndex));
|
822
|
-
}
|
823
|
-
}
|
824
|
-
}
|
825
|
-
|
826
|
-
|
827
|
-
void MacroAssembler::CopyRegistersFromStackToMemory(Register base,
|
828
|
-
Register scratch,
|
829
|
-
RegList regs) {
|
830
|
-
ASSERT((regs & ~kJSCallerSaved) == 0);
|
831
|
-
// Copy the content of the stack to the memory location and adjust base.
|
832
|
-
for (int i = 0; i < kNumJSCallerSaved; i++) {
|
833
|
-
int r = JSCallerSavedCode(i);
|
834
|
-
if ((regs & (1 << r)) != 0) {
|
835
|
-
mov(ip, Operand(ExternalReference(Debug_Address::Register(i))));
|
836
|
-
ldr(scratch, MemOperand(base, 4, PostIndex));
|
837
|
-
str(scratch, MemOperand(ip));
|
838
|
-
}
|
839
|
-
}
|
840
|
-
}
|
841
|
-
|
842
|
-
|
843
|
-
void MacroAssembler::DebugBreak() {
|
844
|
-
ASSERT(allow_stub_calls());
|
845
|
-
mov(r0, Operand(0));
|
846
|
-
mov(r1, Operand(ExternalReference(Runtime::kDebugBreak)));
|
847
|
-
CEntryStub ces(1);
|
848
|
-
Call(ces.GetCode(), RelocInfo::DEBUG_BREAK);
|
849
|
-
}
|
850
|
-
#endif
|
851
|
-
|
852
|
-
|
853
|
-
void MacroAssembler::PushTryHandler(CodeLocation try_location,
|
854
|
-
HandlerType type) {
|
855
|
-
// Adjust this code if not the case.
|
856
|
-
ASSERT(StackHandlerConstants::kSize == 4 * kPointerSize);
|
857
|
-
// The pc (return address) is passed in register lr.
|
858
|
-
if (try_location == IN_JAVASCRIPT) {
|
859
|
-
if (type == TRY_CATCH_HANDLER) {
|
860
|
-
mov(r3, Operand(StackHandler::TRY_CATCH));
|
861
|
-
} else {
|
862
|
-
mov(r3, Operand(StackHandler::TRY_FINALLY));
|
863
|
-
}
|
864
|
-
ASSERT(StackHandlerConstants::kStateOffset == 1 * kPointerSize
|
865
|
-
&& StackHandlerConstants::kFPOffset == 2 * kPointerSize
|
866
|
-
&& StackHandlerConstants::kPCOffset == 3 * kPointerSize);
|
867
|
-
stm(db_w, sp, r3.bit() | fp.bit() | lr.bit());
|
868
|
-
// Save the current handler as the next handler.
|
869
|
-
mov(r3, Operand(ExternalReference(Top::k_handler_address)));
|
870
|
-
ldr(r1, MemOperand(r3));
|
871
|
-
ASSERT(StackHandlerConstants::kNextOffset == 0);
|
872
|
-
push(r1);
|
873
|
-
// Link this handler as the new current one.
|
874
|
-
str(sp, MemOperand(r3));
|
875
|
-
} else {
|
876
|
-
// Must preserve r0-r4, r5-r7 are available.
|
877
|
-
ASSERT(try_location == IN_JS_ENTRY);
|
878
|
-
// The frame pointer does not point to a JS frame so we save NULL
|
879
|
-
// for fp. We expect the code throwing an exception to check fp
|
880
|
-
// before dereferencing it to restore the context.
|
881
|
-
mov(ip, Operand(0)); // To save a NULL frame pointer.
|
882
|
-
mov(r6, Operand(StackHandler::ENTRY));
|
883
|
-
ASSERT(StackHandlerConstants::kStateOffset == 1 * kPointerSize
|
884
|
-
&& StackHandlerConstants::kFPOffset == 2 * kPointerSize
|
885
|
-
&& StackHandlerConstants::kPCOffset == 3 * kPointerSize);
|
886
|
-
stm(db_w, sp, r6.bit() | ip.bit() | lr.bit());
|
887
|
-
// Save the current handler as the next handler.
|
888
|
-
mov(r7, Operand(ExternalReference(Top::k_handler_address)));
|
889
|
-
ldr(r6, MemOperand(r7));
|
890
|
-
ASSERT(StackHandlerConstants::kNextOffset == 0);
|
891
|
-
push(r6);
|
892
|
-
// Link this handler as the new current one.
|
893
|
-
str(sp, MemOperand(r7));
|
894
|
-
}
|
895
|
-
}
|
896
|
-
|
897
|
-
|
898
|
-
void MacroAssembler::PopTryHandler() {
|
899
|
-
ASSERT_EQ(0, StackHandlerConstants::kNextOffset);
|
900
|
-
pop(r1);
|
901
|
-
mov(ip, Operand(ExternalReference(Top::k_handler_address)));
|
902
|
-
add(sp, sp, Operand(StackHandlerConstants::kSize - kPointerSize));
|
903
|
-
str(r1, MemOperand(ip));
|
904
|
-
}
|
905
|
-
|
906
|
-
|
907
|
-
void MacroAssembler::CheckAccessGlobalProxy(Register holder_reg,
|
908
|
-
Register scratch,
|
909
|
-
Label* miss) {
|
910
|
-
Label same_contexts;
|
911
|
-
|
912
|
-
ASSERT(!holder_reg.is(scratch));
|
913
|
-
ASSERT(!holder_reg.is(ip));
|
914
|
-
ASSERT(!scratch.is(ip));
|
915
|
-
|
916
|
-
// Load current lexical context from the stack frame.
|
917
|
-
ldr(scratch, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
918
|
-
// In debug mode, make sure the lexical context is set.
|
919
|
-
#ifdef DEBUG
|
920
|
-
cmp(scratch, Operand(0));
|
921
|
-
Check(ne, "we should not have an empty lexical context");
|
922
|
-
#endif
|
923
|
-
|
924
|
-
// Load the global context of the current context.
|
925
|
-
int offset = Context::kHeaderSize + Context::GLOBAL_INDEX * kPointerSize;
|
926
|
-
ldr(scratch, FieldMemOperand(scratch, offset));
|
927
|
-
ldr(scratch, FieldMemOperand(scratch, GlobalObject::kGlobalContextOffset));
|
928
|
-
|
929
|
-
// Check the context is a global context.
|
930
|
-
if (FLAG_debug_code) {
|
931
|
-
// TODO(119): avoid push(holder_reg)/pop(holder_reg)
|
932
|
-
// Cannot use ip as a temporary in this verification code. Due to the fact
|
933
|
-
// that ip is clobbered as part of cmp with an object Operand.
|
934
|
-
push(holder_reg); // Temporarily save holder on the stack.
|
935
|
-
// Read the first word and compare to the global_context_map.
|
936
|
-
ldr(holder_reg, FieldMemOperand(scratch, HeapObject::kMapOffset));
|
937
|
-
LoadRoot(ip, Heap::kGlobalContextMapRootIndex);
|
938
|
-
cmp(holder_reg, ip);
|
939
|
-
Check(eq, "JSGlobalObject::global_context should be a global context.");
|
940
|
-
pop(holder_reg); // Restore holder.
|
941
|
-
}
|
942
|
-
|
943
|
-
// Check if both contexts are the same.
|
944
|
-
ldr(ip, FieldMemOperand(holder_reg, JSGlobalProxy::kContextOffset));
|
945
|
-
cmp(scratch, Operand(ip));
|
946
|
-
b(eq, &same_contexts);
|
947
|
-
|
948
|
-
// Check the context is a global context.
|
949
|
-
if (FLAG_debug_code) {
|
950
|
-
// TODO(119): avoid push(holder_reg)/pop(holder_reg)
|
951
|
-
// Cannot use ip as a temporary in this verification code. Due to the fact
|
952
|
-
// that ip is clobbered as part of cmp with an object Operand.
|
953
|
-
push(holder_reg); // Temporarily save holder on the stack.
|
954
|
-
mov(holder_reg, ip); // Move ip to its holding place.
|
955
|
-
LoadRoot(ip, Heap::kNullValueRootIndex);
|
956
|
-
cmp(holder_reg, ip);
|
957
|
-
Check(ne, "JSGlobalProxy::context() should not be null.");
|
958
|
-
|
959
|
-
ldr(holder_reg, FieldMemOperand(holder_reg, HeapObject::kMapOffset));
|
960
|
-
LoadRoot(ip, Heap::kGlobalContextMapRootIndex);
|
961
|
-
cmp(holder_reg, ip);
|
962
|
-
Check(eq, "JSGlobalObject::global_context should be a global context.");
|
963
|
-
// Restore ip is not needed. ip is reloaded below.
|
964
|
-
pop(holder_reg); // Restore holder.
|
965
|
-
// Restore ip to holder's context.
|
966
|
-
ldr(ip, FieldMemOperand(holder_reg, JSGlobalProxy::kContextOffset));
|
967
|
-
}
|
968
|
-
|
969
|
-
// Check that the security token in the calling global object is
|
970
|
-
// compatible with the security token in the receiving global
|
971
|
-
// object.
|
972
|
-
int token_offset = Context::kHeaderSize +
|
973
|
-
Context::SECURITY_TOKEN_INDEX * kPointerSize;
|
974
|
-
|
975
|
-
ldr(scratch, FieldMemOperand(scratch, token_offset));
|
976
|
-
ldr(ip, FieldMemOperand(ip, token_offset));
|
977
|
-
cmp(scratch, Operand(ip));
|
978
|
-
b(ne, miss);
|
979
|
-
|
980
|
-
bind(&same_contexts);
|
981
|
-
}
|
982
|
-
|
983
|
-
|
984
|
-
void MacroAssembler::AllocateInNewSpace(int object_size,
|
985
|
-
Register result,
|
986
|
-
Register scratch1,
|
987
|
-
Register scratch2,
|
988
|
-
Label* gc_required,
|
989
|
-
AllocationFlags flags) {
|
990
|
-
ASSERT(!result.is(scratch1));
|
991
|
-
ASSERT(!scratch1.is(scratch2));
|
992
|
-
|
993
|
-
// Make object size into bytes.
|
994
|
-
if ((flags & SIZE_IN_WORDS) != 0) {
|
995
|
-
object_size *= kPointerSize;
|
996
|
-
}
|
997
|
-
ASSERT_EQ(0, object_size & kObjectAlignmentMask);
|
998
|
-
|
999
|
-
// Load address of new object into result and allocation top address into
|
1000
|
-
// scratch1.
|
1001
|
-
ExternalReference new_space_allocation_top =
|
1002
|
-
ExternalReference::new_space_allocation_top_address();
|
1003
|
-
mov(scratch1, Operand(new_space_allocation_top));
|
1004
|
-
if ((flags & RESULT_CONTAINS_TOP) == 0) {
|
1005
|
-
ldr(result, MemOperand(scratch1));
|
1006
|
-
} else if (FLAG_debug_code) {
|
1007
|
-
// Assert that result actually contains top on entry. scratch2 is used
|
1008
|
-
// immediately below so this use of scratch2 does not cause difference with
|
1009
|
-
// respect to register content between debug and release mode.
|
1010
|
-
ldr(scratch2, MemOperand(scratch1));
|
1011
|
-
cmp(result, scratch2);
|
1012
|
-
Check(eq, "Unexpected allocation top");
|
1013
|
-
}
|
1014
|
-
|
1015
|
-
// Calculate new top and bail out if new space is exhausted. Use result
|
1016
|
-
// to calculate the new top.
|
1017
|
-
ExternalReference new_space_allocation_limit =
|
1018
|
-
ExternalReference::new_space_allocation_limit_address();
|
1019
|
-
mov(scratch2, Operand(new_space_allocation_limit));
|
1020
|
-
ldr(scratch2, MemOperand(scratch2));
|
1021
|
-
add(result, result, Operand(object_size));
|
1022
|
-
cmp(result, Operand(scratch2));
|
1023
|
-
b(hi, gc_required);
|
1024
|
-
str(result, MemOperand(scratch1));
|
1025
|
-
|
1026
|
-
// Tag and adjust back to start of new object.
|
1027
|
-
if ((flags & TAG_OBJECT) != 0) {
|
1028
|
-
sub(result, result, Operand(object_size - kHeapObjectTag));
|
1029
|
-
} else {
|
1030
|
-
sub(result, result, Operand(object_size));
|
1031
|
-
}
|
1032
|
-
}
|
1033
|
-
|
1034
|
-
|
1035
|
-
void MacroAssembler::AllocateInNewSpace(Register object_size,
|
1036
|
-
Register result,
|
1037
|
-
Register scratch1,
|
1038
|
-
Register scratch2,
|
1039
|
-
Label* gc_required,
|
1040
|
-
AllocationFlags flags) {
|
1041
|
-
ASSERT(!result.is(scratch1));
|
1042
|
-
ASSERT(!scratch1.is(scratch2));
|
1043
|
-
|
1044
|
-
// Load address of new object into result and allocation top address into
|
1045
|
-
// scratch1.
|
1046
|
-
ExternalReference new_space_allocation_top =
|
1047
|
-
ExternalReference::new_space_allocation_top_address();
|
1048
|
-
mov(scratch1, Operand(new_space_allocation_top));
|
1049
|
-
if ((flags & RESULT_CONTAINS_TOP) == 0) {
|
1050
|
-
ldr(result, MemOperand(scratch1));
|
1051
|
-
} else if (FLAG_debug_code) {
|
1052
|
-
// Assert that result actually contains top on entry. scratch2 is used
|
1053
|
-
// immediately below so this use of scratch2 does not cause difference with
|
1054
|
-
// respect to register content between debug and release mode.
|
1055
|
-
ldr(scratch2, MemOperand(scratch1));
|
1056
|
-
cmp(result, scratch2);
|
1057
|
-
Check(eq, "Unexpected allocation top");
|
1058
|
-
}
|
1059
|
-
|
1060
|
-
// Calculate new top and bail out if new space is exhausted. Use result
|
1061
|
-
// to calculate the new top. Object size is in words so a shift is required to
|
1062
|
-
// get the number of bytes
|
1063
|
-
ExternalReference new_space_allocation_limit =
|
1064
|
-
ExternalReference::new_space_allocation_limit_address();
|
1065
|
-
mov(scratch2, Operand(new_space_allocation_limit));
|
1066
|
-
ldr(scratch2, MemOperand(scratch2));
|
1067
|
-
if ((flags & SIZE_IN_WORDS) != 0) {
|
1068
|
-
add(result, result, Operand(object_size, LSL, kPointerSizeLog2));
|
1069
|
-
} else {
|
1070
|
-
add(result, result, Operand(object_size));
|
1071
|
-
}
|
1072
|
-
cmp(result, Operand(scratch2));
|
1073
|
-
b(hi, gc_required);
|
1074
|
-
|
1075
|
-
// Update allocation top. result temporarily holds the new top.
|
1076
|
-
if (FLAG_debug_code) {
|
1077
|
-
tst(result, Operand(kObjectAlignmentMask));
|
1078
|
-
Check(eq, "Unaligned allocation in new space");
|
1079
|
-
}
|
1080
|
-
str(result, MemOperand(scratch1));
|
1081
|
-
|
1082
|
-
// Adjust back to start of new object.
|
1083
|
-
if ((flags & SIZE_IN_WORDS) != 0) {
|
1084
|
-
sub(result, result, Operand(object_size, LSL, kPointerSizeLog2));
|
1085
|
-
} else {
|
1086
|
-
sub(result, result, Operand(object_size));
|
1087
|
-
}
|
1088
|
-
|
1089
|
-
// Tag object if requested.
|
1090
|
-
if ((flags & TAG_OBJECT) != 0) {
|
1091
|
-
add(result, result, Operand(kHeapObjectTag));
|
1092
|
-
}
|
1093
|
-
}
|
1094
|
-
|
1095
|
-
|
1096
|
-
void MacroAssembler::UndoAllocationInNewSpace(Register object,
|
1097
|
-
Register scratch) {
|
1098
|
-
ExternalReference new_space_allocation_top =
|
1099
|
-
ExternalReference::new_space_allocation_top_address();
|
1100
|
-
|
1101
|
-
// Make sure the object has no tag before resetting top.
|
1102
|
-
and_(object, object, Operand(~kHeapObjectTagMask));
|
1103
|
-
#ifdef DEBUG
|
1104
|
-
// Check that the object un-allocated is below the current top.
|
1105
|
-
mov(scratch, Operand(new_space_allocation_top));
|
1106
|
-
ldr(scratch, MemOperand(scratch));
|
1107
|
-
cmp(object, scratch);
|
1108
|
-
Check(lt, "Undo allocation of non allocated memory");
|
1109
|
-
#endif
|
1110
|
-
// Write the address of the object to un-allocate as the current top.
|
1111
|
-
mov(scratch, Operand(new_space_allocation_top));
|
1112
|
-
str(object, MemOperand(scratch));
|
1113
|
-
}
|
1114
|
-
|
1115
|
-
|
1116
|
-
void MacroAssembler::AllocateTwoByteString(Register result,
|
1117
|
-
Register length,
|
1118
|
-
Register scratch1,
|
1119
|
-
Register scratch2,
|
1120
|
-
Register scratch3,
|
1121
|
-
Label* gc_required) {
|
1122
|
-
// Calculate the number of bytes needed for the characters in the string while
|
1123
|
-
// observing object alignment.
|
1124
|
-
ASSERT((SeqTwoByteString::kHeaderSize & kObjectAlignmentMask) == 0);
|
1125
|
-
mov(scratch1, Operand(length, LSL, 1)); // Length in bytes, not chars.
|
1126
|
-
add(scratch1, scratch1,
|
1127
|
-
Operand(kObjectAlignmentMask + SeqTwoByteString::kHeaderSize));
|
1128
|
-
and_(scratch1, scratch1, Operand(~kObjectAlignmentMask));
|
1129
|
-
|
1130
|
-
// Allocate two-byte string in new space.
|
1131
|
-
AllocateInNewSpace(scratch1,
|
1132
|
-
result,
|
1133
|
-
scratch2,
|
1134
|
-
scratch3,
|
1135
|
-
gc_required,
|
1136
|
-
TAG_OBJECT);
|
1137
|
-
|
1138
|
-
// Set the map, length and hash field.
|
1139
|
-
InitializeNewString(result,
|
1140
|
-
length,
|
1141
|
-
Heap::kStringMapRootIndex,
|
1142
|
-
scratch1,
|
1143
|
-
scratch2);
|
1144
|
-
}
|
1145
|
-
|
1146
|
-
|
1147
|
-
void MacroAssembler::AllocateAsciiString(Register result,
|
1148
|
-
Register length,
|
1149
|
-
Register scratch1,
|
1150
|
-
Register scratch2,
|
1151
|
-
Register scratch3,
|
1152
|
-
Label* gc_required) {
|
1153
|
-
// Calculate the number of bytes needed for the characters in the string while
|
1154
|
-
// observing object alignment.
|
1155
|
-
ASSERT((SeqAsciiString::kHeaderSize & kObjectAlignmentMask) == 0);
|
1156
|
-
ASSERT(kCharSize == 1);
|
1157
|
-
add(scratch1, length,
|
1158
|
-
Operand(kObjectAlignmentMask + SeqAsciiString::kHeaderSize));
|
1159
|
-
and_(scratch1, scratch1, Operand(~kObjectAlignmentMask));
|
1160
|
-
|
1161
|
-
// Allocate ASCII string in new space.
|
1162
|
-
AllocateInNewSpace(scratch1,
|
1163
|
-
result,
|
1164
|
-
scratch2,
|
1165
|
-
scratch3,
|
1166
|
-
gc_required,
|
1167
|
-
TAG_OBJECT);
|
1168
|
-
|
1169
|
-
// Set the map, length and hash field.
|
1170
|
-
InitializeNewString(result,
|
1171
|
-
length,
|
1172
|
-
Heap::kAsciiStringMapRootIndex,
|
1173
|
-
scratch1,
|
1174
|
-
scratch2);
|
1175
|
-
}
|
1176
|
-
|
1177
|
-
|
1178
|
-
void MacroAssembler::AllocateTwoByteConsString(Register result,
|
1179
|
-
Register length,
|
1180
|
-
Register scratch1,
|
1181
|
-
Register scratch2,
|
1182
|
-
Label* gc_required) {
|
1183
|
-
AllocateInNewSpace(ConsString::kSize,
|
1184
|
-
result,
|
1185
|
-
scratch1,
|
1186
|
-
scratch2,
|
1187
|
-
gc_required,
|
1188
|
-
TAG_OBJECT);
|
1189
|
-
|
1190
|
-
InitializeNewString(result,
|
1191
|
-
length,
|
1192
|
-
Heap::kConsStringMapRootIndex,
|
1193
|
-
scratch1,
|
1194
|
-
scratch2);
|
1195
|
-
}
|
1196
|
-
|
1197
|
-
|
1198
|
-
void MacroAssembler::AllocateAsciiConsString(Register result,
|
1199
|
-
Register length,
|
1200
|
-
Register scratch1,
|
1201
|
-
Register scratch2,
|
1202
|
-
Label* gc_required) {
|
1203
|
-
AllocateInNewSpace(ConsString::kSize,
|
1204
|
-
result,
|
1205
|
-
scratch1,
|
1206
|
-
scratch2,
|
1207
|
-
gc_required,
|
1208
|
-
TAG_OBJECT);
|
1209
|
-
|
1210
|
-
InitializeNewString(result,
|
1211
|
-
length,
|
1212
|
-
Heap::kConsAsciiStringMapRootIndex,
|
1213
|
-
scratch1,
|
1214
|
-
scratch2);
|
1215
|
-
}
|
1216
|
-
|
1217
|
-
|
1218
|
-
void MacroAssembler::CompareObjectType(Register object,
|
1219
|
-
Register map,
|
1220
|
-
Register type_reg,
|
1221
|
-
InstanceType type) {
|
1222
|
-
ldr(map, FieldMemOperand(object, HeapObject::kMapOffset));
|
1223
|
-
CompareInstanceType(map, type_reg, type);
|
1224
|
-
}
|
1225
|
-
|
1226
|
-
|
1227
|
-
void MacroAssembler::CompareInstanceType(Register map,
|
1228
|
-
Register type_reg,
|
1229
|
-
InstanceType type) {
|
1230
|
-
ldrb(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset));
|
1231
|
-
cmp(type_reg, Operand(type));
|
1232
|
-
}
|
1233
|
-
|
1234
|
-
|
1235
|
-
void MacroAssembler::CheckMap(Register obj,
|
1236
|
-
Register scratch,
|
1237
|
-
Handle<Map> map,
|
1238
|
-
Label* fail,
|
1239
|
-
bool is_heap_object) {
|
1240
|
-
if (!is_heap_object) {
|
1241
|
-
BranchOnSmi(obj, fail);
|
1242
|
-
}
|
1243
|
-
ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset));
|
1244
|
-
mov(ip, Operand(map));
|
1245
|
-
cmp(scratch, ip);
|
1246
|
-
b(ne, fail);
|
1247
|
-
}
|
1248
|
-
|
1249
|
-
|
1250
|
-
void MacroAssembler::CheckMap(Register obj,
|
1251
|
-
Register scratch,
|
1252
|
-
Heap::RootListIndex index,
|
1253
|
-
Label* fail,
|
1254
|
-
bool is_heap_object) {
|
1255
|
-
if (!is_heap_object) {
|
1256
|
-
BranchOnSmi(obj, fail);
|
1257
|
-
}
|
1258
|
-
ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset));
|
1259
|
-
LoadRoot(ip, index);
|
1260
|
-
cmp(scratch, ip);
|
1261
|
-
b(ne, fail);
|
1262
|
-
}
|
1263
|
-
|
1264
|
-
|
1265
|
-
void MacroAssembler::TryGetFunctionPrototype(Register function,
|
1266
|
-
Register result,
|
1267
|
-
Register scratch,
|
1268
|
-
Label* miss) {
|
1269
|
-
// Check that the receiver isn't a smi.
|
1270
|
-
BranchOnSmi(function, miss);
|
1271
|
-
|
1272
|
-
// Check that the function really is a function. Load map into result reg.
|
1273
|
-
CompareObjectType(function, result, scratch, JS_FUNCTION_TYPE);
|
1274
|
-
b(ne, miss);
|
1275
|
-
|
1276
|
-
// Make sure that the function has an instance prototype.
|
1277
|
-
Label non_instance;
|
1278
|
-
ldrb(scratch, FieldMemOperand(result, Map::kBitFieldOffset));
|
1279
|
-
tst(scratch, Operand(1 << Map::kHasNonInstancePrototype));
|
1280
|
-
b(ne, &non_instance);
|
1281
|
-
|
1282
|
-
// Get the prototype or initial map from the function.
|
1283
|
-
ldr(result,
|
1284
|
-
FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset));
|
1285
|
-
|
1286
|
-
// If the prototype or initial map is the hole, don't return it and
|
1287
|
-
// simply miss the cache instead. This will allow us to allocate a
|
1288
|
-
// prototype object on-demand in the runtime system.
|
1289
|
-
LoadRoot(ip, Heap::kTheHoleValueRootIndex);
|
1290
|
-
cmp(result, ip);
|
1291
|
-
b(eq, miss);
|
1292
|
-
|
1293
|
-
// If the function does not have an initial map, we're done.
|
1294
|
-
Label done;
|
1295
|
-
CompareObjectType(result, scratch, scratch, MAP_TYPE);
|
1296
|
-
b(ne, &done);
|
1297
|
-
|
1298
|
-
// Get the prototype from the initial map.
|
1299
|
-
ldr(result, FieldMemOperand(result, Map::kPrototypeOffset));
|
1300
|
-
jmp(&done);
|
1301
|
-
|
1302
|
-
// Non-instance prototype: Fetch prototype from constructor field
|
1303
|
-
// in initial map.
|
1304
|
-
bind(&non_instance);
|
1305
|
-
ldr(result, FieldMemOperand(result, Map::kConstructorOffset));
|
1306
|
-
|
1307
|
-
// All done.
|
1308
|
-
bind(&done);
|
1309
|
-
}
|
1310
|
-
|
1311
|
-
|
1312
|
-
void MacroAssembler::CallStub(CodeStub* stub, Condition cond) {
|
1313
|
-
ASSERT(allow_stub_calls()); // stub calls are not allowed in some stubs
|
1314
|
-
Call(stub->GetCode(), RelocInfo::CODE_TARGET, cond);
|
1315
|
-
}
|
1316
|
-
|
1317
|
-
|
1318
|
-
void MacroAssembler::TailCallStub(CodeStub* stub, Condition cond) {
|
1319
|
-
ASSERT(allow_stub_calls()); // stub calls are not allowed in some stubs
|
1320
|
-
Jump(stub->GetCode(), RelocInfo::CODE_TARGET, cond);
|
1321
|
-
}
|
1322
|
-
|
1323
|
-
|
1324
|
-
void MacroAssembler::StubReturn(int argc, Condition cond) {
|
1325
|
-
ASSERT(argc >= 1 && generating_stub());
|
1326
|
-
if (argc > 1) {
|
1327
|
-
add(sp, sp, Operand((argc - 1) * kPointerSize), LeaveCC, cond);
|
1328
|
-
}
|
1329
|
-
Ret(cond);
|
1330
|
-
}
|
1331
|
-
|
1332
|
-
|
1333
|
-
void MacroAssembler::IllegalOperation(int num_arguments) {
|
1334
|
-
if (num_arguments > 0) {
|
1335
|
-
add(sp, sp, Operand(num_arguments * kPointerSize));
|
1336
|
-
}
|
1337
|
-
LoadRoot(r0, Heap::kUndefinedValueRootIndex);
|
1338
|
-
}
|
1339
|
-
|
1340
|
-
|
1341
|
-
void MacroAssembler::IntegerToDoubleConversionWithVFP3(Register inReg,
|
1342
|
-
Register outHighReg,
|
1343
|
-
Register outLowReg) {
|
1344
|
-
// ARMv7 VFP3 instructions to implement integer to double conversion.
|
1345
|
-
mov(r7, Operand(inReg, ASR, kSmiTagSize));
|
1346
|
-
vmov(s15, r7);
|
1347
|
-
vcvt_f64_s32(d7, s15);
|
1348
|
-
vmov(outLowReg, outHighReg, d7);
|
1349
|
-
}
|
1350
|
-
|
1351
|
-
|
1352
|
-
void MacroAssembler::ObjectToDoubleVFPRegister(Register object,
|
1353
|
-
DwVfpRegister result,
|
1354
|
-
Register scratch1,
|
1355
|
-
Register scratch2,
|
1356
|
-
Register heap_number_map,
|
1357
|
-
SwVfpRegister scratch3,
|
1358
|
-
Label* not_number,
|
1359
|
-
ObjectToDoubleFlags flags) {
|
1360
|
-
Label done;
|
1361
|
-
if ((flags & OBJECT_NOT_SMI) == 0) {
|
1362
|
-
Label not_smi;
|
1363
|
-
BranchOnNotSmi(object, ¬_smi);
|
1364
|
-
// Remove smi tag and convert to double.
|
1365
|
-
mov(scratch1, Operand(object, ASR, kSmiTagSize));
|
1366
|
-
vmov(scratch3, scratch1);
|
1367
|
-
vcvt_f64_s32(result, scratch3);
|
1368
|
-
b(&done);
|
1369
|
-
bind(¬_smi);
|
1370
|
-
}
|
1371
|
-
// Check for heap number and load double value from it.
|
1372
|
-
ldr(scratch1, FieldMemOperand(object, HeapObject::kMapOffset));
|
1373
|
-
sub(scratch2, object, Operand(kHeapObjectTag));
|
1374
|
-
cmp(scratch1, heap_number_map);
|
1375
|
-
b(ne, not_number);
|
1376
|
-
if ((flags & AVOID_NANS_AND_INFINITIES) != 0) {
|
1377
|
-
// If exponent is all ones the number is either a NaN or +/-Infinity.
|
1378
|
-
ldr(scratch1, FieldMemOperand(object, HeapNumber::kExponentOffset));
|
1379
|
-
Sbfx(scratch1,
|
1380
|
-
scratch1,
|
1381
|
-
HeapNumber::kExponentShift,
|
1382
|
-
HeapNumber::kExponentBits);
|
1383
|
-
// All-one value sign extend to -1.
|
1384
|
-
cmp(scratch1, Operand(-1));
|
1385
|
-
b(eq, not_number);
|
1386
|
-
}
|
1387
|
-
vldr(result, scratch2, HeapNumber::kValueOffset);
|
1388
|
-
bind(&done);
|
1389
|
-
}
|
1390
|
-
|
1391
|
-
|
1392
|
-
void MacroAssembler::SmiToDoubleVFPRegister(Register smi,
|
1393
|
-
DwVfpRegister value,
|
1394
|
-
Register scratch1,
|
1395
|
-
SwVfpRegister scratch2) {
|
1396
|
-
mov(scratch1, Operand(smi, ASR, kSmiTagSize));
|
1397
|
-
vmov(scratch2, scratch1);
|
1398
|
-
vcvt_f64_s32(value, scratch2);
|
1399
|
-
}
|
1400
|
-
|
1401
|
-
|
1402
|
-
void MacroAssembler::GetLeastBitsFromSmi(Register dst,
|
1403
|
-
Register src,
|
1404
|
-
int num_least_bits) {
|
1405
|
-
if (CpuFeatures::IsSupported(ARMv7)) {
|
1406
|
-
ubfx(dst, src, kSmiTagSize, num_least_bits);
|
1407
|
-
} else {
|
1408
|
-
mov(dst, Operand(src, ASR, kSmiTagSize));
|
1409
|
-
and_(dst, dst, Operand((1 << num_least_bits) - 1));
|
1410
|
-
}
|
1411
|
-
}
|
1412
|
-
|
1413
|
-
|
1414
|
-
void MacroAssembler::CallRuntime(Runtime::Function* f, int num_arguments) {
|
1415
|
-
// All parameters are on the stack. r0 has the return value after call.
|
1416
|
-
|
1417
|
-
// If the expected number of arguments of the runtime function is
|
1418
|
-
// constant, we check that the actual number of arguments match the
|
1419
|
-
// expectation.
|
1420
|
-
if (f->nargs >= 0 && f->nargs != num_arguments) {
|
1421
|
-
IllegalOperation(num_arguments);
|
1422
|
-
return;
|
1423
|
-
}
|
1424
|
-
|
1425
|
-
// TODO(1236192): Most runtime routines don't need the number of
|
1426
|
-
// arguments passed in because it is constant. At some point we
|
1427
|
-
// should remove this need and make the runtime routine entry code
|
1428
|
-
// smarter.
|
1429
|
-
mov(r0, Operand(num_arguments));
|
1430
|
-
mov(r1, Operand(ExternalReference(f)));
|
1431
|
-
CEntryStub stub(1);
|
1432
|
-
CallStub(&stub);
|
1433
|
-
}
|
1434
|
-
|
1435
|
-
|
1436
|
-
void MacroAssembler::CallRuntime(Runtime::FunctionId fid, int num_arguments) {
|
1437
|
-
CallRuntime(Runtime::FunctionForId(fid), num_arguments);
|
1438
|
-
}
|
1439
|
-
|
1440
|
-
|
1441
|
-
void MacroAssembler::CallExternalReference(const ExternalReference& ext,
|
1442
|
-
int num_arguments) {
|
1443
|
-
mov(r0, Operand(num_arguments));
|
1444
|
-
mov(r1, Operand(ext));
|
1445
|
-
|
1446
|
-
CEntryStub stub(1);
|
1447
|
-
CallStub(&stub);
|
1448
|
-
}
|
1449
|
-
|
1450
|
-
|
1451
|
-
void MacroAssembler::TailCallExternalReference(const ExternalReference& ext,
|
1452
|
-
int num_arguments,
|
1453
|
-
int result_size) {
|
1454
|
-
// TODO(1236192): Most runtime routines don't need the number of
|
1455
|
-
// arguments passed in because it is constant. At some point we
|
1456
|
-
// should remove this need and make the runtime routine entry code
|
1457
|
-
// smarter.
|
1458
|
-
mov(r0, Operand(num_arguments));
|
1459
|
-
JumpToExternalReference(ext);
|
1460
|
-
}
|
1461
|
-
|
1462
|
-
|
1463
|
-
void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid,
|
1464
|
-
int num_arguments,
|
1465
|
-
int result_size) {
|
1466
|
-
TailCallExternalReference(ExternalReference(fid), num_arguments, result_size);
|
1467
|
-
}
|
1468
|
-
|
1469
|
-
|
1470
|
-
void MacroAssembler::JumpToExternalReference(const ExternalReference& builtin) {
|
1471
|
-
#if defined(__thumb__)
|
1472
|
-
// Thumb mode builtin.
|
1473
|
-
ASSERT((reinterpret_cast<intptr_t>(builtin.address()) & 1) == 1);
|
1474
|
-
#endif
|
1475
|
-
mov(r1, Operand(builtin));
|
1476
|
-
CEntryStub stub(1);
|
1477
|
-
Jump(stub.GetCode(), RelocInfo::CODE_TARGET);
|
1478
|
-
}
|
1479
|
-
|
1480
|
-
|
1481
|
-
void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id,
|
1482
|
-
InvokeJSFlags flags) {
|
1483
|
-
GetBuiltinEntry(r2, id);
|
1484
|
-
if (flags == CALL_JS) {
|
1485
|
-
Call(r2);
|
1486
|
-
} else {
|
1487
|
-
ASSERT(flags == JUMP_JS);
|
1488
|
-
Jump(r2);
|
1489
|
-
}
|
1490
|
-
}
|
1491
|
-
|
1492
|
-
|
1493
|
-
void MacroAssembler::GetBuiltinEntry(Register target, Builtins::JavaScript id) {
|
1494
|
-
ASSERT(!target.is(r1));
|
1495
|
-
|
1496
|
-
// Load the builtins object into target register.
|
1497
|
-
ldr(target, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
|
1498
|
-
ldr(target, FieldMemOperand(target, GlobalObject::kBuiltinsOffset));
|
1499
|
-
|
1500
|
-
// Load the JavaScript builtin function from the builtins object.
|
1501
|
-
ldr(r1, FieldMemOperand(target,
|
1502
|
-
JSBuiltinsObject::OffsetOfFunctionWithId(id)));
|
1503
|
-
|
1504
|
-
// Load the code entry point from the builtins object.
|
1505
|
-
ldr(target, FieldMemOperand(target,
|
1506
|
-
JSBuiltinsObject::OffsetOfCodeWithId(id)));
|
1507
|
-
if (FLAG_debug_code) {
|
1508
|
-
// Make sure the code objects in the builtins object and in the
|
1509
|
-
// builtin function are the same.
|
1510
|
-
push(r1);
|
1511
|
-
ldr(r1, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset));
|
1512
|
-
ldr(r1, FieldMemOperand(r1, SharedFunctionInfo::kCodeOffset));
|
1513
|
-
cmp(r1, target);
|
1514
|
-
Assert(eq, "Builtin code object changed");
|
1515
|
-
pop(r1);
|
1516
|
-
}
|
1517
|
-
add(target, target, Operand(Code::kHeaderSize - kHeapObjectTag));
|
1518
|
-
}
|
1519
|
-
|
1520
|
-
|
1521
|
-
void MacroAssembler::SetCounter(StatsCounter* counter, int value,
|
1522
|
-
Register scratch1, Register scratch2) {
|
1523
|
-
if (FLAG_native_code_counters && counter->Enabled()) {
|
1524
|
-
mov(scratch1, Operand(value));
|
1525
|
-
mov(scratch2, Operand(ExternalReference(counter)));
|
1526
|
-
str(scratch1, MemOperand(scratch2));
|
1527
|
-
}
|
1528
|
-
}
|
1529
|
-
|
1530
|
-
|
1531
|
-
void MacroAssembler::IncrementCounter(StatsCounter* counter, int value,
|
1532
|
-
Register scratch1, Register scratch2) {
|
1533
|
-
ASSERT(value > 0);
|
1534
|
-
if (FLAG_native_code_counters && counter->Enabled()) {
|
1535
|
-
mov(scratch2, Operand(ExternalReference(counter)));
|
1536
|
-
ldr(scratch1, MemOperand(scratch2));
|
1537
|
-
add(scratch1, scratch1, Operand(value));
|
1538
|
-
str(scratch1, MemOperand(scratch2));
|
1539
|
-
}
|
1540
|
-
}
|
1541
|
-
|
1542
|
-
|
1543
|
-
void MacroAssembler::DecrementCounter(StatsCounter* counter, int value,
|
1544
|
-
Register scratch1, Register scratch2) {
|
1545
|
-
ASSERT(value > 0);
|
1546
|
-
if (FLAG_native_code_counters && counter->Enabled()) {
|
1547
|
-
mov(scratch2, Operand(ExternalReference(counter)));
|
1548
|
-
ldr(scratch1, MemOperand(scratch2));
|
1549
|
-
sub(scratch1, scratch1, Operand(value));
|
1550
|
-
str(scratch1, MemOperand(scratch2));
|
1551
|
-
}
|
1552
|
-
}
|
1553
|
-
|
1554
|
-
|
1555
|
-
void MacroAssembler::Assert(Condition cc, const char* msg) {
|
1556
|
-
if (FLAG_debug_code)
|
1557
|
-
Check(cc, msg);
|
1558
|
-
}
|
1559
|
-
|
1560
|
-
|
1561
|
-
void MacroAssembler::AssertRegisterIsRoot(Register reg,
|
1562
|
-
Heap::RootListIndex index) {
|
1563
|
-
if (FLAG_debug_code) {
|
1564
|
-
LoadRoot(ip, index);
|
1565
|
-
cmp(reg, ip);
|
1566
|
-
Check(eq, "Register did not match expected root");
|
1567
|
-
}
|
1568
|
-
}
|
1569
|
-
|
1570
|
-
|
1571
|
-
void MacroAssembler::Check(Condition cc, const char* msg) {
|
1572
|
-
Label L;
|
1573
|
-
b(cc, &L);
|
1574
|
-
Abort(msg);
|
1575
|
-
// will not return here
|
1576
|
-
bind(&L);
|
1577
|
-
}
|
1578
|
-
|
1579
|
-
|
1580
|
-
void MacroAssembler::Abort(const char* msg) {
|
1581
|
-
Label abort_start;
|
1582
|
-
bind(&abort_start);
|
1583
|
-
// We want to pass the msg string like a smi to avoid GC
|
1584
|
-
// problems, however msg is not guaranteed to be aligned
|
1585
|
-
// properly. Instead, we pass an aligned pointer that is
|
1586
|
-
// a proper v8 smi, but also pass the alignment difference
|
1587
|
-
// from the real pointer as a smi.
|
1588
|
-
intptr_t p1 = reinterpret_cast<intptr_t>(msg);
|
1589
|
-
intptr_t p0 = (p1 & ~kSmiTagMask) + kSmiTag;
|
1590
|
-
ASSERT(reinterpret_cast<Object*>(p0)->IsSmi());
|
1591
|
-
#ifdef DEBUG
|
1592
|
-
if (msg != NULL) {
|
1593
|
-
RecordComment("Abort message: ");
|
1594
|
-
RecordComment(msg);
|
1595
|
-
}
|
1596
|
-
#endif
|
1597
|
-
// Disable stub call restrictions to always allow calls to abort.
|
1598
|
-
set_allow_stub_calls(true);
|
1599
|
-
|
1600
|
-
mov(r0, Operand(p0));
|
1601
|
-
push(r0);
|
1602
|
-
mov(r0, Operand(Smi::FromInt(p1 - p0)));
|
1603
|
-
push(r0);
|
1604
|
-
CallRuntime(Runtime::kAbort, 2);
|
1605
|
-
// will not return here
|
1606
|
-
if (is_const_pool_blocked()) {
|
1607
|
-
// If the calling code cares about the exact number of
|
1608
|
-
// instructions generated, we insert padding here to keep the size
|
1609
|
-
// of the Abort macro constant.
|
1610
|
-
static const int kExpectedAbortInstructions = 10;
|
1611
|
-
int abort_instructions = InstructionsGeneratedSince(&abort_start);
|
1612
|
-
ASSERT(abort_instructions <= kExpectedAbortInstructions);
|
1613
|
-
while (abort_instructions++ < kExpectedAbortInstructions) {
|
1614
|
-
nop();
|
1615
|
-
}
|
1616
|
-
}
|
1617
|
-
}
|
1618
|
-
|
1619
|
-
|
1620
|
-
void MacroAssembler::LoadContext(Register dst, int context_chain_length) {
|
1621
|
-
if (context_chain_length > 0) {
|
1622
|
-
// Move up the chain of contexts to the context containing the slot.
|
1623
|
-
ldr(dst, MemOperand(cp, Context::SlotOffset(Context::CLOSURE_INDEX)));
|
1624
|
-
// Load the function context (which is the incoming, outer context).
|
1625
|
-
ldr(dst, FieldMemOperand(dst, JSFunction::kContextOffset));
|
1626
|
-
for (int i = 1; i < context_chain_length; i++) {
|
1627
|
-
ldr(dst, MemOperand(dst, Context::SlotOffset(Context::CLOSURE_INDEX)));
|
1628
|
-
ldr(dst, FieldMemOperand(dst, JSFunction::kContextOffset));
|
1629
|
-
}
|
1630
|
-
// The context may be an intermediate context, not a function context.
|
1631
|
-
ldr(dst, MemOperand(dst, Context::SlotOffset(Context::FCONTEXT_INDEX)));
|
1632
|
-
} else { // Slot is in the current function context.
|
1633
|
-
// The context may be an intermediate context, not a function context.
|
1634
|
-
ldr(dst, MemOperand(cp, Context::SlotOffset(Context::FCONTEXT_INDEX)));
|
1635
|
-
}
|
1636
|
-
}
|
1637
|
-
|
1638
|
-
|
1639
|
-
void MacroAssembler::JumpIfNotBothSmi(Register reg1,
|
1640
|
-
Register reg2,
|
1641
|
-
Label* on_not_both_smi) {
|
1642
|
-
ASSERT_EQ(0, kSmiTag);
|
1643
|
-
tst(reg1, Operand(kSmiTagMask));
|
1644
|
-
tst(reg2, Operand(kSmiTagMask), eq);
|
1645
|
-
b(ne, on_not_both_smi);
|
1646
|
-
}
|
1647
|
-
|
1648
|
-
|
1649
|
-
void MacroAssembler::JumpIfEitherSmi(Register reg1,
|
1650
|
-
Register reg2,
|
1651
|
-
Label* on_either_smi) {
|
1652
|
-
ASSERT_EQ(0, kSmiTag);
|
1653
|
-
tst(reg1, Operand(kSmiTagMask));
|
1654
|
-
tst(reg2, Operand(kSmiTagMask), ne);
|
1655
|
-
b(eq, on_either_smi);
|
1656
|
-
}
|
1657
|
-
|
1658
|
-
|
1659
|
-
void MacroAssembler::JumpIfNonSmisNotBothSequentialAsciiStrings(
|
1660
|
-
Register first,
|
1661
|
-
Register second,
|
1662
|
-
Register scratch1,
|
1663
|
-
Register scratch2,
|
1664
|
-
Label* failure) {
|
1665
|
-
// Test that both first and second are sequential ASCII strings.
|
1666
|
-
// Assume that they are non-smis.
|
1667
|
-
ldr(scratch1, FieldMemOperand(first, HeapObject::kMapOffset));
|
1668
|
-
ldr(scratch2, FieldMemOperand(second, HeapObject::kMapOffset));
|
1669
|
-
ldrb(scratch1, FieldMemOperand(scratch1, Map::kInstanceTypeOffset));
|
1670
|
-
ldrb(scratch2, FieldMemOperand(scratch2, Map::kInstanceTypeOffset));
|
1671
|
-
|
1672
|
-
JumpIfBothInstanceTypesAreNotSequentialAscii(scratch1,
|
1673
|
-
scratch2,
|
1674
|
-
scratch1,
|
1675
|
-
scratch2,
|
1676
|
-
failure);
|
1677
|
-
}
|
1678
|
-
|
1679
|
-
void MacroAssembler::JumpIfNotBothSequentialAsciiStrings(Register first,
|
1680
|
-
Register second,
|
1681
|
-
Register scratch1,
|
1682
|
-
Register scratch2,
|
1683
|
-
Label* failure) {
|
1684
|
-
// Check that neither is a smi.
|
1685
|
-
ASSERT_EQ(0, kSmiTag);
|
1686
|
-
and_(scratch1, first, Operand(second));
|
1687
|
-
tst(scratch1, Operand(kSmiTagMask));
|
1688
|
-
b(eq, failure);
|
1689
|
-
JumpIfNonSmisNotBothSequentialAsciiStrings(first,
|
1690
|
-
second,
|
1691
|
-
scratch1,
|
1692
|
-
scratch2,
|
1693
|
-
failure);
|
1694
|
-
}
|
1695
|
-
|
1696
|
-
|
1697
|
-
// Allocates a heap number or jumps to the need_gc label if the young space
|
1698
|
-
// is full and a scavenge is needed.
|
1699
|
-
void MacroAssembler::AllocateHeapNumber(Register result,
|
1700
|
-
Register scratch1,
|
1701
|
-
Register scratch2,
|
1702
|
-
Register heap_number_map,
|
1703
|
-
Label* gc_required) {
|
1704
|
-
// Allocate an object in the heap for the heap number and tag it as a heap
|
1705
|
-
// object.
|
1706
|
-
AllocateInNewSpace(HeapNumber::kSize,
|
1707
|
-
result,
|
1708
|
-
scratch1,
|
1709
|
-
scratch2,
|
1710
|
-
gc_required,
|
1711
|
-
TAG_OBJECT);
|
1712
|
-
|
1713
|
-
// Store heap number map in the allocated object.
|
1714
|
-
AssertRegisterIsRoot(heap_number_map, Heap::kHeapNumberMapRootIndex);
|
1715
|
-
str(heap_number_map, FieldMemOperand(result, HeapObject::kMapOffset));
|
1716
|
-
}
|
1717
|
-
|
1718
|
-
|
1719
|
-
void MacroAssembler::AllocateHeapNumberWithValue(Register result,
|
1720
|
-
DwVfpRegister value,
|
1721
|
-
Register scratch1,
|
1722
|
-
Register scratch2,
|
1723
|
-
Register heap_number_map,
|
1724
|
-
Label* gc_required) {
|
1725
|
-
AllocateHeapNumber(result, scratch1, scratch2, heap_number_map, gc_required);
|
1726
|
-
sub(scratch1, result, Operand(kHeapObjectTag));
|
1727
|
-
vstr(value, scratch1, HeapNumber::kValueOffset);
|
1728
|
-
}
|
1729
|
-
|
1730
|
-
|
1731
|
-
void MacroAssembler::CountLeadingZeros(Register zeros, // Answer.
|
1732
|
-
Register source, // Input.
|
1733
|
-
Register scratch) {
|
1734
|
-
ASSERT(!zeros.is(source) || !source.is(zeros));
|
1735
|
-
ASSERT(!zeros.is(scratch));
|
1736
|
-
ASSERT(!scratch.is(ip));
|
1737
|
-
ASSERT(!source.is(ip));
|
1738
|
-
ASSERT(!zeros.is(ip));
|
1739
|
-
#ifdef CAN_USE_ARMV5_INSTRUCTIONS
|
1740
|
-
clz(zeros, source); // This instruction is only supported after ARM5.
|
1741
|
-
#else
|
1742
|
-
mov(zeros, Operand(0));
|
1743
|
-
Move(scratch, source);
|
1744
|
-
// Top 16.
|
1745
|
-
tst(scratch, Operand(0xffff0000));
|
1746
|
-
add(zeros, zeros, Operand(16), LeaveCC, eq);
|
1747
|
-
mov(scratch, Operand(scratch, LSL, 16), LeaveCC, eq);
|
1748
|
-
// Top 8.
|
1749
|
-
tst(scratch, Operand(0xff000000));
|
1750
|
-
add(zeros, zeros, Operand(8), LeaveCC, eq);
|
1751
|
-
mov(scratch, Operand(scratch, LSL, 8), LeaveCC, eq);
|
1752
|
-
// Top 4.
|
1753
|
-
tst(scratch, Operand(0xf0000000));
|
1754
|
-
add(zeros, zeros, Operand(4), LeaveCC, eq);
|
1755
|
-
mov(scratch, Operand(scratch, LSL, 4), LeaveCC, eq);
|
1756
|
-
// Top 2.
|
1757
|
-
tst(scratch, Operand(0xc0000000));
|
1758
|
-
add(zeros, zeros, Operand(2), LeaveCC, eq);
|
1759
|
-
mov(scratch, Operand(scratch, LSL, 2), LeaveCC, eq);
|
1760
|
-
// Top bit.
|
1761
|
-
tst(scratch, Operand(0x80000000u));
|
1762
|
-
add(zeros, zeros, Operand(1), LeaveCC, eq);
|
1763
|
-
#endif
|
1764
|
-
}
|
1765
|
-
|
1766
|
-
|
1767
|
-
void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialAscii(
|
1768
|
-
Register first,
|
1769
|
-
Register second,
|
1770
|
-
Register scratch1,
|
1771
|
-
Register scratch2,
|
1772
|
-
Label* failure) {
|
1773
|
-
int kFlatAsciiStringMask =
|
1774
|
-
kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask;
|
1775
|
-
int kFlatAsciiStringTag = ASCII_STRING_TYPE;
|
1776
|
-
and_(scratch1, first, Operand(kFlatAsciiStringMask));
|
1777
|
-
and_(scratch2, second, Operand(kFlatAsciiStringMask));
|
1778
|
-
cmp(scratch1, Operand(kFlatAsciiStringTag));
|
1779
|
-
// Ignore second test if first test failed.
|
1780
|
-
cmp(scratch2, Operand(kFlatAsciiStringTag), eq);
|
1781
|
-
b(ne, failure);
|
1782
|
-
}
|
1783
|
-
|
1784
|
-
|
1785
|
-
void MacroAssembler::JumpIfInstanceTypeIsNotSequentialAscii(Register type,
|
1786
|
-
Register scratch,
|
1787
|
-
Label* failure) {
|
1788
|
-
int kFlatAsciiStringMask =
|
1789
|
-
kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask;
|
1790
|
-
int kFlatAsciiStringTag = ASCII_STRING_TYPE;
|
1791
|
-
and_(scratch, type, Operand(kFlatAsciiStringMask));
|
1792
|
-
cmp(scratch, Operand(kFlatAsciiStringTag));
|
1793
|
-
b(ne, failure);
|
1794
|
-
}
|
1795
|
-
|
1796
|
-
|
1797
|
-
void MacroAssembler::PrepareCallCFunction(int num_arguments, Register scratch) {
|
1798
|
-
int frame_alignment = ActivationFrameAlignment();
|
1799
|
-
// Up to four simple arguments are passed in registers r0..r3.
|
1800
|
-
int stack_passed_arguments = (num_arguments <= 4) ? 0 : num_arguments - 4;
|
1801
|
-
if (frame_alignment > kPointerSize) {
|
1802
|
-
// Make stack end at alignment and make room for num_arguments - 4 words
|
1803
|
-
// and the original value of sp.
|
1804
|
-
mov(scratch, sp);
|
1805
|
-
sub(sp, sp, Operand((stack_passed_arguments + 1) * kPointerSize));
|
1806
|
-
ASSERT(IsPowerOf2(frame_alignment));
|
1807
|
-
and_(sp, sp, Operand(-frame_alignment));
|
1808
|
-
str(scratch, MemOperand(sp, stack_passed_arguments * kPointerSize));
|
1809
|
-
} else {
|
1810
|
-
sub(sp, sp, Operand(stack_passed_arguments * kPointerSize));
|
1811
|
-
}
|
1812
|
-
}
|
1813
|
-
|
1814
|
-
|
1815
|
-
void MacroAssembler::CallCFunction(ExternalReference function,
|
1816
|
-
int num_arguments) {
|
1817
|
-
mov(ip, Operand(function));
|
1818
|
-
CallCFunction(ip, num_arguments);
|
1819
|
-
}
|
1820
|
-
|
1821
|
-
|
1822
|
-
void MacroAssembler::CallCFunction(Register function, int num_arguments) {
|
1823
|
-
// Make sure that the stack is aligned before calling a C function unless
|
1824
|
-
// running in the simulator. The simulator has its own alignment check which
|
1825
|
-
// provides more information.
|
1826
|
-
#if defined(V8_HOST_ARCH_ARM)
|
1827
|
-
if (FLAG_debug_code) {
|
1828
|
-
int frame_alignment = OS::ActivationFrameAlignment();
|
1829
|
-
int frame_alignment_mask = frame_alignment - 1;
|
1830
|
-
if (frame_alignment > kPointerSize) {
|
1831
|
-
ASSERT(IsPowerOf2(frame_alignment));
|
1832
|
-
Label alignment_as_expected;
|
1833
|
-
tst(sp, Operand(frame_alignment_mask));
|
1834
|
-
b(eq, &alignment_as_expected);
|
1835
|
-
// Don't use Check here, as it will call Runtime_Abort possibly
|
1836
|
-
// re-entering here.
|
1837
|
-
stop("Unexpected alignment");
|
1838
|
-
bind(&alignment_as_expected);
|
1839
|
-
}
|
1840
|
-
}
|
1841
|
-
#endif
|
1842
|
-
|
1843
|
-
// Just call directly. The function called cannot cause a GC, or
|
1844
|
-
// allow preemption, so the return address in the link register
|
1845
|
-
// stays correct.
|
1846
|
-
Call(function);
|
1847
|
-
int stack_passed_arguments = (num_arguments <= 4) ? 0 : num_arguments - 4;
|
1848
|
-
if (OS::ActivationFrameAlignment() > kPointerSize) {
|
1849
|
-
ldr(sp, MemOperand(sp, stack_passed_arguments * kPointerSize));
|
1850
|
-
} else {
|
1851
|
-
add(sp, sp, Operand(stack_passed_arguments * sizeof(kPointerSize)));
|
1852
|
-
}
|
1853
|
-
}
|
1854
|
-
|
1855
|
-
|
1856
|
-
#ifdef ENABLE_DEBUGGER_SUPPORT
|
1857
|
-
CodePatcher::CodePatcher(byte* address, int instructions)
|
1858
|
-
: address_(address),
|
1859
|
-
instructions_(instructions),
|
1860
|
-
size_(instructions * Assembler::kInstrSize),
|
1861
|
-
masm_(address, size_ + Assembler::kGap) {
|
1862
|
-
// Create a new macro assembler pointing to the address of the code to patch.
|
1863
|
-
// The size is adjusted with kGap on order for the assembler to generate size
|
1864
|
-
// bytes of instructions without failing with buffer size constraints.
|
1865
|
-
ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
|
1866
|
-
}
|
1867
|
-
|
1868
|
-
|
1869
|
-
CodePatcher::~CodePatcher() {
|
1870
|
-
// Indicate that code has changed.
|
1871
|
-
CPU::FlushICache(address_, size_);
|
1872
|
-
|
1873
|
-
// Check that the code was patched as expected.
|
1874
|
-
ASSERT(masm_.pc_ == address_ + size_);
|
1875
|
-
ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
|
1876
|
-
}
|
1877
|
-
|
1878
|
-
|
1879
|
-
void CodePatcher::Emit(Instr x) {
|
1880
|
-
masm()->emit(x);
|
1881
|
-
}
|
1882
|
-
|
1883
|
-
|
1884
|
-
void CodePatcher::Emit(Address addr) {
|
1885
|
-
masm()->emit(reinterpret_cast<Instr>(addr));
|
1886
|
-
}
|
1887
|
-
#endif // ENABLE_DEBUGGER_SUPPORT
|
1888
|
-
|
1889
|
-
|
1890
|
-
} } // namespace v8::internal
|
1891
|
-
|
1892
|
-
#endif // V8_TARGET_ARCH_ARM
|