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
@@ -84,32 +84,34 @@ class UTF8Buffer {
|
|
84
84
|
};
|
85
85
|
|
86
86
|
|
87
|
+
// Interface through which the scanner reads characters from the input source.
|
87
88
|
class UTF16Buffer {
|
88
89
|
public:
|
89
90
|
UTF16Buffer();
|
90
91
|
virtual ~UTF16Buffer() {}
|
91
92
|
|
92
93
|
virtual void PushBack(uc32 ch) = 0;
|
93
|
-
//
|
94
|
+
// Returns a value < 0 when the buffer end is reached.
|
94
95
|
virtual uc32 Advance() = 0;
|
95
96
|
virtual void SeekForward(int pos) = 0;
|
96
97
|
|
97
98
|
int pos() const { return pos_; }
|
98
|
-
int size() const { return size_; }
|
99
|
-
Handle<String> SubString(int start, int end);
|
100
99
|
|
101
100
|
protected:
|
102
|
-
|
103
|
-
int
|
104
|
-
int size_;
|
101
|
+
int pos_; // Current position in the buffer.
|
102
|
+
int end_; // Position where scanning should stop (EOF).
|
105
103
|
};
|
106
104
|
|
107
105
|
|
106
|
+
// UTF16 buffer to read characters from a character stream.
|
108
107
|
class CharacterStreamUTF16Buffer: public UTF16Buffer {
|
109
108
|
public:
|
110
109
|
CharacterStreamUTF16Buffer();
|
111
110
|
virtual ~CharacterStreamUTF16Buffer() {}
|
112
|
-
void Initialize(Handle<String> data,
|
111
|
+
void Initialize(Handle<String> data,
|
112
|
+
unibrow::CharacterStream* stream,
|
113
|
+
int start_position,
|
114
|
+
int end_position);
|
113
115
|
virtual void PushBack(uc32 ch);
|
114
116
|
virtual uc32 Advance();
|
115
117
|
virtual void SeekForward(int pos);
|
@@ -123,17 +125,21 @@ class CharacterStreamUTF16Buffer: public UTF16Buffer {
|
|
123
125
|
};
|
124
126
|
|
125
127
|
|
126
|
-
|
128
|
+
// UTF16 buffer to read characters from an external string.
|
129
|
+
template <typename StringType, typename CharType>
|
130
|
+
class ExternalStringUTF16Buffer: public UTF16Buffer {
|
127
131
|
public:
|
128
|
-
|
129
|
-
virtual ~
|
130
|
-
void Initialize(Handle<
|
132
|
+
ExternalStringUTF16Buffer();
|
133
|
+
virtual ~ExternalStringUTF16Buffer() {}
|
134
|
+
void Initialize(Handle<StringType> data,
|
135
|
+
int start_position,
|
136
|
+
int end_position);
|
131
137
|
virtual void PushBack(uc32 ch);
|
132
138
|
virtual uc32 Advance();
|
133
139
|
virtual void SeekForward(int pos);
|
134
140
|
|
135
141
|
private:
|
136
|
-
const
|
142
|
+
const CharType* raw_data_; // Pointer to the actual array of characters.
|
137
143
|
};
|
138
144
|
|
139
145
|
|
@@ -252,18 +258,26 @@ class KeywordMatcher {
|
|
252
258
|
};
|
253
259
|
|
254
260
|
|
261
|
+
enum ParserMode { PARSE, PREPARSE };
|
262
|
+
enum ParserLanguage { JAVASCRIPT, JSON };
|
263
|
+
|
264
|
+
|
255
265
|
class Scanner {
|
256
266
|
public:
|
257
|
-
|
258
267
|
typedef unibrow::Utf8InputBuffer<1024> Utf8Decoder;
|
259
268
|
|
260
269
|
// Construction
|
261
|
-
explicit Scanner(
|
262
|
-
|
263
|
-
// Initialize the Scanner to scan source
|
264
|
-
void
|
265
|
-
|
266
|
-
|
270
|
+
explicit Scanner(ParserMode parse_mode);
|
271
|
+
|
272
|
+
// Initialize the Scanner to scan source.
|
273
|
+
void Initialize(Handle<String> source,
|
274
|
+
ParserLanguage language);
|
275
|
+
void Initialize(Handle<String> source,
|
276
|
+
unibrow::CharacterStream* stream,
|
277
|
+
ParserLanguage language);
|
278
|
+
void Initialize(Handle<String> source,
|
279
|
+
int start_position, int end_position,
|
280
|
+
ParserLanguage language);
|
267
281
|
|
268
282
|
// Returns the next token.
|
269
283
|
Token::Value Next();
|
@@ -331,7 +345,6 @@ class Scanner {
|
|
331
345
|
// tokens, which is what it is used for.
|
332
346
|
void SeekForward(int pos);
|
333
347
|
|
334
|
-
Handle<String> SubString(int start_pos, int end_pos);
|
335
348
|
bool stack_overflow() { return stack_overflow_; }
|
336
349
|
|
337
350
|
static StaticResource<Utf8Decoder>* utf8_decoder() { return &utf8_decoder_; }
|
@@ -346,14 +359,28 @@ class Scanner {
|
|
346
359
|
static unibrow::Predicate<unibrow::WhiteSpace, 128> kIsWhiteSpace;
|
347
360
|
|
348
361
|
static const int kCharacterLookaheadBufferSize = 1;
|
362
|
+
static const int kNoEndPosition = 1;
|
349
363
|
|
350
364
|
private:
|
365
|
+
void Init(Handle<String> source,
|
366
|
+
unibrow::CharacterStream* stream,
|
367
|
+
int start_position, int end_position,
|
368
|
+
ParserLanguage language);
|
369
|
+
|
370
|
+
|
371
|
+
// Different UTF16 buffers used to pull characters from. Based on input one of
|
372
|
+
// these will be initialized as the actual data source.
|
351
373
|
CharacterStreamUTF16Buffer char_stream_buffer_;
|
352
|
-
|
374
|
+
ExternalStringUTF16Buffer<ExternalTwoByteString, uint16_t>
|
375
|
+
two_byte_string_buffer_;
|
376
|
+
ExternalStringUTF16Buffer<ExternalAsciiString, char> ascii_string_buffer_;
|
353
377
|
|
354
|
-
// Source.
|
378
|
+
// Source. Will point to one of the buffers declared above.
|
355
379
|
UTF16Buffer* source_;
|
356
|
-
|
380
|
+
|
381
|
+
// Used to convert the source string into a character stream when a stream
|
382
|
+
// is not passed to the scanner.
|
383
|
+
SafeStringInputBuffer safe_string_input_buffer_;
|
357
384
|
|
358
385
|
// Buffer to hold literal values (identifiers, strings, numbers)
|
359
386
|
// using 0-terminated UTF-8 encoding.
|
@@ -377,6 +404,7 @@ class Scanner {
|
|
377
404
|
TokenDesc next_; // desc for next token (one token look-ahead)
|
378
405
|
bool has_line_terminator_before_next_;
|
379
406
|
bool is_pre_parsing_;
|
407
|
+
bool is_parsing_json_;
|
380
408
|
|
381
409
|
// Literal buffer support
|
382
410
|
void StartLiteral();
|
@@ -391,14 +419,57 @@ class Scanner {
|
|
391
419
|
c0_ = ch;
|
392
420
|
}
|
393
421
|
|
394
|
-
bool SkipWhiteSpace()
|
422
|
+
bool SkipWhiteSpace() {
|
423
|
+
if (is_parsing_json_) {
|
424
|
+
return SkipJsonWhiteSpace();
|
425
|
+
} else {
|
426
|
+
return SkipJavaScriptWhiteSpace();
|
427
|
+
}
|
428
|
+
}
|
429
|
+
bool SkipJavaScriptWhiteSpace();
|
430
|
+
bool SkipJsonWhiteSpace();
|
395
431
|
Token::Value SkipSingleLineComment();
|
396
432
|
Token::Value SkipMultiLineComment();
|
397
433
|
|
398
434
|
inline Token::Value Select(Token::Value tok);
|
399
435
|
inline Token::Value Select(uc32 next, Token::Value then, Token::Value else_);
|
400
436
|
|
401
|
-
void Scan()
|
437
|
+
inline void Scan() {
|
438
|
+
if (is_parsing_json_) {
|
439
|
+
ScanJson();
|
440
|
+
} else {
|
441
|
+
ScanJavaScript();
|
442
|
+
}
|
443
|
+
}
|
444
|
+
|
445
|
+
// Scans a single JavaScript token.
|
446
|
+
void ScanJavaScript();
|
447
|
+
|
448
|
+
// Scan a single JSON token. The JSON lexical grammar is specified in the
|
449
|
+
// ECMAScript 5 standard, section 15.12.1.1.
|
450
|
+
// Recognizes all of the single-character tokens directly, or calls a function
|
451
|
+
// to scan a number, string or identifier literal.
|
452
|
+
// The only allowed whitespace characters between tokens are tab,
|
453
|
+
// carrige-return, newline and space.
|
454
|
+
void ScanJson();
|
455
|
+
|
456
|
+
// A JSON number (production JSONNumber) is a subset of the valid JavaScript
|
457
|
+
// decimal number literals.
|
458
|
+
// It includes an optional minus sign, must have at least one
|
459
|
+
// digit before and after a decimal point, may not have prefixed zeros (unless
|
460
|
+
// the integer part is zero), and may include an exponent part (e.g., "e-10").
|
461
|
+
// Hexadecimal and octal numbers are not allowed.
|
462
|
+
Token::Value ScanJsonNumber();
|
463
|
+
// A JSON string (production JSONString) is subset of valid JavaScript string
|
464
|
+
// literals. The string must only be double-quoted (not single-quoted), and
|
465
|
+
// the only allowed backslash-escapes are ", /, \, b, f, n, r, t and
|
466
|
+
// four-digit hex escapes (uXXXX). Any other use of backslashes is invalid.
|
467
|
+
Token::Value ScanJsonString();
|
468
|
+
// Used to recognizes one of the literals "true", "false", or "null". These
|
469
|
+
// are the only valid JSON identifiers (productions JSONBooleanLiteral,
|
470
|
+
// JSONNullLiteral).
|
471
|
+
Token::Value ScanJsonIdentifier(const char* text, Token::Value token);
|
472
|
+
|
402
473
|
void ScanDecimalDigits();
|
403
474
|
Token::Value ScanNumber(bool seen_period);
|
404
475
|
Token::Value ScanIdentifier();
|
@@ -412,7 +483,7 @@ class Scanner {
|
|
412
483
|
|
413
484
|
// Return the current source position.
|
414
485
|
int source_pos() {
|
415
|
-
return source_->pos() - kCharacterLookaheadBufferSize
|
486
|
+
return source_->pos() - kCharacterLookaheadBufferSize;
|
416
487
|
}
|
417
488
|
|
418
489
|
// Decodes a unicode escape-sequence which is part of an identifier.
|
@@ -82,7 +82,7 @@ ScopeInfo<Allocator>::ScopeInfo(Scope* scope)
|
|
82
82
|
List<Variable*, Allocator> heap_locals(locals.length());
|
83
83
|
for (int i = 0; i < locals.length(); i++) {
|
84
84
|
Variable* var = locals[i];
|
85
|
-
if (var->
|
85
|
+
if (var->is_used()) {
|
86
86
|
Slot* slot = var->slot();
|
87
87
|
if (slot != NULL) {
|
88
88
|
switch (slot->type()) {
|
@@ -130,7 +130,7 @@ ScopeInfo<Allocator>::ScopeInfo(Scope* scope)
|
|
130
130
|
if (scope->is_function_scope()) {
|
131
131
|
Variable* var = scope->function();
|
132
132
|
if (var != NULL &&
|
133
|
-
var->
|
133
|
+
var->is_used() &&
|
134
134
|
var->slot()->type() == Slot::CONTEXT) {
|
135
135
|
function_name_ = var->name();
|
136
136
|
// Note that we must not find the function name in the context slot
|
@@ -536,7 +536,7 @@ int ContextSlotCache::Hash(Code* code, String* name) {
|
|
536
536
|
// Uses only lower 32 bits if pointers are larger.
|
537
537
|
uintptr_t addr_hash =
|
538
538
|
static_cast<uint32_t>(reinterpret_cast<uintptr_t>(code)) >> 2;
|
539
|
-
return (addr_hash ^ name->Hash()) % kLength;
|
539
|
+
return static_cast<int>((addr_hash ^ name->Hash()) % kLength);
|
540
540
|
}
|
541
541
|
|
542
542
|
|
@@ -309,7 +309,7 @@ void Scope::CollectUsedVariables(List<Variable*, Allocator>* locals) {
|
|
309
309
|
// which is the current user of this function).
|
310
310
|
for (int i = 0; i < temps_.length(); i++) {
|
311
311
|
Variable* var = temps_[i];
|
312
|
-
if (var->
|
312
|
+
if (var->is_used()) {
|
313
313
|
locals->Add(var);
|
314
314
|
}
|
315
315
|
}
|
@@ -317,7 +317,7 @@ void Scope::CollectUsedVariables(List<Variable*, Allocator>* locals) {
|
|
317
317
|
p != NULL;
|
318
318
|
p = variables_.Next(p)) {
|
319
319
|
Variable* var = reinterpret_cast<Variable*>(p->value);
|
320
|
-
if (var->
|
320
|
+
if (var->is_used()) {
|
321
321
|
locals->Add(var);
|
322
322
|
}
|
323
323
|
}
|
@@ -418,17 +418,16 @@ static void PrintName(Handle<String> name) {
|
|
418
418
|
|
419
419
|
|
420
420
|
static void PrintVar(PrettyPrinter* printer, int indent, Variable* var) {
|
421
|
-
if (var->
|
421
|
+
if (var->is_used() || var->rewrite() != NULL) {
|
422
422
|
Indent(indent, Variable::Mode2String(var->mode()));
|
423
423
|
PrintF(" ");
|
424
424
|
PrintName(var->name());
|
425
425
|
PrintF("; // ");
|
426
|
-
if (var->rewrite() != NULL)
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
PrintF("
|
431
|
-
var->obj_uses()->Print();
|
426
|
+
if (var->rewrite() != NULL) {
|
427
|
+
PrintF("%s, ", printer->Print(var->rewrite()));
|
428
|
+
if (var->is_accessed_from_inner_scope()) PrintF(", ");
|
429
|
+
}
|
430
|
+
if (var->is_accessed_from_inner_scope()) PrintF("inner scope access");
|
432
431
|
PrintF("\n");
|
433
432
|
}
|
434
433
|
}
|
@@ -738,10 +737,10 @@ bool Scope::MustAllocate(Variable* var) {
|
|
738
737
|
(var->is_accessed_from_inner_scope_ ||
|
739
738
|
scope_calls_eval_ || inner_scope_calls_eval_ ||
|
740
739
|
scope_contains_with_)) {
|
741
|
-
var->
|
740
|
+
var->set_is_used(true);
|
742
741
|
}
|
743
742
|
// Global variables do not need to be allocated.
|
744
|
-
return !var->is_global() && var->
|
743
|
+
return !var->is_global() && var->is_used();
|
745
744
|
}
|
746
745
|
|
747
746
|
|
@@ -847,7 +846,7 @@ void Scope::AllocateParameterLocals() {
|
|
847
846
|
new Literal(Handle<Object>(Smi::FromInt(i))),
|
848
847
|
RelocInfo::kNoPosition,
|
849
848
|
Property::SYNTHETIC);
|
850
|
-
|
849
|
+
if (var->is_used()) arguments_shadow->set_is_used(true);
|
851
850
|
}
|
852
851
|
}
|
853
852
|
|
@@ -277,7 +277,6 @@ class Scope: public ZoneObject {
|
|
277
277
|
// The number of contexts between this and scope; zero if this == scope.
|
278
278
|
int ContextChainLength(Scope* scope);
|
279
279
|
|
280
|
-
|
281
280
|
// ---------------------------------------------------------------------------
|
282
281
|
// Debugging.
|
283
282
|
|
@@ -44,67 +44,6 @@
|
|
44
44
|
namespace v8 {
|
45
45
|
namespace internal {
|
46
46
|
|
47
|
-
// Mapping objects to their location after deserialization.
|
48
|
-
// This is used during building, but not at runtime by V8.
|
49
|
-
class SerializationAddressMapper {
|
50
|
-
public:
|
51
|
-
static bool IsMapped(HeapObject* obj) {
|
52
|
-
EnsureMapExists();
|
53
|
-
return serialization_map_->Lookup(Key(obj), Hash(obj), false) != NULL;
|
54
|
-
}
|
55
|
-
|
56
|
-
static int MappedTo(HeapObject* obj) {
|
57
|
-
ASSERT(IsMapped(obj));
|
58
|
-
return static_cast<int>(reinterpret_cast<intptr_t>(
|
59
|
-
serialization_map_->Lookup(Key(obj), Hash(obj), false)->value));
|
60
|
-
}
|
61
|
-
|
62
|
-
static void Map(HeapObject* obj, int to) {
|
63
|
-
EnsureMapExists();
|
64
|
-
ASSERT(!IsMapped(obj));
|
65
|
-
HashMap::Entry* entry =
|
66
|
-
serialization_map_->Lookup(Key(obj), Hash(obj), true);
|
67
|
-
entry->value = Value(to);
|
68
|
-
}
|
69
|
-
|
70
|
-
static void Zap() {
|
71
|
-
if (serialization_map_ != NULL) {
|
72
|
-
delete serialization_map_;
|
73
|
-
}
|
74
|
-
serialization_map_ = NULL;
|
75
|
-
}
|
76
|
-
|
77
|
-
private:
|
78
|
-
static bool SerializationMatchFun(void* key1, void* key2) {
|
79
|
-
return key1 == key2;
|
80
|
-
}
|
81
|
-
|
82
|
-
static uint32_t Hash(HeapObject* obj) {
|
83
|
-
return static_cast<int32_t>(reinterpret_cast<intptr_t>(obj->address()));
|
84
|
-
}
|
85
|
-
|
86
|
-
static void* Key(HeapObject* obj) {
|
87
|
-
return reinterpret_cast<void*>(obj->address());
|
88
|
-
}
|
89
|
-
|
90
|
-
static void* Value(int v) {
|
91
|
-
return reinterpret_cast<void*>(v);
|
92
|
-
}
|
93
|
-
|
94
|
-
static void EnsureMapExists() {
|
95
|
-
if (serialization_map_ == NULL) {
|
96
|
-
serialization_map_ = new HashMap(&SerializationMatchFun);
|
97
|
-
}
|
98
|
-
}
|
99
|
-
|
100
|
-
static HashMap* serialization_map_;
|
101
|
-
};
|
102
|
-
|
103
|
-
|
104
|
-
HashMap* SerializationAddressMapper::serialization_map_ = NULL;
|
105
|
-
|
106
|
-
|
107
|
-
|
108
47
|
|
109
48
|
// -----------------------------------------------------------------------------
|
110
49
|
// Coding of external references.
|
@@ -241,7 +180,7 @@ void ExternalReferenceTable::PopulateTable() {
|
|
241
180
|
|
242
181
|
static const RefTableEntry ref_table[] = {
|
243
182
|
// Builtins
|
244
|
-
#define DEF_ENTRY_C(name) \
|
183
|
+
#define DEF_ENTRY_C(name, ignored) \
|
245
184
|
{ C_BUILTIN, \
|
246
185
|
Builtins::c_##name, \
|
247
186
|
"Builtins::" #name },
|
@@ -249,11 +188,11 @@ void ExternalReferenceTable::PopulateTable() {
|
|
249
188
|
BUILTIN_LIST_C(DEF_ENTRY_C)
|
250
189
|
#undef DEF_ENTRY_C
|
251
190
|
|
252
|
-
#define DEF_ENTRY_C(name) \
|
191
|
+
#define DEF_ENTRY_C(name, ignored) \
|
253
192
|
{ BUILTIN, \
|
254
193
|
Builtins::name, \
|
255
194
|
"Builtins::" #name },
|
256
|
-
#define DEF_ENTRY_A(name, kind, state) DEF_ENTRY_C(name)
|
195
|
+
#define DEF_ENTRY_A(name, kind, state) DEF_ENTRY_C(name, ignored)
|
257
196
|
|
258
197
|
BUILTIN_LIST_C(DEF_ENTRY_C)
|
259
198
|
BUILTIN_LIST_A(DEF_ENTRY_A)
|
@@ -390,16 +329,17 @@ void ExternalReferenceTable::PopulateTable() {
|
|
390
329
|
RUNTIME_ENTRY,
|
391
330
|
1,
|
392
331
|
"Runtime::PerformGC");
|
393
|
-
Add(ExternalReference::
|
332
|
+
Add(ExternalReference::fill_heap_number_with_random_function().address(),
|
394
333
|
RUNTIME_ENTRY,
|
395
334
|
2,
|
396
|
-
"V8::
|
335
|
+
"V8::FillHeapNumberWithRandom");
|
336
|
+
|
337
|
+
Add(ExternalReference::random_uint32_function().address(),
|
338
|
+
RUNTIME_ENTRY,
|
339
|
+
3,
|
340
|
+
"V8::Random");
|
397
341
|
|
398
342
|
// Miscellaneous
|
399
|
-
Add(ExternalReference::builtin_passed_function().address(),
|
400
|
-
UNCLASSIFIED,
|
401
|
-
1,
|
402
|
-
"Builtins::builtin_passed_function");
|
403
343
|
Add(ExternalReference::the_hole_value_location().address(),
|
404
344
|
UNCLASSIFIED,
|
405
345
|
2,
|
@@ -424,75 +364,95 @@ void ExternalReferenceTable::PopulateTable() {
|
|
424
364
|
UNCLASSIFIED,
|
425
365
|
7,
|
426
366
|
"Heap::NewSpaceStart()");
|
427
|
-
Add(ExternalReference::
|
367
|
+
Add(ExternalReference::new_space_mask().address(),
|
428
368
|
UNCLASSIFIED,
|
429
369
|
8,
|
370
|
+
"Heap::NewSpaceMask()");
|
371
|
+
Add(ExternalReference::heap_always_allocate_scope_depth().address(),
|
372
|
+
UNCLASSIFIED,
|
373
|
+
9,
|
430
374
|
"Heap::always_allocate_scope_depth()");
|
431
375
|
Add(ExternalReference::new_space_allocation_limit_address().address(),
|
432
376
|
UNCLASSIFIED,
|
433
|
-
|
377
|
+
10,
|
434
378
|
"Heap::NewSpaceAllocationLimitAddress()");
|
435
379
|
Add(ExternalReference::new_space_allocation_top_address().address(),
|
436
380
|
UNCLASSIFIED,
|
437
|
-
|
381
|
+
11,
|
438
382
|
"Heap::NewSpaceAllocationTopAddress()");
|
439
383
|
#ifdef ENABLE_DEBUGGER_SUPPORT
|
440
384
|
Add(ExternalReference::debug_break().address(),
|
441
385
|
UNCLASSIFIED,
|
442
|
-
|
386
|
+
12,
|
443
387
|
"Debug::Break()");
|
444
388
|
Add(ExternalReference::debug_step_in_fp_address().address(),
|
445
389
|
UNCLASSIFIED,
|
446
|
-
|
390
|
+
13,
|
447
391
|
"Debug::step_in_fp_addr()");
|
448
392
|
#endif
|
449
393
|
Add(ExternalReference::double_fp_operation(Token::ADD).address(),
|
450
394
|
UNCLASSIFIED,
|
451
|
-
|
395
|
+
14,
|
452
396
|
"add_two_doubles");
|
453
397
|
Add(ExternalReference::double_fp_operation(Token::SUB).address(),
|
454
398
|
UNCLASSIFIED,
|
455
|
-
|
399
|
+
15,
|
456
400
|
"sub_two_doubles");
|
457
401
|
Add(ExternalReference::double_fp_operation(Token::MUL).address(),
|
458
402
|
UNCLASSIFIED,
|
459
|
-
|
403
|
+
16,
|
460
404
|
"mul_two_doubles");
|
461
405
|
Add(ExternalReference::double_fp_operation(Token::DIV).address(),
|
462
406
|
UNCLASSIFIED,
|
463
|
-
|
407
|
+
17,
|
464
408
|
"div_two_doubles");
|
465
409
|
Add(ExternalReference::double_fp_operation(Token::MOD).address(),
|
466
410
|
UNCLASSIFIED,
|
467
|
-
|
411
|
+
18,
|
468
412
|
"mod_two_doubles");
|
469
413
|
Add(ExternalReference::compare_doubles().address(),
|
470
414
|
UNCLASSIFIED,
|
471
|
-
|
415
|
+
19,
|
472
416
|
"compare_doubles");
|
473
|
-
|
417
|
+
Add(ExternalReference::compile_array_pop_call().address(),
|
418
|
+
UNCLASSIFIED,
|
419
|
+
20,
|
420
|
+
"compile_array_pop");
|
421
|
+
Add(ExternalReference::compile_array_push_call().address(),
|
422
|
+
UNCLASSIFIED,
|
423
|
+
21,
|
424
|
+
"compile_array_push");
|
425
|
+
#ifndef V8_INTERPRETED_REGEXP
|
474
426
|
Add(ExternalReference::re_case_insensitive_compare_uc16().address(),
|
475
427
|
UNCLASSIFIED,
|
476
|
-
|
428
|
+
22,
|
477
429
|
"NativeRegExpMacroAssembler::CaseInsensitiveCompareUC16()");
|
478
430
|
Add(ExternalReference::re_check_stack_guard_state().address(),
|
479
431
|
UNCLASSIFIED,
|
480
|
-
|
432
|
+
23,
|
481
433
|
"RegExpMacroAssembler*::CheckStackGuardState()");
|
482
434
|
Add(ExternalReference::re_grow_stack().address(),
|
483
435
|
UNCLASSIFIED,
|
484
|
-
|
436
|
+
24,
|
485
437
|
"NativeRegExpMacroAssembler::GrowStack()");
|
486
|
-
|
438
|
+
Add(ExternalReference::re_word_character_map().address(),
|
439
|
+
UNCLASSIFIED,
|
440
|
+
25,
|
441
|
+
"NativeRegExpMacroAssembler::word_character_map");
|
442
|
+
#endif // V8_INTERPRETED_REGEXP
|
487
443
|
// Keyed lookup cache.
|
488
444
|
Add(ExternalReference::keyed_lookup_cache_keys().address(),
|
489
445
|
UNCLASSIFIED,
|
490
|
-
|
446
|
+
26,
|
491
447
|
"KeyedLookupCache::keys()");
|
492
448
|
Add(ExternalReference::keyed_lookup_cache_field_offsets().address(),
|
493
449
|
UNCLASSIFIED,
|
494
|
-
|
450
|
+
27,
|
495
451
|
"KeyedLookupCache::field_offsets()");
|
452
|
+
Add(ExternalReference::transcendental_cache_array_address().address(),
|
453
|
+
UNCLASSIFIED,
|
454
|
+
28,
|
455
|
+
"TranscendentalCache::caches()");
|
496
456
|
}
|
497
457
|
|
498
458
|
|
@@ -530,7 +490,7 @@ int ExternalReferenceEncoder::IndexOf(Address key) const {
|
|
530
490
|
|
531
491
|
void ExternalReferenceEncoder::Put(Address key, int index) {
|
532
492
|
HashMap::Entry* entry = encodings_.Lookup(key, Hash(key), true);
|
533
|
-
entry->value = reinterpret_cast<void
|
493
|
+
entry->value = reinterpret_cast<void*>(index);
|
534
494
|
}
|
535
495
|
|
536
496
|
|
@@ -558,11 +518,10 @@ ExternalReferenceDecoder::~ExternalReferenceDecoder() {
|
|
558
518
|
|
559
519
|
bool Serializer::serialization_enabled_ = false;
|
560
520
|
bool Serializer::too_late_to_enable_now_ = false;
|
521
|
+
ExternalReferenceDecoder* Deserializer::external_reference_decoder_ = NULL;
|
561
522
|
|
562
523
|
|
563
|
-
Deserializer::Deserializer(SnapshotByteSource* source)
|
564
|
-
: source_(source),
|
565
|
-
external_reference_decoder_(NULL) {
|
524
|
+
Deserializer::Deserializer(SnapshotByteSource* source) : source_(source) {
|
566
525
|
}
|
567
526
|
|
568
527
|
|
@@ -601,7 +560,7 @@ Address Deserializer::Allocate(int space_index, Space* space, int size) {
|
|
601
560
|
HeapObject* new_object = HeapObject::cast(new_allocation);
|
602
561
|
// Record all large objects in the same space.
|
603
562
|
address = new_object->address();
|
604
|
-
|
563
|
+
pages_[LO_SPACE].Add(address);
|
605
564
|
}
|
606
565
|
last_object_address_ = address;
|
607
566
|
return address;
|
@@ -648,12 +607,34 @@ void Deserializer::Deserialize() {
|
|
648
607
|
ASSERT_EQ(NULL, ThreadState::FirstInUse());
|
649
608
|
// No active handles.
|
650
609
|
ASSERT(HandleScopeImplementer::instance()->blocks()->is_empty());
|
610
|
+
// Make sure the entire partial snapshot cache is traversed, filling it with
|
611
|
+
// valid object pointers.
|
612
|
+
partial_snapshot_cache_length_ = kPartialSnapshotCacheCapacity;
|
651
613
|
ASSERT_EQ(NULL, external_reference_decoder_);
|
652
614
|
external_reference_decoder_ = new ExternalReferenceDecoder();
|
653
|
-
Heap::
|
615
|
+
Heap::IterateStrongRoots(this, VISIT_ONLY_STRONG);
|
616
|
+
Heap::IterateWeakRoots(this, VISIT_ALL);
|
617
|
+
}
|
618
|
+
|
619
|
+
|
620
|
+
void Deserializer::DeserializePartial(Object** root) {
|
621
|
+
// Don't GC while deserializing - just expand the heap.
|
622
|
+
AlwaysAllocateScope always_allocate;
|
623
|
+
// Don't use the free lists while deserializing.
|
624
|
+
LinearAllocationScope allocate_linearly;
|
625
|
+
if (external_reference_decoder_ == NULL) {
|
626
|
+
external_reference_decoder_ = new ExternalReferenceDecoder();
|
627
|
+
}
|
628
|
+
VisitPointer(root);
|
629
|
+
}
|
630
|
+
|
631
|
+
|
632
|
+
Deserializer::~Deserializer() {
|
654
633
|
ASSERT(source_->AtEOF());
|
655
|
-
|
656
|
-
|
634
|
+
if (external_reference_decoder_ != NULL) {
|
635
|
+
delete external_reference_decoder_;
|
636
|
+
external_reference_decoder_ = NULL;
|
637
|
+
}
|
657
638
|
}
|
658
639
|
|
659
640
|
|
@@ -680,6 +661,9 @@ void Deserializer::ReadObject(int space_number,
|
|
680
661
|
*write_back = HeapObject::FromAddress(address);
|
681
662
|
Object** current = reinterpret_cast<Object**>(address);
|
682
663
|
Object** limit = current + (size >> kPointerSizeLog2);
|
664
|
+
if (FLAG_log_snapshot_positions) {
|
665
|
+
LOG(SnapshotPositionEvent(address, source_->position()));
|
666
|
+
}
|
683
667
|
ReadChunk(current, limit, space_number, address);
|
684
668
|
}
|
685
669
|
|
@@ -739,7 +723,6 @@ void Deserializer::ReadChunk(Object** current,
|
|
739
723
|
break;
|
740
724
|
case OBJECT_SERIALIZATION + CODE_SPACE:
|
741
725
|
ReadObject(CODE_SPACE, Heap::code_space(), current++);
|
742
|
-
LOG(LogCodeObject(current[-1]));
|
743
726
|
break;
|
744
727
|
case OBJECT_SERIALIZATION + CELL_SPACE:
|
745
728
|
ReadObject(CELL_SPACE, Heap::cell_space(), current++);
|
@@ -749,7 +732,6 @@ void Deserializer::ReadChunk(Object** current,
|
|
749
732
|
break;
|
750
733
|
case OBJECT_SERIALIZATION + kLargeCode:
|
751
734
|
ReadObject(kLargeCode, Heap::lo_space(), current++);
|
752
|
-
LOG(LogCodeObject(current[-1]));
|
753
735
|
break;
|
754
736
|
case OBJECT_SERIALIZATION + kLargeFixedArray:
|
755
737
|
ReadObject(kLargeFixedArray, Heap::lo_space(), current++);
|
@@ -758,7 +740,6 @@ void Deserializer::ReadChunk(Object** current,
|
|
758
740
|
Object* new_code_object = NULL;
|
759
741
|
ReadObject(kLargeCode, Heap::lo_space(), &new_code_object);
|
760
742
|
Code* code_object = reinterpret_cast<Code*>(new_code_object);
|
761
|
-
LOG(LogCodeObject(code_object));
|
762
743
|
// Setting a branch/call to another code object from code.
|
763
744
|
Address location_of_branch_data = reinterpret_cast<Address>(current);
|
764
745
|
Assembler::set_target_at(location_of_branch_data,
|
@@ -771,7 +752,6 @@ void Deserializer::ReadChunk(Object** current,
|
|
771
752
|
Object* new_code_object = NULL;
|
772
753
|
ReadObject(CODE_SPACE, Heap::code_space(), &new_code_object);
|
773
754
|
Code* code_object = reinterpret_cast<Code*>(new_code_object);
|
774
|
-
LOG(LogCodeObject(code_object));
|
775
755
|
// Setting a branch/call to another code object from code.
|
776
756
|
Address location_of_branch_data = reinterpret_cast<Address>(current);
|
777
757
|
Assembler::set_target_at(location_of_branch_data,
|
@@ -856,6 +836,9 @@ void Deserializer::ReadChunk(Object** current,
|
|
856
836
|
case START_NEW_PAGE_SERIALIZATION: {
|
857
837
|
int space = source_->Get();
|
858
838
|
pages_[space].Add(last_object_address_);
|
839
|
+
if (space == CODE_SPACE) {
|
840
|
+
CPU::FlushICache(last_object_address_, Page::kPageSize);
|
841
|
+
}
|
859
842
|
break;
|
860
843
|
}
|
861
844
|
case NATIVES_STRING_RESOURCE: {
|
@@ -866,6 +849,21 @@ void Deserializer::ReadChunk(Object** current,
|
|
866
849
|
*current++ = reinterpret_cast<Object*>(resource);
|
867
850
|
break;
|
868
851
|
}
|
852
|
+
case ROOT_SERIALIZATION: {
|
853
|
+
int root_id = source_->GetInt();
|
854
|
+
*current++ = Heap::roots_address()[root_id];
|
855
|
+
break;
|
856
|
+
}
|
857
|
+
case PARTIAL_SNAPSHOT_CACHE_ENTRY: {
|
858
|
+
int cache_index = source_->GetInt();
|
859
|
+
*current++ = partial_snapshot_cache_[cache_index];
|
860
|
+
break;
|
861
|
+
}
|
862
|
+
case SYNCHRONIZE: {
|
863
|
+
// If we get here then that indicates that you have a mismatch between
|
864
|
+
// the number of GC roots when serializing and deserializing.
|
865
|
+
UNREACHABLE();
|
866
|
+
}
|
869
867
|
default:
|
870
868
|
UNREACHABLE();
|
871
869
|
}
|
@@ -878,10 +876,10 @@ void SnapshotByteSink::PutInt(uintptr_t integer, const char* description) {
|
|
878
876
|
const int max_shift = ((kPointerSize * kBitsPerByte) / 7) * 7;
|
879
877
|
for (int shift = max_shift; shift > 0; shift -= 7) {
|
880
878
|
if (integer >= static_cast<uintptr_t>(1u) << shift) {
|
881
|
-
Put(((integer >> shift) & 0x7f) | 0x80, "IntPart");
|
879
|
+
Put((static_cast<int>((integer >> shift)) & 0x7f) | 0x80, "IntPart");
|
882
880
|
}
|
883
881
|
}
|
884
|
-
PutSection(integer & 0x7f, "IntLastPart");
|
882
|
+
PutSection(static_cast<int>(integer & 0x7f), "IntLastPart");
|
885
883
|
}
|
886
884
|
|
887
885
|
#ifdef DEBUG
|
@@ -918,42 +916,49 @@ void Serializer::Synchronize(const char* tag) {
|
|
918
916
|
Serializer::Serializer(SnapshotByteSink* sink)
|
919
917
|
: sink_(sink),
|
920
918
|
current_root_index_(0),
|
921
|
-
external_reference_encoder_(
|
922
|
-
|
919
|
+
external_reference_encoder_(new ExternalReferenceEncoder),
|
920
|
+
large_object_total_(0) {
|
923
921
|
for (int i = 0; i <= LAST_SPACE; i++) {
|
924
922
|
fullness_[i] = 0;
|
925
923
|
}
|
926
924
|
}
|
927
925
|
|
928
926
|
|
929
|
-
|
927
|
+
Serializer::~Serializer() {
|
928
|
+
delete external_reference_encoder_;
|
929
|
+
}
|
930
|
+
|
931
|
+
|
932
|
+
void StartupSerializer::SerializeStrongReferences() {
|
930
933
|
// No active threads.
|
931
934
|
CHECK_EQ(NULL, ThreadState::FirstInUse());
|
932
935
|
// No active or weak handles.
|
933
936
|
CHECK(HandleScopeImplementer::instance()->blocks()->is_empty());
|
934
937
|
CHECK_EQ(0, GlobalHandles::NumberOfWeakHandles());
|
935
|
-
CHECK_EQ(NULL, external_reference_encoder_);
|
936
938
|
// We don't support serializing installed extensions.
|
937
939
|
for (RegisteredExtension* ext = RegisteredExtension::first_extension();
|
938
940
|
ext != NULL;
|
939
941
|
ext = ext->next()) {
|
940
942
|
CHECK_NE(v8::INSTALLED, ext->state());
|
941
943
|
}
|
942
|
-
|
943
|
-
Heap::IterateRoots(this, VISIT_ONLY_STRONG);
|
944
|
-
delete external_reference_encoder_;
|
945
|
-
external_reference_encoder_ = NULL;
|
946
|
-
SerializationAddressMapper::Zap();
|
944
|
+
Heap::IterateStrongRoots(this, VISIT_ONLY_STRONG);
|
947
945
|
}
|
948
946
|
|
949
947
|
|
950
|
-
void
|
951
|
-
partial_ = true;
|
952
|
-
external_reference_encoder_ = new ExternalReferenceEncoder();
|
948
|
+
void PartialSerializer::Serialize(Object** object) {
|
953
949
|
this->VisitPointer(object);
|
954
|
-
|
955
|
-
|
956
|
-
|
950
|
+
|
951
|
+
// After we have done the partial serialization the partial snapshot cache
|
952
|
+
// will contain some references needed to decode the partial snapshot. We
|
953
|
+
// fill it up with undefineds so it has a predictable length so the
|
954
|
+
// deserialization code doesn't need to know the length.
|
955
|
+
for (int index = partial_snapshot_cache_length_;
|
956
|
+
index < kPartialSnapshotCacheCapacity;
|
957
|
+
index++) {
|
958
|
+
partial_snapshot_cache_[index] = Heap::undefined_value();
|
959
|
+
startup_serializer_->VisitPointer(&partial_snapshot_cache_[index]);
|
960
|
+
}
|
961
|
+
partial_snapshot_cache_length_ = kPartialSnapshotCacheCapacity;
|
957
962
|
}
|
958
963
|
|
959
964
|
|
@@ -972,7 +977,55 @@ void Serializer::VisitPointers(Object** start, Object** end) {
|
|
972
977
|
}
|
973
978
|
|
974
979
|
|
975
|
-
|
980
|
+
Object* SerializerDeserializer::partial_snapshot_cache_[
|
981
|
+
kPartialSnapshotCacheCapacity];
|
982
|
+
int SerializerDeserializer::partial_snapshot_cache_length_ = 0;
|
983
|
+
|
984
|
+
|
985
|
+
// This ensures that the partial snapshot cache keeps things alive during GC and
|
986
|
+
// tracks their movement. When it is called during serialization of the startup
|
987
|
+
// snapshot the partial snapshot is empty, so nothing happens. When the partial
|
988
|
+
// (context) snapshot is created, this array is populated with the pointers that
|
989
|
+
// the partial snapshot will need. As that happens we emit serialized objects to
|
990
|
+
// the startup snapshot that correspond to the elements of this cache array. On
|
991
|
+
// deserialization we therefore need to visit the cache array. This fills it up
|
992
|
+
// with pointers to deserialized objects.
|
993
|
+
void SerializerDeserializer::Iterate(ObjectVisitor* visitor) {
|
994
|
+
visitor->VisitPointers(
|
995
|
+
&partial_snapshot_cache_[0],
|
996
|
+
&partial_snapshot_cache_[partial_snapshot_cache_length_]);
|
997
|
+
}
|
998
|
+
|
999
|
+
|
1000
|
+
// When deserializing we need to set the size of the snapshot cache. This means
|
1001
|
+
// the root iteration code (above) will iterate over array elements, writing the
|
1002
|
+
// references to deserialized objects in them.
|
1003
|
+
void SerializerDeserializer::SetSnapshotCacheSize(int size) {
|
1004
|
+
partial_snapshot_cache_length_ = size;
|
1005
|
+
}
|
1006
|
+
|
1007
|
+
|
1008
|
+
int PartialSerializer::PartialSnapshotCacheIndex(HeapObject* heap_object) {
|
1009
|
+
for (int i = 0; i < partial_snapshot_cache_length_; i++) {
|
1010
|
+
Object* entry = partial_snapshot_cache_[i];
|
1011
|
+
if (entry == heap_object) return i;
|
1012
|
+
}
|
1013
|
+
|
1014
|
+
// We didn't find the object in the cache. So we add it to the cache and
|
1015
|
+
// then visit the pointer so that it becomes part of the startup snapshot
|
1016
|
+
// and we can refer to it from the partial snapshot.
|
1017
|
+
int length = partial_snapshot_cache_length_;
|
1018
|
+
CHECK(length < kPartialSnapshotCacheCapacity);
|
1019
|
+
partial_snapshot_cache_[length] = heap_object;
|
1020
|
+
startup_serializer_->VisitPointer(&partial_snapshot_cache_[length]);
|
1021
|
+
// We don't recurse from the startup snapshot generator into the partial
|
1022
|
+
// snapshot generator.
|
1023
|
+
ASSERT(length == partial_snapshot_cache_length_);
|
1024
|
+
return partial_snapshot_cache_length_++;
|
1025
|
+
}
|
1026
|
+
|
1027
|
+
|
1028
|
+
int PartialSerializer::RootIndex(HeapObject* heap_object) {
|
976
1029
|
for (int i = 0; i < Heap::kRootListLength; i++) {
|
977
1030
|
Object* root = Heap::roots_address()[i];
|
978
1031
|
if (root == heap_object) return i;
|
@@ -981,67 +1034,136 @@ int Serializer::RootIndex(HeapObject* heap_object) {
|
|
981
1034
|
}
|
982
1035
|
|
983
1036
|
|
984
|
-
|
985
|
-
|
1037
|
+
// Encode the location of an already deserialized object in order to write its
|
1038
|
+
// location into a later object. We can encode the location as an offset from
|
1039
|
+
// the start of the deserialized objects or as an offset backwards from the
|
1040
|
+
// current allocation pointer.
|
1041
|
+
void Serializer::SerializeReferenceToPreviousObject(
|
1042
|
+
int space,
|
1043
|
+
int address,
|
986
1044
|
ReferenceRepresentation reference_representation) {
|
987
|
-
|
988
|
-
|
989
|
-
if (
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
1045
|
+
int offset = CurrentAllocationAddress(space) - address;
|
1046
|
+
bool from_start = true;
|
1047
|
+
if (SpaceIsPaged(space)) {
|
1048
|
+
// For paged space it is simple to encode back from current allocation if
|
1049
|
+
// the object is on the same page as the current allocation pointer.
|
1050
|
+
if ((CurrentAllocationAddress(space) >> kPageSizeBits) ==
|
1051
|
+
(address >> kPageSizeBits)) {
|
1052
|
+
from_start = false;
|
1053
|
+
address = offset;
|
995
1054
|
}
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
int address = SerializationAddressMapper::MappedTo(heap_object);
|
1002
|
-
int offset = CurrentAllocationAddress(space) - address;
|
1003
|
-
bool from_start = true;
|
1004
|
-
if (SpaceIsPaged(space)) {
|
1005
|
-
if ((CurrentAllocationAddress(space) >> kPageSizeBits) ==
|
1006
|
-
(address >> kPageSizeBits)) {
|
1007
|
-
from_start = false;
|
1008
|
-
address = offset;
|
1009
|
-
}
|
1010
|
-
} else if (space == NEW_SPACE) {
|
1011
|
-
if (offset < address) {
|
1012
|
-
from_start = false;
|
1013
|
-
address = offset;
|
1014
|
-
}
|
1055
|
+
} else if (space == NEW_SPACE) {
|
1056
|
+
// For new space it is always simple to encode back from current allocation.
|
1057
|
+
if (offset < address) {
|
1058
|
+
from_start = false;
|
1059
|
+
address = offset;
|
1015
1060
|
}
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1061
|
+
}
|
1062
|
+
// If we are actually dealing with real offsets (and not a numbering of
|
1063
|
+
// all objects) then we should shift out the bits that are always 0.
|
1064
|
+
if (!SpaceIsLarge(space)) address >>= kObjectAlignmentBits;
|
1065
|
+
// On some architectures references between code objects are encoded
|
1066
|
+
// specially (as relative offsets). Such references have their own
|
1067
|
+
// special tags to simplify the deserializer.
|
1068
|
+
if (reference_representation == CODE_TARGET_REPRESENTATION) {
|
1069
|
+
if (from_start) {
|
1070
|
+
sink_->Put(CODE_REFERENCE_SERIALIZATION + space, "RefCodeSer");
|
1071
|
+
sink_->PutInt(address, "address");
|
1027
1072
|
} else {
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1073
|
+
sink_->Put(CODE_BACKREF_SERIALIZATION + space, "BackRefCodeSer");
|
1074
|
+
sink_->PutInt(address, "address");
|
1075
|
+
}
|
1076
|
+
} else {
|
1077
|
+
// Regular absolute references.
|
1078
|
+
CHECK_EQ(TAGGED_REPRESENTATION, reference_representation);
|
1079
|
+
if (from_start) {
|
1080
|
+
// There are some common offsets that have their own specialized encoding.
|
1081
|
+
#define COMMON_REFS_CASE(tag, common_space, common_offset) \
|
1082
|
+
if (space == common_space && address == common_offset) { \
|
1083
|
+
sink_->PutSection(tag + REFERENCE_SERIALIZATION, "RefSer"); \
|
1084
|
+
} else /* NOLINT */
|
1085
|
+
COMMON_REFERENCE_PATTERNS(COMMON_REFS_CASE)
|
1035
1086
|
#undef COMMON_REFS_CASE
|
1036
|
-
|
1037
|
-
|
1038
|
-
sink_->PutInt(address, "address");
|
1039
|
-
}
|
1040
|
-
} else {
|
1041
|
-
sink_->Put(BACKREF_SERIALIZATION + space, "BackRefSer");
|
1087
|
+
{ /* NOLINT */
|
1088
|
+
sink_->Put(REFERENCE_SERIALIZATION + space, "RefSer");
|
1042
1089
|
sink_->PutInt(address, "address");
|
1043
1090
|
}
|
1091
|
+
} else {
|
1092
|
+
sink_->Put(BACKREF_SERIALIZATION + space, "BackRefSer");
|
1093
|
+
sink_->PutInt(address, "address");
|
1044
1094
|
}
|
1095
|
+
}
|
1096
|
+
}
|
1097
|
+
|
1098
|
+
|
1099
|
+
void StartupSerializer::SerializeObject(
|
1100
|
+
Object* o,
|
1101
|
+
ReferenceRepresentation reference_representation) {
|
1102
|
+
CHECK(o->IsHeapObject());
|
1103
|
+
HeapObject* heap_object = HeapObject::cast(o);
|
1104
|
+
|
1105
|
+
if (address_mapper_.IsMapped(heap_object)) {
|
1106
|
+
int space = SpaceOfAlreadySerializedObject(heap_object);
|
1107
|
+
int address = address_mapper_.MappedTo(heap_object);
|
1108
|
+
SerializeReferenceToPreviousObject(space,
|
1109
|
+
address,
|
1110
|
+
reference_representation);
|
1111
|
+
} else {
|
1112
|
+
// Object has not yet been serialized. Serialize it here.
|
1113
|
+
ObjectSerializer object_serializer(this,
|
1114
|
+
heap_object,
|
1115
|
+
sink_,
|
1116
|
+
reference_representation);
|
1117
|
+
object_serializer.Serialize();
|
1118
|
+
}
|
1119
|
+
}
|
1120
|
+
|
1121
|
+
|
1122
|
+
void StartupSerializer::SerializeWeakReferences() {
|
1123
|
+
for (int i = partial_snapshot_cache_length_;
|
1124
|
+
i < kPartialSnapshotCacheCapacity;
|
1125
|
+
i++) {
|
1126
|
+
sink_->Put(ROOT_SERIALIZATION, "RootSerialization");
|
1127
|
+
sink_->PutInt(Heap::kUndefinedValueRootIndex, "root_index");
|
1128
|
+
}
|
1129
|
+
Heap::IterateWeakRoots(this, VISIT_ALL);
|
1130
|
+
}
|
1131
|
+
|
1132
|
+
|
1133
|
+
void PartialSerializer::SerializeObject(
|
1134
|
+
Object* o,
|
1135
|
+
ReferenceRepresentation reference_representation) {
|
1136
|
+
CHECK(o->IsHeapObject());
|
1137
|
+
HeapObject* heap_object = HeapObject::cast(o);
|
1138
|
+
|
1139
|
+
int root_index;
|
1140
|
+
if ((root_index = RootIndex(heap_object)) != kInvalidRootIndex) {
|
1141
|
+
sink_->Put(ROOT_SERIALIZATION, "RootSerialization");
|
1142
|
+
sink_->PutInt(root_index, "root_index");
|
1143
|
+
return;
|
1144
|
+
}
|
1145
|
+
|
1146
|
+
if (ShouldBeInThePartialSnapshotCache(heap_object)) {
|
1147
|
+
int cache_index = PartialSnapshotCacheIndex(heap_object);
|
1148
|
+
sink_->Put(PARTIAL_SNAPSHOT_CACHE_ENTRY, "PartialSnapshotCache");
|
1149
|
+
sink_->PutInt(cache_index, "partial_snapshot_cache_index");
|
1150
|
+
return;
|
1151
|
+
}
|
1152
|
+
|
1153
|
+
// Pointers from the partial snapshot to the objects in the startup snapshot
|
1154
|
+
// should go through the root array or through the partial snapshot cache.
|
1155
|
+
// If this is not the case you may have to add something to the root array.
|
1156
|
+
ASSERT(!startup_serializer_->address_mapper()->IsMapped(heap_object));
|
1157
|
+
// All the symbols that the partial snapshot needs should be either in the
|
1158
|
+
// root table or in the partial snapshot cache.
|
1159
|
+
ASSERT(!heap_object->IsSymbol());
|
1160
|
+
|
1161
|
+
if (address_mapper_.IsMapped(heap_object)) {
|
1162
|
+
int space = SpaceOfAlreadySerializedObject(heap_object);
|
1163
|
+
int address = address_mapper_.MappedTo(heap_object);
|
1164
|
+
SerializeReferenceToPreviousObject(space,
|
1165
|
+
address,
|
1166
|
+
reference_representation);
|
1045
1167
|
} else {
|
1046
1168
|
// Object has not yet been serialized. Serialize it here.
|
1047
1169
|
ObjectSerializer serializer(this,
|
@@ -1053,7 +1175,6 @@ void Serializer::SerializeObject(
|
|
1053
1175
|
}
|
1054
1176
|
|
1055
1177
|
|
1056
|
-
|
1057
1178
|
void Serializer::ObjectSerializer::Serialize() {
|
1058
1179
|
int space = Serializer::SpaceOfObject(object_);
|
1059
1180
|
int size = object_->Size();
|
@@ -1066,11 +1187,12 @@ void Serializer::ObjectSerializer::Serialize() {
|
|
1066
1187
|
}
|
1067
1188
|
sink_->PutInt(size >> kObjectAlignmentBits, "Size in words");
|
1068
1189
|
|
1190
|
+
LOG(SnapshotPositionEvent(object_->address(), sink_->Position()));
|
1191
|
+
|
1069
1192
|
// Mark this object as already serialized.
|
1070
1193
|
bool start_new_page;
|
1071
|
-
|
1072
|
-
|
1073
|
-
serializer_->Allocate(space, size, &start_new_page));
|
1194
|
+
int offset = serializer_->Allocate(space, size, &start_new_page);
|
1195
|
+
serializer_->address_mapper()->AddMapping(object_, offset);
|
1074
1196
|
if (start_new_page) {
|
1075
1197
|
sink_->Put(START_NEW_PAGE_SERIALIZATION, "NewPage");
|
1076
1198
|
sink_->PutSection(space, "NewPageSpace");
|
@@ -1230,6 +1352,7 @@ int Serializer::Allocate(int space, int size, bool* new_page) {
|
|
1230
1352
|
// In large object space we merely number the objects instead of trying to
|
1231
1353
|
// determine some sort of address.
|
1232
1354
|
*new_page = true;
|
1355
|
+
large_object_total_ += size;
|
1233
1356
|
return fullness_[LO_SPACE]++;
|
1234
1357
|
}
|
1235
1358
|
*new_page = false;
|