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,1379 +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
|
-
#include "api.h"
|
31
|
-
#include "arguments.h"
|
32
|
-
#include "ic-inl.h"
|
33
|
-
#include "stub-cache.h"
|
34
|
-
|
35
|
-
namespace v8 {
|
36
|
-
namespace internal {
|
37
|
-
|
38
|
-
// -----------------------------------------------------------------------
|
39
|
-
// StubCache implementation.
|
40
|
-
|
41
|
-
|
42
|
-
StubCache::Entry StubCache::primary_[StubCache::kPrimaryTableSize];
|
43
|
-
StubCache::Entry StubCache::secondary_[StubCache::kSecondaryTableSize];
|
44
|
-
|
45
|
-
void StubCache::Initialize(bool create_heap_objects) {
|
46
|
-
ASSERT(IsPowerOf2(kPrimaryTableSize));
|
47
|
-
ASSERT(IsPowerOf2(kSecondaryTableSize));
|
48
|
-
if (create_heap_objects) {
|
49
|
-
HandleScope scope;
|
50
|
-
Clear();
|
51
|
-
}
|
52
|
-
}
|
53
|
-
|
54
|
-
|
55
|
-
Code* StubCache::Set(String* name, Map* map, Code* code) {
|
56
|
-
// Get the flags from the code.
|
57
|
-
Code::Flags flags = Code::RemoveTypeFromFlags(code->flags());
|
58
|
-
|
59
|
-
// Validate that the name does not move on scavenge, and that we
|
60
|
-
// can use identity checks instead of string equality checks.
|
61
|
-
ASSERT(!Heap::InNewSpace(name));
|
62
|
-
ASSERT(name->IsSymbol());
|
63
|
-
|
64
|
-
// The state bits are not important to the hash function because
|
65
|
-
// the stub cache only contains monomorphic stubs. Make sure that
|
66
|
-
// the bits are the least significant so they will be the ones
|
67
|
-
// masked out.
|
68
|
-
ASSERT(Code::ExtractICStateFromFlags(flags) == MONOMORPHIC);
|
69
|
-
ASSERT(Code::kFlagsICStateShift == 0);
|
70
|
-
|
71
|
-
// Make sure that the code type is not included in the hash.
|
72
|
-
ASSERT(Code::ExtractTypeFromFlags(flags) == 0);
|
73
|
-
|
74
|
-
// Compute the primary entry.
|
75
|
-
int primary_offset = PrimaryOffset(name, flags, map);
|
76
|
-
Entry* primary = entry(primary_, primary_offset);
|
77
|
-
Code* hit = primary->value;
|
78
|
-
|
79
|
-
// If the primary entry has useful data in it, we retire it to the
|
80
|
-
// secondary cache before overwriting it.
|
81
|
-
if (hit != Builtins::builtin(Builtins::Illegal)) {
|
82
|
-
Code::Flags primary_flags = Code::RemoveTypeFromFlags(hit->flags());
|
83
|
-
int secondary_offset =
|
84
|
-
SecondaryOffset(primary->key, primary_flags, primary_offset);
|
85
|
-
Entry* secondary = entry(secondary_, secondary_offset);
|
86
|
-
*secondary = *primary;
|
87
|
-
}
|
88
|
-
|
89
|
-
// Update primary cache.
|
90
|
-
primary->key = name;
|
91
|
-
primary->value = code;
|
92
|
-
return code;
|
93
|
-
}
|
94
|
-
|
95
|
-
|
96
|
-
Object* StubCache::ComputeLoadNonexistent(String* name, JSObject* receiver) {
|
97
|
-
ASSERT(receiver->IsGlobalObject() || receiver->HasFastProperties());
|
98
|
-
// If no global objects are present in the prototype chain, the load
|
99
|
-
// nonexistent IC stub can be shared for all names for a given map
|
100
|
-
// and we use the empty string for the map cache in that case. If
|
101
|
-
// there are global objects involved, we need to check global
|
102
|
-
// property cells in the stub and therefore the stub will be
|
103
|
-
// specific to the name.
|
104
|
-
String* cache_name = Heap::empty_string();
|
105
|
-
if (receiver->IsGlobalObject()) cache_name = name;
|
106
|
-
JSObject* last = receiver;
|
107
|
-
while (last->GetPrototype() != Heap::null_value()) {
|
108
|
-
last = JSObject::cast(last->GetPrototype());
|
109
|
-
if (last->IsGlobalObject()) cache_name = name;
|
110
|
-
}
|
111
|
-
// Compile the stub that is either shared for all names or
|
112
|
-
// name specific if there are global objects involved.
|
113
|
-
Code::Flags flags =
|
114
|
-
Code::ComputeMonomorphicFlags(Code::LOAD_IC, NONEXISTENT);
|
115
|
-
Object* code = receiver->map()->FindInCodeCache(cache_name, flags);
|
116
|
-
if (code->IsUndefined()) {
|
117
|
-
LoadStubCompiler compiler;
|
118
|
-
code = compiler.CompileLoadNonexistent(cache_name, receiver, last);
|
119
|
-
if (code->IsFailure()) return code;
|
120
|
-
PROFILE(CodeCreateEvent(Logger::LOAD_IC_TAG, Code::cast(code), cache_name));
|
121
|
-
Object* result =
|
122
|
-
receiver->map()->UpdateCodeCache(cache_name, Code::cast(code));
|
123
|
-
if (result->IsFailure()) return result;
|
124
|
-
}
|
125
|
-
return code;
|
126
|
-
}
|
127
|
-
|
128
|
-
|
129
|
-
Object* StubCache::ComputeLoadField(String* name,
|
130
|
-
JSObject* receiver,
|
131
|
-
JSObject* holder,
|
132
|
-
int field_index) {
|
133
|
-
ASSERT(IC::GetCodeCacheForObject(receiver, holder) == OWN_MAP);
|
134
|
-
Map* map = receiver->map();
|
135
|
-
Code::Flags flags = Code::ComputeMonomorphicFlags(Code::LOAD_IC, FIELD);
|
136
|
-
Object* code = map->FindInCodeCache(name, flags);
|
137
|
-
if (code->IsUndefined()) {
|
138
|
-
LoadStubCompiler compiler;
|
139
|
-
code = compiler.CompileLoadField(receiver, holder, field_index, name);
|
140
|
-
if (code->IsFailure()) return code;
|
141
|
-
PROFILE(CodeCreateEvent(Logger::LOAD_IC_TAG, Code::cast(code), name));
|
142
|
-
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
143
|
-
if (result->IsFailure()) return result;
|
144
|
-
}
|
145
|
-
return code;
|
146
|
-
}
|
147
|
-
|
148
|
-
|
149
|
-
Object* StubCache::ComputeLoadCallback(String* name,
|
150
|
-
JSObject* receiver,
|
151
|
-
JSObject* holder,
|
152
|
-
AccessorInfo* callback) {
|
153
|
-
ASSERT(v8::ToCData<Address>(callback->getter()) != 0);
|
154
|
-
ASSERT(IC::GetCodeCacheForObject(receiver, holder) == OWN_MAP);
|
155
|
-
Map* map = receiver->map();
|
156
|
-
Code::Flags flags = Code::ComputeMonomorphicFlags(Code::LOAD_IC, CALLBACKS);
|
157
|
-
Object* code = map->FindInCodeCache(name, flags);
|
158
|
-
if (code->IsUndefined()) {
|
159
|
-
LoadStubCompiler compiler;
|
160
|
-
code = compiler.CompileLoadCallback(name, receiver, holder, callback);
|
161
|
-
if (code->IsFailure()) return code;
|
162
|
-
PROFILE(CodeCreateEvent(Logger::LOAD_IC_TAG, Code::cast(code), name));
|
163
|
-
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
164
|
-
if (result->IsFailure()) return result;
|
165
|
-
}
|
166
|
-
return code;
|
167
|
-
}
|
168
|
-
|
169
|
-
|
170
|
-
Object* StubCache::ComputeLoadConstant(String* name,
|
171
|
-
JSObject* receiver,
|
172
|
-
JSObject* holder,
|
173
|
-
Object* value) {
|
174
|
-
ASSERT(IC::GetCodeCacheForObject(receiver, holder) == OWN_MAP);
|
175
|
-
Map* map = receiver->map();
|
176
|
-
Code::Flags flags =
|
177
|
-
Code::ComputeMonomorphicFlags(Code::LOAD_IC, CONSTANT_FUNCTION);
|
178
|
-
Object* code = map->FindInCodeCache(name, flags);
|
179
|
-
if (code->IsUndefined()) {
|
180
|
-
LoadStubCompiler compiler;
|
181
|
-
code = compiler.CompileLoadConstant(receiver, holder, value, name);
|
182
|
-
if (code->IsFailure()) return code;
|
183
|
-
PROFILE(CodeCreateEvent(Logger::LOAD_IC_TAG, Code::cast(code), name));
|
184
|
-
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
185
|
-
if (result->IsFailure()) return result;
|
186
|
-
}
|
187
|
-
return code;
|
188
|
-
}
|
189
|
-
|
190
|
-
|
191
|
-
Object* StubCache::ComputeLoadInterceptor(String* name,
|
192
|
-
JSObject* receiver,
|
193
|
-
JSObject* holder) {
|
194
|
-
ASSERT(IC::GetCodeCacheForObject(receiver, holder) == OWN_MAP);
|
195
|
-
Map* map = receiver->map();
|
196
|
-
Code::Flags flags = Code::ComputeMonomorphicFlags(Code::LOAD_IC, INTERCEPTOR);
|
197
|
-
Object* code = map->FindInCodeCache(name, flags);
|
198
|
-
if (code->IsUndefined()) {
|
199
|
-
LoadStubCompiler compiler;
|
200
|
-
code = compiler.CompileLoadInterceptor(receiver, holder, name);
|
201
|
-
if (code->IsFailure()) return code;
|
202
|
-
PROFILE(CodeCreateEvent(Logger::LOAD_IC_TAG, Code::cast(code), name));
|
203
|
-
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
204
|
-
if (result->IsFailure()) return result;
|
205
|
-
}
|
206
|
-
return code;
|
207
|
-
}
|
208
|
-
|
209
|
-
|
210
|
-
Object* StubCache::ComputeLoadNormal() {
|
211
|
-
return Builtins::builtin(Builtins::LoadIC_Normal);
|
212
|
-
}
|
213
|
-
|
214
|
-
|
215
|
-
Object* StubCache::ComputeLoadGlobal(String* name,
|
216
|
-
JSObject* receiver,
|
217
|
-
GlobalObject* holder,
|
218
|
-
JSGlobalPropertyCell* cell,
|
219
|
-
bool is_dont_delete) {
|
220
|
-
ASSERT(IC::GetCodeCacheForObject(receiver, holder) == OWN_MAP);
|
221
|
-
Map* map = receiver->map();
|
222
|
-
Code::Flags flags = Code::ComputeMonomorphicFlags(Code::LOAD_IC, NORMAL);
|
223
|
-
Object* code = map->FindInCodeCache(name, flags);
|
224
|
-
if (code->IsUndefined()) {
|
225
|
-
LoadStubCompiler compiler;
|
226
|
-
code = compiler.CompileLoadGlobal(receiver,
|
227
|
-
holder,
|
228
|
-
cell,
|
229
|
-
name,
|
230
|
-
is_dont_delete);
|
231
|
-
if (code->IsFailure()) return code;
|
232
|
-
PROFILE(CodeCreateEvent(Logger::LOAD_IC_TAG, Code::cast(code), name));
|
233
|
-
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
234
|
-
if (result->IsFailure()) return result;
|
235
|
-
}
|
236
|
-
return code;
|
237
|
-
}
|
238
|
-
|
239
|
-
|
240
|
-
Object* StubCache::ComputeKeyedLoadField(String* name,
|
241
|
-
JSObject* receiver,
|
242
|
-
JSObject* holder,
|
243
|
-
int field_index) {
|
244
|
-
ASSERT(IC::GetCodeCacheForObject(receiver, holder) == OWN_MAP);
|
245
|
-
Map* map = receiver->map();
|
246
|
-
Code::Flags flags = Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, FIELD);
|
247
|
-
Object* code = map->FindInCodeCache(name, flags);
|
248
|
-
if (code->IsUndefined()) {
|
249
|
-
KeyedLoadStubCompiler compiler;
|
250
|
-
code = compiler.CompileLoadField(name, receiver, holder, field_index);
|
251
|
-
if (code->IsFailure()) return code;
|
252
|
-
PROFILE(CodeCreateEvent(Logger::KEYED_LOAD_IC_TAG, Code::cast(code), name));
|
253
|
-
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
254
|
-
if (result->IsFailure()) return result;
|
255
|
-
}
|
256
|
-
return code;
|
257
|
-
}
|
258
|
-
|
259
|
-
|
260
|
-
Object* StubCache::ComputeKeyedLoadConstant(String* name,
|
261
|
-
JSObject* receiver,
|
262
|
-
JSObject* holder,
|
263
|
-
Object* value) {
|
264
|
-
ASSERT(IC::GetCodeCacheForObject(receiver, holder) == OWN_MAP);
|
265
|
-
Map* map = receiver->map();
|
266
|
-
Code::Flags flags =
|
267
|
-
Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, CONSTANT_FUNCTION);
|
268
|
-
Object* code = map->FindInCodeCache(name, flags);
|
269
|
-
if (code->IsUndefined()) {
|
270
|
-
KeyedLoadStubCompiler compiler;
|
271
|
-
code = compiler.CompileLoadConstant(name, receiver, holder, value);
|
272
|
-
if (code->IsFailure()) return code;
|
273
|
-
PROFILE(CodeCreateEvent(Logger::KEYED_LOAD_IC_TAG, Code::cast(code), name));
|
274
|
-
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
275
|
-
if (result->IsFailure()) return result;
|
276
|
-
}
|
277
|
-
return code;
|
278
|
-
}
|
279
|
-
|
280
|
-
|
281
|
-
Object* StubCache::ComputeKeyedLoadInterceptor(String* name,
|
282
|
-
JSObject* receiver,
|
283
|
-
JSObject* holder) {
|
284
|
-
ASSERT(IC::GetCodeCacheForObject(receiver, holder) == OWN_MAP);
|
285
|
-
Map* map = receiver->map();
|
286
|
-
Code::Flags flags =
|
287
|
-
Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, INTERCEPTOR);
|
288
|
-
Object* code = map->FindInCodeCache(name, flags);
|
289
|
-
if (code->IsUndefined()) {
|
290
|
-
KeyedLoadStubCompiler compiler;
|
291
|
-
code = compiler.CompileLoadInterceptor(receiver, holder, name);
|
292
|
-
if (code->IsFailure()) return code;
|
293
|
-
PROFILE(CodeCreateEvent(Logger::KEYED_LOAD_IC_TAG, Code::cast(code), name));
|
294
|
-
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
295
|
-
if (result->IsFailure()) return result;
|
296
|
-
}
|
297
|
-
return code;
|
298
|
-
}
|
299
|
-
|
300
|
-
|
301
|
-
Object* StubCache::ComputeKeyedLoadCallback(String* name,
|
302
|
-
JSObject* receiver,
|
303
|
-
JSObject* holder,
|
304
|
-
AccessorInfo* callback) {
|
305
|
-
ASSERT(IC::GetCodeCacheForObject(receiver, holder) == OWN_MAP);
|
306
|
-
Map* map = receiver->map();
|
307
|
-
Code::Flags flags =
|
308
|
-
Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, CALLBACKS);
|
309
|
-
Object* code = map->FindInCodeCache(name, flags);
|
310
|
-
if (code->IsUndefined()) {
|
311
|
-
KeyedLoadStubCompiler compiler;
|
312
|
-
code = compiler.CompileLoadCallback(name, receiver, holder, callback);
|
313
|
-
if (code->IsFailure()) return code;
|
314
|
-
PROFILE(CodeCreateEvent(Logger::KEYED_LOAD_IC_TAG, Code::cast(code), name));
|
315
|
-
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
316
|
-
if (result->IsFailure()) return result;
|
317
|
-
}
|
318
|
-
return code;
|
319
|
-
}
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
Object* StubCache::ComputeKeyedLoadArrayLength(String* name,
|
324
|
-
JSArray* receiver) {
|
325
|
-
Code::Flags flags =
|
326
|
-
Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, CALLBACKS);
|
327
|
-
ASSERT(receiver->IsJSObject());
|
328
|
-
Map* map = receiver->map();
|
329
|
-
Object* code = map->FindInCodeCache(name, flags);
|
330
|
-
if (code->IsUndefined()) {
|
331
|
-
KeyedLoadStubCompiler compiler;
|
332
|
-
code = compiler.CompileLoadArrayLength(name);
|
333
|
-
if (code->IsFailure()) return code;
|
334
|
-
PROFILE(CodeCreateEvent(Logger::KEYED_LOAD_IC_TAG, Code::cast(code), name));
|
335
|
-
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
336
|
-
if (result->IsFailure()) return result;
|
337
|
-
}
|
338
|
-
return code;
|
339
|
-
}
|
340
|
-
|
341
|
-
|
342
|
-
Object* StubCache::ComputeKeyedLoadStringLength(String* name,
|
343
|
-
String* receiver) {
|
344
|
-
Code::Flags flags =
|
345
|
-
Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, CALLBACKS);
|
346
|
-
Map* map = receiver->map();
|
347
|
-
Object* code = map->FindInCodeCache(name, flags);
|
348
|
-
if (code->IsUndefined()) {
|
349
|
-
KeyedLoadStubCompiler compiler;
|
350
|
-
code = compiler.CompileLoadStringLength(name);
|
351
|
-
if (code->IsFailure()) return code;
|
352
|
-
PROFILE(CodeCreateEvent(Logger::KEYED_LOAD_IC_TAG, Code::cast(code), name));
|
353
|
-
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
354
|
-
if (result->IsFailure()) return result;
|
355
|
-
}
|
356
|
-
return code;
|
357
|
-
}
|
358
|
-
|
359
|
-
|
360
|
-
Object* StubCache::ComputeKeyedLoadFunctionPrototype(String* name,
|
361
|
-
JSFunction* receiver) {
|
362
|
-
Code::Flags flags =
|
363
|
-
Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, CALLBACKS);
|
364
|
-
Map* map = receiver->map();
|
365
|
-
Object* code = map->FindInCodeCache(name, flags);
|
366
|
-
if (code->IsUndefined()) {
|
367
|
-
KeyedLoadStubCompiler compiler;
|
368
|
-
code = compiler.CompileLoadFunctionPrototype(name);
|
369
|
-
if (code->IsFailure()) return code;
|
370
|
-
PROFILE(CodeCreateEvent(Logger::KEYED_LOAD_IC_TAG, Code::cast(code), name));
|
371
|
-
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
372
|
-
if (result->IsFailure()) return result;
|
373
|
-
}
|
374
|
-
return code;
|
375
|
-
}
|
376
|
-
|
377
|
-
|
378
|
-
Object* StubCache::ComputeStoreField(String* name,
|
379
|
-
JSObject* receiver,
|
380
|
-
int field_index,
|
381
|
-
Map* transition) {
|
382
|
-
PropertyType type = (transition == NULL) ? FIELD : MAP_TRANSITION;
|
383
|
-
Code::Flags flags = Code::ComputeMonomorphicFlags(Code::STORE_IC, type);
|
384
|
-
Object* code = receiver->map()->FindInCodeCache(name, flags);
|
385
|
-
if (code->IsUndefined()) {
|
386
|
-
StoreStubCompiler compiler;
|
387
|
-
code = compiler.CompileStoreField(receiver, field_index, transition, name);
|
388
|
-
if (code->IsFailure()) return code;
|
389
|
-
PROFILE(CodeCreateEvent(Logger::STORE_IC_TAG, Code::cast(code), name));
|
390
|
-
Object* result = receiver->map()->UpdateCodeCache(name, Code::cast(code));
|
391
|
-
if (result->IsFailure()) return result;
|
392
|
-
}
|
393
|
-
return code;
|
394
|
-
}
|
395
|
-
|
396
|
-
|
397
|
-
Object* StubCache::ComputeStoreNormal() {
|
398
|
-
return Builtins::builtin(Builtins::StoreIC_Normal);
|
399
|
-
}
|
400
|
-
|
401
|
-
|
402
|
-
Object* StubCache::ComputeStoreGlobal(String* name,
|
403
|
-
GlobalObject* receiver,
|
404
|
-
JSGlobalPropertyCell* cell) {
|
405
|
-
Code::Flags flags = Code::ComputeMonomorphicFlags(Code::STORE_IC, NORMAL);
|
406
|
-
Object* code = receiver->map()->FindInCodeCache(name, flags);
|
407
|
-
if (code->IsUndefined()) {
|
408
|
-
StoreStubCompiler compiler;
|
409
|
-
code = compiler.CompileStoreGlobal(receiver, cell, name);
|
410
|
-
if (code->IsFailure()) return code;
|
411
|
-
PROFILE(CodeCreateEvent(Logger::STORE_IC_TAG, Code::cast(code), name));
|
412
|
-
Object* result = receiver->map()->UpdateCodeCache(name, Code::cast(code));
|
413
|
-
if (result->IsFailure()) return result;
|
414
|
-
}
|
415
|
-
return code;
|
416
|
-
}
|
417
|
-
|
418
|
-
|
419
|
-
Object* StubCache::ComputeStoreCallback(String* name,
|
420
|
-
JSObject* receiver,
|
421
|
-
AccessorInfo* callback) {
|
422
|
-
ASSERT(v8::ToCData<Address>(callback->setter()) != 0);
|
423
|
-
Code::Flags flags = Code::ComputeMonomorphicFlags(Code::STORE_IC, CALLBACKS);
|
424
|
-
Object* code = receiver->map()->FindInCodeCache(name, flags);
|
425
|
-
if (code->IsUndefined()) {
|
426
|
-
StoreStubCompiler compiler;
|
427
|
-
code = compiler.CompileStoreCallback(receiver, callback, name);
|
428
|
-
if (code->IsFailure()) return code;
|
429
|
-
PROFILE(CodeCreateEvent(Logger::STORE_IC_TAG, Code::cast(code), name));
|
430
|
-
Object* result = receiver->map()->UpdateCodeCache(name, Code::cast(code));
|
431
|
-
if (result->IsFailure()) return result;
|
432
|
-
}
|
433
|
-
return code;
|
434
|
-
}
|
435
|
-
|
436
|
-
|
437
|
-
Object* StubCache::ComputeStoreInterceptor(String* name,
|
438
|
-
JSObject* receiver) {
|
439
|
-
Code::Flags flags =
|
440
|
-
Code::ComputeMonomorphicFlags(Code::STORE_IC, INTERCEPTOR);
|
441
|
-
Object* code = receiver->map()->FindInCodeCache(name, flags);
|
442
|
-
if (code->IsUndefined()) {
|
443
|
-
StoreStubCompiler compiler;
|
444
|
-
code = compiler.CompileStoreInterceptor(receiver, name);
|
445
|
-
if (code->IsFailure()) return code;
|
446
|
-
PROFILE(CodeCreateEvent(Logger::STORE_IC_TAG, Code::cast(code), name));
|
447
|
-
Object* result = receiver->map()->UpdateCodeCache(name, Code::cast(code));
|
448
|
-
if (result->IsFailure()) return result;
|
449
|
-
}
|
450
|
-
return code;
|
451
|
-
}
|
452
|
-
|
453
|
-
|
454
|
-
Object* StubCache::ComputeKeyedStoreField(String* name, JSObject* receiver,
|
455
|
-
int field_index, Map* transition) {
|
456
|
-
PropertyType type = (transition == NULL) ? FIELD : MAP_TRANSITION;
|
457
|
-
Code::Flags flags = Code::ComputeMonomorphicFlags(Code::KEYED_STORE_IC, type);
|
458
|
-
Object* code = receiver->map()->FindInCodeCache(name, flags);
|
459
|
-
if (code->IsUndefined()) {
|
460
|
-
KeyedStoreStubCompiler compiler;
|
461
|
-
code = compiler.CompileStoreField(receiver, field_index, transition, name);
|
462
|
-
if (code->IsFailure()) return code;
|
463
|
-
PROFILE(CodeCreateEvent(
|
464
|
-
Logger::KEYED_STORE_IC_TAG, Code::cast(code), name));
|
465
|
-
Object* result = receiver->map()->UpdateCodeCache(name, Code::cast(code));
|
466
|
-
if (result->IsFailure()) return result;
|
467
|
-
}
|
468
|
-
return code;
|
469
|
-
}
|
470
|
-
|
471
|
-
#define CALL_LOGGER_TAG(kind, type) \
|
472
|
-
(kind == Code::CALL_IC ? Logger::type : Logger::KEYED_##type)
|
473
|
-
|
474
|
-
Object* StubCache::ComputeCallConstant(int argc,
|
475
|
-
InLoopFlag in_loop,
|
476
|
-
Code::Kind kind,
|
477
|
-
String* name,
|
478
|
-
Object* object,
|
479
|
-
JSObject* holder,
|
480
|
-
JSFunction* function) {
|
481
|
-
// Compute the check type and the map.
|
482
|
-
InlineCacheHolderFlag cache_holder =
|
483
|
-
IC::GetCodeCacheForObject(object, holder);
|
484
|
-
Map* map = IC::GetCodeCacheMap(object, cache_holder);
|
485
|
-
|
486
|
-
// Compute check type based on receiver/holder.
|
487
|
-
StubCompiler::CheckType check = StubCompiler::RECEIVER_MAP_CHECK;
|
488
|
-
if (object->IsString()) {
|
489
|
-
check = StubCompiler::STRING_CHECK;
|
490
|
-
} else if (object->IsNumber()) {
|
491
|
-
check = StubCompiler::NUMBER_CHECK;
|
492
|
-
} else if (object->IsBoolean()) {
|
493
|
-
check = StubCompiler::BOOLEAN_CHECK;
|
494
|
-
}
|
495
|
-
|
496
|
-
Code::Flags flags =
|
497
|
-
Code::ComputeMonomorphicFlags(kind,
|
498
|
-
CONSTANT_FUNCTION,
|
499
|
-
cache_holder,
|
500
|
-
in_loop,
|
501
|
-
argc);
|
502
|
-
Object* code = map->FindInCodeCache(name, flags);
|
503
|
-
if (code->IsUndefined()) {
|
504
|
-
// If the function hasn't been compiled yet, we cannot do it now
|
505
|
-
// because it may cause GC. To avoid this issue, we return an
|
506
|
-
// internal error which will make sure we do not update any
|
507
|
-
// caches.
|
508
|
-
if (!function->is_compiled()) return Failure::InternalError();
|
509
|
-
// Compile the stub - only create stubs for fully compiled functions.
|
510
|
-
CallStubCompiler compiler(argc, in_loop, kind, cache_holder);
|
511
|
-
code = compiler.CompileCallConstant(object, holder, function, name, check);
|
512
|
-
if (code->IsFailure()) return code;
|
513
|
-
ASSERT_EQ(flags, Code::cast(code)->flags());
|
514
|
-
PROFILE(CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_IC_TAG),
|
515
|
-
Code::cast(code), name));
|
516
|
-
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
517
|
-
if (result->IsFailure()) return result;
|
518
|
-
}
|
519
|
-
return code;
|
520
|
-
}
|
521
|
-
|
522
|
-
|
523
|
-
Object* StubCache::ComputeCallField(int argc,
|
524
|
-
InLoopFlag in_loop,
|
525
|
-
Code::Kind kind,
|
526
|
-
String* name,
|
527
|
-
Object* object,
|
528
|
-
JSObject* holder,
|
529
|
-
int index) {
|
530
|
-
// Compute the check type and the map.
|
531
|
-
InlineCacheHolderFlag cache_holder =
|
532
|
-
IC::GetCodeCacheForObject(object, holder);
|
533
|
-
Map* map = IC::GetCodeCacheMap(object, cache_holder);
|
534
|
-
|
535
|
-
// TODO(1233596): We cannot do receiver map check for non-JS objects
|
536
|
-
// because they may be represented as immediates without a
|
537
|
-
// map. Instead, we check against the map in the holder.
|
538
|
-
if (object->IsNumber() || object->IsBoolean() || object->IsString()) {
|
539
|
-
object = holder;
|
540
|
-
}
|
541
|
-
|
542
|
-
Code::Flags flags = Code::ComputeMonomorphicFlags(kind,
|
543
|
-
FIELD,
|
544
|
-
cache_holder,
|
545
|
-
in_loop,
|
546
|
-
argc);
|
547
|
-
Object* code = map->FindInCodeCache(name, flags);
|
548
|
-
if (code->IsUndefined()) {
|
549
|
-
CallStubCompiler compiler(argc, in_loop, kind, cache_holder);
|
550
|
-
code = compiler.CompileCallField(JSObject::cast(object),
|
551
|
-
holder,
|
552
|
-
index,
|
553
|
-
name);
|
554
|
-
if (code->IsFailure()) return code;
|
555
|
-
ASSERT_EQ(flags, Code::cast(code)->flags());
|
556
|
-
PROFILE(CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_IC_TAG),
|
557
|
-
Code::cast(code), name));
|
558
|
-
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
559
|
-
if (result->IsFailure()) return result;
|
560
|
-
}
|
561
|
-
return code;
|
562
|
-
}
|
563
|
-
|
564
|
-
|
565
|
-
Object* StubCache::ComputeCallInterceptor(int argc,
|
566
|
-
Code::Kind kind,
|
567
|
-
String* name,
|
568
|
-
Object* object,
|
569
|
-
JSObject* holder) {
|
570
|
-
// Compute the check type and the map.
|
571
|
-
InlineCacheHolderFlag cache_holder =
|
572
|
-
IC::GetCodeCacheForObject(object, holder);
|
573
|
-
Map* map = IC::GetCodeCacheMap(object, cache_holder);
|
574
|
-
|
575
|
-
// TODO(1233596): We cannot do receiver map check for non-JS objects
|
576
|
-
// because they may be represented as immediates without a
|
577
|
-
// map. Instead, we check against the map in the holder.
|
578
|
-
if (object->IsNumber() || object->IsBoolean() || object->IsString()) {
|
579
|
-
object = holder;
|
580
|
-
}
|
581
|
-
|
582
|
-
Code::Flags flags =
|
583
|
-
Code::ComputeMonomorphicFlags(kind,
|
584
|
-
INTERCEPTOR,
|
585
|
-
cache_holder,
|
586
|
-
NOT_IN_LOOP,
|
587
|
-
argc);
|
588
|
-
Object* code = map->FindInCodeCache(name, flags);
|
589
|
-
if (code->IsUndefined()) {
|
590
|
-
CallStubCompiler compiler(argc, NOT_IN_LOOP, kind, cache_holder);
|
591
|
-
code = compiler.CompileCallInterceptor(JSObject::cast(object),
|
592
|
-
holder,
|
593
|
-
name);
|
594
|
-
if (code->IsFailure()) return code;
|
595
|
-
ASSERT_EQ(flags, Code::cast(code)->flags());
|
596
|
-
PROFILE(CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_IC_TAG),
|
597
|
-
Code::cast(code), name));
|
598
|
-
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
599
|
-
if (result->IsFailure()) return result;
|
600
|
-
}
|
601
|
-
return code;
|
602
|
-
}
|
603
|
-
|
604
|
-
|
605
|
-
Object* StubCache::ComputeCallNormal(int argc,
|
606
|
-
InLoopFlag in_loop,
|
607
|
-
Code::Kind kind,
|
608
|
-
String* name,
|
609
|
-
JSObject* receiver) {
|
610
|
-
Object* code = ComputeCallNormal(argc, in_loop, kind);
|
611
|
-
if (code->IsFailure()) return code;
|
612
|
-
return code;
|
613
|
-
}
|
614
|
-
|
615
|
-
|
616
|
-
Object* StubCache::ComputeCallGlobal(int argc,
|
617
|
-
InLoopFlag in_loop,
|
618
|
-
Code::Kind kind,
|
619
|
-
String* name,
|
620
|
-
JSObject* receiver,
|
621
|
-
GlobalObject* holder,
|
622
|
-
JSGlobalPropertyCell* cell,
|
623
|
-
JSFunction* function) {
|
624
|
-
InlineCacheHolderFlag cache_holder =
|
625
|
-
IC::GetCodeCacheForObject(receiver, holder);
|
626
|
-
Map* map = IC::GetCodeCacheMap(receiver, cache_holder);
|
627
|
-
Code::Flags flags =
|
628
|
-
Code::ComputeMonomorphicFlags(kind,
|
629
|
-
NORMAL,
|
630
|
-
cache_holder,
|
631
|
-
in_loop,
|
632
|
-
argc);
|
633
|
-
Object* code = map->FindInCodeCache(name, flags);
|
634
|
-
if (code->IsUndefined()) {
|
635
|
-
// If the function hasn't been compiled yet, we cannot do it now
|
636
|
-
// because it may cause GC. To avoid this issue, we return an
|
637
|
-
// internal error which will make sure we do not update any
|
638
|
-
// caches.
|
639
|
-
if (!function->is_compiled()) return Failure::InternalError();
|
640
|
-
CallStubCompiler compiler(argc, in_loop, kind, cache_holder);
|
641
|
-
code = compiler.CompileCallGlobal(receiver, holder, cell, function, name);
|
642
|
-
if (code->IsFailure()) return code;
|
643
|
-
ASSERT_EQ(flags, Code::cast(code)->flags());
|
644
|
-
PROFILE(CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_IC_TAG),
|
645
|
-
Code::cast(code), name));
|
646
|
-
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
647
|
-
if (result->IsFailure()) return result;
|
648
|
-
}
|
649
|
-
return code;
|
650
|
-
}
|
651
|
-
|
652
|
-
|
653
|
-
static Object* GetProbeValue(Code::Flags flags) {
|
654
|
-
// Use raw_unchecked... so we don't get assert failures during GC.
|
655
|
-
NumberDictionary* dictionary = Heap::raw_unchecked_non_monomorphic_cache();
|
656
|
-
int entry = dictionary->FindEntry(flags);
|
657
|
-
if (entry != -1) return dictionary->ValueAt(entry);
|
658
|
-
return Heap::raw_unchecked_undefined_value();
|
659
|
-
}
|
660
|
-
|
661
|
-
|
662
|
-
static Object* ProbeCache(Code::Flags flags) {
|
663
|
-
Object* probe = GetProbeValue(flags);
|
664
|
-
if (probe != Heap::undefined_value()) return probe;
|
665
|
-
// Seed the cache with an undefined value to make sure that any
|
666
|
-
// generated code object can always be inserted into the cache
|
667
|
-
// without causing allocation failures.
|
668
|
-
Object* result =
|
669
|
-
Heap::non_monomorphic_cache()->AtNumberPut(flags,
|
670
|
-
Heap::undefined_value());
|
671
|
-
if (result->IsFailure()) return result;
|
672
|
-
Heap::public_set_non_monomorphic_cache(NumberDictionary::cast(result));
|
673
|
-
return probe;
|
674
|
-
}
|
675
|
-
|
676
|
-
|
677
|
-
static Object* FillCache(Object* code) {
|
678
|
-
if (code->IsCode()) {
|
679
|
-
int entry =
|
680
|
-
Heap::non_monomorphic_cache()->FindEntry(
|
681
|
-
Code::cast(code)->flags());
|
682
|
-
// The entry must be present see comment in ProbeCache.
|
683
|
-
ASSERT(entry != -1);
|
684
|
-
ASSERT(Heap::non_monomorphic_cache()->ValueAt(entry) ==
|
685
|
-
Heap::undefined_value());
|
686
|
-
Heap::non_monomorphic_cache()->ValueAtPut(entry, code);
|
687
|
-
CHECK(GetProbeValue(Code::cast(code)->flags()) == code);
|
688
|
-
}
|
689
|
-
return code;
|
690
|
-
}
|
691
|
-
|
692
|
-
|
693
|
-
Code* StubCache::FindCallInitialize(int argc,
|
694
|
-
InLoopFlag in_loop,
|
695
|
-
Code::Kind kind) {
|
696
|
-
Code::Flags flags =
|
697
|
-
Code::ComputeFlags(kind, in_loop, UNINITIALIZED, NORMAL, argc);
|
698
|
-
Object* result = ProbeCache(flags);
|
699
|
-
ASSERT(!result->IsUndefined());
|
700
|
-
// This might be called during the marking phase of the collector
|
701
|
-
// hence the unchecked cast.
|
702
|
-
return reinterpret_cast<Code*>(result);
|
703
|
-
}
|
704
|
-
|
705
|
-
|
706
|
-
Object* StubCache::ComputeCallInitialize(int argc,
|
707
|
-
InLoopFlag in_loop,
|
708
|
-
Code::Kind kind) {
|
709
|
-
Code::Flags flags =
|
710
|
-
Code::ComputeFlags(kind, in_loop, UNINITIALIZED, NORMAL, argc);
|
711
|
-
Object* probe = ProbeCache(flags);
|
712
|
-
if (!probe->IsUndefined()) return probe;
|
713
|
-
StubCompiler compiler;
|
714
|
-
return FillCache(compiler.CompileCallInitialize(flags));
|
715
|
-
}
|
716
|
-
|
717
|
-
|
718
|
-
Object* StubCache::ComputeCallPreMonomorphic(int argc,
|
719
|
-
InLoopFlag in_loop,
|
720
|
-
Code::Kind kind) {
|
721
|
-
Code::Flags flags =
|
722
|
-
Code::ComputeFlags(kind, in_loop, PREMONOMORPHIC, NORMAL, argc);
|
723
|
-
Object* probe = ProbeCache(flags);
|
724
|
-
if (!probe->IsUndefined()) return probe;
|
725
|
-
StubCompiler compiler;
|
726
|
-
return FillCache(compiler.CompileCallPreMonomorphic(flags));
|
727
|
-
}
|
728
|
-
|
729
|
-
|
730
|
-
Object* StubCache::ComputeCallNormal(int argc,
|
731
|
-
InLoopFlag in_loop,
|
732
|
-
Code::Kind kind) {
|
733
|
-
Code::Flags flags =
|
734
|
-
Code::ComputeFlags(kind, in_loop, MONOMORPHIC, NORMAL, argc);
|
735
|
-
Object* probe = ProbeCache(flags);
|
736
|
-
if (!probe->IsUndefined()) return probe;
|
737
|
-
StubCompiler compiler;
|
738
|
-
return FillCache(compiler.CompileCallNormal(flags));
|
739
|
-
}
|
740
|
-
|
741
|
-
|
742
|
-
Object* StubCache::ComputeCallMegamorphic(int argc,
|
743
|
-
InLoopFlag in_loop,
|
744
|
-
Code::Kind kind) {
|
745
|
-
Code::Flags flags =
|
746
|
-
Code::ComputeFlags(kind, in_loop, MEGAMORPHIC, NORMAL, argc);
|
747
|
-
Object* probe = ProbeCache(flags);
|
748
|
-
if (!probe->IsUndefined()) return probe;
|
749
|
-
StubCompiler compiler;
|
750
|
-
return FillCache(compiler.CompileCallMegamorphic(flags));
|
751
|
-
}
|
752
|
-
|
753
|
-
|
754
|
-
Object* StubCache::ComputeCallMiss(int argc, Code::Kind kind) {
|
755
|
-
// MONOMORPHIC_PROTOTYPE_FAILURE state is used to make sure that miss stubs
|
756
|
-
// and monomorphic stubs are not mixed up together in the stub cache.
|
757
|
-
Code::Flags flags = Code::ComputeFlags(
|
758
|
-
kind, NOT_IN_LOOP, MONOMORPHIC_PROTOTYPE_FAILURE, NORMAL, argc);
|
759
|
-
Object* probe = ProbeCache(flags);
|
760
|
-
if (!probe->IsUndefined()) return probe;
|
761
|
-
StubCompiler compiler;
|
762
|
-
return FillCache(compiler.CompileCallMiss(flags));
|
763
|
-
}
|
764
|
-
|
765
|
-
|
766
|
-
#ifdef ENABLE_DEBUGGER_SUPPORT
|
767
|
-
Object* StubCache::ComputeCallDebugBreak(int argc, Code::Kind kind) {
|
768
|
-
Code::Flags flags =
|
769
|
-
Code::ComputeFlags(kind, NOT_IN_LOOP, DEBUG_BREAK, NORMAL, argc);
|
770
|
-
Object* probe = ProbeCache(flags);
|
771
|
-
if (!probe->IsUndefined()) return probe;
|
772
|
-
StubCompiler compiler;
|
773
|
-
return FillCache(compiler.CompileCallDebugBreak(flags));
|
774
|
-
}
|
775
|
-
|
776
|
-
|
777
|
-
Object* StubCache::ComputeCallDebugPrepareStepIn(int argc, Code::Kind kind) {
|
778
|
-
Code::Flags flags =
|
779
|
-
Code::ComputeFlags(kind,
|
780
|
-
NOT_IN_LOOP,
|
781
|
-
DEBUG_PREPARE_STEP_IN,
|
782
|
-
NORMAL,
|
783
|
-
argc);
|
784
|
-
Object* probe = ProbeCache(flags);
|
785
|
-
if (!probe->IsUndefined()) return probe;
|
786
|
-
StubCompiler compiler;
|
787
|
-
return FillCache(compiler.CompileCallDebugPrepareStepIn(flags));
|
788
|
-
}
|
789
|
-
#endif
|
790
|
-
|
791
|
-
|
792
|
-
Object* StubCache::ComputeLazyCompile(int argc) {
|
793
|
-
Code::Flags flags =
|
794
|
-
Code::ComputeFlags(Code::STUB, NOT_IN_LOOP, UNINITIALIZED, NORMAL, argc);
|
795
|
-
Object* probe = ProbeCache(flags);
|
796
|
-
if (!probe->IsUndefined()) return probe;
|
797
|
-
StubCompiler compiler;
|
798
|
-
Object* result = FillCache(compiler.CompileLazyCompile(flags));
|
799
|
-
if (result->IsCode()) {
|
800
|
-
Code* code = Code::cast(result);
|
801
|
-
USE(code);
|
802
|
-
PROFILE(CodeCreateEvent(Logger::LAZY_COMPILE_TAG,
|
803
|
-
code, code->arguments_count()));
|
804
|
-
}
|
805
|
-
return result;
|
806
|
-
}
|
807
|
-
|
808
|
-
|
809
|
-
void StubCache::Clear() {
|
810
|
-
for (int i = 0; i < kPrimaryTableSize; i++) {
|
811
|
-
primary_[i].key = Heap::empty_string();
|
812
|
-
primary_[i].value = Builtins::builtin(Builtins::Illegal);
|
813
|
-
}
|
814
|
-
for (int j = 0; j < kSecondaryTableSize; j++) {
|
815
|
-
secondary_[j].key = Heap::empty_string();
|
816
|
-
secondary_[j].value = Builtins::builtin(Builtins::Illegal);
|
817
|
-
}
|
818
|
-
}
|
819
|
-
|
820
|
-
|
821
|
-
// ------------------------------------------------------------------------
|
822
|
-
// StubCompiler implementation.
|
823
|
-
|
824
|
-
|
825
|
-
// Support function for computing call IC miss stubs.
|
826
|
-
Handle<Code> ComputeCallMiss(int argc, Code::Kind kind) {
|
827
|
-
CALL_HEAP_FUNCTION(StubCache::ComputeCallMiss(argc, kind), Code);
|
828
|
-
}
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
Object* LoadCallbackProperty(Arguments args) {
|
833
|
-
ASSERT(args[0]->IsJSObject());
|
834
|
-
ASSERT(args[1]->IsJSObject());
|
835
|
-
AccessorInfo* callback = AccessorInfo::cast(args[2]);
|
836
|
-
Address getter_address = v8::ToCData<Address>(callback->getter());
|
837
|
-
v8::AccessorGetter fun = FUNCTION_CAST<v8::AccessorGetter>(getter_address);
|
838
|
-
ASSERT(fun != NULL);
|
839
|
-
CustomArguments custom_args(callback->data(),
|
840
|
-
JSObject::cast(args[0]),
|
841
|
-
JSObject::cast(args[1]));
|
842
|
-
v8::AccessorInfo info(custom_args.end());
|
843
|
-
HandleScope scope;
|
844
|
-
v8::Handle<v8::Value> result;
|
845
|
-
{
|
846
|
-
// Leaving JavaScript.
|
847
|
-
VMState state(EXTERNAL);
|
848
|
-
#ifdef ENABLE_LOGGING_AND_PROFILING
|
849
|
-
state.set_external_callback(getter_address);
|
850
|
-
#endif
|
851
|
-
result = fun(v8::Utils::ToLocal(args.at<String>(4)), info);
|
852
|
-
}
|
853
|
-
RETURN_IF_SCHEDULED_EXCEPTION();
|
854
|
-
if (result.IsEmpty()) return Heap::undefined_value();
|
855
|
-
return *v8::Utils::OpenHandle(*result);
|
856
|
-
}
|
857
|
-
|
858
|
-
|
859
|
-
Object* StoreCallbackProperty(Arguments args) {
|
860
|
-
JSObject* recv = JSObject::cast(args[0]);
|
861
|
-
AccessorInfo* callback = AccessorInfo::cast(args[1]);
|
862
|
-
Address setter_address = v8::ToCData<Address>(callback->setter());
|
863
|
-
v8::AccessorSetter fun = FUNCTION_CAST<v8::AccessorSetter>(setter_address);
|
864
|
-
ASSERT(fun != NULL);
|
865
|
-
Handle<String> name = args.at<String>(2);
|
866
|
-
Handle<Object> value = args.at<Object>(3);
|
867
|
-
HandleScope scope;
|
868
|
-
LOG(ApiNamedPropertyAccess("store", recv, *name));
|
869
|
-
CustomArguments custom_args(callback->data(), recv, recv);
|
870
|
-
v8::AccessorInfo info(custom_args.end());
|
871
|
-
{
|
872
|
-
// Leaving JavaScript.
|
873
|
-
VMState state(EXTERNAL);
|
874
|
-
#ifdef ENABLE_LOGGING_AND_PROFILING
|
875
|
-
state.set_external_callback(setter_address);
|
876
|
-
#endif
|
877
|
-
fun(v8::Utils::ToLocal(name), v8::Utils::ToLocal(value), info);
|
878
|
-
}
|
879
|
-
RETURN_IF_SCHEDULED_EXCEPTION();
|
880
|
-
return *value;
|
881
|
-
}
|
882
|
-
|
883
|
-
|
884
|
-
static const int kAccessorInfoOffsetInInterceptorArgs = 2;
|
885
|
-
|
886
|
-
|
887
|
-
/**
|
888
|
-
* Attempts to load a property with an interceptor (which must be present),
|
889
|
-
* but doesn't search the prototype chain.
|
890
|
-
*
|
891
|
-
* Returns |Heap::no_interceptor_result_sentinel()| if interceptor doesn't
|
892
|
-
* provide any value for the given name.
|
893
|
-
*/
|
894
|
-
Object* LoadPropertyWithInterceptorOnly(Arguments args) {
|
895
|
-
Handle<String> name_handle = args.at<String>(0);
|
896
|
-
Handle<InterceptorInfo> interceptor_info = args.at<InterceptorInfo>(1);
|
897
|
-
ASSERT(kAccessorInfoOffsetInInterceptorArgs == 2);
|
898
|
-
ASSERT(args[2]->IsJSObject()); // Receiver.
|
899
|
-
ASSERT(args[3]->IsJSObject()); // Holder.
|
900
|
-
ASSERT(args.length() == 5); // Last arg is data object.
|
901
|
-
|
902
|
-
Address getter_address = v8::ToCData<Address>(interceptor_info->getter());
|
903
|
-
v8::NamedPropertyGetter getter =
|
904
|
-
FUNCTION_CAST<v8::NamedPropertyGetter>(getter_address);
|
905
|
-
ASSERT(getter != NULL);
|
906
|
-
|
907
|
-
{
|
908
|
-
// Use the interceptor getter.
|
909
|
-
v8::AccessorInfo info(args.arguments() -
|
910
|
-
kAccessorInfoOffsetInInterceptorArgs);
|
911
|
-
HandleScope scope;
|
912
|
-
v8::Handle<v8::Value> r;
|
913
|
-
{
|
914
|
-
// Leaving JavaScript.
|
915
|
-
VMState state(EXTERNAL);
|
916
|
-
r = getter(v8::Utils::ToLocal(name_handle), info);
|
917
|
-
}
|
918
|
-
RETURN_IF_SCHEDULED_EXCEPTION();
|
919
|
-
if (!r.IsEmpty()) {
|
920
|
-
return *v8::Utils::OpenHandle(*r);
|
921
|
-
}
|
922
|
-
}
|
923
|
-
|
924
|
-
return Heap::no_interceptor_result_sentinel();
|
925
|
-
}
|
926
|
-
|
927
|
-
|
928
|
-
static Object* ThrowReferenceError(String* name) {
|
929
|
-
// If the load is non-contextual, just return the undefined result.
|
930
|
-
// Note that both keyed and non-keyed loads may end up here, so we
|
931
|
-
// can't use either LoadIC or KeyedLoadIC constructors.
|
932
|
-
IC ic(IC::NO_EXTRA_FRAME);
|
933
|
-
ASSERT(ic.target()->is_load_stub() || ic.target()->is_keyed_load_stub());
|
934
|
-
if (!ic.SlowIsContextual()) return Heap::undefined_value();
|
935
|
-
|
936
|
-
// Throw a reference error.
|
937
|
-
HandleScope scope;
|
938
|
-
Handle<String> name_handle(name);
|
939
|
-
Handle<Object> error =
|
940
|
-
Factory::NewReferenceError("not_defined",
|
941
|
-
HandleVector(&name_handle, 1));
|
942
|
-
return Top::Throw(*error);
|
943
|
-
}
|
944
|
-
|
945
|
-
|
946
|
-
static Object* LoadWithInterceptor(Arguments* args,
|
947
|
-
PropertyAttributes* attrs) {
|
948
|
-
Handle<String> name_handle = args->at<String>(0);
|
949
|
-
Handle<InterceptorInfo> interceptor_info = args->at<InterceptorInfo>(1);
|
950
|
-
ASSERT(kAccessorInfoOffsetInInterceptorArgs == 2);
|
951
|
-
Handle<JSObject> receiver_handle = args->at<JSObject>(2);
|
952
|
-
Handle<JSObject> holder_handle = args->at<JSObject>(3);
|
953
|
-
ASSERT(args->length() == 5); // Last arg is data object.
|
954
|
-
|
955
|
-
Address getter_address = v8::ToCData<Address>(interceptor_info->getter());
|
956
|
-
v8::NamedPropertyGetter getter =
|
957
|
-
FUNCTION_CAST<v8::NamedPropertyGetter>(getter_address);
|
958
|
-
ASSERT(getter != NULL);
|
959
|
-
|
960
|
-
{
|
961
|
-
// Use the interceptor getter.
|
962
|
-
v8::AccessorInfo info(args->arguments() -
|
963
|
-
kAccessorInfoOffsetInInterceptorArgs);
|
964
|
-
HandleScope scope;
|
965
|
-
v8::Handle<v8::Value> r;
|
966
|
-
{
|
967
|
-
// Leaving JavaScript.
|
968
|
-
VMState state(EXTERNAL);
|
969
|
-
r = getter(v8::Utils::ToLocal(name_handle), info);
|
970
|
-
}
|
971
|
-
RETURN_IF_SCHEDULED_EXCEPTION();
|
972
|
-
if (!r.IsEmpty()) {
|
973
|
-
*attrs = NONE;
|
974
|
-
return *v8::Utils::OpenHandle(*r);
|
975
|
-
}
|
976
|
-
}
|
977
|
-
|
978
|
-
Object* result = holder_handle->GetPropertyPostInterceptor(
|
979
|
-
*receiver_handle,
|
980
|
-
*name_handle,
|
981
|
-
attrs);
|
982
|
-
RETURN_IF_SCHEDULED_EXCEPTION();
|
983
|
-
return result;
|
984
|
-
}
|
985
|
-
|
986
|
-
|
987
|
-
/**
|
988
|
-
* Loads a property with an interceptor performing post interceptor
|
989
|
-
* lookup if interceptor failed.
|
990
|
-
*/
|
991
|
-
Object* LoadPropertyWithInterceptorForLoad(Arguments args) {
|
992
|
-
PropertyAttributes attr = NONE;
|
993
|
-
Object* result = LoadWithInterceptor(&args, &attr);
|
994
|
-
if (result->IsFailure()) return result;
|
995
|
-
|
996
|
-
// If the property is present, return it.
|
997
|
-
if (attr != ABSENT) return result;
|
998
|
-
return ThrowReferenceError(String::cast(args[0]));
|
999
|
-
}
|
1000
|
-
|
1001
|
-
|
1002
|
-
Object* LoadPropertyWithInterceptorForCall(Arguments args) {
|
1003
|
-
PropertyAttributes attr;
|
1004
|
-
Object* result = LoadWithInterceptor(&args, &attr);
|
1005
|
-
RETURN_IF_SCHEDULED_EXCEPTION();
|
1006
|
-
// This is call IC. In this case, we simply return the undefined result which
|
1007
|
-
// will lead to an exception when trying to invoke the result as a
|
1008
|
-
// function.
|
1009
|
-
return result;
|
1010
|
-
}
|
1011
|
-
|
1012
|
-
|
1013
|
-
Object* StoreInterceptorProperty(Arguments args) {
|
1014
|
-
JSObject* recv = JSObject::cast(args[0]);
|
1015
|
-
String* name = String::cast(args[1]);
|
1016
|
-
Object* value = args[2];
|
1017
|
-
ASSERT(recv->HasNamedInterceptor());
|
1018
|
-
PropertyAttributes attr = NONE;
|
1019
|
-
Object* result = recv->SetPropertyWithInterceptor(name, value, attr);
|
1020
|
-
return result;
|
1021
|
-
}
|
1022
|
-
|
1023
|
-
|
1024
|
-
Object* KeyedLoadPropertyWithInterceptor(Arguments args) {
|
1025
|
-
JSObject* receiver = JSObject::cast(args[0]);
|
1026
|
-
uint32_t index = Smi::cast(args[1])->value();
|
1027
|
-
return receiver->GetElementWithInterceptor(receiver, index);
|
1028
|
-
}
|
1029
|
-
|
1030
|
-
|
1031
|
-
Object* StubCompiler::CompileCallInitialize(Code::Flags flags) {
|
1032
|
-
HandleScope scope;
|
1033
|
-
int argc = Code::ExtractArgumentsCountFromFlags(flags);
|
1034
|
-
Code::Kind kind = Code::ExtractKindFromFlags(flags);
|
1035
|
-
if (kind == Code::CALL_IC) {
|
1036
|
-
CallIC::GenerateInitialize(masm(), argc);
|
1037
|
-
} else {
|
1038
|
-
KeyedCallIC::GenerateInitialize(masm(), argc);
|
1039
|
-
}
|
1040
|
-
Object* result = GetCodeWithFlags(flags, "CompileCallInitialize");
|
1041
|
-
if (!result->IsFailure()) {
|
1042
|
-
Counters::call_initialize_stubs.Increment();
|
1043
|
-
Code* code = Code::cast(result);
|
1044
|
-
USE(code);
|
1045
|
-
PROFILE(CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_INITIALIZE_TAG),
|
1046
|
-
code, code->arguments_count()));
|
1047
|
-
}
|
1048
|
-
return result;
|
1049
|
-
}
|
1050
|
-
|
1051
|
-
|
1052
|
-
Object* StubCompiler::CompileCallPreMonomorphic(Code::Flags flags) {
|
1053
|
-
HandleScope scope;
|
1054
|
-
int argc = Code::ExtractArgumentsCountFromFlags(flags);
|
1055
|
-
// The code of the PreMonomorphic stub is the same as the code
|
1056
|
-
// of the Initialized stub. They just differ on the code object flags.
|
1057
|
-
Code::Kind kind = Code::ExtractKindFromFlags(flags);
|
1058
|
-
if (kind == Code::CALL_IC) {
|
1059
|
-
CallIC::GenerateInitialize(masm(), argc);
|
1060
|
-
} else {
|
1061
|
-
KeyedCallIC::GenerateInitialize(masm(), argc);
|
1062
|
-
}
|
1063
|
-
Object* result = GetCodeWithFlags(flags, "CompileCallPreMonomorphic");
|
1064
|
-
if (!result->IsFailure()) {
|
1065
|
-
Counters::call_premonomorphic_stubs.Increment();
|
1066
|
-
Code* code = Code::cast(result);
|
1067
|
-
USE(code);
|
1068
|
-
PROFILE(CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_PRE_MONOMORPHIC_TAG),
|
1069
|
-
code, code->arguments_count()));
|
1070
|
-
}
|
1071
|
-
return result;
|
1072
|
-
}
|
1073
|
-
|
1074
|
-
|
1075
|
-
Object* StubCompiler::CompileCallNormal(Code::Flags flags) {
|
1076
|
-
HandleScope scope;
|
1077
|
-
int argc = Code::ExtractArgumentsCountFromFlags(flags);
|
1078
|
-
Code::Kind kind = Code::ExtractKindFromFlags(flags);
|
1079
|
-
if (kind == Code::CALL_IC) {
|
1080
|
-
CallIC::GenerateNormal(masm(), argc);
|
1081
|
-
} else {
|
1082
|
-
KeyedCallIC::GenerateNormal(masm(), argc);
|
1083
|
-
}
|
1084
|
-
Object* result = GetCodeWithFlags(flags, "CompileCallNormal");
|
1085
|
-
if (!result->IsFailure()) {
|
1086
|
-
Counters::call_normal_stubs.Increment();
|
1087
|
-
Code* code = Code::cast(result);
|
1088
|
-
USE(code);
|
1089
|
-
PROFILE(CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_NORMAL_TAG),
|
1090
|
-
code, code->arguments_count()));
|
1091
|
-
}
|
1092
|
-
return result;
|
1093
|
-
}
|
1094
|
-
|
1095
|
-
|
1096
|
-
Object* StubCompiler::CompileCallMegamorphic(Code::Flags flags) {
|
1097
|
-
HandleScope scope;
|
1098
|
-
int argc = Code::ExtractArgumentsCountFromFlags(flags);
|
1099
|
-
Code::Kind kind = Code::ExtractKindFromFlags(flags);
|
1100
|
-
if (kind == Code::CALL_IC) {
|
1101
|
-
CallIC::GenerateMegamorphic(masm(), argc);
|
1102
|
-
} else {
|
1103
|
-
KeyedCallIC::GenerateMegamorphic(masm(), argc);
|
1104
|
-
}
|
1105
|
-
|
1106
|
-
Object* result = GetCodeWithFlags(flags, "CompileCallMegamorphic");
|
1107
|
-
if (!result->IsFailure()) {
|
1108
|
-
Counters::call_megamorphic_stubs.Increment();
|
1109
|
-
Code* code = Code::cast(result);
|
1110
|
-
USE(code);
|
1111
|
-
PROFILE(CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_MEGAMORPHIC_TAG),
|
1112
|
-
code, code->arguments_count()));
|
1113
|
-
}
|
1114
|
-
return result;
|
1115
|
-
}
|
1116
|
-
|
1117
|
-
|
1118
|
-
Object* StubCompiler::CompileCallMiss(Code::Flags flags) {
|
1119
|
-
HandleScope scope;
|
1120
|
-
int argc = Code::ExtractArgumentsCountFromFlags(flags);
|
1121
|
-
Code::Kind kind = Code::ExtractKindFromFlags(flags);
|
1122
|
-
if (kind == Code::CALL_IC) {
|
1123
|
-
CallIC::GenerateMiss(masm(), argc);
|
1124
|
-
} else {
|
1125
|
-
KeyedCallIC::GenerateMiss(masm(), argc);
|
1126
|
-
}
|
1127
|
-
Object* result = GetCodeWithFlags(flags, "CompileCallMiss");
|
1128
|
-
if (!result->IsFailure()) {
|
1129
|
-
Counters::call_megamorphic_stubs.Increment();
|
1130
|
-
Code* code = Code::cast(result);
|
1131
|
-
USE(code);
|
1132
|
-
PROFILE(CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_MISS_TAG),
|
1133
|
-
code, code->arguments_count()));
|
1134
|
-
}
|
1135
|
-
return result;
|
1136
|
-
}
|
1137
|
-
|
1138
|
-
|
1139
|
-
#ifdef ENABLE_DEBUGGER_SUPPORT
|
1140
|
-
Object* StubCompiler::CompileCallDebugBreak(Code::Flags flags) {
|
1141
|
-
HandleScope scope;
|
1142
|
-
Debug::GenerateCallICDebugBreak(masm());
|
1143
|
-
Object* result = GetCodeWithFlags(flags, "CompileCallDebugBreak");
|
1144
|
-
if (!result->IsFailure()) {
|
1145
|
-
Code* code = Code::cast(result);
|
1146
|
-
USE(code);
|
1147
|
-
Code::Kind kind = Code::ExtractKindFromFlags(flags);
|
1148
|
-
USE(kind);
|
1149
|
-
PROFILE(CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_DEBUG_BREAK_TAG),
|
1150
|
-
code, code->arguments_count()));
|
1151
|
-
}
|
1152
|
-
return result;
|
1153
|
-
}
|
1154
|
-
|
1155
|
-
|
1156
|
-
Object* StubCompiler::CompileCallDebugPrepareStepIn(Code::Flags flags) {
|
1157
|
-
HandleScope scope;
|
1158
|
-
// Use the same code for the the step in preparations as we do for
|
1159
|
-
// the miss case.
|
1160
|
-
int argc = Code::ExtractArgumentsCountFromFlags(flags);
|
1161
|
-
Code::Kind kind = Code::ExtractKindFromFlags(flags);
|
1162
|
-
if (kind == Code::CALL_IC) {
|
1163
|
-
CallIC::GenerateMiss(masm(), argc);
|
1164
|
-
} else {
|
1165
|
-
KeyedCallIC::GenerateMiss(masm(), argc);
|
1166
|
-
}
|
1167
|
-
Object* result = GetCodeWithFlags(flags, "CompileCallDebugPrepareStepIn");
|
1168
|
-
if (!result->IsFailure()) {
|
1169
|
-
Code* code = Code::cast(result);
|
1170
|
-
USE(code);
|
1171
|
-
PROFILE(CodeCreateEvent(
|
1172
|
-
CALL_LOGGER_TAG(kind, CALL_DEBUG_PREPARE_STEP_IN_TAG),
|
1173
|
-
code,
|
1174
|
-
code->arguments_count()));
|
1175
|
-
}
|
1176
|
-
return result;
|
1177
|
-
}
|
1178
|
-
#endif
|
1179
|
-
|
1180
|
-
#undef CALL_LOGGER_TAG
|
1181
|
-
|
1182
|
-
Object* StubCompiler::GetCodeWithFlags(Code::Flags flags, const char* name) {
|
1183
|
-
// Check for allocation failures during stub compilation.
|
1184
|
-
if (failure_->IsFailure()) return failure_;
|
1185
|
-
|
1186
|
-
// Create code object in the heap.
|
1187
|
-
CodeDesc desc;
|
1188
|
-
masm_.GetCode(&desc);
|
1189
|
-
Object* result = Heap::CreateCode(desc, flags, masm_.CodeObject());
|
1190
|
-
#ifdef ENABLE_DISASSEMBLER
|
1191
|
-
if (FLAG_print_code_stubs && !result->IsFailure()) {
|
1192
|
-
Code::cast(result)->Disassemble(name);
|
1193
|
-
}
|
1194
|
-
#endif
|
1195
|
-
return result;
|
1196
|
-
}
|
1197
|
-
|
1198
|
-
|
1199
|
-
Object* StubCompiler::GetCodeWithFlags(Code::Flags flags, String* name) {
|
1200
|
-
if (FLAG_print_code_stubs && (name != NULL)) {
|
1201
|
-
return GetCodeWithFlags(flags, *name->ToCString());
|
1202
|
-
}
|
1203
|
-
return GetCodeWithFlags(flags, reinterpret_cast<char*>(NULL));
|
1204
|
-
}
|
1205
|
-
|
1206
|
-
|
1207
|
-
void StubCompiler::LookupPostInterceptor(JSObject* holder,
|
1208
|
-
String* name,
|
1209
|
-
LookupResult* lookup) {
|
1210
|
-
holder->LocalLookupRealNamedProperty(name, lookup);
|
1211
|
-
if (!lookup->IsProperty()) {
|
1212
|
-
lookup->NotFound();
|
1213
|
-
Object* proto = holder->GetPrototype();
|
1214
|
-
if (proto != Heap::null_value()) {
|
1215
|
-
proto->Lookup(name, lookup);
|
1216
|
-
}
|
1217
|
-
}
|
1218
|
-
}
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1222
|
-
Object* LoadStubCompiler::GetCode(PropertyType type, String* name) {
|
1223
|
-
Code::Flags flags = Code::ComputeMonomorphicFlags(Code::LOAD_IC, type);
|
1224
|
-
return GetCodeWithFlags(flags, name);
|
1225
|
-
}
|
1226
|
-
|
1227
|
-
|
1228
|
-
Object* KeyedLoadStubCompiler::GetCode(PropertyType type, String* name) {
|
1229
|
-
Code::Flags flags = Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, type);
|
1230
|
-
return GetCodeWithFlags(flags, name);
|
1231
|
-
}
|
1232
|
-
|
1233
|
-
|
1234
|
-
Object* StoreStubCompiler::GetCode(PropertyType type, String* name) {
|
1235
|
-
Code::Flags flags = Code::ComputeMonomorphicFlags(Code::STORE_IC, type);
|
1236
|
-
return GetCodeWithFlags(flags, name);
|
1237
|
-
}
|
1238
|
-
|
1239
|
-
|
1240
|
-
Object* KeyedStoreStubCompiler::GetCode(PropertyType type, String* name) {
|
1241
|
-
Code::Flags flags = Code::ComputeMonomorphicFlags(Code::KEYED_STORE_IC, type);
|
1242
|
-
return GetCodeWithFlags(flags, name);
|
1243
|
-
}
|
1244
|
-
|
1245
|
-
|
1246
|
-
CallStubCompiler::CallStubCompiler(int argc,
|
1247
|
-
InLoopFlag in_loop,
|
1248
|
-
Code::Kind kind,
|
1249
|
-
InlineCacheHolderFlag cache_holder)
|
1250
|
-
: arguments_(argc)
|
1251
|
-
, in_loop_(in_loop)
|
1252
|
-
, kind_(kind)
|
1253
|
-
, cache_holder_(cache_holder) {
|
1254
|
-
}
|
1255
|
-
|
1256
|
-
|
1257
|
-
Object* CallStubCompiler::CompileCustomCall(int generator_id,
|
1258
|
-
Object* object,
|
1259
|
-
JSObject* holder,
|
1260
|
-
JSFunction* function,
|
1261
|
-
String* fname,
|
1262
|
-
CheckType check) {
|
1263
|
-
ASSERT(generator_id >= 0 && generator_id < kNumCallGenerators);
|
1264
|
-
switch (generator_id) {
|
1265
|
-
#define CALL_GENERATOR_CASE(ignored1, ignored2, name) \
|
1266
|
-
case k##name##CallGenerator: \
|
1267
|
-
return CallStubCompiler::Compile##name##Call(object, \
|
1268
|
-
holder, \
|
1269
|
-
function, \
|
1270
|
-
fname, \
|
1271
|
-
check);
|
1272
|
-
CUSTOM_CALL_IC_GENERATORS(CALL_GENERATOR_CASE)
|
1273
|
-
#undef CALL_GENERATOR_CASE
|
1274
|
-
}
|
1275
|
-
UNREACHABLE();
|
1276
|
-
return Heap::undefined_value();
|
1277
|
-
}
|
1278
|
-
|
1279
|
-
|
1280
|
-
Object* CallStubCompiler::GetCode(PropertyType type, String* name) {
|
1281
|
-
int argc = arguments_.immediate();
|
1282
|
-
Code::Flags flags = Code::ComputeMonomorphicFlags(kind_,
|
1283
|
-
type,
|
1284
|
-
cache_holder_,
|
1285
|
-
in_loop_,
|
1286
|
-
argc);
|
1287
|
-
return GetCodeWithFlags(flags, name);
|
1288
|
-
}
|
1289
|
-
|
1290
|
-
|
1291
|
-
Object* CallStubCompiler::GetCode(JSFunction* function) {
|
1292
|
-
String* function_name = NULL;
|
1293
|
-
if (function->shared()->name()->IsString()) {
|
1294
|
-
function_name = String::cast(function->shared()->name());
|
1295
|
-
}
|
1296
|
-
return GetCode(CONSTANT_FUNCTION, function_name);
|
1297
|
-
}
|
1298
|
-
|
1299
|
-
|
1300
|
-
Object* ConstructStubCompiler::GetCode() {
|
1301
|
-
Code::Flags flags = Code::ComputeFlags(Code::STUB);
|
1302
|
-
Object* result = GetCodeWithFlags(flags, "ConstructStub");
|
1303
|
-
if (!result->IsFailure()) {
|
1304
|
-
Code* code = Code::cast(result);
|
1305
|
-
USE(code);
|
1306
|
-
PROFILE(CodeCreateEvent(Logger::STUB_TAG, code, "ConstructStub"));
|
1307
|
-
}
|
1308
|
-
return result;
|
1309
|
-
}
|
1310
|
-
|
1311
|
-
|
1312
|
-
CallOptimization::CallOptimization(LookupResult* lookup) {
|
1313
|
-
if (!lookup->IsProperty() || !lookup->IsCacheable() ||
|
1314
|
-
lookup->type() != CONSTANT_FUNCTION) {
|
1315
|
-
Initialize(NULL);
|
1316
|
-
} else {
|
1317
|
-
// We only optimize constant function calls.
|
1318
|
-
Initialize(lookup->GetConstantFunction());
|
1319
|
-
}
|
1320
|
-
}
|
1321
|
-
|
1322
|
-
CallOptimization::CallOptimization(JSFunction* function) {
|
1323
|
-
Initialize(function);
|
1324
|
-
}
|
1325
|
-
|
1326
|
-
|
1327
|
-
int CallOptimization::GetPrototypeDepthOfExpectedType(JSObject* object,
|
1328
|
-
JSObject* holder) const {
|
1329
|
-
ASSERT(is_simple_api_call_);
|
1330
|
-
if (expected_receiver_type_ == NULL) return 0;
|
1331
|
-
int depth = 0;
|
1332
|
-
while (object != holder) {
|
1333
|
-
if (object->IsInstanceOf(expected_receiver_type_)) return depth;
|
1334
|
-
object = JSObject::cast(object->GetPrototype());
|
1335
|
-
++depth;
|
1336
|
-
}
|
1337
|
-
if (holder->IsInstanceOf(expected_receiver_type_)) return depth;
|
1338
|
-
return kInvalidProtoDepth;
|
1339
|
-
}
|
1340
|
-
|
1341
|
-
|
1342
|
-
void CallOptimization::Initialize(JSFunction* function) {
|
1343
|
-
constant_function_ = NULL;
|
1344
|
-
is_simple_api_call_ = false;
|
1345
|
-
expected_receiver_type_ = NULL;
|
1346
|
-
api_call_info_ = NULL;
|
1347
|
-
|
1348
|
-
if (function == NULL || !function->is_compiled()) return;
|
1349
|
-
|
1350
|
-
constant_function_ = function;
|
1351
|
-
AnalyzePossibleApiFunction(function);
|
1352
|
-
}
|
1353
|
-
|
1354
|
-
|
1355
|
-
void CallOptimization::AnalyzePossibleApiFunction(JSFunction* function) {
|
1356
|
-
SharedFunctionInfo* sfi = function->shared();
|
1357
|
-
if (!sfi->IsApiFunction()) return;
|
1358
|
-
FunctionTemplateInfo* info = sfi->get_api_func_data();
|
1359
|
-
|
1360
|
-
// Require a C++ callback.
|
1361
|
-
if (info->call_code()->IsUndefined()) return;
|
1362
|
-
api_call_info_ = CallHandlerInfo::cast(info->call_code());
|
1363
|
-
|
1364
|
-
// Accept signatures that either have no restrictions at all or
|
1365
|
-
// only have restrictions on the receiver.
|
1366
|
-
if (!info->signature()->IsUndefined()) {
|
1367
|
-
SignatureInfo* signature = SignatureInfo::cast(info->signature());
|
1368
|
-
if (!signature->args()->IsUndefined()) return;
|
1369
|
-
if (!signature->receiver()->IsUndefined()) {
|
1370
|
-
expected_receiver_type_ =
|
1371
|
-
FunctionTemplateInfo::cast(signature->receiver());
|
1372
|
-
}
|
1373
|
-
}
|
1374
|
-
|
1375
|
-
is_simple_api_call_ = true;
|
1376
|
-
}
|
1377
|
-
|
1378
|
-
|
1379
|
-
} } // namespace v8::internal
|