therubyracer 0.6.3 → 0.7.0.pre
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/Rakefile +10 -9
- data/ext/v8/callbacks.cpp +15 -8
- data/ext/v8/converters.cpp +7 -8
- data/ext/v8/converters.h +0 -2
- data/ext/v8/extconf.rb +2 -0
- data/ext/v8/rr.cpp +169 -0
- data/ext/v8/rr.h +34 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/AUTHORS +8 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/ChangeLog +198 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/LICENSE +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/SConstruct +152 -38
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/include/v8-debug.h +52 -4
- data/ext/v8/upstream/2.1.10/include/v8-profiler.h +176 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/include/v8.h +227 -48
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/SConscript +60 -10
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/accessors.cc +5 -39
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/accessors.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/allocation.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/allocation.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/api.cc +477 -57
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/api.h +8 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/apinatives.js +1 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/apiutils.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arguments.h +5 -6
- data/ext/v8/upstream/{2.0.6/src/arm/assembler-thumb2-inl.h → 2.1.10/src/arm/assembler-arm-inl.h} +42 -27
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/assembler-arm.cc +430 -216
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/assembler-arm.h +199 -110
- data/ext/v8/upstream/{2.0.6/src/arm/assembler-arm-inl.h → 2.1.10/src/arm/assembler-thumb2-inl.h} +4 -18
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/assembler-thumb2.cc +142 -85
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/assembler-thumb2.h +18 -9
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/builtins-arm.cc +127 -87
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/codegen-arm-inl.h +3 -5
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/codegen-arm.cc +4634 -1427
- data/ext/v8/upstream/2.1.10/src/arm/codegen-arm.h +946 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/constants-arm.cc +21 -3
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/constants-arm.h +39 -13
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/cpu-arm.cc +9 -3
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/debug-arm.cc +34 -8
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/disasm-arm.cc +262 -117
- data/ext/v8/upstream/2.1.10/src/arm/fast-codegen-arm.cc +238 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/frames-arm.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/frames-arm.h +0 -0
- data/ext/v8/upstream/{2.0.6/src/arm/fast-codegen-arm.cc → 2.1.10/src/arm/full-codegen-arm.cc} +453 -283
- data/ext/v8/upstream/2.1.10/src/arm/ic-arm.cc +1833 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/jump-target-arm.cc +3 -29
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/macro-assembler-arm.cc +564 -104
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/macro-assembler-arm.h +255 -46
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/regexp-macro-assembler-arm.cc +78 -104
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/regexp-macro-assembler-arm.h +6 -22
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/register-allocator-arm-inl.h +0 -3
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/register-allocator-arm.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/register-allocator-arm.h +2 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/simulator-arm.cc +557 -180
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/simulator-arm.h +52 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/stub-cache-arm.cc +904 -240
- data/ext/v8/upstream/2.1.10/src/arm/virtual-frame-arm.cc +668 -0
- data/ext/v8/upstream/2.1.10/src/arm/virtual-frame-arm.h +503 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/array.js +82 -109
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/assembler.cc +49 -13
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/assembler.h +27 -5
- data/ext/v8/upstream/2.1.10/src/ast.cc +1138 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ast.h +354 -53
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/bootstrapper.cc +609 -501
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/bootstrapper.h +27 -8
- data/ext/v8/upstream/2.1.10/src/builtins.cc +1512 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/builtins.h +41 -25
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/bytecodes-irregexp.h +0 -0
- data/ext/v8/upstream/2.1.10/src/cached-powers.h +119 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/char-predicates-inl.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/char-predicates.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/checks.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/checks.h +25 -1
- data/ext/v8/upstream/2.1.10/src/circular-queue-inl.h +101 -0
- data/ext/v8/upstream/2.1.10/src/circular-queue.cc +121 -0
- data/ext/v8/upstream/2.1.10/src/circular-queue.h +129 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/code-stubs.cc +23 -8
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/code-stubs.h +16 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/code.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/codegen-inl.h +6 -34
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/codegen.cc +73 -92
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/codegen.h +164 -68
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/compilation-cache.cc +117 -73
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/compilation-cache.h +18 -17
- data/ext/v8/upstream/2.1.10/src/compiler.cc +623 -0
- data/ext/v8/upstream/2.1.10/src/compiler.h +299 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/contexts.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/contexts.h +8 -11
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/conversions-inl.h +28 -13
- data/ext/v8/upstream/2.1.10/src/conversions.cc +1105 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/conversions.h +9 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/counters.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/counters.h +1 -1
- data/ext/v8/upstream/2.1.10/src/cpu-profiler-inl.h +99 -0
- data/ext/v8/upstream/2.1.10/src/cpu-profiler.cc +494 -0
- data/ext/v8/upstream/2.1.10/src/cpu-profiler.h +277 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/cpu.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8-debug.cc +15 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8-debug.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8-posix.cc +18 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8-readline.cc +2 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8-windows.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8.cc +10 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8.h +2 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8.js +43 -38
- data/ext/v8/upstream/2.1.10/src/data-flow.cc +755 -0
- data/ext/v8/upstream/2.1.10/src/data-flow.h +278 -0
- data/ext/v8/upstream/{2.0.6/src/date-delay.js → 2.1.10/src/date.js} +100 -110
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/dateparser-inl.h +11 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/dateparser.cc +24 -26
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/dateparser.h +8 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/debug-agent.cc +3 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/debug-agent.h +0 -0
- data/ext/v8/upstream/{2.0.6/src/debug-delay.js → 2.1.10/src/debug-debugger.js} +111 -15
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/debug.cc +156 -96
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/debug.h +53 -5
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/disasm.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/disassembler.cc +2 -8
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/disassembler.h +0 -0
- data/ext/v8/upstream/2.1.10/src/diy-fp.cc +58 -0
- data/ext/v8/upstream/2.1.10/src/diy-fp.h +117 -0
- data/ext/v8/upstream/2.1.10/src/double.h +169 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/dtoa-config.c +4 -3
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/execution.cc +22 -22
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/execution.h +17 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/factory.cc +70 -46
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/factory.h +27 -17
- data/ext/v8/upstream/2.1.10/src/fast-codegen.cc +746 -0
- data/ext/v8/upstream/2.1.10/src/fast-codegen.h +161 -0
- data/ext/v8/upstream/2.1.10/src/fast-dtoa.cc +512 -0
- data/ext/v8/upstream/2.1.10/src/fast-dtoa.h +59 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/flag-definitions.h +32 -11
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/flags.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/flags.h +0 -0
- data/ext/v8/upstream/2.1.10/src/flow-graph.cc +763 -0
- data/ext/v8/upstream/2.1.10/src/flow-graph.h +180 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/frame-element.cc +1 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/frame-element.h +49 -11
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/frames-inl.h +2 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/frames.cc +91 -17
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/frames.h +24 -2
- data/ext/v8/upstream/{2.0.6/src/fast-codegen.cc → 2.1.10/src/full-codegen.cc} +549 -198
- data/ext/v8/upstream/{2.0.6/src/fast-codegen.h → 2.1.10/src/full-codegen.h} +109 -29
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/func-name-inferrer.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/func-name-inferrer.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/global-handles.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/global-handles.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/globals.h +67 -43
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/handles-inl.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/handles.cc +124 -129
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/handles.h +33 -15
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/hashmap.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/hashmap.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/heap-inl.h +56 -12
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/heap-profiler.cc +2 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/heap-profiler.h +2 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/heap.cc +413 -221
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/heap.h +192 -67
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/assembler-ia32-inl.h +6 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/assembler-ia32.cc +187 -32
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/assembler-ia32.h +31 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/builtins-ia32.cc +160 -133
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/codegen-ia32-inl.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/codegen-ia32.cc +5533 -2177
- data/ext/v8/upstream/{2.0.6/src/x64/codegen-x64.h → 2.1.10/src/ia32/codegen-ia32.h} +453 -134
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/cpu-ia32.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/debug-ia32.cc +63 -8
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/disasm-ia32.cc +99 -16
- data/ext/v8/upstream/2.1.10/src/ia32/fast-codegen-ia32.cc +950 -0
- data/ext/v8/upstream/2.1.10/src/ia32/fast-codegen-ia32.h +155 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/frames-ia32.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/frames-ia32.h +0 -0
- data/ext/v8/upstream/{2.0.6/src/ia32/fast-codegen-ia32.cc → 2.1.10/src/ia32/full-codegen-ia32.cc} +454 -253
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/ic-ia32.cc +545 -390
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/jump-target-ia32.cc +1 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/macro-assembler-ia32.cc +330 -139
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/macro-assembler-ia32.h +96 -30
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/regexp-macro-assembler-ia32.cc +73 -89
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/regexp-macro-assembler-ia32.h +6 -21
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/register-allocator-ia32-inl.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/register-allocator-ia32.cc +59 -5
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/register-allocator-ia32.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/simulator-ia32.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/simulator-ia32.h +2 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/stub-cache-ia32.cc +745 -303
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/virtual-frame-ia32.cc +278 -71
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/virtual-frame-ia32.h +78 -22
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ic-inl.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ic.cc +172 -89
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ic.h +51 -20
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/interpreter-irregexp.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/interpreter-irregexp.h +0 -0
- data/ext/v8/upstream/{2.0.6/src/json-delay.js → 2.1.10/src/json.js} +26 -12
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/jsregexp.cc +151 -118
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/jsregexp.h +31 -7
- data/ext/v8/upstream/2.1.10/src/jump-target-heavy-inl.h +51 -0
- data/ext/v8/upstream/{2.0.6/src/jump-target.cc → 2.1.10/src/jump-target-heavy.cc} +164 -184
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/jump-target-inl.h +8 -9
- data/ext/v8/upstream/{2.0.6/src/usage-analyzer.h → 2.1.10/src/jump-target-light-inl.h} +9 -7
- data/ext/v8/upstream/2.1.10/src/jump-target-light.cc +86 -0
- data/ext/v8/upstream/2.1.10/src/jump-target.cc +155 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/jump-target.h +6 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/list-inl.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/list.h +2 -1
- data/ext/v8/upstream/2.1.10/src/liveedit-debugger.js +944 -0
- data/ext/v8/upstream/2.1.10/src/liveedit.cc +1468 -0
- data/ext/v8/upstream/2.1.10/src/liveedit.h +170 -0
- data/ext/v8/upstream/2.1.10/src/log-inl.h +59 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/log-utils.cc +3 -9
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/log-utils.h +1 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/log.cc +198 -95
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/log.h +50 -49
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/macro-assembler.h +9 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/macros.py +30 -11
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/mark-compact.cc +464 -152
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/mark-compact.h +41 -20
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/math.js +9 -8
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/memory.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/messages.cc +1 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/messages.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/messages.js +46 -9
- data/ext/v8/upstream/2.1.10/src/mips/assembler-mips-inl.h +215 -0
- data/ext/v8/upstream/2.1.10/src/mips/assembler-mips.cc +1208 -0
- data/ext/v8/upstream/2.1.10/src/mips/assembler-mips.h +665 -0
- data/ext/v8/upstream/2.1.10/src/mips/builtins-mips.cc +202 -0
- data/ext/v8/upstream/2.1.10/src/mips/codegen-mips-inl.h +70 -0
- data/ext/v8/upstream/2.1.10/src/mips/codegen-mips.cc +1428 -0
- data/ext/v8/upstream/{2.0.6/src/arm/codegen-arm.h → 2.1.10/src/mips/codegen-mips.h} +103 -205
- data/ext/v8/upstream/2.1.10/src/mips/constants-mips.cc +323 -0
- data/ext/v8/upstream/2.1.10/src/mips/constants-mips.h +525 -0
- data/ext/v8/upstream/2.1.10/src/mips/cpu-mips.cc +69 -0
- data/ext/v8/upstream/2.1.10/src/mips/debug-mips.cc +128 -0
- data/ext/v8/upstream/2.1.10/src/mips/disasm-mips.cc +784 -0
- data/ext/v8/upstream/2.1.10/src/mips/fast-codegen-mips.cc +74 -0
- data/ext/v8/upstream/2.1.10/src/mips/frames-mips.cc +99 -0
- data/ext/v8/upstream/2.1.10/src/mips/frames-mips.h +164 -0
- data/ext/v8/upstream/2.1.10/src/mips/full-codegen-mips.cc +273 -0
- data/ext/v8/upstream/2.1.10/src/mips/ic-mips.cc +217 -0
- data/ext/v8/upstream/2.1.10/src/mips/jump-target-mips.cc +172 -0
- data/ext/v8/upstream/2.1.10/src/mips/macro-assembler-mips.cc +1323 -0
- data/ext/v8/upstream/2.1.10/src/mips/macro-assembler-mips.h +461 -0
- data/ext/v8/upstream/2.1.10/src/mips/register-allocator-mips-inl.h +137 -0
- data/ext/v8/upstream/2.1.10/src/mips/register-allocator-mips.cc +60 -0
- data/ext/v8/upstream/2.1.10/src/mips/register-allocator-mips.h +46 -0
- data/ext/v8/upstream/2.1.10/src/mips/simulator-mips.cc +1648 -0
- data/ext/v8/upstream/2.1.10/src/mips/simulator-mips.h +311 -0
- data/ext/v8/upstream/2.1.10/src/mips/stub-cache-mips.cc +400 -0
- data/ext/v8/upstream/2.1.10/src/mips/virtual-frame-mips.cc +316 -0
- data/ext/v8/upstream/{2.0.6/src/arm/virtual-frame-arm.h → 2.1.10/src/mips/virtual-frame-mips.h} +87 -71
- data/ext/v8/upstream/{2.0.6/src/mirror-delay.js → 2.1.10/src/mirror-debugger.js} +51 -45
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/mksnapshot.cc +97 -10
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/natives.h +6 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/objects-debug.cc +47 -5
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/objects-inl.h +154 -38
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/objects.cc +528 -280
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/objects.h +302 -95
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/oprofile-agent.cc +25 -33
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/oprofile-agent.h +9 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/parser.cc +444 -72
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/parser.h +4 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform-freebsd.cc +32 -13
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform-linux.cc +59 -25
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform-macos.cc +30 -13
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform-nullos.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform-openbsd.cc +21 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform-posix.cc +0 -18
- data/ext/v8/upstream/2.1.10/src/platform-solaris.cc +607 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform-win32.cc +16 -17
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform.h +25 -8
- data/ext/v8/upstream/2.1.10/src/powers-ten.h +2461 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/prettyprinter.cc +49 -29
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/prettyprinter.h +3 -1
- data/ext/v8/upstream/2.1.10/src/profile-generator-inl.h +124 -0
- data/ext/v8/upstream/2.1.10/src/profile-generator.cc +583 -0
- data/ext/v8/upstream/2.1.10/src/profile-generator.h +364 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/property.cc +1 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/property.h +12 -24
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-macro-assembler-irregexp-inl.h +2 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-macro-assembler-irregexp.cc +2 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-macro-assembler-irregexp.h +2 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-macro-assembler-tracer.cc +2 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-macro-assembler-tracer.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-macro-assembler.cc +33 -10
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-macro-assembler.h +12 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-stack.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-stack.h +0 -0
- data/ext/v8/upstream/{2.0.6/src/regexp-delay.js → 2.1.10/src/regexp.js} +180 -58
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/register-allocator-inl.h +68 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/register-allocator.cc +5 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/register-allocator.h +42 -17
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/rewriter.cc +110 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/rewriter.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/runtime.cc +2733 -623
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/runtime.h +43 -20
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/runtime.js +46 -35
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/scanner.cc +278 -36
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/scanner.h +97 -26
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/scopeinfo.cc +3 -3
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/scopeinfo.h +1 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/scopes.cc +11 -12
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/scopes.h +0 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/serialize.cc +298 -175
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/serialize.h +184 -40
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/shell.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/simulator.h +2 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/smart-pointer.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/snapshot-common.cc +16 -31
- data/ext/v8/upstream/2.1.10/src/snapshot-empty.cc +50 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/snapshot.h +13 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/spaces-inl.h +35 -27
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/spaces.cc +256 -42
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/spaces.h +136 -42
- data/ext/v8/upstream/{2.0.6/src/zone-inl.h → 2.1.10/src/splay-tree-inl.h} +102 -89
- data/ext/v8/upstream/2.1.10/src/splay-tree.h +203 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/string-stream.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/string-stream.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/string.js +260 -149
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/stub-cache.cc +195 -69
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/stub-cache.h +127 -12
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/third_party/dtoa/COPYING +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/third_party/dtoa/dtoa.c +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/third_party/valgrind/valgrind.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/token.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/token.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/top.cc +26 -31
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/top.h +3 -4
- data/ext/v8/upstream/2.1.10/src/type-info.cc +53 -0
- data/ext/v8/upstream/2.1.10/src/type-info.h +244 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/unicode-inl.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/unicode.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/unicode.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/uri.js +6 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/utils.cc +0 -37
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/utils.h +121 -50
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/v8-counters.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/v8-counters.h +130 -98
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/v8.cc +42 -11
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/v8.h +4 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/v8natives.js +202 -37
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/v8threads.cc +11 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/v8threads.h +15 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/variables.cc +7 -51
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/variables.h +5 -35
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/version.cc +3 -3
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/version.h +0 -0
- data/ext/v8/upstream/2.1.10/src/virtual-frame-heavy-inl.h +152 -0
- data/ext/v8/upstream/{2.0.6/src/virtual-frame.cc → 2.1.10/src/virtual-frame-heavy.cc} +107 -176
- data/ext/v8/upstream/2.1.10/src/virtual-frame-inl.h +39 -0
- data/ext/v8/upstream/2.1.10/src/virtual-frame-light-inl.h +69 -0
- data/ext/v8/upstream/2.1.10/src/virtual-frame-light.cc +49 -0
- data/ext/v8/upstream/2.1.10/src/virtual-frame.cc +49 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/virtual-frame.h +2 -0
- data/ext/v8/upstream/{2.0.6/src/log-inl.h → 2.1.10/src/vm-state-inl.h} +28 -20
- data/ext/v8/upstream/{2.0.6/src/snapshot-empty.cc → 2.1.10/src/vm-state.cc} +5 -6
- data/ext/v8/upstream/2.1.10/src/vm-state.h +75 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/assembler-x64-inl.h +11 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/assembler-x64.cc +285 -93
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/assembler-x64.h +81 -78
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/builtins-x64.cc +130 -87
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/codegen-x64-inl.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/codegen-x64.cc +4520 -1317
- data/ext/v8/upstream/{2.0.6/src/ia32/codegen-ia32.h → 2.1.10/src/x64/codegen-x64.h} +362 -141
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/cpu-x64.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/debug-x64.cc +20 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/disasm-x64.cc +121 -44
- data/ext/v8/upstream/2.1.10/src/x64/fast-codegen-x64.cc +246 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/frames-x64.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/frames-x64.h +0 -0
- data/ext/v8/upstream/{2.0.6/src/x64/fast-codegen-x64.cc → 2.1.10/src/x64/full-codegen-x64.cc} +404 -231
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/ic-x64.cc +346 -117
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/jump-target-x64.cc +1 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/macro-assembler-x64.cc +537 -181
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/macro-assembler-x64.h +140 -34
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/regexp-macro-assembler-x64.cc +74 -96
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/regexp-macro-assembler-x64.h +8 -25
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/register-allocator-x64-inl.h +1 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/register-allocator-x64.cc +3 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/register-allocator-x64.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/simulator-x64.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/simulator-x64.h +2 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/stub-cache-x64.cc +785 -288
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/virtual-frame-x64.cc +128 -52
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/virtual-frame-x64.h +40 -19
- data/ext/v8/upstream/2.1.10/src/zone-inl.h +82 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/zone.cc +1 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/zone.h +6 -90
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/codemap.js +12 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/consarray.js +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/csvparser.js +22 -37
- data/ext/v8/upstream/2.1.10/tools/generate-ten-powers.scm +286 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/gyp/v8.gyp +86 -24
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/js2c.py +22 -22
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/jsmin.py +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/linux-tick-processor +10 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/linux-tick-processor.py +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/logreader.js +34 -16
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/mac-nm +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/mac-tick-processor +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/annotate +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/common +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/dump +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/report +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/reset +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/run +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/shutdown +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/start +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/presubmit.py +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/process-heap-prof.py +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/profile.js +70 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/profile_view.js +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/run-valgrind.py +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/splaytree.js +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/splaytree.py +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/stats-viewer.py +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/test.py +7 -7
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/tickprocessor-driver.js +7 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/tickprocessor.js +140 -9
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/tickprocessor.py +40 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/utils.py +6 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/README.txt +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/arm.vsprops +1 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/common.vsprops +1 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/d8.vcproj +0 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/d8_arm.vcproj +193 -199
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/d8_x64.vcproj +16 -8
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/d8js2c.cmd +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/debug.vsprops +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/ia32.vsprops +5 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/js2c.cmd +1 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/release.vsprops +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8.sln +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8.vcproj +11 -7
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_arm.sln +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_arm.vcproj +227 -223
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_base.vcproj +137 -5
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_base_arm.vcproj +116 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_base_x64.vcproj +125 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_cctest.vcproj +12 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_cctest_arm.vcproj +12 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_cctest_x64.vcproj +11 -11
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_mksnapshot.vcproj +0 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_mksnapshot_x64.vcproj +0 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_process_sample.vcproj +0 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_process_sample_arm.vcproj +145 -151
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_process_sample_x64.vcproj +16 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_shell_sample.vcproj +0 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_shell_sample_arm.vcproj +145 -151
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_shell_sample_x64.vcproj +16 -8
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_snapshot.vcproj +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_snapshot_cc.vcproj +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_snapshot_cc_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_snapshot_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_x64.sln +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_x64.vcproj +11 -7
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/x64.vsprops +5 -1
- data/ext/v8/upstream/2.1.10/tools/windows-tick-processor.bat +29 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/windows-tick-processor.py +0 -0
- data/ext/v8/upstream/Makefile +8 -2
- data/ext/v8/v8.cpp +21 -73
- data/ext/v8/v8_array.cpp +56 -0
- data/ext/v8/v8_array.h +8 -0
- data/ext/v8/v8_callbacks.cpp +121 -0
- data/ext/v8/v8_callbacks.h +8 -0
- data/ext/v8/v8_cxt.cpp +74 -77
- data/ext/v8/v8_cxt.h +2 -9
- data/ext/v8/v8_date.cpp +26 -0
- data/ext/v8/v8_date.h +6 -0
- data/ext/v8/v8_exception.cpp +55 -0
- data/ext/v8/v8_exception.h +6 -0
- data/ext/v8/v8_external.cpp +50 -0
- data/ext/v8/v8_external.h +8 -0
- data/ext/v8/v8_func.cpp +76 -18
- data/ext/v8/v8_func.h +5 -4
- data/ext/v8/v8_msg.cpp +55 -46
- data/ext/v8/v8_msg.h +3 -11
- data/ext/v8/v8_obj.cpp +67 -36
- data/ext/v8/v8_obj.h +6 -8
- data/ext/v8/v8_ref.cpp +25 -9
- data/ext/v8/v8_ref.h +3 -5
- data/ext/v8/v8_script.cpp +17 -10
- data/ext/v8/v8_script.h +3 -3
- data/ext/v8/v8_str.cpp +34 -6
- data/ext/v8/v8_str.h +4 -2
- data/ext/v8/v8_template.cpp +195 -33
- data/ext/v8/v8_template.h +4 -5
- data/ext/v8/v8_try_catch.cpp +99 -0
- data/ext/v8/v8_try_catch.h +5 -0
- data/ext/v8/v8_value.cpp +164 -0
- data/ext/v8/v8_value.h +10 -0
- data/lib/v8.rb +3 -1
- data/lib/v8/access.rb +60 -0
- data/lib/v8/array.rb +15 -0
- data/lib/v8/callbacks.rb +88 -0
- data/lib/v8/cli.rb +1 -1
- data/lib/v8/context.rb +55 -66
- data/lib/v8/function.rb +20 -2
- data/lib/v8/object.rb +14 -12
- data/lib/v8/ruby_error.rb +3 -0
- data/lib/v8/to.rb +59 -7
- data/spec/ext/cxt_spec.rb +2 -15
- data/spec/ext/func_spec.rb +17 -10
- data/spec/ext/try_catch_spec.rb +32 -0
- data/spec/foo.rb +17 -0
- data/spec/redjs/jsapi_spec.rb +173 -96
- data/spec/spec_helper.rb +7 -0
- data/spec/v8/to_spec.rb +0 -1
- data/therubyracer.gemspec +6 -6
- metadata +493 -386
- data/ext/v8/upstream/2.0.6/src/arm/ic-arm.cc +0 -849
- data/ext/v8/upstream/2.0.6/src/arm/virtual-frame-arm.cc +0 -412
- data/ext/v8/upstream/2.0.6/src/ast.cc +0 -512
- data/ext/v8/upstream/2.0.6/src/builtins.cc +0 -851
- data/ext/v8/upstream/2.0.6/src/compiler.cc +0 -1132
- data/ext/v8/upstream/2.0.6/src/compiler.h +0 -107
- data/ext/v8/upstream/2.0.6/src/conversions.cc +0 -709
- data/ext/v8/upstream/2.0.6/src/usage-analyzer.cc +0 -426
- data/ext/v8/upstream/2.0.6/tools/windows-tick-processor.bat +0 -5
- data/ext/v8/upstream/no-strict-aliasing.patch +0 -13
- data/ext/v8/v8_standalone.cpp +0 -69
- data/ext/v8/v8_standalone.h +0 -31
- data/spec/ext/obj_spec.rb +0 -13
@@ -43,6 +43,7 @@ SOURCES = {
|
|
43
43
|
bootstrapper.cc
|
44
44
|
builtins.cc
|
45
45
|
checks.cc
|
46
|
+
circular-queue.cc
|
46
47
|
code-stubs.cc
|
47
48
|
codegen.cc
|
48
49
|
compilation-cache.cc
|
@@ -50,18 +51,23 @@ SOURCES = {
|
|
50
51
|
contexts.cc
|
51
52
|
conversions.cc
|
52
53
|
counters.cc
|
54
|
+
cpu-profiler.cc
|
55
|
+
data-flow.cc
|
53
56
|
dateparser.cc
|
54
57
|
debug-agent.cc
|
55
58
|
debug.cc
|
56
59
|
disassembler.cc
|
60
|
+
diy-fp.cc
|
57
61
|
execution.cc
|
58
62
|
factory.cc
|
59
|
-
fast-codegen.cc
|
60
63
|
flags.cc
|
64
|
+
flow-graph.cc
|
61
65
|
frame-element.cc
|
62
66
|
frames.cc
|
67
|
+
full-codegen.cc
|
63
68
|
func-name-inferrer.cc
|
64
69
|
global-handles.cc
|
70
|
+
fast-dtoa.cc
|
65
71
|
handles.cc
|
66
72
|
hashmap.cc
|
67
73
|
heap-profiler.cc
|
@@ -70,6 +76,7 @@ SOURCES = {
|
|
70
76
|
interpreter-irregexp.cc
|
71
77
|
jsregexp.cc
|
72
78
|
jump-target.cc
|
79
|
+
liveedit.cc
|
73
80
|
log-utils.cc
|
74
81
|
log.cc
|
75
82
|
mark-compact.cc
|
@@ -77,6 +84,7 @@ SOURCES = {
|
|
77
84
|
objects.cc
|
78
85
|
oprofile-agent.cc
|
79
86
|
parser.cc
|
87
|
+
profile-generator.cc
|
80
88
|
property.cc
|
81
89
|
regexp-macro-assembler-irregexp.cc
|
82
90
|
regexp-macro-assembler.cc
|
@@ -94,8 +102,8 @@ SOURCES = {
|
|
94
102
|
stub-cache.cc
|
95
103
|
token.cc
|
96
104
|
top.cc
|
105
|
+
type-info.cc
|
97
106
|
unicode.cc
|
98
|
-
usage-analyzer.cc
|
99
107
|
utils.cc
|
100
108
|
v8-counters.cc
|
101
109
|
v8.cc
|
@@ -103,9 +111,13 @@ SOURCES = {
|
|
103
111
|
variables.cc
|
104
112
|
version.cc
|
105
113
|
virtual-frame.cc
|
114
|
+
vm-state.cc
|
106
115
|
zone.cc
|
107
116
|
"""),
|
108
117
|
'arch:arm': Split("""
|
118
|
+
fast-codegen.cc
|
119
|
+
jump-target-light.cc
|
120
|
+
virtual-frame-light.cc
|
109
121
|
arm/builtins-arm.cc
|
110
122
|
arm/codegen-arm.cc
|
111
123
|
arm/constants-arm.cc
|
@@ -114,6 +126,7 @@ SOURCES = {
|
|
114
126
|
arm/disasm-arm.cc
|
115
127
|
arm/fast-codegen-arm.cc
|
116
128
|
arm/frames-arm.cc
|
129
|
+
arm/full-codegen-arm.cc
|
117
130
|
arm/ic-arm.cc
|
118
131
|
arm/jump-target-arm.cc
|
119
132
|
arm/macro-assembler-arm.cc
|
@@ -128,7 +141,28 @@ SOURCES = {
|
|
128
141
|
'armvariant:thumb2': Split("""
|
129
142
|
arm/assembler-thumb2.cc
|
130
143
|
"""),
|
144
|
+
'arch:mips': Split("""
|
145
|
+
fast-codegen.cc
|
146
|
+
mips/assembler-mips.cc
|
147
|
+
mips/builtins-mips.cc
|
148
|
+
mips/codegen-mips.cc
|
149
|
+
mips/constants-mips.cc
|
150
|
+
mips/cpu-mips.cc
|
151
|
+
mips/debug-mips.cc
|
152
|
+
mips/disasm-mips.cc
|
153
|
+
mips/fast-codegen-mips.cc
|
154
|
+
mips/full-codegen-mips.cc
|
155
|
+
mips/frames-mips.cc
|
156
|
+
mips/ic-mips.cc
|
157
|
+
mips/jump-target-mips.cc
|
158
|
+
mips/macro-assembler-mips.cc
|
159
|
+
mips/register-allocator-mips.cc
|
160
|
+
mips/stub-cache-mips.cc
|
161
|
+
mips/virtual-frame-mips.cc
|
162
|
+
"""),
|
131
163
|
'arch:ia32': Split("""
|
164
|
+
jump-target-heavy.cc
|
165
|
+
virtual-frame-heavy.cc
|
132
166
|
ia32/assembler-ia32.cc
|
133
167
|
ia32/builtins-ia32.cc
|
134
168
|
ia32/codegen-ia32.cc
|
@@ -137,6 +171,7 @@ SOURCES = {
|
|
137
171
|
ia32/disasm-ia32.cc
|
138
172
|
ia32/fast-codegen-ia32.cc
|
139
173
|
ia32/frames-ia32.cc
|
174
|
+
ia32/full-codegen-ia32.cc
|
140
175
|
ia32/ic-ia32.cc
|
141
176
|
ia32/jump-target-ia32.cc
|
142
177
|
ia32/macro-assembler-ia32.cc
|
@@ -146,6 +181,9 @@ SOURCES = {
|
|
146
181
|
ia32/virtual-frame-ia32.cc
|
147
182
|
"""),
|
148
183
|
'arch:x64': Split("""
|
184
|
+
fast-codegen.cc
|
185
|
+
jump-target-heavy.cc
|
186
|
+
virtual-frame-heavy.cc
|
149
187
|
x64/assembler-x64.cc
|
150
188
|
x64/builtins-x64.cc
|
151
189
|
x64/codegen-x64.cc
|
@@ -154,6 +192,7 @@ SOURCES = {
|
|
154
192
|
x64/disasm-x64.cc
|
155
193
|
x64/fast-codegen-x64.cc
|
156
194
|
x64/frames-x64.cc
|
195
|
+
x64/full-codegen-x64.cc
|
157
196
|
x64/ic-x64.cc
|
158
197
|
x64/jump-target-x64.cc
|
159
198
|
x64/macro-assembler-x64.cc
|
@@ -163,11 +202,13 @@ SOURCES = {
|
|
163
202
|
x64/virtual-frame-x64.cc
|
164
203
|
"""),
|
165
204
|
'simulator:arm': ['arm/simulator-arm.cc'],
|
205
|
+
'simulator:mips': ['mips/simulator-mips.cc'],
|
166
206
|
'os:freebsd': ['platform-freebsd.cc', 'platform-posix.cc'],
|
167
207
|
'os:openbsd': ['platform-openbsd.cc', 'platform-posix.cc'],
|
168
208
|
'os:linux': ['platform-linux.cc', 'platform-posix.cc'],
|
169
209
|
'os:android': ['platform-linux.cc', 'platform-posix.cc'],
|
170
210
|
'os:macos': ['platform-macos.cc', 'platform-posix.cc'],
|
211
|
+
'os:solaris': ['platform-solaris.cc', 'platform-posix.cc'],
|
171
212
|
'os:nullos': ['platform-nullos.cc'],
|
172
213
|
'os:win32': ['platform-win32.cc'],
|
173
214
|
'mode:release': [],
|
@@ -196,6 +237,9 @@ D8_FILES = {
|
|
196
237
|
'os:openbsd': [
|
197
238
|
'd8-posix.cc'
|
198
239
|
],
|
240
|
+
'os:solaris': [
|
241
|
+
'd8-posix.cc'
|
242
|
+
],
|
199
243
|
'os:win32': [
|
200
244
|
'd8-windows.cc'
|
201
245
|
],
|
@@ -217,11 +261,12 @@ uri.js
|
|
217
261
|
math.js
|
218
262
|
messages.js
|
219
263
|
apinatives.js
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
264
|
+
date.js
|
265
|
+
regexp.js
|
266
|
+
json.js
|
267
|
+
liveedit-debugger.js
|
268
|
+
mirror-debugger.js
|
269
|
+
debug-debugger.js
|
225
270
|
'''.split()
|
226
271
|
|
227
272
|
|
@@ -235,7 +280,7 @@ def ConfigureObjectFiles():
|
|
235
280
|
env.Replace(**context.flags['v8'])
|
236
281
|
context.ApplyEnvOverrides(env)
|
237
282
|
env['BUILDERS']['JS2C'] = Builder(action=js2c.JS2C)
|
238
|
-
env['BUILDERS']['Snapshot'] = Builder(action='$SOURCE $TARGET --logfile "$LOGFILE"')
|
283
|
+
env['BUILDERS']['Snapshot'] = Builder(action='$SOURCE $TARGET --logfile "$LOGFILE" --log-snapshot-positions')
|
239
284
|
|
240
285
|
# Build the standard platform-independent source files.
|
241
286
|
source_files = context.GetRelevantSources(SOURCES)
|
@@ -261,7 +306,12 @@ def ConfigureObjectFiles():
|
|
261
306
|
source_objs = context.ConfigureObject(env, source_files)
|
262
307
|
non_snapshot_files = [dtoa_obj, source_objs]
|
263
308
|
|
264
|
-
# Create snapshot if necessary.
|
309
|
+
# Create snapshot if necessary. For cross compilation you should either
|
310
|
+
# do without snapshots and take the performance hit or you should build a
|
311
|
+
# host VM with the simulator=arm and snapshot=on options and then take the
|
312
|
+
# resulting snapshot.cc file from obj/release and put it in the src
|
313
|
+
# directory. Then rebuild the VM with the cross compiler and specify
|
314
|
+
# snapshot=nobuild on the scons command line.
|
265
315
|
empty_snapshot_obj = context.ConfigureObject(env, 'snapshot-empty.cc')
|
266
316
|
mksnapshot_env = env.Copy()
|
267
317
|
mksnapshot_env.Replace(**context.flags['mksnapshot'])
|
@@ -271,7 +321,7 @@ def ConfigureObjectFiles():
|
|
271
321
|
if context.build_snapshot:
|
272
322
|
snapshot_cc = env.Snapshot('snapshot.cc', mksnapshot, LOGFILE=File('snapshot.log').abspath)
|
273
323
|
else:
|
274
|
-
snapshot_cc =
|
324
|
+
snapshot_cc = 'snapshot.cc'
|
275
325
|
snapshot_obj = context.ConfigureObject(env, snapshot_cc, CPPPATH=['.'])
|
276
326
|
else:
|
277
327
|
snapshot_obj = empty_snapshot_obj
|
@@ -32,7 +32,6 @@
|
|
32
32
|
#include "factory.h"
|
33
33
|
#include "scopeinfo.h"
|
34
34
|
#include "top.h"
|
35
|
-
#include "zone-inl.h"
|
36
35
|
|
37
36
|
namespace v8 {
|
38
37
|
namespace internal {
|
@@ -493,11 +492,11 @@ Object* Accessors::FunctionGetLength(Object* object, void*) {
|
|
493
492
|
// If the function isn't compiled yet, the length is not computed
|
494
493
|
// correctly yet. Compile it now and return the right length.
|
495
494
|
HandleScope scope;
|
496
|
-
Handle<
|
497
|
-
if (!
|
495
|
+
Handle<SharedFunctionInfo> shared(function->shared());
|
496
|
+
if (!CompileLazyShared(shared, KEEP_EXCEPTION)) {
|
498
497
|
return Failure::Exception();
|
499
498
|
}
|
500
|
-
return Smi::FromInt(
|
499
|
+
return Smi::FromInt(shared->length());
|
501
500
|
} else {
|
502
501
|
return Smi::FromInt(function->shared()->length());
|
503
502
|
}
|
@@ -647,42 +646,9 @@ Object* Accessors::ObjectGetPrototype(Object* receiver, void*) {
|
|
647
646
|
Object* Accessors::ObjectSetPrototype(JSObject* receiver,
|
648
647
|
Object* value,
|
649
648
|
void*) {
|
650
|
-
|
651
|
-
// prototype cycles are prevented.
|
652
|
-
// It is sufficient to validate that the receiver is not in the new prototype
|
653
|
-
// chain.
|
654
|
-
|
655
|
-
// Silently ignore the change if value is not a JSObject or null.
|
656
|
-
// SpiderMonkey behaves this way.
|
657
|
-
if (!value->IsJSObject() && !value->IsNull()) return value;
|
658
|
-
|
659
|
-
for (Object* pt = value; pt != Heap::null_value(); pt = pt->GetPrototype()) {
|
660
|
-
if (JSObject::cast(pt) == receiver) {
|
661
|
-
// Cycle detected.
|
662
|
-
HandleScope scope;
|
663
|
-
return Top::Throw(*Factory::NewError("cyclic_proto",
|
664
|
-
HandleVector<Object>(NULL, 0)));
|
665
|
-
}
|
666
|
-
}
|
667
|
-
|
668
|
-
// Find the first object in the chain whose prototype object is not
|
669
|
-
// hidden and set the new prototype on that object.
|
670
|
-
JSObject* current = receiver;
|
671
|
-
Object* current_proto = receiver->GetPrototype();
|
672
|
-
while (current_proto->IsJSObject() &&
|
673
|
-
JSObject::cast(current_proto)->map()->is_hidden_prototype()) {
|
674
|
-
current = JSObject::cast(current_proto);
|
675
|
-
current_proto = current_proto->GetPrototype();
|
676
|
-
}
|
677
|
-
|
678
|
-
// Set the new prototype of the object.
|
679
|
-
Object* new_map = current->map()->CopyDropTransitions();
|
680
|
-
if (new_map->IsFailure()) return new_map;
|
681
|
-
Map::cast(new_map)->set_prototype(value);
|
682
|
-
current->set_map(Map::cast(new_map));
|
683
|
-
|
649
|
+
const bool skip_hidden_prototypes = true;
|
684
650
|
// To be consistent with other Set functions, return the value.
|
685
|
-
return value;
|
651
|
+
return receiver->SetPrototype(value, skip_hidden_prototypes);
|
686
652
|
}
|
687
653
|
|
688
654
|
|
File without changes
|
File without changes
|
File without changes
|
@@ -34,13 +34,17 @@
|
|
34
34
|
#include "debug.h"
|
35
35
|
#include "execution.h"
|
36
36
|
#include "global-handles.h"
|
37
|
+
#include "messages.h"
|
37
38
|
#include "platform.h"
|
39
|
+
#include "profile-generator-inl.h"
|
38
40
|
#include "serialize.h"
|
39
41
|
#include "snapshot.h"
|
42
|
+
#include "top.h"
|
40
43
|
#include "utils.h"
|
41
44
|
#include "v8threads.h"
|
42
45
|
#include "version.h"
|
43
46
|
|
47
|
+
#include "../include/v8-profiler.h"
|
44
48
|
|
45
49
|
#define LOG_API(expr) LOG(ApiEntryCall(expr))
|
46
50
|
|
@@ -438,7 +442,6 @@ bool V8::IsGlobalWeak(i::Object** obj) {
|
|
438
442
|
void V8::DisposeGlobal(i::Object** obj) {
|
439
443
|
LOG_API("DisposeGlobal");
|
440
444
|
if (!i::V8::IsRunning()) return;
|
441
|
-
if ((*obj)->IsGlobalContext()) i::Heap::NotifyContextDisposed();
|
442
445
|
i::GlobalHandles::Destroy(obj);
|
443
446
|
}
|
444
447
|
|
@@ -536,10 +539,17 @@ i::Object** v8::HandleScope::RawClose(i::Object** value) {
|
|
536
539
|
LOG_API("CloseHandleScope");
|
537
540
|
|
538
541
|
// Read the result before popping the handle block.
|
539
|
-
i::Object* result =
|
542
|
+
i::Object* result = NULL;
|
543
|
+
if (value != NULL) {
|
544
|
+
result = *value;
|
545
|
+
}
|
540
546
|
is_closed_ = true;
|
541
547
|
i::HandleScope::Leave(&previous_);
|
542
548
|
|
549
|
+
if (value == NULL) {
|
550
|
+
return NULL;
|
551
|
+
}
|
552
|
+
|
543
553
|
// Allocate a new handle on the previous handle block.
|
544
554
|
i::Handle<i::Object> handle(result);
|
545
555
|
return handle.location();
|
@@ -1106,7 +1116,8 @@ ScriptData* ScriptData::New(unsigned* data, int length) {
|
|
1106
1116
|
|
1107
1117
|
Local<Script> Script::New(v8::Handle<String> source,
|
1108
1118
|
v8::ScriptOrigin* origin,
|
1109
|
-
v8::ScriptData*
|
1119
|
+
v8::ScriptData* pre_data,
|
1120
|
+
v8::Handle<String> script_data) {
|
1110
1121
|
ON_BAILOUT("v8::Script::New()", return Local<Script>());
|
1111
1122
|
LOG_API("Script::New");
|
1112
1123
|
ENTER_V8;
|
@@ -1126,23 +1137,26 @@ Local<Script> Script::New(v8::Handle<String> source,
|
|
1126
1137
|
}
|
1127
1138
|
}
|
1128
1139
|
EXCEPTION_PREAMBLE();
|
1129
|
-
i::ScriptDataImpl*
|
1140
|
+
i::ScriptDataImpl* pre_data_impl = static_cast<i::ScriptDataImpl*>(pre_data);
|
1130
1141
|
// We assert that the pre-data is sane, even though we can actually
|
1131
1142
|
// handle it if it turns out not to be in release mode.
|
1132
|
-
ASSERT(
|
1143
|
+
ASSERT(pre_data_impl == NULL || pre_data_impl->SanityCheck());
|
1133
1144
|
// If the pre-data isn't sane we simply ignore it
|
1134
|
-
if (
|
1135
|
-
|
1136
|
-
}
|
1137
|
-
i::Handle<i::
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1145
|
+
if (pre_data_impl != NULL && !pre_data_impl->SanityCheck()) {
|
1146
|
+
pre_data_impl = NULL;
|
1147
|
+
}
|
1148
|
+
i::Handle<i::SharedFunctionInfo> result =
|
1149
|
+
i::Compiler::Compile(str,
|
1150
|
+
name_obj,
|
1151
|
+
line_offset,
|
1152
|
+
column_offset,
|
1153
|
+
NULL,
|
1154
|
+
pre_data_impl,
|
1155
|
+
Utils::OpenHandle(*script_data),
|
1156
|
+
i::NOT_NATIVES_CODE);
|
1157
|
+
has_pending_exception = result.is_null();
|
1144
1158
|
EXCEPTION_BAILOUT_CHECK(Local<Script>());
|
1145
|
-
return Local<Script>(ToApi<Script>(
|
1159
|
+
return Local<Script>(ToApi<Script>(result));
|
1146
1160
|
}
|
1147
1161
|
|
1148
1162
|
|
@@ -1155,25 +1169,29 @@ Local<Script> Script::New(v8::Handle<String> source,
|
|
1155
1169
|
|
1156
1170
|
Local<Script> Script::Compile(v8::Handle<String> source,
|
1157
1171
|
v8::ScriptOrigin* origin,
|
1158
|
-
v8::ScriptData*
|
1172
|
+
v8::ScriptData* pre_data,
|
1173
|
+
v8::Handle<String> script_data) {
|
1159
1174
|
ON_BAILOUT("v8::Script::Compile()", return Local<Script>());
|
1160
1175
|
LOG_API("Script::Compile");
|
1161
1176
|
ENTER_V8;
|
1162
|
-
Local<Script> generic = New(source, origin, script_data);
|
1177
|
+
Local<Script> generic = New(source, origin, pre_data, script_data);
|
1163
1178
|
if (generic.IsEmpty())
|
1164
1179
|
return generic;
|
1165
|
-
i::Handle<i::
|
1180
|
+
i::Handle<i::Object> obj = Utils::OpenHandle(*generic);
|
1181
|
+
i::Handle<i::SharedFunctionInfo> function =
|
1182
|
+
i::Handle<i::SharedFunctionInfo>(i::SharedFunctionInfo::cast(*obj));
|
1166
1183
|
i::Handle<i::JSFunction> result =
|
1167
|
-
i::Factory::
|
1168
|
-
|
1184
|
+
i::Factory::NewFunctionFromSharedFunctionInfo(function,
|
1185
|
+
i::Top::global_context());
|
1169
1186
|
return Local<Script>(ToApi<Script>(result));
|
1170
1187
|
}
|
1171
1188
|
|
1172
1189
|
|
1173
1190
|
Local<Script> Script::Compile(v8::Handle<String> source,
|
1174
|
-
v8::Handle<Value> file_name
|
1191
|
+
v8::Handle<Value> file_name,
|
1192
|
+
v8::Handle<String> script_data) {
|
1175
1193
|
ScriptOrigin origin(file_name);
|
1176
|
-
return Compile(source, &origin);
|
1194
|
+
return Compile(source, &origin, 0, script_data);
|
1177
1195
|
}
|
1178
1196
|
|
1179
1197
|
|
@@ -1184,10 +1202,15 @@ Local<Value> Script::Run() {
|
|
1184
1202
|
i::Object* raw_result = NULL;
|
1185
1203
|
{
|
1186
1204
|
HandleScope scope;
|
1187
|
-
i::Handle<i::
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1205
|
+
i::Handle<i::Object> obj = Utils::OpenHandle(this);
|
1206
|
+
i::Handle<i::JSFunction> fun;
|
1207
|
+
if (obj->IsSharedFunctionInfo()) {
|
1208
|
+
i::Handle<i::SharedFunctionInfo>
|
1209
|
+
function_info(i::SharedFunctionInfo::cast(*obj));
|
1210
|
+
fun = i::Factory::NewFunctionFromSharedFunctionInfo(
|
1211
|
+
function_info, i::Top::global_context());
|
1212
|
+
} else {
|
1213
|
+
fun = i::Handle<i::JSFunction>(i::JSFunction::cast(*obj));
|
1191
1214
|
}
|
1192
1215
|
EXCEPTION_PREAMBLE();
|
1193
1216
|
i::Handle<i::Object> receiver(i::Top::context()->global_proxy());
|
@@ -1201,14 +1224,28 @@ Local<Value> Script::Run() {
|
|
1201
1224
|
}
|
1202
1225
|
|
1203
1226
|
|
1227
|
+
static i::Handle<i::SharedFunctionInfo> OpenScript(Script* script) {
|
1228
|
+
i::Handle<i::Object> obj = Utils::OpenHandle(script);
|
1229
|
+
i::Handle<i::SharedFunctionInfo> result;
|
1230
|
+
if (obj->IsSharedFunctionInfo()) {
|
1231
|
+
result =
|
1232
|
+
i::Handle<i::SharedFunctionInfo>(i::SharedFunctionInfo::cast(*obj));
|
1233
|
+
} else {
|
1234
|
+
result =
|
1235
|
+
i::Handle<i::SharedFunctionInfo>(i::JSFunction::cast(*obj)->shared());
|
1236
|
+
}
|
1237
|
+
return result;
|
1238
|
+
}
|
1239
|
+
|
1240
|
+
|
1204
1241
|
Local<Value> Script::Id() {
|
1205
1242
|
ON_BAILOUT("v8::Script::Id()", return Local<Value>());
|
1206
1243
|
LOG_API("Script::Id");
|
1207
1244
|
i::Object* raw_id = NULL;
|
1208
1245
|
{
|
1209
1246
|
HandleScope scope;
|
1210
|
-
i::Handle<i::
|
1211
|
-
i::Handle<i::Script> script(i::Script::cast(
|
1247
|
+
i::Handle<i::SharedFunctionInfo> function_info = OpenScript(this);
|
1248
|
+
i::Handle<i::Script> script(i::Script::cast(function_info->script()));
|
1212
1249
|
i::Handle<i::Object> id(script->id());
|
1213
1250
|
raw_id = *id;
|
1214
1251
|
}
|
@@ -1222,9 +1259,9 @@ void Script::SetData(v8::Handle<String> data) {
|
|
1222
1259
|
LOG_API("Script::SetData");
|
1223
1260
|
{
|
1224
1261
|
HandleScope scope;
|
1225
|
-
i::Handle<i::
|
1262
|
+
i::Handle<i::SharedFunctionInfo> function_info = OpenScript(this);
|
1226
1263
|
i::Handle<i::Object> raw_data = Utils::OpenHandle(*data);
|
1227
|
-
i::Handle<i::Script> script(i::Script::cast(
|
1264
|
+
i::Handle<i::Script> script(i::Script::cast(function_info->script()));
|
1228
1265
|
script->set_data(*raw_data);
|
1229
1266
|
}
|
1230
1267
|
}
|
@@ -1570,6 +1607,18 @@ bool Value::IsInt32() const {
|
|
1570
1607
|
}
|
1571
1608
|
|
1572
1609
|
|
1610
|
+
bool Value::IsUint32() const {
|
1611
|
+
if (IsDeadCheck("v8::Value::IsUint32()")) return false;
|
1612
|
+
i::Handle<i::Object> obj = Utils::OpenHandle(this);
|
1613
|
+
if (obj->IsSmi()) return i::Smi::cast(*obj)->value() >= 0;
|
1614
|
+
if (obj->IsNumber()) {
|
1615
|
+
double value = obj->Number();
|
1616
|
+
return i::FastUI2D(i::FastD2UI(value)) == value;
|
1617
|
+
}
|
1618
|
+
return false;
|
1619
|
+
}
|
1620
|
+
|
1621
|
+
|
1573
1622
|
bool Value::IsDate() const {
|
1574
1623
|
if (IsDeadCheck("v8::Value::IsDate()")) return false;
|
1575
1624
|
i::Handle<i::Object> obj = Utils::OpenHandle(this);
|
@@ -1975,6 +2024,23 @@ bool v8::Object::Set(v8::Handle<Value> key, v8::Handle<Value> value,
|
|
1975
2024
|
}
|
1976
2025
|
|
1977
2026
|
|
2027
|
+
bool v8::Object::Set(uint32_t index, v8::Handle<Value> value) {
|
2028
|
+
ON_BAILOUT("v8::Object::Set()", return false);
|
2029
|
+
ENTER_V8;
|
2030
|
+
HandleScope scope;
|
2031
|
+
i::Handle<i::JSObject> self = Utils::OpenHandle(this);
|
2032
|
+
i::Handle<i::Object> value_obj = Utils::OpenHandle(*value);
|
2033
|
+
EXCEPTION_PREAMBLE();
|
2034
|
+
i::Handle<i::Object> obj = i::SetElement(
|
2035
|
+
self,
|
2036
|
+
index,
|
2037
|
+
value_obj);
|
2038
|
+
has_pending_exception = obj.is_null();
|
2039
|
+
EXCEPTION_BAILOUT_CHECK(false);
|
2040
|
+
return true;
|
2041
|
+
}
|
2042
|
+
|
2043
|
+
|
1978
2044
|
bool v8::Object::ForceSet(v8::Handle<Value> key,
|
1979
2045
|
v8::Handle<Value> value,
|
1980
2046
|
v8::PropertyAttribute attribs) {
|
@@ -2023,6 +2089,18 @@ Local<Value> v8::Object::Get(v8::Handle<Value> key) {
|
|
2023
2089
|
}
|
2024
2090
|
|
2025
2091
|
|
2092
|
+
Local<Value> v8::Object::Get(uint32_t index) {
|
2093
|
+
ON_BAILOUT("v8::Object::Get()", return Local<v8::Value>());
|
2094
|
+
ENTER_V8;
|
2095
|
+
i::Handle<i::JSObject> self = Utils::OpenHandle(this);
|
2096
|
+
EXCEPTION_PREAMBLE();
|
2097
|
+
i::Handle<i::Object> result = i::GetElement(self, index);
|
2098
|
+
has_pending_exception = result.is_null();
|
2099
|
+
EXCEPTION_BAILOUT_CHECK(Local<Value>());
|
2100
|
+
return Utils::ToLocal(result);
|
2101
|
+
}
|
2102
|
+
|
2103
|
+
|
2026
2104
|
Local<Value> v8::Object::GetPrototype() {
|
2027
2105
|
ON_BAILOUT("v8::Object::GetPrototype()", return Local<v8::Value>());
|
2028
2106
|
ENTER_V8;
|
@@ -2032,6 +2110,19 @@ Local<Value> v8::Object::GetPrototype() {
|
|
2032
2110
|
}
|
2033
2111
|
|
2034
2112
|
|
2113
|
+
bool v8::Object::SetPrototype(Handle<Value> value) {
|
2114
|
+
ON_BAILOUT("v8::Object::SetPrototype()", return false);
|
2115
|
+
ENTER_V8;
|
2116
|
+
i::Handle<i::JSObject> self = Utils::OpenHandle(this);
|
2117
|
+
i::Handle<i::Object> value_obj = Utils::OpenHandle(*value);
|
2118
|
+
EXCEPTION_PREAMBLE();
|
2119
|
+
i::Handle<i::Object> result = i::SetPrototype(self, value_obj);
|
2120
|
+
has_pending_exception = result.is_null();
|
2121
|
+
EXCEPTION_BAILOUT_CHECK(false);
|
2122
|
+
return true;
|
2123
|
+
}
|
2124
|
+
|
2125
|
+
|
2035
2126
|
Local<Object> v8::Object::FindInstanceInPrototypeChain(
|
2036
2127
|
v8::Handle<FunctionTemplate> tmpl) {
|
2037
2128
|
ON_BAILOUT("v8::Object::FindInstanceInPrototypeChain()",
|
@@ -2194,7 +2285,7 @@ Local<Value> v8::Object::GetRealNamedPropertyInPrototypeChain(
|
|
2194
2285
|
i::Handle<i::String> key_obj = Utils::OpenHandle(*key);
|
2195
2286
|
i::LookupResult lookup;
|
2196
2287
|
self_obj->LookupRealNamedPropertyInPrototypes(*key_obj, &lookup);
|
2197
|
-
if (lookup.
|
2288
|
+
if (lookup.IsProperty()) {
|
2198
2289
|
PropertyAttributes attributes;
|
2199
2290
|
i::Handle<i::Object> result(self_obj->GetProperty(*self_obj,
|
2200
2291
|
&lookup,
|
@@ -2213,7 +2304,7 @@ Local<Value> v8::Object::GetRealNamedProperty(Handle<String> key) {
|
|
2213
2304
|
i::Handle<i::String> key_obj = Utils::OpenHandle(*key);
|
2214
2305
|
i::LookupResult lookup;
|
2215
2306
|
self_obj->LookupRealNamedProperty(*key_obj, &lookup);
|
2216
|
-
if (lookup.
|
2307
|
+
if (lookup.IsProperty()) {
|
2217
2308
|
PropertyAttributes attributes;
|
2218
2309
|
i::Handle<i::Object> result(self_obj->GetProperty(*self_obj,
|
2219
2310
|
&lookup,
|
@@ -2445,6 +2536,99 @@ Handle<Value> Function::GetName() const {
|
|
2445
2536
|
}
|
2446
2537
|
|
2447
2538
|
|
2539
|
+
ScriptOrigin Function::GetScriptOrigin() const {
|
2540
|
+
i::Handle<i::JSFunction> func = Utils::OpenHandle(this);
|
2541
|
+
if (func->shared()->script()->IsScript()) {
|
2542
|
+
i::Handle<i::Script> script(i::Script::cast(func->shared()->script()));
|
2543
|
+
v8::ScriptOrigin origin(
|
2544
|
+
Utils::ToLocal(i::Handle<i::Object>(script->name())),
|
2545
|
+
v8::Integer::New(script->line_offset()->value()),
|
2546
|
+
v8::Integer::New(script->column_offset()->value()));
|
2547
|
+
return origin;
|
2548
|
+
}
|
2549
|
+
return v8::ScriptOrigin(Handle<Value>());
|
2550
|
+
}
|
2551
|
+
|
2552
|
+
|
2553
|
+
const int Function::kLineOffsetNotFound = -1;
|
2554
|
+
|
2555
|
+
|
2556
|
+
int Function::GetScriptLineNumber() const {
|
2557
|
+
i::Handle<i::JSFunction> func = Utils::OpenHandle(this);
|
2558
|
+
if (func->shared()->script()->IsScript()) {
|
2559
|
+
i::Handle<i::Script> script(i::Script::cast(func->shared()->script()));
|
2560
|
+
return i::GetScriptLineNumber(script, func->shared()->start_position());
|
2561
|
+
}
|
2562
|
+
return kLineOffsetNotFound;
|
2563
|
+
}
|
2564
|
+
|
2565
|
+
|
2566
|
+
namespace {
|
2567
|
+
|
2568
|
+
// Tracks string usage to help make better decisions when
|
2569
|
+
// externalizing strings.
|
2570
|
+
//
|
2571
|
+
// Implementation note: internally this class only tracks fresh
|
2572
|
+
// strings and keeps a single use counter for them.
|
2573
|
+
class StringTracker {
|
2574
|
+
public:
|
2575
|
+
// Records that the given string's characters were copied to some
|
2576
|
+
// external buffer. If this happens often we should honor
|
2577
|
+
// externalization requests for the string.
|
2578
|
+
static void RecordWrite(i::Handle<i::String> string) {
|
2579
|
+
i::Address address = reinterpret_cast<i::Address>(*string);
|
2580
|
+
i::Address top = i::Heap::NewSpaceTop();
|
2581
|
+
if (IsFreshString(address, top)) {
|
2582
|
+
IncrementUseCount(top);
|
2583
|
+
}
|
2584
|
+
}
|
2585
|
+
|
2586
|
+
// Estimates freshness and use frequency of the given string based
|
2587
|
+
// on how close it is to the new space top and the recorded usage
|
2588
|
+
// history.
|
2589
|
+
static inline bool IsFreshUnusedString(i::Handle<i::String> string) {
|
2590
|
+
i::Address address = reinterpret_cast<i::Address>(*string);
|
2591
|
+
i::Address top = i::Heap::NewSpaceTop();
|
2592
|
+
return IsFreshString(address, top) && IsUseCountLow(top);
|
2593
|
+
}
|
2594
|
+
|
2595
|
+
private:
|
2596
|
+
static inline bool IsFreshString(i::Address string, i::Address top) {
|
2597
|
+
return top - kFreshnessLimit <= string && string <= top;
|
2598
|
+
}
|
2599
|
+
|
2600
|
+
static inline bool IsUseCountLow(i::Address top) {
|
2601
|
+
if (last_top_ != top) return true;
|
2602
|
+
return use_count_ < kUseLimit;
|
2603
|
+
}
|
2604
|
+
|
2605
|
+
static inline void IncrementUseCount(i::Address top) {
|
2606
|
+
if (last_top_ != top) {
|
2607
|
+
use_count_ = 0;
|
2608
|
+
last_top_ = top;
|
2609
|
+
}
|
2610
|
+
++use_count_;
|
2611
|
+
}
|
2612
|
+
|
2613
|
+
// How close to the new space top a fresh string has to be.
|
2614
|
+
static const int kFreshnessLimit = 1024;
|
2615
|
+
|
2616
|
+
// The number of uses required to consider a string useful.
|
2617
|
+
static const int kUseLimit = 32;
|
2618
|
+
|
2619
|
+
// Single use counter shared by all fresh strings.
|
2620
|
+
static int use_count_;
|
2621
|
+
|
2622
|
+
// Last new space top when the use count above was valid.
|
2623
|
+
static i::Address last_top_;
|
2624
|
+
};
|
2625
|
+
|
2626
|
+
int StringTracker::use_count_ = 0;
|
2627
|
+
i::Address StringTracker::last_top_ = NULL;
|
2628
|
+
|
2629
|
+
} // namespace
|
2630
|
+
|
2631
|
+
|
2448
2632
|
int String::Length() const {
|
2449
2633
|
if (IsDeadCheck("v8::String::Length()")) return 0;
|
2450
2634
|
return Utils::OpenHandle(this)->length();
|
@@ -2457,11 +2641,20 @@ int String::Utf8Length() const {
|
|
2457
2641
|
}
|
2458
2642
|
|
2459
2643
|
|
2460
|
-
int String::WriteUtf8(char* buffer,
|
2644
|
+
int String::WriteUtf8(char* buffer,
|
2645
|
+
int capacity,
|
2646
|
+
int* nchars_ref,
|
2647
|
+
WriteHints hints) const {
|
2461
2648
|
if (IsDeadCheck("v8::String::WriteUtf8()")) return 0;
|
2462
2649
|
LOG_API("String::WriteUtf8");
|
2463
2650
|
ENTER_V8;
|
2464
2651
|
i::Handle<i::String> str = Utils::OpenHandle(this);
|
2652
|
+
StringTracker::RecordWrite(str);
|
2653
|
+
if (hints & HINT_MANY_WRITES_EXPECTED) {
|
2654
|
+
// Flatten the string for efficiency. This applies whether we are
|
2655
|
+
// using StringInputBuffer or Get(i) to access the characters.
|
2656
|
+
str->TryFlatten();
|
2657
|
+
}
|
2465
2658
|
write_input_buffer.Reset(0, *str);
|
2466
2659
|
int len = str->length();
|
2467
2660
|
// Encode the first K - 3 bytes directly into the buffer since we
|
@@ -2470,10 +2663,12 @@ int String::WriteUtf8(char* buffer, int capacity) const {
|
|
2470
2663
|
int fast_end = capacity - (unibrow::Utf8::kMaxEncodedSize - 1);
|
2471
2664
|
int i;
|
2472
2665
|
int pos = 0;
|
2666
|
+
int nchars = 0;
|
2473
2667
|
for (i = 0; i < len && (capacity == -1 || pos < fast_end); i++) {
|
2474
2668
|
i::uc32 c = write_input_buffer.GetNext();
|
2475
2669
|
int written = unibrow::Utf8::Encode(buffer + pos, c);
|
2476
2670
|
pos += written;
|
2671
|
+
nchars++;
|
2477
2672
|
}
|
2478
2673
|
if (i < len) {
|
2479
2674
|
// For the last characters we need to check the length for each one
|
@@ -2487,27 +2682,35 @@ int String::WriteUtf8(char* buffer, int capacity) const {
|
|
2487
2682
|
for (int j = 0; j < written; j++)
|
2488
2683
|
buffer[pos + j] = intermediate[j];
|
2489
2684
|
pos += written;
|
2685
|
+
nchars++;
|
2490
2686
|
} else {
|
2491
2687
|
// We've reached the end of the buffer
|
2492
2688
|
break;
|
2493
2689
|
}
|
2494
2690
|
}
|
2495
2691
|
}
|
2692
|
+
if (nchars_ref != NULL) *nchars_ref = nchars;
|
2496
2693
|
if (i == len && (capacity == -1 || pos < capacity))
|
2497
2694
|
buffer[pos++] = '\0';
|
2498
2695
|
return pos;
|
2499
2696
|
}
|
2500
2697
|
|
2501
2698
|
|
2502
|
-
int String::WriteAscii(char* buffer,
|
2699
|
+
int String::WriteAscii(char* buffer,
|
2700
|
+
int start,
|
2701
|
+
int length,
|
2702
|
+
WriteHints hints) const {
|
2503
2703
|
if (IsDeadCheck("v8::String::WriteAscii()")) return 0;
|
2504
2704
|
LOG_API("String::WriteAscii");
|
2505
2705
|
ENTER_V8;
|
2506
2706
|
ASSERT(start >= 0 && length >= -1);
|
2507
2707
|
i::Handle<i::String> str = Utils::OpenHandle(this);
|
2508
|
-
|
2509
|
-
|
2510
|
-
|
2708
|
+
StringTracker::RecordWrite(str);
|
2709
|
+
if (hints & HINT_MANY_WRITES_EXPECTED) {
|
2710
|
+
// Flatten the string for efficiency. This applies whether we are
|
2711
|
+
// using StringInputBuffer or Get(i) to access the characters.
|
2712
|
+
str->TryFlatten();
|
2713
|
+
}
|
2511
2714
|
int end = length;
|
2512
2715
|
if ( (length == -1) || (length > str->length() - start) )
|
2513
2716
|
end = str->length() - start;
|
@@ -2525,12 +2728,21 @@ int String::WriteAscii(char* buffer, int start, int length) const {
|
|
2525
2728
|
}
|
2526
2729
|
|
2527
2730
|
|
2528
|
-
int String::Write(uint16_t* buffer,
|
2731
|
+
int String::Write(uint16_t* buffer,
|
2732
|
+
int start,
|
2733
|
+
int length,
|
2734
|
+
WriteHints hints) const {
|
2529
2735
|
if (IsDeadCheck("v8::String::Write()")) return 0;
|
2530
2736
|
LOG_API("String::Write");
|
2531
2737
|
ENTER_V8;
|
2532
2738
|
ASSERT(start >= 0 && length >= -1);
|
2533
2739
|
i::Handle<i::String> str = Utils::OpenHandle(this);
|
2740
|
+
StringTracker::RecordWrite(str);
|
2741
|
+
if (hints & HINT_MANY_WRITES_EXPECTED) {
|
2742
|
+
// Flatten the string for efficiency. This applies whether we are
|
2743
|
+
// using StringInputBuffer or Get(i) to access the characters.
|
2744
|
+
str->TryFlatten();
|
2745
|
+
}
|
2534
2746
|
int end = length;
|
2535
2747
|
if ( (length == -1) || (length > str->length() - start) )
|
2536
2748
|
end = str->length() - start;
|
@@ -2619,6 +2831,17 @@ int32_t Int32::Value() const {
|
|
2619
2831
|
}
|
2620
2832
|
|
2621
2833
|
|
2834
|
+
uint32_t Uint32::Value() const {
|
2835
|
+
if (IsDeadCheck("v8::Uint32::Value()")) return 0;
|
2836
|
+
i::Handle<i::Object> obj = Utils::OpenHandle(this);
|
2837
|
+
if (obj->IsSmi()) {
|
2838
|
+
return i::Smi::cast(*obj)->value();
|
2839
|
+
} else {
|
2840
|
+
return static_cast<uint32_t>(obj->Number());
|
2841
|
+
}
|
2842
|
+
}
|
2843
|
+
|
2844
|
+
|
2622
2845
|
int v8::Object::InternalFieldCount() {
|
2623
2846
|
if (IsDeadCheck("v8::Object::InternalFieldCount()")) return 0;
|
2624
2847
|
i::Handle<i::JSObject> obj = Utils::OpenHandle(this);
|
@@ -2659,6 +2882,7 @@ void v8::Object::SetInternalField(int index, v8::Handle<Value> value) {
|
|
2659
2882
|
|
2660
2883
|
|
2661
2884
|
void v8::Object::SetPointerInInternalField(int index, void* value) {
|
2885
|
+
ENTER_V8;
|
2662
2886
|
i::Object* as_object = reinterpret_cast<i::Object*>(value);
|
2663
2887
|
if (as_object->IsSmi()) {
|
2664
2888
|
Utils::OpenHandle(this)->SetInternalField(index, as_object);
|
@@ -2712,6 +2936,12 @@ void v8::V8::LowMemoryNotification() {
|
|
2712
2936
|
}
|
2713
2937
|
|
2714
2938
|
|
2939
|
+
int v8::V8::ContextDisposedNotification() {
|
2940
|
+
if (!i::V8::IsRunning()) return 0;
|
2941
|
+
return i::Heap::NotifyContextDisposed();
|
2942
|
+
}
|
2943
|
+
|
2944
|
+
|
2715
2945
|
const char* v8::V8::GetVersion() {
|
2716
2946
|
static v8::internal::EmbeddedVector<char, 128> buffer;
|
2717
2947
|
v8::internal::Version::GetString(buffer);
|
@@ -2743,13 +2973,6 @@ Persistent<Context> v8::Context::New(
|
|
2743
2973
|
i::Handle<i::Context> env;
|
2744
2974
|
{
|
2745
2975
|
ENTER_V8;
|
2746
|
-
#if defined(ANDROID)
|
2747
|
-
// On mobile device, full GC is expensive, leave it to the system to
|
2748
|
-
// decide when should make a full GC.
|
2749
|
-
#else
|
2750
|
-
// Give the heap a chance to cleanup if we've disposed contexts.
|
2751
|
-
i::Heap::CollectAllGarbageIfContextDisposed();
|
2752
|
-
#endif
|
2753
2976
|
v8::Handle<ObjectTemplate> proxy_template = global_template;
|
2754
2977
|
i::Handle<i::FunctionTemplateInfo> proxy_constructor;
|
2755
2978
|
i::Handle<i::FunctionTemplateInfo> global_constructor;
|
@@ -2890,6 +3113,16 @@ void Context::DetachGlobal() {
|
|
2890
3113
|
}
|
2891
3114
|
|
2892
3115
|
|
3116
|
+
void Context::ReattachGlobal(Handle<Object> global_object) {
|
3117
|
+
if (IsDeadCheck("v8::Context::ReattachGlobal()")) return;
|
3118
|
+
ENTER_V8;
|
3119
|
+
i::Object** ctx = reinterpret_cast<i::Object**>(this);
|
3120
|
+
i::Handle<i::Context> context =
|
3121
|
+
i::Handle<i::Context>::cast(i::Handle<i::Object>(ctx));
|
3122
|
+
i::Bootstrapper::ReattachGlobal(context, Utils::OpenHandle(*global_object));
|
3123
|
+
}
|
3124
|
+
|
3125
|
+
|
2893
3126
|
Local<v8::Object> ObjectTemplate::NewInstance() {
|
2894
3127
|
ON_BAILOUT("v8::ObjectTemplate::NewInstance()", return Local<v8::Object>());
|
2895
3128
|
LOG_API("ObjectTemplate::NewInstance");
|
@@ -3098,6 +3331,7 @@ bool v8::String::MakeExternal(v8::String::ExternalStringResource* resource) {
|
|
3098
3331
|
if (this->IsExternal()) return false; // Already an external string.
|
3099
3332
|
ENTER_V8;
|
3100
3333
|
i::Handle<i::String> obj = Utils::OpenHandle(this);
|
3334
|
+
if (StringTracker::IsFreshUnusedString(obj)) return false;
|
3101
3335
|
bool result = obj->MakeExternal(resource);
|
3102
3336
|
if (result && !obj->IsSymbol()) {
|
3103
3337
|
i::ExternalStringTable::AddString(*obj);
|
@@ -3123,6 +3357,7 @@ bool v8::String::MakeExternal(
|
|
3123
3357
|
if (this->IsExternal()) return false; // Already an external string.
|
3124
3358
|
ENTER_V8;
|
3125
3359
|
i::Handle<i::String> obj = Utils::OpenHandle(this);
|
3360
|
+
if (StringTracker::IsFreshUnusedString(obj)) return false;
|
3126
3361
|
bool result = obj->MakeExternal(resource);
|
3127
3362
|
if (result && !obj->IsSymbol()) {
|
3128
3363
|
i::ExternalStringTable::AddString(*obj);
|
@@ -3134,6 +3369,7 @@ bool v8::String::MakeExternal(
|
|
3134
3369
|
bool v8::String::CanMakeExternal() {
|
3135
3370
|
if (IsDeadCheck("v8::String::CanMakeExternal()")) return false;
|
3136
3371
|
i::Handle<i::String> obj = Utils::OpenHandle(this);
|
3372
|
+
if (StringTracker::IsFreshUnusedString(obj)) return false;
|
3137
3373
|
int size = obj->Size(); // Byte size of the original string.
|
3138
3374
|
if (size < i::ExternalString::kSize)
|
3139
3375
|
return false;
|
@@ -3211,6 +3447,7 @@ Local<Object> Array::CloneElementAt(uint32_t index) {
|
|
3211
3447
|
}
|
3212
3448
|
i::Handle<i::JSObject> paragon_handle(i::JSObject::cast(paragon));
|
3213
3449
|
EXCEPTION_PREAMBLE();
|
3450
|
+
ENTER_V8;
|
3214
3451
|
i::Handle<i::JSObject> result = i::Copy(paragon_handle);
|
3215
3452
|
has_pending_exception = result.is_null();
|
3216
3453
|
EXCEPTION_BAILOUT_CHECK(Local<Object>());
|
@@ -3355,16 +3592,40 @@ void V8::SetGlobalGCEpilogueCallback(GCCallback callback) {
|
|
3355
3592
|
}
|
3356
3593
|
|
3357
3594
|
|
3595
|
+
void V8::AddGCPrologueCallback(GCPrologueCallback callback, GCType gc_type) {
|
3596
|
+
if (IsDeadCheck("v8::V8::AddGCPrologueCallback()")) return;
|
3597
|
+
i::Heap::AddGCPrologueCallback(callback, gc_type);
|
3598
|
+
}
|
3599
|
+
|
3600
|
+
|
3601
|
+
void V8::RemoveGCPrologueCallback(GCPrologueCallback callback) {
|
3602
|
+
if (IsDeadCheck("v8::V8::RemoveGCPrologueCallback()")) return;
|
3603
|
+
i::Heap::RemoveGCPrologueCallback(callback);
|
3604
|
+
}
|
3605
|
+
|
3606
|
+
|
3607
|
+
void V8::AddGCEpilogueCallback(GCEpilogueCallback callback, GCType gc_type) {
|
3608
|
+
if (IsDeadCheck("v8::V8::AddGCEpilogueCallback()")) return;
|
3609
|
+
i::Heap::AddGCEpilogueCallback(callback, gc_type);
|
3610
|
+
}
|
3611
|
+
|
3612
|
+
|
3613
|
+
void V8::RemoveGCEpilogueCallback(GCEpilogueCallback callback) {
|
3614
|
+
if (IsDeadCheck("v8::V8::RemoveGCEpilogueCallback()")) return;
|
3615
|
+
i::Heap::RemoveGCEpilogueCallback(callback);
|
3616
|
+
}
|
3617
|
+
|
3618
|
+
|
3358
3619
|
void V8::PauseProfiler() {
|
3359
3620
|
#ifdef ENABLE_LOGGING_AND_PROFILING
|
3360
|
-
|
3621
|
+
PauseProfilerEx(PROFILER_MODULE_CPU);
|
3361
3622
|
#endif
|
3362
3623
|
}
|
3363
3624
|
|
3364
3625
|
|
3365
3626
|
void V8::ResumeProfiler() {
|
3366
3627
|
#ifdef ENABLE_LOGGING_AND_PROFILING
|
3367
|
-
|
3628
|
+
ResumeProfilerEx(PROFILER_MODULE_CPU);
|
3368
3629
|
#endif
|
3369
3630
|
}
|
3370
3631
|
|
@@ -3378,29 +3639,31 @@ bool V8::IsProfilerPaused() {
|
|
3378
3639
|
}
|
3379
3640
|
|
3380
3641
|
|
3381
|
-
void V8::ResumeProfilerEx(int flags) {
|
3642
|
+
void V8::ResumeProfilerEx(int flags, int tag) {
|
3382
3643
|
#ifdef ENABLE_LOGGING_AND_PROFILING
|
3383
3644
|
if (flags & PROFILER_MODULE_HEAP_SNAPSHOT) {
|
3384
3645
|
// Snapshot mode: resume modules, perform GC, then pause only
|
3385
3646
|
// those modules which haven't been started prior to making a
|
3386
3647
|
// snapshot.
|
3387
3648
|
|
3649
|
+
// Make a GC prior to taking a snapshot.
|
3650
|
+
i::Heap::CollectAllGarbage(false);
|
3388
3651
|
// Reset snapshot flag and CPU module flags.
|
3389
3652
|
flags &= ~(PROFILER_MODULE_HEAP_SNAPSHOT | PROFILER_MODULE_CPU);
|
3390
3653
|
const int current_flags = i::Logger::GetActiveProfilerModules();
|
3391
|
-
i::Logger::ResumeProfiler(flags);
|
3654
|
+
i::Logger::ResumeProfiler(flags, tag);
|
3392
3655
|
i::Heap::CollectAllGarbage(false);
|
3393
|
-
i::Logger::PauseProfiler(~current_flags & flags);
|
3656
|
+
i::Logger::PauseProfiler(~current_flags & flags, tag);
|
3394
3657
|
} else {
|
3395
|
-
i::Logger::ResumeProfiler(flags);
|
3658
|
+
i::Logger::ResumeProfiler(flags, tag);
|
3396
3659
|
}
|
3397
3660
|
#endif
|
3398
3661
|
}
|
3399
3662
|
|
3400
3663
|
|
3401
|
-
void V8::PauseProfilerEx(int flags) {
|
3664
|
+
void V8::PauseProfilerEx(int flags, int tag) {
|
3402
3665
|
#ifdef ENABLE_LOGGING_AND_PROFILING
|
3403
|
-
i::Logger::PauseProfiler(flags);
|
3666
|
+
i::Logger::PauseProfiler(flags, tag);
|
3404
3667
|
#endif
|
3405
3668
|
}
|
3406
3669
|
|
@@ -3416,6 +3679,7 @@ int V8::GetActiveProfilerModules() {
|
|
3416
3679
|
|
3417
3680
|
int V8::GetLogLines(int from_pos, char* dest_buf, int max_size) {
|
3418
3681
|
#ifdef ENABLE_LOGGING_AND_PROFILING
|
3682
|
+
ASSERT(max_size >= kMinimumSizeForLogLinesBuffer);
|
3419
3683
|
return i::Logger::GetLogLines(from_pos, dest_buf, max_size);
|
3420
3684
|
#endif
|
3421
3685
|
return 0;
|
@@ -3449,6 +3713,15 @@ void V8::TerminateExecution() {
|
|
3449
3713
|
}
|
3450
3714
|
|
3451
3715
|
|
3716
|
+
bool V8::IsExecutionTerminating() {
|
3717
|
+
if (!i::V8::IsRunning()) return false;
|
3718
|
+
if (i::Top::has_scheduled_exception()) {
|
3719
|
+
return i::Top::scheduled_exception() == i::Heap::termination_exception();
|
3720
|
+
}
|
3721
|
+
return false;
|
3722
|
+
}
|
3723
|
+
|
3724
|
+
|
3452
3725
|
String::Utf8Value::Utf8Value(v8::Handle<v8::Value> obj) {
|
3453
3726
|
EnsureInitialized("v8::String::Utf8Value::Utf8Value()");
|
3454
3727
|
if (obj.IsEmpty()) {
|
@@ -3669,7 +3942,6 @@ void Debug::SetMessageHandler(v8::Debug::MessageHandler handler,
|
|
3669
3942
|
void Debug::SetMessageHandler2(v8::Debug::MessageHandler2 handler) {
|
3670
3943
|
EnsureInitialized("v8::Debug::SetMessageHandler");
|
3671
3944
|
ENTER_V8;
|
3672
|
-
HandleScope scope;
|
3673
3945
|
i::Debugger::SetMessageHandler(handler);
|
3674
3946
|
}
|
3675
3947
|
|
@@ -3691,10 +3963,10 @@ void Debug::SetHostDispatchHandler(HostDispatchHandler handler,
|
|
3691
3963
|
|
3692
3964
|
|
3693
3965
|
void Debug::SetDebugMessageDispatchHandler(
|
3694
|
-
DebugMessageDispatchHandler handler) {
|
3966
|
+
DebugMessageDispatchHandler handler, bool provide_locker) {
|
3695
3967
|
EnsureInitialized("v8::Debug::SetDebugMessageDispatchHandler");
|
3696
3968
|
ENTER_V8;
|
3697
|
-
i::Debugger::SetDebugMessageDispatchHandler(handler);
|
3969
|
+
i::Debugger::SetDebugMessageDispatchHandler(handler, provide_locker);
|
3698
3970
|
}
|
3699
3971
|
|
3700
3972
|
|
@@ -3744,8 +4016,156 @@ Local<Value> Debug::GetMirror(v8::Handle<v8::Value> obj) {
|
|
3744
4016
|
bool Debug::EnableAgent(const char* name, int port, bool wait_for_connection) {
|
3745
4017
|
return i::Debugger::StartAgent(name, port, wait_for_connection);
|
3746
4018
|
}
|
4019
|
+
|
4020
|
+
void Debug::ProcessDebugMessages() {
|
4021
|
+
i::Execution::ProcessDebugMesssages(true);
|
4022
|
+
}
|
4023
|
+
|
4024
|
+
Local<Context> Debug::GetDebugContext() {
|
4025
|
+
EnsureInitialized("v8::Debug::GetDebugContext()");
|
4026
|
+
ENTER_V8;
|
4027
|
+
return Utils::ToLocal(i::Debugger::GetDebugContext());
|
4028
|
+
}
|
4029
|
+
|
3747
4030
|
#endif // ENABLE_DEBUGGER_SUPPORT
|
3748
4031
|
|
4032
|
+
|
4033
|
+
#ifdef ENABLE_LOGGING_AND_PROFILING
|
4034
|
+
|
4035
|
+
Handle<String> CpuProfileNode::GetFunctionName() const {
|
4036
|
+
IsDeadCheck("v8::CpuProfileNode::GetFunctionName");
|
4037
|
+
const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
|
4038
|
+
const i::CodeEntry* entry = node->entry();
|
4039
|
+
if (!entry->has_name_prefix()) {
|
4040
|
+
return Handle<String>(ToApi<String>(
|
4041
|
+
i::Factory::LookupAsciiSymbol(entry->name())));
|
4042
|
+
} else {
|
4043
|
+
return Handle<String>(ToApi<String>(i::Factory::NewConsString(
|
4044
|
+
i::Factory::LookupAsciiSymbol(entry->name_prefix()),
|
4045
|
+
i::Factory::LookupAsciiSymbol(entry->name()))));
|
4046
|
+
}
|
4047
|
+
}
|
4048
|
+
|
4049
|
+
|
4050
|
+
Handle<String> CpuProfileNode::GetScriptResourceName() const {
|
4051
|
+
IsDeadCheck("v8::CpuProfileNode::GetScriptResourceName");
|
4052
|
+
const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
|
4053
|
+
return Handle<String>(ToApi<String>(i::Factory::LookupAsciiSymbol(
|
4054
|
+
node->entry()->resource_name())));
|
4055
|
+
}
|
4056
|
+
|
4057
|
+
|
4058
|
+
int CpuProfileNode::GetLineNumber() const {
|
4059
|
+
IsDeadCheck("v8::CpuProfileNode::GetLineNumber");
|
4060
|
+
return reinterpret_cast<const i::ProfileNode*>(this)->entry()->line_number();
|
4061
|
+
}
|
4062
|
+
|
4063
|
+
|
4064
|
+
double CpuProfileNode::GetTotalTime() const {
|
4065
|
+
IsDeadCheck("v8::CpuProfileNode::GetTotalTime");
|
4066
|
+
return reinterpret_cast<const i::ProfileNode*>(this)->GetTotalMillis();
|
4067
|
+
}
|
4068
|
+
|
4069
|
+
|
4070
|
+
double CpuProfileNode::GetSelfTime() const {
|
4071
|
+
IsDeadCheck("v8::CpuProfileNode::GetSelfTime");
|
4072
|
+
return reinterpret_cast<const i::ProfileNode*>(this)->GetSelfMillis();
|
4073
|
+
}
|
4074
|
+
|
4075
|
+
|
4076
|
+
double CpuProfileNode::GetTotalSamplesCount() const {
|
4077
|
+
IsDeadCheck("v8::CpuProfileNode::GetTotalSamplesCount");
|
4078
|
+
return reinterpret_cast<const i::ProfileNode*>(this)->total_ticks();
|
4079
|
+
}
|
4080
|
+
|
4081
|
+
|
4082
|
+
double CpuProfileNode::GetSelfSamplesCount() const {
|
4083
|
+
IsDeadCheck("v8::CpuProfileNode::GetSelfSamplesCount");
|
4084
|
+
return reinterpret_cast<const i::ProfileNode*>(this)->self_ticks();
|
4085
|
+
}
|
4086
|
+
|
4087
|
+
|
4088
|
+
unsigned CpuProfileNode::GetCallUid() const {
|
4089
|
+
IsDeadCheck("v8::CpuProfileNode::GetCallUid");
|
4090
|
+
return reinterpret_cast<const i::ProfileNode*>(this)->entry()->call_uid();
|
4091
|
+
}
|
4092
|
+
|
4093
|
+
|
4094
|
+
int CpuProfileNode::GetChildrenCount() const {
|
4095
|
+
IsDeadCheck("v8::CpuProfileNode::GetChildrenCount");
|
4096
|
+
return reinterpret_cast<const i::ProfileNode*>(this)->children()->length();
|
4097
|
+
}
|
4098
|
+
|
4099
|
+
|
4100
|
+
const CpuProfileNode* CpuProfileNode::GetChild(int index) const {
|
4101
|
+
IsDeadCheck("v8::CpuProfileNode::GetChild");
|
4102
|
+
const i::ProfileNode* child =
|
4103
|
+
reinterpret_cast<const i::ProfileNode*>(this)->children()->at(index);
|
4104
|
+
return reinterpret_cast<const CpuProfileNode*>(child);
|
4105
|
+
}
|
4106
|
+
|
4107
|
+
|
4108
|
+
unsigned CpuProfile::GetUid() const {
|
4109
|
+
IsDeadCheck("v8::CpuProfile::GetUid");
|
4110
|
+
return reinterpret_cast<const i::CpuProfile*>(this)->uid();
|
4111
|
+
}
|
4112
|
+
|
4113
|
+
|
4114
|
+
Handle<String> CpuProfile::GetTitle() const {
|
4115
|
+
IsDeadCheck("v8::CpuProfile::GetTitle");
|
4116
|
+
const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this);
|
4117
|
+
return Handle<String>(ToApi<String>(i::Factory::LookupAsciiSymbol(
|
4118
|
+
profile->title())));
|
4119
|
+
}
|
4120
|
+
|
4121
|
+
|
4122
|
+
const CpuProfileNode* CpuProfile::GetBottomUpRoot() const {
|
4123
|
+
IsDeadCheck("v8::CpuProfile::GetBottomUpRoot");
|
4124
|
+
const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this);
|
4125
|
+
return reinterpret_cast<const CpuProfileNode*>(profile->bottom_up()->root());
|
4126
|
+
}
|
4127
|
+
|
4128
|
+
|
4129
|
+
const CpuProfileNode* CpuProfile::GetTopDownRoot() const {
|
4130
|
+
IsDeadCheck("v8::CpuProfile::GetTopDownRoot");
|
4131
|
+
const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this);
|
4132
|
+
return reinterpret_cast<const CpuProfileNode*>(profile->top_down()->root());
|
4133
|
+
}
|
4134
|
+
|
4135
|
+
|
4136
|
+
int CpuProfiler::GetProfilesCount() {
|
4137
|
+
IsDeadCheck("v8::CpuProfiler::GetProfilesCount");
|
4138
|
+
return i::CpuProfiler::GetProfilesCount();
|
4139
|
+
}
|
4140
|
+
|
4141
|
+
|
4142
|
+
const CpuProfile* CpuProfiler::GetProfile(int index) {
|
4143
|
+
IsDeadCheck("v8::CpuProfiler::GetProfile");
|
4144
|
+
return reinterpret_cast<const CpuProfile*>(i::CpuProfiler::GetProfile(index));
|
4145
|
+
}
|
4146
|
+
|
4147
|
+
|
4148
|
+
const CpuProfile* CpuProfiler::FindProfile(unsigned uid) {
|
4149
|
+
IsDeadCheck("v8::CpuProfiler::FindProfile");
|
4150
|
+
return reinterpret_cast<const CpuProfile*>(i::CpuProfiler::FindProfile(uid));
|
4151
|
+
}
|
4152
|
+
|
4153
|
+
|
4154
|
+
void CpuProfiler::StartProfiling(Handle<String> title) {
|
4155
|
+
IsDeadCheck("v8::CpuProfiler::StartProfiling");
|
4156
|
+
i::CpuProfiler::StartProfiling(*Utils::OpenHandle(*title));
|
4157
|
+
}
|
4158
|
+
|
4159
|
+
|
4160
|
+
const CpuProfile* CpuProfiler::StopProfiling(Handle<String> title) {
|
4161
|
+
IsDeadCheck("v8::CpuProfiler::StopProfiling");
|
4162
|
+
return reinterpret_cast<const CpuProfile*>(
|
4163
|
+
i::CpuProfiler::StopProfiling(*Utils::OpenHandle(*title)));
|
4164
|
+
}
|
4165
|
+
|
4166
|
+
#endif // ENABLE_LOGGING_AND_PROFILING
|
4167
|
+
|
4168
|
+
|
3749
4169
|
namespace internal {
|
3750
4170
|
|
3751
4171
|
|