therubyracer 0.9.0beta2 → 0.9.0beta3
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/.gitmodules +3 -0
- data/ext/v8/upstream/Makefile +1 -2
- data/ext/v8/upstream/v8/.gitignore +33 -0
- data/ext/v8/upstream/v8/AUTHORS +42 -0
- data/ext/v8/upstream/v8/ChangeLog +2663 -0
- data/ext/v8/upstream/{3.1.8 → v8}/LICENSE +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/LICENSE.strongtalk +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/LICENSE.v8 +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/LICENSE.valgrind +0 -0
- data/ext/v8/upstream/v8/SConstruct +1473 -0
- data/ext/v8/upstream/{3.1.8 → v8}/build/README.txt +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/build/all.gyp +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/build/armu.gypi +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/build/common.gypi +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/build/gyp_v8 +0 -0
- data/ext/v8/upstream/v8/include/v8-debug.h +394 -0
- data/ext/v8/upstream/v8/include/v8-preparser.h +116 -0
- data/ext/v8/upstream/v8/include/v8-profiler.h +505 -0
- data/ext/v8/upstream/v8/include/v8-testing.h +104 -0
- data/ext/v8/upstream/v8/include/v8.h +4000 -0
- data/ext/v8/upstream/{3.1.8 → v8}/include/v8stdint.h +0 -0
- data/ext/v8/upstream/v8/preparser/SConscript +38 -0
- data/ext/v8/upstream/v8/preparser/preparser-process.cc +169 -0
- data/ext/v8/upstream/v8/src/SConscript +380 -0
- data/ext/v8/upstream/v8/src/accessors.cc +766 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/accessors.h +0 -0
- data/ext/v8/upstream/v8/src/allocation-inl.h +49 -0
- data/ext/v8/upstream/v8/src/allocation.cc +122 -0
- data/ext/v8/upstream/v8/src/allocation.h +143 -0
- data/ext/v8/upstream/v8/src/api.cc +5678 -0
- data/ext/v8/upstream/v8/src/api.h +572 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/apinatives.js +0 -0
- data/ext/v8/upstream/v8/src/apiutils.h +73 -0
- data/ext/v8/upstream/v8/src/arguments.h +116 -0
- data/ext/v8/upstream/v8/src/arm/assembler-arm-inl.h +353 -0
- data/ext/v8/upstream/v8/src/arm/assembler-arm.cc +2877 -0
- data/ext/v8/upstream/v8/src/arm/assembler-arm.h +1382 -0
- data/ext/v8/upstream/v8/src/arm/builtins-arm.cc +1634 -0
- data/ext/v8/upstream/v8/src/arm/code-stubs-arm.cc +6917 -0
- data/ext/v8/upstream/v8/src/arm/code-stubs-arm.h +623 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/arm/codegen-arm-inl.h +0 -0
- data/ext/v8/upstream/v8/src/arm/codegen-arm.cc +7437 -0
- data/ext/v8/upstream/v8/src/arm/codegen-arm.h +595 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/arm/constants-arm.cc +0 -0
- data/ext/v8/upstream/v8/src/arm/constants-arm.h +778 -0
- data/ext/v8/upstream/v8/src/arm/cpu-arm.cc +149 -0
- data/ext/v8/upstream/v8/src/arm/debug-arm.cc +317 -0
- data/ext/v8/upstream/v8/src/arm/deoptimizer-arm.cc +737 -0
- data/ext/v8/upstream/v8/src/arm/disasm-arm.cc +1503 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/arm/frames-arm.cc +0 -0
- data/ext/v8/upstream/v8/src/arm/frames-arm.h +168 -0
- data/ext/v8/upstream/v8/src/arm/full-codegen-arm.cc +4374 -0
- data/ext/v8/upstream/v8/src/arm/ic-arm.cc +1793 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/arm/jump-target-arm.cc +0 -0
- data/ext/v8/upstream/v8/src/arm/lithium-arm.cc +2120 -0
- data/ext/v8/upstream/v8/src/arm/lithium-arm.h +2179 -0
- data/ext/v8/upstream/v8/src/arm/lithium-codegen-arm.cc +4132 -0
- data/ext/v8/upstream/v8/src/arm/lithium-codegen-arm.h +329 -0
- data/ext/v8/upstream/v8/src/arm/lithium-gap-resolver-arm.cc +305 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/arm/lithium-gap-resolver-arm.h +0 -0
- data/ext/v8/upstream/v8/src/arm/macro-assembler-arm.cc +2939 -0
- data/ext/v8/upstream/v8/src/arm/macro-assembler-arm.h +1071 -0
- data/ext/v8/upstream/v8/src/arm/regexp-macro-assembler-arm.cc +1287 -0
- data/ext/v8/upstream/v8/src/arm/regexp-macro-assembler-arm.h +253 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/arm/register-allocator-arm-inl.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/arm/register-allocator-arm.cc +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/arm/register-allocator-arm.h +0 -0
- data/ext/v8/upstream/v8/src/arm/simulator-arm.cc +3288 -0
- data/ext/v8/upstream/v8/src/arm/simulator-arm.h +413 -0
- data/ext/v8/upstream/v8/src/arm/stub-cache-arm.cc +4034 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/arm/virtual-frame-arm-inl.h +0 -0
- data/ext/v8/upstream/v8/src/arm/virtual-frame-arm.cc +843 -0
- data/ext/v8/upstream/v8/src/arm/virtual-frame-arm.h +523 -0
- data/ext/v8/upstream/v8/src/array.js +1249 -0
- data/ext/v8/upstream/v8/src/assembler.cc +1067 -0
- data/ext/v8/upstream/v8/src/assembler.h +823 -0
- data/ext/v8/upstream/v8/src/ast-inl.h +112 -0
- data/ext/v8/upstream/v8/src/ast.cc +1078 -0
- data/ext/v8/upstream/v8/src/ast.h +2234 -0
- data/ext/v8/upstream/v8/src/atomicops.h +167 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/atomicops_internals_arm_gcc.h +0 -0
- data/ext/v8/upstream/v8/src/atomicops_internals_mips_gcc.h +169 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/atomicops_internals_x86_gcc.cc +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/atomicops_internals_x86_gcc.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/atomicops_internals_x86_macosx.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/atomicops_internals_x86_msvc.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/bignum-dtoa.cc +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/bignum-dtoa.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/bignum.cc +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/bignum.h +0 -0
- data/ext/v8/upstream/v8/src/bootstrapper.cc +2138 -0
- data/ext/v8/upstream/v8/src/bootstrapper.h +185 -0
- data/ext/v8/upstream/v8/src/builtins.cc +1708 -0
- data/ext/v8/upstream/v8/src/builtins.h +368 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/bytecodes-irregexp.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/cached-powers.cc +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/cached-powers.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/char-predicates-inl.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/char-predicates.h +0 -0
- data/ext/v8/upstream/v8/src/checks.cc +110 -0
- data/ext/v8/upstream/v8/src/checks.h +296 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/circular-queue-inl.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/circular-queue.cc +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/circular-queue.h +0 -0
- data/ext/v8/upstream/v8/src/code-stubs.cc +240 -0
- data/ext/v8/upstream/v8/src/code-stubs.h +971 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/code.h +0 -0
- data/ext/v8/upstream/v8/src/codegen-inl.h +68 -0
- data/ext/v8/upstream/v8/src/codegen.cc +505 -0
- data/ext/v8/upstream/v8/src/codegen.h +245 -0
- data/ext/v8/upstream/v8/src/compilation-cache.cc +540 -0
- data/ext/v8/upstream/v8/src/compilation-cache.h +287 -0
- data/ext/v8/upstream/v8/src/compiler.cc +792 -0
- data/ext/v8/upstream/v8/src/compiler.h +307 -0
- data/ext/v8/upstream/v8/src/contexts.cc +327 -0
- data/ext/v8/upstream/v8/src/contexts.h +382 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/conversions-inl.h +0 -0
- data/ext/v8/upstream/v8/src/conversions.cc +1125 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/conversions.h +0 -0
- data/ext/v8/upstream/v8/src/counters.cc +93 -0
- data/ext/v8/upstream/v8/src/counters.h +254 -0
- data/ext/v8/upstream/v8/src/cpu-profiler-inl.h +101 -0
- data/ext/v8/upstream/v8/src/cpu-profiler.cc +606 -0
- data/ext/v8/upstream/v8/src/cpu-profiler.h +305 -0
- data/ext/v8/upstream/v8/src/cpu.h +67 -0
- data/ext/v8/upstream/v8/src/d8-debug.cc +367 -0
- data/ext/v8/upstream/v8/src/d8-debug.h +158 -0
- data/ext/v8/upstream/v8/src/d8-posix.cc +695 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/d8-readline.cc +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/d8-windows.cc +0 -0
- data/ext/v8/upstream/v8/src/d8.cc +796 -0
- data/ext/v8/upstream/v8/src/d8.gyp +88 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/d8.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/d8.js +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/data-flow.cc +0 -0
- data/ext/v8/upstream/v8/src/data-flow.h +379 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/date.js +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/dateparser-inl.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/dateparser.cc +0 -0
- data/ext/v8/upstream/v8/src/dateparser.h +265 -0
- data/ext/v8/upstream/v8/src/debug-agent.cc +447 -0
- data/ext/v8/upstream/v8/src/debug-agent.h +129 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/debug-debugger.js +0 -0
- data/ext/v8/upstream/v8/src/debug.cc +3188 -0
- data/ext/v8/upstream/v8/src/debug.h +1055 -0
- data/ext/v8/upstream/v8/src/deoptimizer.cc +1296 -0
- data/ext/v8/upstream/v8/src/deoptimizer.h +629 -0
- data/ext/v8/upstream/v8/src/disasm.h +80 -0
- data/ext/v8/upstream/v8/src/disassembler.cc +339 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/disassembler.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/diy-fp.cc +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/diy-fp.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/double.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/dtoa.cc +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/dtoa.h +0 -0
- data/ext/v8/upstream/v8/src/execution.cc +791 -0
- data/ext/v8/upstream/v8/src/execution.h +291 -0
- data/ext/v8/upstream/v8/src/extensions/experimental/break-iterator.cc +250 -0
- data/ext/v8/upstream/v8/src/extensions/experimental/break-iterator.h +89 -0
- data/ext/v8/upstream/v8/src/extensions/experimental/experimental.gyp +55 -0
- data/ext/v8/upstream/v8/src/extensions/experimental/i18n-extension.cc +284 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/extensions/experimental/i18n-extension.h +0 -0
- data/ext/v8/upstream/v8/src/extensions/externalize-string-extension.cc +141 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/extensions/externalize-string-extension.h +0 -0
- data/ext/v8/upstream/v8/src/extensions/gc-extension.cc +58 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/extensions/gc-extension.h +0 -0
- data/ext/v8/upstream/v8/src/factory.cc +1194 -0
- data/ext/v8/upstream/v8/src/factory.h +436 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/fast-dtoa.cc +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/fast-dtoa.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/fixed-dtoa.cc +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/fixed-dtoa.h +0 -0
- data/ext/v8/upstream/v8/src/flag-definitions.h +556 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/flags.cc +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/flags.h +0 -0
- data/ext/v8/upstream/v8/src/frame-element.cc +37 -0
- data/ext/v8/upstream/v8/src/frame-element.h +269 -0
- data/ext/v8/upstream/v8/src/frames-inl.h +236 -0
- data/ext/v8/upstream/v8/src/frames.cc +1273 -0
- data/ext/v8/upstream/v8/src/frames.h +854 -0
- data/ext/v8/upstream/v8/src/full-codegen.cc +1385 -0
- data/ext/v8/upstream/v8/src/full-codegen.h +753 -0
- data/ext/v8/upstream/v8/src/func-name-inferrer.cc +91 -0
- data/ext/v8/upstream/v8/src/func-name-inferrer.h +111 -0
- data/ext/v8/upstream/v8/src/gdb-jit.cc +1548 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/gdb-jit.h +0 -0
- data/ext/v8/upstream/v8/src/global-handles.cc +596 -0
- data/ext/v8/upstream/v8/src/global-handles.h +239 -0
- data/ext/v8/upstream/v8/src/globals.h +325 -0
- data/ext/v8/upstream/v8/src/handles-inl.h +177 -0
- data/ext/v8/upstream/v8/src/handles.cc +965 -0
- data/ext/v8/upstream/v8/src/handles.h +372 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/hashmap.cc +0 -0
- data/ext/v8/upstream/v8/src/hashmap.h +121 -0
- data/ext/v8/upstream/v8/src/heap-inl.h +703 -0
- data/ext/v8/upstream/v8/src/heap-profiler.cc +1173 -0
- data/ext/v8/upstream/v8/src/heap-profiler.h +396 -0
- data/ext/v8/upstream/v8/src/heap.cc +5856 -0
- data/ext/v8/upstream/v8/src/heap.h +2264 -0
- data/ext/v8/upstream/v8/src/hydrogen-instructions.cc +1639 -0
- data/ext/v8/upstream/v8/src/hydrogen-instructions.h +3657 -0
- data/ext/v8/upstream/v8/src/hydrogen.cc +6011 -0
- data/ext/v8/upstream/v8/src/hydrogen.h +1137 -0
- data/ext/v8/upstream/v8/src/ia32/assembler-ia32-inl.h +430 -0
- data/ext/v8/upstream/v8/src/ia32/assembler-ia32.cc +2846 -0
- data/ext/v8/upstream/v8/src/ia32/assembler-ia32.h +1159 -0
- data/ext/v8/upstream/v8/src/ia32/builtins-ia32.cc +1596 -0
- data/ext/v8/upstream/v8/src/ia32/code-stubs-ia32.cc +6549 -0
- data/ext/v8/upstream/v8/src/ia32/code-stubs-ia32.h +495 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/ia32/codegen-ia32-inl.h +0 -0
- data/ext/v8/upstream/v8/src/ia32/codegen-ia32.cc +10385 -0
- data/ext/v8/upstream/v8/src/ia32/codegen-ia32.h +801 -0
- data/ext/v8/upstream/v8/src/ia32/cpu-ia32.cc +88 -0
- data/ext/v8/upstream/v8/src/ia32/debug-ia32.cc +312 -0
- data/ext/v8/upstream/v8/src/ia32/deoptimizer-ia32.cc +774 -0
- data/ext/v8/upstream/v8/src/ia32/disasm-ia32.cc +1620 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/ia32/frames-ia32.cc +0 -0
- data/ext/v8/upstream/v8/src/ia32/frames-ia32.h +140 -0
- data/ext/v8/upstream/v8/src/ia32/full-codegen-ia32.cc +4357 -0
- data/ext/v8/upstream/v8/src/ia32/ic-ia32.cc +1779 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/ia32/jump-target-ia32.cc +0 -0
- data/ext/v8/upstream/v8/src/ia32/lithium-codegen-ia32.cc +4158 -0
- data/ext/v8/upstream/v8/src/ia32/lithium-codegen-ia32.h +318 -0
- data/ext/v8/upstream/v8/src/ia32/lithium-gap-resolver-ia32.cc +466 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/ia32/lithium-gap-resolver-ia32.h +0 -0
- data/ext/v8/upstream/v8/src/ia32/lithium-ia32.cc +2181 -0
- data/ext/v8/upstream/v8/src/ia32/lithium-ia32.h +2235 -0
- data/ext/v8/upstream/v8/src/ia32/macro-assembler-ia32.cc +2056 -0
- data/ext/v8/upstream/v8/src/ia32/macro-assembler-ia32.h +807 -0
- data/ext/v8/upstream/v8/src/ia32/regexp-macro-assembler-ia32.cc +1264 -0
- data/ext/v8/upstream/v8/src/ia32/regexp-macro-assembler-ia32.h +216 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/ia32/register-allocator-ia32-inl.h +0 -0
- data/ext/v8/upstream/v8/src/ia32/register-allocator-ia32.cc +157 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/ia32/register-allocator-ia32.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/ia32/simulator-ia32.cc +0 -0
- data/ext/v8/upstream/v8/src/ia32/simulator-ia32.h +72 -0
- data/ext/v8/upstream/v8/src/ia32/stub-cache-ia32.cc +3711 -0
- data/ext/v8/upstream/v8/src/ia32/virtual-frame-ia32.cc +1366 -0
- data/ext/v8/upstream/v8/src/ia32/virtual-frame-ia32.h +650 -0
- data/ext/v8/upstream/v8/src/ic-inl.h +130 -0
- data/ext/v8/upstream/v8/src/ic.cc +2389 -0
- data/ext/v8/upstream/v8/src/ic.h +675 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/inspector.cc +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/inspector.h +0 -0
- data/ext/v8/upstream/v8/src/interpreter-irregexp.cc +659 -0
- data/ext/v8/upstream/v8/src/interpreter-irregexp.h +49 -0
- data/ext/v8/upstream/v8/src/isolate.cc +883 -0
- data/ext/v8/upstream/v8/src/isolate.h +1306 -0
- data/ext/v8/upstream/v8/src/json.js +342 -0
- data/ext/v8/upstream/v8/src/jsregexp.cc +5371 -0
- data/ext/v8/upstream/v8/src/jsregexp.h +1483 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/jump-target-heavy-inl.h +0 -0
- data/ext/v8/upstream/v8/src/jump-target-heavy.cc +427 -0
- data/ext/v8/upstream/v8/src/jump-target-heavy.h +238 -0
- data/ext/v8/upstream/v8/src/jump-target-inl.h +48 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/jump-target-light-inl.h +0 -0
- data/ext/v8/upstream/v8/src/jump-target-light.cc +111 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/jump-target-light.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/jump-target.cc +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/jump-target.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/list-inl.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/list.h +0 -0
- data/ext/v8/upstream/v8/src/lithium-allocator-inl.h +142 -0
- data/ext/v8/upstream/v8/src/lithium-allocator.cc +2105 -0
- data/ext/v8/upstream/v8/src/lithium-allocator.h +630 -0
- data/ext/v8/upstream/v8/src/lithium.cc +169 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/lithium.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/liveedit-debugger.js +0 -0
- data/ext/v8/upstream/v8/src/liveedit.cc +1693 -0
- data/ext/v8/upstream/v8/src/liveedit.h +179 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/liveobjectlist-inl.h +0 -0
- data/ext/v8/upstream/v8/src/liveobjectlist.cc +2589 -0
- data/ext/v8/upstream/v8/src/liveobjectlist.h +322 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/log-inl.h +0 -0
- data/ext/v8/upstream/v8/src/log-utils.cc +423 -0
- data/ext/v8/upstream/v8/src/log-utils.h +229 -0
- data/ext/v8/upstream/v8/src/log.cc +1666 -0
- data/ext/v8/upstream/v8/src/log.h +446 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/macro-assembler.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/macros.py +0 -0
- data/ext/v8/upstream/v8/src/mark-compact.cc +3092 -0
- data/ext/v8/upstream/v8/src/mark-compact.h +506 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/math.js +0 -0
- data/ext/v8/upstream/v8/src/messages.cc +166 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/messages.h +0 -0
- data/ext/v8/upstream/v8/src/messages.js +1090 -0
- data/ext/v8/upstream/v8/src/mips/assembler-mips-inl.h +335 -0
- data/ext/v8/upstream/v8/src/mips/assembler-mips.cc +2093 -0
- data/ext/v8/upstream/v8/src/mips/assembler-mips.h +1066 -0
- data/ext/v8/upstream/v8/src/mips/builtins-mips.cc +148 -0
- data/ext/v8/upstream/v8/src/mips/code-stubs-mips.cc +752 -0
- data/ext/v8/upstream/v8/src/mips/code-stubs-mips.h +511 -0
- data/ext/v8/upstream/v8/src/mips/codegen-mips-inl.h +64 -0
- data/ext/v8/upstream/v8/src/mips/codegen-mips.cc +1213 -0
- data/ext/v8/upstream/v8/src/mips/codegen-mips.h +633 -0
- data/ext/v8/upstream/v8/src/mips/constants-mips.cc +352 -0
- data/ext/v8/upstream/v8/src/mips/constants-mips.h +723 -0
- data/ext/v8/upstream/v8/src/mips/cpu-mips.cc +90 -0
- data/ext/v8/upstream/v8/src/mips/debug-mips.cc +155 -0
- data/ext/v8/upstream/v8/src/mips/deoptimizer-mips.cc +91 -0
- data/ext/v8/upstream/v8/src/mips/disasm-mips.cc +1023 -0
- data/ext/v8/upstream/v8/src/mips/frames-mips.cc +48 -0
- data/ext/v8/upstream/v8/src/mips/frames-mips.h +179 -0
- data/ext/v8/upstream/v8/src/mips/full-codegen-mips.cc +727 -0
- data/ext/v8/upstream/v8/src/mips/ic-mips.cc +244 -0
- data/ext/v8/upstream/v8/src/mips/jump-target-mips.cc +80 -0
- data/ext/v8/upstream/v8/src/mips/lithium-codegen-mips.h +65 -0
- data/ext/v8/upstream/v8/src/mips/lithium-mips.h +304 -0
- data/ext/v8/upstream/v8/src/mips/macro-assembler-mips.cc +3327 -0
- data/ext/v8/upstream/v8/src/mips/macro-assembler-mips.h +1058 -0
- data/ext/v8/upstream/v8/src/mips/regexp-macro-assembler-mips.cc +478 -0
- data/ext/v8/upstream/v8/src/mips/regexp-macro-assembler-mips.h +250 -0
- data/ext/v8/upstream/v8/src/mips/register-allocator-mips-inl.h +134 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/mips/register-allocator-mips.cc +0 -0
- data/ext/v8/upstream/v8/src/mips/register-allocator-mips.h +47 -0
- data/ext/v8/upstream/v8/src/mips/simulator-mips.cc +2438 -0
- data/ext/v8/upstream/v8/src/mips/simulator-mips.h +394 -0
- data/ext/v8/upstream/v8/src/mips/stub-cache-mips.cc +601 -0
- data/ext/v8/upstream/v8/src/mips/virtual-frame-mips-inl.h +58 -0
- data/ext/v8/upstream/v8/src/mips/virtual-frame-mips.cc +307 -0
- data/ext/v8/upstream/v8/src/mips/virtual-frame-mips.h +530 -0
- data/ext/v8/upstream/v8/src/mirror-debugger.js +2381 -0
- data/ext/v8/upstream/v8/src/mksnapshot.cc +256 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/natives.h +0 -0
- data/ext/v8/upstream/v8/src/objects-debug.cc +722 -0
- data/ext/v8/upstream/v8/src/objects-inl.h +4166 -0
- data/ext/v8/upstream/v8/src/objects-printer.cc +801 -0
- data/ext/v8/upstream/v8/src/objects-visiting.cc +142 -0
- data/ext/v8/upstream/v8/src/objects-visiting.h +422 -0
- data/ext/v8/upstream/v8/src/objects.cc +10296 -0
- data/ext/v8/upstream/v8/src/objects.h +6662 -0
- data/ext/v8/upstream/v8/src/parser.cc +5168 -0
- data/ext/v8/upstream/v8/src/parser.h +823 -0
- data/ext/v8/upstream/v8/src/platform-cygwin.cc +811 -0
- data/ext/v8/upstream/v8/src/platform-freebsd.cc +854 -0
- data/ext/v8/upstream/v8/src/platform-linux.cc +1120 -0
- data/ext/v8/upstream/v8/src/platform-macos.cc +865 -0
- data/ext/v8/upstream/v8/src/platform-nullos.cc +504 -0
- data/ext/v8/upstream/v8/src/platform-openbsd.cc +672 -0
- data/ext/v8/upstream/v8/src/platform-posix.cc +424 -0
- data/ext/v8/upstream/v8/src/platform-solaris.cc +796 -0
- data/ext/v8/upstream/v8/src/platform-tls-mac.h +62 -0
- data/ext/v8/upstream/v8/src/platform-tls-win32.h +62 -0
- data/ext/v8/upstream/v8/src/platform-tls.h +50 -0
- data/ext/v8/upstream/v8/src/platform-win32.cc +2072 -0
- data/ext/v8/upstream/v8/src/platform.h +693 -0
- data/ext/v8/upstream/v8/src/preparse-data.cc +185 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/preparse-data.h +0 -0
- data/ext/v8/upstream/v8/src/preparser-api.cc +219 -0
- data/ext/v8/upstream/v8/src/preparser.cc +1205 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/preparser.h +0 -0
- data/ext/v8/upstream/v8/src/prettyprinter.cc +1530 -0
- data/ext/v8/upstream/v8/src/prettyprinter.h +223 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/profile-generator-inl.h +0 -0
- data/ext/v8/upstream/v8/src/profile-generator.cc +3095 -0
- data/ext/v8/upstream/v8/src/profile-generator.h +1125 -0
- data/ext/v8/upstream/v8/src/property.cc +102 -0
- data/ext/v8/upstream/v8/src/property.h +348 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/regexp-macro-assembler-irregexp-inl.h +0 -0
- data/ext/v8/upstream/v8/src/regexp-macro-assembler-irregexp.cc +470 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/regexp-macro-assembler-irregexp.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/regexp-macro-assembler-tracer.cc +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/regexp-macro-assembler-tracer.h +0 -0
- data/ext/v8/upstream/v8/src/regexp-macro-assembler.cc +266 -0
- data/ext/v8/upstream/v8/src/regexp-macro-assembler.h +236 -0
- data/ext/v8/upstream/v8/src/regexp-stack.cc +111 -0
- data/ext/v8/upstream/v8/src/regexp-stack.h +147 -0
- data/ext/v8/upstream/v8/src/regexp.js +483 -0
- data/ext/v8/upstream/v8/src/register-allocator-inl.h +141 -0
- data/ext/v8/upstream/v8/src/register-allocator.cc +98 -0
- data/ext/v8/upstream/v8/src/register-allocator.h +310 -0
- data/ext/v8/upstream/v8/src/rewriter.cc +1024 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/rewriter.h +0 -0
- data/ext/v8/upstream/v8/src/runtime-profiler.cc +478 -0
- data/ext/v8/upstream/v8/src/runtime-profiler.h +192 -0
- data/ext/v8/upstream/v8/src/runtime.cc +11949 -0
- data/ext/v8/upstream/v8/src/runtime.h +643 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/runtime.js +0 -0
- data/ext/v8/upstream/v8/src/safepoint-table.cc +256 -0
- data/ext/v8/upstream/v8/src/safepoint-table.h +269 -0
- data/ext/v8/upstream/v8/src/scanner-base.cc +964 -0
- data/ext/v8/upstream/v8/src/scanner-base.h +664 -0
- data/ext/v8/upstream/v8/src/scanner.cc +584 -0
- data/ext/v8/upstream/v8/src/scanner.h +196 -0
- data/ext/v8/upstream/v8/src/scopeinfo.cc +631 -0
- data/ext/v8/upstream/v8/src/scopeinfo.h +249 -0
- data/ext/v8/upstream/v8/src/scopes.cc +1093 -0
- data/ext/v8/upstream/v8/src/scopes.h +508 -0
- data/ext/v8/upstream/v8/src/serialize.cc +1574 -0
- data/ext/v8/upstream/v8/src/serialize.h +589 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/shell.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/simulator.h +0 -0
- data/ext/v8/upstream/v8/src/small-pointer-list.h +163 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/smart-pointer.h +0 -0
- data/ext/v8/upstream/v8/src/snapshot-common.cc +82 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/snapshot-empty.cc +0 -0
- data/ext/v8/upstream/v8/src/snapshot.h +73 -0
- data/ext/v8/upstream/v8/src/spaces-inl.h +529 -0
- data/ext/v8/upstream/v8/src/spaces.cc +3147 -0
- data/ext/v8/upstream/v8/src/spaces.h +2368 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/splay-tree-inl.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/splay-tree.h +0 -0
- data/ext/v8/upstream/v8/src/string-search.cc +41 -0
- data/ext/v8/upstream/v8/src/string-search.h +568 -0
- data/ext/v8/upstream/v8/src/string-stream.cc +592 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/string-stream.h +0 -0
- data/ext/v8/upstream/v8/src/string.js +915 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/strtod.cc +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/strtod.h +0 -0
- data/ext/v8/upstream/v8/src/stub-cache.cc +1940 -0
- data/ext/v8/upstream/v8/src/stub-cache.h +866 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/third_party/valgrind/valgrind.h +0 -0
- data/ext/v8/upstream/v8/src/token.cc +63 -0
- data/ext/v8/upstream/v8/src/token.h +288 -0
- data/ext/v8/upstream/v8/src/top.cc +983 -0
- data/ext/v8/upstream/v8/src/type-info.cc +472 -0
- data/ext/v8/upstream/v8/src/type-info.h +290 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/unbound-queue-inl.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/unbound-queue.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/unicode-inl.h +0 -0
- data/ext/v8/upstream/v8/src/unicode.cc +1624 -0
- data/ext/v8/upstream/v8/src/unicode.h +280 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/uri.js +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/utils.cc +0 -0
- data/ext/v8/upstream/v8/src/utils.h +796 -0
- data/ext/v8/upstream/v8/src/v8-counters.cc +62 -0
- data/ext/v8/upstream/v8/src/v8-counters.h +311 -0
- data/ext/v8/upstream/v8/src/v8.cc +215 -0
- data/ext/v8/upstream/v8/src/v8.h +130 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/v8checks.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/v8dll-main.cc +0 -0
- data/ext/v8/upstream/v8/src/v8globals.h +486 -0
- data/ext/v8/upstream/{3.1.8/src/memory.h → v8/src/v8memory.h} +0 -0
- data/ext/v8/upstream/v8/src/v8natives.js +1293 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/v8preparserdll-main.cc +0 -0
- data/ext/v8/upstream/v8/src/v8threads.cc +453 -0
- data/ext/v8/upstream/v8/src/v8threads.h +164 -0
- data/ext/v8/upstream/v8/src/v8utils.h +317 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/variables.cc +0 -0
- data/ext/v8/upstream/v8/src/variables.h +212 -0
- data/ext/v8/upstream/v8/src/version.cc +116 -0
- data/ext/v8/upstream/v8/src/version.h +68 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/virtual-frame-heavy-inl.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/virtual-frame-heavy.cc +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/virtual-frame-inl.h +0 -0
- data/ext/v8/upstream/v8/src/virtual-frame-light-inl.h +171 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/virtual-frame-light.cc +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/virtual-frame.cc +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/virtual-frame.h +0 -0
- data/ext/v8/upstream/v8/src/vm-state-inl.h +138 -0
- data/ext/v8/upstream/v8/src/vm-state.h +70 -0
- data/ext/v8/upstream/v8/src/win32-headers.h +96 -0
- data/ext/v8/upstream/v8/src/x64/assembler-x64-inl.h +456 -0
- data/ext/v8/upstream/v8/src/x64/assembler-x64.cc +2954 -0
- data/ext/v8/upstream/v8/src/x64/assembler-x64.h +1630 -0
- data/ext/v8/upstream/v8/src/x64/builtins-x64.cc +1493 -0
- data/ext/v8/upstream/v8/src/x64/code-stubs-x64.cc +5132 -0
- data/ext/v8/upstream/v8/src/x64/code-stubs-x64.h +477 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/x64/codegen-x64-inl.h +0 -0
- data/ext/v8/upstream/v8/src/x64/codegen-x64.cc +8843 -0
- data/ext/v8/upstream/v8/src/x64/codegen-x64.h +753 -0
- data/ext/v8/upstream/v8/src/x64/cpu-x64.cc +88 -0
- data/ext/v8/upstream/v8/src/x64/debug-x64.cc +318 -0
- data/ext/v8/upstream/v8/src/x64/deoptimizer-x64.cc +815 -0
- data/ext/v8/upstream/v8/src/x64/disasm-x64.cc +1752 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/x64/frames-x64.cc +0 -0
- data/ext/v8/upstream/v8/src/x64/frames-x64.h +130 -0
- data/ext/v8/upstream/v8/src/x64/full-codegen-x64.cc +4339 -0
- data/ext/v8/upstream/v8/src/x64/ic-x64.cc +1752 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/x64/jump-target-x64.cc +0 -0
- data/ext/v8/upstream/v8/src/x64/lithium-codegen-x64.cc +3970 -0
- data/ext/v8/upstream/v8/src/x64/lithium-codegen-x64.h +318 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/x64/lithium-gap-resolver-x64.cc +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/x64/lithium-gap-resolver-x64.h +0 -0
- data/ext/v8/upstream/v8/src/x64/lithium-x64.cc +2115 -0
- data/ext/v8/upstream/v8/src/x64/lithium-x64.h +2161 -0
- data/ext/v8/upstream/v8/src/x64/macro-assembler-x64.cc +2911 -0
- data/ext/v8/upstream/v8/src/x64/macro-assembler-x64.h +1984 -0
- data/ext/v8/upstream/v8/src/x64/regexp-macro-assembler-x64.cc +1398 -0
- data/ext/v8/upstream/v8/src/x64/regexp-macro-assembler-x64.h +282 -0
- data/ext/v8/upstream/v8/src/x64/register-allocator-x64-inl.h +87 -0
- data/ext/v8/upstream/v8/src/x64/register-allocator-x64.cc +95 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/x64/register-allocator-x64.h +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/src/x64/simulator-x64.cc +0 -0
- data/ext/v8/upstream/v8/src/x64/simulator-x64.h +71 -0
- data/ext/v8/upstream/v8/src/x64/stub-cache-x64.cc +3460 -0
- data/ext/v8/upstream/v8/src/x64/virtual-frame-x64.cc +1296 -0
- data/ext/v8/upstream/v8/src/x64/virtual-frame-x64.h +597 -0
- data/ext/v8/upstream/v8/src/zone-inl.h +129 -0
- data/ext/v8/upstream/v8/src/zone.cc +196 -0
- data/ext/v8/upstream/v8/src/zone.h +236 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/codemap.js +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/consarray.js +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/csvparser.js +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/disasm.py +0 -0
- data/ext/v8/upstream/v8/tools/freebsd-tick-processor +10 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/gc-nvp-trace-processor.py +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/generate-ten-powers.scm +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/grokdump.py +0 -0
- data/ext/v8/upstream/v8/tools/gyp/v8.gyp +844 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/js2c.py +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/jsmin.py +0 -0
- data/ext/v8/upstream/v8/tools/linux-tick-processor +35 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/ll_prof.py +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/logreader.js +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/mac-nm +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/mac-tick-processor +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/oom_dump/README +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/oom_dump/SConstruct +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/oom_dump/oom_dump.cc +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/presubmit.py +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/process-heap-prof.py +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/profile.js +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/profile_view.js +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/run-valgrind.py +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/splaytree.js +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/stats-viewer.py +0 -0
- data/ext/v8/upstream/v8/tools/test.py +1490 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/tickprocessor-driver.js +0 -0
- data/ext/v8/upstream/v8/tools/tickprocessor.js +877 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/utils.py +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/README.txt +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/arm.vsprops +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/common.vsprops +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/d8.vcproj +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/d8_arm.vcproj +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/d8_x64.vcproj +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/d8js2c.cmd +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/debug.vsprops +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/ia32.vsprops +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/js2c.cmd +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/release.vsprops +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8.sln +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8.vcproj +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_arm.sln +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_arm.vcproj +0 -0
- data/ext/v8/upstream/v8/tools/visual_studio/v8_base.vcproj +1308 -0
- data/ext/v8/upstream/v8/tools/visual_studio/v8_base_arm.vcproj +1238 -0
- data/ext/v8/upstream/v8/tools/visual_studio/v8_base_x64.vcproj +1300 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_cctest.vcproj +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_cctest_arm.vcproj +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_cctest_x64.vcproj +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_mksnapshot.vcproj +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_mksnapshot_x64.vcproj +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_process_sample.vcproj +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_process_sample_arm.vcproj +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_process_sample_x64.vcproj +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_shell_sample.vcproj +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_shell_sample_arm.vcproj +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_shell_sample_x64.vcproj +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_snapshot.vcproj +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_snapshot_cc.vcproj +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_snapshot_cc_x64.vcproj +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_snapshot_x64.vcproj +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_x64.sln +0 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/visual_studio/v8_x64.vcproj +0 -0
- data/ext/v8/upstream/v8/tools/visual_studio/x64.vsprops +18 -0
- data/ext/v8/upstream/{3.1.8 → v8}/tools/windows-tick-processor.bat +0 -0
- data/ext/v8/v8_callbacks.cpp +52 -92
- data/ext/v8/v8_date.cpp +2 -3
- data/ext/v8/v8_object.cpp +4 -0
- data/ext/v8/v8_template.cpp +2 -2
- data/ext/v8/v8_try_catch.cpp +8 -38
- data/lib/v8/version.rb +1 -1
- data/spec/ext/ext_spec_helper.rb +2 -20
- data/spec/ext/object_spec.rb +0 -12
- data/spec/ext/try_catch_spec.rb +29 -1
- data/spec/spec_helper.rb +1 -0
- data/spec/v8/portal/proxies_spec.rb +1 -84
- data/specmem/handle_memspec.rb +41 -0
- data/specmem/object_memspec.rb +16 -0
- data/specmem/proxies_memspec.rb +86 -0
- data/specmem/spec_helper.rb +24 -0
- data/therubyracer.gemspec +7 -2
- metadata +564 -541
- data/ext/v8/upstream/3.1.8/.gitignore +0 -31
- data/ext/v8/upstream/3.1.8/AUTHORS +0 -40
- data/ext/v8/upstream/3.1.8/ChangeLog +0 -2566
- data/ext/v8/upstream/3.1.8/SConstruct +0 -1192
- data/ext/v8/upstream/3.1.8/include/v8-debug.h +0 -384
- data/ext/v8/upstream/3.1.8/include/v8-preparser.h +0 -116
- data/ext/v8/upstream/3.1.8/include/v8-profiler.h +0 -426
- data/ext/v8/upstream/3.1.8/include/v8-testing.h +0 -99
- data/ext/v8/upstream/3.1.8/include/v8.h +0 -3846
- data/ext/v8/upstream/3.1.8/preparser/preparser-process.cc +0 -206
- data/ext/v8/upstream/3.1.8/src/SConscript +0 -356
- data/ext/v8/upstream/3.1.8/src/accessors.cc +0 -907
- data/ext/v8/upstream/3.1.8/src/allocation.cc +0 -204
- data/ext/v8/upstream/3.1.8/src/allocation.h +0 -176
- data/ext/v8/upstream/3.1.8/src/api.cc +0 -5191
- data/ext/v8/upstream/3.1.8/src/api.h +0 -508
- data/ext/v8/upstream/3.1.8/src/apiutils.h +0 -80
- data/ext/v8/upstream/3.1.8/src/arguments.h +0 -105
- data/ext/v8/upstream/3.1.8/src/arm/assembler-arm-inl.h +0 -352
- data/ext/v8/upstream/3.1.8/src/arm/assembler-arm.cc +0 -2756
- data/ext/v8/upstream/3.1.8/src/arm/assembler-arm.h +0 -1294
- data/ext/v8/upstream/3.1.8/src/arm/builtins-arm.cc +0 -1628
- data/ext/v8/upstream/3.1.8/src/arm/code-stubs-arm.cc +0 -6783
- data/ext/v8/upstream/3.1.8/src/arm/code-stubs-arm.h +0 -657
- data/ext/v8/upstream/3.1.8/src/arm/codegen-arm.cc +0 -7403
- data/ext/v8/upstream/3.1.8/src/arm/codegen-arm.h +0 -595
- data/ext/v8/upstream/3.1.8/src/arm/constants-arm.h +0 -769
- data/ext/v8/upstream/3.1.8/src/arm/cpu-arm.cc +0 -147
- data/ext/v8/upstream/3.1.8/src/arm/debug-arm.cc +0 -315
- data/ext/v8/upstream/3.1.8/src/arm/deoptimizer-arm.cc +0 -700
- data/ext/v8/upstream/3.1.8/src/arm/disasm-arm.cc +0 -1439
- data/ext/v8/upstream/3.1.8/src/arm/frames-arm.h +0 -168
- data/ext/v8/upstream/3.1.8/src/arm/full-codegen-arm.cc +0 -4230
- data/ext/v8/upstream/3.1.8/src/arm/ic-arm.cc +0 -1799
- data/ext/v8/upstream/3.1.8/src/arm/lithium-arm.cc +0 -2041
- data/ext/v8/upstream/3.1.8/src/arm/lithium-arm.h +0 -2046
- data/ext/v8/upstream/3.1.8/src/arm/lithium-codegen-arm.cc +0 -3822
- data/ext/v8/upstream/3.1.8/src/arm/lithium-codegen-arm.h +0 -312
- data/ext/v8/upstream/3.1.8/src/arm/lithium-gap-resolver-arm.cc +0 -303
- data/ext/v8/upstream/3.1.8/src/arm/macro-assembler-arm.cc +0 -2701
- data/ext/v8/upstream/3.1.8/src/arm/macro-assembler-arm.h +0 -1015
- data/ext/v8/upstream/3.1.8/src/arm/regexp-macro-assembler-arm.cc +0 -1280
- data/ext/v8/upstream/3.1.8/src/arm/regexp-macro-assembler-arm.h +0 -252
- data/ext/v8/upstream/3.1.8/src/arm/simulator-arm.cc +0 -3165
- data/ext/v8/upstream/3.1.8/src/arm/simulator-arm.h +0 -402
- data/ext/v8/upstream/3.1.8/src/arm/stub-cache-arm.cc +0 -4077
- data/ext/v8/upstream/3.1.8/src/arm/virtual-frame-arm.cc +0 -843
- data/ext/v8/upstream/3.1.8/src/arm/virtual-frame-arm.h +0 -520
- data/ext/v8/upstream/3.1.8/src/array.js +0 -1231
- data/ext/v8/upstream/3.1.8/src/assembler.cc +0 -973
- data/ext/v8/upstream/3.1.8/src/assembler.h +0 -787
- data/ext/v8/upstream/3.1.8/src/ast-inl.h +0 -107
- data/ext/v8/upstream/3.1.8/src/ast.cc +0 -1067
- data/ext/v8/upstream/3.1.8/src/ast.h +0 -2177
- data/ext/v8/upstream/3.1.8/src/atomicops.h +0 -165
- data/ext/v8/upstream/3.1.8/src/bootstrapper.cc +0 -1888
- data/ext/v8/upstream/3.1.8/src/bootstrapper.h +0 -118
- data/ext/v8/upstream/3.1.8/src/builtins.cc +0 -1586
- data/ext/v8/upstream/3.1.8/src/builtins.h +0 -339
- data/ext/v8/upstream/3.1.8/src/checks.cc +0 -110
- data/ext/v8/upstream/3.1.8/src/checks.h +0 -292
- data/ext/v8/upstream/3.1.8/src/code-stubs.cc +0 -230
- data/ext/v8/upstream/3.1.8/src/code-stubs.h +0 -950
- data/ext/v8/upstream/3.1.8/src/codegen-inl.h +0 -64
- data/ext/v8/upstream/3.1.8/src/codegen.cc +0 -495
- data/ext/v8/upstream/3.1.8/src/codegen.h +0 -245
- data/ext/v8/upstream/3.1.8/src/compilation-cache.cc +0 -654
- data/ext/v8/upstream/3.1.8/src/compilation-cache.h +0 -112
- data/ext/v8/upstream/3.1.8/src/compiler.cc +0 -806
- data/ext/v8/upstream/3.1.8/src/compiler.h +0 -290
- data/ext/v8/upstream/3.1.8/src/contexts.cc +0 -320
- data/ext/v8/upstream/3.1.8/src/contexts.h +0 -376
- data/ext/v8/upstream/3.1.8/src/conversions.cc +0 -1069
- data/ext/v8/upstream/3.1.8/src/counters.cc +0 -78
- data/ext/v8/upstream/3.1.8/src/counters.h +0 -242
- data/ext/v8/upstream/3.1.8/src/cpu-profiler-inl.h +0 -100
- data/ext/v8/upstream/3.1.8/src/cpu-profiler.cc +0 -554
- data/ext/v8/upstream/3.1.8/src/cpu-profiler.h +0 -291
- data/ext/v8/upstream/3.1.8/src/cpu.h +0 -65
- data/ext/v8/upstream/3.1.8/src/d8-debug.cc +0 -367
- data/ext/v8/upstream/3.1.8/src/d8-debug.h +0 -157
- data/ext/v8/upstream/3.1.8/src/d8-posix.cc +0 -693
- data/ext/v8/upstream/3.1.8/src/d8.cc +0 -792
- data/ext/v8/upstream/3.1.8/src/d8.gyp +0 -85
- data/ext/v8/upstream/3.1.8/src/data-flow.h +0 -379
- data/ext/v8/upstream/3.1.8/src/dateparser.h +0 -263
- data/ext/v8/upstream/3.1.8/src/debug-agent.cc +0 -446
- data/ext/v8/upstream/3.1.8/src/debug-agent.h +0 -131
- data/ext/v8/upstream/3.1.8/src/debug.cc +0 -3085
- data/ext/v8/upstream/3.1.8/src/debug.h +0 -1025
- data/ext/v8/upstream/3.1.8/src/deoptimizer.cc +0 -1185
- data/ext/v8/upstream/3.1.8/src/deoptimizer.h +0 -529
- data/ext/v8/upstream/3.1.8/src/disasm.h +0 -77
- data/ext/v8/upstream/3.1.8/src/disassembler.cc +0 -338
- data/ext/v8/upstream/3.1.8/src/execution.cc +0 -735
- data/ext/v8/upstream/3.1.8/src/execution.h +0 -322
- data/ext/v8/upstream/3.1.8/src/extensions/experimental/experimental.gyp +0 -53
- data/ext/v8/upstream/3.1.8/src/extensions/experimental/i18n-extension.cc +0 -264
- data/ext/v8/upstream/3.1.8/src/extensions/externalize-string-extension.cc +0 -141
- data/ext/v8/upstream/3.1.8/src/extensions/gc-extension.cc +0 -58
- data/ext/v8/upstream/3.1.8/src/factory.cc +0 -1087
- data/ext/v8/upstream/3.1.8/src/factory.h +0 -432
- data/ext/v8/upstream/3.1.8/src/flag-definitions.h +0 -552
- data/ext/v8/upstream/3.1.8/src/frame-element.cc +0 -42
- data/ext/v8/upstream/3.1.8/src/frame-element.h +0 -277
- data/ext/v8/upstream/3.1.8/src/frames-inl.h +0 -210
- data/ext/v8/upstream/3.1.8/src/frames.cc +0 -1232
- data/ext/v8/upstream/3.1.8/src/frames.h +0 -826
- data/ext/v8/upstream/3.1.8/src/full-codegen.cc +0 -1382
- data/ext/v8/upstream/3.1.8/src/full-codegen.h +0 -751
- data/ext/v8/upstream/3.1.8/src/func-name-inferrer.cc +0 -90
- data/ext/v8/upstream/3.1.8/src/func-name-inferrer.h +0 -111
- data/ext/v8/upstream/3.1.8/src/gdb-jit.cc +0 -1547
- data/ext/v8/upstream/3.1.8/src/global-handles.cc +0 -534
- data/ext/v8/upstream/3.1.8/src/global-handles.h +0 -181
- data/ext/v8/upstream/3.1.8/src/globals.h +0 -325
- data/ext/v8/upstream/3.1.8/src/handles-inl.h +0 -80
- data/ext/v8/upstream/3.1.8/src/handles.cc +0 -910
- data/ext/v8/upstream/3.1.8/src/handles.h +0 -424
- data/ext/v8/upstream/3.1.8/src/hashmap.h +0 -121
- data/ext/v8/upstream/3.1.8/src/heap-inl.h +0 -587
- data/ext/v8/upstream/3.1.8/src/heap-profiler.cc +0 -1128
- data/ext/v8/upstream/3.1.8/src/heap-profiler.h +0 -381
- data/ext/v8/upstream/3.1.8/src/heap.cc +0 -5610
- data/ext/v8/upstream/3.1.8/src/heap.h +0 -2218
- data/ext/v8/upstream/3.1.8/src/hydrogen-instructions.cc +0 -1490
- data/ext/v8/upstream/3.1.8/src/hydrogen-instructions.h +0 -3493
- data/ext/v8/upstream/3.1.8/src/hydrogen.cc +0 -6056
- data/ext/v8/upstream/3.1.8/src/hydrogen.h +0 -1091
- data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32-inl.h +0 -429
- data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32.cc +0 -2800
- data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32.h +0 -1093
- data/ext/v8/upstream/3.1.8/src/ia32/builtins-ia32.cc +0 -1590
- data/ext/v8/upstream/3.1.8/src/ia32/code-stubs-ia32.cc +0 -6624
- data/ext/v8/upstream/3.1.8/src/ia32/code-stubs-ia32.h +0 -536
- data/ext/v8/upstream/3.1.8/src/ia32/codegen-ia32.cc +0 -10354
- data/ext/v8/upstream/3.1.8/src/ia32/codegen-ia32.h +0 -798
- data/ext/v8/upstream/3.1.8/src/ia32/cpu-ia32.cc +0 -87
- data/ext/v8/upstream/3.1.8/src/ia32/debug-ia32.cc +0 -309
- data/ext/v8/upstream/3.1.8/src/ia32/deoptimizer-ia32.cc +0 -664
- data/ext/v8/upstream/3.1.8/src/ia32/disasm-ia32.cc +0 -1597
- data/ext/v8/upstream/3.1.8/src/ia32/frames-ia32.h +0 -140
- data/ext/v8/upstream/3.1.8/src/ia32/full-codegen-ia32.cc +0 -4278
- data/ext/v8/upstream/3.1.8/src/ia32/ic-ia32.cc +0 -1786
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-codegen-ia32.cc +0 -3880
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-codegen-ia32.h +0 -309
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-gap-resolver-ia32.cc +0 -460
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-ia32.cc +0 -2095
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-ia32.h +0 -2127
- data/ext/v8/upstream/3.1.8/src/ia32/macro-assembler-ia32.cc +0 -2031
- data/ext/v8/upstream/3.1.8/src/ia32/macro-assembler-ia32.h +0 -798
- data/ext/v8/upstream/3.1.8/src/ia32/regexp-macro-assembler-ia32.cc +0 -1253
- data/ext/v8/upstream/3.1.8/src/ia32/regexp-macro-assembler-ia32.h +0 -215
- data/ext/v8/upstream/3.1.8/src/ia32/register-allocator-ia32.cc +0 -157
- data/ext/v8/upstream/3.1.8/src/ia32/simulator-ia32.h +0 -72
- data/ext/v8/upstream/3.1.8/src/ia32/stub-cache-ia32.cc +0 -3732
- data/ext/v8/upstream/3.1.8/src/ia32/virtual-frame-ia32.cc +0 -1360
- data/ext/v8/upstream/3.1.8/src/ia32/virtual-frame-ia32.h +0 -646
- data/ext/v8/upstream/3.1.8/src/ic-inl.h +0 -129
- data/ext/v8/upstream/3.1.8/src/ic.cc +0 -2333
- data/ext/v8/upstream/3.1.8/src/ic.h +0 -639
- data/ext/v8/upstream/3.1.8/src/interpreter-irregexp.cc +0 -655
- data/ext/v8/upstream/3.1.8/src/interpreter-irregexp.h +0 -48
- data/ext/v8/upstream/3.1.8/src/json.js +0 -342
- data/ext/v8/upstream/3.1.8/src/jsregexp.cc +0 -5340
- data/ext/v8/upstream/3.1.8/src/jsregexp.h +0 -1484
- data/ext/v8/upstream/3.1.8/src/jump-target-heavy.cc +0 -430
- data/ext/v8/upstream/3.1.8/src/jump-target-heavy.h +0 -244
- data/ext/v8/upstream/3.1.8/src/jump-target-inl.h +0 -48
- data/ext/v8/upstream/3.1.8/src/jump-target-light.cc +0 -111
- data/ext/v8/upstream/3.1.8/src/lithium-allocator-inl.h +0 -140
- data/ext/v8/upstream/3.1.8/src/lithium-allocator.cc +0 -2093
- data/ext/v8/upstream/3.1.8/src/lithium-allocator.h +0 -644
- data/ext/v8/upstream/3.1.8/src/lithium.cc +0 -168
- data/ext/v8/upstream/3.1.8/src/liveedit.cc +0 -1650
- data/ext/v8/upstream/3.1.8/src/liveedit.h +0 -174
- data/ext/v8/upstream/3.1.8/src/liveobjectlist.cc +0 -2527
- data/ext/v8/upstream/3.1.8/src/liveobjectlist.h +0 -322
- data/ext/v8/upstream/3.1.8/src/log-utils.cc +0 -336
- data/ext/v8/upstream/3.1.8/src/log-utils.h +0 -232
- data/ext/v8/upstream/3.1.8/src/log.cc +0 -1608
- data/ext/v8/upstream/3.1.8/src/log.h +0 -379
- data/ext/v8/upstream/3.1.8/src/mark-compact.cc +0 -2957
- data/ext/v8/upstream/3.1.8/src/mark-compact.h +0 -433
- data/ext/v8/upstream/3.1.8/src/messages.cc +0 -164
- data/ext/v8/upstream/3.1.8/src/messages.js +0 -1071
- data/ext/v8/upstream/3.1.8/src/mips/assembler-mips-inl.h +0 -215
- data/ext/v8/upstream/3.1.8/src/mips/assembler-mips.cc +0 -1219
- data/ext/v8/upstream/3.1.8/src/mips/assembler-mips.h +0 -667
- data/ext/v8/upstream/3.1.8/src/mips/builtins-mips.cc +0 -205
- data/ext/v8/upstream/3.1.8/src/mips/codegen-mips-inl.h +0 -70
- data/ext/v8/upstream/3.1.8/src/mips/codegen-mips.cc +0 -1437
- data/ext/v8/upstream/3.1.8/src/mips/codegen-mips.h +0 -431
- data/ext/v8/upstream/3.1.8/src/mips/constants-mips.cc +0 -328
- data/ext/v8/upstream/3.1.8/src/mips/constants-mips.h +0 -525
- data/ext/v8/upstream/3.1.8/src/mips/cpu-mips.cc +0 -73
- data/ext/v8/upstream/3.1.8/src/mips/debug-mips.cc +0 -127
- data/ext/v8/upstream/3.1.8/src/mips/disasm-mips.cc +0 -787
- data/ext/v8/upstream/3.1.8/src/mips/fast-codegen-mips.cc +0 -77
- data/ext/v8/upstream/3.1.8/src/mips/frames-mips.cc +0 -96
- data/ext/v8/upstream/3.1.8/src/mips/frames-mips.h +0 -164
- data/ext/v8/upstream/3.1.8/src/mips/full-codegen-mips.cc +0 -277
- data/ext/v8/upstream/3.1.8/src/mips/ic-mips.cc +0 -208
- data/ext/v8/upstream/3.1.8/src/mips/jump-target-mips.cc +0 -175
- data/ext/v8/upstream/3.1.8/src/mips/macro-assembler-mips.cc +0 -1326
- data/ext/v8/upstream/3.1.8/src/mips/macro-assembler-mips.h +0 -461
- data/ext/v8/upstream/3.1.8/src/mips/register-allocator-mips-inl.h +0 -137
- data/ext/v8/upstream/3.1.8/src/mips/register-allocator-mips.h +0 -46
- data/ext/v8/upstream/3.1.8/src/mips/simulator-mips.cc +0 -1650
- data/ext/v8/upstream/3.1.8/src/mips/simulator-mips.h +0 -311
- data/ext/v8/upstream/3.1.8/src/mips/stub-cache-mips.cc +0 -418
- data/ext/v8/upstream/3.1.8/src/mips/virtual-frame-mips.cc +0 -319
- data/ext/v8/upstream/3.1.8/src/mips/virtual-frame-mips.h +0 -548
- data/ext/v8/upstream/3.1.8/src/mirror-debugger.js +0 -2380
- data/ext/v8/upstream/3.1.8/src/mksnapshot.cc +0 -256
- data/ext/v8/upstream/3.1.8/src/objects-debug.cc +0 -722
- data/ext/v8/upstream/3.1.8/src/objects-inl.h +0 -3946
- data/ext/v8/upstream/3.1.8/src/objects-printer.cc +0 -801
- data/ext/v8/upstream/3.1.8/src/objects-visiting.cc +0 -142
- data/ext/v8/upstream/3.1.8/src/objects-visiting.h +0 -401
- data/ext/v8/upstream/3.1.8/src/objects.cc +0 -10044
- data/ext/v8/upstream/3.1.8/src/objects.h +0 -6571
- data/ext/v8/upstream/3.1.8/src/parser.cc +0 -5165
- data/ext/v8/upstream/3.1.8/src/parser.h +0 -802
- data/ext/v8/upstream/3.1.8/src/platform-cygwin.cc +0 -745
- data/ext/v8/upstream/3.1.8/src/platform-freebsd.cc +0 -702
- data/ext/v8/upstream/3.1.8/src/platform-linux.cc +0 -981
- data/ext/v8/upstream/3.1.8/src/platform-macos.cc +0 -732
- data/ext/v8/upstream/3.1.8/src/platform-nullos.cc +0 -498
- data/ext/v8/upstream/3.1.8/src/platform-openbsd.cc +0 -657
- data/ext/v8/upstream/3.1.8/src/platform-posix.cc +0 -399
- data/ext/v8/upstream/3.1.8/src/platform-solaris.cc +0 -714
- data/ext/v8/upstream/3.1.8/src/platform-win32.cc +0 -1974
- data/ext/v8/upstream/3.1.8/src/platform.h +0 -636
- data/ext/v8/upstream/3.1.8/src/preparse-data.cc +0 -183
- data/ext/v8/upstream/3.1.8/src/preparser-api.cc +0 -213
- data/ext/v8/upstream/3.1.8/src/preparser.cc +0 -1205
- data/ext/v8/upstream/3.1.8/src/prettyprinter.cc +0 -1539
- data/ext/v8/upstream/3.1.8/src/prettyprinter.h +0 -223
- data/ext/v8/upstream/3.1.8/src/profile-generator.cc +0 -2899
- data/ext/v8/upstream/3.1.8/src/profile-generator.h +0 -1151
- data/ext/v8/upstream/3.1.8/src/property.cc +0 -96
- data/ext/v8/upstream/3.1.8/src/property.h +0 -337
- data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-irregexp.cc +0 -470
- data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler.cc +0 -257
- data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler.h +0 -231
- data/ext/v8/upstream/3.1.8/src/regexp-stack.cc +0 -103
- data/ext/v8/upstream/3.1.8/src/regexp-stack.h +0 -123
- data/ext/v8/upstream/3.1.8/src/regexp.js +0 -483
- data/ext/v8/upstream/3.1.8/src/register-allocator-inl.h +0 -141
- data/ext/v8/upstream/3.1.8/src/register-allocator.cc +0 -104
- data/ext/v8/upstream/3.1.8/src/register-allocator.h +0 -320
- data/ext/v8/upstream/3.1.8/src/rewriter.cc +0 -1023
- data/ext/v8/upstream/3.1.8/src/runtime-profiler.cc +0 -443
- data/ext/v8/upstream/3.1.8/src/runtime-profiler.h +0 -77
- data/ext/v8/upstream/3.1.8/src/runtime.cc +0 -11592
- data/ext/v8/upstream/3.1.8/src/runtime.h +0 -582
- data/ext/v8/upstream/3.1.8/src/safepoint-table.cc +0 -253
- data/ext/v8/upstream/3.1.8/src/safepoint-table.h +0 -263
- data/ext/v8/upstream/3.1.8/src/scanner-base.cc +0 -971
- data/ext/v8/upstream/3.1.8/src/scanner-base.h +0 -653
- data/ext/v8/upstream/3.1.8/src/scanner.cc +0 -586
- data/ext/v8/upstream/3.1.8/src/scanner.h +0 -194
- data/ext/v8/upstream/3.1.8/src/scopeinfo.cc +0 -636
- data/ext/v8/upstream/3.1.8/src/scopeinfo.h +0 -238
- data/ext/v8/upstream/3.1.8/src/scopes.cc +0 -1063
- data/ext/v8/upstream/3.1.8/src/scopes.h +0 -494
- data/ext/v8/upstream/3.1.8/src/serialize.cc +0 -1535
- data/ext/v8/upstream/3.1.8/src/serialize.h +0 -584
- data/ext/v8/upstream/3.1.8/src/snapshot-common.cc +0 -82
- data/ext/v8/upstream/3.1.8/src/snapshot.h +0 -71
- data/ext/v8/upstream/3.1.8/src/spaces-inl.h +0 -524
- data/ext/v8/upstream/3.1.8/src/spaces.cc +0 -3254
- data/ext/v8/upstream/3.1.8/src/spaces.h +0 -2362
- data/ext/v8/upstream/3.1.8/src/string-search.cc +0 -40
- data/ext/v8/upstream/3.1.8/src/string-search.h +0 -567
- data/ext/v8/upstream/3.1.8/src/string-stream.cc +0 -584
- data/ext/v8/upstream/3.1.8/src/string.js +0 -915
- data/ext/v8/upstream/3.1.8/src/stub-cache.cc +0 -1878
- data/ext/v8/upstream/3.1.8/src/stub-cache.h +0 -849
- data/ext/v8/upstream/3.1.8/src/token.cc +0 -63
- data/ext/v8/upstream/3.1.8/src/token.h +0 -288
- data/ext/v8/upstream/3.1.8/src/top.cc +0 -1152
- data/ext/v8/upstream/3.1.8/src/top.h +0 -608
- data/ext/v8/upstream/3.1.8/src/type-info.cc +0 -406
- data/ext/v8/upstream/3.1.8/src/type-info.h +0 -283
- data/ext/v8/upstream/3.1.8/src/unicode.cc +0 -1624
- data/ext/v8/upstream/3.1.8/src/unicode.h +0 -280
- data/ext/v8/upstream/3.1.8/src/utils.h +0 -793
- data/ext/v8/upstream/3.1.8/src/v8-counters.cc +0 -55
- data/ext/v8/upstream/3.1.8/src/v8-counters.h +0 -290
- data/ext/v8/upstream/3.1.8/src/v8.cc +0 -270
- data/ext/v8/upstream/3.1.8/src/v8.h +0 -127
- data/ext/v8/upstream/3.1.8/src/v8globals.h +0 -480
- data/ext/v8/upstream/3.1.8/src/v8natives.js +0 -1252
- data/ext/v8/upstream/3.1.8/src/v8threads.cc +0 -440
- data/ext/v8/upstream/3.1.8/src/v8threads.h +0 -157
- data/ext/v8/upstream/3.1.8/src/v8utils.h +0 -354
- data/ext/v8/upstream/3.1.8/src/variables.h +0 -212
- data/ext/v8/upstream/3.1.8/src/version.cc +0 -95
- data/ext/v8/upstream/3.1.8/src/version.h +0 -64
- data/ext/v8/upstream/3.1.8/src/virtual-frame-light-inl.h +0 -170
- data/ext/v8/upstream/3.1.8/src/vm-state-inl.h +0 -134
- data/ext/v8/upstream/3.1.8/src/vm-state.h +0 -68
- data/ext/v8/upstream/3.1.8/src/win32-headers.h +0 -95
- data/ext/v8/upstream/3.1.8/src/x64/assembler-x64-inl.h +0 -455
- data/ext/v8/upstream/3.1.8/src/x64/assembler-x64.cc +0 -3162
- data/ext/v8/upstream/3.1.8/src/x64/assembler-x64.h +0 -1584
- data/ext/v8/upstream/3.1.8/src/x64/builtins-x64.cc +0 -1492
- data/ext/v8/upstream/3.1.8/src/x64/code-stubs-x64.cc +0 -5150
- data/ext/v8/upstream/3.1.8/src/x64/code-stubs-x64.h +0 -519
- data/ext/v8/upstream/3.1.8/src/x64/codegen-x64.cc +0 -8835
- data/ext/v8/upstream/3.1.8/src/x64/codegen-x64.h +0 -750
- data/ext/v8/upstream/3.1.8/src/x64/cpu-x64.cc +0 -86
- data/ext/v8/upstream/3.1.8/src/x64/debug-x64.cc +0 -316
- data/ext/v8/upstream/3.1.8/src/x64/deoptimizer-x64.cc +0 -781
- data/ext/v8/upstream/3.1.8/src/x64/disasm-x64.cc +0 -1737
- data/ext/v8/upstream/3.1.8/src/x64/frames-x64.h +0 -130
- data/ext/v8/upstream/3.1.8/src/x64/full-codegen-x64.cc +0 -3984
- data/ext/v8/upstream/3.1.8/src/x64/ic-x64.cc +0 -1761
- data/ext/v8/upstream/3.1.8/src/x64/lithium-codegen-x64.cc +0 -3639
- data/ext/v8/upstream/3.1.8/src/x64/lithium-codegen-x64.h +0 -305
- data/ext/v8/upstream/3.1.8/src/x64/lithium-x64.cc +0 -2044
- data/ext/v8/upstream/3.1.8/src/x64/lithium-x64.h +0 -2052
- data/ext/v8/upstream/3.1.8/src/x64/macro-assembler-x64.cc +0 -2660
- data/ext/v8/upstream/3.1.8/src/x64/macro-assembler-x64.h +0 -1852
- data/ext/v8/upstream/3.1.8/src/x64/regexp-macro-assembler-x64.cc +0 -1382
- data/ext/v8/upstream/3.1.8/src/x64/regexp-macro-assembler-x64.h +0 -278
- data/ext/v8/upstream/3.1.8/src/x64/register-allocator-x64-inl.h +0 -87
- data/ext/v8/upstream/3.1.8/src/x64/register-allocator-x64.cc +0 -91
- data/ext/v8/upstream/3.1.8/src/x64/simulator-x64.h +0 -71
- data/ext/v8/upstream/3.1.8/src/x64/stub-cache-x64.cc +0 -3509
- data/ext/v8/upstream/3.1.8/src/x64/virtual-frame-x64.cc +0 -1292
- data/ext/v8/upstream/3.1.8/src/x64/virtual-frame-x64.h +0 -593
- data/ext/v8/upstream/3.1.8/src/zone-inl.h +0 -83
- data/ext/v8/upstream/3.1.8/src/zone.cc +0 -195
- data/ext/v8/upstream/3.1.8/src/zone.h +0 -233
- data/ext/v8/upstream/3.1.8/tools/gyp/v8.gyp +0 -869
- data/ext/v8/upstream/3.1.8/tools/linux-tick-processor +0 -33
- data/ext/v8/upstream/3.1.8/tools/tickprocessor.js +0 -863
- data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base.vcproj +0 -1296
- data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base_arm.vcproj +0 -1234
- data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base_x64.vcproj +0 -1296
- data/ext/v8/upstream/3.1.8/tools/visual_studio/x64.vsprops +0 -17
- data/spec/ext/mem_spec.rb +0 -42
@@ -0,0 +1,1639 @@
|
|
1
|
+
// Copyright 2011 the V8 project authors. All rights reserved.
|
2
|
+
// Redistribution and use in source and binary forms, with or without
|
3
|
+
// modification, are permitted provided that the following conditions are
|
4
|
+
// met:
|
5
|
+
//
|
6
|
+
// * Redistributions of source code must retain the above copyright
|
7
|
+
// notice, this list of conditions and the following disclaimer.
|
8
|
+
// * Redistributions in binary form must reproduce the above
|
9
|
+
// copyright notice, this list of conditions and the following
|
10
|
+
// disclaimer in the documentation and/or other materials provided
|
11
|
+
// with the distribution.
|
12
|
+
// * Neither the name of Google Inc. nor the names of its
|
13
|
+
// contributors may be used to endorse or promote products derived
|
14
|
+
// from this software without specific prior written permission.
|
15
|
+
//
|
16
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
17
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
18
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
19
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
20
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
21
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
22
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
24
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
25
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
26
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
+
|
28
|
+
#include "v8.h"
|
29
|
+
|
30
|
+
#include "factory.h"
|
31
|
+
#include "hydrogen.h"
|
32
|
+
|
33
|
+
#if V8_TARGET_ARCH_IA32
|
34
|
+
#include "ia32/lithium-ia32.h"
|
35
|
+
#elif V8_TARGET_ARCH_X64
|
36
|
+
#include "x64/lithium-x64.h"
|
37
|
+
#elif V8_TARGET_ARCH_ARM
|
38
|
+
#include "arm/lithium-arm.h"
|
39
|
+
#elif V8_TARGET_ARCH_MIPS
|
40
|
+
#include "mips/lithium-mips.h"
|
41
|
+
#else
|
42
|
+
#error Unsupported target architecture.
|
43
|
+
#endif
|
44
|
+
|
45
|
+
namespace v8 {
|
46
|
+
namespace internal {
|
47
|
+
|
48
|
+
#define DEFINE_COMPILE(type) \
|
49
|
+
LInstruction* H##type::CompileToLithium(LChunkBuilder* builder) { \
|
50
|
+
return builder->Do##type(this); \
|
51
|
+
}
|
52
|
+
HYDROGEN_CONCRETE_INSTRUCTION_LIST(DEFINE_COMPILE)
|
53
|
+
#undef DEFINE_COMPILE
|
54
|
+
|
55
|
+
|
56
|
+
const char* Representation::Mnemonic() const {
|
57
|
+
switch (kind_) {
|
58
|
+
case kNone: return "v";
|
59
|
+
case kTagged: return "t";
|
60
|
+
case kDouble: return "d";
|
61
|
+
case kInteger32: return "i";
|
62
|
+
case kExternal: return "x";
|
63
|
+
case kNumRepresentations:
|
64
|
+
UNREACHABLE();
|
65
|
+
return NULL;
|
66
|
+
}
|
67
|
+
UNREACHABLE();
|
68
|
+
return NULL;
|
69
|
+
}
|
70
|
+
|
71
|
+
|
72
|
+
static int32_t ConvertAndSetOverflow(int64_t result, bool* overflow) {
|
73
|
+
if (result > kMaxInt) {
|
74
|
+
*overflow = true;
|
75
|
+
return kMaxInt;
|
76
|
+
}
|
77
|
+
if (result < kMinInt) {
|
78
|
+
*overflow = true;
|
79
|
+
return kMinInt;
|
80
|
+
}
|
81
|
+
return static_cast<int32_t>(result);
|
82
|
+
}
|
83
|
+
|
84
|
+
|
85
|
+
static int32_t AddWithoutOverflow(int32_t a, int32_t b, bool* overflow) {
|
86
|
+
int64_t result = static_cast<int64_t>(a) + static_cast<int64_t>(b);
|
87
|
+
return ConvertAndSetOverflow(result, overflow);
|
88
|
+
}
|
89
|
+
|
90
|
+
|
91
|
+
static int32_t SubWithoutOverflow(int32_t a, int32_t b, bool* overflow) {
|
92
|
+
int64_t result = static_cast<int64_t>(a) - static_cast<int64_t>(b);
|
93
|
+
return ConvertAndSetOverflow(result, overflow);
|
94
|
+
}
|
95
|
+
|
96
|
+
|
97
|
+
static int32_t MulWithoutOverflow(int32_t a, int32_t b, bool* overflow) {
|
98
|
+
int64_t result = static_cast<int64_t>(a) * static_cast<int64_t>(b);
|
99
|
+
return ConvertAndSetOverflow(result, overflow);
|
100
|
+
}
|
101
|
+
|
102
|
+
|
103
|
+
int32_t Range::Mask() const {
|
104
|
+
if (lower_ == upper_) return lower_;
|
105
|
+
if (lower_ >= 0) {
|
106
|
+
int32_t res = 1;
|
107
|
+
while (res < upper_) {
|
108
|
+
res = (res << 1) | 1;
|
109
|
+
}
|
110
|
+
return res;
|
111
|
+
}
|
112
|
+
return 0xffffffff;
|
113
|
+
}
|
114
|
+
|
115
|
+
|
116
|
+
void Range::AddConstant(int32_t value) {
|
117
|
+
if (value == 0) return;
|
118
|
+
bool may_overflow = false; // Overflow is ignored here.
|
119
|
+
lower_ = AddWithoutOverflow(lower_, value, &may_overflow);
|
120
|
+
upper_ = AddWithoutOverflow(upper_, value, &may_overflow);
|
121
|
+
Verify();
|
122
|
+
}
|
123
|
+
|
124
|
+
|
125
|
+
void Range::Intersect(Range* other) {
|
126
|
+
upper_ = Min(upper_, other->upper_);
|
127
|
+
lower_ = Max(lower_, other->lower_);
|
128
|
+
bool b = CanBeMinusZero() && other->CanBeMinusZero();
|
129
|
+
set_can_be_minus_zero(b);
|
130
|
+
}
|
131
|
+
|
132
|
+
|
133
|
+
void Range::Union(Range* other) {
|
134
|
+
upper_ = Max(upper_, other->upper_);
|
135
|
+
lower_ = Min(lower_, other->lower_);
|
136
|
+
bool b = CanBeMinusZero() || other->CanBeMinusZero();
|
137
|
+
set_can_be_minus_zero(b);
|
138
|
+
}
|
139
|
+
|
140
|
+
|
141
|
+
void Range::Sar(int32_t value) {
|
142
|
+
int32_t bits = value & 0x1F;
|
143
|
+
lower_ = lower_ >> bits;
|
144
|
+
upper_ = upper_ >> bits;
|
145
|
+
set_can_be_minus_zero(false);
|
146
|
+
}
|
147
|
+
|
148
|
+
|
149
|
+
void Range::Shl(int32_t value) {
|
150
|
+
int32_t bits = value & 0x1F;
|
151
|
+
int old_lower = lower_;
|
152
|
+
int old_upper = upper_;
|
153
|
+
lower_ = lower_ << bits;
|
154
|
+
upper_ = upper_ << bits;
|
155
|
+
if (old_lower != lower_ >> bits || old_upper != upper_ >> bits) {
|
156
|
+
upper_ = kMaxInt;
|
157
|
+
lower_ = kMinInt;
|
158
|
+
}
|
159
|
+
set_can_be_minus_zero(false);
|
160
|
+
}
|
161
|
+
|
162
|
+
|
163
|
+
bool Range::AddAndCheckOverflow(Range* other) {
|
164
|
+
bool may_overflow = false;
|
165
|
+
lower_ = AddWithoutOverflow(lower_, other->lower(), &may_overflow);
|
166
|
+
upper_ = AddWithoutOverflow(upper_, other->upper(), &may_overflow);
|
167
|
+
KeepOrder();
|
168
|
+
Verify();
|
169
|
+
return may_overflow;
|
170
|
+
}
|
171
|
+
|
172
|
+
|
173
|
+
bool Range::SubAndCheckOverflow(Range* other) {
|
174
|
+
bool may_overflow = false;
|
175
|
+
lower_ = SubWithoutOverflow(lower_, other->upper(), &may_overflow);
|
176
|
+
upper_ = SubWithoutOverflow(upper_, other->lower(), &may_overflow);
|
177
|
+
KeepOrder();
|
178
|
+
Verify();
|
179
|
+
return may_overflow;
|
180
|
+
}
|
181
|
+
|
182
|
+
|
183
|
+
void Range::KeepOrder() {
|
184
|
+
if (lower_ > upper_) {
|
185
|
+
int32_t tmp = lower_;
|
186
|
+
lower_ = upper_;
|
187
|
+
upper_ = tmp;
|
188
|
+
}
|
189
|
+
}
|
190
|
+
|
191
|
+
|
192
|
+
void Range::Verify() const {
|
193
|
+
ASSERT(lower_ <= upper_);
|
194
|
+
}
|
195
|
+
|
196
|
+
|
197
|
+
bool Range::MulAndCheckOverflow(Range* other) {
|
198
|
+
bool may_overflow = false;
|
199
|
+
int v1 = MulWithoutOverflow(lower_, other->lower(), &may_overflow);
|
200
|
+
int v2 = MulWithoutOverflow(lower_, other->upper(), &may_overflow);
|
201
|
+
int v3 = MulWithoutOverflow(upper_, other->lower(), &may_overflow);
|
202
|
+
int v4 = MulWithoutOverflow(upper_, other->upper(), &may_overflow);
|
203
|
+
lower_ = Min(Min(v1, v2), Min(v3, v4));
|
204
|
+
upper_ = Max(Max(v1, v2), Max(v3, v4));
|
205
|
+
Verify();
|
206
|
+
return may_overflow;
|
207
|
+
}
|
208
|
+
|
209
|
+
|
210
|
+
const char* HType::ToString() {
|
211
|
+
switch (type_) {
|
212
|
+
case kTagged: return "tagged";
|
213
|
+
case kTaggedPrimitive: return "primitive";
|
214
|
+
case kTaggedNumber: return "number";
|
215
|
+
case kSmi: return "smi";
|
216
|
+
case kHeapNumber: return "heap-number";
|
217
|
+
case kString: return "string";
|
218
|
+
case kBoolean: return "boolean";
|
219
|
+
case kNonPrimitive: return "non-primitive";
|
220
|
+
case kJSArray: return "array";
|
221
|
+
case kJSObject: return "object";
|
222
|
+
case kUninitialized: return "uninitialized";
|
223
|
+
}
|
224
|
+
UNREACHABLE();
|
225
|
+
return "Unreachable code";
|
226
|
+
}
|
227
|
+
|
228
|
+
|
229
|
+
const char* HType::ToShortString() {
|
230
|
+
switch (type_) {
|
231
|
+
case kTagged: return "t";
|
232
|
+
case kTaggedPrimitive: return "p";
|
233
|
+
case kTaggedNumber: return "n";
|
234
|
+
case kSmi: return "m";
|
235
|
+
case kHeapNumber: return "h";
|
236
|
+
case kString: return "s";
|
237
|
+
case kBoolean: return "b";
|
238
|
+
case kNonPrimitive: return "r";
|
239
|
+
case kJSArray: return "a";
|
240
|
+
case kJSObject: return "o";
|
241
|
+
case kUninitialized: return "z";
|
242
|
+
}
|
243
|
+
UNREACHABLE();
|
244
|
+
return "Unreachable code";
|
245
|
+
}
|
246
|
+
|
247
|
+
|
248
|
+
HType HType::TypeFromValue(Handle<Object> value) {
|
249
|
+
HType result = HType::Tagged();
|
250
|
+
if (value->IsSmi()) {
|
251
|
+
result = HType::Smi();
|
252
|
+
} else if (value->IsHeapNumber()) {
|
253
|
+
result = HType::HeapNumber();
|
254
|
+
} else if (value->IsString()) {
|
255
|
+
result = HType::String();
|
256
|
+
} else if (value->IsBoolean()) {
|
257
|
+
result = HType::Boolean();
|
258
|
+
} else if (value->IsJSObject()) {
|
259
|
+
result = HType::JSObject();
|
260
|
+
} else if (value->IsJSArray()) {
|
261
|
+
result = HType::JSArray();
|
262
|
+
}
|
263
|
+
return result;
|
264
|
+
}
|
265
|
+
|
266
|
+
|
267
|
+
int HValue::LookupOperandIndex(int occurrence_index, HValue* op) {
|
268
|
+
for (int i = 0; i < OperandCount(); ++i) {
|
269
|
+
if (OperandAt(i) == op) {
|
270
|
+
if (occurrence_index == 0) return i;
|
271
|
+
--occurrence_index;
|
272
|
+
}
|
273
|
+
}
|
274
|
+
return -1;
|
275
|
+
}
|
276
|
+
|
277
|
+
|
278
|
+
bool HValue::IsDefinedAfter(HBasicBlock* other) const {
|
279
|
+
return block()->block_id() > other->block_id();
|
280
|
+
}
|
281
|
+
|
282
|
+
|
283
|
+
bool HValue::UsesMultipleTimes(HValue* op) {
|
284
|
+
bool seen = false;
|
285
|
+
for (int i = 0; i < OperandCount(); ++i) {
|
286
|
+
if (OperandAt(i) == op) {
|
287
|
+
if (seen) return true;
|
288
|
+
seen = true;
|
289
|
+
}
|
290
|
+
}
|
291
|
+
return false;
|
292
|
+
}
|
293
|
+
|
294
|
+
|
295
|
+
bool HValue::Equals(HValue* other) {
|
296
|
+
if (other->opcode() != opcode()) return false;
|
297
|
+
if (!other->representation().Equals(representation())) return false;
|
298
|
+
if (!other->type_.Equals(type_)) return false;
|
299
|
+
if (other->flags() != flags()) return false;
|
300
|
+
if (OperandCount() != other->OperandCount()) return false;
|
301
|
+
for (int i = 0; i < OperandCount(); ++i) {
|
302
|
+
if (OperandAt(i)->id() != other->OperandAt(i)->id()) return false;
|
303
|
+
}
|
304
|
+
bool result = DataEquals(other);
|
305
|
+
ASSERT(!result || Hashcode() == other->Hashcode());
|
306
|
+
return result;
|
307
|
+
}
|
308
|
+
|
309
|
+
|
310
|
+
intptr_t HValue::Hashcode() {
|
311
|
+
intptr_t result = opcode();
|
312
|
+
int count = OperandCount();
|
313
|
+
for (int i = 0; i < count; ++i) {
|
314
|
+
result = result * 19 + OperandAt(i)->id() + (result >> 7);
|
315
|
+
}
|
316
|
+
return result;
|
317
|
+
}
|
318
|
+
|
319
|
+
|
320
|
+
void HValue::SetOperandAt(int index, HValue* value) {
|
321
|
+
ASSERT(value == NULL || !value->representation().IsNone());
|
322
|
+
RegisterUse(index, value);
|
323
|
+
InternalSetOperandAt(index, value);
|
324
|
+
}
|
325
|
+
|
326
|
+
|
327
|
+
void HValue::ReplaceAndDelete(HValue* other) {
|
328
|
+
if (other != NULL) ReplaceValue(other);
|
329
|
+
Delete();
|
330
|
+
}
|
331
|
+
|
332
|
+
|
333
|
+
void HValue::ReplaceValue(HValue* other) {
|
334
|
+
for (int i = 0; i < uses_.length(); ++i) {
|
335
|
+
HValue* use = uses_[i];
|
336
|
+
ASSERT(!use->block()->IsStartBlock());
|
337
|
+
InternalReplaceAtUse(use, other);
|
338
|
+
other->uses_.Add(use);
|
339
|
+
}
|
340
|
+
uses_.Rewind(0);
|
341
|
+
}
|
342
|
+
|
343
|
+
|
344
|
+
void HValue::ClearOperands() {
|
345
|
+
for (int i = 0; i < OperandCount(); ++i) {
|
346
|
+
SetOperandAt(i, NULL);
|
347
|
+
}
|
348
|
+
}
|
349
|
+
|
350
|
+
|
351
|
+
void HValue::Delete() {
|
352
|
+
ASSERT(HasNoUses());
|
353
|
+
ClearOperands();
|
354
|
+
DeleteFromGraph();
|
355
|
+
}
|
356
|
+
|
357
|
+
|
358
|
+
void HValue::ReplaceAtUse(HValue* use, HValue* other) {
|
359
|
+
for (int i = 0; i < use->OperandCount(); ++i) {
|
360
|
+
if (use->OperandAt(i) == this) {
|
361
|
+
use->SetOperandAt(i, other);
|
362
|
+
}
|
363
|
+
}
|
364
|
+
}
|
365
|
+
|
366
|
+
|
367
|
+
void HValue::ReplaceFirstAtUse(HValue* use, HValue* other, Representation r) {
|
368
|
+
for (int i = 0; i < use->OperandCount(); ++i) {
|
369
|
+
if (use->RequiredInputRepresentation(i).Equals(r) &&
|
370
|
+
use->OperandAt(i) == this) {
|
371
|
+
use->SetOperandAt(i, other);
|
372
|
+
return;
|
373
|
+
}
|
374
|
+
}
|
375
|
+
}
|
376
|
+
|
377
|
+
|
378
|
+
void HValue::InternalReplaceAtUse(HValue* use, HValue* other) {
|
379
|
+
for (int i = 0; i < use->OperandCount(); ++i) {
|
380
|
+
if (use->OperandAt(i) == this) {
|
381
|
+
// Call internal method that does not update use lists. The caller is
|
382
|
+
// responsible for doing so.
|
383
|
+
use->InternalSetOperandAt(i, other);
|
384
|
+
}
|
385
|
+
}
|
386
|
+
}
|
387
|
+
|
388
|
+
|
389
|
+
void HValue::SetBlock(HBasicBlock* block) {
|
390
|
+
ASSERT(block_ == NULL || block == NULL);
|
391
|
+
block_ = block;
|
392
|
+
if (id_ == kNoNumber && block != NULL) {
|
393
|
+
id_ = block->graph()->GetNextValueID(this);
|
394
|
+
}
|
395
|
+
}
|
396
|
+
|
397
|
+
|
398
|
+
void HValue::PrintTypeTo(HType type, StringStream* stream) {
|
399
|
+
stream->Add(type.ToShortString());
|
400
|
+
}
|
401
|
+
|
402
|
+
|
403
|
+
void HValue::PrintNameTo(StringStream* stream) {
|
404
|
+
stream->Add("%s%d", representation_.Mnemonic(), id());
|
405
|
+
}
|
406
|
+
|
407
|
+
|
408
|
+
bool HValue::UpdateInferredType() {
|
409
|
+
HType type = CalculateInferredType();
|
410
|
+
bool result = (!type.Equals(type_));
|
411
|
+
type_ = type;
|
412
|
+
return result;
|
413
|
+
}
|
414
|
+
|
415
|
+
|
416
|
+
void HValue::RegisterUse(int index, HValue* new_value) {
|
417
|
+
HValue* old_value = OperandAt(index);
|
418
|
+
if (old_value == new_value) return;
|
419
|
+
if (old_value != NULL) old_value->uses_.RemoveElement(this);
|
420
|
+
if (new_value != NULL) {
|
421
|
+
new_value->uses_.Add(this);
|
422
|
+
}
|
423
|
+
}
|
424
|
+
|
425
|
+
|
426
|
+
void HValue::AddNewRange(Range* r) {
|
427
|
+
if (!HasRange()) ComputeInitialRange();
|
428
|
+
if (!HasRange()) range_ = new Range();
|
429
|
+
ASSERT(HasRange());
|
430
|
+
r->StackUpon(range_);
|
431
|
+
range_ = r;
|
432
|
+
}
|
433
|
+
|
434
|
+
|
435
|
+
void HValue::RemoveLastAddedRange() {
|
436
|
+
ASSERT(HasRange());
|
437
|
+
ASSERT(range_->next() != NULL);
|
438
|
+
range_ = range_->next();
|
439
|
+
}
|
440
|
+
|
441
|
+
|
442
|
+
void HValue::ComputeInitialRange() {
|
443
|
+
ASSERT(!HasRange());
|
444
|
+
range_ = InferRange();
|
445
|
+
ASSERT(HasRange());
|
446
|
+
}
|
447
|
+
|
448
|
+
|
449
|
+
void HInstruction::PrintTo(StringStream* stream) {
|
450
|
+
stream->Add("%s", Mnemonic());
|
451
|
+
if (HasSideEffects()) stream->Add("*");
|
452
|
+
stream->Add(" ");
|
453
|
+
PrintDataTo(stream);
|
454
|
+
|
455
|
+
if (range() != NULL &&
|
456
|
+
!range()->IsMostGeneric() &&
|
457
|
+
!range()->CanBeMinusZero()) {
|
458
|
+
stream->Add(" range[%d,%d,m0=%d]",
|
459
|
+
range()->lower(),
|
460
|
+
range()->upper(),
|
461
|
+
static_cast<int>(range()->CanBeMinusZero()));
|
462
|
+
}
|
463
|
+
|
464
|
+
int changes_flags = (flags() & HValue::ChangesFlagsMask());
|
465
|
+
if (changes_flags != 0) {
|
466
|
+
stream->Add(" changes[0x%x]", changes_flags);
|
467
|
+
}
|
468
|
+
|
469
|
+
if (representation().IsTagged() && !type().Equals(HType::Tagged())) {
|
470
|
+
stream->Add(" type[%s]", type().ToString());
|
471
|
+
}
|
472
|
+
}
|
473
|
+
|
474
|
+
|
475
|
+
void HInstruction::Unlink() {
|
476
|
+
ASSERT(IsLinked());
|
477
|
+
ASSERT(!IsControlInstruction()); // Must never move control instructions.
|
478
|
+
ASSERT(!IsBlockEntry()); // Doesn't make sense to delete these.
|
479
|
+
ASSERT(previous_ != NULL);
|
480
|
+
previous_->next_ = next_;
|
481
|
+
if (next_ == NULL) {
|
482
|
+
ASSERT(block()->last() == this);
|
483
|
+
block()->set_last(previous_);
|
484
|
+
} else {
|
485
|
+
next_->previous_ = previous_;
|
486
|
+
}
|
487
|
+
clear_block();
|
488
|
+
}
|
489
|
+
|
490
|
+
|
491
|
+
void HInstruction::InsertBefore(HInstruction* next) {
|
492
|
+
ASSERT(!IsLinked());
|
493
|
+
ASSERT(!next->IsBlockEntry());
|
494
|
+
ASSERT(!IsControlInstruction());
|
495
|
+
ASSERT(!next->block()->IsStartBlock());
|
496
|
+
ASSERT(next->previous_ != NULL);
|
497
|
+
HInstruction* prev = next->previous();
|
498
|
+
prev->next_ = this;
|
499
|
+
next->previous_ = this;
|
500
|
+
next_ = next;
|
501
|
+
previous_ = prev;
|
502
|
+
SetBlock(next->block());
|
503
|
+
}
|
504
|
+
|
505
|
+
|
506
|
+
void HInstruction::InsertAfter(HInstruction* previous) {
|
507
|
+
ASSERT(!IsLinked());
|
508
|
+
ASSERT(!previous->IsControlInstruction());
|
509
|
+
ASSERT(!IsControlInstruction() || previous->next_ == NULL);
|
510
|
+
HBasicBlock* block = previous->block();
|
511
|
+
// Never insert anything except constants into the start block after finishing
|
512
|
+
// it.
|
513
|
+
if (block->IsStartBlock() && block->IsFinished() && !IsConstant()) {
|
514
|
+
ASSERT(block->end()->SecondSuccessor() == NULL);
|
515
|
+
InsertAfter(block->end()->FirstSuccessor()->first());
|
516
|
+
return;
|
517
|
+
}
|
518
|
+
|
519
|
+
// If we're inserting after an instruction with side-effects that is
|
520
|
+
// followed by a simulate instruction, we need to insert after the
|
521
|
+
// simulate instruction instead.
|
522
|
+
HInstruction* next = previous->next_;
|
523
|
+
if (previous->HasSideEffects() && next != NULL) {
|
524
|
+
ASSERT(next->IsSimulate());
|
525
|
+
previous = next;
|
526
|
+
next = previous->next_;
|
527
|
+
}
|
528
|
+
|
529
|
+
previous_ = previous;
|
530
|
+
next_ = next;
|
531
|
+
SetBlock(block);
|
532
|
+
previous->next_ = this;
|
533
|
+
if (next != NULL) next->previous_ = this;
|
534
|
+
}
|
535
|
+
|
536
|
+
|
537
|
+
#ifdef DEBUG
|
538
|
+
void HInstruction::Verify() {
|
539
|
+
// Verify that input operands are defined before use.
|
540
|
+
HBasicBlock* cur_block = block();
|
541
|
+
for (int i = 0; i < OperandCount(); ++i) {
|
542
|
+
HValue* other_operand = OperandAt(i);
|
543
|
+
HBasicBlock* other_block = other_operand->block();
|
544
|
+
if (cur_block == other_block) {
|
545
|
+
if (!other_operand->IsPhi()) {
|
546
|
+
HInstruction* cur = cur_block->first();
|
547
|
+
while (cur != NULL) {
|
548
|
+
ASSERT(cur != this); // We should reach other_operand before!
|
549
|
+
if (cur == other_operand) break;
|
550
|
+
cur = cur->next();
|
551
|
+
}
|
552
|
+
// Must reach other operand in the same block!
|
553
|
+
ASSERT(cur == other_operand);
|
554
|
+
}
|
555
|
+
} else {
|
556
|
+
ASSERT(other_block->Dominates(cur_block));
|
557
|
+
}
|
558
|
+
}
|
559
|
+
|
560
|
+
// Verify that instructions that may have side-effects are followed
|
561
|
+
// by a simulate instruction.
|
562
|
+
if (HasSideEffects() && !IsOsrEntry()) {
|
563
|
+
ASSERT(next()->IsSimulate());
|
564
|
+
}
|
565
|
+
|
566
|
+
// Verify that instructions that can be eliminated by GVN have overridden
|
567
|
+
// HValue::DataEquals. The default implementation is UNREACHABLE. We
|
568
|
+
// don't actually care whether DataEquals returns true or false here.
|
569
|
+
if (CheckFlag(kUseGVN)) DataEquals(this);
|
570
|
+
}
|
571
|
+
#endif
|
572
|
+
|
573
|
+
|
574
|
+
void HUnaryCall::PrintDataTo(StringStream* stream) {
|
575
|
+
value()->PrintNameTo(stream);
|
576
|
+
stream->Add(" ");
|
577
|
+
stream->Add("#%d", argument_count());
|
578
|
+
}
|
579
|
+
|
580
|
+
|
581
|
+
void HBinaryCall::PrintDataTo(StringStream* stream) {
|
582
|
+
first()->PrintNameTo(stream);
|
583
|
+
stream->Add(" ");
|
584
|
+
second()->PrintNameTo(stream);
|
585
|
+
stream->Add(" ");
|
586
|
+
stream->Add("#%d", argument_count());
|
587
|
+
}
|
588
|
+
|
589
|
+
|
590
|
+
void HCallConstantFunction::PrintDataTo(StringStream* stream) {
|
591
|
+
if (IsApplyFunction()) {
|
592
|
+
stream->Add("optimized apply ");
|
593
|
+
} else {
|
594
|
+
stream->Add("%o ", function()->shared()->DebugName());
|
595
|
+
}
|
596
|
+
stream->Add("#%d", argument_count());
|
597
|
+
}
|
598
|
+
|
599
|
+
|
600
|
+
void HCallNamed::PrintDataTo(StringStream* stream) {
|
601
|
+
stream->Add("%o ", *name());
|
602
|
+
HUnaryCall::PrintDataTo(stream);
|
603
|
+
}
|
604
|
+
|
605
|
+
|
606
|
+
void HCallGlobal::PrintDataTo(StringStream* stream) {
|
607
|
+
stream->Add("%o ", *name());
|
608
|
+
HUnaryCall::PrintDataTo(stream);
|
609
|
+
}
|
610
|
+
|
611
|
+
|
612
|
+
void HCallKnownGlobal::PrintDataTo(StringStream* stream) {
|
613
|
+
stream->Add("o ", target()->shared()->DebugName());
|
614
|
+
stream->Add("#%d", argument_count());
|
615
|
+
}
|
616
|
+
|
617
|
+
|
618
|
+
void HCallRuntime::PrintDataTo(StringStream* stream) {
|
619
|
+
stream->Add("%o ", *name());
|
620
|
+
stream->Add("#%d", argument_count());
|
621
|
+
}
|
622
|
+
|
623
|
+
|
624
|
+
void HClassOfTest::PrintDataTo(StringStream* stream) {
|
625
|
+
stream->Add("class_of_test(");
|
626
|
+
value()->PrintNameTo(stream);
|
627
|
+
stream->Add(", \"%o\")", *class_name());
|
628
|
+
}
|
629
|
+
|
630
|
+
|
631
|
+
void HAccessArgumentsAt::PrintDataTo(StringStream* stream) {
|
632
|
+
arguments()->PrintNameTo(stream);
|
633
|
+
stream->Add("[");
|
634
|
+
index()->PrintNameTo(stream);
|
635
|
+
stream->Add("], length ");
|
636
|
+
length()->PrintNameTo(stream);
|
637
|
+
}
|
638
|
+
|
639
|
+
|
640
|
+
void HControlInstruction::PrintDataTo(StringStream* stream) {
|
641
|
+
if (FirstSuccessor() != NULL) {
|
642
|
+
int first_id = FirstSuccessor()->block_id();
|
643
|
+
if (SecondSuccessor() == NULL) {
|
644
|
+
stream->Add(" B%d", first_id);
|
645
|
+
} else {
|
646
|
+
int second_id = SecondSuccessor()->block_id();
|
647
|
+
stream->Add(" goto (B%d, B%d)", first_id, second_id);
|
648
|
+
}
|
649
|
+
}
|
650
|
+
}
|
651
|
+
|
652
|
+
|
653
|
+
void HUnaryControlInstruction::PrintDataTo(StringStream* stream) {
|
654
|
+
value()->PrintNameTo(stream);
|
655
|
+
HControlInstruction::PrintDataTo(stream);
|
656
|
+
}
|
657
|
+
|
658
|
+
|
659
|
+
void HCompareMap::PrintDataTo(StringStream* stream) {
|
660
|
+
value()->PrintNameTo(stream);
|
661
|
+
stream->Add(" (%p)", *map());
|
662
|
+
HControlInstruction::PrintDataTo(stream);
|
663
|
+
}
|
664
|
+
|
665
|
+
|
666
|
+
const char* HUnaryMathOperation::OpName() const {
|
667
|
+
switch (op()) {
|
668
|
+
case kMathFloor: return "floor";
|
669
|
+
case kMathRound: return "round";
|
670
|
+
case kMathCeil: return "ceil";
|
671
|
+
case kMathAbs: return "abs";
|
672
|
+
case kMathLog: return "log";
|
673
|
+
case kMathSin: return "sin";
|
674
|
+
case kMathCos: return "cos";
|
675
|
+
case kMathTan: return "tan";
|
676
|
+
case kMathASin: return "asin";
|
677
|
+
case kMathACos: return "acos";
|
678
|
+
case kMathATan: return "atan";
|
679
|
+
case kMathExp: return "exp";
|
680
|
+
case kMathSqrt: return "sqrt";
|
681
|
+
default: break;
|
682
|
+
}
|
683
|
+
return "(unknown operation)";
|
684
|
+
}
|
685
|
+
|
686
|
+
|
687
|
+
void HUnaryMathOperation::PrintDataTo(StringStream* stream) {
|
688
|
+
const char* name = OpName();
|
689
|
+
stream->Add("%s ", name);
|
690
|
+
value()->PrintNameTo(stream);
|
691
|
+
}
|
692
|
+
|
693
|
+
|
694
|
+
void HUnaryOperation::PrintDataTo(StringStream* stream) {
|
695
|
+
value()->PrintNameTo(stream);
|
696
|
+
}
|
697
|
+
|
698
|
+
|
699
|
+
void HHasInstanceType::PrintDataTo(StringStream* stream) {
|
700
|
+
value()->PrintNameTo(stream);
|
701
|
+
switch (from_) {
|
702
|
+
case FIRST_JS_OBJECT_TYPE:
|
703
|
+
if (to_ == LAST_TYPE) stream->Add(" spec_object");
|
704
|
+
break;
|
705
|
+
case JS_REGEXP_TYPE:
|
706
|
+
if (to_ == JS_REGEXP_TYPE) stream->Add(" reg_exp");
|
707
|
+
break;
|
708
|
+
case JS_ARRAY_TYPE:
|
709
|
+
if (to_ == JS_ARRAY_TYPE) stream->Add(" array");
|
710
|
+
break;
|
711
|
+
case JS_FUNCTION_TYPE:
|
712
|
+
if (to_ == JS_FUNCTION_TYPE) stream->Add(" function");
|
713
|
+
break;
|
714
|
+
default:
|
715
|
+
break;
|
716
|
+
}
|
717
|
+
}
|
718
|
+
|
719
|
+
|
720
|
+
void HTypeofIs::PrintDataTo(StringStream* stream) {
|
721
|
+
value()->PrintNameTo(stream);
|
722
|
+
stream->Add(" == ");
|
723
|
+
stream->Add(type_literal_->ToAsciiVector());
|
724
|
+
}
|
725
|
+
|
726
|
+
|
727
|
+
void HChange::PrintDataTo(StringStream* stream) {
|
728
|
+
HUnaryOperation::PrintDataTo(stream);
|
729
|
+
stream->Add(" %s to %s", from_.Mnemonic(), to().Mnemonic());
|
730
|
+
|
731
|
+
if (CanTruncateToInt32()) stream->Add(" truncating-int32");
|
732
|
+
if (CheckFlag(kBailoutOnMinusZero)) stream->Add(" -0?");
|
733
|
+
}
|
734
|
+
|
735
|
+
|
736
|
+
HCheckInstanceType* HCheckInstanceType::NewIsJSObjectOrJSFunction(
|
737
|
+
HValue* value) {
|
738
|
+
STATIC_ASSERT((LAST_JS_OBJECT_TYPE + 1) == JS_FUNCTION_TYPE);
|
739
|
+
return new HCheckInstanceType(value, FIRST_JS_OBJECT_TYPE, JS_FUNCTION_TYPE);
|
740
|
+
}
|
741
|
+
|
742
|
+
|
743
|
+
void HCheckMap::PrintDataTo(StringStream* stream) {
|
744
|
+
value()->PrintNameTo(stream);
|
745
|
+
stream->Add(" %p", *map());
|
746
|
+
}
|
747
|
+
|
748
|
+
|
749
|
+
void HCheckFunction::PrintDataTo(StringStream* stream) {
|
750
|
+
value()->PrintNameTo(stream);
|
751
|
+
stream->Add(" %p", *target());
|
752
|
+
}
|
753
|
+
|
754
|
+
|
755
|
+
void HCallStub::PrintDataTo(StringStream* stream) {
|
756
|
+
stream->Add("%s ",
|
757
|
+
CodeStub::MajorName(major_key_, false));
|
758
|
+
HUnaryCall::PrintDataTo(stream);
|
759
|
+
}
|
760
|
+
|
761
|
+
|
762
|
+
void HInstanceOf::PrintDataTo(StringStream* stream) {
|
763
|
+
left()->PrintNameTo(stream);
|
764
|
+
stream->Add(" ");
|
765
|
+
right()->PrintNameTo(stream);
|
766
|
+
stream->Add(" ");
|
767
|
+
context()->PrintNameTo(stream);
|
768
|
+
}
|
769
|
+
|
770
|
+
|
771
|
+
Range* HValue::InferRange() {
|
772
|
+
if (representation().IsTagged()) {
|
773
|
+
// Tagged values are always in int32 range when converted to integer,
|
774
|
+
// but they can contain -0.
|
775
|
+
Range* result = new Range();
|
776
|
+
result->set_can_be_minus_zero(true);
|
777
|
+
return result;
|
778
|
+
} else if (representation().IsNone()) {
|
779
|
+
return NULL;
|
780
|
+
} else {
|
781
|
+
// Untagged integer32 cannot be -0 and we don't compute ranges for
|
782
|
+
// untagged doubles.
|
783
|
+
return new Range();
|
784
|
+
}
|
785
|
+
}
|
786
|
+
|
787
|
+
|
788
|
+
Range* HConstant::InferRange() {
|
789
|
+
if (has_int32_value_) {
|
790
|
+
Range* result = new Range(int32_value_, int32_value_);
|
791
|
+
result->set_can_be_minus_zero(false);
|
792
|
+
return result;
|
793
|
+
}
|
794
|
+
return HValue::InferRange();
|
795
|
+
}
|
796
|
+
|
797
|
+
|
798
|
+
Range* HPhi::InferRange() {
|
799
|
+
if (representation().IsInteger32()) {
|
800
|
+
if (block()->IsLoopHeader()) {
|
801
|
+
Range* range = new Range(kMinInt, kMaxInt);
|
802
|
+
return range;
|
803
|
+
} else {
|
804
|
+
Range* range = OperandAt(0)->range()->Copy();
|
805
|
+
for (int i = 1; i < OperandCount(); ++i) {
|
806
|
+
range->Union(OperandAt(i)->range());
|
807
|
+
}
|
808
|
+
return range;
|
809
|
+
}
|
810
|
+
} else {
|
811
|
+
return HValue::InferRange();
|
812
|
+
}
|
813
|
+
}
|
814
|
+
|
815
|
+
|
816
|
+
Range* HAdd::InferRange() {
|
817
|
+
if (representation().IsInteger32()) {
|
818
|
+
Range* a = left()->range();
|
819
|
+
Range* b = right()->range();
|
820
|
+
Range* res = a->Copy();
|
821
|
+
if (!res->AddAndCheckOverflow(b)) {
|
822
|
+
ClearFlag(kCanOverflow);
|
823
|
+
}
|
824
|
+
bool m0 = a->CanBeMinusZero() && b->CanBeMinusZero();
|
825
|
+
res->set_can_be_minus_zero(m0);
|
826
|
+
return res;
|
827
|
+
} else {
|
828
|
+
return HValue::InferRange();
|
829
|
+
}
|
830
|
+
}
|
831
|
+
|
832
|
+
|
833
|
+
Range* HSub::InferRange() {
|
834
|
+
if (representation().IsInteger32()) {
|
835
|
+
Range* a = left()->range();
|
836
|
+
Range* b = right()->range();
|
837
|
+
Range* res = a->Copy();
|
838
|
+
if (!res->SubAndCheckOverflow(b)) {
|
839
|
+
ClearFlag(kCanOverflow);
|
840
|
+
}
|
841
|
+
res->set_can_be_minus_zero(a->CanBeMinusZero() && b->CanBeZero());
|
842
|
+
return res;
|
843
|
+
} else {
|
844
|
+
return HValue::InferRange();
|
845
|
+
}
|
846
|
+
}
|
847
|
+
|
848
|
+
|
849
|
+
Range* HMul::InferRange() {
|
850
|
+
if (representation().IsInteger32()) {
|
851
|
+
Range* a = left()->range();
|
852
|
+
Range* b = right()->range();
|
853
|
+
Range* res = a->Copy();
|
854
|
+
if (!res->MulAndCheckOverflow(b)) {
|
855
|
+
ClearFlag(kCanOverflow);
|
856
|
+
}
|
857
|
+
bool m0 = (a->CanBeZero() && b->CanBeNegative()) ||
|
858
|
+
(a->CanBeNegative() && b->CanBeZero());
|
859
|
+
res->set_can_be_minus_zero(m0);
|
860
|
+
return res;
|
861
|
+
} else {
|
862
|
+
return HValue::InferRange();
|
863
|
+
}
|
864
|
+
}
|
865
|
+
|
866
|
+
|
867
|
+
Range* HDiv::InferRange() {
|
868
|
+
if (representation().IsInteger32()) {
|
869
|
+
Range* result = new Range();
|
870
|
+
if (left()->range()->CanBeMinusZero()) {
|
871
|
+
result->set_can_be_minus_zero(true);
|
872
|
+
}
|
873
|
+
|
874
|
+
if (left()->range()->CanBeZero() && right()->range()->CanBeNegative()) {
|
875
|
+
result->set_can_be_minus_zero(true);
|
876
|
+
}
|
877
|
+
|
878
|
+
if (right()->range()->Includes(-1) && left()->range()->Includes(kMinInt)) {
|
879
|
+
SetFlag(HValue::kCanOverflow);
|
880
|
+
}
|
881
|
+
|
882
|
+
if (!right()->range()->CanBeZero()) {
|
883
|
+
ClearFlag(HValue::kCanBeDivByZero);
|
884
|
+
}
|
885
|
+
return result;
|
886
|
+
} else {
|
887
|
+
return HValue::InferRange();
|
888
|
+
}
|
889
|
+
}
|
890
|
+
|
891
|
+
|
892
|
+
Range* HMod::InferRange() {
|
893
|
+
if (representation().IsInteger32()) {
|
894
|
+
Range* a = left()->range();
|
895
|
+
Range* result = new Range();
|
896
|
+
if (a->CanBeMinusZero() || a->CanBeNegative()) {
|
897
|
+
result->set_can_be_minus_zero(true);
|
898
|
+
}
|
899
|
+
if (!right()->range()->CanBeZero()) {
|
900
|
+
ClearFlag(HValue::kCanBeDivByZero);
|
901
|
+
}
|
902
|
+
return result;
|
903
|
+
} else {
|
904
|
+
return HValue::InferRange();
|
905
|
+
}
|
906
|
+
}
|
907
|
+
|
908
|
+
|
909
|
+
void HPhi::PrintTo(StringStream* stream) {
|
910
|
+
stream->Add("[");
|
911
|
+
for (int i = 0; i < OperandCount(); ++i) {
|
912
|
+
HValue* value = OperandAt(i);
|
913
|
+
stream->Add(" ");
|
914
|
+
value->PrintNameTo(stream);
|
915
|
+
stream->Add(" ");
|
916
|
+
}
|
917
|
+
stream->Add(" uses%d_%di_%dd_%dt]",
|
918
|
+
uses()->length(),
|
919
|
+
int32_non_phi_uses() + int32_indirect_uses(),
|
920
|
+
double_non_phi_uses() + double_indirect_uses(),
|
921
|
+
tagged_non_phi_uses() + tagged_indirect_uses());
|
922
|
+
}
|
923
|
+
|
924
|
+
|
925
|
+
void HPhi::AddInput(HValue* value) {
|
926
|
+
inputs_.Add(NULL);
|
927
|
+
SetOperandAt(OperandCount() - 1, value);
|
928
|
+
// Mark phis that may have 'arguments' directly or indirectly as an operand.
|
929
|
+
if (!CheckFlag(kIsArguments) && value->CheckFlag(kIsArguments)) {
|
930
|
+
SetFlag(kIsArguments);
|
931
|
+
}
|
932
|
+
}
|
933
|
+
|
934
|
+
|
935
|
+
bool HPhi::HasRealUses() {
|
936
|
+
for (int i = 0; i < uses()->length(); i++) {
|
937
|
+
if (!uses()->at(i)->IsPhi()) return true;
|
938
|
+
}
|
939
|
+
return false;
|
940
|
+
}
|
941
|
+
|
942
|
+
|
943
|
+
HValue* HPhi::GetRedundantReplacement() {
|
944
|
+
HValue* candidate = NULL;
|
945
|
+
int count = OperandCount();
|
946
|
+
int position = 0;
|
947
|
+
while (position < count && candidate == NULL) {
|
948
|
+
HValue* current = OperandAt(position++);
|
949
|
+
if (current != this) candidate = current;
|
950
|
+
}
|
951
|
+
while (position < count) {
|
952
|
+
HValue* current = OperandAt(position++);
|
953
|
+
if (current != this && current != candidate) return NULL;
|
954
|
+
}
|
955
|
+
ASSERT(candidate != this);
|
956
|
+
return candidate;
|
957
|
+
}
|
958
|
+
|
959
|
+
|
960
|
+
void HPhi::DeleteFromGraph() {
|
961
|
+
ASSERT(block() != NULL);
|
962
|
+
block()->RemovePhi(this);
|
963
|
+
ASSERT(block() == NULL);
|
964
|
+
}
|
965
|
+
|
966
|
+
|
967
|
+
void HPhi::InitRealUses(int phi_id) {
|
968
|
+
// Initialize real uses.
|
969
|
+
phi_id_ = phi_id;
|
970
|
+
for (int j = 0; j < uses()->length(); j++) {
|
971
|
+
HValue* use = uses()->at(j);
|
972
|
+
if (!use->IsPhi()) {
|
973
|
+
int index = use->LookupOperandIndex(0, this);
|
974
|
+
Representation req_rep = use->RequiredInputRepresentation(index);
|
975
|
+
non_phi_uses_[req_rep.kind()]++;
|
976
|
+
}
|
977
|
+
}
|
978
|
+
}
|
979
|
+
|
980
|
+
|
981
|
+
void HPhi::AddNonPhiUsesFrom(HPhi* other) {
|
982
|
+
for (int i = 0; i < Representation::kNumRepresentations; i++) {
|
983
|
+
indirect_uses_[i] += other->non_phi_uses_[i];
|
984
|
+
}
|
985
|
+
}
|
986
|
+
|
987
|
+
|
988
|
+
void HPhi::AddIndirectUsesTo(int* dest) {
|
989
|
+
for (int i = 0; i < Representation::kNumRepresentations; i++) {
|
990
|
+
dest[i] += indirect_uses_[i];
|
991
|
+
}
|
992
|
+
}
|
993
|
+
|
994
|
+
|
995
|
+
void HSimulate::PrintDataTo(StringStream* stream) {
|
996
|
+
stream->Add("id=%d ", ast_id());
|
997
|
+
if (pop_count_ > 0) stream->Add("pop %d", pop_count_);
|
998
|
+
if (values_.length() > 0) {
|
999
|
+
if (pop_count_ > 0) stream->Add(" /");
|
1000
|
+
for (int i = 0; i < values_.length(); ++i) {
|
1001
|
+
if (!HasAssignedIndexAt(i)) {
|
1002
|
+
stream->Add(" push ");
|
1003
|
+
} else {
|
1004
|
+
stream->Add(" var[%d] = ", GetAssignedIndexAt(i));
|
1005
|
+
}
|
1006
|
+
values_[i]->PrintNameTo(stream);
|
1007
|
+
}
|
1008
|
+
}
|
1009
|
+
}
|
1010
|
+
|
1011
|
+
|
1012
|
+
void HEnterInlined::PrintDataTo(StringStream* stream) {
|
1013
|
+
SmartPointer<char> name = function()->debug_name()->ToCString();
|
1014
|
+
stream->Add("%s, id=%d", *name, function()->id());
|
1015
|
+
}
|
1016
|
+
|
1017
|
+
|
1018
|
+
HConstant::HConstant(Handle<Object> handle, Representation r)
|
1019
|
+
: handle_(handle),
|
1020
|
+
constant_type_(HType::TypeFromValue(handle)),
|
1021
|
+
has_int32_value_(false),
|
1022
|
+
int32_value_(0),
|
1023
|
+
has_double_value_(false),
|
1024
|
+
double_value_(0) {
|
1025
|
+
set_representation(r);
|
1026
|
+
SetFlag(kUseGVN);
|
1027
|
+
if (handle_->IsNumber()) {
|
1028
|
+
double n = handle_->Number();
|
1029
|
+
double roundtrip_value = static_cast<double>(static_cast<int32_t>(n));
|
1030
|
+
has_int32_value_ = BitCast<int64_t>(roundtrip_value) == BitCast<int64_t>(n);
|
1031
|
+
if (has_int32_value_) int32_value_ = static_cast<int32_t>(n);
|
1032
|
+
double_value_ = n;
|
1033
|
+
has_double_value_ = true;
|
1034
|
+
}
|
1035
|
+
}
|
1036
|
+
|
1037
|
+
|
1038
|
+
HConstant* HConstant::CopyToRepresentation(Representation r) const {
|
1039
|
+
if (r.IsInteger32() && !has_int32_value_) return NULL;
|
1040
|
+
if (r.IsDouble() && !has_double_value_) return NULL;
|
1041
|
+
return new HConstant(handle_, r);
|
1042
|
+
}
|
1043
|
+
|
1044
|
+
|
1045
|
+
HConstant* HConstant::CopyToTruncatedInt32() const {
|
1046
|
+
if (!has_double_value_) return NULL;
|
1047
|
+
int32_t truncated = NumberToInt32(*handle_);
|
1048
|
+
return new HConstant(FACTORY->NewNumberFromInt(truncated),
|
1049
|
+
Representation::Integer32());
|
1050
|
+
}
|
1051
|
+
|
1052
|
+
|
1053
|
+
void HConstant::PrintDataTo(StringStream* stream) {
|
1054
|
+
handle()->ShortPrint(stream);
|
1055
|
+
}
|
1056
|
+
|
1057
|
+
|
1058
|
+
bool HArrayLiteral::IsCopyOnWrite() const {
|
1059
|
+
return constant_elements()->map() == HEAP->fixed_cow_array_map();
|
1060
|
+
}
|
1061
|
+
|
1062
|
+
|
1063
|
+
void HBinaryOperation::PrintDataTo(StringStream* stream) {
|
1064
|
+
left()->PrintNameTo(stream);
|
1065
|
+
stream->Add(" ");
|
1066
|
+
right()->PrintNameTo(stream);
|
1067
|
+
if (CheckFlag(kCanOverflow)) stream->Add(" !");
|
1068
|
+
if (CheckFlag(kBailoutOnMinusZero)) stream->Add(" -0?");
|
1069
|
+
}
|
1070
|
+
|
1071
|
+
|
1072
|
+
Range* HBitAnd::InferRange() {
|
1073
|
+
int32_t left_mask = (left()->range() != NULL)
|
1074
|
+
? left()->range()->Mask()
|
1075
|
+
: 0xffffffff;
|
1076
|
+
int32_t right_mask = (right()->range() != NULL)
|
1077
|
+
? right()->range()->Mask()
|
1078
|
+
: 0xffffffff;
|
1079
|
+
int32_t result_mask = left_mask & right_mask;
|
1080
|
+
return (result_mask >= 0)
|
1081
|
+
? new Range(0, result_mask)
|
1082
|
+
: HValue::InferRange();
|
1083
|
+
}
|
1084
|
+
|
1085
|
+
|
1086
|
+
Range* HBitOr::InferRange() {
|
1087
|
+
int32_t left_mask = (left()->range() != NULL)
|
1088
|
+
? left()->range()->Mask()
|
1089
|
+
: 0xffffffff;
|
1090
|
+
int32_t right_mask = (right()->range() != NULL)
|
1091
|
+
? right()->range()->Mask()
|
1092
|
+
: 0xffffffff;
|
1093
|
+
int32_t result_mask = left_mask | right_mask;
|
1094
|
+
return (result_mask >= 0)
|
1095
|
+
? new Range(0, result_mask)
|
1096
|
+
: HValue::InferRange();
|
1097
|
+
}
|
1098
|
+
|
1099
|
+
|
1100
|
+
Range* HSar::InferRange() {
|
1101
|
+
if (right()->IsConstant()) {
|
1102
|
+
HConstant* c = HConstant::cast(right());
|
1103
|
+
if (c->HasInteger32Value()) {
|
1104
|
+
Range* result = (left()->range() != NULL)
|
1105
|
+
? left()->range()->Copy()
|
1106
|
+
: new Range();
|
1107
|
+
result->Sar(c->Integer32Value());
|
1108
|
+
return result;
|
1109
|
+
}
|
1110
|
+
}
|
1111
|
+
return HValue::InferRange();
|
1112
|
+
}
|
1113
|
+
|
1114
|
+
|
1115
|
+
Range* HShl::InferRange() {
|
1116
|
+
if (right()->IsConstant()) {
|
1117
|
+
HConstant* c = HConstant::cast(right());
|
1118
|
+
if (c->HasInteger32Value()) {
|
1119
|
+
Range* result = (left()->range() != NULL)
|
1120
|
+
? left()->range()->Copy()
|
1121
|
+
: new Range();
|
1122
|
+
result->Shl(c->Integer32Value());
|
1123
|
+
return result;
|
1124
|
+
}
|
1125
|
+
}
|
1126
|
+
return HValue::InferRange();
|
1127
|
+
}
|
1128
|
+
|
1129
|
+
|
1130
|
+
|
1131
|
+
void HCompare::PrintDataTo(StringStream* stream) {
|
1132
|
+
stream->Add(Token::Name(token()));
|
1133
|
+
stream->Add(" ");
|
1134
|
+
HBinaryOperation::PrintDataTo(stream);
|
1135
|
+
}
|
1136
|
+
|
1137
|
+
|
1138
|
+
void HCompare::SetInputRepresentation(Representation r) {
|
1139
|
+
input_representation_ = r;
|
1140
|
+
if (r.IsTagged()) {
|
1141
|
+
SetAllSideEffects();
|
1142
|
+
ClearFlag(kUseGVN);
|
1143
|
+
} else {
|
1144
|
+
ClearAllSideEffects();
|
1145
|
+
SetFlag(kUseGVN);
|
1146
|
+
}
|
1147
|
+
}
|
1148
|
+
|
1149
|
+
|
1150
|
+
void HParameter::PrintDataTo(StringStream* stream) {
|
1151
|
+
stream->Add("%u", index());
|
1152
|
+
}
|
1153
|
+
|
1154
|
+
|
1155
|
+
void HLoadNamedField::PrintDataTo(StringStream* stream) {
|
1156
|
+
object()->PrintNameTo(stream);
|
1157
|
+
stream->Add(" @%d%s", offset(), is_in_object() ? "[in-object]" : "");
|
1158
|
+
}
|
1159
|
+
|
1160
|
+
|
1161
|
+
HLoadNamedFieldPolymorphic::HLoadNamedFieldPolymorphic(HValue* object,
|
1162
|
+
ZoneMapList* types,
|
1163
|
+
Handle<String> name)
|
1164
|
+
: HUnaryOperation(object),
|
1165
|
+
types_(Min(types->length(), kMaxLoadPolymorphism)),
|
1166
|
+
name_(name),
|
1167
|
+
need_generic_(false) {
|
1168
|
+
set_representation(Representation::Tagged());
|
1169
|
+
SetFlag(kDependsOnMaps);
|
1170
|
+
for (int i = 0;
|
1171
|
+
i < types->length() && types_.length() < kMaxLoadPolymorphism;
|
1172
|
+
++i) {
|
1173
|
+
Handle<Map> map = types->at(i);
|
1174
|
+
LookupResult lookup;
|
1175
|
+
map->LookupInDescriptors(NULL, *name, &lookup);
|
1176
|
+
if (lookup.IsProperty() && lookup.type() == FIELD) {
|
1177
|
+
types_.Add(types->at(i));
|
1178
|
+
int index = lookup.GetLocalFieldIndexFromMap(*map);
|
1179
|
+
if (index < 0) {
|
1180
|
+
SetFlag(kDependsOnInobjectFields);
|
1181
|
+
} else {
|
1182
|
+
SetFlag(kDependsOnBackingStoreFields);
|
1183
|
+
}
|
1184
|
+
}
|
1185
|
+
}
|
1186
|
+
|
1187
|
+
if (types_.length() == types->length() && FLAG_deoptimize_uncommon_cases) {
|
1188
|
+
SetFlag(kUseGVN);
|
1189
|
+
} else {
|
1190
|
+
SetAllSideEffects();
|
1191
|
+
need_generic_ = true;
|
1192
|
+
}
|
1193
|
+
}
|
1194
|
+
|
1195
|
+
|
1196
|
+
bool HLoadNamedFieldPolymorphic::DataEquals(HValue* value) {
|
1197
|
+
HLoadNamedFieldPolymorphic* other = HLoadNamedFieldPolymorphic::cast(value);
|
1198
|
+
if (types_.length() != other->types()->length()) return false;
|
1199
|
+
if (!name_.is_identical_to(other->name())) return false;
|
1200
|
+
if (need_generic_ != other->need_generic_) return false;
|
1201
|
+
for (int i = 0; i < types_.length(); i++) {
|
1202
|
+
bool found = false;
|
1203
|
+
for (int j = 0; j < types_.length(); j++) {
|
1204
|
+
if (types_.at(j).is_identical_to(other->types()->at(i))) {
|
1205
|
+
found = true;
|
1206
|
+
break;
|
1207
|
+
}
|
1208
|
+
}
|
1209
|
+
if (!found) return false;
|
1210
|
+
}
|
1211
|
+
return true;
|
1212
|
+
}
|
1213
|
+
|
1214
|
+
|
1215
|
+
void HLoadKeyedFastElement::PrintDataTo(StringStream* stream) {
|
1216
|
+
object()->PrintNameTo(stream);
|
1217
|
+
stream->Add("[");
|
1218
|
+
key()->PrintNameTo(stream);
|
1219
|
+
stream->Add("]");
|
1220
|
+
}
|
1221
|
+
|
1222
|
+
|
1223
|
+
void HLoadKeyedGeneric::PrintDataTo(StringStream* stream) {
|
1224
|
+
object()->PrintNameTo(stream);
|
1225
|
+
stream->Add("[");
|
1226
|
+
key()->PrintNameTo(stream);
|
1227
|
+
stream->Add("]");
|
1228
|
+
}
|
1229
|
+
|
1230
|
+
|
1231
|
+
void HLoadKeyedSpecializedArrayElement::PrintDataTo(
|
1232
|
+
StringStream* stream) {
|
1233
|
+
external_pointer()->PrintNameTo(stream);
|
1234
|
+
stream->Add(".");
|
1235
|
+
switch (array_type()) {
|
1236
|
+
case kExternalByteArray:
|
1237
|
+
stream->Add("byte");
|
1238
|
+
break;
|
1239
|
+
case kExternalUnsignedByteArray:
|
1240
|
+
stream->Add("u_byte");
|
1241
|
+
break;
|
1242
|
+
case kExternalShortArray:
|
1243
|
+
stream->Add("short");
|
1244
|
+
break;
|
1245
|
+
case kExternalUnsignedShortArray:
|
1246
|
+
stream->Add("u_short");
|
1247
|
+
break;
|
1248
|
+
case kExternalIntArray:
|
1249
|
+
stream->Add("int");
|
1250
|
+
break;
|
1251
|
+
case kExternalUnsignedIntArray:
|
1252
|
+
stream->Add("u_int");
|
1253
|
+
break;
|
1254
|
+
case kExternalFloatArray:
|
1255
|
+
stream->Add("float");
|
1256
|
+
break;
|
1257
|
+
case kExternalPixelArray:
|
1258
|
+
stream->Add("pixel");
|
1259
|
+
break;
|
1260
|
+
}
|
1261
|
+
stream->Add("[");
|
1262
|
+
key()->PrintNameTo(stream);
|
1263
|
+
stream->Add("]");
|
1264
|
+
}
|
1265
|
+
|
1266
|
+
|
1267
|
+
void HStoreNamedGeneric::PrintDataTo(StringStream* stream) {
|
1268
|
+
object()->PrintNameTo(stream);
|
1269
|
+
stream->Add(".");
|
1270
|
+
ASSERT(name()->IsString());
|
1271
|
+
stream->Add(*String::cast(*name())->ToCString());
|
1272
|
+
stream->Add(" = ");
|
1273
|
+
value()->PrintNameTo(stream);
|
1274
|
+
}
|
1275
|
+
|
1276
|
+
|
1277
|
+
void HStoreNamedField::PrintDataTo(StringStream* stream) {
|
1278
|
+
object()->PrintNameTo(stream);
|
1279
|
+
stream->Add(".");
|
1280
|
+
ASSERT(name()->IsString());
|
1281
|
+
stream->Add(*String::cast(*name())->ToCString());
|
1282
|
+
stream->Add(" = ");
|
1283
|
+
value()->PrintNameTo(stream);
|
1284
|
+
if (!transition().is_null()) {
|
1285
|
+
stream->Add(" (transition map %p)", *transition());
|
1286
|
+
}
|
1287
|
+
}
|
1288
|
+
|
1289
|
+
|
1290
|
+
void HStoreKeyedFastElement::PrintDataTo(StringStream* stream) {
|
1291
|
+
object()->PrintNameTo(stream);
|
1292
|
+
stream->Add("[");
|
1293
|
+
key()->PrintNameTo(stream);
|
1294
|
+
stream->Add("] = ");
|
1295
|
+
value()->PrintNameTo(stream);
|
1296
|
+
}
|
1297
|
+
|
1298
|
+
|
1299
|
+
void HStoreKeyedGeneric::PrintDataTo(StringStream* stream) {
|
1300
|
+
object()->PrintNameTo(stream);
|
1301
|
+
stream->Add("[");
|
1302
|
+
key()->PrintNameTo(stream);
|
1303
|
+
stream->Add("] = ");
|
1304
|
+
value()->PrintNameTo(stream);
|
1305
|
+
}
|
1306
|
+
|
1307
|
+
|
1308
|
+
void HStoreKeyedSpecializedArrayElement::PrintDataTo(
|
1309
|
+
StringStream* stream) {
|
1310
|
+
external_pointer()->PrintNameTo(stream);
|
1311
|
+
stream->Add(".");
|
1312
|
+
switch (array_type()) {
|
1313
|
+
case kExternalByteArray:
|
1314
|
+
stream->Add("byte");
|
1315
|
+
break;
|
1316
|
+
case kExternalUnsignedByteArray:
|
1317
|
+
stream->Add("u_byte");
|
1318
|
+
break;
|
1319
|
+
case kExternalShortArray:
|
1320
|
+
stream->Add("short");
|
1321
|
+
break;
|
1322
|
+
case kExternalUnsignedShortArray:
|
1323
|
+
stream->Add("u_short");
|
1324
|
+
break;
|
1325
|
+
case kExternalIntArray:
|
1326
|
+
stream->Add("int");
|
1327
|
+
break;
|
1328
|
+
case kExternalUnsignedIntArray:
|
1329
|
+
stream->Add("u_int");
|
1330
|
+
break;
|
1331
|
+
case kExternalFloatArray:
|
1332
|
+
stream->Add("float");
|
1333
|
+
break;
|
1334
|
+
case kExternalPixelArray:
|
1335
|
+
stream->Add("pixel");
|
1336
|
+
break;
|
1337
|
+
}
|
1338
|
+
stream->Add("[");
|
1339
|
+
key()->PrintNameTo(stream);
|
1340
|
+
stream->Add("] = ");
|
1341
|
+
value()->PrintNameTo(stream);
|
1342
|
+
}
|
1343
|
+
|
1344
|
+
|
1345
|
+
void HLoadGlobalCell::PrintDataTo(StringStream* stream) {
|
1346
|
+
stream->Add("[%p]", *cell());
|
1347
|
+
if (check_hole_value()) stream->Add(" (deleteable/read-only)");
|
1348
|
+
}
|
1349
|
+
|
1350
|
+
|
1351
|
+
void HLoadGlobalGeneric::PrintDataTo(StringStream* stream) {
|
1352
|
+
stream->Add("%o ", *name());
|
1353
|
+
}
|
1354
|
+
|
1355
|
+
|
1356
|
+
void HStoreGlobalCell::PrintDataTo(StringStream* stream) {
|
1357
|
+
stream->Add("[%p] = ", *cell());
|
1358
|
+
value()->PrintNameTo(stream);
|
1359
|
+
}
|
1360
|
+
|
1361
|
+
|
1362
|
+
void HStoreGlobalGeneric::PrintDataTo(StringStream* stream) {
|
1363
|
+
stream->Add("%o = ", *name());
|
1364
|
+
value()->PrintNameTo(stream);
|
1365
|
+
}
|
1366
|
+
|
1367
|
+
|
1368
|
+
void HLoadContextSlot::PrintDataTo(StringStream* stream) {
|
1369
|
+
value()->PrintNameTo(stream);
|
1370
|
+
stream->Add("[%d]", slot_index());
|
1371
|
+
}
|
1372
|
+
|
1373
|
+
|
1374
|
+
void HStoreContextSlot::PrintDataTo(StringStream* stream) {
|
1375
|
+
context()->PrintNameTo(stream);
|
1376
|
+
stream->Add("[%d] = ", slot_index());
|
1377
|
+
value()->PrintNameTo(stream);
|
1378
|
+
}
|
1379
|
+
|
1380
|
+
|
1381
|
+
// Implementation of type inference and type conversions. Calculates
|
1382
|
+
// the inferred type of this instruction based on the input operands.
|
1383
|
+
|
1384
|
+
HType HValue::CalculateInferredType() {
|
1385
|
+
return type_;
|
1386
|
+
}
|
1387
|
+
|
1388
|
+
|
1389
|
+
HType HCheckMap::CalculateInferredType() {
|
1390
|
+
return value()->type();
|
1391
|
+
}
|
1392
|
+
|
1393
|
+
|
1394
|
+
HType HCheckFunction::CalculateInferredType() {
|
1395
|
+
return value()->type();
|
1396
|
+
}
|
1397
|
+
|
1398
|
+
|
1399
|
+
HType HCheckNonSmi::CalculateInferredType() {
|
1400
|
+
// TODO(kasperl): Is there any way to signal that this isn't a smi?
|
1401
|
+
return HType::Tagged();
|
1402
|
+
}
|
1403
|
+
|
1404
|
+
|
1405
|
+
HType HCheckSmi::CalculateInferredType() {
|
1406
|
+
return HType::Smi();
|
1407
|
+
}
|
1408
|
+
|
1409
|
+
|
1410
|
+
HType HPhi::CalculateInferredType() {
|
1411
|
+
HType result = HType::Uninitialized();
|
1412
|
+
for (int i = 0; i < OperandCount(); ++i) {
|
1413
|
+
HType current = OperandAt(i)->type();
|
1414
|
+
result = result.Combine(current);
|
1415
|
+
}
|
1416
|
+
return result;
|
1417
|
+
}
|
1418
|
+
|
1419
|
+
|
1420
|
+
HType HConstant::CalculateInferredType() {
|
1421
|
+
return constant_type_;
|
1422
|
+
}
|
1423
|
+
|
1424
|
+
|
1425
|
+
HType HCompare::CalculateInferredType() {
|
1426
|
+
return HType::Boolean();
|
1427
|
+
}
|
1428
|
+
|
1429
|
+
|
1430
|
+
HType HCompareJSObjectEq::CalculateInferredType() {
|
1431
|
+
return HType::Boolean();
|
1432
|
+
}
|
1433
|
+
|
1434
|
+
|
1435
|
+
HType HUnaryPredicate::CalculateInferredType() {
|
1436
|
+
return HType::Boolean();
|
1437
|
+
}
|
1438
|
+
|
1439
|
+
|
1440
|
+
HType HBitwiseBinaryOperation::CalculateInferredType() {
|
1441
|
+
return HType::TaggedNumber();
|
1442
|
+
}
|
1443
|
+
|
1444
|
+
|
1445
|
+
HType HArithmeticBinaryOperation::CalculateInferredType() {
|
1446
|
+
return HType::TaggedNumber();
|
1447
|
+
}
|
1448
|
+
|
1449
|
+
|
1450
|
+
HType HAdd::CalculateInferredType() {
|
1451
|
+
return HType::Tagged();
|
1452
|
+
}
|
1453
|
+
|
1454
|
+
|
1455
|
+
HType HBitAnd::CalculateInferredType() {
|
1456
|
+
return HType::TaggedNumber();
|
1457
|
+
}
|
1458
|
+
|
1459
|
+
|
1460
|
+
HType HBitXor::CalculateInferredType() {
|
1461
|
+
return HType::TaggedNumber();
|
1462
|
+
}
|
1463
|
+
|
1464
|
+
|
1465
|
+
HType HBitOr::CalculateInferredType() {
|
1466
|
+
return HType::TaggedNumber();
|
1467
|
+
}
|
1468
|
+
|
1469
|
+
|
1470
|
+
HType HBitNot::CalculateInferredType() {
|
1471
|
+
return HType::TaggedNumber();
|
1472
|
+
}
|
1473
|
+
|
1474
|
+
|
1475
|
+
HType HUnaryMathOperation::CalculateInferredType() {
|
1476
|
+
return HType::TaggedNumber();
|
1477
|
+
}
|
1478
|
+
|
1479
|
+
|
1480
|
+
HType HShl::CalculateInferredType() {
|
1481
|
+
return HType::TaggedNumber();
|
1482
|
+
}
|
1483
|
+
|
1484
|
+
|
1485
|
+
HType HShr::CalculateInferredType() {
|
1486
|
+
return HType::TaggedNumber();
|
1487
|
+
}
|
1488
|
+
|
1489
|
+
|
1490
|
+
HType HSar::CalculateInferredType() {
|
1491
|
+
return HType::TaggedNumber();
|
1492
|
+
}
|
1493
|
+
|
1494
|
+
|
1495
|
+
HValue* HUnaryMathOperation::EnsureAndPropagateNotMinusZero(
|
1496
|
+
BitVector* visited) {
|
1497
|
+
visited->Add(id());
|
1498
|
+
if (representation().IsInteger32() &&
|
1499
|
+
!value()->representation().IsInteger32()) {
|
1500
|
+
if (value()->range() == NULL || value()->range()->CanBeMinusZero()) {
|
1501
|
+
SetFlag(kBailoutOnMinusZero);
|
1502
|
+
}
|
1503
|
+
}
|
1504
|
+
if (RequiredInputRepresentation(0).IsInteger32() &&
|
1505
|
+
representation().IsInteger32()) {
|
1506
|
+
return value();
|
1507
|
+
}
|
1508
|
+
return NULL;
|
1509
|
+
}
|
1510
|
+
|
1511
|
+
|
1512
|
+
|
1513
|
+
HValue* HChange::EnsureAndPropagateNotMinusZero(BitVector* visited) {
|
1514
|
+
visited->Add(id());
|
1515
|
+
if (from().IsInteger32()) return NULL;
|
1516
|
+
if (CanTruncateToInt32()) return NULL;
|
1517
|
+
if (value()->range() == NULL || value()->range()->CanBeMinusZero()) {
|
1518
|
+
SetFlag(kBailoutOnMinusZero);
|
1519
|
+
}
|
1520
|
+
ASSERT(!from().IsInteger32() || !to().IsInteger32());
|
1521
|
+
return NULL;
|
1522
|
+
}
|
1523
|
+
|
1524
|
+
|
1525
|
+
HValue* HMod::EnsureAndPropagateNotMinusZero(BitVector* visited) {
|
1526
|
+
visited->Add(id());
|
1527
|
+
if (range() == NULL || range()->CanBeMinusZero()) {
|
1528
|
+
SetFlag(kBailoutOnMinusZero);
|
1529
|
+
return left();
|
1530
|
+
}
|
1531
|
+
return NULL;
|
1532
|
+
}
|
1533
|
+
|
1534
|
+
|
1535
|
+
HValue* HDiv::EnsureAndPropagateNotMinusZero(BitVector* visited) {
|
1536
|
+
visited->Add(id());
|
1537
|
+
if (range() == NULL || range()->CanBeMinusZero()) {
|
1538
|
+
SetFlag(kBailoutOnMinusZero);
|
1539
|
+
}
|
1540
|
+
return NULL;
|
1541
|
+
}
|
1542
|
+
|
1543
|
+
|
1544
|
+
HValue* HMul::EnsureAndPropagateNotMinusZero(BitVector* visited) {
|
1545
|
+
visited->Add(id());
|
1546
|
+
if (range() == NULL || range()->CanBeMinusZero()) {
|
1547
|
+
SetFlag(kBailoutOnMinusZero);
|
1548
|
+
}
|
1549
|
+
return NULL;
|
1550
|
+
}
|
1551
|
+
|
1552
|
+
|
1553
|
+
HValue* HSub::EnsureAndPropagateNotMinusZero(BitVector* visited) {
|
1554
|
+
visited->Add(id());
|
1555
|
+
// Propagate to the left argument. If the left argument cannot be -0, then
|
1556
|
+
// the result of the add operation cannot be either.
|
1557
|
+
if (range() == NULL || range()->CanBeMinusZero()) {
|
1558
|
+
return left();
|
1559
|
+
}
|
1560
|
+
return NULL;
|
1561
|
+
}
|
1562
|
+
|
1563
|
+
|
1564
|
+
HValue* HAdd::EnsureAndPropagateNotMinusZero(BitVector* visited) {
|
1565
|
+
visited->Add(id());
|
1566
|
+
// Propagate to the left argument. If the left argument cannot be -0, then
|
1567
|
+
// the result of the sub operation cannot be either.
|
1568
|
+
if (range() == NULL || range()->CanBeMinusZero()) {
|
1569
|
+
return left();
|
1570
|
+
}
|
1571
|
+
return NULL;
|
1572
|
+
}
|
1573
|
+
|
1574
|
+
|
1575
|
+
// Node-specific verification code is only included in debug mode.
|
1576
|
+
#ifdef DEBUG
|
1577
|
+
|
1578
|
+
void HPhi::Verify() {
|
1579
|
+
ASSERT(OperandCount() == block()->predecessors()->length());
|
1580
|
+
for (int i = 0; i < OperandCount(); ++i) {
|
1581
|
+
HValue* value = OperandAt(i);
|
1582
|
+
HBasicBlock* defining_block = value->block();
|
1583
|
+
HBasicBlock* predecessor_block = block()->predecessors()->at(i);
|
1584
|
+
ASSERT(defining_block == predecessor_block ||
|
1585
|
+
defining_block->Dominates(predecessor_block));
|
1586
|
+
}
|
1587
|
+
}
|
1588
|
+
|
1589
|
+
|
1590
|
+
void HSimulate::Verify() {
|
1591
|
+
HInstruction::Verify();
|
1592
|
+
ASSERT(HasAstId());
|
1593
|
+
}
|
1594
|
+
|
1595
|
+
|
1596
|
+
void HBoundsCheck::Verify() {
|
1597
|
+
HInstruction::Verify();
|
1598
|
+
ASSERT(HasNoUses());
|
1599
|
+
}
|
1600
|
+
|
1601
|
+
|
1602
|
+
void HCheckSmi::Verify() {
|
1603
|
+
HInstruction::Verify();
|
1604
|
+
ASSERT(HasNoUses());
|
1605
|
+
}
|
1606
|
+
|
1607
|
+
|
1608
|
+
void HCheckNonSmi::Verify() {
|
1609
|
+
HInstruction::Verify();
|
1610
|
+
ASSERT(HasNoUses());
|
1611
|
+
}
|
1612
|
+
|
1613
|
+
|
1614
|
+
void HCheckInstanceType::Verify() {
|
1615
|
+
HInstruction::Verify();
|
1616
|
+
ASSERT(HasNoUses());
|
1617
|
+
}
|
1618
|
+
|
1619
|
+
|
1620
|
+
void HCheckMap::Verify() {
|
1621
|
+
HInstruction::Verify();
|
1622
|
+
ASSERT(HasNoUses());
|
1623
|
+
}
|
1624
|
+
|
1625
|
+
|
1626
|
+
void HCheckFunction::Verify() {
|
1627
|
+
HInstruction::Verify();
|
1628
|
+
ASSERT(HasNoUses());
|
1629
|
+
}
|
1630
|
+
|
1631
|
+
|
1632
|
+
void HCheckPrototypeMaps::Verify() {
|
1633
|
+
HInstruction::Verify();
|
1634
|
+
ASSERT(HasNoUses());
|
1635
|
+
}
|
1636
|
+
|
1637
|
+
#endif
|
1638
|
+
|
1639
|
+
} } // namespace v8::internal
|