therubyracer 0.8.1.pre2 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of therubyracer might be problematic. Click here for more details.
- data/Changelog.md +2 -1
- data/README.md +6 -3
- data/ext/v8/upstream/3.1.8/.gitignore +31 -0
- data/ext/v8/upstream/3.1.8/AUTHORS +40 -0
- data/ext/v8/upstream/3.1.8/ChangeLog +2566 -0
- data/ext/v8/upstream/3.1.8/LICENSE +52 -0
- data/ext/v8/upstream/3.1.8/LICENSE.strongtalk +29 -0
- data/ext/v8/upstream/3.1.8/LICENSE.v8 +26 -0
- data/ext/v8/upstream/3.1.8/LICENSE.valgrind +45 -0
- data/ext/v8/upstream/3.1.8/SConstruct +1192 -0
- data/ext/v8/upstream/3.1.8/build/README.txt +25 -0
- data/ext/v8/upstream/3.1.8/build/all.gyp +18 -0
- data/ext/v8/upstream/3.1.8/build/armu.gypi +32 -0
- data/ext/v8/upstream/3.1.8/build/common.gypi +82 -0
- data/ext/v8/upstream/3.1.8/build/gyp_v8 +145 -0
- data/ext/v8/upstream/3.1.8/include/v8-debug.h +384 -0
- data/ext/v8/upstream/3.1.8/include/v8-preparser.h +116 -0
- data/ext/v8/upstream/3.1.8/include/v8-profiler.h +426 -0
- data/ext/v8/upstream/3.1.8/include/v8-testing.h +99 -0
- data/ext/v8/upstream/3.1.8/include/v8.h +3846 -0
- data/ext/v8/upstream/3.1.8/include/v8stdint.h +53 -0
- data/ext/v8/upstream/3.1.8/preparser/preparser-process.cc +206 -0
- data/ext/v8/upstream/3.1.8/src/SConscript +356 -0
- data/ext/v8/upstream/3.1.8/src/accessors.cc +907 -0
- data/ext/v8/upstream/3.1.8/src/accessors.h +121 -0
- data/ext/v8/upstream/3.1.8/src/allocation.cc +204 -0
- data/ext/v8/upstream/3.1.8/src/allocation.h +176 -0
- data/ext/v8/upstream/3.1.8/src/api.cc +5191 -0
- data/ext/v8/upstream/3.1.8/src/api.h +508 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/apinatives.js +0 -0
- data/ext/v8/upstream/3.1.8/src/apiutils.h +80 -0
- data/ext/v8/upstream/3.1.8/src/arguments.h +105 -0
- data/ext/v8/upstream/3.1.8/src/arm/assembler-arm-inl.h +352 -0
- data/ext/v8/upstream/3.1.8/src/arm/assembler-arm.cc +2756 -0
- data/ext/v8/upstream/3.1.8/src/arm/assembler-arm.h +1294 -0
- data/ext/v8/upstream/3.1.8/src/arm/builtins-arm.cc +1628 -0
- data/ext/v8/upstream/3.1.8/src/arm/code-stubs-arm.cc +6783 -0
- data/ext/v8/upstream/3.1.8/src/arm/code-stubs-arm.h +657 -0
- data/ext/v8/upstream/3.1.8/src/arm/codegen-arm-inl.h +48 -0
- data/ext/v8/upstream/3.1.8/src/arm/codegen-arm.cc +7403 -0
- data/ext/v8/upstream/3.1.8/src/arm/codegen-arm.h +595 -0
- data/ext/v8/upstream/3.1.8/src/arm/constants-arm.cc +152 -0
- data/ext/v8/upstream/3.1.8/src/arm/constants-arm.h +769 -0
- data/ext/v8/upstream/3.1.8/src/arm/cpu-arm.cc +147 -0
- data/ext/v8/upstream/3.1.8/src/arm/debug-arm.cc +315 -0
- data/ext/v8/upstream/3.1.8/src/arm/deoptimizer-arm.cc +700 -0
- data/ext/v8/upstream/3.1.8/src/arm/disasm-arm.cc +1439 -0
- data/ext/v8/upstream/3.1.8/src/arm/frames-arm.cc +45 -0
- data/ext/v8/upstream/3.1.8/src/arm/frames-arm.h +168 -0
- data/ext/v8/upstream/3.1.8/src/arm/full-codegen-arm.cc +4230 -0
- data/ext/v8/upstream/3.1.8/src/arm/ic-arm.cc +1799 -0
- data/ext/v8/upstream/3.1.8/src/arm/jump-target-arm.cc +174 -0
- data/ext/v8/upstream/3.1.8/src/arm/lithium-arm.cc +2041 -0
- data/ext/v8/upstream/3.1.8/src/arm/lithium-arm.h +2046 -0
- data/ext/v8/upstream/3.1.8/src/arm/lithium-codegen-arm.cc +3822 -0
- data/ext/v8/upstream/3.1.8/src/arm/lithium-codegen-arm.h +312 -0
- data/ext/v8/upstream/3.1.8/src/arm/lithium-gap-resolver-arm.cc +303 -0
- data/ext/v8/upstream/3.1.8/src/arm/lithium-gap-resolver-arm.h +84 -0
- data/ext/v8/upstream/3.1.8/src/arm/macro-assembler-arm.cc +2701 -0
- data/ext/v8/upstream/3.1.8/src/arm/macro-assembler-arm.h +1015 -0
- data/ext/v8/upstream/3.1.8/src/arm/regexp-macro-assembler-arm.cc +1280 -0
- data/ext/v8/upstream/3.1.8/src/arm/regexp-macro-assembler-arm.h +252 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/register-allocator-arm.h +0 -0
- data/ext/v8/upstream/3.1.8/src/arm/simulator-arm.cc +3165 -0
- data/ext/v8/upstream/3.1.8/src/arm/simulator-arm.h +402 -0
- data/ext/v8/upstream/3.1.8/src/arm/stub-cache-arm.cc +4077 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/arm/virtual-frame-arm-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/arm/virtual-frame-arm.cc +843 -0
- data/ext/v8/upstream/3.1.8/src/arm/virtual-frame-arm.h +520 -0
- data/ext/v8/upstream/3.1.8/src/array.js +1231 -0
- data/ext/v8/upstream/3.1.8/src/assembler.cc +973 -0
- data/ext/v8/upstream/3.1.8/src/assembler.h +787 -0
- data/ext/v8/upstream/3.1.8/src/ast-inl.h +107 -0
- data/ext/v8/upstream/3.1.8/src/ast.cc +1067 -0
- data/ext/v8/upstream/3.1.8/src/ast.h +2177 -0
- data/ext/v8/upstream/3.1.8/src/atomicops.h +165 -0
- data/ext/v8/upstream/3.1.8/src/atomicops_internals_arm_gcc.h +145 -0
- data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_gcc.cc +126 -0
- data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_gcc.h +287 -0
- data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_macosx.h +301 -0
- data/ext/v8/upstream/3.1.8/src/atomicops_internals_x86_msvc.h +203 -0
- data/ext/v8/upstream/3.1.8/src/bignum-dtoa.cc +655 -0
- data/ext/v8/upstream/3.1.8/src/bignum-dtoa.h +81 -0
- data/ext/v8/upstream/3.1.8/src/bignum.cc +768 -0
- data/ext/v8/upstream/3.1.8/src/bignum.h +140 -0
- data/ext/v8/upstream/3.1.8/src/bootstrapper.cc +1888 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/bootstrapper.h +0 -0
- data/ext/v8/upstream/3.1.8/src/builtins.cc +1586 -0
- data/ext/v8/upstream/3.1.8/src/builtins.h +339 -0
- data/ext/v8/upstream/3.1.8/src/bytecodes-irregexp.h +105 -0
- data/ext/v8/upstream/3.1.8/src/cached-powers.cc +177 -0
- data/ext/v8/upstream/3.1.8/src/cached-powers.h +65 -0
- data/ext/v8/upstream/3.1.8/src/char-predicates-inl.h +94 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/char-predicates.h +0 -0
- data/ext/v8/upstream/3.1.8/src/checks.cc +110 -0
- data/ext/v8/upstream/3.1.8/src/checks.h +292 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/circular-queue-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/circular-queue.cc +122 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/circular-queue.h +0 -0
- data/ext/v8/upstream/3.1.8/src/code-stubs.cc +230 -0
- data/ext/v8/upstream/3.1.8/src/code-stubs.h +950 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/code.h +0 -0
- data/ext/v8/upstream/3.1.8/src/codegen-inl.h +64 -0
- data/ext/v8/upstream/3.1.8/src/codegen.cc +495 -0
- data/ext/v8/upstream/3.1.8/src/codegen.h +245 -0
- data/ext/v8/upstream/3.1.8/src/compilation-cache.cc +654 -0
- data/ext/v8/upstream/3.1.8/src/compilation-cache.h +112 -0
- data/ext/v8/upstream/3.1.8/src/compiler.cc +806 -0
- data/ext/v8/upstream/3.1.8/src/compiler.h +290 -0
- data/ext/v8/upstream/3.1.8/src/contexts.cc +320 -0
- data/ext/v8/upstream/3.1.8/src/contexts.h +376 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/conversions-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/conversions.cc +1069 -0
- data/ext/v8/upstream/3.1.8/src/conversions.h +122 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/counters.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/counters.h +242 -0
- data/ext/v8/upstream/3.1.8/src/cpu-profiler-inl.h +100 -0
- data/ext/v8/upstream/3.1.8/src/cpu-profiler.cc +554 -0
- data/ext/v8/upstream/3.1.8/src/cpu-profiler.h +291 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/cpu.h +0 -0
- data/ext/v8/upstream/3.1.8/src/d8-debug.cc +367 -0
- data/ext/v8/upstream/3.1.8/src/d8-debug.h +157 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-posix.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-readline.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/d8-windows.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/d8.cc +792 -0
- data/ext/v8/upstream/3.1.8/src/d8.gyp +85 -0
- data/ext/v8/upstream/3.1.8/src/d8.h +231 -0
- data/ext/v8/upstream/3.1.8/src/d8.js +2798 -0
- data/ext/v8/upstream/3.1.8/src/data-flow.cc +545 -0
- data/ext/v8/upstream/3.1.8/src/data-flow.h +379 -0
- data/ext/v8/upstream/3.1.8/src/date.js +1103 -0
- data/ext/v8/upstream/3.1.8/src/dateparser-inl.h +125 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/dateparser.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/dateparser.h +263 -0
- data/ext/v8/upstream/3.1.8/src/debug-agent.cc +446 -0
- data/ext/v8/upstream/3.1.8/src/debug-agent.h +131 -0
- data/ext/v8/upstream/3.1.8/src/debug-debugger.js +2569 -0
- data/ext/v8/upstream/3.1.8/src/debug.cc +3085 -0
- data/ext/v8/upstream/3.1.8/src/debug.h +1025 -0
- data/ext/v8/upstream/3.1.8/src/deoptimizer.cc +1185 -0
- data/ext/v8/upstream/3.1.8/src/deoptimizer.h +529 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/disasm.h +0 -0
- data/ext/v8/upstream/3.1.8/src/disassembler.cc +338 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/disassembler.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/diy-fp.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/diy-fp.h +0 -0
- data/ext/v8/upstream/3.1.8/src/double.h +238 -0
- data/ext/v8/upstream/3.1.8/src/dtoa.cc +103 -0
- data/ext/v8/upstream/3.1.8/src/dtoa.h +85 -0
- data/ext/v8/upstream/3.1.8/src/execution.cc +735 -0
- data/ext/v8/upstream/3.1.8/src/execution.h +322 -0
- data/ext/v8/upstream/3.1.8/src/extensions/experimental/experimental.gyp +53 -0
- data/ext/v8/upstream/3.1.8/src/extensions/experimental/i18n-extension.cc +264 -0
- data/ext/v8/upstream/3.1.8/src/extensions/experimental/i18n-extension.h +64 -0
- data/ext/v8/upstream/3.1.8/src/extensions/externalize-string-extension.cc +141 -0
- data/ext/v8/upstream/3.1.8/src/extensions/externalize-string-extension.h +50 -0
- data/ext/v8/upstream/3.1.8/src/extensions/gc-extension.cc +58 -0
- data/ext/v8/upstream/3.1.8/src/extensions/gc-extension.h +49 -0
- data/ext/v8/upstream/3.1.8/src/factory.cc +1087 -0
- data/ext/v8/upstream/3.1.8/src/factory.h +432 -0
- data/ext/v8/upstream/3.1.8/src/fast-dtoa.cc +736 -0
- data/ext/v8/upstream/3.1.8/src/fast-dtoa.h +83 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/fixed-dtoa.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/fixed-dtoa.h +0 -0
- data/ext/v8/upstream/3.1.8/src/flag-definitions.h +552 -0
- data/ext/v8/upstream/3.1.8/src/flags.cc +551 -0
- data/ext/v8/upstream/3.1.8/src/flags.h +79 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/frame-element.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/frame-element.h +277 -0
- data/ext/v8/upstream/3.1.8/src/frames-inl.h +210 -0
- data/ext/v8/upstream/3.1.8/src/frames.cc +1232 -0
- data/ext/v8/upstream/3.1.8/src/frames.h +826 -0
- data/ext/v8/upstream/3.1.8/src/full-codegen.cc +1382 -0
- data/ext/v8/upstream/3.1.8/src/full-codegen.h +751 -0
- data/ext/v8/upstream/3.1.8/src/func-name-inferrer.cc +90 -0
- data/ext/v8/upstream/3.1.8/src/func-name-inferrer.h +111 -0
- data/ext/v8/upstream/3.1.8/src/gdb-jit.cc +1547 -0
- data/ext/v8/upstream/3.1.8/src/gdb-jit.h +138 -0
- data/ext/v8/upstream/3.1.8/src/global-handles.cc +534 -0
- data/ext/v8/upstream/3.1.8/src/global-handles.h +181 -0
- data/ext/v8/upstream/3.1.8/src/globals.h +325 -0
- data/ext/v8/upstream/3.1.8/src/handles-inl.h +80 -0
- data/ext/v8/upstream/3.1.8/src/handles.cc +910 -0
- data/ext/v8/upstream/3.1.8/src/handles.h +424 -0
- data/ext/v8/upstream/3.1.8/src/hashmap.cc +230 -0
- data/ext/v8/upstream/3.1.8/src/hashmap.h +121 -0
- data/ext/v8/upstream/3.1.8/src/heap-inl.h +587 -0
- data/ext/v8/upstream/3.1.8/src/heap-profiler.cc +1128 -0
- data/ext/v8/upstream/3.1.8/src/heap-profiler.h +381 -0
- data/ext/v8/upstream/3.1.8/src/heap.cc +5610 -0
- data/ext/v8/upstream/3.1.8/src/heap.h +2218 -0
- data/ext/v8/upstream/3.1.8/src/hydrogen-instructions.cc +1490 -0
- data/ext/v8/upstream/3.1.8/src/hydrogen-instructions.h +3493 -0
- data/ext/v8/upstream/3.1.8/src/hydrogen.cc +6056 -0
- data/ext/v8/upstream/3.1.8/src/hydrogen.h +1091 -0
- data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32-inl.h +429 -0
- data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32.cc +2800 -0
- data/ext/v8/upstream/3.1.8/src/ia32/assembler-ia32.h +1093 -0
- data/ext/v8/upstream/3.1.8/src/ia32/builtins-ia32.cc +1590 -0
- data/ext/v8/upstream/3.1.8/src/ia32/code-stubs-ia32.cc +6624 -0
- data/ext/v8/upstream/3.1.8/src/ia32/code-stubs-ia32.h +536 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/codegen-ia32-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/ia32/codegen-ia32.cc +10354 -0
- data/ext/v8/upstream/3.1.8/src/ia32/codegen-ia32.h +798 -0
- data/ext/v8/upstream/3.1.8/src/ia32/cpu-ia32.cc +87 -0
- data/ext/v8/upstream/3.1.8/src/ia32/debug-ia32.cc +309 -0
- data/ext/v8/upstream/3.1.8/src/ia32/deoptimizer-ia32.cc +664 -0
- data/ext/v8/upstream/3.1.8/src/ia32/disasm-ia32.cc +1597 -0
- data/ext/v8/upstream/3.1.8/src/ia32/frames-ia32.cc +45 -0
- data/ext/v8/upstream/3.1.8/src/ia32/frames-ia32.h +140 -0
- data/ext/v8/upstream/3.1.8/src/ia32/full-codegen-ia32.cc +4278 -0
- data/ext/v8/upstream/3.1.8/src/ia32/ic-ia32.cc +1786 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/jump-target-ia32.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-codegen-ia32.cc +3880 -0
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-codegen-ia32.h +309 -0
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-gap-resolver-ia32.cc +460 -0
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-gap-resolver-ia32.h +110 -0
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-ia32.cc +2095 -0
- data/ext/v8/upstream/3.1.8/src/ia32/lithium-ia32.h +2127 -0
- data/ext/v8/upstream/3.1.8/src/ia32/macro-assembler-ia32.cc +2031 -0
- data/ext/v8/upstream/3.1.8/src/ia32/macro-assembler-ia32.h +798 -0
- data/ext/v8/upstream/3.1.8/src/ia32/regexp-macro-assembler-ia32.cc +1253 -0
- data/ext/v8/upstream/3.1.8/src/ia32/regexp-macro-assembler-ia32.h +215 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/register-allocator-ia32.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/ia32/simulator-ia32.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/ia32/simulator-ia32.h +72 -0
- data/ext/v8/upstream/3.1.8/src/ia32/stub-cache-ia32.cc +3732 -0
- data/ext/v8/upstream/3.1.8/src/ia32/virtual-frame-ia32.cc +1360 -0
- data/ext/v8/upstream/3.1.8/src/ia32/virtual-frame-ia32.h +646 -0
- data/ext/v8/upstream/3.1.8/src/ic-inl.h +129 -0
- data/ext/v8/upstream/3.1.8/src/ic.cc +2333 -0
- data/ext/v8/upstream/3.1.8/src/ic.h +639 -0
- data/ext/v8/upstream/3.1.8/src/inspector.cc +63 -0
- data/ext/v8/upstream/3.1.8/src/inspector.h +62 -0
- data/ext/v8/upstream/3.1.8/src/interpreter-irregexp.cc +655 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/interpreter-irregexp.h +0 -0
- data/ext/v8/upstream/3.1.8/src/json.js +342 -0
- data/ext/v8/upstream/3.1.8/src/jsregexp.cc +5340 -0
- data/ext/v8/upstream/3.1.8/src/jsregexp.h +1484 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-heavy-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/jump-target-heavy.cc +430 -0
- data/ext/v8/upstream/3.1.8/src/jump-target-heavy.h +244 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target-light-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/jump-target-light.cc +111 -0
- data/ext/v8/upstream/3.1.8/src/jump-target-light.h +193 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/jump-target.h +0 -0
- data/ext/v8/upstream/3.1.8/src/list-inl.h +206 -0
- data/ext/v8/upstream/3.1.8/src/list.h +164 -0
- data/ext/v8/upstream/3.1.8/src/lithium-allocator-inl.h +140 -0
- data/ext/v8/upstream/3.1.8/src/lithium-allocator.cc +2093 -0
- data/ext/v8/upstream/3.1.8/src/lithium-allocator.h +644 -0
- data/ext/v8/upstream/3.1.8/src/lithium.cc +168 -0
- data/ext/v8/upstream/3.1.8/src/lithium.h +592 -0
- data/ext/v8/upstream/3.1.8/src/liveedit-debugger.js +1082 -0
- data/ext/v8/upstream/3.1.8/src/liveedit.cc +1650 -0
- data/ext/v8/upstream/3.1.8/src/liveedit.h +174 -0
- data/ext/v8/upstream/3.1.8/src/liveobjectlist-inl.h +126 -0
- data/ext/v8/upstream/3.1.8/src/liveobjectlist.cc +2527 -0
- data/ext/v8/upstream/3.1.8/src/liveobjectlist.h +322 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/log-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/log-utils.cc +336 -0
- data/ext/v8/upstream/3.1.8/src/log-utils.h +232 -0
- data/ext/v8/upstream/3.1.8/src/log.cc +1608 -0
- data/ext/v8/upstream/3.1.8/src/log.h +379 -0
- data/ext/v8/upstream/3.1.8/src/macro-assembler.h +120 -0
- data/ext/v8/upstream/3.1.8/src/macros.py +178 -0
- data/ext/v8/upstream/3.1.8/src/mark-compact.cc +2957 -0
- data/ext/v8/upstream/3.1.8/src/mark-compact.h +433 -0
- data/ext/v8/upstream/3.1.8/src/math.js +264 -0
- data/ext/v8/upstream/3.1.8/src/memory.h +82 -0
- data/ext/v8/upstream/3.1.8/src/messages.cc +164 -0
- data/ext/v8/upstream/3.1.8/src/messages.h +114 -0
- data/ext/v8/upstream/3.1.8/src/messages.js +1071 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/assembler-mips-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/assembler-mips.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/mips/assembler-mips.h +667 -0
- data/ext/v8/upstream/3.1.8/src/mips/builtins-mips.cc +205 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/codegen-mips-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/codegen-mips.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/mips/codegen-mips.h +431 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/constants-mips.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/constants-mips.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/cpu-mips.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/mips/debug-mips.cc +127 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/disasm-mips.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/fast-codegen-mips.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/mips/frames-mips.cc +96 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/frames-mips.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/full-codegen-mips.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/mips/ic-mips.cc +208 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/jump-target-mips.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/macro-assembler-mips.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/macro-assembler-mips.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/register-allocator-mips.h +0 -0
- data/ext/v8/upstream/3.1.8/src/mips/simulator-mips.cc +1650 -0
- data/ext/v8/upstream/3.1.8/src/mips/simulator-mips.h +311 -0
- data/ext/v8/upstream/3.1.8/src/mips/stub-cache-mips.cc +418 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/virtual-frame-mips.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mips/virtual-frame-mips.h +0 -0
- data/ext/v8/upstream/3.1.8/src/mirror-debugger.js +2380 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/mksnapshot.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/natives.h +0 -0
- data/ext/v8/upstream/3.1.8/src/objects-debug.cc +722 -0
- data/ext/v8/upstream/3.1.8/src/objects-inl.h +3946 -0
- data/ext/v8/upstream/3.1.8/src/objects-printer.cc +801 -0
- data/ext/v8/upstream/3.1.8/src/objects-visiting.cc +142 -0
- data/ext/v8/upstream/3.1.8/src/objects-visiting.h +401 -0
- data/ext/v8/upstream/3.1.8/src/objects.cc +10044 -0
- data/ext/v8/upstream/3.1.8/src/objects.h +6571 -0
- data/ext/v8/upstream/3.1.8/src/parser.cc +5165 -0
- data/ext/v8/upstream/3.1.8/src/parser.h +802 -0
- data/ext/v8/upstream/3.1.8/src/platform-cygwin.cc +745 -0
- data/ext/v8/upstream/3.1.8/src/platform-freebsd.cc +702 -0
- data/ext/v8/upstream/3.1.8/src/platform-linux.cc +981 -0
- data/ext/v8/upstream/3.1.8/src/platform-macos.cc +732 -0
- data/ext/v8/upstream/3.1.8/src/platform-nullos.cc +498 -0
- data/ext/v8/upstream/3.1.8/src/platform-openbsd.cc +657 -0
- data/ext/v8/upstream/3.1.8/src/platform-posix.cc +399 -0
- data/ext/v8/upstream/3.1.8/src/platform-solaris.cc +714 -0
- data/ext/v8/upstream/3.1.8/src/platform-win32.cc +1974 -0
- data/ext/v8/upstream/3.1.8/src/platform.h +636 -0
- data/ext/v8/upstream/3.1.8/src/preparse-data.cc +183 -0
- data/ext/v8/upstream/3.1.8/src/preparse-data.h +249 -0
- data/ext/v8/upstream/3.1.8/src/preparser-api.cc +213 -0
- data/ext/v8/upstream/3.1.8/src/preparser.cc +1205 -0
- data/ext/v8/upstream/3.1.8/src/preparser.h +278 -0
- data/ext/v8/upstream/3.1.8/src/prettyprinter.cc +1539 -0
- data/ext/v8/upstream/3.1.8/src/prettyprinter.h +223 -0
- data/ext/v8/upstream/3.1.8/src/profile-generator-inl.h +128 -0
- data/ext/v8/upstream/3.1.8/src/profile-generator.cc +2899 -0
- data/ext/v8/upstream/3.1.8/src/profile-generator.h +1151 -0
- data/ext/v8/upstream/3.1.8/src/property.cc +96 -0
- data/ext/v8/upstream/3.1.8/src/property.h +337 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-macro-assembler-irregexp-inl.h +0 -0
- data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-irregexp.cc +470 -0
- data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-irregexp.h +142 -0
- data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-tracer.cc +373 -0
- data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler-tracer.h +104 -0
- data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler.cc +257 -0
- data/ext/v8/upstream/3.1.8/src/regexp-macro-assembler.h +231 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-stack.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/regexp-stack.h +0 -0
- data/ext/v8/upstream/3.1.8/src/regexp.js +483 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/register-allocator.h +0 -0
- data/ext/v8/upstream/3.1.8/src/rewriter.cc +1023 -0
- data/ext/v8/upstream/3.1.8/src/rewriter.h +59 -0
- data/ext/v8/upstream/3.1.8/src/runtime-profiler.cc +443 -0
- data/ext/v8/upstream/3.1.8/src/runtime-profiler.h +77 -0
- data/ext/v8/upstream/3.1.8/src/runtime.cc +11592 -0
- data/ext/v8/upstream/3.1.8/src/runtime.h +582 -0
- data/ext/v8/upstream/3.1.8/src/runtime.js +643 -0
- data/ext/v8/upstream/3.1.8/src/safepoint-table.cc +253 -0
- data/ext/v8/upstream/3.1.8/src/safepoint-table.h +263 -0
- data/ext/v8/upstream/3.1.8/src/scanner-base.cc +971 -0
- data/ext/v8/upstream/3.1.8/src/scanner-base.h +653 -0
- data/ext/v8/upstream/3.1.8/src/scanner.cc +586 -0
- data/ext/v8/upstream/3.1.8/src/scanner.h +194 -0
- data/ext/v8/upstream/3.1.8/src/scopeinfo.cc +636 -0
- data/ext/v8/upstream/3.1.8/src/scopeinfo.h +238 -0
- data/ext/v8/upstream/3.1.8/src/scopes.cc +1063 -0
- data/ext/v8/upstream/3.1.8/src/scopes.h +494 -0
- data/ext/v8/upstream/3.1.8/src/serialize.cc +1535 -0
- data/ext/v8/upstream/3.1.8/src/serialize.h +584 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/shell.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/simulator.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/smart-pointer.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot-common.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot-empty.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/snapshot.h +0 -0
- data/ext/v8/upstream/3.1.8/src/spaces-inl.h +524 -0
- data/ext/v8/upstream/3.1.8/src/spaces.cc +3254 -0
- data/ext/v8/upstream/3.1.8/src/spaces.h +2362 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/splay-tree-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/splay-tree.h +0 -0
- data/ext/v8/upstream/3.1.8/src/string-search.cc +40 -0
- data/ext/v8/upstream/3.1.8/src/string-search.h +567 -0
- data/ext/v8/upstream/3.1.8/src/string-stream.cc +584 -0
- data/ext/v8/upstream/3.1.8/src/string-stream.h +191 -0
- data/ext/v8/upstream/3.1.8/src/string.js +915 -0
- data/ext/v8/upstream/3.1.8/src/strtod.cc +440 -0
- data/ext/v8/upstream/3.1.8/src/strtod.h +40 -0
- data/ext/v8/upstream/3.1.8/src/stub-cache.cc +1878 -0
- data/ext/v8/upstream/3.1.8/src/stub-cache.h +849 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/third_party/valgrind/valgrind.h +0 -0
- data/ext/v8/upstream/3.1.8/src/token.cc +63 -0
- data/ext/v8/upstream/3.1.8/src/token.h +288 -0
- data/ext/v8/upstream/3.1.8/src/top.cc +1152 -0
- data/ext/v8/upstream/3.1.8/src/top.h +608 -0
- data/ext/v8/upstream/3.1.8/src/type-info.cc +406 -0
- data/ext/v8/upstream/3.1.8/src/type-info.h +283 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/unbound-queue-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/unbound-queue.h +0 -0
- data/ext/v8/upstream/3.1.8/src/unicode-inl.h +238 -0
- data/ext/v8/upstream/3.1.8/src/unicode.cc +1624 -0
- data/ext/v8/upstream/3.1.8/src/unicode.h +280 -0
- data/ext/v8/upstream/3.1.8/src/uri.js +402 -0
- data/ext/v8/upstream/3.1.8/src/utils.cc +371 -0
- data/ext/v8/upstream/3.1.8/src/utils.h +793 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/v8-counters.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/v8-counters.h +290 -0
- data/ext/v8/upstream/3.1.8/src/v8.cc +270 -0
- data/ext/v8/upstream/3.1.8/src/v8.h +127 -0
- data/ext/v8/upstream/3.1.8/src/v8checks.h +64 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/v8dll-main.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/v8globals.h +480 -0
- data/ext/v8/upstream/3.1.8/src/v8natives.js +1252 -0
- data/ext/v8/upstream/3.1.8/src/v8preparserdll-main.cc +39 -0
- data/ext/v8/upstream/3.1.8/src/v8threads.cc +440 -0
- data/ext/v8/upstream/3.1.8/src/v8threads.h +157 -0
- data/ext/v8/upstream/3.1.8/src/v8utils.h +354 -0
- data/ext/v8/upstream/3.1.8/src/variables.cc +132 -0
- data/ext/v8/upstream/3.1.8/src/variables.h +212 -0
- data/ext/v8/upstream/3.1.8/src/version.cc +95 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/version.h +0 -0
- data/ext/v8/upstream/3.1.8/src/virtual-frame-heavy-inl.h +190 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-heavy.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-light-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame-light.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/virtual-frame.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/virtual-frame.h +59 -0
- data/ext/v8/upstream/3.1.8/src/vm-state-inl.h +134 -0
- data/ext/v8/upstream/3.1.8/src/vm-state.h +68 -0
- data/ext/v8/upstream/3.1.8/src/win32-headers.h +95 -0
- data/ext/v8/upstream/3.1.8/src/x64/assembler-x64-inl.h +455 -0
- data/ext/v8/upstream/3.1.8/src/x64/assembler-x64.cc +3162 -0
- data/ext/v8/upstream/3.1.8/src/x64/assembler-x64.h +1584 -0
- data/ext/v8/upstream/3.1.8/src/x64/builtins-x64.cc +1492 -0
- data/ext/v8/upstream/3.1.8/src/x64/code-stubs-x64.cc +5150 -0
- data/ext/v8/upstream/3.1.8/src/x64/code-stubs-x64.h +519 -0
- data/ext/v8/upstream/3.1.8/src/x64/codegen-x64-inl.h +46 -0
- data/ext/v8/upstream/3.1.8/src/x64/codegen-x64.cc +8835 -0
- data/ext/v8/upstream/3.1.8/src/x64/codegen-x64.h +750 -0
- data/ext/v8/upstream/3.1.8/src/x64/cpu-x64.cc +86 -0
- data/ext/v8/upstream/3.1.8/src/x64/debug-x64.cc +316 -0
- data/ext/v8/upstream/3.1.8/src/x64/deoptimizer-x64.cc +781 -0
- data/ext/v8/upstream/3.1.8/src/x64/disasm-x64.cc +1737 -0
- data/ext/v8/upstream/3.1.8/src/x64/frames-x64.cc +45 -0
- data/ext/v8/upstream/3.1.8/src/x64/frames-x64.h +130 -0
- data/ext/v8/upstream/3.1.8/src/x64/full-codegen-x64.cc +3984 -0
- data/ext/v8/upstream/3.1.8/src/x64/ic-x64.cc +1761 -0
- data/ext/v8/upstream/3.1.8/src/x64/jump-target-x64.cc +437 -0
- data/ext/v8/upstream/3.1.8/src/x64/lithium-codegen-x64.cc +3639 -0
- data/ext/v8/upstream/3.1.8/src/x64/lithium-codegen-x64.h +305 -0
- data/ext/v8/upstream/3.1.8/src/x64/lithium-gap-resolver-x64.cc +320 -0
- data/ext/v8/upstream/3.1.8/src/x64/lithium-gap-resolver-x64.h +74 -0
- data/ext/v8/upstream/3.1.8/src/x64/lithium-x64.cc +2044 -0
- data/ext/v8/upstream/3.1.8/src/x64/lithium-x64.h +2052 -0
- data/ext/v8/upstream/3.1.8/src/x64/macro-assembler-x64.cc +2660 -0
- data/ext/v8/upstream/3.1.8/src/x64/macro-assembler-x64.h +1852 -0
- data/ext/v8/upstream/3.1.8/src/x64/regexp-macro-assembler-x64.cc +1382 -0
- data/ext/v8/upstream/3.1.8/src/x64/regexp-macro-assembler-x64.h +278 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64-inl.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64.cc +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/register-allocator-x64.h +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/src/x64/simulator-x64.cc +0 -0
- data/ext/v8/upstream/3.1.8/src/x64/simulator-x64.h +71 -0
- data/ext/v8/upstream/3.1.8/src/x64/stub-cache-x64.cc +3509 -0
- data/ext/v8/upstream/3.1.8/src/x64/virtual-frame-x64.cc +1292 -0
- data/ext/v8/upstream/3.1.8/src/x64/virtual-frame-x64.h +593 -0
- data/ext/v8/upstream/3.1.8/src/zone-inl.h +83 -0
- data/ext/v8/upstream/3.1.8/src/zone.cc +195 -0
- data/ext/v8/upstream/3.1.8/src/zone.h +233 -0
- data/ext/v8/upstream/3.1.8/tools/codemap.js +265 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/consarray.js +0 -0
- data/ext/v8/upstream/3.1.8/tools/csvparser.js +78 -0
- data/ext/v8/upstream/3.1.8/tools/disasm.py +92 -0
- data/ext/v8/upstream/3.1.8/tools/gc-nvp-trace-processor.py +328 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/generate-ten-powers.scm +0 -0
- data/ext/v8/upstream/3.1.8/tools/grokdump.py +840 -0
- data/ext/v8/upstream/3.1.8/tools/gyp/v8.gyp +869 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/js2c.py +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/jsmin.py +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/linux-tick-processor +0 -0
- data/ext/v8/upstream/3.1.8/tools/ll_prof.py +919 -0
- data/ext/v8/upstream/3.1.8/tools/logreader.js +185 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/mac-nm +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/mac-tick-processor +0 -0
- data/ext/v8/upstream/3.1.8/tools/oom_dump/README +31 -0
- data/ext/v8/upstream/3.1.8/tools/oom_dump/SConstruct +42 -0
- data/ext/v8/upstream/3.1.8/tools/oom_dump/oom_dump.cc +288 -0
- data/ext/v8/upstream/3.1.8/tools/presubmit.py +305 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/process-heap-prof.py +0 -0
- data/ext/v8/upstream/3.1.8/tools/profile.js +751 -0
- data/ext/v8/upstream/3.1.8/tools/profile_view.js +219 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/run-valgrind.py +0 -0
- data/ext/v8/upstream/3.1.8/tools/splaytree.js +316 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/stats-viewer.py +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/tickprocessor-driver.js +0 -0
- data/ext/v8/upstream/3.1.8/tools/tickprocessor.js +863 -0
- data/ext/v8/upstream/3.1.8/tools/utils.py +96 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/README.txt +70 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/arm.vsprops +0 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/common.vsprops +34 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8_arm.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/d8js2c.cmd +0 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/debug.vsprops +17 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/ia32.vsprops +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/js2c.cmd +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/release.vsprops +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8.sln +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_arm.sln +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_arm.vcproj +0 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base.vcproj +1296 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base_arm.vcproj +1234 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_base_x64.vcproj +1296 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest_arm.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_cctest_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_mksnapshot.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_mksnapshot_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample_arm.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_process_sample_x64.vcproj +0 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample.vcproj +147 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample_arm.vcproj +147 -0
- data/ext/v8/upstream/3.1.8/tools/visual_studio/v8_shell_sample_x64.vcproj +163 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_cc.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_cc_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_snapshot_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_x64.sln +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/v8_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.3.3 → 3.1.8}/tools/visual_studio/x64.vsprops +0 -0
- data/ext/v8/upstream/3.1.8/tools/windows-tick-processor.bat +30 -0
- data/ext/v8/upstream/Makefile +2 -1
- data/ext/v8/v8_template.cpp +2 -2
- data/lib/v8/version.rb +1 -1
- data/spec/redjs/jsapi_spec.rb +2 -2
- metadata +552 -490
- data/ext/v8/upstream/2.3.3/.gitignore +0 -26
- data/ext/v8/upstream/2.3.3/AUTHORS +0 -31
- data/ext/v8/upstream/2.3.3/ChangeLog +0 -1916
- data/ext/v8/upstream/2.3.3/LICENSE +0 -55
- data/ext/v8/upstream/2.3.3/SConstruct +0 -1154
- data/ext/v8/upstream/2.3.3/include/v8-debug.h +0 -381
- data/ext/v8/upstream/2.3.3/include/v8-profiler.h +0 -353
- data/ext/v8/upstream/2.3.3/include/v8.h +0 -3616
- data/ext/v8/upstream/2.3.3/src/SConscript +0 -330
- data/ext/v8/upstream/2.3.3/src/accessors.cc +0 -661
- data/ext/v8/upstream/2.3.3/src/accessors.h +0 -114
- data/ext/v8/upstream/2.3.3/src/allocation.cc +0 -198
- data/ext/v8/upstream/2.3.3/src/allocation.h +0 -169
- data/ext/v8/upstream/2.3.3/src/api.cc +0 -4795
- data/ext/v8/upstream/2.3.3/src/api.h +0 -485
- data/ext/v8/upstream/2.3.3/src/apiutils.h +0 -69
- data/ext/v8/upstream/2.3.3/src/arguments.h +0 -96
- data/ext/v8/upstream/2.3.3/src/arm/assembler-arm-inl.h +0 -305
- data/ext/v8/upstream/2.3.3/src/arm/assembler-arm.cc +0 -2580
- data/ext/v8/upstream/2.3.3/src/arm/assembler-arm.h +0 -1275
- data/ext/v8/upstream/2.3.3/src/arm/builtins-arm.cc +0 -1320
- data/ext/v8/upstream/2.3.3/src/arm/codegen-arm-inl.h +0 -48
- data/ext/v8/upstream/2.3.3/src/arm/codegen-arm.cc +0 -11398
- data/ext/v8/upstream/2.3.3/src/arm/codegen-arm.h +0 -1102
- data/ext/v8/upstream/2.3.3/src/arm/constants-arm.cc +0 -154
- data/ext/v8/upstream/2.3.3/src/arm/constants-arm.h +0 -388
- data/ext/v8/upstream/2.3.3/src/arm/cpu-arm.cc +0 -142
- data/ext/v8/upstream/2.3.3/src/arm/debug-arm.cc +0 -309
- data/ext/v8/upstream/2.3.3/src/arm/disasm-arm.cc +0 -1459
- data/ext/v8/upstream/2.3.3/src/arm/fast-codegen-arm.cc +0 -241
- data/ext/v8/upstream/2.3.3/src/arm/frames-arm.cc +0 -123
- data/ext/v8/upstream/2.3.3/src/arm/frames-arm.h +0 -162
- data/ext/v8/upstream/2.3.3/src/arm/full-codegen-arm.cc +0 -3178
- data/ext/v8/upstream/2.3.3/src/arm/ic-arm.cc +0 -2258
- data/ext/v8/upstream/2.3.3/src/arm/jump-target-arm.cc +0 -164
- data/ext/v8/upstream/2.3.3/src/arm/macro-assembler-arm.cc +0 -1892
- data/ext/v8/upstream/2.3.3/src/arm/macro-assembler-arm.h +0 -727
- data/ext/v8/upstream/2.3.3/src/arm/regexp-macro-assembler-arm.cc +0 -1261
- data/ext/v8/upstream/2.3.3/src/arm/regexp-macro-assembler-arm.h +0 -266
- data/ext/v8/upstream/2.3.3/src/arm/simulator-arm.cc +0 -2822
- data/ext/v8/upstream/2.3.3/src/arm/simulator-arm.h +0 -361
- data/ext/v8/upstream/2.3.3/src/arm/stub-cache-arm.cc +0 -2387
- data/ext/v8/upstream/2.3.3/src/arm/virtual-frame-arm.cc +0 -834
- data/ext/v8/upstream/2.3.3/src/arm/virtual-frame-arm.h +0 -519
- data/ext/v8/upstream/2.3.3/src/array.js +0 -1127
- data/ext/v8/upstream/2.3.3/src/assembler.cc +0 -801
- data/ext/v8/upstream/2.3.3/src/assembler.h +0 -573
- data/ext/v8/upstream/2.3.3/src/ast-inl.h +0 -81
- data/ext/v8/upstream/2.3.3/src/ast.cc +0 -1152
- data/ext/v8/upstream/2.3.3/src/ast.h +0 -2106
- data/ext/v8/upstream/2.3.3/src/bootstrapper.cc +0 -1819
- data/ext/v8/upstream/2.3.3/src/builtins.cc +0 -1529
- data/ext/v8/upstream/2.3.3/src/builtins.h +0 -263
- data/ext/v8/upstream/2.3.3/src/bytecodes-irregexp.h +0 -104
- data/ext/v8/upstream/2.3.3/src/cached-powers.h +0 -119
- data/ext/v8/upstream/2.3.3/src/char-predicates-inl.h +0 -86
- data/ext/v8/upstream/2.3.3/src/checks.cc +0 -100
- data/ext/v8/upstream/2.3.3/src/checks.h +0 -310
- data/ext/v8/upstream/2.3.3/src/circular-queue.cc +0 -121
- data/ext/v8/upstream/2.3.3/src/code-stubs.cc +0 -177
- data/ext/v8/upstream/2.3.3/src/code-stubs.h +0 -177
- data/ext/v8/upstream/2.3.3/src/codegen-inl.h +0 -60
- data/ext/v8/upstream/2.3.3/src/codegen.cc +0 -516
- data/ext/v8/upstream/2.3.3/src/codegen.h +0 -897
- data/ext/v8/upstream/2.3.3/src/compilation-cache.cc +0 -562
- data/ext/v8/upstream/2.3.3/src/compilation-cache.h +0 -102
- data/ext/v8/upstream/2.3.3/src/compiler.cc +0 -654
- data/ext/v8/upstream/2.3.3/src/compiler.h +0 -299
- data/ext/v8/upstream/2.3.3/src/contexts.cc +0 -256
- data/ext/v8/upstream/2.3.3/src/contexts.h +0 -342
- data/ext/v8/upstream/2.3.3/src/conversions.cc +0 -1119
- data/ext/v8/upstream/2.3.3/src/conversions.h +0 -123
- data/ext/v8/upstream/2.3.3/src/counters.h +0 -239
- data/ext/v8/upstream/2.3.3/src/cpu-profiler-inl.h +0 -100
- data/ext/v8/upstream/2.3.3/src/cpu-profiler.cc +0 -538
- data/ext/v8/upstream/2.3.3/src/cpu-profiler.h +0 -285
- data/ext/v8/upstream/2.3.3/src/d8-debug.cc +0 -356
- data/ext/v8/upstream/2.3.3/src/d8-debug.h +0 -155
- data/ext/v8/upstream/2.3.3/src/d8.cc +0 -783
- data/ext/v8/upstream/2.3.3/src/d8.h +0 -227
- data/ext/v8/upstream/2.3.3/src/d8.js +0 -1683
- data/ext/v8/upstream/2.3.3/src/data-flow.cc +0 -758
- data/ext/v8/upstream/2.3.3/src/data-flow.h +0 -278
- data/ext/v8/upstream/2.3.3/src/date.js +0 -1059
- data/ext/v8/upstream/2.3.3/src/dateparser-inl.h +0 -123
- data/ext/v8/upstream/2.3.3/src/dateparser.h +0 -244
- data/ext/v8/upstream/2.3.3/src/debug-agent.cc +0 -427
- data/ext/v8/upstream/2.3.3/src/debug-agent.h +0 -129
- data/ext/v8/upstream/2.3.3/src/debug-debugger.js +0 -2227
- data/ext/v8/upstream/2.3.3/src/debug.cc +0 -3005
- data/ext/v8/upstream/2.3.3/src/debug.h +0 -993
- data/ext/v8/upstream/2.3.3/src/disassembler.cc +0 -312
- data/ext/v8/upstream/2.3.3/src/double.h +0 -169
- data/ext/v8/upstream/2.3.3/src/dtoa-config.c +0 -92
- data/ext/v8/upstream/2.3.3/src/dtoa.cc +0 -77
- data/ext/v8/upstream/2.3.3/src/dtoa.h +0 -81
- data/ext/v8/upstream/2.3.3/src/execution.cc +0 -809
- data/ext/v8/upstream/2.3.3/src/execution.h +0 -336
- data/ext/v8/upstream/2.3.3/src/factory.cc +0 -1003
- data/ext/v8/upstream/2.3.3/src/factory.h +0 -410
- data/ext/v8/upstream/2.3.3/src/fast-codegen.cc +0 -746
- data/ext/v8/upstream/2.3.3/src/fast-codegen.h +0 -161
- data/ext/v8/upstream/2.3.3/src/fast-dtoa.cc +0 -505
- data/ext/v8/upstream/2.3.3/src/fast-dtoa.h +0 -58
- data/ext/v8/upstream/2.3.3/src/flag-definitions.h +0 -455
- data/ext/v8/upstream/2.3.3/src/flags.cc +0 -551
- data/ext/v8/upstream/2.3.3/src/flags.h +0 -81
- data/ext/v8/upstream/2.3.3/src/flow-graph.cc +0 -763
- data/ext/v8/upstream/2.3.3/src/flow-graph.h +0 -180
- data/ext/v8/upstream/2.3.3/src/frame-element.h +0 -273
- data/ext/v8/upstream/2.3.3/src/frames-inl.h +0 -217
- data/ext/v8/upstream/2.3.3/src/frames.cc +0 -826
- data/ext/v8/upstream/2.3.3/src/frames.h +0 -682
- data/ext/v8/upstream/2.3.3/src/full-codegen.cc +0 -1443
- data/ext/v8/upstream/2.3.3/src/full-codegen.h +0 -548
- data/ext/v8/upstream/2.3.3/src/func-name-inferrer.cc +0 -76
- data/ext/v8/upstream/2.3.3/src/func-name-inferrer.h +0 -135
- data/ext/v8/upstream/2.3.3/src/global-handles.cc +0 -520
- data/ext/v8/upstream/2.3.3/src/global-handles.h +0 -180
- data/ext/v8/upstream/2.3.3/src/globals.h +0 -669
- data/ext/v8/upstream/2.3.3/src/handles-inl.h +0 -76
- data/ext/v8/upstream/2.3.3/src/handles.cc +0 -825
- data/ext/v8/upstream/2.3.3/src/handles.h +0 -393
- data/ext/v8/upstream/2.3.3/src/hashmap.cc +0 -226
- data/ext/v8/upstream/2.3.3/src/hashmap.h +0 -120
- data/ext/v8/upstream/2.3.3/src/heap-inl.h +0 -493
- data/ext/v8/upstream/2.3.3/src/heap-profiler.cc +0 -779
- data/ext/v8/upstream/2.3.3/src/heap-profiler.h +0 -323
- data/ext/v8/upstream/2.3.3/src/heap.cc +0 -4994
- data/ext/v8/upstream/2.3.3/src/heap.h +0 -1984
- data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32-inl.h +0 -360
- data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32.cc +0 -2600
- data/ext/v8/upstream/2.3.3/src/ia32/assembler-ia32.h +0 -969
- data/ext/v8/upstream/2.3.3/src/ia32/builtins-ia32.cc +0 -1261
- data/ext/v8/upstream/2.3.3/src/ia32/codegen-ia32.cc +0 -13968
- data/ext/v8/upstream/2.3.3/src/ia32/codegen-ia32.h +0 -1097
- data/ext/v8/upstream/2.3.3/src/ia32/cpu-ia32.cc +0 -83
- data/ext/v8/upstream/2.3.3/src/ia32/debug-ia32.cc +0 -309
- data/ext/v8/upstream/2.3.3/src/ia32/disasm-ia32.cc +0 -1471
- data/ext/v8/upstream/2.3.3/src/ia32/fast-codegen-ia32.cc +0 -954
- data/ext/v8/upstream/2.3.3/src/ia32/fast-codegen-ia32.h +0 -155
- data/ext/v8/upstream/2.3.3/src/ia32/frames-ia32.cc +0 -115
- data/ext/v8/upstream/2.3.3/src/ia32/frames-ia32.h +0 -135
- data/ext/v8/upstream/2.3.3/src/ia32/full-codegen-ia32.cc +0 -3281
- data/ext/v8/upstream/2.3.3/src/ia32/ic-ia32.cc +0 -1966
- data/ext/v8/upstream/2.3.3/src/ia32/macro-assembler-ia32.cc +0 -1610
- data/ext/v8/upstream/2.3.3/src/ia32/macro-assembler-ia32.h +0 -610
- data/ext/v8/upstream/2.3.3/src/ia32/regexp-macro-assembler-ia32.cc +0 -1247
- data/ext/v8/upstream/2.3.3/src/ia32/regexp-macro-assembler-ia32.h +0 -214
- data/ext/v8/upstream/2.3.3/src/ia32/simulator-ia32.h +0 -62
- data/ext/v8/upstream/2.3.3/src/ia32/stub-cache-ia32.cc +0 -2750
- data/ext/v8/upstream/2.3.3/src/ia32/virtual-frame-ia32.cc +0 -1334
- data/ext/v8/upstream/2.3.3/src/ia32/virtual-frame-ia32.h +0 -627
- data/ext/v8/upstream/2.3.3/src/ic-inl.h +0 -120
- data/ext/v8/upstream/2.3.3/src/ic.cc +0 -1827
- data/ext/v8/upstream/2.3.3/src/ic.h +0 -515
- data/ext/v8/upstream/2.3.3/src/interpreter-irregexp.cc +0 -646
- data/ext/v8/upstream/2.3.3/src/json.js +0 -268
- data/ext/v8/upstream/2.3.3/src/jsregexp.cc +0 -5283
- data/ext/v8/upstream/2.3.3/src/jsregexp.h +0 -1463
- data/ext/v8/upstream/2.3.3/src/jump-target-heavy.cc +0 -429
- data/ext/v8/upstream/2.3.3/src/jump-target-heavy.h +0 -244
- data/ext/v8/upstream/2.3.3/src/jump-target-light.cc +0 -110
- data/ext/v8/upstream/2.3.3/src/jump-target-light.h +0 -192
- data/ext/v8/upstream/2.3.3/src/list-inl.h +0 -166
- data/ext/v8/upstream/2.3.3/src/list.h +0 -159
- data/ext/v8/upstream/2.3.3/src/liveedit-debugger.js +0 -1057
- data/ext/v8/upstream/2.3.3/src/liveedit.cc +0 -1480
- data/ext/v8/upstream/2.3.3/src/liveedit.h +0 -170
- data/ext/v8/upstream/2.3.3/src/log-utils.cc +0 -497
- data/ext/v8/upstream/2.3.3/src/log-utils.h +0 -289
- data/ext/v8/upstream/2.3.3/src/log.cc +0 -1561
- data/ext/v8/upstream/2.3.3/src/log.h +0 -384
- data/ext/v8/upstream/2.3.3/src/macro-assembler.h +0 -86
- data/ext/v8/upstream/2.3.3/src/macros.py +0 -177
- data/ext/v8/upstream/2.3.3/src/mark-compact.cc +0 -2330
- data/ext/v8/upstream/2.3.3/src/mark-compact.h +0 -451
- data/ext/v8/upstream/2.3.3/src/math.js +0 -264
- data/ext/v8/upstream/2.3.3/src/memory.h +0 -74
- data/ext/v8/upstream/2.3.3/src/messages.cc +0 -183
- data/ext/v8/upstream/2.3.3/src/messages.h +0 -113
- data/ext/v8/upstream/2.3.3/src/messages.js +0 -982
- data/ext/v8/upstream/2.3.3/src/mips/assembler-mips.h +0 -668
- data/ext/v8/upstream/2.3.3/src/mips/builtins-mips.cc +0 -205
- data/ext/v8/upstream/2.3.3/src/mips/codegen-mips.h +0 -434
- data/ext/v8/upstream/2.3.3/src/mips/debug-mips.cc +0 -131
- data/ext/v8/upstream/2.3.3/src/mips/frames-mips.cc +0 -102
- data/ext/v8/upstream/2.3.3/src/mips/ic-mips.cc +0 -220
- data/ext/v8/upstream/2.3.3/src/mips/simulator-mips.cc +0 -1651
- data/ext/v8/upstream/2.3.3/src/mips/simulator-mips.h +0 -311
- data/ext/v8/upstream/2.3.3/src/mips/stub-cache-mips.cc +0 -403
- data/ext/v8/upstream/2.3.3/src/mirror-debugger.js +0 -2380
- data/ext/v8/upstream/2.3.3/src/objects-debug.cc +0 -1366
- data/ext/v8/upstream/2.3.3/src/objects-inl.h +0 -3333
- data/ext/v8/upstream/2.3.3/src/objects.cc +0 -8820
- data/ext/v8/upstream/2.3.3/src/objects.h +0 -5373
- data/ext/v8/upstream/2.3.3/src/oprofile-agent.cc +0 -108
- data/ext/v8/upstream/2.3.3/src/oprofile-agent.h +0 -77
- data/ext/v8/upstream/2.3.3/src/parser.cc +0 -5207
- data/ext/v8/upstream/2.3.3/src/parser.h +0 -197
- data/ext/v8/upstream/2.3.3/src/platform-freebsd.cc +0 -667
- data/ext/v8/upstream/2.3.3/src/platform-linux.cc +0 -862
- data/ext/v8/upstream/2.3.3/src/platform-macos.cc +0 -665
- data/ext/v8/upstream/2.3.3/src/platform-nullos.cc +0 -454
- data/ext/v8/upstream/2.3.3/src/platform-openbsd.cc +0 -622
- data/ext/v8/upstream/2.3.3/src/platform-posix.cc +0 -362
- data/ext/v8/upstream/2.3.3/src/platform-solaris.cc +0 -653
- data/ext/v8/upstream/2.3.3/src/platform-win32.cc +0 -1911
- data/ext/v8/upstream/2.3.3/src/platform.h +0 -577
- data/ext/v8/upstream/2.3.3/src/powers-ten.h +0 -2461
- data/ext/v8/upstream/2.3.3/src/prettyprinter.cc +0 -1531
- data/ext/v8/upstream/2.3.3/src/prettyprinter.h +0 -221
- data/ext/v8/upstream/2.3.3/src/profile-generator-inl.h +0 -148
- data/ext/v8/upstream/2.3.3/src/profile-generator.cc +0 -1830
- data/ext/v8/upstream/2.3.3/src/profile-generator.h +0 -853
- data/ext/v8/upstream/2.3.3/src/property.cc +0 -96
- data/ext/v8/upstream/2.3.3/src/property.h +0 -315
- data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-irregexp.cc +0 -464
- data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-irregexp.h +0 -141
- data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-tracer.cc +0 -356
- data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler-tracer.h +0 -103
- data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler.cc +0 -261
- data/ext/v8/upstream/2.3.3/src/regexp-macro-assembler.h +0 -228
- data/ext/v8/upstream/2.3.3/src/regexp.js +0 -549
- data/ext/v8/upstream/2.3.3/src/rewriter.cc +0 -1038
- data/ext/v8/upstream/2.3.3/src/rewriter.h +0 -54
- data/ext/v8/upstream/2.3.3/src/runtime.cc +0 -10599
- data/ext/v8/upstream/2.3.3/src/runtime.h +0 -459
- data/ext/v8/upstream/2.3.3/src/runtime.js +0 -629
- data/ext/v8/upstream/2.3.3/src/scanner.cc +0 -1346
- data/ext/v8/upstream/2.3.3/src/scanner.h +0 -503
- data/ext/v8/upstream/2.3.3/src/scopeinfo.cc +0 -637
- data/ext/v8/upstream/2.3.3/src/scopeinfo.h +0 -233
- data/ext/v8/upstream/2.3.3/src/scopes.cc +0 -962
- data/ext/v8/upstream/2.3.3/src/scopes.h +0 -400
- data/ext/v8/upstream/2.3.3/src/serialize.cc +0 -1461
- data/ext/v8/upstream/2.3.3/src/serialize.h +0 -581
- data/ext/v8/upstream/2.3.3/src/spaces-inl.h +0 -483
- data/ext/v8/upstream/2.3.3/src/spaces.cc +0 -2901
- data/ext/v8/upstream/2.3.3/src/spaces.h +0 -2197
- data/ext/v8/upstream/2.3.3/src/string-stream.cc +0 -584
- data/ext/v8/upstream/2.3.3/src/string-stream.h +0 -189
- data/ext/v8/upstream/2.3.3/src/string.js +0 -1006
- data/ext/v8/upstream/2.3.3/src/stub-cache.cc +0 -1379
- data/ext/v8/upstream/2.3.3/src/stub-cache.h +0 -756
- data/ext/v8/upstream/2.3.3/src/third_party/dtoa/COPYING +0 -15
- data/ext/v8/upstream/2.3.3/src/third_party/dtoa/dtoa.c +0 -3334
- data/ext/v8/upstream/2.3.3/src/token.cc +0 -56
- data/ext/v8/upstream/2.3.3/src/token.h +0 -270
- data/ext/v8/upstream/2.3.3/src/top.cc +0 -1067
- data/ext/v8/upstream/2.3.3/src/top.h +0 -463
- data/ext/v8/upstream/2.3.3/src/type-info.cc +0 -53
- data/ext/v8/upstream/2.3.3/src/type-info.h +0 -244
- data/ext/v8/upstream/2.3.3/src/unicode-inl.h +0 -238
- data/ext/v8/upstream/2.3.3/src/unicode.cc +0 -749
- data/ext/v8/upstream/2.3.3/src/unicode.h +0 -279
- data/ext/v8/upstream/2.3.3/src/uri.js +0 -415
- data/ext/v8/upstream/2.3.3/src/utils.cc +0 -285
- data/ext/v8/upstream/2.3.3/src/utils.h +0 -745
- data/ext/v8/upstream/2.3.3/src/v8-counters.h +0 -250
- data/ext/v8/upstream/2.3.3/src/v8.cc +0 -228
- data/ext/v8/upstream/2.3.3/src/v8.h +0 -121
- data/ext/v8/upstream/2.3.3/src/v8natives.js +0 -1188
- data/ext/v8/upstream/2.3.3/src/v8threads.cc +0 -461
- data/ext/v8/upstream/2.3.3/src/v8threads.h +0 -159
- data/ext/v8/upstream/2.3.3/src/variables.cc +0 -119
- data/ext/v8/upstream/2.3.3/src/variables.h +0 -205
- data/ext/v8/upstream/2.3.3/src/version.cc +0 -88
- data/ext/v8/upstream/2.3.3/src/virtual-frame-heavy-inl.h +0 -192
- data/ext/v8/upstream/2.3.3/src/virtual-frame.h +0 -46
- data/ext/v8/upstream/2.3.3/src/vm-state-inl.h +0 -137
- data/ext/v8/upstream/2.3.3/src/vm-state.cc +0 -39
- data/ext/v8/upstream/2.3.3/src/vm-state.h +0 -77
- data/ext/v8/upstream/2.3.3/src/x64/assembler-x64-inl.h +0 -400
- data/ext/v8/upstream/2.3.3/src/x64/assembler-x64.cc +0 -2963
- data/ext/v8/upstream/2.3.3/src/x64/assembler-x64.h +0 -1438
- data/ext/v8/upstream/2.3.3/src/x64/builtins-x64.cc +0 -1296
- data/ext/v8/upstream/2.3.3/src/x64/codegen-x64-inl.h +0 -46
- data/ext/v8/upstream/2.3.3/src/x64/codegen-x64.cc +0 -12491
- data/ext/v8/upstream/2.3.3/src/x64/codegen-x64.h +0 -1090
- data/ext/v8/upstream/2.3.3/src/x64/cpu-x64.cc +0 -83
- data/ext/v8/upstream/2.3.3/src/x64/debug-x64.cc +0 -267
- data/ext/v8/upstream/2.3.3/src/x64/disasm-x64.cc +0 -1696
- data/ext/v8/upstream/2.3.3/src/x64/fast-codegen-x64.cc +0 -250
- data/ext/v8/upstream/2.3.3/src/x64/frames-x64.cc +0 -113
- data/ext/v8/upstream/2.3.3/src/x64/frames-x64.h +0 -125
- data/ext/v8/upstream/2.3.3/src/x64/full-codegen-x64.cc +0 -3270
- data/ext/v8/upstream/2.3.3/src/x64/ic-x64.cc +0 -1907
- data/ext/v8/upstream/2.3.3/src/x64/jump-target-x64.cc +0 -437
- data/ext/v8/upstream/2.3.3/src/x64/macro-assembler-x64.cc +0 -2793
- data/ext/v8/upstream/2.3.3/src/x64/macro-assembler-x64.h +0 -916
- data/ext/v8/upstream/2.3.3/src/x64/regexp-macro-assembler-x64.cc +0 -1374
- data/ext/v8/upstream/2.3.3/src/x64/regexp-macro-assembler-x64.h +0 -277
- data/ext/v8/upstream/2.3.3/src/x64/simulator-x64.h +0 -63
- data/ext/v8/upstream/2.3.3/src/x64/stub-cache-x64.cc +0 -2560
- data/ext/v8/upstream/2.3.3/src/x64/virtual-frame-x64.cc +0 -1264
- data/ext/v8/upstream/2.3.3/src/x64/virtual-frame-x64.h +0 -590
- data/ext/v8/upstream/2.3.3/src/zone-inl.h +0 -82
- data/ext/v8/upstream/2.3.3/src/zone.cc +0 -194
- data/ext/v8/upstream/2.3.3/src/zone.h +0 -221
- data/ext/v8/upstream/2.3.3/tools/codemap.js +0 -270
- data/ext/v8/upstream/2.3.3/tools/csvparser.js +0 -83
- data/ext/v8/upstream/2.3.3/tools/gc-nvp-trace-processor.py +0 -317
- data/ext/v8/upstream/2.3.3/tools/gyp/v8.gyp +0 -749
- data/ext/v8/upstream/2.3.3/tools/linux-tick-processor.py +0 -78
- data/ext/v8/upstream/2.3.3/tools/logreader.js +0 -338
- data/ext/v8/upstream/2.3.3/tools/oprofile/annotate +0 -7
- data/ext/v8/upstream/2.3.3/tools/oprofile/common +0 -19
- data/ext/v8/upstream/2.3.3/tools/oprofile/dump +0 -7
- data/ext/v8/upstream/2.3.3/tools/oprofile/report +0 -7
- data/ext/v8/upstream/2.3.3/tools/oprofile/reset +0 -7
- data/ext/v8/upstream/2.3.3/tools/oprofile/run +0 -14
- data/ext/v8/upstream/2.3.3/tools/oprofile/shutdown +0 -7
- data/ext/v8/upstream/2.3.3/tools/oprofile/start +0 -7
- data/ext/v8/upstream/2.3.3/tools/presubmit.py +0 -299
- data/ext/v8/upstream/2.3.3/tools/profile.js +0 -691
- data/ext/v8/upstream/2.3.3/tools/profile_view.js +0 -224
- data/ext/v8/upstream/2.3.3/tools/splaytree.js +0 -322
- data/ext/v8/upstream/2.3.3/tools/splaytree.py +0 -226
- data/ext/v8/upstream/2.3.3/tools/tickprocessor.js +0 -862
- data/ext/v8/upstream/2.3.3/tools/tickprocessor.py +0 -571
- data/ext/v8/upstream/2.3.3/tools/utils.py +0 -88
- data/ext/v8/upstream/2.3.3/tools/visual_studio/README.txt +0 -71
- data/ext/v8/upstream/2.3.3/tools/visual_studio/common.vsprops +0 -34
- data/ext/v8/upstream/2.3.3/tools/visual_studio/debug.vsprops +0 -17
- data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base.vcproj +0 -1143
- data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base_arm.vcproj +0 -1115
- data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_base_x64.vcproj +0 -1096
- data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample.vcproj +0 -145
- data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample_arm.vcproj +0 -145
- data/ext/v8/upstream/2.3.3/tools/visual_studio/v8_shell_sample_x64.vcproj +0 -161
- data/ext/v8/upstream/2.3.3/tools/windows-tick-processor.bat +0 -29
- data/ext/v8/upstream/2.3.3/tools/windows-tick-processor.py +0 -137
@@ -1,83 +0,0 @@
|
|
1
|
-
// Copyright 2006-2008 the V8 project authors. All rights reserved.
|
2
|
-
// Redistribution and use in source and binary forms, with or without
|
3
|
-
// modification, are permitted provided that the following conditions are
|
4
|
-
// met:
|
5
|
-
//
|
6
|
-
// * Redistributions of source code must retain the above copyright
|
7
|
-
// notice, this list of conditions and the following disclaimer.
|
8
|
-
// * Redistributions in binary form must reproduce the above
|
9
|
-
// copyright notice, this list of conditions and the following
|
10
|
-
// disclaimer in the documentation and/or other materials provided
|
11
|
-
// with the distribution.
|
12
|
-
// * Neither the name of Google Inc. nor the names of its
|
13
|
-
// contributors may be used to endorse or promote products derived
|
14
|
-
// from this software without specific prior written permission.
|
15
|
-
//
|
16
|
-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
17
|
-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
18
|
-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
19
|
-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
20
|
-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
21
|
-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
22
|
-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
24
|
-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
25
|
-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
26
|
-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
-
|
28
|
-
// CPU specific code for ia32 independent of OS goes here.
|
29
|
-
|
30
|
-
#ifdef __GNUC__
|
31
|
-
#include "third_party/valgrind/valgrind.h"
|
32
|
-
#endif
|
33
|
-
|
34
|
-
#include "v8.h"
|
35
|
-
|
36
|
-
#if defined(V8_TARGET_ARCH_IA32)
|
37
|
-
|
38
|
-
#include "cpu.h"
|
39
|
-
#include "macro-assembler.h"
|
40
|
-
|
41
|
-
namespace v8 {
|
42
|
-
namespace internal {
|
43
|
-
|
44
|
-
void CPU::Setup() {
|
45
|
-
CpuFeatures::Probe();
|
46
|
-
}
|
47
|
-
|
48
|
-
|
49
|
-
void CPU::FlushICache(void* start, size_t size) {
|
50
|
-
// No need to flush the instruction cache on Intel. On Intel instruction
|
51
|
-
// cache flushing is only necessary when multiple cores running the same
|
52
|
-
// code simultaneously. V8 (and JavaScript) is single threaded and when code
|
53
|
-
// is patched on an intel CPU the core performing the patching will have its
|
54
|
-
// own instruction cache updated automatically.
|
55
|
-
|
56
|
-
// If flushing of the instruction cache becomes necessary Windows has the
|
57
|
-
// API function FlushInstructionCache.
|
58
|
-
|
59
|
-
// By default, valgrind only checks the stack for writes that might need to
|
60
|
-
// invalidate already cached translated code. This leads to random
|
61
|
-
// instability when code patches or moves are sometimes unnoticed. One
|
62
|
-
// solution is to run valgrind with --smc-check=all, but this comes at a big
|
63
|
-
// performance cost. We can notify valgrind to invalidate its cache.
|
64
|
-
#ifdef VALGRIND_DISCARD_TRANSLATIONS
|
65
|
-
VALGRIND_DISCARD_TRANSLATIONS(start, size);
|
66
|
-
#endif
|
67
|
-
}
|
68
|
-
|
69
|
-
|
70
|
-
void CPU::DebugBreak() {
|
71
|
-
#ifdef _MSC_VER
|
72
|
-
// To avoid Visual Studio runtime support the following code can be used
|
73
|
-
// instead
|
74
|
-
// __asm { int 3 }
|
75
|
-
__debugbreak();
|
76
|
-
#else
|
77
|
-
asm("int $3");
|
78
|
-
#endif
|
79
|
-
}
|
80
|
-
|
81
|
-
} } // namespace v8::internal
|
82
|
-
|
83
|
-
#endif // V8_TARGET_ARCH_IA32
|
@@ -1,309 +0,0 @@
|
|
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 "v8.h"
|
29
|
-
|
30
|
-
#if defined(V8_TARGET_ARCH_IA32)
|
31
|
-
|
32
|
-
#include "codegen-inl.h"
|
33
|
-
#include "debug.h"
|
34
|
-
|
35
|
-
|
36
|
-
namespace v8 {
|
37
|
-
namespace internal {
|
38
|
-
|
39
|
-
#ifdef ENABLE_DEBUGGER_SUPPORT
|
40
|
-
|
41
|
-
bool BreakLocationIterator::IsDebugBreakAtReturn() {
|
42
|
-
return Debug::IsDebugBreakAtReturn(rinfo());
|
43
|
-
}
|
44
|
-
|
45
|
-
|
46
|
-
// Patch the JS frame exit code with a debug break call. See
|
47
|
-
// CodeGenerator::VisitReturnStatement and VirtualFrame::Exit in codegen-ia32.cc
|
48
|
-
// for the precise return instructions sequence.
|
49
|
-
void BreakLocationIterator::SetDebugBreakAtReturn() {
|
50
|
-
ASSERT(Assembler::kJSReturnSequenceLength >=
|
51
|
-
Assembler::kCallInstructionLength);
|
52
|
-
rinfo()->PatchCodeWithCall(Debug::debug_break_return()->entry(),
|
53
|
-
Assembler::kJSReturnSequenceLength - Assembler::kCallInstructionLength);
|
54
|
-
}
|
55
|
-
|
56
|
-
|
57
|
-
// Restore the JS frame exit code.
|
58
|
-
void BreakLocationIterator::ClearDebugBreakAtReturn() {
|
59
|
-
rinfo()->PatchCode(original_rinfo()->pc(),
|
60
|
-
Assembler::kJSReturnSequenceLength);
|
61
|
-
}
|
62
|
-
|
63
|
-
|
64
|
-
// A debug break in the frame exit code is identified by the JS frame exit code
|
65
|
-
// having been patched with a call instruction.
|
66
|
-
bool Debug::IsDebugBreakAtReturn(RelocInfo* rinfo) {
|
67
|
-
ASSERT(RelocInfo::IsJSReturn(rinfo->rmode()));
|
68
|
-
return rinfo->IsPatchedReturnSequence();
|
69
|
-
}
|
70
|
-
|
71
|
-
|
72
|
-
bool BreakLocationIterator::IsDebugBreakAtSlot() {
|
73
|
-
ASSERT(IsDebugBreakSlot());
|
74
|
-
// Check whether the debug break slot instructions have been patched.
|
75
|
-
return rinfo()->IsPatchedDebugBreakSlotSequence();
|
76
|
-
}
|
77
|
-
|
78
|
-
|
79
|
-
void BreakLocationIterator::SetDebugBreakAtSlot() {
|
80
|
-
ASSERT(IsDebugBreakSlot());
|
81
|
-
rinfo()->PatchCodeWithCall(
|
82
|
-
Debug::debug_break_slot()->entry(),
|
83
|
-
Assembler::kDebugBreakSlotLength - Assembler::kCallInstructionLength);
|
84
|
-
}
|
85
|
-
|
86
|
-
|
87
|
-
void BreakLocationIterator::ClearDebugBreakAtSlot() {
|
88
|
-
ASSERT(IsDebugBreakSlot());
|
89
|
-
rinfo()->PatchCode(original_rinfo()->pc(), Assembler::kDebugBreakSlotLength);
|
90
|
-
}
|
91
|
-
|
92
|
-
|
93
|
-
#define __ ACCESS_MASM(masm)
|
94
|
-
|
95
|
-
|
96
|
-
static void Generate_DebugBreakCallHelper(MacroAssembler* masm,
|
97
|
-
RegList pointer_regs,
|
98
|
-
bool convert_call_to_jmp) {
|
99
|
-
// Save the content of all general purpose registers in memory. This copy in
|
100
|
-
// memory is later pushed onto the JS expression stack for the fake JS frame
|
101
|
-
// generated and also to the C frame generated on top of that. In the JS
|
102
|
-
// frame ONLY the registers containing pointers will be pushed on the
|
103
|
-
// expression stack. This causes the GC to update these pointers so that
|
104
|
-
// they will have the correct value when returning from the debugger.
|
105
|
-
__ SaveRegistersToMemory(kJSCallerSaved);
|
106
|
-
|
107
|
-
// Enter an internal frame.
|
108
|
-
__ EnterInternalFrame();
|
109
|
-
|
110
|
-
// Store the registers containing object pointers on the expression stack to
|
111
|
-
// make sure that these are correctly updated during GC.
|
112
|
-
__ PushRegistersFromMemory(pointer_regs);
|
113
|
-
|
114
|
-
#ifdef DEBUG
|
115
|
-
__ RecordComment("// Calling from debug break to runtime - come in - over");
|
116
|
-
#endif
|
117
|
-
__ Set(eax, Immediate(0)); // no arguments
|
118
|
-
__ mov(ebx, Immediate(ExternalReference::debug_break()));
|
119
|
-
|
120
|
-
CEntryStub ceb(1, ExitFrame::MODE_DEBUG);
|
121
|
-
__ CallStub(&ceb);
|
122
|
-
|
123
|
-
// Restore the register values containing object pointers from the expression
|
124
|
-
// stack in the reverse order as they where pushed.
|
125
|
-
__ PopRegistersToMemory(pointer_regs);
|
126
|
-
|
127
|
-
// Get rid of the internal frame.
|
128
|
-
__ LeaveInternalFrame();
|
129
|
-
|
130
|
-
// If this call did not replace a call but patched other code then there will
|
131
|
-
// be an unwanted return address left on the stack. Here we get rid of that.
|
132
|
-
if (convert_call_to_jmp) {
|
133
|
-
__ pop(eax);
|
134
|
-
}
|
135
|
-
|
136
|
-
// Finally restore all registers.
|
137
|
-
__ RestoreRegistersFromMemory(kJSCallerSaved);
|
138
|
-
|
139
|
-
// Now that the break point has been handled, resume normal execution by
|
140
|
-
// jumping to the target address intended by the caller and that was
|
141
|
-
// overwritten by the address of DebugBreakXXX.
|
142
|
-
ExternalReference after_break_target =
|
143
|
-
ExternalReference(Debug_Address::AfterBreakTarget());
|
144
|
-
__ jmp(Operand::StaticVariable(after_break_target));
|
145
|
-
}
|
146
|
-
|
147
|
-
|
148
|
-
void Debug::GenerateLoadICDebugBreak(MacroAssembler* masm) {
|
149
|
-
// Register state for IC load call (from ic-ia32.cc).
|
150
|
-
// ----------- S t a t e -------------
|
151
|
-
// -- eax : receiver
|
152
|
-
// -- ecx : name
|
153
|
-
// -----------------------------------
|
154
|
-
Generate_DebugBreakCallHelper(masm, eax.bit() | ecx.bit(), false);
|
155
|
-
}
|
156
|
-
|
157
|
-
|
158
|
-
void Debug::GenerateStoreICDebugBreak(MacroAssembler* masm) {
|
159
|
-
// Register state for IC store call (from ic-ia32.cc).
|
160
|
-
// ----------- S t a t e -------------
|
161
|
-
// -- eax : value
|
162
|
-
// -- ecx : name
|
163
|
-
// -- edx : receiver
|
164
|
-
// -----------------------------------
|
165
|
-
Generate_DebugBreakCallHelper(masm, eax.bit() | ecx.bit() | edx.bit(), false);
|
166
|
-
}
|
167
|
-
|
168
|
-
|
169
|
-
void Debug::GenerateKeyedLoadICDebugBreak(MacroAssembler* masm) {
|
170
|
-
// Register state for keyed IC load call (from ic-ia32.cc).
|
171
|
-
// ----------- S t a t e -------------
|
172
|
-
// -- edx : receiver
|
173
|
-
// -- eax : key
|
174
|
-
// -----------------------------------
|
175
|
-
Generate_DebugBreakCallHelper(masm, eax.bit() | edx.bit(), false);
|
176
|
-
}
|
177
|
-
|
178
|
-
|
179
|
-
void Debug::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) {
|
180
|
-
// Register state for keyed IC load call (from ic-ia32.cc).
|
181
|
-
// ----------- S t a t e -------------
|
182
|
-
// -- eax : value
|
183
|
-
// -- ecx : key
|
184
|
-
// -- edx : receiver
|
185
|
-
// -----------------------------------
|
186
|
-
// Register eax contains an object that needs to be pushed on the
|
187
|
-
// expression stack of the fake JS frame.
|
188
|
-
Generate_DebugBreakCallHelper(masm, eax.bit() | ecx.bit() | edx.bit(), false);
|
189
|
-
}
|
190
|
-
|
191
|
-
|
192
|
-
void Debug::GenerateCallICDebugBreak(MacroAssembler* masm) {
|
193
|
-
// Register state for keyed IC call call (from ic-ia32.cc)
|
194
|
-
// ----------- S t a t e -------------
|
195
|
-
// -- eax: number of arguments
|
196
|
-
// -----------------------------------
|
197
|
-
// The number of arguments in eax is not smi encoded.
|
198
|
-
Generate_DebugBreakCallHelper(masm, 0, false);
|
199
|
-
}
|
200
|
-
|
201
|
-
|
202
|
-
void Debug::GenerateConstructCallDebugBreak(MacroAssembler* masm) {
|
203
|
-
// Register state just before return from JS function (from codegen-ia32.cc).
|
204
|
-
// eax is the actual number of arguments not encoded as a smi see comment
|
205
|
-
// above IC call.
|
206
|
-
// ----------- S t a t e -------------
|
207
|
-
// -- eax: number of arguments
|
208
|
-
// -----------------------------------
|
209
|
-
// The number of arguments in eax is not smi encoded.
|
210
|
-
Generate_DebugBreakCallHelper(masm, 0, false);
|
211
|
-
}
|
212
|
-
|
213
|
-
|
214
|
-
void Debug::GenerateReturnDebugBreak(MacroAssembler* masm) {
|
215
|
-
// Register state just before return from JS function (from codegen-ia32.cc).
|
216
|
-
// ----------- S t a t e -------------
|
217
|
-
// -- eax: return value
|
218
|
-
// -----------------------------------
|
219
|
-
Generate_DebugBreakCallHelper(masm, eax.bit(), true);
|
220
|
-
}
|
221
|
-
|
222
|
-
|
223
|
-
void Debug::GenerateStubNoRegistersDebugBreak(MacroAssembler* masm) {
|
224
|
-
// Register state for stub CallFunction (from CallFunctionStub in ic-ia32.cc).
|
225
|
-
// ----------- S t a t e -------------
|
226
|
-
// No registers used on entry.
|
227
|
-
// -----------------------------------
|
228
|
-
Generate_DebugBreakCallHelper(masm, 0, false);
|
229
|
-
}
|
230
|
-
|
231
|
-
|
232
|
-
void Debug::GenerateSlot(MacroAssembler* masm) {
|
233
|
-
// Generate enough nop's to make space for a call instruction.
|
234
|
-
Label check_codesize;
|
235
|
-
__ bind(&check_codesize);
|
236
|
-
__ RecordDebugBreakSlot();
|
237
|
-
for (int i = 0; i < Assembler::kDebugBreakSlotLength; i++) {
|
238
|
-
__ nop();
|
239
|
-
}
|
240
|
-
ASSERT_EQ(Assembler::kDebugBreakSlotLength,
|
241
|
-
masm->SizeOfCodeGeneratedSince(&check_codesize));
|
242
|
-
}
|
243
|
-
|
244
|
-
|
245
|
-
void Debug::GenerateSlotDebugBreak(MacroAssembler* masm) {
|
246
|
-
// In the places where a debug break slot is inserted no registers can contain
|
247
|
-
// object pointers.
|
248
|
-
Generate_DebugBreakCallHelper(masm, 0, true);
|
249
|
-
}
|
250
|
-
|
251
|
-
|
252
|
-
void Debug::GeneratePlainReturnLiveEdit(MacroAssembler* masm) {
|
253
|
-
masm->ret(0);
|
254
|
-
}
|
255
|
-
|
256
|
-
|
257
|
-
// FrameDropper is a code replacement for a JavaScript frame with possibly
|
258
|
-
// several frames above.
|
259
|
-
// There is no calling conventions here, because it never actually gets called,
|
260
|
-
// it only gets returned to.
|
261
|
-
// Frame structure (conforms InternalFrame structure):
|
262
|
-
// -- JSFunction
|
263
|
-
// -- code
|
264
|
-
// -- SMI maker
|
265
|
-
// -- context
|
266
|
-
// -- frame base
|
267
|
-
void Debug::GenerateFrameDropperLiveEdit(MacroAssembler* masm) {
|
268
|
-
// We do not know our frame height, but set esp based on ebp.
|
269
|
-
__ lea(esp, Operand(ebp, -4 * kPointerSize));
|
270
|
-
|
271
|
-
__ pop(edi); // function
|
272
|
-
|
273
|
-
// Skip code self-reference and marker.
|
274
|
-
__ add(Operand(esp), Immediate(2 * kPointerSize));
|
275
|
-
|
276
|
-
__ pop(esi); // Context.
|
277
|
-
__ pop(ebp);
|
278
|
-
|
279
|
-
// Get function code.
|
280
|
-
__ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset));
|
281
|
-
__ mov(edx, FieldOperand(edx, SharedFunctionInfo::kCodeOffset));
|
282
|
-
__ lea(edx, FieldOperand(edx, Code::kHeaderSize));
|
283
|
-
|
284
|
-
// Re-run JSFunction, edi is function, esi is context.
|
285
|
-
__ jmp(Operand(edx));
|
286
|
-
}
|
287
|
-
|
288
|
-
#undef __
|
289
|
-
|
290
|
-
|
291
|
-
void Debug::SetUpFrameDropperFrame(StackFrame* bottom_js_frame,
|
292
|
-
Handle<Code> code) {
|
293
|
-
ASSERT(bottom_js_frame->is_java_script());
|
294
|
-
|
295
|
-
Address fp = bottom_js_frame->fp();
|
296
|
-
Memory::Object_at(fp - 4 * kPointerSize) =
|
297
|
-
Memory::Object_at(fp - 2 * kPointerSize); // Move edi (function).
|
298
|
-
|
299
|
-
Memory::Object_at(fp - 3 * kPointerSize) = *code;
|
300
|
-
Memory::Object_at(fp - 2 * kPointerSize) = Smi::FromInt(StackFrame::INTERNAL);
|
301
|
-
}
|
302
|
-
const int Debug::kFrameDropperFrameSize = 5;
|
303
|
-
|
304
|
-
|
305
|
-
#endif // ENABLE_DEBUGGER_SUPPORT
|
306
|
-
|
307
|
-
} } // namespace v8::internal
|
308
|
-
|
309
|
-
#endif // V8_TARGET_ARCH_IA32
|
@@ -1,1471 +0,0 @@
|
|
1
|
-
// Copyright 2007-2008 the V8 project authors. All rights reserved.
|
2
|
-
// Redistribution and use in source and binary forms, with or without
|
3
|
-
// modification, are permitted provided that the following conditions are
|
4
|
-
// met:
|
5
|
-
//
|
6
|
-
// * Redistributions of source code must retain the above copyright
|
7
|
-
// notice, this list of conditions and the following disclaimer.
|
8
|
-
// * Redistributions in binary form must reproduce the above
|
9
|
-
// copyright notice, this list of conditions and the following
|
10
|
-
// disclaimer in the documentation and/or other materials provided
|
11
|
-
// with the distribution.
|
12
|
-
// * Neither the name of Google Inc. nor the names of its
|
13
|
-
// contributors may be used to endorse or promote products derived
|
14
|
-
// from this software without specific prior written permission.
|
15
|
-
//
|
16
|
-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
17
|
-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
18
|
-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
19
|
-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
20
|
-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
21
|
-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
22
|
-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
24
|
-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
25
|
-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
26
|
-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
-
|
28
|
-
#include <assert.h>
|
29
|
-
#include <stdio.h>
|
30
|
-
#include <stdarg.h>
|
31
|
-
|
32
|
-
#include "v8.h"
|
33
|
-
|
34
|
-
#if defined(V8_TARGET_ARCH_IA32)
|
35
|
-
|
36
|
-
#include "disasm.h"
|
37
|
-
|
38
|
-
namespace disasm {
|
39
|
-
|
40
|
-
enum OperandOrder {
|
41
|
-
UNSET_OP_ORDER = 0,
|
42
|
-
REG_OPER_OP_ORDER,
|
43
|
-
OPER_REG_OP_ORDER
|
44
|
-
};
|
45
|
-
|
46
|
-
|
47
|
-
//------------------------------------------------------------------
|
48
|
-
// Tables
|
49
|
-
//------------------------------------------------------------------
|
50
|
-
struct ByteMnemonic {
|
51
|
-
int b; // -1 terminates, otherwise must be in range (0..255)
|
52
|
-
const char* mnem;
|
53
|
-
OperandOrder op_order_;
|
54
|
-
};
|
55
|
-
|
56
|
-
|
57
|
-
static ByteMnemonic two_operands_instr[] = {
|
58
|
-
{0x03, "add", REG_OPER_OP_ORDER},
|
59
|
-
{0x09, "or", OPER_REG_OP_ORDER},
|
60
|
-
{0x0B, "or", REG_OPER_OP_ORDER},
|
61
|
-
{0x1B, "sbb", REG_OPER_OP_ORDER},
|
62
|
-
{0x21, "and", OPER_REG_OP_ORDER},
|
63
|
-
{0x23, "and", REG_OPER_OP_ORDER},
|
64
|
-
{0x29, "sub", OPER_REG_OP_ORDER},
|
65
|
-
{0x2A, "subb", REG_OPER_OP_ORDER},
|
66
|
-
{0x2B, "sub", REG_OPER_OP_ORDER},
|
67
|
-
{0x31, "xor", OPER_REG_OP_ORDER},
|
68
|
-
{0x33, "xor", REG_OPER_OP_ORDER},
|
69
|
-
{0x38, "cmpb", OPER_REG_OP_ORDER},
|
70
|
-
{0x3A, "cmpb", REG_OPER_OP_ORDER},
|
71
|
-
{0x3B, "cmp", REG_OPER_OP_ORDER},
|
72
|
-
{0x84, "test_b", REG_OPER_OP_ORDER},
|
73
|
-
{0x85, "test", REG_OPER_OP_ORDER},
|
74
|
-
{0x87, "xchg", REG_OPER_OP_ORDER},
|
75
|
-
{0x8A, "mov_b", REG_OPER_OP_ORDER},
|
76
|
-
{0x8B, "mov", REG_OPER_OP_ORDER},
|
77
|
-
{0x8D, "lea", REG_OPER_OP_ORDER},
|
78
|
-
{-1, "", UNSET_OP_ORDER}
|
79
|
-
};
|
80
|
-
|
81
|
-
|
82
|
-
static ByteMnemonic zero_operands_instr[] = {
|
83
|
-
{0xC3, "ret", UNSET_OP_ORDER},
|
84
|
-
{0xC9, "leave", UNSET_OP_ORDER},
|
85
|
-
{0x90, "nop", UNSET_OP_ORDER},
|
86
|
-
{0xF4, "hlt", UNSET_OP_ORDER},
|
87
|
-
{0xCC, "int3", UNSET_OP_ORDER},
|
88
|
-
{0x60, "pushad", UNSET_OP_ORDER},
|
89
|
-
{0x61, "popad", UNSET_OP_ORDER},
|
90
|
-
{0x9C, "pushfd", UNSET_OP_ORDER},
|
91
|
-
{0x9D, "popfd", UNSET_OP_ORDER},
|
92
|
-
{0x9E, "sahf", UNSET_OP_ORDER},
|
93
|
-
{0x99, "cdq", UNSET_OP_ORDER},
|
94
|
-
{0x9B, "fwait", UNSET_OP_ORDER},
|
95
|
-
{0xFC, "cld", UNSET_OP_ORDER},
|
96
|
-
{0xAB, "stos", UNSET_OP_ORDER},
|
97
|
-
{-1, "", UNSET_OP_ORDER}
|
98
|
-
};
|
99
|
-
|
100
|
-
|
101
|
-
static ByteMnemonic call_jump_instr[] = {
|
102
|
-
{0xE8, "call", UNSET_OP_ORDER},
|
103
|
-
{0xE9, "jmp", UNSET_OP_ORDER},
|
104
|
-
{-1, "", UNSET_OP_ORDER}
|
105
|
-
};
|
106
|
-
|
107
|
-
|
108
|
-
static ByteMnemonic short_immediate_instr[] = {
|
109
|
-
{0x05, "add", UNSET_OP_ORDER},
|
110
|
-
{0x0D, "or", UNSET_OP_ORDER},
|
111
|
-
{0x15, "adc", UNSET_OP_ORDER},
|
112
|
-
{0x25, "and", UNSET_OP_ORDER},
|
113
|
-
{0x2D, "sub", UNSET_OP_ORDER},
|
114
|
-
{0x35, "xor", UNSET_OP_ORDER},
|
115
|
-
{0x3D, "cmp", UNSET_OP_ORDER},
|
116
|
-
{-1, "", UNSET_OP_ORDER}
|
117
|
-
};
|
118
|
-
|
119
|
-
|
120
|
-
static const char* jump_conditional_mnem[] = {
|
121
|
-
/*0*/ "jo", "jno", "jc", "jnc",
|
122
|
-
/*4*/ "jz", "jnz", "jna", "ja",
|
123
|
-
/*8*/ "js", "jns", "jpe", "jpo",
|
124
|
-
/*12*/ "jl", "jnl", "jng", "jg"
|
125
|
-
};
|
126
|
-
|
127
|
-
|
128
|
-
static const char* set_conditional_mnem[] = {
|
129
|
-
/*0*/ "seto", "setno", "setc", "setnc",
|
130
|
-
/*4*/ "setz", "setnz", "setna", "seta",
|
131
|
-
/*8*/ "sets", "setns", "setpe", "setpo",
|
132
|
-
/*12*/ "setl", "setnl", "setng", "setg"
|
133
|
-
};
|
134
|
-
|
135
|
-
|
136
|
-
static const char* conditional_move_mnem[] = {
|
137
|
-
/*0*/ "cmovo", "cmovno", "cmovc", "cmovnc",
|
138
|
-
/*4*/ "cmovz", "cmovnz", "cmovna", "cmova",
|
139
|
-
/*8*/ "cmovs", "cmovns", "cmovpe", "cmovpo",
|
140
|
-
/*12*/ "cmovl", "cmovnl", "cmovng", "cmovg"
|
141
|
-
};
|
142
|
-
|
143
|
-
|
144
|
-
enum InstructionType {
|
145
|
-
NO_INSTR,
|
146
|
-
ZERO_OPERANDS_INSTR,
|
147
|
-
TWO_OPERANDS_INSTR,
|
148
|
-
JUMP_CONDITIONAL_SHORT_INSTR,
|
149
|
-
REGISTER_INSTR,
|
150
|
-
MOVE_REG_INSTR,
|
151
|
-
CALL_JUMP_INSTR,
|
152
|
-
SHORT_IMMEDIATE_INSTR
|
153
|
-
};
|
154
|
-
|
155
|
-
|
156
|
-
struct InstructionDesc {
|
157
|
-
const char* mnem;
|
158
|
-
InstructionType type;
|
159
|
-
OperandOrder op_order_;
|
160
|
-
};
|
161
|
-
|
162
|
-
|
163
|
-
class InstructionTable {
|
164
|
-
public:
|
165
|
-
InstructionTable();
|
166
|
-
const InstructionDesc& Get(byte x) const { return instructions_[x]; }
|
167
|
-
|
168
|
-
private:
|
169
|
-
InstructionDesc instructions_[256];
|
170
|
-
void Clear();
|
171
|
-
void Init();
|
172
|
-
void CopyTable(ByteMnemonic bm[], InstructionType type);
|
173
|
-
void SetTableRange(InstructionType type,
|
174
|
-
byte start,
|
175
|
-
byte end,
|
176
|
-
const char* mnem);
|
177
|
-
void AddJumpConditionalShort();
|
178
|
-
};
|
179
|
-
|
180
|
-
|
181
|
-
InstructionTable::InstructionTable() {
|
182
|
-
Clear();
|
183
|
-
Init();
|
184
|
-
}
|
185
|
-
|
186
|
-
|
187
|
-
void InstructionTable::Clear() {
|
188
|
-
for (int i = 0; i < 256; i++) {
|
189
|
-
instructions_[i].mnem = "";
|
190
|
-
instructions_[i].type = NO_INSTR;
|
191
|
-
instructions_[i].op_order_ = UNSET_OP_ORDER;
|
192
|
-
}
|
193
|
-
}
|
194
|
-
|
195
|
-
|
196
|
-
void InstructionTable::Init() {
|
197
|
-
CopyTable(two_operands_instr, TWO_OPERANDS_INSTR);
|
198
|
-
CopyTable(zero_operands_instr, ZERO_OPERANDS_INSTR);
|
199
|
-
CopyTable(call_jump_instr, CALL_JUMP_INSTR);
|
200
|
-
CopyTable(short_immediate_instr, SHORT_IMMEDIATE_INSTR);
|
201
|
-
AddJumpConditionalShort();
|
202
|
-
SetTableRange(REGISTER_INSTR, 0x40, 0x47, "inc");
|
203
|
-
SetTableRange(REGISTER_INSTR, 0x48, 0x4F, "dec");
|
204
|
-
SetTableRange(REGISTER_INSTR, 0x50, 0x57, "push");
|
205
|
-
SetTableRange(REGISTER_INSTR, 0x58, 0x5F, "pop");
|
206
|
-
SetTableRange(REGISTER_INSTR, 0x91, 0x97, "xchg eax,"); // 0x90 is nop.
|
207
|
-
SetTableRange(MOVE_REG_INSTR, 0xB8, 0xBF, "mov");
|
208
|
-
}
|
209
|
-
|
210
|
-
|
211
|
-
void InstructionTable::CopyTable(ByteMnemonic bm[], InstructionType type) {
|
212
|
-
for (int i = 0; bm[i].b >= 0; i++) {
|
213
|
-
InstructionDesc* id = &instructions_[bm[i].b];
|
214
|
-
id->mnem = bm[i].mnem;
|
215
|
-
id->op_order_ = bm[i].op_order_;
|
216
|
-
ASSERT_EQ(NO_INSTR, id->type); // Information not already entered.
|
217
|
-
id->type = type;
|
218
|
-
}
|
219
|
-
}
|
220
|
-
|
221
|
-
|
222
|
-
void InstructionTable::SetTableRange(InstructionType type,
|
223
|
-
byte start,
|
224
|
-
byte end,
|
225
|
-
const char* mnem) {
|
226
|
-
for (byte b = start; b <= end; b++) {
|
227
|
-
InstructionDesc* id = &instructions_[b];
|
228
|
-
ASSERT_EQ(NO_INSTR, id->type); // Information not already entered.
|
229
|
-
id->mnem = mnem;
|
230
|
-
id->type = type;
|
231
|
-
}
|
232
|
-
}
|
233
|
-
|
234
|
-
|
235
|
-
void InstructionTable::AddJumpConditionalShort() {
|
236
|
-
for (byte b = 0x70; b <= 0x7F; b++) {
|
237
|
-
InstructionDesc* id = &instructions_[b];
|
238
|
-
ASSERT_EQ(NO_INSTR, id->type); // Information not already entered.
|
239
|
-
id->mnem = jump_conditional_mnem[b & 0x0F];
|
240
|
-
id->type = JUMP_CONDITIONAL_SHORT_INSTR;
|
241
|
-
}
|
242
|
-
}
|
243
|
-
|
244
|
-
|
245
|
-
static InstructionTable instruction_table;
|
246
|
-
|
247
|
-
|
248
|
-
// The IA32 disassembler implementation.
|
249
|
-
class DisassemblerIA32 {
|
250
|
-
public:
|
251
|
-
DisassemblerIA32(const NameConverter& converter,
|
252
|
-
bool abort_on_unimplemented = true)
|
253
|
-
: converter_(converter),
|
254
|
-
tmp_buffer_pos_(0),
|
255
|
-
abort_on_unimplemented_(abort_on_unimplemented) {
|
256
|
-
tmp_buffer_[0] = '\0';
|
257
|
-
}
|
258
|
-
|
259
|
-
virtual ~DisassemblerIA32() {}
|
260
|
-
|
261
|
-
// Writes one disassembled instruction into 'buffer' (0-terminated).
|
262
|
-
// Returns the length of the disassembled machine instruction in bytes.
|
263
|
-
int InstructionDecode(v8::internal::Vector<char> buffer, byte* instruction);
|
264
|
-
|
265
|
-
private:
|
266
|
-
const NameConverter& converter_;
|
267
|
-
v8::internal::EmbeddedVector<char, 128> tmp_buffer_;
|
268
|
-
unsigned int tmp_buffer_pos_;
|
269
|
-
bool abort_on_unimplemented_;
|
270
|
-
|
271
|
-
|
272
|
-
enum {
|
273
|
-
eax = 0,
|
274
|
-
ecx = 1,
|
275
|
-
edx = 2,
|
276
|
-
ebx = 3,
|
277
|
-
esp = 4,
|
278
|
-
ebp = 5,
|
279
|
-
esi = 6,
|
280
|
-
edi = 7
|
281
|
-
};
|
282
|
-
|
283
|
-
|
284
|
-
enum ShiftOpcodeExtension {
|
285
|
-
kROL = 0,
|
286
|
-
kROR = 1,
|
287
|
-
kRCL = 2,
|
288
|
-
kRCR = 3,
|
289
|
-
kSHL = 4,
|
290
|
-
KSHR = 5,
|
291
|
-
kSAR = 7
|
292
|
-
};
|
293
|
-
|
294
|
-
|
295
|
-
const char* NameOfCPURegister(int reg) const {
|
296
|
-
return converter_.NameOfCPURegister(reg);
|
297
|
-
}
|
298
|
-
|
299
|
-
|
300
|
-
const char* NameOfByteCPURegister(int reg) const {
|
301
|
-
return converter_.NameOfByteCPURegister(reg);
|
302
|
-
}
|
303
|
-
|
304
|
-
|
305
|
-
const char* NameOfXMMRegister(int reg) const {
|
306
|
-
return converter_.NameOfXMMRegister(reg);
|
307
|
-
}
|
308
|
-
|
309
|
-
|
310
|
-
const char* NameOfAddress(byte* addr) const {
|
311
|
-
return converter_.NameOfAddress(addr);
|
312
|
-
}
|
313
|
-
|
314
|
-
|
315
|
-
// Disassembler helper functions.
|
316
|
-
static void get_modrm(byte data, int* mod, int* regop, int* rm) {
|
317
|
-
*mod = (data >> 6) & 3;
|
318
|
-
*regop = (data & 0x38) >> 3;
|
319
|
-
*rm = data & 7;
|
320
|
-
}
|
321
|
-
|
322
|
-
|
323
|
-
static void get_sib(byte data, int* scale, int* index, int* base) {
|
324
|
-
*scale = (data >> 6) & 3;
|
325
|
-
*index = (data >> 3) & 7;
|
326
|
-
*base = data & 7;
|
327
|
-
}
|
328
|
-
|
329
|
-
typedef const char* (DisassemblerIA32::*RegisterNameMapping)(int reg) const;
|
330
|
-
|
331
|
-
int PrintRightOperandHelper(byte* modrmp, RegisterNameMapping register_name);
|
332
|
-
int PrintRightOperand(byte* modrmp);
|
333
|
-
int PrintRightByteOperand(byte* modrmp);
|
334
|
-
int PrintOperands(const char* mnem, OperandOrder op_order, byte* data);
|
335
|
-
int PrintImmediateOp(byte* data);
|
336
|
-
int F7Instruction(byte* data);
|
337
|
-
int D1D3C1Instruction(byte* data);
|
338
|
-
int JumpShort(byte* data);
|
339
|
-
int JumpConditional(byte* data, const char* comment);
|
340
|
-
int JumpConditionalShort(byte* data, const char* comment);
|
341
|
-
int SetCC(byte* data);
|
342
|
-
int CMov(byte* data);
|
343
|
-
int FPUInstruction(byte* data);
|
344
|
-
int MemoryFPUInstruction(int escape_opcode, int regop, byte* modrm_start);
|
345
|
-
int RegisterFPUInstruction(int escape_opcode, byte modrm_byte);
|
346
|
-
void AppendToBuffer(const char* format, ...);
|
347
|
-
|
348
|
-
|
349
|
-
void UnimplementedInstruction() {
|
350
|
-
if (abort_on_unimplemented_) {
|
351
|
-
UNIMPLEMENTED();
|
352
|
-
} else {
|
353
|
-
AppendToBuffer("'Unimplemented Instruction'");
|
354
|
-
}
|
355
|
-
}
|
356
|
-
};
|
357
|
-
|
358
|
-
|
359
|
-
void DisassemblerIA32::AppendToBuffer(const char* format, ...) {
|
360
|
-
v8::internal::Vector<char> buf = tmp_buffer_ + tmp_buffer_pos_;
|
361
|
-
va_list args;
|
362
|
-
va_start(args, format);
|
363
|
-
int result = v8::internal::OS::VSNPrintF(buf, format, args);
|
364
|
-
va_end(args);
|
365
|
-
tmp_buffer_pos_ += result;
|
366
|
-
}
|
367
|
-
|
368
|
-
int DisassemblerIA32::PrintRightOperandHelper(
|
369
|
-
byte* modrmp,
|
370
|
-
RegisterNameMapping register_name) {
|
371
|
-
int mod, regop, rm;
|
372
|
-
get_modrm(*modrmp, &mod, ®op, &rm);
|
373
|
-
switch (mod) {
|
374
|
-
case 0:
|
375
|
-
if (rm == ebp) {
|
376
|
-
int32_t disp = *reinterpret_cast<int32_t*>(modrmp+1);
|
377
|
-
AppendToBuffer("[0x%x]", disp);
|
378
|
-
return 5;
|
379
|
-
} else if (rm == esp) {
|
380
|
-
byte sib = *(modrmp + 1);
|
381
|
-
int scale, index, base;
|
382
|
-
get_sib(sib, &scale, &index, &base);
|
383
|
-
if (index == esp && base == esp && scale == 0 /*times_1*/) {
|
384
|
-
AppendToBuffer("[%s]", (this->*register_name)(rm));
|
385
|
-
return 2;
|
386
|
-
} else if (base == ebp) {
|
387
|
-
int32_t disp = *reinterpret_cast<int32_t*>(modrmp + 2);
|
388
|
-
AppendToBuffer("[%s*%d+0x%x]",
|
389
|
-
(this->*register_name)(index),
|
390
|
-
1 << scale,
|
391
|
-
disp);
|
392
|
-
return 6;
|
393
|
-
} else if (index != esp && base != ebp) {
|
394
|
-
// [base+index*scale]
|
395
|
-
AppendToBuffer("[%s+%s*%d]",
|
396
|
-
(this->*register_name)(base),
|
397
|
-
(this->*register_name)(index),
|
398
|
-
1 << scale);
|
399
|
-
return 2;
|
400
|
-
} else {
|
401
|
-
UnimplementedInstruction();
|
402
|
-
return 1;
|
403
|
-
}
|
404
|
-
} else {
|
405
|
-
AppendToBuffer("[%s]", (this->*register_name)(rm));
|
406
|
-
return 1;
|
407
|
-
}
|
408
|
-
break;
|
409
|
-
case 1: // fall through
|
410
|
-
case 2:
|
411
|
-
if (rm == esp) {
|
412
|
-
byte sib = *(modrmp + 1);
|
413
|
-
int scale, index, base;
|
414
|
-
get_sib(sib, &scale, &index, &base);
|
415
|
-
int disp =
|
416
|
-
mod == 2 ? *reinterpret_cast<int32_t*>(modrmp + 2) : *(modrmp + 2);
|
417
|
-
if (index == base && index == rm /*esp*/ && scale == 0 /*times_1*/) {
|
418
|
-
AppendToBuffer("[%s+0x%x]", (this->*register_name)(rm), disp);
|
419
|
-
} else {
|
420
|
-
AppendToBuffer("[%s+%s*%d+0x%x]",
|
421
|
-
(this->*register_name)(base),
|
422
|
-
(this->*register_name)(index),
|
423
|
-
1 << scale,
|
424
|
-
disp);
|
425
|
-
}
|
426
|
-
return mod == 2 ? 6 : 3;
|
427
|
-
} else {
|
428
|
-
// No sib.
|
429
|
-
int disp =
|
430
|
-
mod == 2 ? *reinterpret_cast<int32_t*>(modrmp + 1) : *(modrmp + 1);
|
431
|
-
AppendToBuffer("[%s+0x%x]", (this->*register_name)(rm), disp);
|
432
|
-
return mod == 2 ? 5 : 2;
|
433
|
-
}
|
434
|
-
break;
|
435
|
-
case 3:
|
436
|
-
AppendToBuffer("%s", (this->*register_name)(rm));
|
437
|
-
return 1;
|
438
|
-
default:
|
439
|
-
UnimplementedInstruction();
|
440
|
-
return 1;
|
441
|
-
}
|
442
|
-
UNREACHABLE();
|
443
|
-
}
|
444
|
-
|
445
|
-
|
446
|
-
int DisassemblerIA32::PrintRightOperand(byte* modrmp) {
|
447
|
-
return PrintRightOperandHelper(modrmp, &DisassemblerIA32::NameOfCPURegister);
|
448
|
-
}
|
449
|
-
|
450
|
-
|
451
|
-
int DisassemblerIA32::PrintRightByteOperand(byte* modrmp) {
|
452
|
-
return PrintRightOperandHelper(modrmp,
|
453
|
-
&DisassemblerIA32::NameOfByteCPURegister);
|
454
|
-
}
|
455
|
-
|
456
|
-
|
457
|
-
// Returns number of bytes used including the current *data.
|
458
|
-
// Writes instruction's mnemonic, left and right operands to 'tmp_buffer_'.
|
459
|
-
int DisassemblerIA32::PrintOperands(const char* mnem,
|
460
|
-
OperandOrder op_order,
|
461
|
-
byte* data) {
|
462
|
-
byte modrm = *data;
|
463
|
-
int mod, regop, rm;
|
464
|
-
get_modrm(modrm, &mod, ®op, &rm);
|
465
|
-
int advance = 0;
|
466
|
-
switch (op_order) {
|
467
|
-
case REG_OPER_OP_ORDER: {
|
468
|
-
AppendToBuffer("%s %s,", mnem, NameOfCPURegister(regop));
|
469
|
-
advance = PrintRightOperand(data);
|
470
|
-
break;
|
471
|
-
}
|
472
|
-
case OPER_REG_OP_ORDER: {
|
473
|
-
AppendToBuffer("%s ", mnem);
|
474
|
-
advance = PrintRightOperand(data);
|
475
|
-
AppendToBuffer(",%s", NameOfCPURegister(regop));
|
476
|
-
break;
|
477
|
-
}
|
478
|
-
default:
|
479
|
-
UNREACHABLE();
|
480
|
-
break;
|
481
|
-
}
|
482
|
-
return advance;
|
483
|
-
}
|
484
|
-
|
485
|
-
|
486
|
-
// Returns number of bytes used by machine instruction, including *data byte.
|
487
|
-
// Writes immediate instructions to 'tmp_buffer_'.
|
488
|
-
int DisassemblerIA32::PrintImmediateOp(byte* data) {
|
489
|
-
bool sign_extension_bit = (*data & 0x02) != 0;
|
490
|
-
byte modrm = *(data+1);
|
491
|
-
int mod, regop, rm;
|
492
|
-
get_modrm(modrm, &mod, ®op, &rm);
|
493
|
-
const char* mnem = "Imm???";
|
494
|
-
switch (regop) {
|
495
|
-
case 0: mnem = "add"; break;
|
496
|
-
case 1: mnem = "or"; break;
|
497
|
-
case 2: mnem = "adc"; break;
|
498
|
-
case 4: mnem = "and"; break;
|
499
|
-
case 5: mnem = "sub"; break;
|
500
|
-
case 6: mnem = "xor"; break;
|
501
|
-
case 7: mnem = "cmp"; break;
|
502
|
-
default: UnimplementedInstruction();
|
503
|
-
}
|
504
|
-
AppendToBuffer("%s ", mnem);
|
505
|
-
int count = PrintRightOperand(data+1);
|
506
|
-
if (sign_extension_bit) {
|
507
|
-
AppendToBuffer(",0x%x", *(data + 1 + count));
|
508
|
-
return 1 + count + 1 /*int8*/;
|
509
|
-
} else {
|
510
|
-
AppendToBuffer(",0x%x", *reinterpret_cast<int32_t*>(data + 1 + count));
|
511
|
-
return 1 + count + 4 /*int32_t*/;
|
512
|
-
}
|
513
|
-
}
|
514
|
-
|
515
|
-
|
516
|
-
// Returns number of bytes used, including *data.
|
517
|
-
int DisassemblerIA32::F7Instruction(byte* data) {
|
518
|
-
ASSERT_EQ(0xF7, *data);
|
519
|
-
byte modrm = *(data+1);
|
520
|
-
int mod, regop, rm;
|
521
|
-
get_modrm(modrm, &mod, ®op, &rm);
|
522
|
-
if (mod == 3 && regop != 0) {
|
523
|
-
const char* mnem = NULL;
|
524
|
-
switch (regop) {
|
525
|
-
case 2: mnem = "not"; break;
|
526
|
-
case 3: mnem = "neg"; break;
|
527
|
-
case 4: mnem = "mul"; break;
|
528
|
-
case 7: mnem = "idiv"; break;
|
529
|
-
default: UnimplementedInstruction();
|
530
|
-
}
|
531
|
-
AppendToBuffer("%s %s", mnem, NameOfCPURegister(rm));
|
532
|
-
return 2;
|
533
|
-
} else if (mod == 3 && regop == eax) {
|
534
|
-
int32_t imm = *reinterpret_cast<int32_t*>(data+2);
|
535
|
-
AppendToBuffer("test %s,0x%x", NameOfCPURegister(rm), imm);
|
536
|
-
return 6;
|
537
|
-
} else if (regop == eax) {
|
538
|
-
AppendToBuffer("test ");
|
539
|
-
int count = PrintRightOperand(data+1);
|
540
|
-
int32_t imm = *reinterpret_cast<int32_t*>(data+1+count);
|
541
|
-
AppendToBuffer(",0x%x", imm);
|
542
|
-
return 1+count+4 /*int32_t*/;
|
543
|
-
} else {
|
544
|
-
UnimplementedInstruction();
|
545
|
-
return 2;
|
546
|
-
}
|
547
|
-
}
|
548
|
-
|
549
|
-
int DisassemblerIA32::D1D3C1Instruction(byte* data) {
|
550
|
-
byte op = *data;
|
551
|
-
ASSERT(op == 0xD1 || op == 0xD3 || op == 0xC1);
|
552
|
-
byte modrm = *(data+1);
|
553
|
-
int mod, regop, rm;
|
554
|
-
get_modrm(modrm, &mod, ®op, &rm);
|
555
|
-
int imm8 = -1;
|
556
|
-
int num_bytes = 2;
|
557
|
-
if (mod == 3) {
|
558
|
-
const char* mnem = NULL;
|
559
|
-
switch (regop) {
|
560
|
-
case kROL: mnem = "rol"; break;
|
561
|
-
case kROR: mnem = "ror"; break;
|
562
|
-
case kRCL: mnem = "rcl"; break;
|
563
|
-
case kSHL: mnem = "shl"; break;
|
564
|
-
case KSHR: mnem = "shr"; break;
|
565
|
-
case kSAR: mnem = "sar"; break;
|
566
|
-
default: UnimplementedInstruction();
|
567
|
-
}
|
568
|
-
if (op == 0xD1) {
|
569
|
-
imm8 = 1;
|
570
|
-
} else if (op == 0xC1) {
|
571
|
-
imm8 = *(data+2);
|
572
|
-
num_bytes = 3;
|
573
|
-
} else if (op == 0xD3) {
|
574
|
-
// Shift/rotate by cl.
|
575
|
-
}
|
576
|
-
ASSERT_NE(NULL, mnem);
|
577
|
-
AppendToBuffer("%s %s,", mnem, NameOfCPURegister(rm));
|
578
|
-
if (imm8 > 0) {
|
579
|
-
AppendToBuffer("%d", imm8);
|
580
|
-
} else {
|
581
|
-
AppendToBuffer("cl");
|
582
|
-
}
|
583
|
-
} else {
|
584
|
-
UnimplementedInstruction();
|
585
|
-
}
|
586
|
-
return num_bytes;
|
587
|
-
}
|
588
|
-
|
589
|
-
|
590
|
-
// Returns number of bytes used, including *data.
|
591
|
-
int DisassemblerIA32::JumpShort(byte* data) {
|
592
|
-
ASSERT_EQ(0xEB, *data);
|
593
|
-
byte b = *(data+1);
|
594
|
-
byte* dest = data + static_cast<int8_t>(b) + 2;
|
595
|
-
AppendToBuffer("jmp %s", NameOfAddress(dest));
|
596
|
-
return 2;
|
597
|
-
}
|
598
|
-
|
599
|
-
|
600
|
-
// Returns number of bytes used, including *data.
|
601
|
-
int DisassemblerIA32::JumpConditional(byte* data, const char* comment) {
|
602
|
-
ASSERT_EQ(0x0F, *data);
|
603
|
-
byte cond = *(data+1) & 0x0F;
|
604
|
-
byte* dest = data + *reinterpret_cast<int32_t*>(data+2) + 6;
|
605
|
-
const char* mnem = jump_conditional_mnem[cond];
|
606
|
-
AppendToBuffer("%s %s", mnem, NameOfAddress(dest));
|
607
|
-
if (comment != NULL) {
|
608
|
-
AppendToBuffer(", %s", comment);
|
609
|
-
}
|
610
|
-
return 6; // includes 0x0F
|
611
|
-
}
|
612
|
-
|
613
|
-
|
614
|
-
// Returns number of bytes used, including *data.
|
615
|
-
int DisassemblerIA32::JumpConditionalShort(byte* data, const char* comment) {
|
616
|
-
byte cond = *data & 0x0F;
|
617
|
-
byte b = *(data+1);
|
618
|
-
byte* dest = data + static_cast<int8_t>(b) + 2;
|
619
|
-
const char* mnem = jump_conditional_mnem[cond];
|
620
|
-
AppendToBuffer("%s %s", mnem, NameOfAddress(dest));
|
621
|
-
if (comment != NULL) {
|
622
|
-
AppendToBuffer(", %s", comment);
|
623
|
-
}
|
624
|
-
return 2;
|
625
|
-
}
|
626
|
-
|
627
|
-
|
628
|
-
// Returns number of bytes used, including *data.
|
629
|
-
int DisassemblerIA32::SetCC(byte* data) {
|
630
|
-
ASSERT_EQ(0x0F, *data);
|
631
|
-
byte cond = *(data+1) & 0x0F;
|
632
|
-
const char* mnem = set_conditional_mnem[cond];
|
633
|
-
AppendToBuffer("%s ", mnem);
|
634
|
-
PrintRightByteOperand(data+2);
|
635
|
-
return 3; // Includes 0x0F.
|
636
|
-
}
|
637
|
-
|
638
|
-
|
639
|
-
// Returns number of bytes used, including *data.
|
640
|
-
int DisassemblerIA32::CMov(byte* data) {
|
641
|
-
ASSERT_EQ(0x0F, *data);
|
642
|
-
byte cond = *(data + 1) & 0x0F;
|
643
|
-
const char* mnem = conditional_move_mnem[cond];
|
644
|
-
int op_size = PrintOperands(mnem, REG_OPER_OP_ORDER, data + 2);
|
645
|
-
return 2 + op_size; // includes 0x0F
|
646
|
-
}
|
647
|
-
|
648
|
-
|
649
|
-
// Returns number of bytes used, including *data.
|
650
|
-
int DisassemblerIA32::FPUInstruction(byte* data) {
|
651
|
-
byte escape_opcode = *data;
|
652
|
-
ASSERT_EQ(0xD8, escape_opcode & 0xF8);
|
653
|
-
byte modrm_byte = *(data+1);
|
654
|
-
|
655
|
-
if (modrm_byte >= 0xC0) {
|
656
|
-
return RegisterFPUInstruction(escape_opcode, modrm_byte);
|
657
|
-
} else {
|
658
|
-
return MemoryFPUInstruction(escape_opcode, modrm_byte, data+1);
|
659
|
-
}
|
660
|
-
}
|
661
|
-
|
662
|
-
int DisassemblerIA32::MemoryFPUInstruction(int escape_opcode,
|
663
|
-
int modrm_byte,
|
664
|
-
byte* modrm_start) {
|
665
|
-
const char* mnem = "?";
|
666
|
-
int regop = (modrm_byte >> 3) & 0x7; // reg/op field of modrm byte.
|
667
|
-
switch (escape_opcode) {
|
668
|
-
case 0xD9: switch (regop) {
|
669
|
-
case 0: mnem = "fld_s"; break;
|
670
|
-
case 3: mnem = "fstp_s"; break;
|
671
|
-
case 7: mnem = "fstcw"; break;
|
672
|
-
default: UnimplementedInstruction();
|
673
|
-
}
|
674
|
-
break;
|
675
|
-
|
676
|
-
case 0xDB: switch (regop) {
|
677
|
-
case 0: mnem = "fild_s"; break;
|
678
|
-
case 1: mnem = "fisttp_s"; break;
|
679
|
-
case 2: mnem = "fist_s"; break;
|
680
|
-
case 3: mnem = "fistp_s"; break;
|
681
|
-
default: UnimplementedInstruction();
|
682
|
-
}
|
683
|
-
break;
|
684
|
-
|
685
|
-
case 0xDD: switch (regop) {
|
686
|
-
case 0: mnem = "fld_d"; break;
|
687
|
-
case 2: mnem = "fstp"; break;
|
688
|
-
case 3: mnem = "fstp_d"; break;
|
689
|
-
default: UnimplementedInstruction();
|
690
|
-
}
|
691
|
-
break;
|
692
|
-
|
693
|
-
case 0xDF: switch (regop) {
|
694
|
-
case 5: mnem = "fild_d"; break;
|
695
|
-
case 7: mnem = "fistp_d"; break;
|
696
|
-
default: UnimplementedInstruction();
|
697
|
-
}
|
698
|
-
break;
|
699
|
-
|
700
|
-
default: UnimplementedInstruction();
|
701
|
-
}
|
702
|
-
AppendToBuffer("%s ", mnem);
|
703
|
-
int count = PrintRightOperand(modrm_start);
|
704
|
-
return count + 1;
|
705
|
-
}
|
706
|
-
|
707
|
-
int DisassemblerIA32::RegisterFPUInstruction(int escape_opcode,
|
708
|
-
byte modrm_byte) {
|
709
|
-
bool has_register = false; // Is the FPU register encoded in modrm_byte?
|
710
|
-
const char* mnem = "?";
|
711
|
-
|
712
|
-
switch (escape_opcode) {
|
713
|
-
case 0xD8:
|
714
|
-
UnimplementedInstruction();
|
715
|
-
break;
|
716
|
-
|
717
|
-
case 0xD9:
|
718
|
-
switch (modrm_byte & 0xF8) {
|
719
|
-
case 0xC8:
|
720
|
-
mnem = "fxch";
|
721
|
-
has_register = true;
|
722
|
-
break;
|
723
|
-
default:
|
724
|
-
switch (modrm_byte) {
|
725
|
-
case 0xE0: mnem = "fchs"; break;
|
726
|
-
case 0xE1: mnem = "fabs"; break;
|
727
|
-
case 0xE4: mnem = "ftst"; break;
|
728
|
-
case 0xE8: mnem = "fld1"; break;
|
729
|
-
case 0xEB: mnem = "fldpi"; break;
|
730
|
-
case 0xEE: mnem = "fldz"; break;
|
731
|
-
case 0xF5: mnem = "fprem1"; break;
|
732
|
-
case 0xF7: mnem = "fincstp"; break;
|
733
|
-
case 0xF8: mnem = "fprem"; break;
|
734
|
-
case 0xFE: mnem = "fsin"; break;
|
735
|
-
case 0xFF: mnem = "fcos"; break;
|
736
|
-
default: UnimplementedInstruction();
|
737
|
-
}
|
738
|
-
}
|
739
|
-
break;
|
740
|
-
|
741
|
-
case 0xDA:
|
742
|
-
if (modrm_byte == 0xE9) {
|
743
|
-
mnem = "fucompp";
|
744
|
-
} else {
|
745
|
-
UnimplementedInstruction();
|
746
|
-
}
|
747
|
-
break;
|
748
|
-
|
749
|
-
case 0xDB:
|
750
|
-
if ((modrm_byte & 0xF8) == 0xE8) {
|
751
|
-
mnem = "fucomi";
|
752
|
-
has_register = true;
|
753
|
-
} else if (modrm_byte == 0xE2) {
|
754
|
-
mnem = "fclex";
|
755
|
-
} else {
|
756
|
-
UnimplementedInstruction();
|
757
|
-
}
|
758
|
-
break;
|
759
|
-
|
760
|
-
case 0xDC:
|
761
|
-
has_register = true;
|
762
|
-
switch (modrm_byte & 0xF8) {
|
763
|
-
case 0xC0: mnem = "fadd"; break;
|
764
|
-
case 0xE8: mnem = "fsub"; break;
|
765
|
-
case 0xC8: mnem = "fmul"; break;
|
766
|
-
case 0xF8: mnem = "fdiv"; break;
|
767
|
-
default: UnimplementedInstruction();
|
768
|
-
}
|
769
|
-
break;
|
770
|
-
|
771
|
-
case 0xDD:
|
772
|
-
has_register = true;
|
773
|
-
switch (modrm_byte & 0xF8) {
|
774
|
-
case 0xC0: mnem = "ffree"; break;
|
775
|
-
case 0xD8: mnem = "fstp"; break;
|
776
|
-
default: UnimplementedInstruction();
|
777
|
-
}
|
778
|
-
break;
|
779
|
-
|
780
|
-
case 0xDE:
|
781
|
-
if (modrm_byte == 0xD9) {
|
782
|
-
mnem = "fcompp";
|
783
|
-
} else {
|
784
|
-
has_register = true;
|
785
|
-
switch (modrm_byte & 0xF8) {
|
786
|
-
case 0xC0: mnem = "faddp"; break;
|
787
|
-
case 0xE8: mnem = "fsubp"; break;
|
788
|
-
case 0xC8: mnem = "fmulp"; break;
|
789
|
-
case 0xF8: mnem = "fdivp"; break;
|
790
|
-
default: UnimplementedInstruction();
|
791
|
-
}
|
792
|
-
}
|
793
|
-
break;
|
794
|
-
|
795
|
-
case 0xDF:
|
796
|
-
if (modrm_byte == 0xE0) {
|
797
|
-
mnem = "fnstsw_ax";
|
798
|
-
} else if ((modrm_byte & 0xF8) == 0xE8) {
|
799
|
-
mnem = "fucomip";
|
800
|
-
has_register = true;
|
801
|
-
}
|
802
|
-
break;
|
803
|
-
|
804
|
-
default: UnimplementedInstruction();
|
805
|
-
}
|
806
|
-
|
807
|
-
if (has_register) {
|
808
|
-
AppendToBuffer("%s st%d", mnem, modrm_byte & 0x7);
|
809
|
-
} else {
|
810
|
-
AppendToBuffer("%s", mnem);
|
811
|
-
}
|
812
|
-
return 2;
|
813
|
-
}
|
814
|
-
|
815
|
-
|
816
|
-
// Mnemonics for instructions 0xF0 byte.
|
817
|
-
// Returns NULL if the instruction is not handled here.
|
818
|
-
static const char* F0Mnem(byte f0byte) {
|
819
|
-
switch (f0byte) {
|
820
|
-
case 0x18: return "prefetch";
|
821
|
-
case 0xA2: return "cpuid";
|
822
|
-
case 0x31: return "rdtsc";
|
823
|
-
case 0xBE: return "movsx_b";
|
824
|
-
case 0xBF: return "movsx_w";
|
825
|
-
case 0xB6: return "movzx_b";
|
826
|
-
case 0xB7: return "movzx_w";
|
827
|
-
case 0xAF: return "imul";
|
828
|
-
case 0xA5: return "shld";
|
829
|
-
case 0xAD: return "shrd";
|
830
|
-
case 0xAB: return "bts";
|
831
|
-
default: return NULL;
|
832
|
-
}
|
833
|
-
}
|
834
|
-
|
835
|
-
|
836
|
-
// Disassembled instruction '*instr' and writes it into 'out_buffer'.
|
837
|
-
int DisassemblerIA32::InstructionDecode(v8::internal::Vector<char> out_buffer,
|
838
|
-
byte* instr) {
|
839
|
-
tmp_buffer_pos_ = 0; // starting to write as position 0
|
840
|
-
byte* data = instr;
|
841
|
-
// Check for hints.
|
842
|
-
const char* branch_hint = NULL;
|
843
|
-
// We use these two prefixes only with branch prediction
|
844
|
-
if (*data == 0x3E /*ds*/) {
|
845
|
-
branch_hint = "predicted taken";
|
846
|
-
data++;
|
847
|
-
} else if (*data == 0x2E /*cs*/) {
|
848
|
-
branch_hint = "predicted not taken";
|
849
|
-
data++;
|
850
|
-
}
|
851
|
-
bool processed = true; // Will be set to false if the current instruction
|
852
|
-
// is not in 'instructions' table.
|
853
|
-
const InstructionDesc& idesc = instruction_table.Get(*data);
|
854
|
-
switch (idesc.type) {
|
855
|
-
case ZERO_OPERANDS_INSTR:
|
856
|
-
AppendToBuffer(idesc.mnem);
|
857
|
-
data++;
|
858
|
-
break;
|
859
|
-
|
860
|
-
case TWO_OPERANDS_INSTR:
|
861
|
-
data++;
|
862
|
-
data += PrintOperands(idesc.mnem, idesc.op_order_, data);
|
863
|
-
break;
|
864
|
-
|
865
|
-
case JUMP_CONDITIONAL_SHORT_INSTR:
|
866
|
-
data += JumpConditionalShort(data, branch_hint);
|
867
|
-
break;
|
868
|
-
|
869
|
-
case REGISTER_INSTR:
|
870
|
-
AppendToBuffer("%s %s", idesc.mnem, NameOfCPURegister(*data & 0x07));
|
871
|
-
data++;
|
872
|
-
break;
|
873
|
-
|
874
|
-
case MOVE_REG_INSTR: {
|
875
|
-
byte* addr = reinterpret_cast<byte*>(*reinterpret_cast<int32_t*>(data+1));
|
876
|
-
AppendToBuffer("mov %s,%s",
|
877
|
-
NameOfCPURegister(*data & 0x07),
|
878
|
-
NameOfAddress(addr));
|
879
|
-
data += 5;
|
880
|
-
break;
|
881
|
-
}
|
882
|
-
|
883
|
-
case CALL_JUMP_INSTR: {
|
884
|
-
byte* addr = data + *reinterpret_cast<int32_t*>(data+1) + 5;
|
885
|
-
AppendToBuffer("%s %s", idesc.mnem, NameOfAddress(addr));
|
886
|
-
data += 5;
|
887
|
-
break;
|
888
|
-
}
|
889
|
-
|
890
|
-
case SHORT_IMMEDIATE_INSTR: {
|
891
|
-
byte* addr = reinterpret_cast<byte*>(*reinterpret_cast<int32_t*>(data+1));
|
892
|
-
AppendToBuffer("%s eax, %s", idesc.mnem, NameOfAddress(addr));
|
893
|
-
data += 5;
|
894
|
-
break;
|
895
|
-
}
|
896
|
-
|
897
|
-
case NO_INSTR:
|
898
|
-
processed = false;
|
899
|
-
break;
|
900
|
-
|
901
|
-
default:
|
902
|
-
UNIMPLEMENTED(); // This type is not implemented.
|
903
|
-
}
|
904
|
-
//----------------------------
|
905
|
-
if (!processed) {
|
906
|
-
switch (*data) {
|
907
|
-
case 0xC2:
|
908
|
-
AppendToBuffer("ret 0x%x", *reinterpret_cast<uint16_t*>(data+1));
|
909
|
-
data += 3;
|
910
|
-
break;
|
911
|
-
|
912
|
-
case 0x69: // fall through
|
913
|
-
case 0x6B:
|
914
|
-
{ int mod, regop, rm;
|
915
|
-
get_modrm(*(data+1), &mod, ®op, &rm);
|
916
|
-
int32_t imm =
|
917
|
-
*data == 0x6B ? *(data+2) : *reinterpret_cast<int32_t*>(data+2);
|
918
|
-
AppendToBuffer("imul %s,%s,0x%x",
|
919
|
-
NameOfCPURegister(regop),
|
920
|
-
NameOfCPURegister(rm),
|
921
|
-
imm);
|
922
|
-
data += 2 + (*data == 0x6B ? 1 : 4);
|
923
|
-
}
|
924
|
-
break;
|
925
|
-
|
926
|
-
case 0xF6:
|
927
|
-
{ data++;
|
928
|
-
int mod, regop, rm;
|
929
|
-
get_modrm(*data, &mod, ®op, &rm);
|
930
|
-
if (regop == eax) {
|
931
|
-
AppendToBuffer("test_b ");
|
932
|
-
data += PrintRightOperand(data);
|
933
|
-
int32_t imm = *data;
|
934
|
-
AppendToBuffer(",0x%x", imm);
|
935
|
-
data++;
|
936
|
-
} else {
|
937
|
-
UnimplementedInstruction();
|
938
|
-
}
|
939
|
-
}
|
940
|
-
break;
|
941
|
-
|
942
|
-
case 0x81: // fall through
|
943
|
-
case 0x83: // 0x81 with sign extension bit set
|
944
|
-
data += PrintImmediateOp(data);
|
945
|
-
break;
|
946
|
-
|
947
|
-
case 0x0F:
|
948
|
-
{ byte f0byte = *(data+1);
|
949
|
-
const char* f0mnem = F0Mnem(f0byte);
|
950
|
-
if (f0byte == 0x18) {
|
951
|
-
int mod, regop, rm;
|
952
|
-
get_modrm(*data, &mod, ®op, &rm);
|
953
|
-
const char* suffix[] = {"nta", "1", "2", "3"};
|
954
|
-
AppendToBuffer("%s%s ", f0mnem, suffix[regop & 0x03]);
|
955
|
-
data += PrintRightOperand(data);
|
956
|
-
} else if (f0byte == 0xA2 || f0byte == 0x31) {
|
957
|
-
AppendToBuffer("%s", f0mnem);
|
958
|
-
data += 2;
|
959
|
-
} else if ((f0byte & 0xF0) == 0x80) {
|
960
|
-
data += JumpConditional(data, branch_hint);
|
961
|
-
} else if (f0byte == 0xBE || f0byte == 0xBF || f0byte == 0xB6 ||
|
962
|
-
f0byte == 0xB7 || f0byte == 0xAF) {
|
963
|
-
data += 2;
|
964
|
-
data += PrintOperands(f0mnem, REG_OPER_OP_ORDER, data);
|
965
|
-
} else if ((f0byte & 0xF0) == 0x90) {
|
966
|
-
data += SetCC(data);
|
967
|
-
} else if ((f0byte & 0xF0) == 0x40) {
|
968
|
-
data += CMov(data);
|
969
|
-
} else {
|
970
|
-
data += 2;
|
971
|
-
if (f0byte == 0xAB || f0byte == 0xA5 || f0byte == 0xAD) {
|
972
|
-
// shrd, shld, bts
|
973
|
-
AppendToBuffer("%s ", f0mnem);
|
974
|
-
int mod, regop, rm;
|
975
|
-
get_modrm(*data, &mod, ®op, &rm);
|
976
|
-
data += PrintRightOperand(data);
|
977
|
-
if (f0byte == 0xAB) {
|
978
|
-
AppendToBuffer(",%s", NameOfCPURegister(regop));
|
979
|
-
} else {
|
980
|
-
AppendToBuffer(",%s,cl", NameOfCPURegister(regop));
|
981
|
-
}
|
982
|
-
} else {
|
983
|
-
UnimplementedInstruction();
|
984
|
-
}
|
985
|
-
}
|
986
|
-
}
|
987
|
-
break;
|
988
|
-
|
989
|
-
case 0x8F:
|
990
|
-
{ data++;
|
991
|
-
int mod, regop, rm;
|
992
|
-
get_modrm(*data, &mod, ®op, &rm);
|
993
|
-
if (regop == eax) {
|
994
|
-
AppendToBuffer("pop ");
|
995
|
-
data += PrintRightOperand(data);
|
996
|
-
}
|
997
|
-
}
|
998
|
-
break;
|
999
|
-
|
1000
|
-
case 0xFF:
|
1001
|
-
{ data++;
|
1002
|
-
int mod, regop, rm;
|
1003
|
-
get_modrm(*data, &mod, ®op, &rm);
|
1004
|
-
const char* mnem = NULL;
|
1005
|
-
switch (regop) {
|
1006
|
-
case esi: mnem = "push"; break;
|
1007
|
-
case eax: mnem = "inc"; break;
|
1008
|
-
case ecx: mnem = "dec"; break;
|
1009
|
-
case edx: mnem = "call"; break;
|
1010
|
-
case esp: mnem = "jmp"; break;
|
1011
|
-
default: mnem = "???";
|
1012
|
-
}
|
1013
|
-
AppendToBuffer("%s ", mnem);
|
1014
|
-
data += PrintRightOperand(data);
|
1015
|
-
}
|
1016
|
-
break;
|
1017
|
-
|
1018
|
-
case 0xC7: // imm32, fall through
|
1019
|
-
case 0xC6: // imm8
|
1020
|
-
{ bool is_byte = *data == 0xC6;
|
1021
|
-
data++;
|
1022
|
-
AppendToBuffer("%s ", is_byte ? "mov_b" : "mov");
|
1023
|
-
data += PrintRightOperand(data);
|
1024
|
-
int32_t imm = is_byte ? *data : *reinterpret_cast<int32_t*>(data);
|
1025
|
-
AppendToBuffer(",0x%x", imm);
|
1026
|
-
data += is_byte ? 1 : 4;
|
1027
|
-
}
|
1028
|
-
break;
|
1029
|
-
|
1030
|
-
case 0x80:
|
1031
|
-
{ data++;
|
1032
|
-
int mod, regop, rm;
|
1033
|
-
get_modrm(*data, &mod, ®op, &rm);
|
1034
|
-
const char* mnem = NULL;
|
1035
|
-
switch (regop) {
|
1036
|
-
case 5: mnem = "subb"; break;
|
1037
|
-
case 7: mnem = "cmpb"; break;
|
1038
|
-
default: UnimplementedInstruction();
|
1039
|
-
}
|
1040
|
-
AppendToBuffer("%s ", mnem);
|
1041
|
-
data += PrintRightOperand(data);
|
1042
|
-
int32_t imm = *data;
|
1043
|
-
AppendToBuffer(",0x%x", imm);
|
1044
|
-
data++;
|
1045
|
-
}
|
1046
|
-
break;
|
1047
|
-
|
1048
|
-
case 0x88: // 8bit, fall through
|
1049
|
-
case 0x89: // 32bit
|
1050
|
-
{ bool is_byte = *data == 0x88;
|
1051
|
-
int mod, regop, rm;
|
1052
|
-
data++;
|
1053
|
-
get_modrm(*data, &mod, ®op, &rm);
|
1054
|
-
AppendToBuffer("%s ", is_byte ? "mov_b" : "mov");
|
1055
|
-
data += PrintRightOperand(data);
|
1056
|
-
AppendToBuffer(",%s", NameOfCPURegister(regop));
|
1057
|
-
}
|
1058
|
-
break;
|
1059
|
-
|
1060
|
-
case 0x66: // prefix
|
1061
|
-
data++;
|
1062
|
-
if (*data == 0x8B) {
|
1063
|
-
data++;
|
1064
|
-
data += PrintOperands("mov_w", REG_OPER_OP_ORDER, data);
|
1065
|
-
} else if (*data == 0x89) {
|
1066
|
-
data++;
|
1067
|
-
int mod, regop, rm;
|
1068
|
-
get_modrm(*data, &mod, ®op, &rm);
|
1069
|
-
AppendToBuffer("mov_w ");
|
1070
|
-
data += PrintRightOperand(data);
|
1071
|
-
AppendToBuffer(",%s", NameOfCPURegister(regop));
|
1072
|
-
} else if (*data == 0x0F) {
|
1073
|
-
data++;
|
1074
|
-
if (*data == 0x38) {
|
1075
|
-
data++;
|
1076
|
-
if (*data == 0x17) {
|
1077
|
-
data++;
|
1078
|
-
int mod, regop, rm;
|
1079
|
-
get_modrm(*data, &mod, ®op, &rm);
|
1080
|
-
AppendToBuffer("ptest %s,%s",
|
1081
|
-
NameOfXMMRegister(regop),
|
1082
|
-
NameOfXMMRegister(rm));
|
1083
|
-
data++;
|
1084
|
-
} else if (*data == 0x2A) {
|
1085
|
-
// movntdqa
|
1086
|
-
data++;
|
1087
|
-
int mod, regop, rm;
|
1088
|
-
get_modrm(*data, &mod, ®op, &rm);
|
1089
|
-
AppendToBuffer("movntdqa %s,", NameOfXMMRegister(regop));
|
1090
|
-
data += PrintRightOperand(data);
|
1091
|
-
} else {
|
1092
|
-
UnimplementedInstruction();
|
1093
|
-
}
|
1094
|
-
} else if (*data == 0x2E || *data == 0x2F) {
|
1095
|
-
const char* mnem = (*data == 0x2E) ? "ucomisd" : "comisd";
|
1096
|
-
data++;
|
1097
|
-
int mod, regop, rm;
|
1098
|
-
get_modrm(*data, &mod, ®op, &rm);
|
1099
|
-
if (mod == 0x3) {
|
1100
|
-
AppendToBuffer("%s %s,%s", mnem,
|
1101
|
-
NameOfXMMRegister(regop),
|
1102
|
-
NameOfXMMRegister(rm));
|
1103
|
-
data++;
|
1104
|
-
} else {
|
1105
|
-
AppendToBuffer("%s %s,", mnem, NameOfXMMRegister(regop));
|
1106
|
-
data += PrintRightOperand(data);
|
1107
|
-
}
|
1108
|
-
} else if (*data == 0x50) {
|
1109
|
-
data++;
|
1110
|
-
int mod, regop, rm;
|
1111
|
-
get_modrm(*data, &mod, ®op, &rm);
|
1112
|
-
AppendToBuffer("movmskpd %s,%s",
|
1113
|
-
NameOfCPURegister(regop),
|
1114
|
-
NameOfXMMRegister(rm));
|
1115
|
-
data++;
|
1116
|
-
} else if (*data == 0x57) {
|
1117
|
-
data++;
|
1118
|
-
int mod, regop, rm;
|
1119
|
-
get_modrm(*data, &mod, ®op, &rm);
|
1120
|
-
AppendToBuffer("xorpd %s,%s",
|
1121
|
-
NameOfXMMRegister(regop),
|
1122
|
-
NameOfXMMRegister(rm));
|
1123
|
-
data++;
|
1124
|
-
} else if (*data == 0x6E) {
|
1125
|
-
data++;
|
1126
|
-
int mod, regop, rm;
|
1127
|
-
get_modrm(*data, &mod, ®op, &rm);
|
1128
|
-
AppendToBuffer("movd %s,", NameOfXMMRegister(regop));
|
1129
|
-
data += PrintRightOperand(data);
|
1130
|
-
} else if (*data == 0x6F) {
|
1131
|
-
data++;
|
1132
|
-
int mod, regop, rm;
|
1133
|
-
get_modrm(*data, &mod, ®op, &rm);
|
1134
|
-
AppendToBuffer("movdqa %s,", NameOfXMMRegister(regop));
|
1135
|
-
data += PrintRightOperand(data);
|
1136
|
-
} else if (*data == 0x7F) {
|
1137
|
-
AppendToBuffer("movdqa ");
|
1138
|
-
data++;
|
1139
|
-
int mod, regop, rm;
|
1140
|
-
get_modrm(*data, &mod, ®op, &rm);
|
1141
|
-
data += PrintRightOperand(data);
|
1142
|
-
AppendToBuffer(",%s", NameOfXMMRegister(regop));
|
1143
|
-
} else if (*data == 0xE7) {
|
1144
|
-
AppendToBuffer("movntdq ");
|
1145
|
-
data++;
|
1146
|
-
int mod, regop, rm;
|
1147
|
-
get_modrm(*data, &mod, ®op, &rm);
|
1148
|
-
data += PrintRightOperand(data);
|
1149
|
-
AppendToBuffer(",%s", NameOfXMMRegister(regop));
|
1150
|
-
} else if (*data == 0xEF) {
|
1151
|
-
data++;
|
1152
|
-
int mod, regop, rm;
|
1153
|
-
get_modrm(*data, &mod, ®op, &rm);
|
1154
|
-
AppendToBuffer("pxor %s,%s",
|
1155
|
-
NameOfXMMRegister(regop),
|
1156
|
-
NameOfXMMRegister(rm));
|
1157
|
-
data++;
|
1158
|
-
} else {
|
1159
|
-
UnimplementedInstruction();
|
1160
|
-
}
|
1161
|
-
} else {
|
1162
|
-
UnimplementedInstruction();
|
1163
|
-
}
|
1164
|
-
break;
|
1165
|
-
|
1166
|
-
case 0xFE:
|
1167
|
-
{ data++;
|
1168
|
-
int mod, regop, rm;
|
1169
|
-
get_modrm(*data, &mod, ®op, &rm);
|
1170
|
-
if (mod == 3 && regop == ecx) {
|
1171
|
-
AppendToBuffer("dec_b %s", NameOfCPURegister(rm));
|
1172
|
-
} else {
|
1173
|
-
UnimplementedInstruction();
|
1174
|
-
}
|
1175
|
-
data++;
|
1176
|
-
}
|
1177
|
-
break;
|
1178
|
-
|
1179
|
-
case 0x68:
|
1180
|
-
AppendToBuffer("push 0x%x", *reinterpret_cast<int32_t*>(data+1));
|
1181
|
-
data += 5;
|
1182
|
-
break;
|
1183
|
-
|
1184
|
-
case 0x6A:
|
1185
|
-
AppendToBuffer("push 0x%x", *reinterpret_cast<int8_t*>(data + 1));
|
1186
|
-
data += 2;
|
1187
|
-
break;
|
1188
|
-
|
1189
|
-
case 0xA8:
|
1190
|
-
AppendToBuffer("test al,0x%x", *reinterpret_cast<uint8_t*>(data+1));
|
1191
|
-
data += 2;
|
1192
|
-
break;
|
1193
|
-
|
1194
|
-
case 0x2C:
|
1195
|
-
AppendToBuffer("subb eax,0x%x", *reinterpret_cast<uint8_t*>(data+1));
|
1196
|
-
data += 2;
|
1197
|
-
break;
|
1198
|
-
|
1199
|
-
case 0xA9:
|
1200
|
-
AppendToBuffer("test eax,0x%x", *reinterpret_cast<int32_t*>(data+1));
|
1201
|
-
data += 5;
|
1202
|
-
break;
|
1203
|
-
|
1204
|
-
case 0xD1: // fall through
|
1205
|
-
case 0xD3: // fall through
|
1206
|
-
case 0xC1:
|
1207
|
-
data += D1D3C1Instruction(data);
|
1208
|
-
break;
|
1209
|
-
|
1210
|
-
case 0xD9: // fall through
|
1211
|
-
case 0xDA: // fall through
|
1212
|
-
case 0xDB: // fall through
|
1213
|
-
case 0xDC: // fall through
|
1214
|
-
case 0xDD: // fall through
|
1215
|
-
case 0xDE: // fall through
|
1216
|
-
case 0xDF:
|
1217
|
-
data += FPUInstruction(data);
|
1218
|
-
break;
|
1219
|
-
|
1220
|
-
case 0xEB:
|
1221
|
-
data += JumpShort(data);
|
1222
|
-
break;
|
1223
|
-
|
1224
|
-
case 0xF2:
|
1225
|
-
if (*(data+1) == 0x0F) {
|
1226
|
-
byte b2 = *(data+2);
|
1227
|
-
if (b2 == 0x11) {
|
1228
|
-
AppendToBuffer("movsd ");
|
1229
|
-
data += 3;
|
1230
|
-
int mod, regop, rm;
|
1231
|
-
get_modrm(*data, &mod, ®op, &rm);
|
1232
|
-
data += PrintRightOperand(data);
|
1233
|
-
AppendToBuffer(",%s", NameOfXMMRegister(regop));
|
1234
|
-
} else if (b2 == 0x10) {
|
1235
|
-
data += 3;
|
1236
|
-
int mod, regop, rm;
|
1237
|
-
get_modrm(*data, &mod, ®op, &rm);
|
1238
|
-
AppendToBuffer("movsd %s,", NameOfXMMRegister(regop));
|
1239
|
-
data += PrintRightOperand(data);
|
1240
|
-
} else {
|
1241
|
-
const char* mnem = "?";
|
1242
|
-
switch (b2) {
|
1243
|
-
case 0x2A: mnem = "cvtsi2sd"; break;
|
1244
|
-
case 0x2C: mnem = "cvttsd2si"; break;
|
1245
|
-
case 0x51: mnem = "sqrtsd"; break;
|
1246
|
-
case 0x58: mnem = "addsd"; break;
|
1247
|
-
case 0x59: mnem = "mulsd"; break;
|
1248
|
-
case 0x5C: mnem = "subsd"; break;
|
1249
|
-
case 0x5E: mnem = "divsd"; break;
|
1250
|
-
}
|
1251
|
-
data += 3;
|
1252
|
-
int mod, regop, rm;
|
1253
|
-
get_modrm(*data, &mod, ®op, &rm);
|
1254
|
-
if (b2 == 0x2A) {
|
1255
|
-
if (mod != 0x3) {
|
1256
|
-
AppendToBuffer("%s %s,", mnem, NameOfXMMRegister(regop));
|
1257
|
-
data += PrintRightOperand(data);
|
1258
|
-
} else {
|
1259
|
-
AppendToBuffer("%s %s,%s",
|
1260
|
-
mnem,
|
1261
|
-
NameOfXMMRegister(regop),
|
1262
|
-
NameOfCPURegister(rm));
|
1263
|
-
data++;
|
1264
|
-
}
|
1265
|
-
} else if (b2 == 0x2C) {
|
1266
|
-
if (mod != 0x3) {
|
1267
|
-
AppendToBuffer("%s %s,", mnem, NameOfCPURegister(regop));
|
1268
|
-
data += PrintRightOperand(data);
|
1269
|
-
} else {
|
1270
|
-
AppendToBuffer("%s %s,%s",
|
1271
|
-
mnem,
|
1272
|
-
NameOfCPURegister(regop),
|
1273
|
-
NameOfXMMRegister(rm));
|
1274
|
-
data++;
|
1275
|
-
}
|
1276
|
-
} else {
|
1277
|
-
if (mod != 0x3) {
|
1278
|
-
AppendToBuffer("%s %s,", mnem, NameOfXMMRegister(regop));
|
1279
|
-
data += PrintRightOperand(data);
|
1280
|
-
} else {
|
1281
|
-
AppendToBuffer("%s %s,%s",
|
1282
|
-
mnem,
|
1283
|
-
NameOfXMMRegister(regop),
|
1284
|
-
NameOfXMMRegister(rm));
|
1285
|
-
data++;
|
1286
|
-
}
|
1287
|
-
}
|
1288
|
-
}
|
1289
|
-
} else {
|
1290
|
-
UnimplementedInstruction();
|
1291
|
-
}
|
1292
|
-
break;
|
1293
|
-
|
1294
|
-
case 0xF3:
|
1295
|
-
if (*(data+1) == 0x0F) {
|
1296
|
-
if (*(data+2) == 0x2C) {
|
1297
|
-
data += 3;
|
1298
|
-
data += PrintOperands("cvttss2si", REG_OPER_OP_ORDER, data);
|
1299
|
-
} else if (*(data+2) == 0x5A) {
|
1300
|
-
data += 3;
|
1301
|
-
int mod, regop, rm;
|
1302
|
-
get_modrm(*data, &mod, ®op, &rm);
|
1303
|
-
AppendToBuffer("cvtss2sd %s,%s",
|
1304
|
-
NameOfXMMRegister(regop),
|
1305
|
-
NameOfXMMRegister(rm));
|
1306
|
-
data++;
|
1307
|
-
} else if (*(data+2) == 0x6F) {
|
1308
|
-
data += 3;
|
1309
|
-
int mod, regop, rm;
|
1310
|
-
get_modrm(*data, &mod, ®op, &rm);
|
1311
|
-
AppendToBuffer("movdqu %s,", NameOfXMMRegister(regop));
|
1312
|
-
data += PrintRightOperand(data);
|
1313
|
-
} else if (*(data+2) == 0x7F) {
|
1314
|
-
AppendToBuffer("movdqu ");
|
1315
|
-
data += 3;
|
1316
|
-
int mod, regop, rm;
|
1317
|
-
get_modrm(*data, &mod, ®op, &rm);
|
1318
|
-
data += PrintRightOperand(data);
|
1319
|
-
AppendToBuffer(",%s", NameOfXMMRegister(regop));
|
1320
|
-
} else {
|
1321
|
-
UnimplementedInstruction();
|
1322
|
-
}
|
1323
|
-
} else if (*(data+1) == 0xA5) {
|
1324
|
-
data += 2;
|
1325
|
-
AppendToBuffer("rep_movs");
|
1326
|
-
} else if (*(data+1) == 0xAB) {
|
1327
|
-
data += 2;
|
1328
|
-
AppendToBuffer("rep_stos");
|
1329
|
-
} else {
|
1330
|
-
UnimplementedInstruction();
|
1331
|
-
}
|
1332
|
-
break;
|
1333
|
-
|
1334
|
-
case 0xF7:
|
1335
|
-
data += F7Instruction(data);
|
1336
|
-
break;
|
1337
|
-
|
1338
|
-
default:
|
1339
|
-
UnimplementedInstruction();
|
1340
|
-
}
|
1341
|
-
}
|
1342
|
-
|
1343
|
-
if (tmp_buffer_pos_ < sizeof tmp_buffer_) {
|
1344
|
-
tmp_buffer_[tmp_buffer_pos_] = '\0';
|
1345
|
-
}
|
1346
|
-
|
1347
|
-
int instr_len = data - instr;
|
1348
|
-
if (instr_len == 0) {
|
1349
|
-
printf("%02x", *data);
|
1350
|
-
}
|
1351
|
-
ASSERT(instr_len > 0); // Ensure progress.
|
1352
|
-
|
1353
|
-
int outp = 0;
|
1354
|
-
// Instruction bytes.
|
1355
|
-
for (byte* bp = instr; bp < data; bp++) {
|
1356
|
-
outp += v8::internal::OS::SNPrintF(out_buffer + outp,
|
1357
|
-
"%02x",
|
1358
|
-
*bp);
|
1359
|
-
}
|
1360
|
-
for (int i = 6 - instr_len; i >= 0; i--) {
|
1361
|
-
outp += v8::internal::OS::SNPrintF(out_buffer + outp,
|
1362
|
-
" ");
|
1363
|
-
}
|
1364
|
-
|
1365
|
-
outp += v8::internal::OS::SNPrintF(out_buffer + outp,
|
1366
|
-
" %s",
|
1367
|
-
tmp_buffer_.start());
|
1368
|
-
return instr_len;
|
1369
|
-
}
|
1370
|
-
|
1371
|
-
|
1372
|
-
//------------------------------------------------------------------------------
|
1373
|
-
|
1374
|
-
|
1375
|
-
static const char* cpu_regs[8] = {
|
1376
|
-
"eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi"
|
1377
|
-
};
|
1378
|
-
|
1379
|
-
|
1380
|
-
static const char* byte_cpu_regs[8] = {
|
1381
|
-
"al", "cl", "dl", "bl", "ah", "ch", "dh", "bh"
|
1382
|
-
};
|
1383
|
-
|
1384
|
-
|
1385
|
-
static const char* xmm_regs[8] = {
|
1386
|
-
"xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"
|
1387
|
-
};
|
1388
|
-
|
1389
|
-
|
1390
|
-
const char* NameConverter::NameOfAddress(byte* addr) const {
|
1391
|
-
static v8::internal::EmbeddedVector<char, 32> tmp_buffer;
|
1392
|
-
v8::internal::OS::SNPrintF(tmp_buffer, "%p", addr);
|
1393
|
-
return tmp_buffer.start();
|
1394
|
-
}
|
1395
|
-
|
1396
|
-
|
1397
|
-
const char* NameConverter::NameOfConstant(byte* addr) const {
|
1398
|
-
return NameOfAddress(addr);
|
1399
|
-
}
|
1400
|
-
|
1401
|
-
|
1402
|
-
const char* NameConverter::NameOfCPURegister(int reg) const {
|
1403
|
-
if (0 <= reg && reg < 8) return cpu_regs[reg];
|
1404
|
-
return "noreg";
|
1405
|
-
}
|
1406
|
-
|
1407
|
-
|
1408
|
-
const char* NameConverter::NameOfByteCPURegister(int reg) const {
|
1409
|
-
if (0 <= reg && reg < 8) return byte_cpu_regs[reg];
|
1410
|
-
return "noreg";
|
1411
|
-
}
|
1412
|
-
|
1413
|
-
|
1414
|
-
const char* NameConverter::NameOfXMMRegister(int reg) const {
|
1415
|
-
if (0 <= reg && reg < 8) return xmm_regs[reg];
|
1416
|
-
return "noxmmreg";
|
1417
|
-
}
|
1418
|
-
|
1419
|
-
|
1420
|
-
const char* NameConverter::NameInCode(byte* addr) const {
|
1421
|
-
// IA32 does not embed debug strings at the moment.
|
1422
|
-
UNREACHABLE();
|
1423
|
-
return "";
|
1424
|
-
}
|
1425
|
-
|
1426
|
-
|
1427
|
-
//------------------------------------------------------------------------------
|
1428
|
-
|
1429
|
-
Disassembler::Disassembler(const NameConverter& converter)
|
1430
|
-
: converter_(converter) {}
|
1431
|
-
|
1432
|
-
|
1433
|
-
Disassembler::~Disassembler() {}
|
1434
|
-
|
1435
|
-
|
1436
|
-
int Disassembler::InstructionDecode(v8::internal::Vector<char> buffer,
|
1437
|
-
byte* instruction) {
|
1438
|
-
DisassemblerIA32 d(converter_, false /*do not crash if unimplemented*/);
|
1439
|
-
return d.InstructionDecode(buffer, instruction);
|
1440
|
-
}
|
1441
|
-
|
1442
|
-
|
1443
|
-
// The IA-32 assembler does not currently use constant pools.
|
1444
|
-
int Disassembler::ConstantPoolSizeAt(byte* instruction) { return -1; }
|
1445
|
-
|
1446
|
-
|
1447
|
-
/*static*/ void Disassembler::Disassemble(FILE* f, byte* begin, byte* end) {
|
1448
|
-
NameConverter converter;
|
1449
|
-
Disassembler d(converter);
|
1450
|
-
for (byte* pc = begin; pc < end;) {
|
1451
|
-
v8::internal::EmbeddedVector<char, 128> buffer;
|
1452
|
-
buffer[0] = '\0';
|
1453
|
-
byte* prev_pc = pc;
|
1454
|
-
pc += d.InstructionDecode(buffer, pc);
|
1455
|
-
fprintf(f, "%p", prev_pc);
|
1456
|
-
fprintf(f, " ");
|
1457
|
-
|
1458
|
-
for (byte* bp = prev_pc; bp < pc; bp++) {
|
1459
|
-
fprintf(f, "%02x", *bp);
|
1460
|
-
}
|
1461
|
-
for (int i = 6 - (pc - prev_pc); i >= 0; i--) {
|
1462
|
-
fprintf(f, " ");
|
1463
|
-
}
|
1464
|
-
fprintf(f, " %s\n", buffer.start());
|
1465
|
-
}
|
1466
|
-
}
|
1467
|
-
|
1468
|
-
|
1469
|
-
} // namespace disasm
|
1470
|
-
|
1471
|
-
#endif // V8_TARGET_ARCH_IA32
|