therubyracer 0.8.1.pre2 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of therubyracer might be problematic. Click here for more details.
- data/Changelog.md +2 -1
- data/README.md +6 -3
- data/ext/v8/upstream/3.1.8/.gitignore +31 -0
- data/ext/v8/upstream/3.1.8/AUTHORS +40 -0
- data/ext/v8/upstream/3.1.8/ChangeLog +2566 -0
- data/ext/v8/upstream/3.1.8/LICENSE +52 -0
- data/ext/v8/upstream/3.1.8/LICENSE.strongtalk +29 -0
- data/ext/v8/upstream/3.1.8/LICENSE.v8 +26 -0
- data/ext/v8/upstream/3.1.8/LICENSE.valgrind +45 -0
- data/ext/v8/upstream/3.1.8/SConstruct +1192 -0
- data/ext/v8/upstream/3.1.8/build/README.txt +25 -0
- data/ext/v8/upstream/3.1.8/build/all.gyp +18 -0
- data/ext/v8/upstream/3.1.8/build/armu.gypi +32 -0
- data/ext/v8/upstream/3.1.8/build/common.gypi +82 -0
- data/ext/v8/upstream/3.1.8/build/gyp_v8 +145 -0
- data/ext/v8/upstream/3.1.8/include/v8-debug.h +384 -0
- data/ext/v8/upstream/3.1.8/include/v8-preparser.h +116 -0
- data/ext/v8/upstream/3.1.8/include/v8-profiler.h +426 -0
- data/ext/v8/upstream/3.1.8/include/v8-testing.h +99 -0
- data/ext/v8/upstream/3.1.8/include/v8.h +3846 -0
- data/ext/v8/upstream/3.1.8/include/v8stdint.h +53 -0
- data/ext/v8/upstream/3.1.8/preparser/preparser-process.cc +206 -0
- data/ext/v8/upstream/3.1.8/src/SConscript +356 -0
- data/ext/v8/upstream/3.1.8/src/accessors.cc +907 -0
- data/ext/v8/upstream/3.1.8/src/accessors.h +121 -0
- data/ext/v8/upstream/3.1.8/src/allocation.cc +204 -0
- data/ext/v8/upstream/3.1.8/src/allocation.h +176 -0
- data/ext/v8/upstream/3.1.8/src/api.cc +5191 -0
- data/ext/v8/upstream/3.1.8/src/api.h +508 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/apinatives.js +0 -0
- data/ext/v8/upstream/3.1.8/src/apiutils.h +80 -0
- data/ext/v8/upstream/3.1.8/src/arguments.h +105 -0
- data/ext/v8/upstream/3.1.8/src/arm/assembler-arm-inl.h +352 -0
- data/ext/v8/upstream/3.1.8/src/arm/assembler-arm.cc +2756 -0
- data/ext/v8/upstream/3.1.8/src/arm/assembler-arm.h +1294 -0
- data/ext/v8/upstream/3.1.8/src/arm/builtins-arm.cc +1628 -0
- data/ext/v8/upstream/3.1.8/src/arm/code-stubs-arm.cc +6783 -0
- data/ext/v8/upstream/3.1.8/src/arm/code-stubs-arm.h +657 -0
- data/ext/v8/upstream/3.1.8/src/arm/codegen-arm-inl.h +48 -0
- data/ext/v8/upstream/3.1.8/src/arm/codegen-arm.cc +7403 -0
- data/ext/v8/upstream/3.1.8/src/arm/codegen-arm.h +595 -0
- data/ext/v8/upstream/3.1.8/src/arm/constants-arm.cc +152 -0
- data/ext/v8/upstream/3.1.8/src/arm/constants-arm.h +769 -0
- data/ext/v8/upstream/3.1.8/src/arm/cpu-arm.cc +147 -0
- data/ext/v8/upstream/3.1.8/src/arm/debug-arm.cc +315 -0
- data/ext/v8/upstream/3.1.8/src/arm/deoptimizer-arm.cc +700 -0
- data/ext/v8/upstream/3.1.8/src/arm/disasm-arm.cc +1439 -0
- data/ext/v8/upstream/3.1.8/src/arm/frames-arm.cc +45 -0
- data/ext/v8/upstream/3.1.8/src/arm/frames-arm.h +168 -0
- data/ext/v8/upstream/3.1.8/src/arm/full-codegen-arm.cc +4230 -0
- data/ext/v8/upstream/3.1.8/src/arm/ic-arm.cc +1799 -0
- data/ext/v8/upstream/3.1.8/src/arm/jump-target-arm.cc +174 -0
- data/ext/v8/upstream/3.1.8/src/arm/lithium-arm.cc +2041 -0
- data/ext/v8/upstream/3.1.8/src/arm/lithium-arm.h +2046 -0
- data/ext/v8/upstream/3.1.8/src/arm/lithium-codegen-arm.cc +3822 -0
- data/ext/v8/upstream/3.1.8/src/arm/lithium-codegen-arm.h +312 -0
- data/ext/v8/upstream/3.1.8/src/arm/lithium-gap-resolver-arm.cc +303 -0
- data/ext/v8/upstream/3.1.8/src/arm/lithium-gap-resolver-arm.h +84 -0
- data/ext/v8/upstream/3.1.8/src/arm/macro-assembler-arm.cc +2701 -0
- data/ext/v8/upstream/3.1.8/src/arm/macro-assembler-arm.h +1015 -0
- data/ext/v8/upstream/3.1.8/src/arm/regexp-macro-assembler-arm.cc +1280 -0
- data/ext/v8/upstream/3.1.8/src/arm/regexp-macro-assembler-arm.h +252 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm.h +0 -0
- data/ext/v8/upstream/3.1.8/src/arm/simulator-arm.cc +3165 -0
- data/ext/v8/upstream/3.1.8/src/arm/simulator-arm.h +402 -0
- data/ext/v8/upstream/3.1.8/src/arm/stub-cache-arm.cc +4077 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/virtual-frame-arm-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/arm/virtual-frame-arm.cc +843 -0
- data/ext/v8/upstream/3.1.8/src/arm/virtual-frame-arm.h +520 -0
- data/ext/v8/upstream/3.1.8/src/array.js +1231 -0
- data/ext/v8/upstream/3.1.8/src/assembler.cc +973 -0
- data/ext/v8/upstream/3.1.8/src/assembler.h +787 -0
- data/ext/v8/upstream/3.1.8/src/ast-inl.h +107 -0
- data/ext/v8/upstream/3.1.8/src/ast.cc +1067 -0
- data/ext/v8/upstream/3.1.8/src/ast.h +2177 -0
- data/ext/v8/upstream/3.1.8/src/atomicops.h +165 -0
- data/ext/v8/upstream/3.1.8/src/atomicops_internals_arm_gcc.h +145 -0
- data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_gcc.cc +126 -0
- data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_gcc.h +287 -0
- data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_macosx.h +301 -0
- data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_msvc.h +203 -0
- data/ext/v8/upstream/3.1.8/src/bignum-dtoa.cc +655 -0
- data/ext/v8/upstream/3.1.8/src/bignum-dtoa.h +81 -0
- data/ext/v8/upstream/3.1.8/src/bignum.cc +768 -0
- data/ext/v8/upstream/3.1.8/src/bignum.h +140 -0
- data/ext/v8/upstream/3.1.8/src/bootstrapper.cc +1888 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/bootstrapper.h +0 -0
- data/ext/v8/upstream/3.1.8/src/builtins.cc +1586 -0
- data/ext/v8/upstream/3.1.8/src/builtins.h +339 -0
- data/ext/v8/upstream/3.1.8/src/bytecodes-irregexp.h +105 -0
- data/ext/v8/upstream/3.1.8/src/cached-powers.cc +177 -0
- data/ext/v8/upstream/3.1.8/src/cached-powers.h +65 -0
- data/ext/v8/upstream/3.1.8/src/char-predicates-inl.h +94 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/char-predicates.h +0 -0
- data/ext/v8/upstream/3.1.8/src/checks.cc +110 -0
- data/ext/v8/upstream/3.1.8/src/checks.h +292 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/circular-queue-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/circular-queue.cc +122 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/circular-queue.h +0 -0
- data/ext/v8/upstream/3.1.8/src/code-stubs.cc +230 -0
- data/ext/v8/upstream/3.1.8/src/code-stubs.h +950 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/code.h +0 -0
- data/ext/v8/upstream/3.1.8/src/codegen-inl.h +64 -0
- data/ext/v8/upstream/3.1.8/src/codegen.cc +495 -0
- data/ext/v8/upstream/3.1.8/src/codegen.h +245 -0
- data/ext/v8/upstream/3.1.8/src/compilation-cache.cc +654 -0
- data/ext/v8/upstream/3.1.8/src/compilation-cache.h +112 -0
- data/ext/v8/upstream/3.1.8/src/compiler.cc +806 -0
- data/ext/v8/upstream/3.1.8/src/compiler.h +290 -0
- data/ext/v8/upstream/3.1.8/src/contexts.cc +320 -0
- data/ext/v8/upstream/3.1.8/src/contexts.h +376 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/conversions-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/conversions.cc +1069 -0
- data/ext/v8/upstream/3.1.8/src/conversions.h +122 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/counters.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/counters.h +242 -0
- data/ext/v8/upstream/3.1.8/src/cpu-profiler-inl.h +100 -0
- data/ext/v8/upstream/3.1.8/src/cpu-profiler.cc +554 -0
- data/ext/v8/upstream/3.1.8/src/cpu-profiler.h +291 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/cpu.h +0 -0
- data/ext/v8/upstream/3.1.8/src/d8-debug.cc +367 -0
- data/ext/v8/upstream/3.1.8/src/d8-debug.h +157 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-posix.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-readline.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-windows.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/d8.cc +792 -0
- data/ext/v8/upstream/3.1.8/src/d8.gyp +85 -0
- data/ext/v8/upstream/3.1.8/src/d8.h +231 -0
- data/ext/v8/upstream/3.1.8/src/d8.js +2798 -0
- data/ext/v8/upstream/3.1.8/src/data-flow.cc +545 -0
- data/ext/v8/upstream/3.1.8/src/data-flow.h +379 -0
- data/ext/v8/upstream/3.1.8/src/date.js +1103 -0
- data/ext/v8/upstream/3.1.8/src/dateparser-inl.h +125 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/dateparser.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/dateparser.h +263 -0
- data/ext/v8/upstream/3.1.8/src/debug-agent.cc +446 -0
- data/ext/v8/upstream/3.1.8/src/debug-agent.h +131 -0
- data/ext/v8/upstream/3.1.8/src/debug-debugger.js +2569 -0
- data/ext/v8/upstream/3.1.8/src/debug.cc +3085 -0
- data/ext/v8/upstream/3.1.8/src/debug.h +1025 -0
- data/ext/v8/upstream/3.1.8/src/deoptimizer.cc +1185 -0
- data/ext/v8/upstream/3.1.8/src/deoptimizer.h +529 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/disasm.h +0 -0
- data/ext/v8/upstream/3.1.8/src/disassembler.cc +338 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/disassembler.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/diy-fp.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/diy-fp.h +0 -0
- data/ext/v8/upstream/3.1.8/src/double.h +238 -0
- data/ext/v8/upstream/3.1.8/src/dtoa.cc +103 -0
- data/ext/v8/upstream/3.1.8/src/dtoa.h +85 -0
- data/ext/v8/upstream/3.1.8/src/execution.cc +735 -0
- data/ext/v8/upstream/3.1.8/src/execution.h +322 -0
- data/ext/v8/upstream/3.1.8/src/extensions/experimental/experimental.gyp +53 -0
- data/ext/v8/upstream/3.1.8/src/extensions/experimental/i18n-extension.cc +264 -0
- data/ext/v8/upstream/3.1.8/src/extensions/experimental/i18n-extension.h +64 -0
- data/ext/v8/upstream/3.1.8/src/extensions/externalize-string-extension.cc +141 -0
- data/ext/v8/upstream/3.1.8/src/extensions/externalize-string-extension.h +50 -0
- data/ext/v8/upstream/3.1.8/src/extensions/gc-extension.cc +58 -0
- data/ext/v8/upstream/3.1.8/src/extensions/gc-extension.h +49 -0
- data/ext/v8/upstream/3.1.8/src/factory.cc +1087 -0
- data/ext/v8/upstream/3.1.8/src/factory.h +432 -0
- data/ext/v8/upstream/3.1.8/src/fast-dtoa.cc +736 -0
- data/ext/v8/upstream/3.1.8/src/fast-dtoa.h +83 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/fixed-dtoa.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/fixed-dtoa.h +0 -0
- data/ext/v8/upstream/3.1.8/src/flag-definitions.h +552 -0
- data/ext/v8/upstream/3.1.8/src/flags.cc +551 -0
- data/ext/v8/upstream/3.1.8/src/flags.h +79 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/frame-element.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/frame-element.h +277 -0
- data/ext/v8/upstream/3.1.8/src/frames-inl.h +210 -0
- data/ext/v8/upstream/3.1.8/src/frames.cc +1232 -0
- data/ext/v8/upstream/3.1.8/src/frames.h +826 -0
- data/ext/v8/upstream/3.1.8/src/full-codegen.cc +1382 -0
- data/ext/v8/upstream/3.1.8/src/full-codegen.h +751 -0
- data/ext/v8/upstream/3.1.8/src/func-name-inferrer.cc +90 -0
- data/ext/v8/upstream/3.1.8/src/func-name-inferrer.h +111 -0
- data/ext/v8/upstream/3.1.8/src/gdb-jit.cc +1547 -0
- data/ext/v8/upstream/3.1.8/src/gdb-jit.h +138 -0
- data/ext/v8/upstream/3.1.8/src/global-handles.cc +534 -0
- data/ext/v8/upstream/3.1.8/src/global-handles.h +181 -0
- data/ext/v8/upstream/3.1.8/src/globals.h +325 -0
- data/ext/v8/upstream/3.1.8/src/handles-inl.h +80 -0
- data/ext/v8/upstream/3.1.8/src/handles.cc +910 -0
- data/ext/v8/upstream/3.1.8/src/handles.h +424 -0
- data/ext/v8/upstream/3.1.8/src/hashmap.cc +230 -0
- data/ext/v8/upstream/3.1.8/src/hashmap.h +121 -0
- data/ext/v8/upstream/3.1.8/src/heap-inl.h +587 -0
- data/ext/v8/upstream/3.1.8/src/heap-profiler.cc +1128 -0
- data/ext/v8/upstream/3.1.8/src/heap-profiler.h +381 -0
- data/ext/v8/upstream/3.1.8/src/heap.cc +5610 -0
- data/ext/v8/upstream/3.1.8/src/heap.h +2218 -0
- data/ext/v8/upstream/3.1.8/src/hydrogen-instructions.cc +1490 -0
- data/ext/v8/upstream/3.1.8/src/hydrogen-instructions.h +3493 -0
- data/ext/v8/upstream/3.1.8/src/hydrogen.cc +6056 -0
- data/ext/v8/upstream/3.1.8/src/hydrogen.h +1091 -0
- data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32-inl.h +429 -0
- data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32.cc +2800 -0
- data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32.h +1093 -0
- data/ext/v8/upstream/3.1.8/src/ia32/builtins-ia32.cc +1590 -0
- data/ext/v8/upstream/3.1.8/src/ia32/code-stubs-ia32.cc +6624 -0
- data/ext/v8/upstream/3.1.8/src/ia32/code-stubs-ia32.h +536 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/codegen-ia32-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/ia32/codegen-ia32.cc +10354 -0
- data/ext/v8/upstream/3.1.8/src/ia32/codegen-ia32.h +798 -0
- data/ext/v8/upstream/3.1.8/src/ia32/cpu-ia32.cc +87 -0
- data/ext/v8/upstream/3.1.8/src/ia32/debug-ia32.cc +309 -0
- data/ext/v8/upstream/3.1.8/src/ia32/deoptimizer-ia32.cc +664 -0
- data/ext/v8/upstream/3.1.8/src/ia32/disasm-ia32.cc +1597 -0
- data/ext/v8/upstream/3.1.8/src/ia32/frames-ia32.cc +45 -0
- data/ext/v8/upstream/3.1.8/src/ia32/frames-ia32.h +140 -0
- data/ext/v8/upstream/3.1.8/src/ia32/full-codegen-ia32.cc +4278 -0
- data/ext/v8/upstream/3.1.8/src/ia32/ic-ia32.cc +1786 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/jump-target-ia32.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-codegen-ia32.cc +3880 -0
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-codegen-ia32.h +309 -0
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-gap-resolver-ia32.cc +460 -0
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-gap-resolver-ia32.h +110 -0
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-ia32.cc +2095 -0
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-ia32.h +2127 -0
- data/ext/v8/upstream/3.1.8/src/ia32/macro-assembler-ia32.cc +2031 -0
- data/ext/v8/upstream/3.1.8/src/ia32/macro-assembler-ia32.h +798 -0
- data/ext/v8/upstream/3.1.8/src/ia32/regexp-macro-assembler-ia32.cc +1253 -0
- data/ext/v8/upstream/3.1.8/src/ia32/regexp-macro-assembler-ia32.h +215 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/simulator-ia32.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/ia32/simulator-ia32.h +72 -0
- data/ext/v8/upstream/3.1.8/src/ia32/stub-cache-ia32.cc +3732 -0
- data/ext/v8/upstream/3.1.8/src/ia32/virtual-frame-ia32.cc +1360 -0
- data/ext/v8/upstream/3.1.8/src/ia32/virtual-frame-ia32.h +646 -0
- data/ext/v8/upstream/3.1.8/src/ic-inl.h +129 -0
- data/ext/v8/upstream/3.1.8/src/ic.cc +2333 -0
- data/ext/v8/upstream/3.1.8/src/ic.h +639 -0
- data/ext/v8/upstream/3.1.8/src/inspector.cc +63 -0
- data/ext/v8/upstream/3.1.8/src/inspector.h +62 -0
- data/ext/v8/upstream/3.1.8/src/interpreter-irregexp.cc +655 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/interpreter-irregexp.h +0 -0
- data/ext/v8/upstream/3.1.8/src/json.js +342 -0
- data/ext/v8/upstream/3.1.8/src/jsregexp.cc +5340 -0
- data/ext/v8/upstream/3.1.8/src/jsregexp.h +1484 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-heavy-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/jump-target-heavy.cc +430 -0
- data/ext/v8/upstream/3.1.8/src/jump-target-heavy.h +244 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-light-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/jump-target-light.cc +111 -0
- data/ext/v8/upstream/3.1.8/src/jump-target-light.h +193 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target.h +0 -0
- data/ext/v8/upstream/3.1.8/src/list-inl.h +206 -0
- data/ext/v8/upstream/3.1.8/src/list.h +164 -0
- data/ext/v8/upstream/3.1.8/src/lithium-allocator-inl.h +140 -0
- data/ext/v8/upstream/3.1.8/src/lithium-allocator.cc +2093 -0
- data/ext/v8/upstream/3.1.8/src/lithium-allocator.h +644 -0
- data/ext/v8/upstream/3.1.8/src/lithium.cc +168 -0
- data/ext/v8/upstream/3.1.8/src/lithium.h +592 -0
- data/ext/v8/upstream/3.1.8/src/liveedit-debugger.js +1082 -0
- data/ext/v8/upstream/3.1.8/src/liveedit.cc +1650 -0
- data/ext/v8/upstream/3.1.8/src/liveedit.h +174 -0
- data/ext/v8/upstream/3.1.8/src/liveobjectlist-inl.h +126 -0
- data/ext/v8/upstream/3.1.8/src/liveobjectlist.cc +2527 -0
- data/ext/v8/upstream/3.1.8/src/liveobjectlist.h +322 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/log-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/log-utils.cc +336 -0
- data/ext/v8/upstream/3.1.8/src/log-utils.h +232 -0
- data/ext/v8/upstream/3.1.8/src/log.cc +1608 -0
- data/ext/v8/upstream/3.1.8/src/log.h +379 -0
- data/ext/v8/upstream/3.1.8/src/macro-assembler.h +120 -0
- data/ext/v8/upstream/3.1.8/src/macros.py +178 -0
- data/ext/v8/upstream/3.1.8/src/mark-compact.cc +2957 -0
- data/ext/v8/upstream/3.1.8/src/mark-compact.h +433 -0
- data/ext/v8/upstream/3.1.8/src/math.js +264 -0
- data/ext/v8/upstream/3.1.8/src/memory.h +82 -0
- data/ext/v8/upstream/3.1.8/src/messages.cc +164 -0
- data/ext/v8/upstream/3.1.8/src/messages.h +114 -0
- data/ext/v8/upstream/3.1.8/src/messages.js +1071 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/assembler-mips-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/assembler-mips.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/mips/assembler-mips.h +667 -0
- data/ext/v8/upstream/3.1.8/src/mips/builtins-mips.cc +205 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/codegen-mips-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/codegen-mips.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/mips/codegen-mips.h +431 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/constants-mips.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/constants-mips.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/cpu-mips.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/mips/debug-mips.cc +127 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/disasm-mips.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/fast-codegen-mips.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/mips/frames-mips.cc +96 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/frames-mips.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/full-codegen-mips.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/mips/ic-mips.cc +208 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/jump-target-mips.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/macro-assembler-mips.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/macro-assembler-mips.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips.h +0 -0
- data/ext/v8/upstream/3.1.8/src/mips/simulator-mips.cc +1650 -0
- data/ext/v8/upstream/3.1.8/src/mips/simulator-mips.h +311 -0
- data/ext/v8/upstream/3.1.8/src/mips/stub-cache-mips.cc +418 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/virtual-frame-mips.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/virtual-frame-mips.h +0 -0
- data/ext/v8/upstream/3.1.8/src/mirror-debugger.js +2380 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mksnapshot.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/natives.h +0 -0
- data/ext/v8/upstream/3.1.8/src/objects-debug.cc +722 -0
- data/ext/v8/upstream/3.1.8/src/objects-inl.h +3946 -0
- data/ext/v8/upstream/3.1.8/src/objects-printer.cc +801 -0
- data/ext/v8/upstream/3.1.8/src/objects-visiting.cc +142 -0
- data/ext/v8/upstream/3.1.8/src/objects-visiting.h +401 -0
- data/ext/v8/upstream/3.1.8/src/objects.cc +10044 -0
- data/ext/v8/upstream/3.1.8/src/objects.h +6571 -0
- data/ext/v8/upstream/3.1.8/src/parser.cc +5165 -0
- data/ext/v8/upstream/3.1.8/src/parser.h +802 -0
- data/ext/v8/upstream/3.1.8/src/platform-cygwin.cc +745 -0
- data/ext/v8/upstream/3.1.8/src/platform-freebsd.cc +702 -0
- data/ext/v8/upstream/3.1.8/src/platform-linux.cc +981 -0
- data/ext/v8/upstream/3.1.8/src/platform-macos.cc +732 -0
- data/ext/v8/upstream/3.1.8/src/platform-nullos.cc +498 -0
- data/ext/v8/upstream/3.1.8/src/platform-openbsd.cc +657 -0
- data/ext/v8/upstream/3.1.8/src/platform-posix.cc +399 -0
- data/ext/v8/upstream/3.1.8/src/platform-solaris.cc +714 -0
- data/ext/v8/upstream/3.1.8/src/platform-win32.cc +1974 -0
- data/ext/v8/upstream/3.1.8/src/platform.h +636 -0
- data/ext/v8/upstream/3.1.8/src/preparse-data.cc +183 -0
- data/ext/v8/upstream/3.1.8/src/preparse-data.h +249 -0
- data/ext/v8/upstream/3.1.8/src/preparser-api.cc +213 -0
- data/ext/v8/upstream/3.1.8/src/preparser.cc +1205 -0
- data/ext/v8/upstream/3.1.8/src/preparser.h +278 -0
- data/ext/v8/upstream/3.1.8/src/prettyprinter.cc +1539 -0
- data/ext/v8/upstream/3.1.8/src/prettyprinter.h +223 -0
- data/ext/v8/upstream/3.1.8/src/profile-generator-inl.h +128 -0
- data/ext/v8/upstream/3.1.8/src/profile-generator.cc +2899 -0
- data/ext/v8/upstream/3.1.8/src/profile-generator.h +1151 -0
- data/ext/v8/upstream/3.1.8/src/property.cc +96 -0
- data/ext/v8/upstream/3.1.8/src/property.h +337 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-macro-assembler-irregexp-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-irregexp.cc +470 -0
- data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-irregexp.h +142 -0
- data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-tracer.cc +373 -0
- data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-tracer.h +104 -0
- data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler.cc +257 -0
- data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler.h +231 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-stack.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-stack.h +0 -0
- data/ext/v8/upstream/3.1.8/src/regexp.js +483 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator.h +0 -0
- data/ext/v8/upstream/3.1.8/src/rewriter.cc +1023 -0
- data/ext/v8/upstream/3.1.8/src/rewriter.h +59 -0
- data/ext/v8/upstream/3.1.8/src/runtime-profiler.cc +443 -0
- data/ext/v8/upstream/3.1.8/src/runtime-profiler.h +77 -0
- data/ext/v8/upstream/3.1.8/src/runtime.cc +11592 -0
- data/ext/v8/upstream/3.1.8/src/runtime.h +582 -0
- data/ext/v8/upstream/3.1.8/src/runtime.js +643 -0
- data/ext/v8/upstream/3.1.8/src/safepoint-table.cc +253 -0
- data/ext/v8/upstream/3.1.8/src/safepoint-table.h +263 -0
- data/ext/v8/upstream/3.1.8/src/scanner-base.cc +971 -0
- data/ext/v8/upstream/3.1.8/src/scanner-base.h +653 -0
- data/ext/v8/upstream/3.1.8/src/scanner.cc +586 -0
- data/ext/v8/upstream/3.1.8/src/scanner.h +194 -0
- data/ext/v8/upstream/3.1.8/src/scopeinfo.cc +636 -0
- data/ext/v8/upstream/3.1.8/src/scopeinfo.h +238 -0
- data/ext/v8/upstream/3.1.8/src/scopes.cc +1063 -0
- data/ext/v8/upstream/3.1.8/src/scopes.h +494 -0
- data/ext/v8/upstream/3.1.8/src/serialize.cc +1535 -0
- data/ext/v8/upstream/3.1.8/src/serialize.h +584 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/shell.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/simulator.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/smart-pointer.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot-common.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot-empty.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot.h +0 -0
- data/ext/v8/upstream/3.1.8/src/spaces-inl.h +524 -0
- data/ext/v8/upstream/3.1.8/src/spaces.cc +3254 -0
- data/ext/v8/upstream/3.1.8/src/spaces.h +2362 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/splay-tree-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/splay-tree.h +0 -0
- data/ext/v8/upstream/3.1.8/src/string-search.cc +40 -0
- data/ext/v8/upstream/3.1.8/src/string-search.h +567 -0
- data/ext/v8/upstream/3.1.8/src/string-stream.cc +584 -0
- data/ext/v8/upstream/3.1.8/src/string-stream.h +191 -0
- data/ext/v8/upstream/3.1.8/src/string.js +915 -0
- data/ext/v8/upstream/3.1.8/src/strtod.cc +440 -0
- data/ext/v8/upstream/3.1.8/src/strtod.h +40 -0
- data/ext/v8/upstream/3.1.8/src/stub-cache.cc +1878 -0
- data/ext/v8/upstream/3.1.8/src/stub-cache.h +849 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/third_party/valgrind/valgrind.h +0 -0
- data/ext/v8/upstream/3.1.8/src/token.cc +63 -0
- data/ext/v8/upstream/3.1.8/src/token.h +288 -0
- data/ext/v8/upstream/3.1.8/src/top.cc +1152 -0
- data/ext/v8/upstream/3.1.8/src/top.h +608 -0
- data/ext/v8/upstream/3.1.8/src/type-info.cc +406 -0
- data/ext/v8/upstream/3.1.8/src/type-info.h +283 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/unbound-queue-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/unbound-queue.h +0 -0
- data/ext/v8/upstream/3.1.8/src/unicode-inl.h +238 -0
- data/ext/v8/upstream/3.1.8/src/unicode.cc +1624 -0
- data/ext/v8/upstream/3.1.8/src/unicode.h +280 -0
- data/ext/v8/upstream/3.1.8/src/uri.js +402 -0
- data/ext/v8/upstream/3.1.8/src/utils.cc +371 -0
- data/ext/v8/upstream/3.1.8/src/utils.h +793 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/v8-counters.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/v8-counters.h +290 -0
- data/ext/v8/upstream/3.1.8/src/v8.cc +270 -0
- data/ext/v8/upstream/3.1.8/src/v8.h +127 -0
- data/ext/v8/upstream/3.1.8/src/v8checks.h +64 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/v8dll-main.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/v8globals.h +480 -0
- data/ext/v8/upstream/3.1.8/src/v8natives.js +1252 -0
- data/ext/v8/upstream/3.1.8/src/v8preparserdll-main.cc +39 -0
- data/ext/v8/upstream/3.1.8/src/v8threads.cc +440 -0
- data/ext/v8/upstream/3.1.8/src/v8threads.h +157 -0
- data/ext/v8/upstream/3.1.8/src/v8utils.h +354 -0
- data/ext/v8/upstream/3.1.8/src/variables.cc +132 -0
- data/ext/v8/upstream/3.1.8/src/variables.h +212 -0
- data/ext/v8/upstream/3.1.8/src/version.cc +95 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/version.h +0 -0
- data/ext/v8/upstream/3.1.8/src/virtual-frame-heavy-inl.h +190 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-heavy.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-light-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-light.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/virtual-frame.h +59 -0
- data/ext/v8/upstream/3.1.8/src/vm-state-inl.h +134 -0
- data/ext/v8/upstream/3.1.8/src/vm-state.h +68 -0
- data/ext/v8/upstream/3.1.8/src/win32-headers.h +95 -0
- data/ext/v8/upstream/3.1.8/src/x64/assembler-x64-inl.h +455 -0
- data/ext/v8/upstream/3.1.8/src/x64/assembler-x64.cc +3162 -0
- data/ext/v8/upstream/3.1.8/src/x64/assembler-x64.h +1584 -0
- data/ext/v8/upstream/3.1.8/src/x64/builtins-x64.cc +1492 -0
- data/ext/v8/upstream/3.1.8/src/x64/code-stubs-x64.cc +5150 -0
- data/ext/v8/upstream/3.1.8/src/x64/code-stubs-x64.h +519 -0
- data/ext/v8/upstream/3.1.8/src/x64/codegen-x64-inl.h +46 -0
- data/ext/v8/upstream/3.1.8/src/x64/codegen-x64.cc +8835 -0
- data/ext/v8/upstream/3.1.8/src/x64/codegen-x64.h +750 -0
- data/ext/v8/upstream/3.1.8/src/x64/cpu-x64.cc +86 -0
- data/ext/v8/upstream/3.1.8/src/x64/debug-x64.cc +316 -0
- data/ext/v8/upstream/3.1.8/src/x64/deoptimizer-x64.cc +781 -0
- data/ext/v8/upstream/3.1.8/src/x64/disasm-x64.cc +1737 -0
- data/ext/v8/upstream/3.1.8/src/x64/frames-x64.cc +45 -0
- data/ext/v8/upstream/3.1.8/src/x64/frames-x64.h +130 -0
- data/ext/v8/upstream/3.1.8/src/x64/full-codegen-x64.cc +3984 -0
- data/ext/v8/upstream/3.1.8/src/x64/ic-x64.cc +1761 -0
- data/ext/v8/upstream/3.1.8/src/x64/jump-target-x64.cc +437 -0
- data/ext/v8/upstream/3.1.8/src/x64/lithium-codegen-x64.cc +3639 -0
- data/ext/v8/upstream/3.1.8/src/x64/lithium-codegen-x64.h +305 -0
- data/ext/v8/upstream/3.1.8/src/x64/lithium-gap-resolver-x64.cc +320 -0
- data/ext/v8/upstream/3.1.8/src/x64/lithium-gap-resolver-x64.h +74 -0
- data/ext/v8/upstream/3.1.8/src/x64/lithium-x64.cc +2044 -0
- data/ext/v8/upstream/3.1.8/src/x64/lithium-x64.h +2052 -0
- data/ext/v8/upstream/3.1.8/src/x64/macro-assembler-x64.cc +2660 -0
- data/ext/v8/upstream/3.1.8/src/x64/macro-assembler-x64.h +1852 -0
- data/ext/v8/upstream/3.1.8/src/x64/regexp-macro-assembler-x64.cc +1382 -0
- data/ext/v8/upstream/3.1.8/src/x64/regexp-macro-assembler-x64.h +278 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/simulator-x64.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/x64/simulator-x64.h +71 -0
- data/ext/v8/upstream/3.1.8/src/x64/stub-cache-x64.cc +3509 -0
- data/ext/v8/upstream/3.1.8/src/x64/virtual-frame-x64.cc +1292 -0
- data/ext/v8/upstream/3.1.8/src/x64/virtual-frame-x64.h +593 -0
- data/ext/v8/upstream/3.1.8/src/zone-inl.h +83 -0
- data/ext/v8/upstream/3.1.8/src/zone.cc +195 -0
- data/ext/v8/upstream/3.1.8/src/zone.h +233 -0
- data/ext/v8/upstream/3.1.8/tools/codemap.js +265 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/consarray.js +0 -0
- data/ext/v8/upstream/3.1.8/tools/csvparser.js +78 -0
- data/ext/v8/upstream/3.1.8/tools/disasm.py +92 -0
- data/ext/v8/upstream/3.1.8/tools/gc-nvp-trace-processor.py +328 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/generate-ten-powers.scm +0 -0
- data/ext/v8/upstream/3.1.8/tools/grokdump.py +840 -0
- data/ext/v8/upstream/3.1.8/tools/gyp/v8.gyp +869 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/js2c.py +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/jsmin.py +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/linux-tick-processor +0 -0
- data/ext/v8/upstream/3.1.8/tools/ll_prof.py +919 -0
- data/ext/v8/upstream/3.1.8/tools/logreader.js +185 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/mac-nm +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/mac-tick-processor +0 -0
- data/ext/v8/upstream/3.1.8/tools/oom_dump/README +31 -0
- data/ext/v8/upstream/3.1.8/tools/oom_dump/SConstruct +42 -0
- data/ext/v8/upstream/3.1.8/tools/oom_dump/oom_dump.cc +288 -0
- data/ext/v8/upstream/3.1.8/tools/presubmit.py +305 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/process-heap-prof.py +0 -0
- data/ext/v8/upstream/3.1.8/tools/profile.js +751 -0
- data/ext/v8/upstream/3.1.8/tools/profile_view.js +219 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/run-valgrind.py +0 -0
- data/ext/v8/upstream/3.1.8/tools/splaytree.js +316 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/stats-viewer.py +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/tickprocessor-driver.js +0 -0
- data/ext/v8/upstream/3.1.8/tools/tickprocessor.js +863 -0
- data/ext/v8/upstream/3.1.8/tools/utils.py +96 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/README.txt +70 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/arm.vsprops +0 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/common.vsprops +34 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8_arm.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8js2c.cmd +0 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/debug.vsprops +17 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/ia32.vsprops +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/js2c.cmd +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/release.vsprops +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8.sln +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_arm.sln +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_arm.vcproj +0 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base.vcproj +1296 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base_arm.vcproj +1234 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base_x64.vcproj +1296 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest_arm.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_mksnapshot.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_mksnapshot_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample_arm.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample_x64.vcproj +0 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample.vcproj +147 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample_arm.vcproj +147 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample_x64.vcproj +163 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_cc.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_cc_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_x64.sln +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/x64.vsprops +0 -0
- data/ext/v8/upstream/3.1.8/tools/windows-tick-processor.bat +30 -0
- data/ext/v8/upstream/Makefile +2 -1
- data/ext/v8/v8_template.cpp +2 -2
- data/lib/v8/version.rb +1 -1
- data/spec/redjs/jsapi_spec.rb +2 -2
- metadata +552 -490
- data/ext/v8/upstream/2.3.3/.gitignore +0 -26
- data/ext/v8/upstream/2.3.3/AUTHORS +0 -31
- data/ext/v8/upstream/2.3.3/ChangeLog +0 -1916
- data/ext/v8/upstream/2.3.3/LICENSE +0 -55
- data/ext/v8/upstream/2.3.3/SConstruct +0 -1154
- data/ext/v8/upstream/2.3.3/include/v8-debug.h +0 -381
- data/ext/v8/upstream/2.3.3/include/v8-profiler.h +0 -353
- data/ext/v8/upstream/2.3.3/include/v8.h +0 -3616
- data/ext/v8/upstream/2.3.3/src/SConscript +0 -330
- data/ext/v8/upstream/2.3.3/src/accessors.cc +0 -661
- data/ext/v8/upstream/2.3.3/src/accessors.h +0 -114
- data/ext/v8/upstream/2.3.3/src/allocation.cc +0 -198
- data/ext/v8/upstream/2.3.3/src/allocation.h +0 -169
- data/ext/v8/upstream/2.3.3/src/api.cc +0 -4795
- data/ext/v8/upstream/2.3.3/src/api.h +0 -485
- data/ext/v8/upstream/2.3.3/src/apiutils.h +0 -69
- data/ext/v8/upstream/2.3.3/src/arguments.h +0 -96
- data/ext/v8/upstream/2.3.3/src/arm/assembler-arm-inl.h +0 -305
- data/ext/v8/upstream/2.3.3/src/arm/assembler-arm.cc +0 -2580
- data/ext/v8/upstream/2.3.3/src/arm/assembler-arm.h +0 -1275
- data/ext/v8/upstream/2.3.3/src/arm/builtins-arm.cc +0 -1320
- data/ext/v8/upstream/2.3.3/src/arm/codegen-arm-inl.h +0 -48
- data/ext/v8/upstream/2.3.3/src/arm/codegen-arm.cc +0 -11398
- data/ext/v8/upstream/2.3.3/src/arm/codegen-arm.h +0 -1102
- data/ext/v8/upstream/2.3.3/src/arm/constants-arm.cc +0 -154
- data/ext/v8/upstream/2.3.3/src/arm/constants-arm.h +0 -388
- data/ext/v8/upstream/2.3.3/src/arm/cpu-arm.cc +0 -142
- data/ext/v8/upstream/2.3.3/src/arm/debug-arm.cc +0 -309
- data/ext/v8/upstream/2.3.3/src/arm/disasm-arm.cc +0 -1459
- data/ext/v8/upstream/2.3.3/src/arm/fast-codegen-arm.cc +0 -241
- data/ext/v8/upstream/2.3.3/src/arm/frames-arm.cc +0 -123
- data/ext/v8/upstream/2.3.3/src/arm/frames-arm.h +0 -162
- data/ext/v8/upstream/2.3.3/src/arm/full-codegen-arm.cc +0 -3178
- data/ext/v8/upstream/2.3.3/src/arm/ic-arm.cc +0 -2258
- data/ext/v8/upstream/2.3.3/src/arm/jump-target-arm.cc +0 -164
- data/ext/v8/upstream/2.3.3/src/arm/macro-assembler-arm.cc +0 -1892
- data/ext/v8/upstream/2.3.3/src/arm/macro-assembler-arm.h +0 -727
- data/ext/v8/upstream/2.3.3/src/arm/regexp-macro-assembler-arm.cc +0 -1261
- data/ext/v8/upstream/2.3.3/src/arm/regexp-macro-assembler-arm.h +0 -266
- data/ext/v8/upstream/2.3.3/src/arm/simulator-arm.cc +0 -2822
- data/ext/v8/upstream/2.3.3/src/arm/simulator-arm.h +0 -361
- data/ext/v8/upstream/2.3.3/src/arm/stub-cache-arm.cc +0 -2387
- data/ext/v8/upstream/2.3.3/src/arm/virtual-frame-arm.cc +0 -834
- data/ext/v8/upstream/2.3.3/src/arm/virtual-frame-arm.h +0 -519
- data/ext/v8/upstream/2.3.3/src/array.js +0 -1127
- data/ext/v8/upstream/2.3.3/src/assembler.cc +0 -801
- data/ext/v8/upstream/2.3.3/src/assembler.h +0 -573
- data/ext/v8/upstream/2.3.3/src/ast-inl.h +0 -81
- data/ext/v8/upstream/2.3.3/src/ast.cc +0 -1152
- data/ext/v8/upstream/2.3.3/src/ast.h +0 -2106
- data/ext/v8/upstream/2.3.3/src/bootstrapper.cc +0 -1819
- data/ext/v8/upstream/2.3.3/src/builtins.cc +0 -1529
- data/ext/v8/upstream/2.3.3/src/builtins.h +0 -263
- data/ext/v8/upstream/2.3.3/src/bytecodes-irregexp.h +0 -104
- data/ext/v8/upstream/2.3.3/src/cached-powers.h +0 -119
- data/ext/v8/upstream/2.3.3/src/char-predicates-inl.h +0 -86
- data/ext/v8/upstream/2.3.3/src/checks.cc +0 -100
- data/ext/v8/upstream/2.3.3/src/checks.h +0 -310
- data/ext/v8/upstream/2.3.3/src/circular-queue.cc +0 -121
- data/ext/v8/upstream/2.3.3/src/code-stubs.cc +0 -177
- data/ext/v8/upstream/2.3.3/src/code-stubs.h +0 -177
- data/ext/v8/upstream/2.3.3/src/codegen-inl.h +0 -60
- data/ext/v8/upstream/2.3.3/src/codegen.cc +0 -516
- data/ext/v8/upstream/2.3.3/src/codegen.h +0 -897
- data/ext/v8/upstream/2.3.3/src/compilation-cache.cc +0 -562
- data/ext/v8/upstream/2.3.3/src/compilation-cache.h +0 -102
- data/ext/v8/upstream/2.3.3/src/compiler.cc +0 -654
- data/ext/v8/upstream/2.3.3/src/compiler.h +0 -299
- data/ext/v8/upstream/2.3.3/src/contexts.cc +0 -256
- data/ext/v8/upstream/2.3.3/src/contexts.h +0 -342
- data/ext/v8/upstream/2.3.3/src/conversions.cc +0 -1119
- data/ext/v8/upstream/2.3.3/src/conversions.h +0 -123
- data/ext/v8/upstream/2.3.3/src/counters.h +0 -239
- data/ext/v8/upstream/2.3.3/src/cpu-profiler-inl.h +0 -100
- data/ext/v8/upstream/2.3.3/src/cpu-profiler.cc +0 -538
- data/ext/v8/upstream/2.3.3/src/cpu-profiler.h +0 -285
- data/ext/v8/upstream/2.3.3/src/d8-debug.cc +0 -356
- data/ext/v8/upstream/2.3.3/src/d8-debug.h +0 -155
- data/ext/v8/upstream/2.3.3/src/d8.cc +0 -783
- data/ext/v8/upstream/2.3.3/src/d8.h +0 -227
- data/ext/v8/upstream/2.3.3/src/d8.js +0 -1683
- data/ext/v8/upstream/2.3.3/src/data-flow.cc +0 -758
- data/ext/v8/upstream/2.3.3/src/data-flow.h +0 -278
- data/ext/v8/upstream/2.3.3/src/date.js +0 -1059
- data/ext/v8/upstream/2.3.3/src/dateparser-inl.h +0 -123
- data/ext/v8/upstream/2.3.3/src/dateparser.h +0 -244
- data/ext/v8/upstream/2.3.3/src/debug-agent.cc +0 -427
- data/ext/v8/upstream/2.3.3/src/debug-agent.h +0 -129
- data/ext/v8/upstream/2.3.3/src/debug-debugger.js +0 -2227
- data/ext/v8/upstream/2.3.3/src/debug.cc +0 -3005
- data/ext/v8/upstream/2.3.3/src/debug.h +0 -993
- data/ext/v8/upstream/2.3.3/src/disassembler.cc +0 -312
- data/ext/v8/upstream/2.3.3/src/double.h +0 -169
- data/ext/v8/upstream/2.3.3/src/dtoa-config.c +0 -92
- data/ext/v8/upstream/2.3.3/src/dtoa.cc +0 -77
- data/ext/v8/upstream/2.3.3/src/dtoa.h +0 -81
- data/ext/v8/upstream/2.3.3/src/execution.cc +0 -809
- data/ext/v8/upstream/2.3.3/src/execution.h +0 -336
- data/ext/v8/upstream/2.3.3/src/factory.cc +0 -1003
- data/ext/v8/upstream/2.3.3/src/factory.h +0 -410
- data/ext/v8/upstream/2.3.3/src/fast-codegen.cc +0 -746
- data/ext/v8/upstream/2.3.3/src/fast-codegen.h +0 -161
- data/ext/v8/upstream/2.3.3/src/fast-dtoa.cc +0 -505
- data/ext/v8/upstream/2.3.3/src/fast-dtoa.h +0 -58
- data/ext/v8/upstream/2.3.3/src/flag-definitions.h +0 -455
- data/ext/v8/upstream/2.3.3/src/flags.cc +0 -551
- data/ext/v8/upstream/2.3.3/src/flags.h +0 -81
- data/ext/v8/upstream/2.3.3/src/flow-graph.cc +0 -763
- data/ext/v8/upstream/2.3.3/src/flow-graph.h +0 -180
- data/ext/v8/upstream/2.3.3/src/frame-element.h +0 -273
- data/ext/v8/upstream/2.3.3/src/frames-inl.h +0 -217
- data/ext/v8/upstream/2.3.3/src/frames.cc +0 -826
- data/ext/v8/upstream/2.3.3/src/frames.h +0 -682
- data/ext/v8/upstream/2.3.3/src/full-codegen.cc +0 -1443
- data/ext/v8/upstream/2.3.3/src/full-codegen.h +0 -548
- data/ext/v8/upstream/2.3.3/src/func-name-inferrer.cc +0 -76
- data/ext/v8/upstream/2.3.3/src/func-name-inferrer.h +0 -135
- data/ext/v8/upstream/2.3.3/src/global-handles.cc +0 -520
- data/ext/v8/upstream/2.3.3/src/global-handles.h +0 -180
- data/ext/v8/upstream/2.3.3/src/globals.h +0 -669
- data/ext/v8/upstream/2.3.3/src/handles-inl.h +0 -76
- data/ext/v8/upstream/2.3.3/src/handles.cc +0 -825
- data/ext/v8/upstream/2.3.3/src/handles.h +0 -393
- data/ext/v8/upstream/2.3.3/src/hashmap.cc +0 -226
- data/ext/v8/upstream/2.3.3/src/hashmap.h +0 -120
- data/ext/v8/upstream/2.3.3/src/heap-inl.h +0 -493
- data/ext/v8/upstream/2.3.3/src/heap-profiler.cc +0 -779
- data/ext/v8/upstream/2.3.3/src/heap-profiler.h +0 -323
- data/ext/v8/upstream/2.3.3/src/heap.cc +0 -4994
- data/ext/v8/upstream/2.3.3/src/heap.h +0 -1984
- data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32-inl.h +0 -360
- data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32.cc +0 -2600
- data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32.h +0 -969
- data/ext/v8/upstream/2.3.3/src/ia32/builtins-ia32.cc +0 -1261
- data/ext/v8/upstream/2.3.3/src/ia32/codegen-ia32.cc +0 -13968
- data/ext/v8/upstream/2.3.3/src/ia32/codegen-ia32.h +0 -1097
- data/ext/v8/upstream/2.3.3/src/ia32/cpu-ia32.cc +0 -83
- data/ext/v8/upstream/2.3.3/src/ia32/debug-ia32.cc +0 -309
- data/ext/v8/upstream/2.3.3/src/ia32/disasm-ia32.cc +0 -1471
- data/ext/v8/upstream/2.3.3/src/ia32/fast-codegen-ia32.cc +0 -954
- data/ext/v8/upstream/2.3.3/src/ia32/fast-codegen-ia32.h +0 -155
- data/ext/v8/upstream/2.3.3/src/ia32/frames-ia32.cc +0 -115
- data/ext/v8/upstream/2.3.3/src/ia32/frames-ia32.h +0 -135
- data/ext/v8/upstream/2.3.3/src/ia32/full-codegen-ia32.cc +0 -3281
- data/ext/v8/upstream/2.3.3/src/ia32/ic-ia32.cc +0 -1966
- data/ext/v8/upstream/2.3.3/src/ia32/macro-assembler-ia32.cc +0 -1610
- data/ext/v8/upstream/2.3.3/src/ia32/macro-assembler-ia32.h +0 -610
- data/ext/v8/upstream/2.3.3/src/ia32/regexp-macro-assembler-ia32.cc +0 -1247
- data/ext/v8/upstream/2.3.3/src/ia32/regexp-macro-assembler-ia32.h +0 -214
- data/ext/v8/upstream/2.3.3/src/ia32/simulator-ia32.h +0 -62
- data/ext/v8/upstream/2.3.3/src/ia32/stub-cache-ia32.cc +0 -2750
- data/ext/v8/upstream/2.3.3/src/ia32/virtual-frame-ia32.cc +0 -1334
- data/ext/v8/upstream/2.3.3/src/ia32/virtual-frame-ia32.h +0 -627
- data/ext/v8/upstream/2.3.3/src/ic-inl.h +0 -120
- data/ext/v8/upstream/2.3.3/src/ic.cc +0 -1827
- data/ext/v8/upstream/2.3.3/src/ic.h +0 -515
- data/ext/v8/upstream/2.3.3/src/interpreter-irregexp.cc +0 -646
- data/ext/v8/upstream/2.3.3/src/json.js +0 -268
- data/ext/v8/upstream/2.3.3/src/jsregexp.cc +0 -5283
- data/ext/v8/upstream/2.3.3/src/jsregexp.h +0 -1463
- data/ext/v8/upstream/2.3.3/src/jump-target-heavy.cc +0 -429
- data/ext/v8/upstream/2.3.3/src/jump-target-heavy.h +0 -244
- data/ext/v8/upstream/2.3.3/src/jump-target-light.cc +0 -110
- data/ext/v8/upstream/2.3.3/src/jump-target-light.h +0 -192
- data/ext/v8/upstream/2.3.3/src/list-inl.h +0 -166
- data/ext/v8/upstream/2.3.3/src/list.h +0 -159
- data/ext/v8/upstream/2.3.3/src/liveedit-debugger.js +0 -1057
- data/ext/v8/upstream/2.3.3/src/liveedit.cc +0 -1480
- data/ext/v8/upstream/2.3.3/src/liveedit.h +0 -170
- data/ext/v8/upstream/2.3.3/src/log-utils.cc +0 -497
- data/ext/v8/upstream/2.3.3/src/log-utils.h +0 -289
- data/ext/v8/upstream/2.3.3/src/log.cc +0 -1561
- data/ext/v8/upstream/2.3.3/src/log.h +0 -384
- data/ext/v8/upstream/2.3.3/src/macro-assembler.h +0 -86
- data/ext/v8/upstream/2.3.3/src/macros.py +0 -177
- data/ext/v8/upstream/2.3.3/src/mark-compact.cc +0 -2330
- data/ext/v8/upstream/2.3.3/src/mark-compact.h +0 -451
- data/ext/v8/upstream/2.3.3/src/math.js +0 -264
- data/ext/v8/upstream/2.3.3/src/memory.h +0 -74
- data/ext/v8/upstream/2.3.3/src/messages.cc +0 -183
- data/ext/v8/upstream/2.3.3/src/messages.h +0 -113
- data/ext/v8/upstream/2.3.3/src/messages.js +0 -982
- data/ext/v8/upstream/2.3.3/src/mips/assembler-mips.h +0 -668
- data/ext/v8/upstream/2.3.3/src/mips/builtins-mips.cc +0 -205
- data/ext/v8/upstream/2.3.3/src/mips/codegen-mips.h +0 -434
- data/ext/v8/upstream/2.3.3/src/mips/debug-mips.cc +0 -131
- data/ext/v8/upstream/2.3.3/src/mips/frames-mips.cc +0 -102
- data/ext/v8/upstream/2.3.3/src/mips/ic-mips.cc +0 -220
- data/ext/v8/upstream/2.3.3/src/mips/simulator-mips.cc +0 -1651
- data/ext/v8/upstream/2.3.3/src/mips/simulator-mips.h +0 -311
- data/ext/v8/upstream/2.3.3/src/mips/stub-cache-mips.cc +0 -403
- data/ext/v8/upstream/2.3.3/src/mirror-debugger.js +0 -2380
- data/ext/v8/upstream/2.3.3/src/objects-debug.cc +0 -1366
- data/ext/v8/upstream/2.3.3/src/objects-inl.h +0 -3333
- data/ext/v8/upstream/2.3.3/src/objects.cc +0 -8820
- data/ext/v8/upstream/2.3.3/src/objects.h +0 -5373
- data/ext/v8/upstream/2.3.3/src/oprofile-agent.cc +0 -108
- data/ext/v8/upstream/2.3.3/src/oprofile-agent.h +0 -77
- data/ext/v8/upstream/2.3.3/src/parser.cc +0 -5207
- data/ext/v8/upstream/2.3.3/src/parser.h +0 -197
- data/ext/v8/upstream/2.3.3/src/platform-freebsd.cc +0 -667
- data/ext/v8/upstream/2.3.3/src/platform-linux.cc +0 -862
- data/ext/v8/upstream/2.3.3/src/platform-macos.cc +0 -665
- data/ext/v8/upstream/2.3.3/src/platform-nullos.cc +0 -454
- data/ext/v8/upstream/2.3.3/src/platform-openbsd.cc +0 -622
- data/ext/v8/upstream/2.3.3/src/platform-posix.cc +0 -362
- data/ext/v8/upstream/2.3.3/src/platform-solaris.cc +0 -653
- data/ext/v8/upstream/2.3.3/src/platform-win32.cc +0 -1911
- data/ext/v8/upstream/2.3.3/src/platform.h +0 -577
- data/ext/v8/upstream/2.3.3/src/powers-ten.h +0 -2461
- data/ext/v8/upstream/2.3.3/src/prettyprinter.cc +0 -1531
- data/ext/v8/upstream/2.3.3/src/prettyprinter.h +0 -221
- data/ext/v8/upstream/2.3.3/src/profile-generator-inl.h +0 -148
- data/ext/v8/upstream/2.3.3/src/profile-generator.cc +0 -1830
- data/ext/v8/upstream/2.3.3/src/profile-generator.h +0 -853
- data/ext/v8/upstream/2.3.3/src/property.cc +0 -96
- data/ext/v8/upstream/2.3.3/src/property.h +0 -315
- data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-irregexp.cc +0 -464
- data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-irregexp.h +0 -141
- data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-tracer.cc +0 -356
- data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-tracer.h +0 -103
- data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler.cc +0 -261
- data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler.h +0 -228
- data/ext/v8/upstream/2.3.3/src/regexp.js +0 -549
- data/ext/v8/upstream/2.3.3/src/rewriter.cc +0 -1038
- data/ext/v8/upstream/2.3.3/src/rewriter.h +0 -54
- data/ext/v8/upstream/2.3.3/src/runtime.cc +0 -10599
- data/ext/v8/upstream/2.3.3/src/runtime.h +0 -459
- data/ext/v8/upstream/2.3.3/src/runtime.js +0 -629
- data/ext/v8/upstream/2.3.3/src/scanner.cc +0 -1346
- data/ext/v8/upstream/2.3.3/src/scanner.h +0 -503
- data/ext/v8/upstream/2.3.3/src/scopeinfo.cc +0 -637
- data/ext/v8/upstream/2.3.3/src/scopeinfo.h +0 -233
- data/ext/v8/upstream/2.3.3/src/scopes.cc +0 -962
- data/ext/v8/upstream/2.3.3/src/scopes.h +0 -400
- data/ext/v8/upstream/2.3.3/src/serialize.cc +0 -1461
- data/ext/v8/upstream/2.3.3/src/serialize.h +0 -581
- data/ext/v8/upstream/2.3.3/src/spaces-inl.h +0 -483
- data/ext/v8/upstream/2.3.3/src/spaces.cc +0 -2901
- data/ext/v8/upstream/2.3.3/src/spaces.h +0 -2197
- data/ext/v8/upstream/2.3.3/src/string-stream.cc +0 -584
- data/ext/v8/upstream/2.3.3/src/string-stream.h +0 -189
- data/ext/v8/upstream/2.3.3/src/string.js +0 -1006
- data/ext/v8/upstream/2.3.3/src/stub-cache.cc +0 -1379
- data/ext/v8/upstream/2.3.3/src/stub-cache.h +0 -756
- data/ext/v8/upstream/2.3.3/src/third_party/dtoa/COPYING +0 -15
- data/ext/v8/upstream/2.3.3/src/third_party/dtoa/dtoa.c +0 -3334
- data/ext/v8/upstream/2.3.3/src/token.cc +0 -56
- data/ext/v8/upstream/2.3.3/src/token.h +0 -270
- data/ext/v8/upstream/2.3.3/src/top.cc +0 -1067
- data/ext/v8/upstream/2.3.3/src/top.h +0 -463
- data/ext/v8/upstream/2.3.3/src/type-info.cc +0 -53
- data/ext/v8/upstream/2.3.3/src/type-info.h +0 -244
- data/ext/v8/upstream/2.3.3/src/unicode-inl.h +0 -238
- data/ext/v8/upstream/2.3.3/src/unicode.cc +0 -749
- data/ext/v8/upstream/2.3.3/src/unicode.h +0 -279
- data/ext/v8/upstream/2.3.3/src/uri.js +0 -415
- data/ext/v8/upstream/2.3.3/src/utils.cc +0 -285
- data/ext/v8/upstream/2.3.3/src/utils.h +0 -745
- data/ext/v8/upstream/2.3.3/src/v8-counters.h +0 -250
- data/ext/v8/upstream/2.3.3/src/v8.cc +0 -228
- data/ext/v8/upstream/2.3.3/src/v8.h +0 -121
- data/ext/v8/upstream/2.3.3/src/v8natives.js +0 -1188
- data/ext/v8/upstream/2.3.3/src/v8threads.cc +0 -461
- data/ext/v8/upstream/2.3.3/src/v8threads.h +0 -159
- data/ext/v8/upstream/2.3.3/src/variables.cc +0 -119
- data/ext/v8/upstream/2.3.3/src/variables.h +0 -205
- data/ext/v8/upstream/2.3.3/src/version.cc +0 -88
- data/ext/v8/upstream/2.3.3/src/virtual-frame-heavy-inl.h +0 -192
- data/ext/v8/upstream/2.3.3/src/virtual-frame.h +0 -46
- data/ext/v8/upstream/2.3.3/src/vm-state-inl.h +0 -137
- data/ext/v8/upstream/2.3.3/src/vm-state.cc +0 -39
- data/ext/v8/upstream/2.3.3/src/vm-state.h +0 -77
- data/ext/v8/upstream/2.3.3/src/x64/assembler-x64-inl.h +0 -400
- data/ext/v8/upstream/2.3.3/src/x64/assembler-x64.cc +0 -2963
- data/ext/v8/upstream/2.3.3/src/x64/assembler-x64.h +0 -1438
- data/ext/v8/upstream/2.3.3/src/x64/builtins-x64.cc +0 -1296
- data/ext/v8/upstream/2.3.3/src/x64/codegen-x64-inl.h +0 -46
- data/ext/v8/upstream/2.3.3/src/x64/codegen-x64.cc +0 -12491
- data/ext/v8/upstream/2.3.3/src/x64/codegen-x64.h +0 -1090
- data/ext/v8/upstream/2.3.3/src/x64/cpu-x64.cc +0 -83
- data/ext/v8/upstream/2.3.3/src/x64/debug-x64.cc +0 -267
- data/ext/v8/upstream/2.3.3/src/x64/disasm-x64.cc +0 -1696
- data/ext/v8/upstream/2.3.3/src/x64/fast-codegen-x64.cc +0 -250
- data/ext/v8/upstream/2.3.3/src/x64/frames-x64.cc +0 -113
- data/ext/v8/upstream/2.3.3/src/x64/frames-x64.h +0 -125
- data/ext/v8/upstream/2.3.3/src/x64/full-codegen-x64.cc +0 -3270
- data/ext/v8/upstream/2.3.3/src/x64/ic-x64.cc +0 -1907
- data/ext/v8/upstream/2.3.3/src/x64/jump-target-x64.cc +0 -437
- data/ext/v8/upstream/2.3.3/src/x64/macro-assembler-x64.cc +0 -2793
- data/ext/v8/upstream/2.3.3/src/x64/macro-assembler-x64.h +0 -916
- data/ext/v8/upstream/2.3.3/src/x64/regexp-macro-assembler-x64.cc +0 -1374
- data/ext/v8/upstream/2.3.3/src/x64/regexp-macro-assembler-x64.h +0 -277
- data/ext/v8/upstream/2.3.3/src/x64/simulator-x64.h +0 -63
- data/ext/v8/upstream/2.3.3/src/x64/stub-cache-x64.cc +0 -2560
- data/ext/v8/upstream/2.3.3/src/x64/virtual-frame-x64.cc +0 -1264
- data/ext/v8/upstream/2.3.3/src/x64/virtual-frame-x64.h +0 -590
- data/ext/v8/upstream/2.3.3/src/zone-inl.h +0 -82
- data/ext/v8/upstream/2.3.3/src/zone.cc +0 -194
- data/ext/v8/upstream/2.3.3/src/zone.h +0 -221
- data/ext/v8/upstream/2.3.3/tools/codemap.js +0 -270
- data/ext/v8/upstream/2.3.3/tools/csvparser.js +0 -83
- data/ext/v8/upstream/2.3.3/tools/gc-nvp-trace-processor.py +0 -317
- data/ext/v8/upstream/2.3.3/tools/gyp/v8.gyp +0 -749
- data/ext/v8/upstream/2.3.3/tools/linux-tick-processor.py +0 -78
- data/ext/v8/upstream/2.3.3/tools/logreader.js +0 -338
- data/ext/v8/upstream/2.3.3/tools/oprofile/annotate +0 -7
- data/ext/v8/upstream/2.3.3/tools/oprofile/common +0 -19
- data/ext/v8/upstream/2.3.3/tools/oprofile/dump +0 -7
- data/ext/v8/upstream/2.3.3/tools/oprofile/report +0 -7
- data/ext/v8/upstream/2.3.3/tools/oprofile/reset +0 -7
- data/ext/v8/upstream/2.3.3/tools/oprofile/run +0 -14
- data/ext/v8/upstream/2.3.3/tools/oprofile/shutdown +0 -7
- data/ext/v8/upstream/2.3.3/tools/oprofile/start +0 -7
- data/ext/v8/upstream/2.3.3/tools/presubmit.py +0 -299
- data/ext/v8/upstream/2.3.3/tools/profile.js +0 -691
- data/ext/v8/upstream/2.3.3/tools/profile_view.js +0 -224
- data/ext/v8/upstream/2.3.3/tools/splaytree.js +0 -322
- data/ext/v8/upstream/2.3.3/tools/splaytree.py +0 -226
- data/ext/v8/upstream/2.3.3/tools/tickprocessor.js +0 -862
- data/ext/v8/upstream/2.3.3/tools/tickprocessor.py +0 -571
- data/ext/v8/upstream/2.3.3/tools/utils.py +0 -88
- data/ext/v8/upstream/2.3.3/tools/visual_studio/README.txt +0 -71
- data/ext/v8/upstream/2.3.3/tools/visual_studio/common.vsprops +0 -34
- data/ext/v8/upstream/2.3.3/tools/visual_studio/debug.vsprops +0 -17
- data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base.vcproj +0 -1143
- data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base_arm.vcproj +0 -1115
- data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base_x64.vcproj +0 -1096
- data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample.vcproj +0 -145
- data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample_arm.vcproj +0 -145
- data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample_x64.vcproj +0 -161
- data/ext/v8/upstream/2.3.3/tools/windows-tick-processor.bat +0 -29
- data/ext/v8/upstream/2.3.3/tools/windows-tick-processor.py +0 -137
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,1650 @@
|
|
1
|
+
// Copyright 2010 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 <stdlib.h>
|
29
|
+
#include <cstdarg>
|
30
|
+
#include "v8.h"
|
31
|
+
|
32
|
+
#if defined(V8_TARGET_ARCH_MIPS)
|
33
|
+
|
34
|
+
#include "disasm.h"
|
35
|
+
#include "assembler.h"
|
36
|
+
#include "globals.h" // Need the BitCast
|
37
|
+
#include "mips/constants-mips.h"
|
38
|
+
#include "mips/simulator-mips.h"
|
39
|
+
|
40
|
+
namespace v8i = v8::internal;
|
41
|
+
|
42
|
+
#if !defined(__mips) || defined(USE_SIMULATOR)
|
43
|
+
|
44
|
+
// Only build the simulator if not compiling for real MIPS hardware.
|
45
|
+
namespace assembler {
|
46
|
+
namespace mips {
|
47
|
+
|
48
|
+
using ::v8::internal::Object;
|
49
|
+
using ::v8::internal::PrintF;
|
50
|
+
using ::v8::internal::OS;
|
51
|
+
using ::v8::internal::ReadLine;
|
52
|
+
using ::v8::internal::DeleteArray;
|
53
|
+
|
54
|
+
// Utils functions
|
55
|
+
bool HaveSameSign(int32_t a, int32_t b) {
|
56
|
+
return ((a ^ b) > 0);
|
57
|
+
}
|
58
|
+
|
59
|
+
|
60
|
+
// This macro provides a platform independent use of sscanf. The reason for
|
61
|
+
// SScanF not being implemented in a platform independent was through
|
62
|
+
// ::v8::internal::OS in the same way as SNPrintF is that the Windows C Run-Time
|
63
|
+
// Library does not provide vsscanf.
|
64
|
+
#define SScanF sscanf // NOLINT
|
65
|
+
|
66
|
+
// The Debugger class is used by the simulator while debugging simulated MIPS
|
67
|
+
// code.
|
68
|
+
class Debugger {
|
69
|
+
public:
|
70
|
+
explicit Debugger(Simulator* sim);
|
71
|
+
~Debugger();
|
72
|
+
|
73
|
+
void Stop(Instruction* instr);
|
74
|
+
void Debug();
|
75
|
+
|
76
|
+
private:
|
77
|
+
// We set the breakpoint code to 0xfffff to easily recognize it.
|
78
|
+
static const Instr kBreakpointInstr = SPECIAL | BREAK | 0xfffff << 6;
|
79
|
+
static const Instr kNopInstr = 0x0;
|
80
|
+
|
81
|
+
Simulator* sim_;
|
82
|
+
|
83
|
+
int32_t GetRegisterValue(int regnum);
|
84
|
+
bool GetValue(const char* desc, int32_t* value);
|
85
|
+
|
86
|
+
// Set or delete a breakpoint. Returns true if successful.
|
87
|
+
bool SetBreakpoint(Instruction* breakpc);
|
88
|
+
bool DeleteBreakpoint(Instruction* breakpc);
|
89
|
+
|
90
|
+
// Undo and redo all breakpoints. This is needed to bracket disassembly and
|
91
|
+
// execution to skip past breakpoints when run from the debugger.
|
92
|
+
void UndoBreakpoints();
|
93
|
+
void RedoBreakpoints();
|
94
|
+
|
95
|
+
// Print all registers with a nice formatting.
|
96
|
+
void PrintAllRegs();
|
97
|
+
};
|
98
|
+
|
99
|
+
Debugger::Debugger(Simulator* sim) {
|
100
|
+
sim_ = sim;
|
101
|
+
}
|
102
|
+
|
103
|
+
Debugger::~Debugger() {
|
104
|
+
}
|
105
|
+
|
106
|
+
#ifdef GENERATED_CODE_COVERAGE
|
107
|
+
static FILE* coverage_log = NULL;
|
108
|
+
|
109
|
+
|
110
|
+
static void InitializeCoverage() {
|
111
|
+
char* file_name = getenv("V8_GENERATED_CODE_COVERAGE_LOG");
|
112
|
+
if (file_name != NULL) {
|
113
|
+
coverage_log = fopen(file_name, "aw+");
|
114
|
+
}
|
115
|
+
}
|
116
|
+
|
117
|
+
|
118
|
+
void Debugger::Stop(Instruction* instr) {
|
119
|
+
UNIMPLEMENTED_MIPS();
|
120
|
+
char* str = reinterpret_cast<char*>(instr->InstructionBits());
|
121
|
+
if (strlen(str) > 0) {
|
122
|
+
if (coverage_log != NULL) {
|
123
|
+
fprintf(coverage_log, "%s\n", str);
|
124
|
+
fflush(coverage_log);
|
125
|
+
}
|
126
|
+
instr->SetInstructionBits(0x0); // Overwrite with nop.
|
127
|
+
}
|
128
|
+
sim_->set_pc(sim_->get_pc() + Instruction::kInstructionSize);
|
129
|
+
}
|
130
|
+
|
131
|
+
#else // ndef GENERATED_CODE_COVERAGE
|
132
|
+
|
133
|
+
#define UNSUPPORTED() printf("Unsupported instruction.\n");
|
134
|
+
|
135
|
+
static void InitializeCoverage() {}
|
136
|
+
|
137
|
+
|
138
|
+
void Debugger::Stop(Instruction* instr) {
|
139
|
+
const char* str = reinterpret_cast<char*>(instr->InstructionBits());
|
140
|
+
PrintF("Simulator hit %s\n", str);
|
141
|
+
sim_->set_pc(sim_->get_pc() + Instruction::kInstructionSize);
|
142
|
+
Debug();
|
143
|
+
}
|
144
|
+
#endif // GENERATED_CODE_COVERAGE
|
145
|
+
|
146
|
+
|
147
|
+
int32_t Debugger::GetRegisterValue(int regnum) {
|
148
|
+
if (regnum == kNumSimuRegisters) {
|
149
|
+
return sim_->get_pc();
|
150
|
+
} else {
|
151
|
+
return sim_->get_register(regnum);
|
152
|
+
}
|
153
|
+
}
|
154
|
+
|
155
|
+
|
156
|
+
bool Debugger::GetValue(const char* desc, int32_t* value) {
|
157
|
+
int regnum = Registers::Number(desc);
|
158
|
+
if (regnum != kInvalidRegister) {
|
159
|
+
*value = GetRegisterValue(regnum);
|
160
|
+
return true;
|
161
|
+
} else {
|
162
|
+
return SScanF(desc, "%i", value) == 1;
|
163
|
+
}
|
164
|
+
return false;
|
165
|
+
}
|
166
|
+
|
167
|
+
|
168
|
+
bool Debugger::SetBreakpoint(Instruction* breakpc) {
|
169
|
+
// Check if a breakpoint can be set. If not return without any side-effects.
|
170
|
+
if (sim_->break_pc_ != NULL) {
|
171
|
+
return false;
|
172
|
+
}
|
173
|
+
|
174
|
+
// Set the breakpoint.
|
175
|
+
sim_->break_pc_ = breakpc;
|
176
|
+
sim_->break_instr_ = breakpc->InstructionBits();
|
177
|
+
// Not setting the breakpoint instruction in the code itself. It will be set
|
178
|
+
// when the debugger shell continues.
|
179
|
+
return true;
|
180
|
+
}
|
181
|
+
|
182
|
+
|
183
|
+
bool Debugger::DeleteBreakpoint(Instruction* breakpc) {
|
184
|
+
if (sim_->break_pc_ != NULL) {
|
185
|
+
sim_->break_pc_->SetInstructionBits(sim_->break_instr_);
|
186
|
+
}
|
187
|
+
|
188
|
+
sim_->break_pc_ = NULL;
|
189
|
+
sim_->break_instr_ = 0;
|
190
|
+
return true;
|
191
|
+
}
|
192
|
+
|
193
|
+
|
194
|
+
void Debugger::UndoBreakpoints() {
|
195
|
+
if (sim_->break_pc_ != NULL) {
|
196
|
+
sim_->break_pc_->SetInstructionBits(sim_->break_instr_);
|
197
|
+
}
|
198
|
+
}
|
199
|
+
|
200
|
+
|
201
|
+
void Debugger::RedoBreakpoints() {
|
202
|
+
if (sim_->break_pc_ != NULL) {
|
203
|
+
sim_->break_pc_->SetInstructionBits(kBreakpointInstr);
|
204
|
+
}
|
205
|
+
}
|
206
|
+
|
207
|
+
void Debugger::PrintAllRegs() {
|
208
|
+
#define REG_INFO(n) Registers::Name(n), GetRegisterValue(n), GetRegisterValue(n)
|
209
|
+
|
210
|
+
PrintF("\n");
|
211
|
+
// at, v0, a0
|
212
|
+
PrintF("%3s: 0x%08x %10d\t%3s: 0x%08x %10d\t%3s: 0x%08x %10d\n",
|
213
|
+
REG_INFO(1), REG_INFO(2), REG_INFO(4));
|
214
|
+
// v1, a1
|
215
|
+
PrintF("%26s\t%3s: 0x%08x %10d\t%3s: 0x%08x %10d\n",
|
216
|
+
"", REG_INFO(3), REG_INFO(5));
|
217
|
+
// a2
|
218
|
+
PrintF("%26s\t%26s\t%3s: 0x%08x %10d\n", "", "", REG_INFO(6));
|
219
|
+
// a3
|
220
|
+
PrintF("%26s\t%26s\t%3s: 0x%08x %10d\n", "", "", REG_INFO(7));
|
221
|
+
PrintF("\n");
|
222
|
+
// t0-t7, s0-s7
|
223
|
+
for (int i = 0; i < 8; i++) {
|
224
|
+
PrintF("%3s: 0x%08x %10d\t%3s: 0x%08x %10d\n",
|
225
|
+
REG_INFO(8+i), REG_INFO(16+i));
|
226
|
+
}
|
227
|
+
PrintF("\n");
|
228
|
+
// t8, k0, LO
|
229
|
+
PrintF("%3s: 0x%08x %10d\t%3s: 0x%08x %10d\t%3s: 0x%08x %10d\n",
|
230
|
+
REG_INFO(24), REG_INFO(26), REG_INFO(32));
|
231
|
+
// t9, k1, HI
|
232
|
+
PrintF("%3s: 0x%08x %10d\t%3s: 0x%08x %10d\t%3s: 0x%08x %10d\n",
|
233
|
+
REG_INFO(25), REG_INFO(27), REG_INFO(33));
|
234
|
+
// sp, fp, gp
|
235
|
+
PrintF("%3s: 0x%08x %10d\t%3s: 0x%08x %10d\t%3s: 0x%08x %10d\n",
|
236
|
+
REG_INFO(29), REG_INFO(30), REG_INFO(28));
|
237
|
+
// pc
|
238
|
+
PrintF("%3s: 0x%08x %10d\t%3s: 0x%08x %10d\n",
|
239
|
+
REG_INFO(31), REG_INFO(34));
|
240
|
+
#undef REG_INFO
|
241
|
+
}
|
242
|
+
|
243
|
+
void Debugger::Debug() {
|
244
|
+
intptr_t last_pc = -1;
|
245
|
+
bool done = false;
|
246
|
+
|
247
|
+
#define COMMAND_SIZE 63
|
248
|
+
#define ARG_SIZE 255
|
249
|
+
|
250
|
+
#define STR(a) #a
|
251
|
+
#define XSTR(a) STR(a)
|
252
|
+
|
253
|
+
char cmd[COMMAND_SIZE + 1];
|
254
|
+
char arg1[ARG_SIZE + 1];
|
255
|
+
char arg2[ARG_SIZE + 1];
|
256
|
+
|
257
|
+
// make sure to have a proper terminating character if reaching the limit
|
258
|
+
cmd[COMMAND_SIZE] = 0;
|
259
|
+
arg1[ARG_SIZE] = 0;
|
260
|
+
arg2[ARG_SIZE] = 0;
|
261
|
+
|
262
|
+
// Undo all set breakpoints while running in the debugger shell. This will
|
263
|
+
// make them invisible to all commands.
|
264
|
+
UndoBreakpoints();
|
265
|
+
|
266
|
+
while (!done && (sim_->get_pc() != Simulator::end_sim_pc)) {
|
267
|
+
if (last_pc != sim_->get_pc()) {
|
268
|
+
disasm::NameConverter converter;
|
269
|
+
disasm::Disassembler dasm(converter);
|
270
|
+
// use a reasonably large buffer
|
271
|
+
v8::internal::EmbeddedVector<char, 256> buffer;
|
272
|
+
dasm.InstructionDecode(buffer,
|
273
|
+
reinterpret_cast<byte_*>(sim_->get_pc()));
|
274
|
+
PrintF(" 0x%08x %s\n", sim_->get_pc(), buffer.start());
|
275
|
+
last_pc = sim_->get_pc();
|
276
|
+
}
|
277
|
+
char* line = ReadLine("sim> ");
|
278
|
+
if (line == NULL) {
|
279
|
+
break;
|
280
|
+
} else {
|
281
|
+
// Use sscanf to parse the individual parts of the command line. At the
|
282
|
+
// moment no command expects more than two parameters.
|
283
|
+
int args = SScanF(line,
|
284
|
+
"%" XSTR(COMMAND_SIZE) "s "
|
285
|
+
"%" XSTR(ARG_SIZE) "s "
|
286
|
+
"%" XSTR(ARG_SIZE) "s",
|
287
|
+
cmd, arg1, arg2);
|
288
|
+
if ((strcmp(cmd, "si") == 0) || (strcmp(cmd, "stepi") == 0)) {
|
289
|
+
if (!(reinterpret_cast<Instruction*>(sim_->get_pc())->IsTrap())) {
|
290
|
+
sim_->InstructionDecode(
|
291
|
+
reinterpret_cast<Instruction*>(sim_->get_pc()));
|
292
|
+
} else {
|
293
|
+
// Allow si to jump over generated breakpoints.
|
294
|
+
PrintF("/!\\ Jumping over generated breakpoint.\n");
|
295
|
+
sim_->set_pc(sim_->get_pc() + Instruction::kInstructionSize);
|
296
|
+
}
|
297
|
+
} else if ((strcmp(cmd, "c") == 0) || (strcmp(cmd, "cont") == 0)) {
|
298
|
+
// Execute the one instruction we broke at with breakpoints disabled.
|
299
|
+
sim_->InstructionDecode(reinterpret_cast<Instruction*>(sim_->get_pc()));
|
300
|
+
// Leave the debugger shell.
|
301
|
+
done = true;
|
302
|
+
} else if ((strcmp(cmd, "p") == 0) || (strcmp(cmd, "print") == 0)) {
|
303
|
+
if (args == 2) {
|
304
|
+
int32_t value;
|
305
|
+
if (strcmp(arg1, "all") == 0) {
|
306
|
+
PrintAllRegs();
|
307
|
+
} else {
|
308
|
+
if (GetValue(arg1, &value)) {
|
309
|
+
PrintF("%s: 0x%08x %d \n", arg1, value, value);
|
310
|
+
} else {
|
311
|
+
PrintF("%s unrecognized\n", arg1);
|
312
|
+
}
|
313
|
+
}
|
314
|
+
} else {
|
315
|
+
PrintF("print <register>\n");
|
316
|
+
}
|
317
|
+
} else if ((strcmp(cmd, "po") == 0)
|
318
|
+
|| (strcmp(cmd, "printobject") == 0)) {
|
319
|
+
if (args == 2) {
|
320
|
+
int32_t value;
|
321
|
+
if (GetValue(arg1, &value)) {
|
322
|
+
Object* obj = reinterpret_cast<Object*>(value);
|
323
|
+
PrintF("%s: \n", arg1);
|
324
|
+
#ifdef DEBUG
|
325
|
+
obj->PrintLn();
|
326
|
+
#else
|
327
|
+
obj->ShortPrint();
|
328
|
+
PrintF("\n");
|
329
|
+
#endif
|
330
|
+
} else {
|
331
|
+
PrintF("%s unrecognized\n", arg1);
|
332
|
+
}
|
333
|
+
} else {
|
334
|
+
PrintF("printobject <value>\n");
|
335
|
+
}
|
336
|
+
} else if ((strcmp(cmd, "disasm") == 0) || (strcmp(cmd, "dpc") == 0)) {
|
337
|
+
disasm::NameConverter converter;
|
338
|
+
disasm::Disassembler dasm(converter);
|
339
|
+
// use a reasonably large buffer
|
340
|
+
v8::internal::EmbeddedVector<char, 256> buffer;
|
341
|
+
|
342
|
+
byte_* cur = NULL;
|
343
|
+
byte_* end = NULL;
|
344
|
+
|
345
|
+
if (args == 1) {
|
346
|
+
cur = reinterpret_cast<byte_*>(sim_->get_pc());
|
347
|
+
end = cur + (10 * Instruction::kInstructionSize);
|
348
|
+
} else if (args == 2) {
|
349
|
+
int32_t value;
|
350
|
+
if (GetValue(arg1, &value)) {
|
351
|
+
cur = reinterpret_cast<byte_*>(value);
|
352
|
+
// no length parameter passed, assume 10 instructions
|
353
|
+
end = cur + (10 * Instruction::kInstructionSize);
|
354
|
+
}
|
355
|
+
} else {
|
356
|
+
int32_t value1;
|
357
|
+
int32_t value2;
|
358
|
+
if (GetValue(arg1, &value1) && GetValue(arg2, &value2)) {
|
359
|
+
cur = reinterpret_cast<byte_*>(value1);
|
360
|
+
end = cur + (value2 * Instruction::kInstructionSize);
|
361
|
+
}
|
362
|
+
}
|
363
|
+
|
364
|
+
while (cur < end) {
|
365
|
+
dasm.InstructionDecode(buffer, cur);
|
366
|
+
PrintF(" 0x%08x %s\n", cur, buffer.start());
|
367
|
+
cur += Instruction::kInstructionSize;
|
368
|
+
}
|
369
|
+
} else if (strcmp(cmd, "gdb") == 0) {
|
370
|
+
PrintF("relinquishing control to gdb\n");
|
371
|
+
v8::internal::OS::DebugBreak();
|
372
|
+
PrintF("regaining control from gdb\n");
|
373
|
+
} else if (strcmp(cmd, "break") == 0) {
|
374
|
+
if (args == 2) {
|
375
|
+
int32_t value;
|
376
|
+
if (GetValue(arg1, &value)) {
|
377
|
+
if (!SetBreakpoint(reinterpret_cast<Instruction*>(value))) {
|
378
|
+
PrintF("setting breakpoint failed\n");
|
379
|
+
}
|
380
|
+
} else {
|
381
|
+
PrintF("%s unrecognized\n", arg1);
|
382
|
+
}
|
383
|
+
} else {
|
384
|
+
PrintF("break <address>\n");
|
385
|
+
}
|
386
|
+
} else if (strcmp(cmd, "del") == 0) {
|
387
|
+
if (!DeleteBreakpoint(NULL)) {
|
388
|
+
PrintF("deleting breakpoint failed\n");
|
389
|
+
}
|
390
|
+
} else if (strcmp(cmd, "flags") == 0) {
|
391
|
+
PrintF("No flags on MIPS !\n");
|
392
|
+
} else if (strcmp(cmd, "unstop") == 0) {
|
393
|
+
PrintF("Unstop command not implemented on MIPS.");
|
394
|
+
} else if ((strcmp(cmd, "stat") == 0) || (strcmp(cmd, "st") == 0)) {
|
395
|
+
// Print registers and disassemble
|
396
|
+
PrintAllRegs();
|
397
|
+
PrintF("\n");
|
398
|
+
|
399
|
+
disasm::NameConverter converter;
|
400
|
+
disasm::Disassembler dasm(converter);
|
401
|
+
// use a reasonably large buffer
|
402
|
+
v8::internal::EmbeddedVector<char, 256> buffer;
|
403
|
+
|
404
|
+
byte_* cur = NULL;
|
405
|
+
byte_* end = NULL;
|
406
|
+
|
407
|
+
if (args == 1) {
|
408
|
+
cur = reinterpret_cast<byte_*>(sim_->get_pc());
|
409
|
+
end = cur + (10 * Instruction::kInstructionSize);
|
410
|
+
} else if (args == 2) {
|
411
|
+
int32_t value;
|
412
|
+
if (GetValue(arg1, &value)) {
|
413
|
+
cur = reinterpret_cast<byte_*>(value);
|
414
|
+
// no length parameter passed, assume 10 instructions
|
415
|
+
end = cur + (10 * Instruction::kInstructionSize);
|
416
|
+
}
|
417
|
+
} else {
|
418
|
+
int32_t value1;
|
419
|
+
int32_t value2;
|
420
|
+
if (GetValue(arg1, &value1) && GetValue(arg2, &value2)) {
|
421
|
+
cur = reinterpret_cast<byte_*>(value1);
|
422
|
+
end = cur + (value2 * Instruction::kInstructionSize);
|
423
|
+
}
|
424
|
+
}
|
425
|
+
|
426
|
+
while (cur < end) {
|
427
|
+
dasm.InstructionDecode(buffer, cur);
|
428
|
+
PrintF(" 0x%08x %s\n", cur, buffer.start());
|
429
|
+
cur += Instruction::kInstructionSize;
|
430
|
+
}
|
431
|
+
} else if ((strcmp(cmd, "h") == 0) || (strcmp(cmd, "help") == 0)) {
|
432
|
+
PrintF("cont\n");
|
433
|
+
PrintF(" continue execution (alias 'c')\n");
|
434
|
+
PrintF("stepi\n");
|
435
|
+
PrintF(" step one instruction (alias 'si')\n");
|
436
|
+
PrintF("print <register>\n");
|
437
|
+
PrintF(" print register content (alias 'p')\n");
|
438
|
+
PrintF(" use register name 'all' to print all registers\n");
|
439
|
+
PrintF("printobject <register>\n");
|
440
|
+
PrintF(" print an object from a register (alias 'po')\n");
|
441
|
+
PrintF("flags\n");
|
442
|
+
PrintF(" print flags\n");
|
443
|
+
PrintF("disasm [<instructions>]\n");
|
444
|
+
PrintF("disasm [[<address>] <instructions>]\n");
|
445
|
+
PrintF(" disassemble code, default is 10 instructions from pc\n");
|
446
|
+
PrintF("gdb\n");
|
447
|
+
PrintF(" enter gdb\n");
|
448
|
+
PrintF("break <address>\n");
|
449
|
+
PrintF(" set a break point on the address\n");
|
450
|
+
PrintF("del\n");
|
451
|
+
PrintF(" delete the breakpoint\n");
|
452
|
+
PrintF("unstop\n");
|
453
|
+
PrintF(" ignore the stop instruction at the current location");
|
454
|
+
PrintF(" from now on\n");
|
455
|
+
} else {
|
456
|
+
PrintF("Unknown command: %s\n", cmd);
|
457
|
+
}
|
458
|
+
}
|
459
|
+
DeleteArray(line);
|
460
|
+
}
|
461
|
+
|
462
|
+
// Add all the breakpoints back to stop execution and enter the debugger
|
463
|
+
// shell when hit.
|
464
|
+
RedoBreakpoints();
|
465
|
+
|
466
|
+
#undef COMMAND_SIZE
|
467
|
+
#undef ARG_SIZE
|
468
|
+
|
469
|
+
#undef STR
|
470
|
+
#undef XSTR
|
471
|
+
}
|
472
|
+
|
473
|
+
|
474
|
+
// Create one simulator per thread and keep it in thread local storage.
|
475
|
+
static v8::internal::Thread::LocalStorageKey simulator_key;
|
476
|
+
|
477
|
+
|
478
|
+
bool Simulator::initialized_ = false;
|
479
|
+
|
480
|
+
|
481
|
+
void Simulator::Initialize() {
|
482
|
+
if (initialized_) return;
|
483
|
+
simulator_key = v8::internal::Thread::CreateThreadLocalKey();
|
484
|
+
initialized_ = true;
|
485
|
+
::v8::internal::ExternalReference::set_redirector(&RedirectExternalReference);
|
486
|
+
}
|
487
|
+
|
488
|
+
|
489
|
+
Simulator::Simulator() {
|
490
|
+
Initialize();
|
491
|
+
// Setup simulator support first. Some of this information is needed to
|
492
|
+
// setup the architecture state.
|
493
|
+
size_t stack_size = 1 * 1024*1024; // allocate 1MB for stack
|
494
|
+
stack_ = reinterpret_cast<char*>(malloc(stack_size));
|
495
|
+
pc_modified_ = false;
|
496
|
+
icount_ = 0;
|
497
|
+
break_pc_ = NULL;
|
498
|
+
break_instr_ = 0;
|
499
|
+
|
500
|
+
// Setup architecture state.
|
501
|
+
// All registers are initialized to zero to start with.
|
502
|
+
for (int i = 0; i < kNumSimuRegisters; i++) {
|
503
|
+
registers_[i] = 0;
|
504
|
+
}
|
505
|
+
|
506
|
+
// The sp is initialized to point to the bottom (high address) of the
|
507
|
+
// allocated stack area. To be safe in potential stack underflows we leave
|
508
|
+
// some buffer below.
|
509
|
+
registers_[sp] = reinterpret_cast<int32_t>(stack_) + stack_size - 64;
|
510
|
+
// The ra and pc are initialized to a known bad value that will cause an
|
511
|
+
// access violation if the simulator ever tries to execute it.
|
512
|
+
registers_[pc] = bad_ra;
|
513
|
+
registers_[ra] = bad_ra;
|
514
|
+
InitializeCoverage();
|
515
|
+
}
|
516
|
+
|
517
|
+
|
518
|
+
// When the generated code calls an external reference we need to catch that in
|
519
|
+
// the simulator. The external reference will be a function compiled for the
|
520
|
+
// host architecture. We need to call that function instead of trying to
|
521
|
+
// execute it with the simulator. We do that by redirecting the external
|
522
|
+
// reference to a swi (software-interrupt) instruction that is handled by
|
523
|
+
// the simulator. We write the original destination of the jump just at a known
|
524
|
+
// offset from the swi instruction so the simulator knows what to call.
|
525
|
+
class Redirection {
|
526
|
+
public:
|
527
|
+
Redirection(void* external_function, bool fp_return)
|
528
|
+
: external_function_(external_function),
|
529
|
+
swi_instruction_(rtCallRedirInstr),
|
530
|
+
fp_return_(fp_return),
|
531
|
+
next_(list_) {
|
532
|
+
list_ = this;
|
533
|
+
}
|
534
|
+
|
535
|
+
void* address_of_swi_instruction() {
|
536
|
+
return reinterpret_cast<void*>(&swi_instruction_);
|
537
|
+
}
|
538
|
+
|
539
|
+
void* external_function() { return external_function_; }
|
540
|
+
bool fp_return() { return fp_return_; }
|
541
|
+
|
542
|
+
static Redirection* Get(void* external_function, bool fp_return) {
|
543
|
+
Redirection* current;
|
544
|
+
for (current = list_; current != NULL; current = current->next_) {
|
545
|
+
if (current->external_function_ == external_function) return current;
|
546
|
+
}
|
547
|
+
return new Redirection(external_function, fp_return);
|
548
|
+
}
|
549
|
+
|
550
|
+
static Redirection* FromSwiInstruction(Instruction* swi_instruction) {
|
551
|
+
char* addr_of_swi = reinterpret_cast<char*>(swi_instruction);
|
552
|
+
char* addr_of_redirection =
|
553
|
+
addr_of_swi - OFFSET_OF(Redirection, swi_instruction_);
|
554
|
+
return reinterpret_cast<Redirection*>(addr_of_redirection);
|
555
|
+
}
|
556
|
+
|
557
|
+
private:
|
558
|
+
void* external_function_;
|
559
|
+
uint32_t swi_instruction_;
|
560
|
+
bool fp_return_;
|
561
|
+
Redirection* next_;
|
562
|
+
static Redirection* list_;
|
563
|
+
};
|
564
|
+
|
565
|
+
|
566
|
+
Redirection* Redirection::list_ = NULL;
|
567
|
+
|
568
|
+
|
569
|
+
void* Simulator::RedirectExternalReference(void* external_function,
|
570
|
+
bool fp_return) {
|
571
|
+
Redirection* redirection = Redirection::Get(external_function, fp_return);
|
572
|
+
return redirection->address_of_swi_instruction();
|
573
|
+
}
|
574
|
+
|
575
|
+
|
576
|
+
// Get the active Simulator for the current thread.
|
577
|
+
Simulator* Simulator::current() {
|
578
|
+
Initialize();
|
579
|
+
Simulator* sim = reinterpret_cast<Simulator*>(
|
580
|
+
v8::internal::Thread::GetThreadLocal(simulator_key));
|
581
|
+
if (sim == NULL) {
|
582
|
+
// TODO(146): delete the simulator object when a thread goes away.
|
583
|
+
sim = new Simulator();
|
584
|
+
v8::internal::Thread::SetThreadLocal(simulator_key, sim);
|
585
|
+
}
|
586
|
+
return sim;
|
587
|
+
}
|
588
|
+
|
589
|
+
|
590
|
+
// Sets the register in the architecture state. It will also deal with updating
|
591
|
+
// Simulator internal state for special registers such as PC.
|
592
|
+
void Simulator::set_register(int reg, int32_t value) {
|
593
|
+
ASSERT((reg >= 0) && (reg < kNumSimuRegisters));
|
594
|
+
if (reg == pc) {
|
595
|
+
pc_modified_ = true;
|
596
|
+
}
|
597
|
+
|
598
|
+
// zero register always hold 0.
|
599
|
+
registers_[reg] = (reg == 0) ? 0 : value;
|
600
|
+
}
|
601
|
+
|
602
|
+
void Simulator::set_fpu_register(int fpureg, int32_t value) {
|
603
|
+
ASSERT((fpureg >= 0) && (fpureg < kNumFPURegisters));
|
604
|
+
FPUregisters_[fpureg] = value;
|
605
|
+
}
|
606
|
+
|
607
|
+
void Simulator::set_fpu_register_double(int fpureg, double value) {
|
608
|
+
ASSERT((fpureg >= 0) && (fpureg < kNumFPURegisters) && ((fpureg % 2) == 0));
|
609
|
+
*v8i::BitCast<double*>(&FPUregisters_[fpureg]) = value;
|
610
|
+
}
|
611
|
+
|
612
|
+
|
613
|
+
// Get the register from the architecture state. This function does handle
|
614
|
+
// the special case of accessing the PC register.
|
615
|
+
int32_t Simulator::get_register(int reg) const {
|
616
|
+
ASSERT((reg >= 0) && (reg < kNumSimuRegisters));
|
617
|
+
if (reg == 0)
|
618
|
+
return 0;
|
619
|
+
else
|
620
|
+
return registers_[reg] + ((reg == pc) ? Instruction::kPCReadOffset : 0);
|
621
|
+
}
|
622
|
+
|
623
|
+
int32_t Simulator::get_fpu_register(int fpureg) const {
|
624
|
+
ASSERT((fpureg >= 0) && (fpureg < kNumFPURegisters));
|
625
|
+
return FPUregisters_[fpureg];
|
626
|
+
}
|
627
|
+
|
628
|
+
double Simulator::get_fpu_register_double(int fpureg) const {
|
629
|
+
ASSERT((fpureg >= 0) && (fpureg < kNumFPURegisters) && ((fpureg % 2) == 0));
|
630
|
+
return *v8i::BitCast<double*>(const_cast<int32_t*>(&FPUregisters_[fpureg]));
|
631
|
+
}
|
632
|
+
|
633
|
+
// Raw access to the PC register.
|
634
|
+
void Simulator::set_pc(int32_t value) {
|
635
|
+
pc_modified_ = true;
|
636
|
+
registers_[pc] = value;
|
637
|
+
}
|
638
|
+
|
639
|
+
// Raw access to the PC register without the special adjustment when reading.
|
640
|
+
int32_t Simulator::get_pc() const {
|
641
|
+
return registers_[pc];
|
642
|
+
}
|
643
|
+
|
644
|
+
|
645
|
+
// The MIPS cannot do unaligned reads and writes. On some MIPS platforms an
|
646
|
+
// interrupt is caused. On others it does a funky rotation thing. For now we
|
647
|
+
// simply disallow unaligned reads, but at some point we may want to move to
|
648
|
+
// emulating the rotate behaviour. Note that simulator runs have the runtime
|
649
|
+
// system running directly on the host system and only generated code is
|
650
|
+
// executed in the simulator. Since the host is typically IA32 we will not
|
651
|
+
// get the correct MIPS-like behaviour on unaligned accesses.
|
652
|
+
|
653
|
+
int Simulator::ReadW(int32_t addr, Instruction* instr) {
|
654
|
+
if ((addr & v8i::kPointerAlignmentMask) == 0) {
|
655
|
+
intptr_t* ptr = reinterpret_cast<intptr_t*>(addr);
|
656
|
+
return *ptr;
|
657
|
+
}
|
658
|
+
PrintF("Unaligned read at 0x%08x, pc=%p\n", addr, instr);
|
659
|
+
OS::Abort();
|
660
|
+
return 0;
|
661
|
+
}
|
662
|
+
|
663
|
+
|
664
|
+
void Simulator::WriteW(int32_t addr, int value, Instruction* instr) {
|
665
|
+
if ((addr & v8i::kPointerAlignmentMask) == 0) {
|
666
|
+
intptr_t* ptr = reinterpret_cast<intptr_t*>(addr);
|
667
|
+
*ptr = value;
|
668
|
+
return;
|
669
|
+
}
|
670
|
+
PrintF("Unaligned write at 0x%08x, pc=%p\n", addr, instr);
|
671
|
+
OS::Abort();
|
672
|
+
}
|
673
|
+
|
674
|
+
|
675
|
+
double Simulator::ReadD(int32_t addr, Instruction* instr) {
|
676
|
+
if ((addr & kDoubleAlignmentMask) == 0) {
|
677
|
+
double* ptr = reinterpret_cast<double*>(addr);
|
678
|
+
return *ptr;
|
679
|
+
}
|
680
|
+
PrintF("Unaligned read at 0x%08x, pc=%p\n", addr, instr);
|
681
|
+
OS::Abort();
|
682
|
+
return 0;
|
683
|
+
}
|
684
|
+
|
685
|
+
|
686
|
+
void Simulator::WriteD(int32_t addr, double value, Instruction* instr) {
|
687
|
+
if ((addr & kDoubleAlignmentMask) == 0) {
|
688
|
+
double* ptr = reinterpret_cast<double*>(addr);
|
689
|
+
*ptr = value;
|
690
|
+
return;
|
691
|
+
}
|
692
|
+
PrintF("Unaligned write at 0x%08x, pc=%p\n", addr, instr);
|
693
|
+
OS::Abort();
|
694
|
+
}
|
695
|
+
|
696
|
+
|
697
|
+
uint16_t Simulator::ReadHU(int32_t addr, Instruction* instr) {
|
698
|
+
if ((addr & 1) == 0) {
|
699
|
+
uint16_t* ptr = reinterpret_cast<uint16_t*>(addr);
|
700
|
+
return *ptr;
|
701
|
+
}
|
702
|
+
PrintF("Unaligned unsigned halfword read at 0x%08x, pc=%p\n", addr, instr);
|
703
|
+
OS::Abort();
|
704
|
+
return 0;
|
705
|
+
}
|
706
|
+
|
707
|
+
|
708
|
+
int16_t Simulator::ReadH(int32_t addr, Instruction* instr) {
|
709
|
+
if ((addr & 1) == 0) {
|
710
|
+
int16_t* ptr = reinterpret_cast<int16_t*>(addr);
|
711
|
+
return *ptr;
|
712
|
+
}
|
713
|
+
PrintF("Unaligned signed halfword read at 0x%08x, pc=%p\n", addr, instr);
|
714
|
+
OS::Abort();
|
715
|
+
return 0;
|
716
|
+
}
|
717
|
+
|
718
|
+
|
719
|
+
void Simulator::WriteH(int32_t addr, uint16_t value, Instruction* instr) {
|
720
|
+
if ((addr & 1) == 0) {
|
721
|
+
uint16_t* ptr = reinterpret_cast<uint16_t*>(addr);
|
722
|
+
*ptr = value;
|
723
|
+
return;
|
724
|
+
}
|
725
|
+
PrintF("Unaligned unsigned halfword write at 0x%08x, pc=%p\n", addr, instr);
|
726
|
+
OS::Abort();
|
727
|
+
}
|
728
|
+
|
729
|
+
|
730
|
+
void Simulator::WriteH(int32_t addr, int16_t value, Instruction* instr) {
|
731
|
+
if ((addr & 1) == 0) {
|
732
|
+
int16_t* ptr = reinterpret_cast<int16_t*>(addr);
|
733
|
+
*ptr = value;
|
734
|
+
return;
|
735
|
+
}
|
736
|
+
PrintF("Unaligned halfword write at 0x%08x, pc=%p\n", addr, instr);
|
737
|
+
OS::Abort();
|
738
|
+
}
|
739
|
+
|
740
|
+
|
741
|
+
uint32_t Simulator::ReadBU(int32_t addr) {
|
742
|
+
uint8_t* ptr = reinterpret_cast<uint8_t*>(addr);
|
743
|
+
return *ptr & 0xff;
|
744
|
+
}
|
745
|
+
|
746
|
+
|
747
|
+
int32_t Simulator::ReadB(int32_t addr) {
|
748
|
+
int8_t* ptr = reinterpret_cast<int8_t*>(addr);
|
749
|
+
return ((*ptr << 24) >> 24) & 0xff;
|
750
|
+
}
|
751
|
+
|
752
|
+
|
753
|
+
void Simulator::WriteB(int32_t addr, uint8_t value) {
|
754
|
+
uint8_t* ptr = reinterpret_cast<uint8_t*>(addr);
|
755
|
+
*ptr = value;
|
756
|
+
}
|
757
|
+
|
758
|
+
|
759
|
+
void Simulator::WriteB(int32_t addr, int8_t value) {
|
760
|
+
int8_t* ptr = reinterpret_cast<int8_t*>(addr);
|
761
|
+
*ptr = value;
|
762
|
+
}
|
763
|
+
|
764
|
+
|
765
|
+
// Returns the limit of the stack area to enable checking for stack overflows.
|
766
|
+
uintptr_t Simulator::StackLimit() const {
|
767
|
+
// Leave a safety margin of 256 bytes to prevent overrunning the stack when
|
768
|
+
// pushing values.
|
769
|
+
return reinterpret_cast<uintptr_t>(stack_) + 256;
|
770
|
+
}
|
771
|
+
|
772
|
+
|
773
|
+
// Unsupported instructions use Format to print an error and stop execution.
|
774
|
+
void Simulator::Format(Instruction* instr, const char* format) {
|
775
|
+
PrintF("Simulator found unsupported instruction:\n 0x%08x: %s\n",
|
776
|
+
instr, format);
|
777
|
+
UNIMPLEMENTED_MIPS();
|
778
|
+
}
|
779
|
+
|
780
|
+
|
781
|
+
// Calls into the V8 runtime are based on this very simple interface.
|
782
|
+
// Note: To be able to return two values from some calls the code in runtime.cc
|
783
|
+
// uses the ObjectPair which is essentially two 32-bit values stuffed into a
|
784
|
+
// 64-bit value. With the code below we assume that all runtime calls return
|
785
|
+
// 64 bits of result. If they don't, the r1 result register contains a bogus
|
786
|
+
// value, which is fine because it is caller-saved.
|
787
|
+
typedef int64_t (*SimulatorRuntimeCall)(int32_t arg0,
|
788
|
+
int32_t arg1,
|
789
|
+
int32_t arg2,
|
790
|
+
int32_t arg3);
|
791
|
+
typedef double (*SimulatorRuntimeFPCall)(double fparg0,
|
792
|
+
double fparg1);
|
793
|
+
|
794
|
+
|
795
|
+
// Software interrupt instructions are used by the simulator to call into the
|
796
|
+
// C-based V8 runtime.
|
797
|
+
void Simulator::SoftwareInterrupt(Instruction* instr) {
|
798
|
+
// We first check if we met a call_rt_redirected.
|
799
|
+
if (instr->InstructionBits() == rtCallRedirInstr) {
|
800
|
+
Redirection* redirection = Redirection::FromSwiInstruction(instr);
|
801
|
+
int32_t arg0 = get_register(a0);
|
802
|
+
int32_t arg1 = get_register(a1);
|
803
|
+
int32_t arg2 = get_register(a2);
|
804
|
+
int32_t arg3 = get_register(a3);
|
805
|
+
// fp args are (not always) in f12 and f14.
|
806
|
+
// See MIPS conventions for more details.
|
807
|
+
double fparg0 = get_fpu_register_double(f12);
|
808
|
+
double fparg1 = get_fpu_register_double(f14);
|
809
|
+
// This is dodgy but it works because the C entry stubs are never moved.
|
810
|
+
// See comment in codegen-arm.cc and bug 1242173.
|
811
|
+
int32_t saved_ra = get_register(ra);
|
812
|
+
if (redirection->fp_return()) {
|
813
|
+
intptr_t external =
|
814
|
+
reinterpret_cast<intptr_t>(redirection->external_function());
|
815
|
+
SimulatorRuntimeFPCall target =
|
816
|
+
reinterpret_cast<SimulatorRuntimeFPCall>(external);
|
817
|
+
if (::v8::internal::FLAG_trace_sim) {
|
818
|
+
PrintF("Call to host function at %p with args %f, %f\n",
|
819
|
+
FUNCTION_ADDR(target), fparg0, fparg1);
|
820
|
+
}
|
821
|
+
double result = target(fparg0, fparg1);
|
822
|
+
set_fpu_register_double(f0, result);
|
823
|
+
} else {
|
824
|
+
intptr_t external =
|
825
|
+
reinterpret_cast<int32_t>(redirection->external_function());
|
826
|
+
SimulatorRuntimeCall target =
|
827
|
+
reinterpret_cast<SimulatorRuntimeCall>(external);
|
828
|
+
if (::v8::internal::FLAG_trace_sim) {
|
829
|
+
PrintF(
|
830
|
+
"Call to host function at %p with args %08x, %08x, %08x, %08x\n",
|
831
|
+
FUNCTION_ADDR(target),
|
832
|
+
arg0,
|
833
|
+
arg1,
|
834
|
+
arg2,
|
835
|
+
arg3);
|
836
|
+
}
|
837
|
+
int64_t result = target(arg0, arg1, arg2, arg3);
|
838
|
+
int32_t lo_res = static_cast<int32_t>(result);
|
839
|
+
int32_t hi_res = static_cast<int32_t>(result >> 32);
|
840
|
+
if (::v8::internal::FLAG_trace_sim) {
|
841
|
+
PrintF("Returned %08x\n", lo_res);
|
842
|
+
}
|
843
|
+
set_register(v0, lo_res);
|
844
|
+
set_register(v1, hi_res);
|
845
|
+
}
|
846
|
+
set_register(ra, saved_ra);
|
847
|
+
set_pc(get_register(ra));
|
848
|
+
} else {
|
849
|
+
Debugger dbg(this);
|
850
|
+
dbg.Debug();
|
851
|
+
}
|
852
|
+
}
|
853
|
+
|
854
|
+
void Simulator::SignalExceptions() {
|
855
|
+
for (int i = 1; i < kNumExceptions; i++) {
|
856
|
+
if (exceptions[i] != 0) {
|
857
|
+
V8_Fatal(__FILE__, __LINE__, "Error: Exception %i raised.", i);
|
858
|
+
}
|
859
|
+
}
|
860
|
+
}
|
861
|
+
|
862
|
+
// Handle execution based on instruction types.
|
863
|
+
void Simulator::DecodeTypeRegister(Instruction* instr) {
|
864
|
+
// Instruction fields
|
865
|
+
Opcode op = instr->OpcodeFieldRaw();
|
866
|
+
int32_t rs_reg = instr->RsField();
|
867
|
+
int32_t rs = get_register(rs_reg);
|
868
|
+
uint32_t rs_u = static_cast<uint32_t>(rs);
|
869
|
+
int32_t rt_reg = instr->RtField();
|
870
|
+
int32_t rt = get_register(rt_reg);
|
871
|
+
uint32_t rt_u = static_cast<uint32_t>(rt);
|
872
|
+
int32_t rd_reg = instr->RdField();
|
873
|
+
uint32_t sa = instr->SaField();
|
874
|
+
|
875
|
+
int32_t fs_reg= instr->FsField();
|
876
|
+
|
877
|
+
// ALU output
|
878
|
+
// It should not be used as is. Instructions using it should always initialize
|
879
|
+
// it first.
|
880
|
+
int32_t alu_out = 0x12345678;
|
881
|
+
// Output or temporary for floating point.
|
882
|
+
double fp_out = 0.0;
|
883
|
+
|
884
|
+
// For break and trap instructions.
|
885
|
+
bool do_interrupt = false;
|
886
|
+
|
887
|
+
// For jr and jalr
|
888
|
+
// Get current pc.
|
889
|
+
int32_t current_pc = get_pc();
|
890
|
+
// Next pc
|
891
|
+
int32_t next_pc = 0;
|
892
|
+
|
893
|
+
// ---------- Configuration
|
894
|
+
switch (op) {
|
895
|
+
case COP1: // Coprocessor instructions
|
896
|
+
switch (instr->RsFieldRaw()) {
|
897
|
+
case BC1: // branch on coprocessor condition
|
898
|
+
UNREACHABLE();
|
899
|
+
break;
|
900
|
+
case MFC1:
|
901
|
+
alu_out = get_fpu_register(fs_reg);
|
902
|
+
break;
|
903
|
+
case MFHC1:
|
904
|
+
fp_out = get_fpu_register_double(fs_reg);
|
905
|
+
alu_out = *v8i::BitCast<int32_t*>(&fp_out);
|
906
|
+
break;
|
907
|
+
case MTC1:
|
908
|
+
case MTHC1:
|
909
|
+
// Do the store in the execution step.
|
910
|
+
break;
|
911
|
+
case S:
|
912
|
+
case D:
|
913
|
+
case W:
|
914
|
+
case L:
|
915
|
+
case PS:
|
916
|
+
// Do everything in the execution step.
|
917
|
+
break;
|
918
|
+
default:
|
919
|
+
UNIMPLEMENTED_MIPS();
|
920
|
+
};
|
921
|
+
break;
|
922
|
+
case SPECIAL:
|
923
|
+
switch (instr->FunctionFieldRaw()) {
|
924
|
+
case JR:
|
925
|
+
case JALR:
|
926
|
+
next_pc = get_register(instr->RsField());
|
927
|
+
break;
|
928
|
+
case SLL:
|
929
|
+
alu_out = rt << sa;
|
930
|
+
break;
|
931
|
+
case SRL:
|
932
|
+
alu_out = rt_u >> sa;
|
933
|
+
break;
|
934
|
+
case SRA:
|
935
|
+
alu_out = rt >> sa;
|
936
|
+
break;
|
937
|
+
case SLLV:
|
938
|
+
alu_out = rt << rs;
|
939
|
+
break;
|
940
|
+
case SRLV:
|
941
|
+
alu_out = rt_u >> rs;
|
942
|
+
break;
|
943
|
+
case SRAV:
|
944
|
+
alu_out = rt >> rs;
|
945
|
+
break;
|
946
|
+
case MFHI:
|
947
|
+
alu_out = get_register(HI);
|
948
|
+
break;
|
949
|
+
case MFLO:
|
950
|
+
alu_out = get_register(LO);
|
951
|
+
break;
|
952
|
+
case MULT:
|
953
|
+
UNIMPLEMENTED_MIPS();
|
954
|
+
break;
|
955
|
+
case MULTU:
|
956
|
+
UNIMPLEMENTED_MIPS();
|
957
|
+
break;
|
958
|
+
case DIV:
|
959
|
+
case DIVU:
|
960
|
+
exceptions[kDivideByZero] = rt == 0;
|
961
|
+
break;
|
962
|
+
case ADD:
|
963
|
+
if (HaveSameSign(rs, rt)) {
|
964
|
+
if (rs > 0) {
|
965
|
+
exceptions[kIntegerOverflow] = rs > (Registers::kMaxValue - rt);
|
966
|
+
} else if (rs < 0) {
|
967
|
+
exceptions[kIntegerUnderflow] = rs < (Registers::kMinValue - rt);
|
968
|
+
}
|
969
|
+
}
|
970
|
+
alu_out = rs + rt;
|
971
|
+
break;
|
972
|
+
case ADDU:
|
973
|
+
alu_out = rs + rt;
|
974
|
+
break;
|
975
|
+
case SUB:
|
976
|
+
if (!HaveSameSign(rs, rt)) {
|
977
|
+
if (rs > 0) {
|
978
|
+
exceptions[kIntegerOverflow] = rs > (Registers::kMaxValue + rt);
|
979
|
+
} else if (rs < 0) {
|
980
|
+
exceptions[kIntegerUnderflow] = rs < (Registers::kMinValue + rt);
|
981
|
+
}
|
982
|
+
}
|
983
|
+
alu_out = rs - rt;
|
984
|
+
break;
|
985
|
+
case SUBU:
|
986
|
+
alu_out = rs - rt;
|
987
|
+
break;
|
988
|
+
case AND:
|
989
|
+
alu_out = rs & rt;
|
990
|
+
break;
|
991
|
+
case OR:
|
992
|
+
alu_out = rs | rt;
|
993
|
+
break;
|
994
|
+
case XOR:
|
995
|
+
alu_out = rs ^ rt;
|
996
|
+
break;
|
997
|
+
case NOR:
|
998
|
+
alu_out = ~(rs | rt);
|
999
|
+
break;
|
1000
|
+
case SLT:
|
1001
|
+
alu_out = rs < rt ? 1 : 0;
|
1002
|
+
break;
|
1003
|
+
case SLTU:
|
1004
|
+
alu_out = rs_u < rt_u ? 1 : 0;
|
1005
|
+
break;
|
1006
|
+
// Break and trap instructions
|
1007
|
+
case BREAK:
|
1008
|
+
do_interrupt = true;
|
1009
|
+
break;
|
1010
|
+
case TGE:
|
1011
|
+
do_interrupt = rs >= rt;
|
1012
|
+
break;
|
1013
|
+
case TGEU:
|
1014
|
+
do_interrupt = rs_u >= rt_u;
|
1015
|
+
break;
|
1016
|
+
case TLT:
|
1017
|
+
do_interrupt = rs < rt;
|
1018
|
+
break;
|
1019
|
+
case TLTU:
|
1020
|
+
do_interrupt = rs_u < rt_u;
|
1021
|
+
break;
|
1022
|
+
case TEQ:
|
1023
|
+
do_interrupt = rs == rt;
|
1024
|
+
break;
|
1025
|
+
case TNE:
|
1026
|
+
do_interrupt = rs != rt;
|
1027
|
+
break;
|
1028
|
+
default:
|
1029
|
+
UNREACHABLE();
|
1030
|
+
};
|
1031
|
+
break;
|
1032
|
+
case SPECIAL2:
|
1033
|
+
switch (instr->FunctionFieldRaw()) {
|
1034
|
+
case MUL:
|
1035
|
+
alu_out = rs_u * rt_u; // Only the lower 32 bits are kept.
|
1036
|
+
break;
|
1037
|
+
default:
|
1038
|
+
UNREACHABLE();
|
1039
|
+
}
|
1040
|
+
break;
|
1041
|
+
default:
|
1042
|
+
UNREACHABLE();
|
1043
|
+
};
|
1044
|
+
|
1045
|
+
// ---------- Raise exceptions triggered.
|
1046
|
+
SignalExceptions();
|
1047
|
+
|
1048
|
+
// ---------- Execution
|
1049
|
+
switch (op) {
|
1050
|
+
case COP1:
|
1051
|
+
switch (instr->RsFieldRaw()) {
|
1052
|
+
case BC1: // branch on coprocessor condition
|
1053
|
+
UNREACHABLE();
|
1054
|
+
break;
|
1055
|
+
case MFC1:
|
1056
|
+
case MFHC1:
|
1057
|
+
set_register(rt_reg, alu_out);
|
1058
|
+
break;
|
1059
|
+
case MTC1:
|
1060
|
+
// We don't need to set the higher bits to 0, because MIPS ISA says
|
1061
|
+
// they are in an unpredictable state after executing MTC1.
|
1062
|
+
FPUregisters_[fs_reg] = registers_[rt_reg];
|
1063
|
+
FPUregisters_[fs_reg+1] = Unpredictable;
|
1064
|
+
break;
|
1065
|
+
case MTHC1:
|
1066
|
+
// Here we need to keep the lower bits unchanged.
|
1067
|
+
FPUregisters_[fs_reg+1] = registers_[rt_reg];
|
1068
|
+
break;
|
1069
|
+
case S:
|
1070
|
+
switch (instr->FunctionFieldRaw()) {
|
1071
|
+
case CVT_D_S:
|
1072
|
+
case CVT_W_S:
|
1073
|
+
case CVT_L_S:
|
1074
|
+
case CVT_PS_S:
|
1075
|
+
UNIMPLEMENTED_MIPS();
|
1076
|
+
break;
|
1077
|
+
default:
|
1078
|
+
UNREACHABLE();
|
1079
|
+
}
|
1080
|
+
break;
|
1081
|
+
case D:
|
1082
|
+
switch (instr->FunctionFieldRaw()) {
|
1083
|
+
case CVT_S_D:
|
1084
|
+
case CVT_W_D:
|
1085
|
+
case CVT_L_D:
|
1086
|
+
UNIMPLEMENTED_MIPS();
|
1087
|
+
break;
|
1088
|
+
default:
|
1089
|
+
UNREACHABLE();
|
1090
|
+
}
|
1091
|
+
break;
|
1092
|
+
case W:
|
1093
|
+
switch (instr->FunctionFieldRaw()) {
|
1094
|
+
case CVT_S_W:
|
1095
|
+
UNIMPLEMENTED_MIPS();
|
1096
|
+
break;
|
1097
|
+
case CVT_D_W: // Convert word to double.
|
1098
|
+
set_fpu_register(rd_reg, static_cast<double>(rs));
|
1099
|
+
break;
|
1100
|
+
default:
|
1101
|
+
UNREACHABLE();
|
1102
|
+
};
|
1103
|
+
break;
|
1104
|
+
case L:
|
1105
|
+
switch (instr->FunctionFieldRaw()) {
|
1106
|
+
case CVT_S_L:
|
1107
|
+
case CVT_D_L:
|
1108
|
+
UNIMPLEMENTED_MIPS();
|
1109
|
+
break;
|
1110
|
+
default:
|
1111
|
+
UNREACHABLE();
|
1112
|
+
}
|
1113
|
+
break;
|
1114
|
+
case PS:
|
1115
|
+
break;
|
1116
|
+
default:
|
1117
|
+
UNREACHABLE();
|
1118
|
+
};
|
1119
|
+
break;
|
1120
|
+
case SPECIAL:
|
1121
|
+
switch (instr->FunctionFieldRaw()) {
|
1122
|
+
case JR: {
|
1123
|
+
Instruction* branch_delay_instr = reinterpret_cast<Instruction*>(
|
1124
|
+
current_pc+Instruction::kInstructionSize);
|
1125
|
+
BranchDelayInstructionDecode(branch_delay_instr);
|
1126
|
+
set_pc(next_pc);
|
1127
|
+
pc_modified_ = true;
|
1128
|
+
break;
|
1129
|
+
}
|
1130
|
+
case JALR: {
|
1131
|
+
Instruction* branch_delay_instr = reinterpret_cast<Instruction*>(
|
1132
|
+
current_pc+Instruction::kInstructionSize);
|
1133
|
+
BranchDelayInstructionDecode(branch_delay_instr);
|
1134
|
+
set_register(31, current_pc + 2* Instruction::kInstructionSize);
|
1135
|
+
set_pc(next_pc);
|
1136
|
+
pc_modified_ = true;
|
1137
|
+
break;
|
1138
|
+
}
|
1139
|
+
// Instructions using HI and LO registers.
|
1140
|
+
case MULT:
|
1141
|
+
case MULTU:
|
1142
|
+
break;
|
1143
|
+
case DIV:
|
1144
|
+
// Divide by zero was checked in the configuration step.
|
1145
|
+
set_register(LO, rs / rt);
|
1146
|
+
set_register(HI, rs % rt);
|
1147
|
+
break;
|
1148
|
+
case DIVU:
|
1149
|
+
set_register(LO, rs_u / rt_u);
|
1150
|
+
set_register(HI, rs_u % rt_u);
|
1151
|
+
break;
|
1152
|
+
// Break and trap instructions
|
1153
|
+
case BREAK:
|
1154
|
+
case TGE:
|
1155
|
+
case TGEU:
|
1156
|
+
case TLT:
|
1157
|
+
case TLTU:
|
1158
|
+
case TEQ:
|
1159
|
+
case TNE:
|
1160
|
+
if (do_interrupt) {
|
1161
|
+
SoftwareInterrupt(instr);
|
1162
|
+
}
|
1163
|
+
break;
|
1164
|
+
default: // For other special opcodes we do the default operation.
|
1165
|
+
set_register(rd_reg, alu_out);
|
1166
|
+
};
|
1167
|
+
break;
|
1168
|
+
case SPECIAL2:
|
1169
|
+
switch (instr->FunctionFieldRaw()) {
|
1170
|
+
case MUL:
|
1171
|
+
set_register(rd_reg, alu_out);
|
1172
|
+
// HI and LO are UNPREDICTABLE after the operation.
|
1173
|
+
set_register(LO, Unpredictable);
|
1174
|
+
set_register(HI, Unpredictable);
|
1175
|
+
break;
|
1176
|
+
default:
|
1177
|
+
UNREACHABLE();
|
1178
|
+
}
|
1179
|
+
break;
|
1180
|
+
// Unimplemented opcodes raised an error in the configuration step before,
|
1181
|
+
// so we can use the default here to set the destination register in common
|
1182
|
+
// cases.
|
1183
|
+
default:
|
1184
|
+
set_register(rd_reg, alu_out);
|
1185
|
+
};
|
1186
|
+
}
|
1187
|
+
|
1188
|
+
// Type 2: instructions using a 16 bytes immediate. (eg: addi, beq)
|
1189
|
+
void Simulator::DecodeTypeImmediate(Instruction* instr) {
|
1190
|
+
// Instruction fields
|
1191
|
+
Opcode op = instr->OpcodeFieldRaw();
|
1192
|
+
int32_t rs = get_register(instr->RsField());
|
1193
|
+
uint32_t rs_u = static_cast<uint32_t>(rs);
|
1194
|
+
int32_t rt_reg = instr->RtField(); // destination register
|
1195
|
+
int32_t rt = get_register(rt_reg);
|
1196
|
+
int16_t imm16 = instr->Imm16Field();
|
1197
|
+
|
1198
|
+
int32_t ft_reg = instr->FtField(); // destination register
|
1199
|
+
int32_t ft = get_register(ft_reg);
|
1200
|
+
|
1201
|
+
// zero extended immediate
|
1202
|
+
uint32_t oe_imm16 = 0xffff & imm16;
|
1203
|
+
// sign extended immediate
|
1204
|
+
int32_t se_imm16 = imm16;
|
1205
|
+
|
1206
|
+
// Get current pc.
|
1207
|
+
int32_t current_pc = get_pc();
|
1208
|
+
// Next pc.
|
1209
|
+
int32_t next_pc = bad_ra;
|
1210
|
+
|
1211
|
+
// Used for conditional branch instructions
|
1212
|
+
bool do_branch = false;
|
1213
|
+
bool execute_branch_delay_instruction = false;
|
1214
|
+
|
1215
|
+
// Used for arithmetic instructions
|
1216
|
+
int32_t alu_out = 0;
|
1217
|
+
// Floating point
|
1218
|
+
double fp_out = 0.0;
|
1219
|
+
|
1220
|
+
// Used for memory instructions
|
1221
|
+
int32_t addr = 0x0;
|
1222
|
+
|
1223
|
+
// ---------- Configuration (and execution for REGIMM)
|
1224
|
+
switch (op) {
|
1225
|
+
// ------------- COP1. Coprocessor instructions
|
1226
|
+
case COP1:
|
1227
|
+
switch (instr->RsFieldRaw()) {
|
1228
|
+
case BC1: // branch on coprocessor condition
|
1229
|
+
UNIMPLEMENTED_MIPS();
|
1230
|
+
break;
|
1231
|
+
default:
|
1232
|
+
UNREACHABLE();
|
1233
|
+
};
|
1234
|
+
break;
|
1235
|
+
// ------------- REGIMM class
|
1236
|
+
case REGIMM:
|
1237
|
+
switch (instr->RtFieldRaw()) {
|
1238
|
+
case BLTZ:
|
1239
|
+
do_branch = (rs < 0);
|
1240
|
+
break;
|
1241
|
+
case BLTZAL:
|
1242
|
+
do_branch = rs < 0;
|
1243
|
+
break;
|
1244
|
+
case BGEZ:
|
1245
|
+
do_branch = rs >= 0;
|
1246
|
+
break;
|
1247
|
+
case BGEZAL:
|
1248
|
+
do_branch = rs >= 0;
|
1249
|
+
break;
|
1250
|
+
default:
|
1251
|
+
UNREACHABLE();
|
1252
|
+
};
|
1253
|
+
switch (instr->RtFieldRaw()) {
|
1254
|
+
case BLTZ:
|
1255
|
+
case BLTZAL:
|
1256
|
+
case BGEZ:
|
1257
|
+
case BGEZAL:
|
1258
|
+
// Branch instructions common part.
|
1259
|
+
execute_branch_delay_instruction = true;
|
1260
|
+
// Set next_pc
|
1261
|
+
if (do_branch) {
|
1262
|
+
next_pc = current_pc + (imm16 << 2) + Instruction::kInstructionSize;
|
1263
|
+
if (instr->IsLinkingInstruction()) {
|
1264
|
+
set_register(31, current_pc + kBranchReturnOffset);
|
1265
|
+
}
|
1266
|
+
} else {
|
1267
|
+
next_pc = current_pc + kBranchReturnOffset;
|
1268
|
+
}
|
1269
|
+
default:
|
1270
|
+
break;
|
1271
|
+
};
|
1272
|
+
break; // case REGIMM
|
1273
|
+
// ------------- Branch instructions
|
1274
|
+
// When comparing to zero, the encoding of rt field is always 0, so we don't
|
1275
|
+
// need to replace rt with zero.
|
1276
|
+
case BEQ:
|
1277
|
+
do_branch = (rs == rt);
|
1278
|
+
break;
|
1279
|
+
case BNE:
|
1280
|
+
do_branch = rs != rt;
|
1281
|
+
break;
|
1282
|
+
case BLEZ:
|
1283
|
+
do_branch = rs <= 0;
|
1284
|
+
break;
|
1285
|
+
case BGTZ:
|
1286
|
+
do_branch = rs > 0;
|
1287
|
+
break;
|
1288
|
+
// ------------- Arithmetic instructions
|
1289
|
+
case ADDI:
|
1290
|
+
if (HaveSameSign(rs, se_imm16)) {
|
1291
|
+
if (rs > 0) {
|
1292
|
+
exceptions[kIntegerOverflow] = rs > (Registers::kMaxValue - se_imm16);
|
1293
|
+
} else if (rs < 0) {
|
1294
|
+
exceptions[kIntegerUnderflow] =
|
1295
|
+
rs < (Registers::kMinValue - se_imm16);
|
1296
|
+
}
|
1297
|
+
}
|
1298
|
+
alu_out = rs + se_imm16;
|
1299
|
+
break;
|
1300
|
+
case ADDIU:
|
1301
|
+
alu_out = rs + se_imm16;
|
1302
|
+
break;
|
1303
|
+
case SLTI:
|
1304
|
+
alu_out = (rs < se_imm16) ? 1 : 0;
|
1305
|
+
break;
|
1306
|
+
case SLTIU:
|
1307
|
+
alu_out = (rs_u < static_cast<uint32_t>(se_imm16)) ? 1 : 0;
|
1308
|
+
break;
|
1309
|
+
case ANDI:
|
1310
|
+
alu_out = rs & oe_imm16;
|
1311
|
+
break;
|
1312
|
+
case ORI:
|
1313
|
+
alu_out = rs | oe_imm16;
|
1314
|
+
break;
|
1315
|
+
case XORI:
|
1316
|
+
alu_out = rs ^ oe_imm16;
|
1317
|
+
break;
|
1318
|
+
case LUI:
|
1319
|
+
alu_out = (oe_imm16 << 16);
|
1320
|
+
break;
|
1321
|
+
// ------------- Memory instructions
|
1322
|
+
case LB:
|
1323
|
+
addr = rs + se_imm16;
|
1324
|
+
alu_out = ReadB(addr);
|
1325
|
+
break;
|
1326
|
+
case LW:
|
1327
|
+
addr = rs + se_imm16;
|
1328
|
+
alu_out = ReadW(addr, instr);
|
1329
|
+
break;
|
1330
|
+
case LBU:
|
1331
|
+
addr = rs + se_imm16;
|
1332
|
+
alu_out = ReadBU(addr);
|
1333
|
+
break;
|
1334
|
+
case SB:
|
1335
|
+
addr = rs + se_imm16;
|
1336
|
+
break;
|
1337
|
+
case SW:
|
1338
|
+
addr = rs + se_imm16;
|
1339
|
+
break;
|
1340
|
+
case LWC1:
|
1341
|
+
addr = rs + se_imm16;
|
1342
|
+
alu_out = ReadW(addr, instr);
|
1343
|
+
break;
|
1344
|
+
case LDC1:
|
1345
|
+
addr = rs + se_imm16;
|
1346
|
+
fp_out = ReadD(addr, instr);
|
1347
|
+
break;
|
1348
|
+
case SWC1:
|
1349
|
+
case SDC1:
|
1350
|
+
addr = rs + se_imm16;
|
1351
|
+
break;
|
1352
|
+
default:
|
1353
|
+
UNREACHABLE();
|
1354
|
+
};
|
1355
|
+
|
1356
|
+
// ---------- Raise exceptions triggered.
|
1357
|
+
SignalExceptions();
|
1358
|
+
|
1359
|
+
// ---------- Execution
|
1360
|
+
switch (op) {
|
1361
|
+
// ------------- Branch instructions
|
1362
|
+
case BEQ:
|
1363
|
+
case BNE:
|
1364
|
+
case BLEZ:
|
1365
|
+
case BGTZ:
|
1366
|
+
// Branch instructions common part.
|
1367
|
+
execute_branch_delay_instruction = true;
|
1368
|
+
// Set next_pc
|
1369
|
+
if (do_branch) {
|
1370
|
+
next_pc = current_pc + (imm16 << 2) + Instruction::kInstructionSize;
|
1371
|
+
if (instr->IsLinkingInstruction()) {
|
1372
|
+
set_register(31, current_pc + 2* Instruction::kInstructionSize);
|
1373
|
+
}
|
1374
|
+
} else {
|
1375
|
+
next_pc = current_pc + 2 * Instruction::kInstructionSize;
|
1376
|
+
}
|
1377
|
+
break;
|
1378
|
+
// ------------- Arithmetic instructions
|
1379
|
+
case ADDI:
|
1380
|
+
case ADDIU:
|
1381
|
+
case SLTI:
|
1382
|
+
case SLTIU:
|
1383
|
+
case ANDI:
|
1384
|
+
case ORI:
|
1385
|
+
case XORI:
|
1386
|
+
case LUI:
|
1387
|
+
set_register(rt_reg, alu_out);
|
1388
|
+
break;
|
1389
|
+
// ------------- Memory instructions
|
1390
|
+
case LB:
|
1391
|
+
case LW:
|
1392
|
+
case LBU:
|
1393
|
+
set_register(rt_reg, alu_out);
|
1394
|
+
break;
|
1395
|
+
case SB:
|
1396
|
+
WriteB(addr, static_cast<int8_t>(rt));
|
1397
|
+
break;
|
1398
|
+
case SW:
|
1399
|
+
WriteW(addr, rt, instr);
|
1400
|
+
break;
|
1401
|
+
case LWC1:
|
1402
|
+
set_fpu_register(ft_reg, alu_out);
|
1403
|
+
break;
|
1404
|
+
case LDC1:
|
1405
|
+
set_fpu_register_double(ft_reg, fp_out);
|
1406
|
+
break;
|
1407
|
+
case SWC1:
|
1408
|
+
addr = rs + se_imm16;
|
1409
|
+
WriteW(addr, get_fpu_register(ft_reg), instr);
|
1410
|
+
break;
|
1411
|
+
case SDC1:
|
1412
|
+
addr = rs + se_imm16;
|
1413
|
+
WriteD(addr, ft, instr);
|
1414
|
+
break;
|
1415
|
+
default:
|
1416
|
+
break;
|
1417
|
+
};
|
1418
|
+
|
1419
|
+
|
1420
|
+
if (execute_branch_delay_instruction) {
|
1421
|
+
// Execute branch delay slot
|
1422
|
+
// We don't check for end_sim_pc. First it should not be met as the current
|
1423
|
+
// pc is valid. Secondly a jump should always execute its branch delay slot.
|
1424
|
+
Instruction* branch_delay_instr =
|
1425
|
+
reinterpret_cast<Instruction*>(current_pc+Instruction::kInstructionSize);
|
1426
|
+
BranchDelayInstructionDecode(branch_delay_instr);
|
1427
|
+
}
|
1428
|
+
|
1429
|
+
// If needed update pc after the branch delay execution.
|
1430
|
+
if (next_pc != bad_ra) {
|
1431
|
+
set_pc(next_pc);
|
1432
|
+
}
|
1433
|
+
}
|
1434
|
+
|
1435
|
+
// Type 3: instructions using a 26 bytes immediate. (eg: j, jal)
|
1436
|
+
void Simulator::DecodeTypeJump(Instruction* instr) {
|
1437
|
+
// Get current pc.
|
1438
|
+
int32_t current_pc = get_pc();
|
1439
|
+
// Get unchanged bits of pc.
|
1440
|
+
int32_t pc_high_bits = current_pc & 0xf0000000;
|
1441
|
+
// Next pc
|
1442
|
+
int32_t next_pc = pc_high_bits | (instr->Imm26Field() << 2);
|
1443
|
+
|
1444
|
+
// Execute branch delay slot
|
1445
|
+
// We don't check for end_sim_pc. First it should not be met as the current pc
|
1446
|
+
// is valid. Secondly a jump should always execute its branch delay slot.
|
1447
|
+
Instruction* branch_delay_instr =
|
1448
|
+
reinterpret_cast<Instruction*>(current_pc+Instruction::kInstructionSize);
|
1449
|
+
BranchDelayInstructionDecode(branch_delay_instr);
|
1450
|
+
|
1451
|
+
// Update pc and ra if necessary.
|
1452
|
+
// Do this after the branch delay execution.
|
1453
|
+
if (instr->IsLinkingInstruction()) {
|
1454
|
+
set_register(31, current_pc + 2* Instruction::kInstructionSize);
|
1455
|
+
}
|
1456
|
+
set_pc(next_pc);
|
1457
|
+
pc_modified_ = true;
|
1458
|
+
}
|
1459
|
+
|
1460
|
+
// Executes the current instruction.
|
1461
|
+
void Simulator::InstructionDecode(Instruction* instr) {
|
1462
|
+
pc_modified_ = false;
|
1463
|
+
if (::v8::internal::FLAG_trace_sim) {
|
1464
|
+
disasm::NameConverter converter;
|
1465
|
+
disasm::Disassembler dasm(converter);
|
1466
|
+
// use a reasonably large buffer
|
1467
|
+
v8::internal::EmbeddedVector<char, 256> buffer;
|
1468
|
+
dasm.InstructionDecode(buffer,
|
1469
|
+
reinterpret_cast<byte_*>(instr));
|
1470
|
+
PrintF(" 0x%08x %s\n", instr, buffer.start());
|
1471
|
+
}
|
1472
|
+
|
1473
|
+
switch (instr->InstructionType()) {
|
1474
|
+
case Instruction::kRegisterType:
|
1475
|
+
DecodeTypeRegister(instr);
|
1476
|
+
break;
|
1477
|
+
case Instruction::kImmediateType:
|
1478
|
+
DecodeTypeImmediate(instr);
|
1479
|
+
break;
|
1480
|
+
case Instruction::kJumpType:
|
1481
|
+
DecodeTypeJump(instr);
|
1482
|
+
break;
|
1483
|
+
default:
|
1484
|
+
UNSUPPORTED();
|
1485
|
+
}
|
1486
|
+
if (!pc_modified_) {
|
1487
|
+
set_register(pc, reinterpret_cast<int32_t>(instr) +
|
1488
|
+
Instruction::kInstructionSize);
|
1489
|
+
}
|
1490
|
+
}
|
1491
|
+
|
1492
|
+
|
1493
|
+
|
1494
|
+
void Simulator::Execute() {
|
1495
|
+
// Get the PC to simulate. Cannot use the accessor here as we need the
|
1496
|
+
// raw PC value and not the one used as input to arithmetic instructions.
|
1497
|
+
int program_counter = get_pc();
|
1498
|
+
if (::v8::internal::FLAG_stop_sim_at == 0) {
|
1499
|
+
// Fast version of the dispatch loop without checking whether the simulator
|
1500
|
+
// should be stopping at a particular executed instruction.
|
1501
|
+
while (program_counter != end_sim_pc) {
|
1502
|
+
Instruction* instr = reinterpret_cast<Instruction*>(program_counter);
|
1503
|
+
icount_++;
|
1504
|
+
InstructionDecode(instr);
|
1505
|
+
program_counter = get_pc();
|
1506
|
+
}
|
1507
|
+
} else {
|
1508
|
+
// FLAG_stop_sim_at is at the non-default value. Stop in the debugger when
|
1509
|
+
// we reach the particular instuction count.
|
1510
|
+
while (program_counter != end_sim_pc) {
|
1511
|
+
Instruction* instr = reinterpret_cast<Instruction*>(program_counter);
|
1512
|
+
icount_++;
|
1513
|
+
if (icount_ == ::v8::internal::FLAG_stop_sim_at) {
|
1514
|
+
Debugger dbg(this);
|
1515
|
+
dbg.Debug();
|
1516
|
+
} else {
|
1517
|
+
InstructionDecode(instr);
|
1518
|
+
}
|
1519
|
+
program_counter = get_pc();
|
1520
|
+
}
|
1521
|
+
}
|
1522
|
+
}
|
1523
|
+
|
1524
|
+
|
1525
|
+
int32_t Simulator::Call(byte_* entry, int argument_count, ...) {
|
1526
|
+
va_list parameters;
|
1527
|
+
va_start(parameters, argument_count);
|
1528
|
+
// Setup arguments
|
1529
|
+
|
1530
|
+
// First four arguments passed in registers.
|
1531
|
+
ASSERT(argument_count >= 4);
|
1532
|
+
set_register(a0, va_arg(parameters, int32_t));
|
1533
|
+
set_register(a1, va_arg(parameters, int32_t));
|
1534
|
+
set_register(a2, va_arg(parameters, int32_t));
|
1535
|
+
set_register(a3, va_arg(parameters, int32_t));
|
1536
|
+
|
1537
|
+
// Remaining arguments passed on stack.
|
1538
|
+
int original_stack = get_register(sp);
|
1539
|
+
// Compute position of stack on entry to generated code.
|
1540
|
+
int entry_stack = (original_stack - (argument_count - 4) * sizeof(int32_t)
|
1541
|
+
- kArgsSlotsSize);
|
1542
|
+
if (OS::ActivationFrameAlignment() != 0) {
|
1543
|
+
entry_stack &= -OS::ActivationFrameAlignment();
|
1544
|
+
}
|
1545
|
+
// Store remaining arguments on stack, from low to high memory.
|
1546
|
+
intptr_t* stack_argument = reinterpret_cast<intptr_t*>(entry_stack);
|
1547
|
+
for (int i = 4; i < argument_count; i++) {
|
1548
|
+
stack_argument[i - 4 + kArgsSlotsNum] = va_arg(parameters, int32_t);
|
1549
|
+
}
|
1550
|
+
va_end(parameters);
|
1551
|
+
set_register(sp, entry_stack);
|
1552
|
+
|
1553
|
+
// Prepare to execute the code at entry
|
1554
|
+
set_register(pc, reinterpret_cast<int32_t>(entry));
|
1555
|
+
// Put down marker for end of simulation. The simulator will stop simulation
|
1556
|
+
// when the PC reaches this value. By saving the "end simulation" value into
|
1557
|
+
// the LR the simulation stops when returning to this call point.
|
1558
|
+
set_register(ra, end_sim_pc);
|
1559
|
+
|
1560
|
+
// Remember the values of callee-saved registers.
|
1561
|
+
// The code below assumes that r9 is not used as sb (static base) in
|
1562
|
+
// simulator code and therefore is regarded as a callee-saved register.
|
1563
|
+
int32_t s0_val = get_register(s0);
|
1564
|
+
int32_t s1_val = get_register(s1);
|
1565
|
+
int32_t s2_val = get_register(s2);
|
1566
|
+
int32_t s3_val = get_register(s3);
|
1567
|
+
int32_t s4_val = get_register(s4);
|
1568
|
+
int32_t s5_val = get_register(s5);
|
1569
|
+
int32_t s6_val = get_register(s6);
|
1570
|
+
int32_t s7_val = get_register(s7);
|
1571
|
+
int32_t gp_val = get_register(gp);
|
1572
|
+
int32_t sp_val = get_register(sp);
|
1573
|
+
int32_t fp_val = get_register(fp);
|
1574
|
+
|
1575
|
+
// Setup the callee-saved registers with a known value. To be able to check
|
1576
|
+
// that they are preserved properly across JS execution.
|
1577
|
+
int32_t callee_saved_value = icount_;
|
1578
|
+
set_register(s0, callee_saved_value);
|
1579
|
+
set_register(s1, callee_saved_value);
|
1580
|
+
set_register(s2, callee_saved_value);
|
1581
|
+
set_register(s3, callee_saved_value);
|
1582
|
+
set_register(s4, callee_saved_value);
|
1583
|
+
set_register(s5, callee_saved_value);
|
1584
|
+
set_register(s6, callee_saved_value);
|
1585
|
+
set_register(s7, callee_saved_value);
|
1586
|
+
set_register(gp, callee_saved_value);
|
1587
|
+
set_register(fp, callee_saved_value);
|
1588
|
+
|
1589
|
+
// Start the simulation
|
1590
|
+
Execute();
|
1591
|
+
|
1592
|
+
// Check that the callee-saved registers have been preserved.
|
1593
|
+
CHECK_EQ(callee_saved_value, get_register(s0));
|
1594
|
+
CHECK_EQ(callee_saved_value, get_register(s1));
|
1595
|
+
CHECK_EQ(callee_saved_value, get_register(s2));
|
1596
|
+
CHECK_EQ(callee_saved_value, get_register(s3));
|
1597
|
+
CHECK_EQ(callee_saved_value, get_register(s4));
|
1598
|
+
CHECK_EQ(callee_saved_value, get_register(s5));
|
1599
|
+
CHECK_EQ(callee_saved_value, get_register(s6));
|
1600
|
+
CHECK_EQ(callee_saved_value, get_register(s7));
|
1601
|
+
CHECK_EQ(callee_saved_value, get_register(gp));
|
1602
|
+
CHECK_EQ(callee_saved_value, get_register(fp));
|
1603
|
+
|
1604
|
+
// Restore callee-saved registers with the original value.
|
1605
|
+
set_register(s0, s0_val);
|
1606
|
+
set_register(s1, s1_val);
|
1607
|
+
set_register(s2, s2_val);
|
1608
|
+
set_register(s3, s3_val);
|
1609
|
+
set_register(s4, s4_val);
|
1610
|
+
set_register(s5, s5_val);
|
1611
|
+
set_register(s6, s6_val);
|
1612
|
+
set_register(s7, s7_val);
|
1613
|
+
set_register(gp, gp_val);
|
1614
|
+
set_register(sp, sp_val);
|
1615
|
+
set_register(fp, fp_val);
|
1616
|
+
|
1617
|
+
// Pop stack passed arguments.
|
1618
|
+
CHECK_EQ(entry_stack, get_register(sp));
|
1619
|
+
set_register(sp, original_stack);
|
1620
|
+
|
1621
|
+
int32_t result = get_register(v0);
|
1622
|
+
return result;
|
1623
|
+
}
|
1624
|
+
|
1625
|
+
|
1626
|
+
uintptr_t Simulator::PushAddress(uintptr_t address) {
|
1627
|
+
int new_sp = get_register(sp) - sizeof(uintptr_t);
|
1628
|
+
uintptr_t* stack_slot = reinterpret_cast<uintptr_t*>(new_sp);
|
1629
|
+
*stack_slot = address;
|
1630
|
+
set_register(sp, new_sp);
|
1631
|
+
return new_sp;
|
1632
|
+
}
|
1633
|
+
|
1634
|
+
|
1635
|
+
uintptr_t Simulator::PopAddress() {
|
1636
|
+
int current_sp = get_register(sp);
|
1637
|
+
uintptr_t* stack_slot = reinterpret_cast<uintptr_t*>(current_sp);
|
1638
|
+
uintptr_t address = *stack_slot;
|
1639
|
+
set_register(sp, current_sp + sizeof(uintptr_t));
|
1640
|
+
return address;
|
1641
|
+
}
|
1642
|
+
|
1643
|
+
|
1644
|
+
#undef UNSUPPORTED
|
1645
|
+
|
1646
|
+
} } // namespace assembler::mips
|
1647
|
+
|
1648
|
+
#endif // !__mips || USE_SIMULATOR
|
1649
|
+
|
1650
|
+
#endif // V8_TARGET_ARCH_MIPS
|