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
@@ -0,0 +1,90 @@
|
|
1
|
+
// Copyright 2009 the V8 project authors. All rights reserved.
|
2
|
+
// Redistribution and use in source and binary forms, with or without
|
3
|
+
// modification, are permitted provided that the following conditions are
|
4
|
+
// met:
|
5
|
+
//
|
6
|
+
// * Redistributions of source code must retain the above copyright
|
7
|
+
// notice, this list of conditions and the following disclaimer.
|
8
|
+
// * Redistributions in binary form must reproduce the above
|
9
|
+
// copyright notice, this list of conditions and the following
|
10
|
+
// disclaimer in the documentation and/or other materials provided
|
11
|
+
// with the distribution.
|
12
|
+
// * Neither the name of Google Inc. nor the names of its
|
13
|
+
// contributors may be used to endorse or promote products derived
|
14
|
+
// from this software without specific prior written permission.
|
15
|
+
//
|
16
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
17
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
18
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
19
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
20
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
21
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
22
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
24
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
25
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
26
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
+
|
28
|
+
#include "v8.h"
|
29
|
+
|
30
|
+
#include "ast.h"
|
31
|
+
#include "func-name-inferrer.h"
|
32
|
+
|
33
|
+
namespace v8 {
|
34
|
+
namespace internal {
|
35
|
+
|
36
|
+
|
37
|
+
void FuncNameInferrer::PushEnclosingName(Handle<String> name) {
|
38
|
+
// Enclosing name is a name of a constructor function. To check
|
39
|
+
// that it is really a constructor, we check that it is not empty
|
40
|
+
// and starts with a capital letter.
|
41
|
+
if (name->length() > 0 && Runtime::IsUpperCaseChar(name->Get(0))) {
|
42
|
+
names_stack_.Add(name);
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
|
47
|
+
void FuncNameInferrer::PushLiteralName(Handle<String> name) {
|
48
|
+
if (IsOpen() && !Heap::prototype_symbol()->Equals(*name)) {
|
49
|
+
names_stack_.Add(name);
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
53
|
+
|
54
|
+
void FuncNameInferrer::PushVariableName(Handle<String> name) {
|
55
|
+
if (IsOpen() && !Heap::result_symbol()->Equals(*name)) {
|
56
|
+
names_stack_.Add(name);
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
|
61
|
+
Handle<String> FuncNameInferrer::MakeNameFromStack() {
|
62
|
+
if (names_stack_.is_empty()) {
|
63
|
+
return Factory::empty_string();
|
64
|
+
} else {
|
65
|
+
return MakeNameFromStackHelper(1, names_stack_.at(0));
|
66
|
+
}
|
67
|
+
}
|
68
|
+
|
69
|
+
|
70
|
+
Handle<String> FuncNameInferrer::MakeNameFromStackHelper(int pos,
|
71
|
+
Handle<String> prev) {
|
72
|
+
if (pos >= names_stack_.length()) {
|
73
|
+
return prev;
|
74
|
+
} else {
|
75
|
+
Handle<String> curr = Factory::NewConsString(dot_, names_stack_.at(pos));
|
76
|
+
return MakeNameFromStackHelper(pos + 1, Factory::NewConsString(prev, curr));
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
|
81
|
+
void FuncNameInferrer::InferFunctionsNames() {
|
82
|
+
Handle<String> func_name = MakeNameFromStack();
|
83
|
+
for (int i = 0; i < funcs_to_infer_.length(); ++i) {
|
84
|
+
funcs_to_infer_[i]->set_inferred_name(func_name);
|
85
|
+
}
|
86
|
+
funcs_to_infer_.Rewind(0);
|
87
|
+
}
|
88
|
+
|
89
|
+
|
90
|
+
} } // namespace v8::internal
|
@@ -0,0 +1,111 @@
|
|
1
|
+
// Copyright 2006-2009 the V8 project authors. All rights reserved.
|
2
|
+
// Redistribution and use in source and binary forms, with or without
|
3
|
+
// modification, are permitted provided that the following conditions are
|
4
|
+
// met:
|
5
|
+
//
|
6
|
+
// * Redistributions of source code must retain the above copyright
|
7
|
+
// notice, this list of conditions and the following disclaimer.
|
8
|
+
// * Redistributions in binary form must reproduce the above
|
9
|
+
// copyright notice, this list of conditions and the following
|
10
|
+
// disclaimer in the documentation and/or other materials provided
|
11
|
+
// with the distribution.
|
12
|
+
// * Neither the name of Google Inc. nor the names of its
|
13
|
+
// contributors may be used to endorse or promote products derived
|
14
|
+
// from this software without specific prior written permission.
|
15
|
+
//
|
16
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
17
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
18
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
19
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
20
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
21
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
22
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
24
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
25
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
26
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
+
|
28
|
+
#ifndef V8_FUNC_NAME_INFERRER_H_
|
29
|
+
#define V8_FUNC_NAME_INFERRER_H_
|
30
|
+
|
31
|
+
namespace v8 {
|
32
|
+
namespace internal {
|
33
|
+
|
34
|
+
// FuncNameInferrer is a stateful class that is used to perform name
|
35
|
+
// inference for anonymous functions during static analysis of source code.
|
36
|
+
// Inference is performed in cases when an anonymous function is assigned
|
37
|
+
// to a variable or a property (see test-func-name-inference.cc for examples.)
|
38
|
+
//
|
39
|
+
// The basic idea is that during parsing of LHSs of certain expressions
|
40
|
+
// (assignments, declarations, object literals) we collect name strings,
|
41
|
+
// and during parsing of the RHS, a function literal can be collected. After
|
42
|
+
// parsing the RHS we can infer a name for function literals that do not have
|
43
|
+
// a name.
|
44
|
+
class FuncNameInferrer : public ZoneObject {
|
45
|
+
public:
|
46
|
+
FuncNameInferrer()
|
47
|
+
: entries_stack_(10),
|
48
|
+
names_stack_(5),
|
49
|
+
funcs_to_infer_(4),
|
50
|
+
dot_(Factory::NewStringFromAscii(CStrVector("."))) {
|
51
|
+
}
|
52
|
+
|
53
|
+
// Returns whether we have entered name collection state.
|
54
|
+
bool IsOpen() const { return !entries_stack_.is_empty(); }
|
55
|
+
|
56
|
+
// Pushes an enclosing the name of enclosing function onto names stack.
|
57
|
+
void PushEnclosingName(Handle<String> name);
|
58
|
+
|
59
|
+
// Enters name collection state.
|
60
|
+
void Enter() {
|
61
|
+
entries_stack_.Add(names_stack_.length());
|
62
|
+
}
|
63
|
+
|
64
|
+
// Pushes an encountered name onto names stack when in collection state.
|
65
|
+
void PushLiteralName(Handle<String> name);
|
66
|
+
|
67
|
+
void PushVariableName(Handle<String> name);
|
68
|
+
|
69
|
+
// Adds a function to infer name for.
|
70
|
+
void AddFunction(FunctionLiteral* func_to_infer) {
|
71
|
+
if (IsOpen()) {
|
72
|
+
funcs_to_infer_.Add(func_to_infer);
|
73
|
+
}
|
74
|
+
}
|
75
|
+
|
76
|
+
// Infers a function name and leaves names collection state.
|
77
|
+
void Infer() {
|
78
|
+
ASSERT(IsOpen());
|
79
|
+
if (!funcs_to_infer_.is_empty()) {
|
80
|
+
InferFunctionsNames();
|
81
|
+
}
|
82
|
+
}
|
83
|
+
|
84
|
+
// Infers a function name and leaves names collection state.
|
85
|
+
void Leave() {
|
86
|
+
ASSERT(IsOpen());
|
87
|
+
names_stack_.Rewind(entries_stack_.RemoveLast());
|
88
|
+
}
|
89
|
+
|
90
|
+
private:
|
91
|
+
// Constructs a full name in dotted notation from gathered names.
|
92
|
+
Handle<String> MakeNameFromStack();
|
93
|
+
|
94
|
+
// A helper function for MakeNameFromStack.
|
95
|
+
Handle<String> MakeNameFromStackHelper(int pos, Handle<String> prev);
|
96
|
+
|
97
|
+
// Performs name inferring for added functions.
|
98
|
+
void InferFunctionsNames();
|
99
|
+
|
100
|
+
ZoneList<int> entries_stack_;
|
101
|
+
ZoneList<Handle<String> > names_stack_;
|
102
|
+
ZoneList<FunctionLiteral*> funcs_to_infer_;
|
103
|
+
Handle<String> dot_;
|
104
|
+
|
105
|
+
DISALLOW_COPY_AND_ASSIGN(FuncNameInferrer);
|
106
|
+
};
|
107
|
+
|
108
|
+
|
109
|
+
} } // namespace v8::internal
|
110
|
+
|
111
|
+
#endif // V8_FUNC_NAME_INFERRER_H_
|
@@ -0,0 +1,1547 @@
|
|
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
|
+
#ifdef ENABLE_GDB_JIT_INTERFACE
|
29
|
+
#include "gdb-jit.h"
|
30
|
+
|
31
|
+
#include "bootstrapper.h"
|
32
|
+
#include "compiler.h"
|
33
|
+
#include "global-handles.h"
|
34
|
+
#include "messages.h"
|
35
|
+
#include "natives.h"
|
36
|
+
|
37
|
+
namespace v8 {
|
38
|
+
namespace internal {
|
39
|
+
|
40
|
+
class ELF;
|
41
|
+
|
42
|
+
class Writer BASE_EMBEDDED {
|
43
|
+
public:
|
44
|
+
explicit Writer(ELF* elf)
|
45
|
+
: elf_(elf),
|
46
|
+
position_(0),
|
47
|
+
capacity_(1024),
|
48
|
+
buffer_(reinterpret_cast<byte*>(malloc(capacity_))) {
|
49
|
+
}
|
50
|
+
|
51
|
+
~Writer() {
|
52
|
+
free(buffer_);
|
53
|
+
}
|
54
|
+
|
55
|
+
uintptr_t position() const {
|
56
|
+
return position_;
|
57
|
+
}
|
58
|
+
|
59
|
+
template<typename T>
|
60
|
+
class Slot {
|
61
|
+
public:
|
62
|
+
Slot(Writer* w, uintptr_t offset) : w_(w), offset_(offset) { }
|
63
|
+
|
64
|
+
T* operator-> () {
|
65
|
+
return w_->RawSlotAt<T>(offset_);
|
66
|
+
}
|
67
|
+
|
68
|
+
void set(const T& value) {
|
69
|
+
*w_->RawSlotAt<T>(offset_) = value;
|
70
|
+
}
|
71
|
+
|
72
|
+
Slot<T> at(int i) {
|
73
|
+
return Slot<T>(w_, offset_ + sizeof(T) * i);
|
74
|
+
}
|
75
|
+
|
76
|
+
private:
|
77
|
+
Writer* w_;
|
78
|
+
uintptr_t offset_;
|
79
|
+
};
|
80
|
+
|
81
|
+
template<typename T>
|
82
|
+
void Write(const T& val) {
|
83
|
+
Ensure(position_ + sizeof(T));
|
84
|
+
*RawSlotAt<T>(position_) = val;
|
85
|
+
position_ += sizeof(T);
|
86
|
+
}
|
87
|
+
|
88
|
+
template<typename T>
|
89
|
+
Slot<T> SlotAt(uintptr_t offset) {
|
90
|
+
Ensure(offset + sizeof(T));
|
91
|
+
return Slot<T>(this, offset);
|
92
|
+
}
|
93
|
+
|
94
|
+
template<typename T>
|
95
|
+
Slot<T> CreateSlotHere() {
|
96
|
+
return CreateSlotsHere<T>(1);
|
97
|
+
}
|
98
|
+
|
99
|
+
template<typename T>
|
100
|
+
Slot<T> CreateSlotsHere(uint32_t count) {
|
101
|
+
uintptr_t slot_position = position_;
|
102
|
+
position_ += sizeof(T) * count;
|
103
|
+
Ensure(position_);
|
104
|
+
return SlotAt<T>(slot_position);
|
105
|
+
}
|
106
|
+
|
107
|
+
void Ensure(uintptr_t pos) {
|
108
|
+
if (capacity_ < pos) {
|
109
|
+
while (capacity_ < pos) capacity_ *= 2;
|
110
|
+
buffer_ = reinterpret_cast<byte*>(realloc(buffer_, capacity_));
|
111
|
+
}
|
112
|
+
}
|
113
|
+
|
114
|
+
ELF* elf() { return elf_; }
|
115
|
+
|
116
|
+
byte* buffer() { return buffer_; }
|
117
|
+
|
118
|
+
void Align(uintptr_t align) {
|
119
|
+
uintptr_t delta = position_ % align;
|
120
|
+
if (delta == 0) return;
|
121
|
+
uintptr_t padding = align - delta;
|
122
|
+
Ensure(position_ += padding);
|
123
|
+
ASSERT((position_ % align) == 0);
|
124
|
+
}
|
125
|
+
|
126
|
+
void WriteULEB128(uintptr_t value) {
|
127
|
+
do {
|
128
|
+
uint8_t byte = value & 0x7F;
|
129
|
+
value >>= 7;
|
130
|
+
if (value != 0) byte |= 0x80;
|
131
|
+
Write<uint8_t>(byte);
|
132
|
+
} while (value != 0);
|
133
|
+
}
|
134
|
+
|
135
|
+
void WriteSLEB128(intptr_t value) {
|
136
|
+
bool more = true;
|
137
|
+
while (more) {
|
138
|
+
int8_t byte = value & 0x7F;
|
139
|
+
bool byte_sign = byte & 0x40;
|
140
|
+
value >>= 7;
|
141
|
+
|
142
|
+
if ((value == 0 && !byte_sign) || (value == -1 && byte_sign)) {
|
143
|
+
more = false;
|
144
|
+
} else {
|
145
|
+
byte |= 0x80;
|
146
|
+
}
|
147
|
+
|
148
|
+
Write<int8_t>(byte);
|
149
|
+
}
|
150
|
+
}
|
151
|
+
|
152
|
+
void WriteString(const char* str) {
|
153
|
+
do {
|
154
|
+
Write<char>(*str);
|
155
|
+
} while (*str++);
|
156
|
+
}
|
157
|
+
|
158
|
+
private:
|
159
|
+
template<typename T> friend class Slot;
|
160
|
+
|
161
|
+
template<typename T>
|
162
|
+
T* RawSlotAt(uintptr_t offset) {
|
163
|
+
ASSERT(offset < capacity_ && offset + sizeof(T) <= capacity_);
|
164
|
+
return reinterpret_cast<T*>(&buffer_[offset]);
|
165
|
+
}
|
166
|
+
|
167
|
+
ELF* elf_;
|
168
|
+
uintptr_t position_;
|
169
|
+
uintptr_t capacity_;
|
170
|
+
byte* buffer_;
|
171
|
+
};
|
172
|
+
|
173
|
+
class StringTable;
|
174
|
+
|
175
|
+
class ELFSection : public ZoneObject {
|
176
|
+
public:
|
177
|
+
struct Header {
|
178
|
+
uint32_t name;
|
179
|
+
uint32_t type;
|
180
|
+
uintptr_t flags;
|
181
|
+
uintptr_t address;
|
182
|
+
uintptr_t offset;
|
183
|
+
uintptr_t size;
|
184
|
+
uint32_t link;
|
185
|
+
uint32_t info;
|
186
|
+
uintptr_t alignment;
|
187
|
+
uintptr_t entry_size;
|
188
|
+
};
|
189
|
+
|
190
|
+
enum Type {
|
191
|
+
TYPE_NULL = 0,
|
192
|
+
TYPE_PROGBITS = 1,
|
193
|
+
TYPE_SYMTAB = 2,
|
194
|
+
TYPE_STRTAB = 3,
|
195
|
+
TYPE_RELA = 4,
|
196
|
+
TYPE_HASH = 5,
|
197
|
+
TYPE_DYNAMIC = 6,
|
198
|
+
TYPE_NOTE = 7,
|
199
|
+
TYPE_NOBITS = 8,
|
200
|
+
TYPE_REL = 9,
|
201
|
+
TYPE_SHLIB = 10,
|
202
|
+
TYPE_DYNSYM = 11,
|
203
|
+
TYPE_LOPROC = 0x70000000,
|
204
|
+
TYPE_X86_64_UNWIND = 0x70000001,
|
205
|
+
TYPE_HIPROC = 0x7fffffff,
|
206
|
+
TYPE_LOUSER = 0x80000000,
|
207
|
+
TYPE_HIUSER = 0xffffffff
|
208
|
+
};
|
209
|
+
|
210
|
+
enum Flags {
|
211
|
+
FLAG_WRITE = 1,
|
212
|
+
FLAG_ALLOC = 2,
|
213
|
+
FLAG_EXEC = 4
|
214
|
+
};
|
215
|
+
|
216
|
+
enum SpecialIndexes {
|
217
|
+
INDEX_ABSOLUTE = 0xfff1
|
218
|
+
};
|
219
|
+
|
220
|
+
ELFSection(const char* name, Type type, uintptr_t align)
|
221
|
+
: name_(name), type_(type), align_(align) { }
|
222
|
+
|
223
|
+
virtual ~ELFSection() { }
|
224
|
+
|
225
|
+
void PopulateHeader(Writer::Slot<Header> header, StringTable* strtab);
|
226
|
+
|
227
|
+
virtual void WriteBody(Writer::Slot<Header> header, Writer* w) {
|
228
|
+
uintptr_t start = w->position();
|
229
|
+
if (WriteBody(w)) {
|
230
|
+
uintptr_t end = w->position();
|
231
|
+
header->offset = start;
|
232
|
+
header->size = end - start;
|
233
|
+
}
|
234
|
+
}
|
235
|
+
|
236
|
+
virtual bool WriteBody(Writer* w) {
|
237
|
+
return false;
|
238
|
+
}
|
239
|
+
|
240
|
+
uint16_t index() const { return index_; }
|
241
|
+
void set_index(uint16_t index) { index_ = index; }
|
242
|
+
|
243
|
+
protected:
|
244
|
+
virtual void PopulateHeader(Writer::Slot<Header> header) {
|
245
|
+
header->flags = 0;
|
246
|
+
header->address = 0;
|
247
|
+
header->offset = 0;
|
248
|
+
header->size = 0;
|
249
|
+
header->link = 0;
|
250
|
+
header->info = 0;
|
251
|
+
header->entry_size = 0;
|
252
|
+
}
|
253
|
+
|
254
|
+
|
255
|
+
private:
|
256
|
+
const char* name_;
|
257
|
+
Type type_;
|
258
|
+
uintptr_t align_;
|
259
|
+
uint16_t index_;
|
260
|
+
};
|
261
|
+
|
262
|
+
|
263
|
+
class FullHeaderELFSection : public ELFSection {
|
264
|
+
public:
|
265
|
+
FullHeaderELFSection(const char* name,
|
266
|
+
Type type,
|
267
|
+
uintptr_t align,
|
268
|
+
uintptr_t addr,
|
269
|
+
uintptr_t offset,
|
270
|
+
uintptr_t size,
|
271
|
+
uintptr_t flags)
|
272
|
+
: ELFSection(name, type, align),
|
273
|
+
addr_(addr),
|
274
|
+
offset_(offset),
|
275
|
+
size_(size),
|
276
|
+
flags_(flags) { }
|
277
|
+
|
278
|
+
protected:
|
279
|
+
virtual void PopulateHeader(Writer::Slot<Header> header) {
|
280
|
+
ELFSection::PopulateHeader(header);
|
281
|
+
header->address = addr_;
|
282
|
+
header->offset = offset_;
|
283
|
+
header->size = size_;
|
284
|
+
header->flags = flags_;
|
285
|
+
}
|
286
|
+
|
287
|
+
private:
|
288
|
+
uintptr_t addr_;
|
289
|
+
uintptr_t offset_;
|
290
|
+
uintptr_t size_;
|
291
|
+
uintptr_t flags_;
|
292
|
+
};
|
293
|
+
|
294
|
+
|
295
|
+
class StringTable : public ELFSection {
|
296
|
+
public:
|
297
|
+
explicit StringTable(const char* name)
|
298
|
+
: ELFSection(name, TYPE_STRTAB, 1), writer_(NULL), offset_(0), size_(0) {
|
299
|
+
}
|
300
|
+
|
301
|
+
uintptr_t Add(const char* str) {
|
302
|
+
if (*str == '\0') return 0;
|
303
|
+
|
304
|
+
uintptr_t offset = size_;
|
305
|
+
WriteString(str);
|
306
|
+
return offset;
|
307
|
+
}
|
308
|
+
|
309
|
+
void AttachWriter(Writer* w) {
|
310
|
+
writer_ = w;
|
311
|
+
offset_ = writer_->position();
|
312
|
+
|
313
|
+
// First entry in the string table should be an empty string.
|
314
|
+
WriteString("");
|
315
|
+
}
|
316
|
+
|
317
|
+
void DetachWriter() {
|
318
|
+
writer_ = NULL;
|
319
|
+
}
|
320
|
+
|
321
|
+
virtual void WriteBody(Writer::Slot<Header> header, Writer* w) {
|
322
|
+
ASSERT(writer_ == NULL);
|
323
|
+
header->offset = offset_;
|
324
|
+
header->size = size_;
|
325
|
+
}
|
326
|
+
|
327
|
+
private:
|
328
|
+
void WriteString(const char* str) {
|
329
|
+
uintptr_t written = 0;
|
330
|
+
do {
|
331
|
+
writer_->Write(*str);
|
332
|
+
written++;
|
333
|
+
} while (*str++);
|
334
|
+
size_ += written;
|
335
|
+
}
|
336
|
+
|
337
|
+
Writer* writer_;
|
338
|
+
|
339
|
+
uintptr_t offset_;
|
340
|
+
uintptr_t size_;
|
341
|
+
};
|
342
|
+
|
343
|
+
|
344
|
+
void ELFSection::PopulateHeader(Writer::Slot<ELFSection::Header> header,
|
345
|
+
StringTable* strtab) {
|
346
|
+
header->name = strtab->Add(name_);
|
347
|
+
header->type = type_;
|
348
|
+
header->alignment = align_;
|
349
|
+
PopulateHeader(header);
|
350
|
+
}
|
351
|
+
|
352
|
+
|
353
|
+
class ELF BASE_EMBEDDED {
|
354
|
+
public:
|
355
|
+
ELF() : sections_(6) {
|
356
|
+
sections_.Add(new ELFSection("", ELFSection::TYPE_NULL, 0));
|
357
|
+
sections_.Add(new StringTable(".shstrtab"));
|
358
|
+
}
|
359
|
+
|
360
|
+
void Write(Writer* w) {
|
361
|
+
WriteHeader(w);
|
362
|
+
WriteSectionTable(w);
|
363
|
+
WriteSections(w);
|
364
|
+
}
|
365
|
+
|
366
|
+
ELFSection* SectionAt(uint32_t index) {
|
367
|
+
return sections_[index];
|
368
|
+
}
|
369
|
+
|
370
|
+
uint32_t AddSection(ELFSection* section) {
|
371
|
+
sections_.Add(section);
|
372
|
+
section->set_index(sections_.length() - 1);
|
373
|
+
return sections_.length() - 1;
|
374
|
+
}
|
375
|
+
|
376
|
+
private:
|
377
|
+
struct ELFHeader {
|
378
|
+
uint8_t ident[16];
|
379
|
+
uint16_t type;
|
380
|
+
uint16_t machine;
|
381
|
+
uint32_t version;
|
382
|
+
uintptr_t entry;
|
383
|
+
uintptr_t pht_offset;
|
384
|
+
uintptr_t sht_offset;
|
385
|
+
uint32_t flags;
|
386
|
+
uint16_t header_size;
|
387
|
+
uint16_t pht_entry_size;
|
388
|
+
uint16_t pht_entry_num;
|
389
|
+
uint16_t sht_entry_size;
|
390
|
+
uint16_t sht_entry_num;
|
391
|
+
uint16_t sht_strtab_index;
|
392
|
+
};
|
393
|
+
|
394
|
+
|
395
|
+
void WriteHeader(Writer* w) {
|
396
|
+
ASSERT(w->position() == 0);
|
397
|
+
Writer::Slot<ELFHeader> header = w->CreateSlotHere<ELFHeader>();
|
398
|
+
#if defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_ARM)
|
399
|
+
const uint8_t ident[16] =
|
400
|
+
{ 0x7f, 'E', 'L', 'F', 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
401
|
+
#elif defined(V8_TARGET_ARCH_X64)
|
402
|
+
const uint8_t ident[16] =
|
403
|
+
{ 0x7f, 'E', 'L', 'F', 2, 1, 1, 0, 0, 0 , 0, 0, 0, 0, 0, 0};
|
404
|
+
#else
|
405
|
+
#error Unsupported target architecture.
|
406
|
+
#endif
|
407
|
+
memcpy(header->ident, ident, 16);
|
408
|
+
header->type = 1;
|
409
|
+
#if defined(V8_TARGET_ARCH_IA32)
|
410
|
+
header->machine = 3;
|
411
|
+
#elif defined(V8_TARGET_ARCH_X64)
|
412
|
+
// Processor identification value for x64 is 62 as defined in
|
413
|
+
// System V ABI, AMD64 Supplement
|
414
|
+
// http://www.x86-64.org/documentation/abi.pdf
|
415
|
+
header->machine = 62;
|
416
|
+
#elif defined(V8_TARGET_ARCH_ARM)
|
417
|
+
// Set to EM_ARM, defined as 40, in "ARM ELF File Format" at
|
418
|
+
// infocenter.arm.com/help/topic/com.arm.doc.dui0101a/DUI0101A_Elf.pdf
|
419
|
+
header->machine = 40;
|
420
|
+
#else
|
421
|
+
#error Unsupported target architecture.
|
422
|
+
#endif
|
423
|
+
header->version = 1;
|
424
|
+
header->entry = 0;
|
425
|
+
header->pht_offset = 0;
|
426
|
+
header->sht_offset = sizeof(ELFHeader); // Section table follows header.
|
427
|
+
header->flags = 0;
|
428
|
+
header->header_size = sizeof(ELFHeader);
|
429
|
+
header->pht_entry_size = 0;
|
430
|
+
header->pht_entry_num = 0;
|
431
|
+
header->sht_entry_size = sizeof(ELFSection::Header);
|
432
|
+
header->sht_entry_num = sections_.length();
|
433
|
+
header->sht_strtab_index = 1;
|
434
|
+
}
|
435
|
+
|
436
|
+
void WriteSectionTable(Writer* w) {
|
437
|
+
// Section headers table immediately follows file header.
|
438
|
+
ASSERT(w->position() == sizeof(ELFHeader));
|
439
|
+
|
440
|
+
Writer::Slot<ELFSection::Header> headers =
|
441
|
+
w->CreateSlotsHere<ELFSection::Header>(sections_.length());
|
442
|
+
|
443
|
+
// String table for section table is the first section.
|
444
|
+
StringTable* strtab = static_cast<StringTable*>(SectionAt(1));
|
445
|
+
strtab->AttachWriter(w);
|
446
|
+
for (int i = 0, length = sections_.length();
|
447
|
+
i < length;
|
448
|
+
i++) {
|
449
|
+
sections_[i]->PopulateHeader(headers.at(i), strtab);
|
450
|
+
}
|
451
|
+
strtab->DetachWriter();
|
452
|
+
}
|
453
|
+
|
454
|
+
int SectionHeaderPosition(uint32_t section_index) {
|
455
|
+
return sizeof(ELFHeader) + sizeof(ELFSection::Header) * section_index;
|
456
|
+
}
|
457
|
+
|
458
|
+
void WriteSections(Writer* w) {
|
459
|
+
Writer::Slot<ELFSection::Header> headers =
|
460
|
+
w->SlotAt<ELFSection::Header>(sizeof(ELFHeader));
|
461
|
+
|
462
|
+
for (int i = 0, length = sections_.length();
|
463
|
+
i < length;
|
464
|
+
i++) {
|
465
|
+
sections_[i]->WriteBody(headers.at(i), w);
|
466
|
+
}
|
467
|
+
}
|
468
|
+
|
469
|
+
ZoneList<ELFSection*> sections_;
|
470
|
+
};
|
471
|
+
|
472
|
+
|
473
|
+
class ELFSymbol BASE_EMBEDDED {
|
474
|
+
public:
|
475
|
+
enum Type {
|
476
|
+
TYPE_NOTYPE = 0,
|
477
|
+
TYPE_OBJECT = 1,
|
478
|
+
TYPE_FUNC = 2,
|
479
|
+
TYPE_SECTION = 3,
|
480
|
+
TYPE_FILE = 4,
|
481
|
+
TYPE_LOPROC = 13,
|
482
|
+
TYPE_HIPROC = 15
|
483
|
+
};
|
484
|
+
|
485
|
+
enum Binding {
|
486
|
+
BIND_LOCAL = 0,
|
487
|
+
BIND_GLOBAL = 1,
|
488
|
+
BIND_WEAK = 2,
|
489
|
+
BIND_LOPROC = 13,
|
490
|
+
BIND_HIPROC = 15
|
491
|
+
};
|
492
|
+
|
493
|
+
ELFSymbol(const char* name,
|
494
|
+
uintptr_t value,
|
495
|
+
uintptr_t size,
|
496
|
+
Binding binding,
|
497
|
+
Type type,
|
498
|
+
uint16_t section)
|
499
|
+
: name(name),
|
500
|
+
value(value),
|
501
|
+
size(size),
|
502
|
+
info((binding << 4) | type),
|
503
|
+
other(0),
|
504
|
+
section(section) {
|
505
|
+
}
|
506
|
+
|
507
|
+
Binding binding() const {
|
508
|
+
return static_cast<Binding>(info >> 4);
|
509
|
+
}
|
510
|
+
#if defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_ARM)
|
511
|
+
struct SerializedLayout {
|
512
|
+
SerializedLayout(uint32_t name,
|
513
|
+
uintptr_t value,
|
514
|
+
uintptr_t size,
|
515
|
+
Binding binding,
|
516
|
+
Type type,
|
517
|
+
uint16_t section)
|
518
|
+
: name(name),
|
519
|
+
value(value),
|
520
|
+
size(size),
|
521
|
+
info((binding << 4) | type),
|
522
|
+
other(0),
|
523
|
+
section(section) {
|
524
|
+
}
|
525
|
+
|
526
|
+
uint32_t name;
|
527
|
+
uintptr_t value;
|
528
|
+
uintptr_t size;
|
529
|
+
uint8_t info;
|
530
|
+
uint8_t other;
|
531
|
+
uint16_t section;
|
532
|
+
};
|
533
|
+
#elif defined(V8_TARGET_ARCH_X64)
|
534
|
+
struct SerializedLayout {
|
535
|
+
SerializedLayout(uint32_t name,
|
536
|
+
uintptr_t value,
|
537
|
+
uintptr_t size,
|
538
|
+
Binding binding,
|
539
|
+
Type type,
|
540
|
+
uint16_t section)
|
541
|
+
: name(name),
|
542
|
+
info((binding << 4) | type),
|
543
|
+
other(0),
|
544
|
+
section(section),
|
545
|
+
value(value),
|
546
|
+
size(size) {
|
547
|
+
}
|
548
|
+
|
549
|
+
uint32_t name;
|
550
|
+
uint8_t info;
|
551
|
+
uint8_t other;
|
552
|
+
uint16_t section;
|
553
|
+
uintptr_t value;
|
554
|
+
uintptr_t size;
|
555
|
+
};
|
556
|
+
#endif
|
557
|
+
|
558
|
+
void Write(Writer::Slot<SerializedLayout> s, StringTable* t) {
|
559
|
+
// Convert symbol names from strings to indexes in the string table.
|
560
|
+
s->name = t->Add(name);
|
561
|
+
s->value = value;
|
562
|
+
s->size = size;
|
563
|
+
s->info = info;
|
564
|
+
s->other = other;
|
565
|
+
s->section = section;
|
566
|
+
}
|
567
|
+
|
568
|
+
private:
|
569
|
+
const char* name;
|
570
|
+
uintptr_t value;
|
571
|
+
uintptr_t size;
|
572
|
+
uint8_t info;
|
573
|
+
uint8_t other;
|
574
|
+
uint16_t section;
|
575
|
+
};
|
576
|
+
|
577
|
+
|
578
|
+
class ELFSymbolTable : public ELFSection {
|
579
|
+
public:
|
580
|
+
explicit ELFSymbolTable(const char* name)
|
581
|
+
: ELFSection(name, TYPE_SYMTAB, sizeof(uintptr_t)),
|
582
|
+
locals_(1),
|
583
|
+
globals_(1) {
|
584
|
+
}
|
585
|
+
|
586
|
+
virtual void WriteBody(Writer::Slot<Header> header, Writer* w) {
|
587
|
+
w->Align(header->alignment);
|
588
|
+
int total_symbols = locals_.length() + globals_.length() + 1;
|
589
|
+
header->offset = w->position();
|
590
|
+
|
591
|
+
Writer::Slot<ELFSymbol::SerializedLayout> symbols =
|
592
|
+
w->CreateSlotsHere<ELFSymbol::SerializedLayout>(total_symbols);
|
593
|
+
|
594
|
+
header->size = w->position() - header->offset;
|
595
|
+
|
596
|
+
// String table for this symbol table should follow it in the section table.
|
597
|
+
StringTable* strtab =
|
598
|
+
static_cast<StringTable*>(w->elf()->SectionAt(index() + 1));
|
599
|
+
strtab->AttachWriter(w);
|
600
|
+
symbols.at(0).set(ELFSymbol::SerializedLayout(0,
|
601
|
+
0,
|
602
|
+
0,
|
603
|
+
ELFSymbol::BIND_LOCAL,
|
604
|
+
ELFSymbol::TYPE_NOTYPE,
|
605
|
+
0));
|
606
|
+
WriteSymbolsList(&locals_, symbols.at(1), strtab);
|
607
|
+
WriteSymbolsList(&globals_, symbols.at(locals_.length() + 1), strtab);
|
608
|
+
strtab->DetachWriter();
|
609
|
+
}
|
610
|
+
|
611
|
+
void Add(const ELFSymbol& symbol) {
|
612
|
+
if (symbol.binding() == ELFSymbol::BIND_LOCAL) {
|
613
|
+
locals_.Add(symbol);
|
614
|
+
} else {
|
615
|
+
globals_.Add(symbol);
|
616
|
+
}
|
617
|
+
}
|
618
|
+
|
619
|
+
protected:
|
620
|
+
virtual void PopulateHeader(Writer::Slot<Header> header) {
|
621
|
+
ELFSection::PopulateHeader(header);
|
622
|
+
// We are assuming that string table will follow symbol table.
|
623
|
+
header->link = index() + 1;
|
624
|
+
header->info = locals_.length() + 1;
|
625
|
+
header->entry_size = sizeof(ELFSymbol::SerializedLayout);
|
626
|
+
}
|
627
|
+
|
628
|
+
private:
|
629
|
+
void WriteSymbolsList(const ZoneList<ELFSymbol>* src,
|
630
|
+
Writer::Slot<ELFSymbol::SerializedLayout> dst,
|
631
|
+
StringTable* strtab) {
|
632
|
+
for (int i = 0, len = src->length();
|
633
|
+
i < len;
|
634
|
+
i++) {
|
635
|
+
src->at(i).Write(dst.at(i), strtab);
|
636
|
+
}
|
637
|
+
}
|
638
|
+
|
639
|
+
ZoneList<ELFSymbol> locals_;
|
640
|
+
ZoneList<ELFSymbol> globals_;
|
641
|
+
};
|
642
|
+
|
643
|
+
|
644
|
+
class CodeDescription BASE_EMBEDDED {
|
645
|
+
public:
|
646
|
+
|
647
|
+
#ifdef V8_TARGET_ARCH_X64
|
648
|
+
enum StackState {
|
649
|
+
POST_RBP_PUSH,
|
650
|
+
POST_RBP_SET,
|
651
|
+
POST_RBP_POP,
|
652
|
+
STACK_STATE_MAX
|
653
|
+
};
|
654
|
+
#endif
|
655
|
+
|
656
|
+
CodeDescription(const char* name,
|
657
|
+
Code* code,
|
658
|
+
Handle<Script> script,
|
659
|
+
GDBJITLineInfo* lineinfo,
|
660
|
+
GDBJITInterface::CodeTag tag)
|
661
|
+
: name_(name),
|
662
|
+
code_(code),
|
663
|
+
script_(script),
|
664
|
+
lineinfo_(lineinfo),
|
665
|
+
tag_(tag) {
|
666
|
+
}
|
667
|
+
|
668
|
+
const char* name() const {
|
669
|
+
return name_;
|
670
|
+
}
|
671
|
+
|
672
|
+
GDBJITLineInfo* lineinfo() const {
|
673
|
+
return lineinfo_;
|
674
|
+
}
|
675
|
+
|
676
|
+
GDBJITInterface::CodeTag tag() const {
|
677
|
+
return tag_;
|
678
|
+
}
|
679
|
+
|
680
|
+
uintptr_t CodeStart() const {
|
681
|
+
return reinterpret_cast<uintptr_t>(code_->instruction_start());
|
682
|
+
}
|
683
|
+
|
684
|
+
uintptr_t CodeEnd() const {
|
685
|
+
return reinterpret_cast<uintptr_t>(code_->instruction_end());
|
686
|
+
}
|
687
|
+
|
688
|
+
uintptr_t CodeSize() const {
|
689
|
+
return CodeEnd() - CodeStart();
|
690
|
+
}
|
691
|
+
|
692
|
+
bool IsLineInfoAvailable() {
|
693
|
+
return !script_.is_null() &&
|
694
|
+
script_->source()->IsString() &&
|
695
|
+
script_->HasValidSource() &&
|
696
|
+
script_->name()->IsString() &&
|
697
|
+
lineinfo_ != NULL;
|
698
|
+
}
|
699
|
+
|
700
|
+
#ifdef V8_TARGET_ARCH_X64
|
701
|
+
uintptr_t GetStackStateStartAddress(StackState state) const {
|
702
|
+
ASSERT(state < STACK_STATE_MAX);
|
703
|
+
return stack_state_start_addresses_[state];
|
704
|
+
}
|
705
|
+
|
706
|
+
void SetStackStateStartAddress(StackState state, uintptr_t addr) {
|
707
|
+
ASSERT(state < STACK_STATE_MAX);
|
708
|
+
stack_state_start_addresses_[state] = addr;
|
709
|
+
}
|
710
|
+
#endif
|
711
|
+
|
712
|
+
SmartPointer<char> GetFilename() {
|
713
|
+
return String::cast(script_->name())->ToCString();
|
714
|
+
}
|
715
|
+
|
716
|
+
int GetScriptLineNumber(int pos) {
|
717
|
+
return GetScriptLineNumberSafe(script_, pos) + 1;
|
718
|
+
}
|
719
|
+
|
720
|
+
|
721
|
+
private:
|
722
|
+
const char* name_;
|
723
|
+
Code* code_;
|
724
|
+
Handle<Script> script_;
|
725
|
+
GDBJITLineInfo* lineinfo_;
|
726
|
+
GDBJITInterface::CodeTag tag_;
|
727
|
+
#ifdef V8_TARGET_ARCH_X64
|
728
|
+
uintptr_t stack_state_start_addresses_[STACK_STATE_MAX];
|
729
|
+
#endif
|
730
|
+
};
|
731
|
+
|
732
|
+
|
733
|
+
static void CreateSymbolsTable(CodeDescription* desc,
|
734
|
+
ELF* elf,
|
735
|
+
int text_section_index) {
|
736
|
+
ELFSymbolTable* symtab = new ELFSymbolTable(".symtab");
|
737
|
+
StringTable* strtab = new StringTable(".strtab");
|
738
|
+
|
739
|
+
// Symbol table should be followed by the linked string table.
|
740
|
+
elf->AddSection(symtab);
|
741
|
+
elf->AddSection(strtab);
|
742
|
+
|
743
|
+
symtab->Add(ELFSymbol("V8 Code",
|
744
|
+
0,
|
745
|
+
0,
|
746
|
+
ELFSymbol::BIND_LOCAL,
|
747
|
+
ELFSymbol::TYPE_FILE,
|
748
|
+
ELFSection::INDEX_ABSOLUTE));
|
749
|
+
|
750
|
+
symtab->Add(ELFSymbol(desc->name(),
|
751
|
+
0,
|
752
|
+
desc->CodeSize(),
|
753
|
+
ELFSymbol::BIND_GLOBAL,
|
754
|
+
ELFSymbol::TYPE_FUNC,
|
755
|
+
text_section_index));
|
756
|
+
}
|
757
|
+
|
758
|
+
|
759
|
+
class DebugInfoSection : public ELFSection {
|
760
|
+
public:
|
761
|
+
explicit DebugInfoSection(CodeDescription* desc)
|
762
|
+
: ELFSection(".debug_info", TYPE_PROGBITS, 1), desc_(desc) { }
|
763
|
+
|
764
|
+
bool WriteBody(Writer* w) {
|
765
|
+
Writer::Slot<uint32_t> size = w->CreateSlotHere<uint32_t>();
|
766
|
+
uintptr_t start = w->position();
|
767
|
+
w->Write<uint16_t>(2); // DWARF version.
|
768
|
+
w->Write<uint32_t>(0); // Abbreviation table offset.
|
769
|
+
w->Write<uint8_t>(sizeof(intptr_t));
|
770
|
+
|
771
|
+
w->WriteULEB128(1); // Abbreviation code.
|
772
|
+
w->WriteString(*desc_->GetFilename());
|
773
|
+
w->Write<intptr_t>(desc_->CodeStart());
|
774
|
+
w->Write<intptr_t>(desc_->CodeStart() + desc_->CodeSize());
|
775
|
+
w->Write<uint32_t>(0);
|
776
|
+
size.set(static_cast<uint32_t>(w->position() - start));
|
777
|
+
return true;
|
778
|
+
}
|
779
|
+
|
780
|
+
private:
|
781
|
+
CodeDescription* desc_;
|
782
|
+
};
|
783
|
+
|
784
|
+
|
785
|
+
class DebugAbbrevSection : public ELFSection {
|
786
|
+
public:
|
787
|
+
DebugAbbrevSection() : ELFSection(".debug_abbrev", TYPE_PROGBITS, 1) { }
|
788
|
+
|
789
|
+
// DWARF2 standard, figure 14.
|
790
|
+
enum DWARF2Tags {
|
791
|
+
DW_TAG_COMPILE_UNIT = 0x11
|
792
|
+
};
|
793
|
+
|
794
|
+
// DWARF2 standard, figure 16.
|
795
|
+
enum DWARF2ChildrenDetermination {
|
796
|
+
DW_CHILDREN_NO = 0,
|
797
|
+
DW_CHILDREN_YES = 1
|
798
|
+
};
|
799
|
+
|
800
|
+
// DWARF standard, figure 17.
|
801
|
+
enum DWARF2Attribute {
|
802
|
+
DW_AT_NAME = 0x3,
|
803
|
+
DW_AT_STMT_LIST = 0x10,
|
804
|
+
DW_AT_LOW_PC = 0x11,
|
805
|
+
DW_AT_HIGH_PC = 0x12
|
806
|
+
};
|
807
|
+
|
808
|
+
// DWARF2 standard, figure 19.
|
809
|
+
enum DWARF2AttributeForm {
|
810
|
+
DW_FORM_ADDR = 0x1,
|
811
|
+
DW_FORM_STRING = 0x8,
|
812
|
+
DW_FORM_DATA4 = 0x6
|
813
|
+
};
|
814
|
+
|
815
|
+
bool WriteBody(Writer* w) {
|
816
|
+
w->WriteULEB128(1);
|
817
|
+
w->WriteULEB128(DW_TAG_COMPILE_UNIT);
|
818
|
+
w->Write<uint8_t>(DW_CHILDREN_NO);
|
819
|
+
w->WriteULEB128(DW_AT_NAME);
|
820
|
+
w->WriteULEB128(DW_FORM_STRING);
|
821
|
+
w->WriteULEB128(DW_AT_LOW_PC);
|
822
|
+
w->WriteULEB128(DW_FORM_ADDR);
|
823
|
+
w->WriteULEB128(DW_AT_HIGH_PC);
|
824
|
+
w->WriteULEB128(DW_FORM_ADDR);
|
825
|
+
w->WriteULEB128(DW_AT_STMT_LIST);
|
826
|
+
w->WriteULEB128(DW_FORM_DATA4);
|
827
|
+
w->WriteULEB128(0);
|
828
|
+
w->WriteULEB128(0);
|
829
|
+
w->WriteULEB128(0);
|
830
|
+
return true;
|
831
|
+
}
|
832
|
+
};
|
833
|
+
|
834
|
+
|
835
|
+
class DebugLineSection : public ELFSection {
|
836
|
+
public:
|
837
|
+
explicit DebugLineSection(CodeDescription* desc)
|
838
|
+
: ELFSection(".debug_line", TYPE_PROGBITS, 1),
|
839
|
+
desc_(desc) { }
|
840
|
+
|
841
|
+
// DWARF2 standard, figure 34.
|
842
|
+
enum DWARF2Opcodes {
|
843
|
+
DW_LNS_COPY = 1,
|
844
|
+
DW_LNS_ADVANCE_PC = 2,
|
845
|
+
DW_LNS_ADVANCE_LINE = 3,
|
846
|
+
DW_LNS_SET_FILE = 4,
|
847
|
+
DW_LNS_SET_COLUMN = 5,
|
848
|
+
DW_LNS_NEGATE_STMT = 6
|
849
|
+
};
|
850
|
+
|
851
|
+
// DWARF2 standard, figure 35.
|
852
|
+
enum DWARF2ExtendedOpcode {
|
853
|
+
DW_LNE_END_SEQUENCE = 1,
|
854
|
+
DW_LNE_SET_ADDRESS = 2,
|
855
|
+
DW_LNE_DEFINE_FILE = 3
|
856
|
+
};
|
857
|
+
|
858
|
+
bool WriteBody(Writer* w) {
|
859
|
+
// Write prologue.
|
860
|
+
Writer::Slot<uint32_t> total_length = w->CreateSlotHere<uint32_t>();
|
861
|
+
uintptr_t start = w->position();
|
862
|
+
|
863
|
+
// Used for special opcodes
|
864
|
+
const int8_t line_base = 1;
|
865
|
+
const uint8_t line_range = 7;
|
866
|
+
const int8_t max_line_incr = (line_base + line_range - 1);
|
867
|
+
const uint8_t opcode_base = DW_LNS_NEGATE_STMT + 1;
|
868
|
+
|
869
|
+
w->Write<uint16_t>(2); // Field version.
|
870
|
+
Writer::Slot<uint32_t> prologue_length = w->CreateSlotHere<uint32_t>();
|
871
|
+
uintptr_t prologue_start = w->position();
|
872
|
+
w->Write<uint8_t>(1); // Field minimum_instruction_length.
|
873
|
+
w->Write<uint8_t>(1); // Field default_is_stmt.
|
874
|
+
w->Write<int8_t>(line_base); // Field line_base.
|
875
|
+
w->Write<uint8_t>(line_range); // Field line_range.
|
876
|
+
w->Write<uint8_t>(opcode_base); // Field opcode_base.
|
877
|
+
w->Write<uint8_t>(0); // DW_LNS_COPY operands count.
|
878
|
+
w->Write<uint8_t>(1); // DW_LNS_ADVANCE_PC operands count.
|
879
|
+
w->Write<uint8_t>(1); // DW_LNS_ADVANCE_LINE operands count.
|
880
|
+
w->Write<uint8_t>(1); // DW_LNS_SET_FILE operands count.
|
881
|
+
w->Write<uint8_t>(1); // DW_LNS_SET_COLUMN operands count.
|
882
|
+
w->Write<uint8_t>(0); // DW_LNS_NEGATE_STMT operands count.
|
883
|
+
w->Write<uint8_t>(0); // Empty include_directories sequence.
|
884
|
+
w->WriteString(*desc_->GetFilename()); // File name.
|
885
|
+
w->WriteULEB128(0); // Current directory.
|
886
|
+
w->WriteULEB128(0); // Unknown modification time.
|
887
|
+
w->WriteULEB128(0); // Unknown file size.
|
888
|
+
w->Write<uint8_t>(0);
|
889
|
+
prologue_length.set(static_cast<uint32_t>(w->position() - prologue_start));
|
890
|
+
|
891
|
+
WriteExtendedOpcode(w, DW_LNE_SET_ADDRESS, sizeof(intptr_t));
|
892
|
+
w->Write<intptr_t>(desc_->CodeStart());
|
893
|
+
w->Write<uint8_t>(DW_LNS_COPY);
|
894
|
+
|
895
|
+
intptr_t pc = 0;
|
896
|
+
intptr_t line = 1;
|
897
|
+
bool is_statement = true;
|
898
|
+
|
899
|
+
List<GDBJITLineInfo::PCInfo>* pc_info = desc_->lineinfo()->pc_info();
|
900
|
+
pc_info->Sort(&ComparePCInfo);
|
901
|
+
|
902
|
+
int pc_info_length = pc_info->length();
|
903
|
+
for (int i = 0; i < pc_info_length; i++) {
|
904
|
+
GDBJITLineInfo::PCInfo* info = &pc_info->at(i);
|
905
|
+
ASSERT(info->pc_ >= pc);
|
906
|
+
|
907
|
+
// Reduce bloating in the debug line table by removing duplicate line
|
908
|
+
// entries (per DWARF2 standard).
|
909
|
+
intptr_t new_line = desc_->GetScriptLineNumber(info->pos_);
|
910
|
+
if (new_line == line) {
|
911
|
+
continue;
|
912
|
+
}
|
913
|
+
|
914
|
+
// Mark statement boundaries. For a better debugging experience, mark
|
915
|
+
// the last pc address in the function as a statement (e.g. "}"), so that
|
916
|
+
// a user can see the result of the last line executed in the function,
|
917
|
+
// should control reach the end.
|
918
|
+
if ((i+1) == pc_info_length) {
|
919
|
+
if (!is_statement) {
|
920
|
+
w->Write<uint8_t>(DW_LNS_NEGATE_STMT);
|
921
|
+
}
|
922
|
+
} else if (is_statement != info->is_statement_) {
|
923
|
+
w->Write<uint8_t>(DW_LNS_NEGATE_STMT);
|
924
|
+
is_statement = !is_statement;
|
925
|
+
}
|
926
|
+
|
927
|
+
// Generate special opcodes, if possible. This results in more compact
|
928
|
+
// debug line tables. See the DWARF 2.0 standard to learn more about
|
929
|
+
// special opcodes.
|
930
|
+
uintptr_t pc_diff = info->pc_ - pc;
|
931
|
+
intptr_t line_diff = new_line - line;
|
932
|
+
|
933
|
+
// Compute special opcode (see DWARF 2.0 standard)
|
934
|
+
intptr_t special_opcode = (line_diff - line_base) +
|
935
|
+
(line_range * pc_diff) + opcode_base;
|
936
|
+
|
937
|
+
// If special_opcode is less than or equal to 255, it can be used as a
|
938
|
+
// special opcode. If line_diff is larger than the max line increment
|
939
|
+
// allowed for a special opcode, or if line_diff is less than the minimum
|
940
|
+
// line that can be added to the line register (i.e. line_base), then
|
941
|
+
// special_opcode can't be used.
|
942
|
+
if ((special_opcode >= opcode_base) && (special_opcode <= 255) &&
|
943
|
+
(line_diff <= max_line_incr) && (line_diff >= line_base)) {
|
944
|
+
w->Write<uint8_t>(special_opcode);
|
945
|
+
} else {
|
946
|
+
w->Write<uint8_t>(DW_LNS_ADVANCE_PC);
|
947
|
+
w->WriteSLEB128(pc_diff);
|
948
|
+
w->Write<uint8_t>(DW_LNS_ADVANCE_LINE);
|
949
|
+
w->WriteSLEB128(line_diff);
|
950
|
+
w->Write<uint8_t>(DW_LNS_COPY);
|
951
|
+
}
|
952
|
+
|
953
|
+
// Increment the pc and line operands.
|
954
|
+
pc += pc_diff;
|
955
|
+
line += line_diff;
|
956
|
+
}
|
957
|
+
// Advance the pc to the end of the routine, since the end sequence opcode
|
958
|
+
// requires this.
|
959
|
+
w->Write<uint8_t>(DW_LNS_ADVANCE_PC);
|
960
|
+
w->WriteSLEB128(desc_->CodeSize() - pc);
|
961
|
+
WriteExtendedOpcode(w, DW_LNE_END_SEQUENCE, 0);
|
962
|
+
total_length.set(static_cast<uint32_t>(w->position() - start));
|
963
|
+
return true;
|
964
|
+
}
|
965
|
+
|
966
|
+
private:
|
967
|
+
void WriteExtendedOpcode(Writer* w,
|
968
|
+
DWARF2ExtendedOpcode op,
|
969
|
+
size_t operands_size) {
|
970
|
+
w->Write<uint8_t>(0);
|
971
|
+
w->WriteULEB128(operands_size + 1);
|
972
|
+
w->Write<uint8_t>(op);
|
973
|
+
}
|
974
|
+
|
975
|
+
static int ComparePCInfo(const GDBJITLineInfo::PCInfo* a,
|
976
|
+
const GDBJITLineInfo::PCInfo* b) {
|
977
|
+
if (a->pc_ == b->pc_) {
|
978
|
+
if (a->is_statement_ != b->is_statement_) {
|
979
|
+
return b->is_statement_ ? +1 : -1;
|
980
|
+
}
|
981
|
+
return 0;
|
982
|
+
} else if (a->pc_ > b->pc_) {
|
983
|
+
return +1;
|
984
|
+
} else {
|
985
|
+
return -1;
|
986
|
+
}
|
987
|
+
}
|
988
|
+
|
989
|
+
CodeDescription* desc_;
|
990
|
+
};
|
991
|
+
|
992
|
+
|
993
|
+
#ifdef V8_TARGET_ARCH_X64
|
994
|
+
|
995
|
+
|
996
|
+
class UnwindInfoSection : public ELFSection {
|
997
|
+
public:
|
998
|
+
explicit UnwindInfoSection(CodeDescription *desc);
|
999
|
+
virtual bool WriteBody(Writer *w);
|
1000
|
+
|
1001
|
+
int WriteCIE(Writer *w);
|
1002
|
+
void WriteFDE(Writer *w, int);
|
1003
|
+
|
1004
|
+
void WriteFDEStateOnEntry(Writer *w);
|
1005
|
+
void WriteFDEStateAfterRBPPush(Writer *w);
|
1006
|
+
void WriteFDEStateAfterRBPSet(Writer *w);
|
1007
|
+
void WriteFDEStateAfterRBPPop(Writer *w);
|
1008
|
+
|
1009
|
+
void WriteLength(Writer *w,
|
1010
|
+
Writer::Slot<uint32_t>* length_slot,
|
1011
|
+
int initial_position);
|
1012
|
+
|
1013
|
+
private:
|
1014
|
+
CodeDescription *desc_;
|
1015
|
+
|
1016
|
+
// DWARF3 Specification, Table 7.23
|
1017
|
+
enum CFIInstructions {
|
1018
|
+
DW_CFA_ADVANCE_LOC = 0x40,
|
1019
|
+
DW_CFA_OFFSET = 0x80,
|
1020
|
+
DW_CFA_RESTORE = 0xC0,
|
1021
|
+
DW_CFA_NOP = 0x00,
|
1022
|
+
DW_CFA_SET_LOC = 0x01,
|
1023
|
+
DW_CFA_ADVANCE_LOC1 = 0x02,
|
1024
|
+
DW_CFA_ADVANCE_LOC2 = 0x03,
|
1025
|
+
DW_CFA_ADVANCE_LOC4 = 0x04,
|
1026
|
+
DW_CFA_OFFSET_EXTENDED = 0x05,
|
1027
|
+
DW_CFA_RESTORE_EXTENDED = 0x06,
|
1028
|
+
DW_CFA_UNDEFINED = 0x07,
|
1029
|
+
DW_CFA_SAME_VALUE = 0x08,
|
1030
|
+
DW_CFA_REGISTER = 0x09,
|
1031
|
+
DW_CFA_REMEMBER_STATE = 0x0A,
|
1032
|
+
DW_CFA_RESTORE_STATE = 0x0B,
|
1033
|
+
DW_CFA_DEF_CFA = 0x0C,
|
1034
|
+
DW_CFA_DEF_CFA_REGISTER = 0x0D,
|
1035
|
+
DW_CFA_DEF_CFA_OFFSET = 0x0E,
|
1036
|
+
|
1037
|
+
DW_CFA_DEF_CFA_EXPRESSION = 0x0F,
|
1038
|
+
DW_CFA_EXPRESSION = 0x10,
|
1039
|
+
DW_CFA_OFFSET_EXTENDED_SF = 0x11,
|
1040
|
+
DW_CFA_DEF_CFA_SF = 0x12,
|
1041
|
+
DW_CFA_DEF_CFA_OFFSET_SF = 0x13,
|
1042
|
+
DW_CFA_VAL_OFFSET = 0x14,
|
1043
|
+
DW_CFA_VAL_OFFSET_SF = 0x15,
|
1044
|
+
DW_CFA_VAL_EXPRESSION = 0x16
|
1045
|
+
};
|
1046
|
+
|
1047
|
+
// System V ABI, AMD64 Supplement, Version 0.99.5, Figure 3.36
|
1048
|
+
enum RegisterMapping {
|
1049
|
+
// Only the relevant ones have been added to reduce clutter.
|
1050
|
+
AMD64_RBP = 6,
|
1051
|
+
AMD64_RSP = 7,
|
1052
|
+
AMD64_RA = 16
|
1053
|
+
};
|
1054
|
+
|
1055
|
+
enum CFIConstants {
|
1056
|
+
CIE_ID = 0,
|
1057
|
+
CIE_VERSION = 1,
|
1058
|
+
CODE_ALIGN_FACTOR = 1,
|
1059
|
+
DATA_ALIGN_FACTOR = 1,
|
1060
|
+
RETURN_ADDRESS_REGISTER = AMD64_RA
|
1061
|
+
};
|
1062
|
+
};
|
1063
|
+
|
1064
|
+
|
1065
|
+
void UnwindInfoSection::WriteLength(Writer *w,
|
1066
|
+
Writer::Slot<uint32_t>* length_slot,
|
1067
|
+
int initial_position) {
|
1068
|
+
uint32_t align = (w->position() - initial_position) % kPointerSize;
|
1069
|
+
|
1070
|
+
if (align != 0) {
|
1071
|
+
for (uint32_t i = 0; i < (kPointerSize - align); i++) {
|
1072
|
+
w->Write<uint8_t>(DW_CFA_NOP);
|
1073
|
+
}
|
1074
|
+
}
|
1075
|
+
|
1076
|
+
ASSERT((w->position() - initial_position) % kPointerSize == 0);
|
1077
|
+
length_slot->set(w->position() - initial_position);
|
1078
|
+
}
|
1079
|
+
|
1080
|
+
|
1081
|
+
UnwindInfoSection::UnwindInfoSection(CodeDescription *desc)
|
1082
|
+
: ELFSection(".eh_frame", TYPE_X86_64_UNWIND, 1), desc_(desc)
|
1083
|
+
{ }
|
1084
|
+
|
1085
|
+
int UnwindInfoSection::WriteCIE(Writer *w) {
|
1086
|
+
Writer::Slot<uint32_t> cie_length_slot = w->CreateSlotHere<uint32_t>();
|
1087
|
+
uint32_t cie_position = w->position();
|
1088
|
+
|
1089
|
+
// Write out the CIE header. Currently no 'common instructions' are
|
1090
|
+
// emitted onto the CIE; every FDE has its own set of instructions.
|
1091
|
+
|
1092
|
+
w->Write<uint32_t>(CIE_ID);
|
1093
|
+
w->Write<uint8_t>(CIE_VERSION);
|
1094
|
+
w->Write<uint8_t>(0); // Null augmentation string.
|
1095
|
+
w->WriteSLEB128(CODE_ALIGN_FACTOR);
|
1096
|
+
w->WriteSLEB128(DATA_ALIGN_FACTOR);
|
1097
|
+
w->Write<uint8_t>(RETURN_ADDRESS_REGISTER);
|
1098
|
+
|
1099
|
+
WriteLength(w, &cie_length_slot, cie_position);
|
1100
|
+
|
1101
|
+
return cie_position;
|
1102
|
+
}
|
1103
|
+
|
1104
|
+
|
1105
|
+
void UnwindInfoSection::WriteFDE(Writer *w, int cie_position) {
|
1106
|
+
// The only FDE for this function. The CFA is the current RBP.
|
1107
|
+
Writer::Slot<uint32_t> fde_length_slot = w->CreateSlotHere<uint32_t>();
|
1108
|
+
int fde_position = w->position();
|
1109
|
+
w->Write<int32_t>(fde_position - cie_position + 4);
|
1110
|
+
|
1111
|
+
w->Write<uintptr_t>(desc_->CodeStart());
|
1112
|
+
w->Write<uintptr_t>(desc_->CodeSize());
|
1113
|
+
|
1114
|
+
WriteFDEStateOnEntry(w);
|
1115
|
+
WriteFDEStateAfterRBPPush(w);
|
1116
|
+
WriteFDEStateAfterRBPSet(w);
|
1117
|
+
WriteFDEStateAfterRBPPop(w);
|
1118
|
+
|
1119
|
+
WriteLength(w, &fde_length_slot, fde_position);
|
1120
|
+
}
|
1121
|
+
|
1122
|
+
|
1123
|
+
void UnwindInfoSection::WriteFDEStateOnEntry(Writer *w) {
|
1124
|
+
// The first state, just after the control has been transferred to the the
|
1125
|
+
// function.
|
1126
|
+
|
1127
|
+
// RBP for this function will be the value of RSP after pushing the RBP
|
1128
|
+
// for the previous function. The previous RBP has not been pushed yet.
|
1129
|
+
w->Write<uint8_t>(DW_CFA_DEF_CFA_SF);
|
1130
|
+
w->WriteULEB128(AMD64_RSP);
|
1131
|
+
w->WriteSLEB128(-kPointerSize);
|
1132
|
+
|
1133
|
+
// The RA is stored at location CFA + kCallerPCOffset. This is an invariant,
|
1134
|
+
// and hence omitted from the next states.
|
1135
|
+
w->Write<uint8_t>(DW_CFA_OFFSET_EXTENDED);
|
1136
|
+
w->WriteULEB128(AMD64_RA);
|
1137
|
+
w->WriteSLEB128(StandardFrameConstants::kCallerPCOffset);
|
1138
|
+
|
1139
|
+
// The RBP of the previous function is still in RBP.
|
1140
|
+
w->Write<uint8_t>(DW_CFA_SAME_VALUE);
|
1141
|
+
w->WriteULEB128(AMD64_RBP);
|
1142
|
+
|
1143
|
+
// Last location described by this entry.
|
1144
|
+
w->Write<uint8_t>(DW_CFA_SET_LOC);
|
1145
|
+
w->Write<uint64_t>(
|
1146
|
+
desc_->GetStackStateStartAddress(CodeDescription::POST_RBP_PUSH));
|
1147
|
+
}
|
1148
|
+
|
1149
|
+
|
1150
|
+
void UnwindInfoSection::WriteFDEStateAfterRBPPush(Writer *w) {
|
1151
|
+
// The second state, just after RBP has been pushed.
|
1152
|
+
|
1153
|
+
// RBP / CFA for this function is now the current RSP, so just set the
|
1154
|
+
// offset from the previous rule (from -8) to 0.
|
1155
|
+
w->Write<uint8_t>(DW_CFA_DEF_CFA_OFFSET);
|
1156
|
+
w->WriteULEB128(0);
|
1157
|
+
|
1158
|
+
// The previous RBP is stored at CFA + kCallerFPOffset. This is an invariant
|
1159
|
+
// in this and the next state, and hence omitted in the next state.
|
1160
|
+
w->Write<uint8_t>(DW_CFA_OFFSET_EXTENDED);
|
1161
|
+
w->WriteULEB128(AMD64_RBP);
|
1162
|
+
w->WriteSLEB128(StandardFrameConstants::kCallerFPOffset);
|
1163
|
+
|
1164
|
+
// Last location described by this entry.
|
1165
|
+
w->Write<uint8_t>(DW_CFA_SET_LOC);
|
1166
|
+
w->Write<uint64_t>(
|
1167
|
+
desc_->GetStackStateStartAddress(CodeDescription::POST_RBP_SET));
|
1168
|
+
}
|
1169
|
+
|
1170
|
+
|
1171
|
+
void UnwindInfoSection::WriteFDEStateAfterRBPSet(Writer *w) {
|
1172
|
+
// The third state, after the RBP has been set.
|
1173
|
+
|
1174
|
+
// The CFA can now directly be set to RBP.
|
1175
|
+
w->Write<uint8_t>(DW_CFA_DEF_CFA);
|
1176
|
+
w->WriteULEB128(AMD64_RBP);
|
1177
|
+
w->WriteULEB128(0);
|
1178
|
+
|
1179
|
+
// Last location described by this entry.
|
1180
|
+
w->Write<uint8_t>(DW_CFA_SET_LOC);
|
1181
|
+
w->Write<uint64_t>(
|
1182
|
+
desc_->GetStackStateStartAddress(CodeDescription::POST_RBP_POP));
|
1183
|
+
}
|
1184
|
+
|
1185
|
+
|
1186
|
+
void UnwindInfoSection::WriteFDEStateAfterRBPPop(Writer *w) {
|
1187
|
+
// The fourth (final) state. The RBP has been popped (just before issuing a
|
1188
|
+
// return).
|
1189
|
+
|
1190
|
+
// The CFA can is now calculated in the same way as in the first state.
|
1191
|
+
w->Write<uint8_t>(DW_CFA_DEF_CFA_SF);
|
1192
|
+
w->WriteULEB128(AMD64_RSP);
|
1193
|
+
w->WriteSLEB128(-kPointerSize);
|
1194
|
+
|
1195
|
+
// The RBP
|
1196
|
+
w->Write<uint8_t>(DW_CFA_OFFSET_EXTENDED);
|
1197
|
+
w->WriteULEB128(AMD64_RBP);
|
1198
|
+
w->WriteSLEB128(StandardFrameConstants::kCallerFPOffset);
|
1199
|
+
|
1200
|
+
// Last location described by this entry.
|
1201
|
+
w->Write<uint8_t>(DW_CFA_SET_LOC);
|
1202
|
+
w->Write<uint64_t>(desc_->CodeEnd());
|
1203
|
+
}
|
1204
|
+
|
1205
|
+
|
1206
|
+
bool UnwindInfoSection::WriteBody(Writer *w) {
|
1207
|
+
uint32_t cie_position = WriteCIE(w);
|
1208
|
+
WriteFDE(w, cie_position);
|
1209
|
+
return true;
|
1210
|
+
}
|
1211
|
+
|
1212
|
+
|
1213
|
+
#endif // V8_TARGET_ARCH_X64
|
1214
|
+
|
1215
|
+
|
1216
|
+
static void CreateDWARFSections(CodeDescription* desc, ELF* elf) {
|
1217
|
+
if (desc->IsLineInfoAvailable()) {
|
1218
|
+
elf->AddSection(new DebugInfoSection(desc));
|
1219
|
+
elf->AddSection(new DebugAbbrevSection);
|
1220
|
+
elf->AddSection(new DebugLineSection(desc));
|
1221
|
+
}
|
1222
|
+
#ifdef V8_TARGET_ARCH_X64
|
1223
|
+
elf->AddSection(new UnwindInfoSection(desc));
|
1224
|
+
#endif
|
1225
|
+
}
|
1226
|
+
|
1227
|
+
|
1228
|
+
// -------------------------------------------------------------------
|
1229
|
+
// Binary GDB JIT Interface as described in
|
1230
|
+
// http://sourceware.org/gdb/onlinedocs/gdb/Declarations.html
|
1231
|
+
extern "C" {
|
1232
|
+
typedef enum {
|
1233
|
+
JIT_NOACTION = 0,
|
1234
|
+
JIT_REGISTER_FN,
|
1235
|
+
JIT_UNREGISTER_FN
|
1236
|
+
} JITAction;
|
1237
|
+
|
1238
|
+
struct JITCodeEntry {
|
1239
|
+
JITCodeEntry* next_;
|
1240
|
+
JITCodeEntry* prev_;
|
1241
|
+
Address symfile_addr_;
|
1242
|
+
uint64_t symfile_size_;
|
1243
|
+
};
|
1244
|
+
|
1245
|
+
struct JITDescriptor {
|
1246
|
+
uint32_t version_;
|
1247
|
+
uint32_t action_flag_;
|
1248
|
+
JITCodeEntry *relevant_entry_;
|
1249
|
+
JITCodeEntry *first_entry_;
|
1250
|
+
};
|
1251
|
+
|
1252
|
+
// GDB will place breakpoint into this function.
|
1253
|
+
// To prevent GCC from inlining or removing it we place noinline attribute
|
1254
|
+
// and inline assembler statement inside.
|
1255
|
+
void __attribute__((noinline)) __jit_debug_register_code() {
|
1256
|
+
__asm__("");
|
1257
|
+
}
|
1258
|
+
|
1259
|
+
// GDB will inspect contents of this descriptor.
|
1260
|
+
// Static initialization is necessary to prevent GDB from seeing
|
1261
|
+
// uninitialized descriptor.
|
1262
|
+
JITDescriptor __jit_debug_descriptor = { 1, 0, 0, 0 };
|
1263
|
+
}
|
1264
|
+
|
1265
|
+
|
1266
|
+
static JITCodeEntry* CreateCodeEntry(Address symfile_addr,
|
1267
|
+
uintptr_t symfile_size) {
|
1268
|
+
JITCodeEntry* entry = static_cast<JITCodeEntry*>(
|
1269
|
+
malloc(sizeof(JITCodeEntry) + symfile_size));
|
1270
|
+
|
1271
|
+
entry->symfile_addr_ = reinterpret_cast<Address>(entry + 1);
|
1272
|
+
entry->symfile_size_ = symfile_size;
|
1273
|
+
memcpy(entry->symfile_addr_, symfile_addr, symfile_size);
|
1274
|
+
|
1275
|
+
entry->prev_ = entry->next_ = NULL;
|
1276
|
+
|
1277
|
+
return entry;
|
1278
|
+
}
|
1279
|
+
|
1280
|
+
|
1281
|
+
static void DestroyCodeEntry(JITCodeEntry* entry) {
|
1282
|
+
free(entry);
|
1283
|
+
}
|
1284
|
+
|
1285
|
+
|
1286
|
+
static void RegisterCodeEntry(JITCodeEntry* entry) {
|
1287
|
+
#if defined(DEBUG) && !defined(WIN32)
|
1288
|
+
static int file_num = 0;
|
1289
|
+
if (FLAG_gdbjit_dump) {
|
1290
|
+
static const int kMaxFileNameSize = 64;
|
1291
|
+
static const char* kElfFilePrefix = "/tmp/elfdump";
|
1292
|
+
static const char* kObjFileExt = ".o";
|
1293
|
+
char file_name[64];
|
1294
|
+
|
1295
|
+
OS::SNPrintF(Vector<char>(file_name, kMaxFileNameSize), "%s%d%s",
|
1296
|
+
kElfFilePrefix, file_num++, kObjFileExt);
|
1297
|
+
WriteBytes(file_name, entry->symfile_addr_, entry->symfile_size_);
|
1298
|
+
}
|
1299
|
+
#endif
|
1300
|
+
|
1301
|
+
entry->next_ = __jit_debug_descriptor.first_entry_;
|
1302
|
+
if (entry->next_ != NULL) entry->next_->prev_ = entry;
|
1303
|
+
__jit_debug_descriptor.first_entry_ =
|
1304
|
+
__jit_debug_descriptor.relevant_entry_ = entry;
|
1305
|
+
|
1306
|
+
__jit_debug_descriptor.action_flag_ = JIT_REGISTER_FN;
|
1307
|
+
__jit_debug_register_code();
|
1308
|
+
}
|
1309
|
+
|
1310
|
+
|
1311
|
+
static void UnregisterCodeEntry(JITCodeEntry* entry) {
|
1312
|
+
if (entry->prev_ != NULL) {
|
1313
|
+
entry->prev_->next_ = entry->next_;
|
1314
|
+
} else {
|
1315
|
+
__jit_debug_descriptor.first_entry_ = entry->next_;
|
1316
|
+
}
|
1317
|
+
|
1318
|
+
if (entry->next_ != NULL) {
|
1319
|
+
entry->next_->prev_ = entry->prev_;
|
1320
|
+
}
|
1321
|
+
|
1322
|
+
__jit_debug_descriptor.relevant_entry_ = entry;
|
1323
|
+
__jit_debug_descriptor.action_flag_ = JIT_UNREGISTER_FN;
|
1324
|
+
__jit_debug_register_code();
|
1325
|
+
}
|
1326
|
+
|
1327
|
+
|
1328
|
+
static JITCodeEntry* CreateELFObject(CodeDescription* desc) {
|
1329
|
+
ZoneScope zone_scope(DELETE_ON_EXIT);
|
1330
|
+
|
1331
|
+
ELF elf;
|
1332
|
+
Writer w(&elf);
|
1333
|
+
|
1334
|
+
int text_section_index = elf.AddSection(
|
1335
|
+
new FullHeaderELFSection(".text",
|
1336
|
+
ELFSection::TYPE_NOBITS,
|
1337
|
+
kCodeAlignment,
|
1338
|
+
desc->CodeStart(),
|
1339
|
+
0,
|
1340
|
+
desc->CodeSize(),
|
1341
|
+
ELFSection::FLAG_ALLOC | ELFSection::FLAG_EXEC));
|
1342
|
+
|
1343
|
+
CreateSymbolsTable(desc, &elf, text_section_index);
|
1344
|
+
|
1345
|
+
CreateDWARFSections(desc, &elf);
|
1346
|
+
|
1347
|
+
elf.Write(&w);
|
1348
|
+
|
1349
|
+
return CreateCodeEntry(w.buffer(), w.position());
|
1350
|
+
}
|
1351
|
+
|
1352
|
+
|
1353
|
+
static bool SameCodeObjects(void* key1, void* key2) {
|
1354
|
+
return key1 == key2;
|
1355
|
+
}
|
1356
|
+
|
1357
|
+
|
1358
|
+
static HashMap* GetEntries() {
|
1359
|
+
static HashMap* entries = NULL;
|
1360
|
+
if (entries == NULL) {
|
1361
|
+
entries = new HashMap(&SameCodeObjects);
|
1362
|
+
}
|
1363
|
+
return entries;
|
1364
|
+
}
|
1365
|
+
|
1366
|
+
|
1367
|
+
static uint32_t HashForCodeObject(Code* code) {
|
1368
|
+
static const uintptr_t kGoldenRatio = 2654435761u;
|
1369
|
+
uintptr_t hash = reinterpret_cast<uintptr_t>(code->address());
|
1370
|
+
return static_cast<uint32_t>((hash >> kCodeAlignmentBits) * kGoldenRatio);
|
1371
|
+
}
|
1372
|
+
|
1373
|
+
|
1374
|
+
static const intptr_t kLineInfoTag = 0x1;
|
1375
|
+
|
1376
|
+
|
1377
|
+
static bool IsLineInfoTagged(void* ptr) {
|
1378
|
+
return 0 != (reinterpret_cast<intptr_t>(ptr) & kLineInfoTag);
|
1379
|
+
}
|
1380
|
+
|
1381
|
+
|
1382
|
+
static void* TagLineInfo(GDBJITLineInfo* ptr) {
|
1383
|
+
return reinterpret_cast<void*>(
|
1384
|
+
reinterpret_cast<intptr_t>(ptr) | kLineInfoTag);
|
1385
|
+
}
|
1386
|
+
|
1387
|
+
|
1388
|
+
static GDBJITLineInfo* UntagLineInfo(void* ptr) {
|
1389
|
+
return reinterpret_cast<GDBJITLineInfo*>(
|
1390
|
+
reinterpret_cast<intptr_t>(ptr) & ~kLineInfoTag);
|
1391
|
+
}
|
1392
|
+
|
1393
|
+
|
1394
|
+
void GDBJITInterface::AddCode(Handle<String> name,
|
1395
|
+
Handle<Script> script,
|
1396
|
+
Handle<Code> code) {
|
1397
|
+
if (!FLAG_gdbjit) return;
|
1398
|
+
|
1399
|
+
// Force initialization of line_ends array.
|
1400
|
+
GetScriptLineNumber(script, 0);
|
1401
|
+
|
1402
|
+
if (!name.is_null()) {
|
1403
|
+
SmartPointer<char> name_cstring = name->ToCString(DISALLOW_NULLS);
|
1404
|
+
AddCode(*name_cstring, *code, GDBJITInterface::FUNCTION, *script);
|
1405
|
+
} else {
|
1406
|
+
AddCode("", *code, GDBJITInterface::FUNCTION, *script);
|
1407
|
+
}
|
1408
|
+
}
|
1409
|
+
|
1410
|
+
static void AddUnwindInfo(CodeDescription *desc) {
|
1411
|
+
#ifdef V8_TARGET_ARCH_X64
|
1412
|
+
if (desc->tag() == GDBJITInterface::FUNCTION) {
|
1413
|
+
// To avoid propagating unwinding information through
|
1414
|
+
// compilation pipeline we use an approximation.
|
1415
|
+
// For most use cases this should not affect usability.
|
1416
|
+
static const int kFramePointerPushOffset = 1;
|
1417
|
+
static const int kFramePointerSetOffset = 4;
|
1418
|
+
static const int kFramePointerPopOffset = -3;
|
1419
|
+
|
1420
|
+
uintptr_t frame_pointer_push_address =
|
1421
|
+
desc->CodeStart() + kFramePointerPushOffset;
|
1422
|
+
|
1423
|
+
uintptr_t frame_pointer_set_address =
|
1424
|
+
desc->CodeStart() + kFramePointerSetOffset;
|
1425
|
+
|
1426
|
+
uintptr_t frame_pointer_pop_address =
|
1427
|
+
desc->CodeEnd() + kFramePointerPopOffset;
|
1428
|
+
|
1429
|
+
desc->SetStackStateStartAddress(CodeDescription::POST_RBP_PUSH,
|
1430
|
+
frame_pointer_push_address);
|
1431
|
+
desc->SetStackStateStartAddress(CodeDescription::POST_RBP_SET,
|
1432
|
+
frame_pointer_set_address);
|
1433
|
+
desc->SetStackStateStartAddress(CodeDescription::POST_RBP_POP,
|
1434
|
+
frame_pointer_pop_address);
|
1435
|
+
} else {
|
1436
|
+
desc->SetStackStateStartAddress(CodeDescription::POST_RBP_PUSH,
|
1437
|
+
desc->CodeStart());
|
1438
|
+
desc->SetStackStateStartAddress(CodeDescription::POST_RBP_SET,
|
1439
|
+
desc->CodeStart());
|
1440
|
+
desc->SetStackStateStartAddress(CodeDescription::POST_RBP_POP,
|
1441
|
+
desc->CodeEnd());
|
1442
|
+
}
|
1443
|
+
#endif // V8_TARGET_ARCH_X64
|
1444
|
+
}
|
1445
|
+
|
1446
|
+
|
1447
|
+
void GDBJITInterface::AddCode(const char* name,
|
1448
|
+
Code* code,
|
1449
|
+
GDBJITInterface::CodeTag tag,
|
1450
|
+
Script* script) {
|
1451
|
+
if (!FLAG_gdbjit) return;
|
1452
|
+
AssertNoAllocation no_gc;
|
1453
|
+
|
1454
|
+
HashMap::Entry* e = GetEntries()->Lookup(code, HashForCodeObject(code), true);
|
1455
|
+
if (e->value != NULL && !IsLineInfoTagged(e->value)) return;
|
1456
|
+
|
1457
|
+
GDBJITLineInfo* lineinfo = UntagLineInfo(e->value);
|
1458
|
+
CodeDescription code_desc(name,
|
1459
|
+
code,
|
1460
|
+
script != NULL ? Handle<Script>(script)
|
1461
|
+
: Handle<Script>(),
|
1462
|
+
lineinfo,
|
1463
|
+
tag);
|
1464
|
+
|
1465
|
+
if (!FLAG_gdbjit_full && !code_desc.IsLineInfoAvailable()) {
|
1466
|
+
delete lineinfo;
|
1467
|
+
GetEntries()->Remove(code, HashForCodeObject(code));
|
1468
|
+
return;
|
1469
|
+
}
|
1470
|
+
|
1471
|
+
AddUnwindInfo(&code_desc);
|
1472
|
+
JITCodeEntry* entry = CreateELFObject(&code_desc);
|
1473
|
+
ASSERT(!IsLineInfoTagged(entry));
|
1474
|
+
|
1475
|
+
delete lineinfo;
|
1476
|
+
e->value = entry;
|
1477
|
+
|
1478
|
+
RegisterCodeEntry(entry);
|
1479
|
+
}
|
1480
|
+
|
1481
|
+
|
1482
|
+
void GDBJITInterface::AddCode(GDBJITInterface::CodeTag tag,
|
1483
|
+
const char* name,
|
1484
|
+
Code* code) {
|
1485
|
+
if (!FLAG_gdbjit) return;
|
1486
|
+
|
1487
|
+
EmbeddedVector<char, 256> buffer;
|
1488
|
+
StringBuilder builder(buffer.start(), buffer.length());
|
1489
|
+
|
1490
|
+
builder.AddString(Tag2String(tag));
|
1491
|
+
if ((name != NULL) && (*name != '\0')) {
|
1492
|
+
builder.AddString(": ");
|
1493
|
+
builder.AddString(name);
|
1494
|
+
} else {
|
1495
|
+
builder.AddFormatted(": code object %p", static_cast<void*>(code));
|
1496
|
+
}
|
1497
|
+
|
1498
|
+
AddCode(builder.Finalize(), code, tag);
|
1499
|
+
}
|
1500
|
+
|
1501
|
+
|
1502
|
+
void GDBJITInterface::AddCode(GDBJITInterface::CodeTag tag,
|
1503
|
+
String* name,
|
1504
|
+
Code* code) {
|
1505
|
+
if (!FLAG_gdbjit) return;
|
1506
|
+
AddCode(tag, name != NULL ? *name->ToCString(DISALLOW_NULLS) : NULL, code);
|
1507
|
+
}
|
1508
|
+
|
1509
|
+
|
1510
|
+
void GDBJITInterface::AddCode(GDBJITInterface::CodeTag tag, Code* code) {
|
1511
|
+
if (!FLAG_gdbjit) return;
|
1512
|
+
|
1513
|
+
AddCode(tag, "", code);
|
1514
|
+
}
|
1515
|
+
|
1516
|
+
|
1517
|
+
void GDBJITInterface::RemoveCode(Code* code) {
|
1518
|
+
if (!FLAG_gdbjit) return;
|
1519
|
+
|
1520
|
+
HashMap::Entry* e = GetEntries()->Lookup(code,
|
1521
|
+
HashForCodeObject(code),
|
1522
|
+
false);
|
1523
|
+
if (e == NULL) return;
|
1524
|
+
|
1525
|
+
if (IsLineInfoTagged(e->value)) {
|
1526
|
+
delete UntagLineInfo(e->value);
|
1527
|
+
} else {
|
1528
|
+
JITCodeEntry* entry = static_cast<JITCodeEntry*>(e->value);
|
1529
|
+
UnregisterCodeEntry(entry);
|
1530
|
+
DestroyCodeEntry(entry);
|
1531
|
+
}
|
1532
|
+
e->value = NULL;
|
1533
|
+
GetEntries()->Remove(code, HashForCodeObject(code));
|
1534
|
+
}
|
1535
|
+
|
1536
|
+
|
1537
|
+
void GDBJITInterface::RegisterDetailedLineInfo(Code* code,
|
1538
|
+
GDBJITLineInfo* line_info) {
|
1539
|
+
ASSERT(!IsLineInfoTagged(line_info));
|
1540
|
+
HashMap::Entry* e = GetEntries()->Lookup(code, HashForCodeObject(code), true);
|
1541
|
+
ASSERT(e->value == NULL);
|
1542
|
+
e->value = TagLineInfo(line_info);
|
1543
|
+
}
|
1544
|
+
|
1545
|
+
|
1546
|
+
} } // namespace v8::internal
|
1547
|
+
#endif
|