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,399 @@
|
|
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
|
+
// Platform specific code for POSIX goes here. This is not a platform on its
|
29
|
+
// own but contains the parts which are the same across POSIX platforms Linux,
|
30
|
+
// Mac OS, FreeBSD and OpenBSD.
|
31
|
+
|
32
|
+
#include <unistd.h>
|
33
|
+
#include <errno.h>
|
34
|
+
#include <time.h>
|
35
|
+
|
36
|
+
#include <sys/socket.h>
|
37
|
+
#include <sys/resource.h>
|
38
|
+
#include <sys/time.h>
|
39
|
+
#include <sys/types.h>
|
40
|
+
|
41
|
+
#include <arpa/inet.h>
|
42
|
+
#include <netinet/in.h>
|
43
|
+
#include <netdb.h>
|
44
|
+
|
45
|
+
#if defined(ANDROID)
|
46
|
+
#define LOG_TAG "v8"
|
47
|
+
#include <utils/Log.h> // LOG_PRI_VA
|
48
|
+
#endif
|
49
|
+
|
50
|
+
#include "v8.h"
|
51
|
+
|
52
|
+
#include "platform.h"
|
53
|
+
|
54
|
+
namespace v8 {
|
55
|
+
namespace internal {
|
56
|
+
|
57
|
+
// ----------------------------------------------------------------------------
|
58
|
+
// Math functions
|
59
|
+
|
60
|
+
double modulo(double x, double y) {
|
61
|
+
return fmod(x, y);
|
62
|
+
}
|
63
|
+
|
64
|
+
|
65
|
+
double OS::nan_value() {
|
66
|
+
// NAN from math.h is defined in C99 and not in POSIX.
|
67
|
+
return NAN;
|
68
|
+
}
|
69
|
+
|
70
|
+
|
71
|
+
// ----------------------------------------------------------------------------
|
72
|
+
// POSIX date/time support.
|
73
|
+
//
|
74
|
+
|
75
|
+
int OS::GetUserTime(uint32_t* secs, uint32_t* usecs) {
|
76
|
+
struct rusage usage;
|
77
|
+
|
78
|
+
if (getrusage(RUSAGE_SELF, &usage) < 0) return -1;
|
79
|
+
*secs = usage.ru_utime.tv_sec;
|
80
|
+
*usecs = usage.ru_utime.tv_usec;
|
81
|
+
return 0;
|
82
|
+
}
|
83
|
+
|
84
|
+
|
85
|
+
double OS::TimeCurrentMillis() {
|
86
|
+
struct timeval tv;
|
87
|
+
if (gettimeofday(&tv, NULL) < 0) return 0.0;
|
88
|
+
return (static_cast<double>(tv.tv_sec) * 1000) +
|
89
|
+
(static_cast<double>(tv.tv_usec) / 1000);
|
90
|
+
}
|
91
|
+
|
92
|
+
|
93
|
+
int64_t OS::Ticks() {
|
94
|
+
// gettimeofday has microsecond resolution.
|
95
|
+
struct timeval tv;
|
96
|
+
if (gettimeofday(&tv, NULL) < 0)
|
97
|
+
return 0;
|
98
|
+
return (static_cast<int64_t>(tv.tv_sec) * 1000000) + tv.tv_usec;
|
99
|
+
}
|
100
|
+
|
101
|
+
|
102
|
+
double OS::DaylightSavingsOffset(double time) {
|
103
|
+
if (isnan(time)) return nan_value();
|
104
|
+
time_t tv = static_cast<time_t>(floor(time/msPerSecond));
|
105
|
+
struct tm* t = localtime(&tv);
|
106
|
+
if (NULL == t) return nan_value();
|
107
|
+
return t->tm_isdst > 0 ? 3600 * msPerSecond : 0;
|
108
|
+
}
|
109
|
+
|
110
|
+
|
111
|
+
int OS::GetLastError() {
|
112
|
+
return errno;
|
113
|
+
}
|
114
|
+
|
115
|
+
|
116
|
+
// ----------------------------------------------------------------------------
|
117
|
+
// POSIX stdio support.
|
118
|
+
//
|
119
|
+
|
120
|
+
FILE* OS::FOpen(const char* path, const char* mode) {
|
121
|
+
return fopen(path, mode);
|
122
|
+
}
|
123
|
+
|
124
|
+
|
125
|
+
bool OS::Remove(const char* path) {
|
126
|
+
return (remove(path) == 0);
|
127
|
+
}
|
128
|
+
|
129
|
+
|
130
|
+
const char* OS::LogFileOpenMode = "w";
|
131
|
+
|
132
|
+
|
133
|
+
void OS::Print(const char* format, ...) {
|
134
|
+
va_list args;
|
135
|
+
va_start(args, format);
|
136
|
+
VPrint(format, args);
|
137
|
+
va_end(args);
|
138
|
+
}
|
139
|
+
|
140
|
+
|
141
|
+
void OS::VPrint(const char* format, va_list args) {
|
142
|
+
#if defined(ANDROID)
|
143
|
+
LOG_PRI_VA(ANDROID_LOG_INFO, LOG_TAG, format, args);
|
144
|
+
#else
|
145
|
+
vprintf(format, args);
|
146
|
+
#endif
|
147
|
+
}
|
148
|
+
|
149
|
+
|
150
|
+
void OS::FPrint(FILE* out, const char* format, ...) {
|
151
|
+
va_list args;
|
152
|
+
va_start(args, format);
|
153
|
+
VFPrint(out, format, args);
|
154
|
+
va_end(args);
|
155
|
+
}
|
156
|
+
|
157
|
+
|
158
|
+
void OS::VFPrint(FILE* out, const char* format, va_list args) {
|
159
|
+
#if defined(ANDROID)
|
160
|
+
LOG_PRI_VA(ANDROID_LOG_INFO, LOG_TAG, format, args);
|
161
|
+
#else
|
162
|
+
vfprintf(out, format, args);
|
163
|
+
#endif
|
164
|
+
}
|
165
|
+
|
166
|
+
|
167
|
+
void OS::PrintError(const char* format, ...) {
|
168
|
+
va_list args;
|
169
|
+
va_start(args, format);
|
170
|
+
VPrintError(format, args);
|
171
|
+
va_end(args);
|
172
|
+
}
|
173
|
+
|
174
|
+
|
175
|
+
void OS::VPrintError(const char* format, va_list args) {
|
176
|
+
#if defined(ANDROID)
|
177
|
+
LOG_PRI_VA(ANDROID_LOG_ERROR, LOG_TAG, format, args);
|
178
|
+
#else
|
179
|
+
vfprintf(stderr, format, args);
|
180
|
+
#endif
|
181
|
+
}
|
182
|
+
|
183
|
+
|
184
|
+
int OS::SNPrintF(Vector<char> str, const char* format, ...) {
|
185
|
+
va_list args;
|
186
|
+
va_start(args, format);
|
187
|
+
int result = VSNPrintF(str, format, args);
|
188
|
+
va_end(args);
|
189
|
+
return result;
|
190
|
+
}
|
191
|
+
|
192
|
+
|
193
|
+
int OS::VSNPrintF(Vector<char> str,
|
194
|
+
const char* format,
|
195
|
+
va_list args) {
|
196
|
+
int n = vsnprintf(str.start(), str.length(), format, args);
|
197
|
+
if (n < 0 || n >= str.length()) {
|
198
|
+
// If the length is zero, the assignment fails.
|
199
|
+
if (str.length() > 0)
|
200
|
+
str[str.length() - 1] = '\0';
|
201
|
+
return -1;
|
202
|
+
} else {
|
203
|
+
return n;
|
204
|
+
}
|
205
|
+
}
|
206
|
+
|
207
|
+
|
208
|
+
// ----------------------------------------------------------------------------
|
209
|
+
// POSIX string support.
|
210
|
+
//
|
211
|
+
|
212
|
+
char* OS::StrChr(char* str, int c) {
|
213
|
+
return strchr(str, c);
|
214
|
+
}
|
215
|
+
|
216
|
+
|
217
|
+
void OS::StrNCpy(Vector<char> dest, const char* src, size_t n) {
|
218
|
+
strncpy(dest.start(), src, n);
|
219
|
+
}
|
220
|
+
|
221
|
+
|
222
|
+
// ----------------------------------------------------------------------------
|
223
|
+
// POSIX socket support.
|
224
|
+
//
|
225
|
+
|
226
|
+
class POSIXSocket : public Socket {
|
227
|
+
public:
|
228
|
+
explicit POSIXSocket() {
|
229
|
+
// Create the socket.
|
230
|
+
socket_ = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
|
231
|
+
if (IsValid()) {
|
232
|
+
// Allow rapid reuse.
|
233
|
+
static const int kOn = 1;
|
234
|
+
int ret = setsockopt(socket_, SOL_SOCKET, SO_REUSEADDR,
|
235
|
+
&kOn, sizeof(kOn));
|
236
|
+
ASSERT(ret == 0);
|
237
|
+
USE(ret);
|
238
|
+
}
|
239
|
+
}
|
240
|
+
explicit POSIXSocket(int socket): socket_(socket) { }
|
241
|
+
virtual ~POSIXSocket() { Shutdown(); }
|
242
|
+
|
243
|
+
// Server initialization.
|
244
|
+
bool Bind(const int port);
|
245
|
+
bool Listen(int backlog) const;
|
246
|
+
Socket* Accept() const;
|
247
|
+
|
248
|
+
// Client initialization.
|
249
|
+
bool Connect(const char* host, const char* port);
|
250
|
+
|
251
|
+
// Shutdown socket for both read and write.
|
252
|
+
bool Shutdown();
|
253
|
+
|
254
|
+
// Data Transimission
|
255
|
+
int Send(const char* data, int len) const;
|
256
|
+
int Receive(char* data, int len) const;
|
257
|
+
|
258
|
+
bool SetReuseAddress(bool reuse_address);
|
259
|
+
|
260
|
+
bool IsValid() const { return socket_ != -1; }
|
261
|
+
|
262
|
+
private:
|
263
|
+
int socket_;
|
264
|
+
};
|
265
|
+
|
266
|
+
|
267
|
+
bool POSIXSocket::Bind(const int port) {
|
268
|
+
if (!IsValid()) {
|
269
|
+
return false;
|
270
|
+
}
|
271
|
+
|
272
|
+
sockaddr_in addr;
|
273
|
+
memset(&addr, 0, sizeof(addr));
|
274
|
+
addr.sin_family = AF_INET;
|
275
|
+
addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
|
276
|
+
addr.sin_port = htons(port);
|
277
|
+
int status = bind(socket_,
|
278
|
+
BitCast<struct sockaddr *>(&addr),
|
279
|
+
sizeof(addr));
|
280
|
+
return status == 0;
|
281
|
+
}
|
282
|
+
|
283
|
+
|
284
|
+
bool POSIXSocket::Listen(int backlog) const {
|
285
|
+
if (!IsValid()) {
|
286
|
+
return false;
|
287
|
+
}
|
288
|
+
|
289
|
+
int status = listen(socket_, backlog);
|
290
|
+
return status == 0;
|
291
|
+
}
|
292
|
+
|
293
|
+
|
294
|
+
Socket* POSIXSocket::Accept() const {
|
295
|
+
if (!IsValid()) {
|
296
|
+
return NULL;
|
297
|
+
}
|
298
|
+
|
299
|
+
int socket = accept(socket_, NULL, NULL);
|
300
|
+
if (socket == -1) {
|
301
|
+
return NULL;
|
302
|
+
} else {
|
303
|
+
return new POSIXSocket(socket);
|
304
|
+
}
|
305
|
+
}
|
306
|
+
|
307
|
+
|
308
|
+
bool POSIXSocket::Connect(const char* host, const char* port) {
|
309
|
+
if (!IsValid()) {
|
310
|
+
return false;
|
311
|
+
}
|
312
|
+
|
313
|
+
// Lookup host and port.
|
314
|
+
struct addrinfo *result = NULL;
|
315
|
+
struct addrinfo hints;
|
316
|
+
memset(&hints, 0, sizeof(addrinfo));
|
317
|
+
hints.ai_family = AF_INET;
|
318
|
+
hints.ai_socktype = SOCK_STREAM;
|
319
|
+
hints.ai_protocol = IPPROTO_TCP;
|
320
|
+
int status = getaddrinfo(host, port, &hints, &result);
|
321
|
+
if (status != 0) {
|
322
|
+
return false;
|
323
|
+
}
|
324
|
+
|
325
|
+
// Connect.
|
326
|
+
status = connect(socket_, result->ai_addr, result->ai_addrlen);
|
327
|
+
freeaddrinfo(result);
|
328
|
+
return status == 0;
|
329
|
+
}
|
330
|
+
|
331
|
+
|
332
|
+
bool POSIXSocket::Shutdown() {
|
333
|
+
if (IsValid()) {
|
334
|
+
// Shutdown socket for both read and write.
|
335
|
+
int status = shutdown(socket_, SHUT_RDWR);
|
336
|
+
close(socket_);
|
337
|
+
socket_ = -1;
|
338
|
+
return status == 0;
|
339
|
+
}
|
340
|
+
return true;
|
341
|
+
}
|
342
|
+
|
343
|
+
|
344
|
+
int POSIXSocket::Send(const char* data, int len) const {
|
345
|
+
int status = send(socket_, data, len, 0);
|
346
|
+
return status;
|
347
|
+
}
|
348
|
+
|
349
|
+
|
350
|
+
int POSIXSocket::Receive(char* data, int len) const {
|
351
|
+
int status = recv(socket_, data, len, 0);
|
352
|
+
return status;
|
353
|
+
}
|
354
|
+
|
355
|
+
|
356
|
+
bool POSIXSocket::SetReuseAddress(bool reuse_address) {
|
357
|
+
int on = reuse_address ? 1 : 0;
|
358
|
+
int status = setsockopt(socket_, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
|
359
|
+
return status == 0;
|
360
|
+
}
|
361
|
+
|
362
|
+
|
363
|
+
bool Socket::Setup() {
|
364
|
+
// Nothing to do on POSIX.
|
365
|
+
return true;
|
366
|
+
}
|
367
|
+
|
368
|
+
|
369
|
+
int Socket::LastError() {
|
370
|
+
return errno;
|
371
|
+
}
|
372
|
+
|
373
|
+
|
374
|
+
uint16_t Socket::HToN(uint16_t value) {
|
375
|
+
return htons(value);
|
376
|
+
}
|
377
|
+
|
378
|
+
|
379
|
+
uint16_t Socket::NToH(uint16_t value) {
|
380
|
+
return ntohs(value);
|
381
|
+
}
|
382
|
+
|
383
|
+
|
384
|
+
uint32_t Socket::HToN(uint32_t value) {
|
385
|
+
return htonl(value);
|
386
|
+
}
|
387
|
+
|
388
|
+
|
389
|
+
uint32_t Socket::NToH(uint32_t value) {
|
390
|
+
return ntohl(value);
|
391
|
+
}
|
392
|
+
|
393
|
+
|
394
|
+
Socket* OS::CreateSocket() {
|
395
|
+
return new POSIXSocket();
|
396
|
+
}
|
397
|
+
|
398
|
+
|
399
|
+
} } // namespace v8::internal
|
@@ -0,0 +1,714 @@
|
|
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
|
+
// Platform specific code for Solaris 10 goes here. For the POSIX comaptible
|
29
|
+
// parts the implementation is in platform-posix.cc.
|
30
|
+
|
31
|
+
#ifdef __sparc
|
32
|
+
# error "V8 does not support the SPARC CPU architecture."
|
33
|
+
#endif
|
34
|
+
|
35
|
+
#include <sys/stack.h> // for stack alignment
|
36
|
+
#include <unistd.h> // getpagesize(), usleep()
|
37
|
+
#include <sys/mman.h> // mmap()
|
38
|
+
#include <ucontext.h> // walkstack(), getcontext()
|
39
|
+
#include <dlfcn.h> // dladdr
|
40
|
+
#include <pthread.h>
|
41
|
+
#include <sched.h> // for sched_yield
|
42
|
+
#include <semaphore.h>
|
43
|
+
#include <time.h>
|
44
|
+
#include <sys/time.h> // gettimeofday(), timeradd()
|
45
|
+
#include <errno.h>
|
46
|
+
#include <ieeefp.h> // finite()
|
47
|
+
#include <signal.h> // sigemptyset(), etc
|
48
|
+
#include <sys/kdi_regs.h>
|
49
|
+
|
50
|
+
|
51
|
+
#undef MAP_TYPE
|
52
|
+
|
53
|
+
#include "v8.h"
|
54
|
+
|
55
|
+
#include "platform.h"
|
56
|
+
#include "vm-state-inl.h"
|
57
|
+
|
58
|
+
|
59
|
+
// It seems there is a bug in some Solaris distributions (experienced in
|
60
|
+
// SunOS 5.10 Generic_141445-09) which make it difficult or impossible to
|
61
|
+
// access signbit() despite the availability of other C99 math functions.
|
62
|
+
#ifndef signbit
|
63
|
+
// Test sign - usually defined in math.h
|
64
|
+
int signbit(double x) {
|
65
|
+
// We need to take care of the special case of both positive and negative
|
66
|
+
// versions of zero.
|
67
|
+
if (x == 0) {
|
68
|
+
return fpclass(x) & FP_NZERO;
|
69
|
+
} else {
|
70
|
+
// This won't detect negative NaN but that should be okay since we don't
|
71
|
+
// assume that behavior.
|
72
|
+
return x < 0;
|
73
|
+
}
|
74
|
+
}
|
75
|
+
#endif // signbit
|
76
|
+
|
77
|
+
namespace v8 {
|
78
|
+
namespace internal {
|
79
|
+
|
80
|
+
|
81
|
+
// 0 is never a valid thread id on Solaris since the main thread is 1 and
|
82
|
+
// subsequent have their ids incremented from there
|
83
|
+
static const pthread_t kNoThread = (pthread_t) 0;
|
84
|
+
|
85
|
+
|
86
|
+
double ceiling(double x) {
|
87
|
+
return ceil(x);
|
88
|
+
}
|
89
|
+
|
90
|
+
|
91
|
+
void OS::Setup() {
|
92
|
+
// Seed the random number generator.
|
93
|
+
// Convert the current time to a 64-bit integer first, before converting it
|
94
|
+
// to an unsigned. Going directly will cause an overflow and the seed to be
|
95
|
+
// set to all ones. The seed will be identical for different instances that
|
96
|
+
// call this setup code within the same millisecond.
|
97
|
+
uint64_t seed = static_cast<uint64_t>(TimeCurrentMillis());
|
98
|
+
srandom(static_cast<unsigned int>(seed));
|
99
|
+
}
|
100
|
+
|
101
|
+
|
102
|
+
uint64_t OS::CpuFeaturesImpliedByPlatform() {
|
103
|
+
return 0; // Solaris runs on a lot of things.
|
104
|
+
}
|
105
|
+
|
106
|
+
|
107
|
+
int OS::ActivationFrameAlignment() {
|
108
|
+
return STACK_ALIGN;
|
109
|
+
}
|
110
|
+
|
111
|
+
|
112
|
+
void OS::ReleaseStore(volatile AtomicWord* ptr, AtomicWord value) {
|
113
|
+
__asm__ __volatile__("" : : : "memory");
|
114
|
+
*ptr = value;
|
115
|
+
}
|
116
|
+
|
117
|
+
|
118
|
+
const char* OS::LocalTimezone(double time) {
|
119
|
+
if (isnan(time)) return "";
|
120
|
+
time_t tv = static_cast<time_t>(floor(time/msPerSecond));
|
121
|
+
struct tm* t = localtime(&tv);
|
122
|
+
if (NULL == t) return "";
|
123
|
+
return tzname[0]; // The location of the timezone string on Solaris.
|
124
|
+
}
|
125
|
+
|
126
|
+
|
127
|
+
double OS::LocalTimeOffset() {
|
128
|
+
// On Solaris, struct tm does not contain a tm_gmtoff field.
|
129
|
+
time_t utc = time(NULL);
|
130
|
+
ASSERT(utc != -1);
|
131
|
+
struct tm* loc = localtime(&utc);
|
132
|
+
ASSERT(loc != NULL);
|
133
|
+
return static_cast<double>((mktime(loc) - utc) * msPerSecond);
|
134
|
+
}
|
135
|
+
|
136
|
+
|
137
|
+
// We keep the lowest and highest addresses mapped as a quick way of
|
138
|
+
// determining that pointers are outside the heap (used mostly in assertions
|
139
|
+
// and verification). The estimate is conservative, ie, not all addresses in
|
140
|
+
// 'allocated' space are actually allocated to our heap. The range is
|
141
|
+
// [lowest, highest), inclusive on the low and and exclusive on the high end.
|
142
|
+
static void* lowest_ever_allocated = reinterpret_cast<void*>(-1);
|
143
|
+
static void* highest_ever_allocated = reinterpret_cast<void*>(0);
|
144
|
+
|
145
|
+
|
146
|
+
static void UpdateAllocatedSpaceLimits(void* address, int size) {
|
147
|
+
lowest_ever_allocated = Min(lowest_ever_allocated, address);
|
148
|
+
highest_ever_allocated =
|
149
|
+
Max(highest_ever_allocated,
|
150
|
+
reinterpret_cast<void*>(reinterpret_cast<char*>(address) + size));
|
151
|
+
}
|
152
|
+
|
153
|
+
|
154
|
+
bool OS::IsOutsideAllocatedSpace(void* address) {
|
155
|
+
return address < lowest_ever_allocated || address >= highest_ever_allocated;
|
156
|
+
}
|
157
|
+
|
158
|
+
|
159
|
+
size_t OS::AllocateAlignment() {
|
160
|
+
return static_cast<size_t>(getpagesize());
|
161
|
+
}
|
162
|
+
|
163
|
+
|
164
|
+
void* OS::Allocate(const size_t requested,
|
165
|
+
size_t* allocated,
|
166
|
+
bool is_executable) {
|
167
|
+
const size_t msize = RoundUp(requested, getpagesize());
|
168
|
+
int prot = PROT_READ | PROT_WRITE | (is_executable ? PROT_EXEC : 0);
|
169
|
+
void* mbase = mmap(NULL, msize, prot, MAP_PRIVATE | MAP_ANON, -1, 0);
|
170
|
+
|
171
|
+
if (mbase == MAP_FAILED) {
|
172
|
+
LOG(StringEvent("OS::Allocate", "mmap failed"));
|
173
|
+
return NULL;
|
174
|
+
}
|
175
|
+
*allocated = msize;
|
176
|
+
UpdateAllocatedSpaceLimits(mbase, msize);
|
177
|
+
return mbase;
|
178
|
+
}
|
179
|
+
|
180
|
+
|
181
|
+
void OS::Free(void* address, const size_t size) {
|
182
|
+
// TODO(1240712): munmap has a return value which is ignored here.
|
183
|
+
int result = munmap(address, size);
|
184
|
+
USE(result);
|
185
|
+
ASSERT(result == 0);
|
186
|
+
}
|
187
|
+
|
188
|
+
|
189
|
+
#ifdef ENABLE_HEAP_PROTECTION
|
190
|
+
|
191
|
+
void OS::Protect(void* address, size_t size) {
|
192
|
+
// TODO(1240712): mprotect has a return value which is ignored here.
|
193
|
+
mprotect(address, size, PROT_READ);
|
194
|
+
}
|
195
|
+
|
196
|
+
|
197
|
+
void OS::Unprotect(void* address, size_t size, bool is_executable) {
|
198
|
+
// TODO(1240712): mprotect has a return value which is ignored here.
|
199
|
+
int prot = PROT_READ | PROT_WRITE | (is_executable ? PROT_EXEC : 0);
|
200
|
+
mprotect(address, size, prot);
|
201
|
+
}
|
202
|
+
|
203
|
+
#endif
|
204
|
+
|
205
|
+
|
206
|
+
void OS::Sleep(int milliseconds) {
|
207
|
+
useconds_t ms = static_cast<useconds_t>(milliseconds);
|
208
|
+
usleep(1000 * ms);
|
209
|
+
}
|
210
|
+
|
211
|
+
|
212
|
+
void OS::Abort() {
|
213
|
+
// Redirect to std abort to signal abnormal program termination.
|
214
|
+
abort();
|
215
|
+
}
|
216
|
+
|
217
|
+
|
218
|
+
void OS::DebugBreak() {
|
219
|
+
asm("int $3");
|
220
|
+
}
|
221
|
+
|
222
|
+
|
223
|
+
class PosixMemoryMappedFile : public OS::MemoryMappedFile {
|
224
|
+
public:
|
225
|
+
PosixMemoryMappedFile(FILE* file, void* memory, int size)
|
226
|
+
: file_(file), memory_(memory), size_(size) { }
|
227
|
+
virtual ~PosixMemoryMappedFile();
|
228
|
+
virtual void* memory() { return memory_; }
|
229
|
+
virtual int size() { return size_; }
|
230
|
+
private:
|
231
|
+
FILE* file_;
|
232
|
+
void* memory_;
|
233
|
+
int size_;
|
234
|
+
};
|
235
|
+
|
236
|
+
|
237
|
+
OS::MemoryMappedFile* OS::MemoryMappedFile::open(const char* name) {
|
238
|
+
FILE* file = fopen(name, "r+");
|
239
|
+
if (file == NULL) return NULL;
|
240
|
+
|
241
|
+
fseek(file, 0, SEEK_END);
|
242
|
+
int size = ftell(file);
|
243
|
+
|
244
|
+
void* memory =
|
245
|
+
mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fileno(file), 0);
|
246
|
+
return new PosixMemoryMappedFile(file, memory, size);
|
247
|
+
}
|
248
|
+
|
249
|
+
|
250
|
+
OS::MemoryMappedFile* OS::MemoryMappedFile::create(const char* name, int size,
|
251
|
+
void* initial) {
|
252
|
+
FILE* file = fopen(name, "w+");
|
253
|
+
if (file == NULL) return NULL;
|
254
|
+
int result = fwrite(initial, size, 1, file);
|
255
|
+
if (result < 1) {
|
256
|
+
fclose(file);
|
257
|
+
return NULL;
|
258
|
+
}
|
259
|
+
void* memory =
|
260
|
+
mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fileno(file), 0);
|
261
|
+
return new PosixMemoryMappedFile(file, memory, size);
|
262
|
+
}
|
263
|
+
|
264
|
+
|
265
|
+
PosixMemoryMappedFile::~PosixMemoryMappedFile() {
|
266
|
+
if (memory_) munmap(memory_, size_);
|
267
|
+
fclose(file_);
|
268
|
+
}
|
269
|
+
|
270
|
+
|
271
|
+
void OS::LogSharedLibraryAddresses() {
|
272
|
+
}
|
273
|
+
|
274
|
+
|
275
|
+
void OS::SignalCodeMovingGC() {
|
276
|
+
}
|
277
|
+
|
278
|
+
|
279
|
+
struct StackWalker {
|
280
|
+
Vector<OS::StackFrame>& frames;
|
281
|
+
int index;
|
282
|
+
};
|
283
|
+
|
284
|
+
|
285
|
+
static int StackWalkCallback(uintptr_t pc, int signo, void* data) {
|
286
|
+
struct StackWalker* walker = static_cast<struct StackWalker*>(data);
|
287
|
+
Dl_info info;
|
288
|
+
|
289
|
+
int i = walker->index;
|
290
|
+
|
291
|
+
walker->frames[i].address = reinterpret_cast<void*>(pc);
|
292
|
+
|
293
|
+
// Make sure line termination is in place.
|
294
|
+
walker->frames[i].text[OS::kStackWalkMaxTextLen - 1] = '\0';
|
295
|
+
|
296
|
+
Vector<char> text = MutableCStrVector(walker->frames[i].text,
|
297
|
+
OS::kStackWalkMaxTextLen);
|
298
|
+
|
299
|
+
if (dladdr(reinterpret_cast<void*>(pc), &info) == 0) {
|
300
|
+
OS::SNPrintF(text, "[0x%p]", pc);
|
301
|
+
} else if ((info.dli_fname != NULL && info.dli_sname != NULL)) {
|
302
|
+
// We have symbol info.
|
303
|
+
OS::SNPrintF(text, "%s'%s+0x%x", info.dli_fname, info.dli_sname, pc);
|
304
|
+
} else {
|
305
|
+
// No local symbol info.
|
306
|
+
OS::SNPrintF(text,
|
307
|
+
"%s'0x%p [0x%p]",
|
308
|
+
info.dli_fname,
|
309
|
+
pc - reinterpret_cast<uintptr_t>(info.dli_fbase),
|
310
|
+
pc);
|
311
|
+
}
|
312
|
+
walker->index++;
|
313
|
+
return 0;
|
314
|
+
}
|
315
|
+
|
316
|
+
|
317
|
+
int OS::StackWalk(Vector<OS::StackFrame> frames) {
|
318
|
+
ucontext_t ctx;
|
319
|
+
struct StackWalker walker = { frames, 0 };
|
320
|
+
|
321
|
+
if (getcontext(&ctx) < 0) return kStackWalkError;
|
322
|
+
|
323
|
+
if (!walkcontext(&ctx, StackWalkCallback, &walker)) {
|
324
|
+
return kStackWalkError;
|
325
|
+
}
|
326
|
+
|
327
|
+
return walker.index;
|
328
|
+
}
|
329
|
+
|
330
|
+
|
331
|
+
// Constants used for mmap.
|
332
|
+
static const int kMmapFd = -1;
|
333
|
+
static const int kMmapFdOffset = 0;
|
334
|
+
|
335
|
+
|
336
|
+
VirtualMemory::VirtualMemory(size_t size) {
|
337
|
+
address_ = mmap(NULL, size, PROT_NONE,
|
338
|
+
MAP_PRIVATE | MAP_ANON | MAP_NORESERVE,
|
339
|
+
kMmapFd, kMmapFdOffset);
|
340
|
+
size_ = size;
|
341
|
+
}
|
342
|
+
|
343
|
+
|
344
|
+
VirtualMemory::~VirtualMemory() {
|
345
|
+
if (IsReserved()) {
|
346
|
+
if (0 == munmap(address(), size())) address_ = MAP_FAILED;
|
347
|
+
}
|
348
|
+
}
|
349
|
+
|
350
|
+
|
351
|
+
bool VirtualMemory::IsReserved() {
|
352
|
+
return address_ != MAP_FAILED;
|
353
|
+
}
|
354
|
+
|
355
|
+
|
356
|
+
bool VirtualMemory::Commit(void* address, size_t size, bool executable) {
|
357
|
+
int prot = PROT_READ | PROT_WRITE | (executable ? PROT_EXEC : 0);
|
358
|
+
if (MAP_FAILED == mmap(address, size, prot,
|
359
|
+
MAP_PRIVATE | MAP_ANON | MAP_FIXED,
|
360
|
+
kMmapFd, kMmapFdOffset)) {
|
361
|
+
return false;
|
362
|
+
}
|
363
|
+
|
364
|
+
UpdateAllocatedSpaceLimits(address, size);
|
365
|
+
return true;
|
366
|
+
}
|
367
|
+
|
368
|
+
|
369
|
+
bool VirtualMemory::Uncommit(void* address, size_t size) {
|
370
|
+
return mmap(address, size, PROT_NONE,
|
371
|
+
MAP_PRIVATE | MAP_ANON | MAP_NORESERVE | MAP_FIXED,
|
372
|
+
kMmapFd, kMmapFdOffset) != MAP_FAILED;
|
373
|
+
}
|
374
|
+
|
375
|
+
|
376
|
+
class ThreadHandle::PlatformData : public Malloced {
|
377
|
+
public:
|
378
|
+
explicit PlatformData(ThreadHandle::Kind kind) {
|
379
|
+
Initialize(kind);
|
380
|
+
}
|
381
|
+
|
382
|
+
void Initialize(ThreadHandle::Kind kind) {
|
383
|
+
switch (kind) {
|
384
|
+
case ThreadHandle::SELF: thread_ = pthread_self(); break;
|
385
|
+
case ThreadHandle::INVALID: thread_ = kNoThread; break;
|
386
|
+
}
|
387
|
+
}
|
388
|
+
|
389
|
+
pthread_t thread_; // Thread handle for pthread.
|
390
|
+
};
|
391
|
+
|
392
|
+
|
393
|
+
ThreadHandle::ThreadHandle(Kind kind) {
|
394
|
+
data_ = new PlatformData(kind);
|
395
|
+
}
|
396
|
+
|
397
|
+
|
398
|
+
void ThreadHandle::Initialize(ThreadHandle::Kind kind) {
|
399
|
+
data_->Initialize(kind);
|
400
|
+
}
|
401
|
+
|
402
|
+
|
403
|
+
ThreadHandle::~ThreadHandle() {
|
404
|
+
delete data_;
|
405
|
+
}
|
406
|
+
|
407
|
+
|
408
|
+
bool ThreadHandle::IsSelf() const {
|
409
|
+
return pthread_equal(data_->thread_, pthread_self());
|
410
|
+
}
|
411
|
+
|
412
|
+
|
413
|
+
bool ThreadHandle::IsValid() const {
|
414
|
+
return data_->thread_ != kNoThread;
|
415
|
+
}
|
416
|
+
|
417
|
+
|
418
|
+
Thread::Thread() : ThreadHandle(ThreadHandle::INVALID) {
|
419
|
+
set_name("v8:<unknown>");
|
420
|
+
}
|
421
|
+
|
422
|
+
|
423
|
+
Thread::Thread(const char* name) : ThreadHandle(ThreadHandle::INVALID) {
|
424
|
+
set_name(name);
|
425
|
+
}
|
426
|
+
|
427
|
+
|
428
|
+
Thread::~Thread() {
|
429
|
+
}
|
430
|
+
|
431
|
+
|
432
|
+
static void* ThreadEntry(void* arg) {
|
433
|
+
Thread* thread = reinterpret_cast<Thread*>(arg);
|
434
|
+
// This is also initialized by the first argument to pthread_create() but we
|
435
|
+
// don't know which thread will run first (the original thread or the new
|
436
|
+
// one) so we initialize it here too.
|
437
|
+
thread->thread_handle_data()->thread_ = pthread_self();
|
438
|
+
ASSERT(thread->IsValid());
|
439
|
+
thread->Run();
|
440
|
+
return NULL;
|
441
|
+
}
|
442
|
+
|
443
|
+
|
444
|
+
void Thread::set_name(const char* name) {
|
445
|
+
strncpy(name_, name, sizeof(name_));
|
446
|
+
name_[sizeof(name_) - 1] = '\0';
|
447
|
+
}
|
448
|
+
|
449
|
+
|
450
|
+
void Thread::Start() {
|
451
|
+
pthread_create(&thread_handle_data()->thread_, NULL, ThreadEntry, this);
|
452
|
+
ASSERT(IsValid());
|
453
|
+
}
|
454
|
+
|
455
|
+
|
456
|
+
void Thread::Join() {
|
457
|
+
pthread_join(thread_handle_data()->thread_, NULL);
|
458
|
+
}
|
459
|
+
|
460
|
+
|
461
|
+
Thread::LocalStorageKey Thread::CreateThreadLocalKey() {
|
462
|
+
pthread_key_t key;
|
463
|
+
int result = pthread_key_create(&key, NULL);
|
464
|
+
USE(result);
|
465
|
+
ASSERT(result == 0);
|
466
|
+
return static_cast<LocalStorageKey>(key);
|
467
|
+
}
|
468
|
+
|
469
|
+
|
470
|
+
void Thread::DeleteThreadLocalKey(LocalStorageKey key) {
|
471
|
+
pthread_key_t pthread_key = static_cast<pthread_key_t>(key);
|
472
|
+
int result = pthread_key_delete(pthread_key);
|
473
|
+
USE(result);
|
474
|
+
ASSERT(result == 0);
|
475
|
+
}
|
476
|
+
|
477
|
+
|
478
|
+
void* Thread::GetThreadLocal(LocalStorageKey key) {
|
479
|
+
pthread_key_t pthread_key = static_cast<pthread_key_t>(key);
|
480
|
+
return pthread_getspecific(pthread_key);
|
481
|
+
}
|
482
|
+
|
483
|
+
|
484
|
+
void Thread::SetThreadLocal(LocalStorageKey key, void* value) {
|
485
|
+
pthread_key_t pthread_key = static_cast<pthread_key_t>(key);
|
486
|
+
pthread_setspecific(pthread_key, value);
|
487
|
+
}
|
488
|
+
|
489
|
+
|
490
|
+
void Thread::YieldCPU() {
|
491
|
+
sched_yield();
|
492
|
+
}
|
493
|
+
|
494
|
+
|
495
|
+
class SolarisMutex : public Mutex {
|
496
|
+
public:
|
497
|
+
|
498
|
+
SolarisMutex() {
|
499
|
+
pthread_mutexattr_t attr;
|
500
|
+
pthread_mutexattr_init(&attr);
|
501
|
+
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
502
|
+
pthread_mutex_init(&mutex_, &attr);
|
503
|
+
}
|
504
|
+
|
505
|
+
~SolarisMutex() { pthread_mutex_destroy(&mutex_); }
|
506
|
+
|
507
|
+
int Lock() { return pthread_mutex_lock(&mutex_); }
|
508
|
+
|
509
|
+
int Unlock() { return pthread_mutex_unlock(&mutex_); }
|
510
|
+
|
511
|
+
virtual bool TryLock() {
|
512
|
+
int result = pthread_mutex_trylock(&mutex_);
|
513
|
+
// Return false if the lock is busy and locking failed.
|
514
|
+
if (result == EBUSY) {
|
515
|
+
return false;
|
516
|
+
}
|
517
|
+
ASSERT(result == 0); // Verify no other errors.
|
518
|
+
return true;
|
519
|
+
}
|
520
|
+
|
521
|
+
private:
|
522
|
+
pthread_mutex_t mutex_;
|
523
|
+
};
|
524
|
+
|
525
|
+
|
526
|
+
Mutex* OS::CreateMutex() {
|
527
|
+
return new SolarisMutex();
|
528
|
+
}
|
529
|
+
|
530
|
+
|
531
|
+
class SolarisSemaphore : public Semaphore {
|
532
|
+
public:
|
533
|
+
explicit SolarisSemaphore(int count) { sem_init(&sem_, 0, count); }
|
534
|
+
virtual ~SolarisSemaphore() { sem_destroy(&sem_); }
|
535
|
+
|
536
|
+
virtual void Wait();
|
537
|
+
virtual bool Wait(int timeout);
|
538
|
+
virtual void Signal() { sem_post(&sem_); }
|
539
|
+
private:
|
540
|
+
sem_t sem_;
|
541
|
+
};
|
542
|
+
|
543
|
+
|
544
|
+
void SolarisSemaphore::Wait() {
|
545
|
+
while (true) {
|
546
|
+
int result = sem_wait(&sem_);
|
547
|
+
if (result == 0) return; // Successfully got semaphore.
|
548
|
+
CHECK(result == -1 && errno == EINTR); // Signal caused spurious wakeup.
|
549
|
+
}
|
550
|
+
}
|
551
|
+
|
552
|
+
|
553
|
+
#ifndef TIMEVAL_TO_TIMESPEC
|
554
|
+
#define TIMEVAL_TO_TIMESPEC(tv, ts) do { \
|
555
|
+
(ts)->tv_sec = (tv)->tv_sec; \
|
556
|
+
(ts)->tv_nsec = (tv)->tv_usec * 1000; \
|
557
|
+
} while (false)
|
558
|
+
#endif
|
559
|
+
|
560
|
+
|
561
|
+
#ifndef timeradd
|
562
|
+
#define timeradd(a, b, result) \
|
563
|
+
do { \
|
564
|
+
(result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \
|
565
|
+
(result)->tv_usec = (a)->tv_usec + (b)->tv_usec; \
|
566
|
+
if ((result)->tv_usec >= 1000000) { \
|
567
|
+
++(result)->tv_sec; \
|
568
|
+
(result)->tv_usec -= 1000000; \
|
569
|
+
} \
|
570
|
+
} while (0)
|
571
|
+
#endif
|
572
|
+
|
573
|
+
|
574
|
+
bool SolarisSemaphore::Wait(int timeout) {
|
575
|
+
const long kOneSecondMicros = 1000000; // NOLINT
|
576
|
+
|
577
|
+
// Split timeout into second and nanosecond parts.
|
578
|
+
struct timeval delta;
|
579
|
+
delta.tv_usec = timeout % kOneSecondMicros;
|
580
|
+
delta.tv_sec = timeout / kOneSecondMicros;
|
581
|
+
|
582
|
+
struct timeval current_time;
|
583
|
+
// Get the current time.
|
584
|
+
if (gettimeofday(¤t_time, NULL) == -1) {
|
585
|
+
return false;
|
586
|
+
}
|
587
|
+
|
588
|
+
// Calculate time for end of timeout.
|
589
|
+
struct timeval end_time;
|
590
|
+
timeradd(¤t_time, &delta, &end_time);
|
591
|
+
|
592
|
+
struct timespec ts;
|
593
|
+
TIMEVAL_TO_TIMESPEC(&end_time, &ts);
|
594
|
+
// Wait for semaphore signalled or timeout.
|
595
|
+
while (true) {
|
596
|
+
int result = sem_timedwait(&sem_, &ts);
|
597
|
+
if (result == 0) return true; // Successfully got semaphore.
|
598
|
+
if (result == -1 && errno == ETIMEDOUT) return false; // Timeout.
|
599
|
+
CHECK(result == -1 && errno == EINTR); // Signal caused spurious wakeup.
|
600
|
+
}
|
601
|
+
}
|
602
|
+
|
603
|
+
|
604
|
+
Semaphore* OS::CreateSemaphore(int count) {
|
605
|
+
return new SolarisSemaphore(count);
|
606
|
+
}
|
607
|
+
|
608
|
+
|
609
|
+
#ifdef ENABLE_LOGGING_AND_PROFILING
|
610
|
+
|
611
|
+
static Sampler* active_sampler_ = NULL;
|
612
|
+
static pthread_t vm_tid_ = 0;
|
613
|
+
|
614
|
+
|
615
|
+
static void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) {
|
616
|
+
USE(info);
|
617
|
+
if (signal != SIGPROF) return;
|
618
|
+
if (active_sampler_ == NULL || !active_sampler_->IsActive()) return;
|
619
|
+
if (vm_tid_ != pthread_self()) return;
|
620
|
+
|
621
|
+
TickSample sample_obj;
|
622
|
+
TickSample* sample = CpuProfiler::TickSampleEvent();
|
623
|
+
if (sample == NULL) sample = &sample_obj;
|
624
|
+
|
625
|
+
// Extracting the sample from the context is extremely machine dependent.
|
626
|
+
ucontext_t* ucontext = reinterpret_cast<ucontext_t*>(context);
|
627
|
+
mcontext_t& mcontext = ucontext->uc_mcontext;
|
628
|
+
sample->state = Top::current_vm_state();
|
629
|
+
|
630
|
+
#if V8_HOST_ARCH_IA32
|
631
|
+
sample->pc = reinterpret_cast<Address>(mcontext.gregs[KDIREG_EIP]);
|
632
|
+
sample->sp = reinterpret_cast<Address>(mcontext.gregs[KDIREG_ESP]);
|
633
|
+
sample->fp = reinterpret_cast<Address>(mcontext.gregs[KDIREG_EBP]);
|
634
|
+
#elif V8_HOST_ARCH_X64
|
635
|
+
sample->pc = reinterpret_cast<Address>(mcontext.gregs[KDIREG_RIP]);
|
636
|
+
sample->sp = reinterpret_cast<Address>(mcontext.gregs[KDIREG_RSP]);
|
637
|
+
sample->fp = reinterpret_cast<Address>(mcontext.gregs[KDIREG_RBP]);
|
638
|
+
#else
|
639
|
+
UNIMPLEMENTED();
|
640
|
+
#endif
|
641
|
+
active_sampler_->SampleStack(sample);
|
642
|
+
active_sampler_->Tick(sample);
|
643
|
+
}
|
644
|
+
|
645
|
+
|
646
|
+
class Sampler::PlatformData : public Malloced {
|
647
|
+
public:
|
648
|
+
PlatformData() {
|
649
|
+
signal_handler_installed_ = false;
|
650
|
+
}
|
651
|
+
|
652
|
+
bool signal_handler_installed_;
|
653
|
+
struct sigaction old_signal_handler_;
|
654
|
+
struct itimerval old_timer_value_;
|
655
|
+
};
|
656
|
+
|
657
|
+
|
658
|
+
Sampler::Sampler(int interval)
|
659
|
+
: interval_(interval),
|
660
|
+
profiling_(false),
|
661
|
+
active_(false),
|
662
|
+
samples_taken_(0) {
|
663
|
+
data_ = new PlatformData();
|
664
|
+
}
|
665
|
+
|
666
|
+
|
667
|
+
Sampler::~Sampler() {
|
668
|
+
delete data_;
|
669
|
+
}
|
670
|
+
|
671
|
+
|
672
|
+
void Sampler::Start() {
|
673
|
+
// There can only be one active sampler at the time on POSIX
|
674
|
+
// platforms.
|
675
|
+
if (active_sampler_ != NULL) return;
|
676
|
+
|
677
|
+
// Request profiling signals.
|
678
|
+
struct sigaction sa;
|
679
|
+
sa.sa_sigaction = ProfilerSignalHandler;
|
680
|
+
sigemptyset(&sa.sa_mask);
|
681
|
+
sa.sa_flags = SA_SIGINFO;
|
682
|
+
if (sigaction(SIGPROF, &sa, &data_->old_signal_handler_) != 0) return;
|
683
|
+
data_->signal_handler_installed_ = true;
|
684
|
+
|
685
|
+
// Set the itimer to generate a tick for each interval.
|
686
|
+
itimerval itimer;
|
687
|
+
itimer.it_interval.tv_sec = interval_ / 1000;
|
688
|
+
itimer.it_interval.tv_usec = (interval_ % 1000) * 1000;
|
689
|
+
itimer.it_value.tv_sec = itimer.it_interval.tv_sec;
|
690
|
+
itimer.it_value.tv_usec = itimer.it_interval.tv_usec;
|
691
|
+
setitimer(ITIMER_PROF, &itimer, &data_->old_timer_value_);
|
692
|
+
|
693
|
+
// Set this sampler as the active sampler.
|
694
|
+
active_sampler_ = this;
|
695
|
+
active_ = true;
|
696
|
+
}
|
697
|
+
|
698
|
+
|
699
|
+
void Sampler::Stop() {
|
700
|
+
// Restore old signal handler
|
701
|
+
if (data_->signal_handler_installed_) {
|
702
|
+
setitimer(ITIMER_PROF, &data_->old_timer_value_, NULL);
|
703
|
+
sigaction(SIGPROF, &data_->old_signal_handler_, 0);
|
704
|
+
data_->signal_handler_installed_ = false;
|
705
|
+
}
|
706
|
+
|
707
|
+
// This sampler is no longer the active sampler.
|
708
|
+
active_sampler_ = NULL;
|
709
|
+
active_ = false;
|
710
|
+
}
|
711
|
+
|
712
|
+
#endif // ENABLE_LOGGING_AND_PROFILING
|
713
|
+
|
714
|
+
} } // namespace v8::internal
|