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
@@ -114,6 +114,12 @@ class StackFrame BASE_EMBEDDED {
|
|
114
114
|
// by the debugger.
|
115
115
|
enum Id { NO_ID = 0 };
|
116
116
|
|
117
|
+
// Copy constructor; it breaks the connection to host iterator.
|
118
|
+
StackFrame(const StackFrame& original) {
|
119
|
+
this->state_ = original.state_;
|
120
|
+
this->iterator_ = NULL;
|
121
|
+
}
|
122
|
+
|
117
123
|
// Type testers.
|
118
124
|
bool is_entry() const { return type() == ENTRY; }
|
119
125
|
bool is_entry_construct() const { return type() == ENTRY_CONSTRUCT; }
|
@@ -132,6 +138,8 @@ class StackFrame BASE_EMBEDDED {
|
|
132
138
|
Address pc() const { return *pc_address(); }
|
133
139
|
void set_pc(Address pc) { *pc_address() = pc; }
|
134
140
|
|
141
|
+
virtual void SetCallerFp(Address caller_fp) = 0;
|
142
|
+
|
135
143
|
Address* pc_address() const { return state_.pc_address; }
|
136
144
|
|
137
145
|
// Get the id of this stack frame.
|
@@ -200,7 +208,8 @@ class StackFrame BASE_EMBEDDED {
|
|
200
208
|
friend class StackHandlerIterator;
|
201
209
|
friend class SafeStackFrameIterator;
|
202
210
|
|
203
|
-
|
211
|
+
private:
|
212
|
+
void operator=(const StackFrame& original);
|
204
213
|
};
|
205
214
|
|
206
215
|
|
@@ -218,6 +227,7 @@ class EntryFrame: public StackFrame {
|
|
218
227
|
ASSERT(frame->is_entry());
|
219
228
|
return static_cast<EntryFrame*>(frame);
|
220
229
|
}
|
230
|
+
virtual void SetCallerFp(Address caller_fp);
|
221
231
|
|
222
232
|
protected:
|
223
233
|
explicit EntryFrame(StackFrameIterator* iterator) : StackFrame(iterator) { }
|
@@ -268,6 +278,8 @@ class ExitFrame: public StackFrame {
|
|
268
278
|
// Garbage collection support.
|
269
279
|
virtual void Iterate(ObjectVisitor* v) const;
|
270
280
|
|
281
|
+
virtual void SetCallerFp(Address caller_fp);
|
282
|
+
|
271
283
|
static ExitFrame* cast(StackFrame* frame) {
|
272
284
|
ASSERT(frame->is_exit());
|
273
285
|
return static_cast<ExitFrame*>(frame);
|
@@ -303,6 +315,8 @@ class StandardFrame: public StackFrame {
|
|
303
315
|
inline void SetExpression(int index, Object* value);
|
304
316
|
int ComputeExpressionsCount() const;
|
305
317
|
|
318
|
+
virtual void SetCallerFp(Address caller_fp);
|
319
|
+
|
306
320
|
static StandardFrame* cast(StackFrame* frame) {
|
307
321
|
ASSERT(frame->is_standard());
|
308
322
|
return static_cast<StandardFrame*>(frame);
|
@@ -589,6 +603,9 @@ class StackTraceFrameIterator: public JavaScriptFrameIterator {
|
|
589
603
|
public:
|
590
604
|
StackTraceFrameIterator();
|
591
605
|
void Advance();
|
606
|
+
|
607
|
+
private:
|
608
|
+
bool IsValidFrame();
|
592
609
|
};
|
593
610
|
|
594
611
|
|
@@ -607,11 +624,12 @@ class SafeStackFrameIterator BASE_EMBEDDED {
|
|
607
624
|
void Advance();
|
608
625
|
void Reset();
|
609
626
|
|
610
|
-
private:
|
611
627
|
static bool IsWithinBounds(
|
612
628
|
Address low_bound, Address high_bound, Address addr) {
|
613
629
|
return low_bound <= addr && addr <= high_bound;
|
614
630
|
}
|
631
|
+
|
632
|
+
private:
|
615
633
|
bool IsValidStackAddress(Address addr) const {
|
616
634
|
return IsWithinBounds(low_bound_, high_bound_, addr);
|
617
635
|
}
|
@@ -654,6 +672,10 @@ class StackFrameLocator BASE_EMBEDDED {
|
|
654
672
|
};
|
655
673
|
|
656
674
|
|
675
|
+
// Reads all frames on the current stack and copies them into the current
|
676
|
+
// zone memory.
|
677
|
+
Vector<StackFrame*> CreateStackMap();
|
678
|
+
|
657
679
|
} } // namespace v8::internal
|
658
680
|
|
659
681
|
#endif // V8_FRAMES_H_
|
@@ -29,40 +29,447 @@
|
|
29
29
|
|
30
30
|
#include "codegen-inl.h"
|
31
31
|
#include "compiler.h"
|
32
|
-
#include "
|
32
|
+
#include "full-codegen.h"
|
33
|
+
#include "scopes.h"
|
33
34
|
#include "stub-cache.h"
|
34
35
|
#include "debug.h"
|
36
|
+
#include "liveedit.h"
|
35
37
|
|
36
38
|
namespace v8 {
|
37
39
|
namespace internal {
|
38
40
|
|
41
|
+
#define BAILOUT(reason) \
|
42
|
+
do { \
|
43
|
+
if (FLAG_trace_bailout) { \
|
44
|
+
PrintF("%s\n", reason); \
|
45
|
+
} \
|
46
|
+
has_supported_syntax_ = false; \
|
47
|
+
return; \
|
48
|
+
} while (false)
|
49
|
+
|
50
|
+
|
51
|
+
#define CHECK_BAILOUT \
|
52
|
+
do { \
|
53
|
+
if (!has_supported_syntax_) return; \
|
54
|
+
} while (false)
|
55
|
+
|
56
|
+
|
57
|
+
void FullCodeGenSyntaxChecker::Check(FunctionLiteral* fun) {
|
58
|
+
Scope* scope = fun->scope();
|
59
|
+
VisitDeclarations(scope->declarations());
|
60
|
+
CHECK_BAILOUT;
|
61
|
+
|
62
|
+
VisitStatements(fun->body());
|
63
|
+
}
|
64
|
+
|
65
|
+
|
66
|
+
void FullCodeGenSyntaxChecker::VisitDeclarations(
|
67
|
+
ZoneList<Declaration*>* decls) {
|
68
|
+
for (int i = 0; i < decls->length(); i++) {
|
69
|
+
Visit(decls->at(i));
|
70
|
+
CHECK_BAILOUT;
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
|
75
|
+
void FullCodeGenSyntaxChecker::VisitStatements(ZoneList<Statement*>* stmts) {
|
76
|
+
for (int i = 0, len = stmts->length(); i < len; i++) {
|
77
|
+
Visit(stmts->at(i));
|
78
|
+
CHECK_BAILOUT;
|
79
|
+
}
|
80
|
+
}
|
81
|
+
|
82
|
+
|
83
|
+
void FullCodeGenSyntaxChecker::VisitDeclaration(Declaration* decl) {
|
84
|
+
Property* prop = decl->proxy()->AsProperty();
|
85
|
+
if (prop != NULL) {
|
86
|
+
Visit(prop->obj());
|
87
|
+
Visit(prop->key());
|
88
|
+
}
|
89
|
+
|
90
|
+
if (decl->fun() != NULL) {
|
91
|
+
Visit(decl->fun());
|
92
|
+
}
|
93
|
+
}
|
94
|
+
|
95
|
+
|
96
|
+
void FullCodeGenSyntaxChecker::VisitBlock(Block* stmt) {
|
97
|
+
VisitStatements(stmt->statements());
|
98
|
+
}
|
99
|
+
|
100
|
+
|
101
|
+
void FullCodeGenSyntaxChecker::VisitExpressionStatement(
|
102
|
+
ExpressionStatement* stmt) {
|
103
|
+
Visit(stmt->expression());
|
104
|
+
}
|
105
|
+
|
106
|
+
|
107
|
+
void FullCodeGenSyntaxChecker::VisitEmptyStatement(EmptyStatement* stmt) {
|
108
|
+
// Supported.
|
109
|
+
}
|
110
|
+
|
111
|
+
|
112
|
+
void FullCodeGenSyntaxChecker::VisitIfStatement(IfStatement* stmt) {
|
113
|
+
Visit(stmt->condition());
|
114
|
+
CHECK_BAILOUT;
|
115
|
+
Visit(stmt->then_statement());
|
116
|
+
CHECK_BAILOUT;
|
117
|
+
Visit(stmt->else_statement());
|
118
|
+
}
|
119
|
+
|
120
|
+
|
121
|
+
void FullCodeGenSyntaxChecker::VisitContinueStatement(ContinueStatement* stmt) {
|
122
|
+
// Supported.
|
123
|
+
}
|
124
|
+
|
125
|
+
|
126
|
+
void FullCodeGenSyntaxChecker::VisitBreakStatement(BreakStatement* stmt) {
|
127
|
+
// Supported.
|
128
|
+
}
|
129
|
+
|
130
|
+
|
131
|
+
void FullCodeGenSyntaxChecker::VisitReturnStatement(ReturnStatement* stmt) {
|
132
|
+
Visit(stmt->expression());
|
133
|
+
}
|
134
|
+
|
135
|
+
|
136
|
+
void FullCodeGenSyntaxChecker::VisitWithEnterStatement(
|
137
|
+
WithEnterStatement* stmt) {
|
138
|
+
Visit(stmt->expression());
|
139
|
+
}
|
140
|
+
|
141
|
+
|
142
|
+
void FullCodeGenSyntaxChecker::VisitWithExitStatement(WithExitStatement* stmt) {
|
143
|
+
// Supported.
|
144
|
+
}
|
145
|
+
|
146
|
+
|
147
|
+
void FullCodeGenSyntaxChecker::VisitSwitchStatement(SwitchStatement* stmt) {
|
148
|
+
BAILOUT("SwitchStatement");
|
149
|
+
}
|
150
|
+
|
151
|
+
|
152
|
+
void FullCodeGenSyntaxChecker::VisitDoWhileStatement(DoWhileStatement* stmt) {
|
153
|
+
Visit(stmt->cond());
|
154
|
+
CHECK_BAILOUT;
|
155
|
+
Visit(stmt->body());
|
156
|
+
}
|
157
|
+
|
158
|
+
|
159
|
+
void FullCodeGenSyntaxChecker::VisitWhileStatement(WhileStatement* stmt) {
|
160
|
+
Visit(stmt->cond());
|
161
|
+
CHECK_BAILOUT;
|
162
|
+
Visit(stmt->body());
|
163
|
+
}
|
164
|
+
|
165
|
+
|
166
|
+
void FullCodeGenSyntaxChecker::VisitForStatement(ForStatement* stmt) {
|
167
|
+
if (!FLAG_always_full_compiler) BAILOUT("ForStatement");
|
168
|
+
if (stmt->init() != NULL) {
|
169
|
+
Visit(stmt->init());
|
170
|
+
CHECK_BAILOUT;
|
171
|
+
}
|
172
|
+
if (stmt->cond() != NULL) {
|
173
|
+
Visit(stmt->cond());
|
174
|
+
CHECK_BAILOUT;
|
175
|
+
}
|
176
|
+
Visit(stmt->body());
|
177
|
+
if (stmt->next() != NULL) {
|
178
|
+
CHECK_BAILOUT;
|
179
|
+
Visit(stmt->next());
|
180
|
+
}
|
181
|
+
}
|
182
|
+
|
183
|
+
|
184
|
+
void FullCodeGenSyntaxChecker::VisitForInStatement(ForInStatement* stmt) {
|
185
|
+
BAILOUT("ForInStatement");
|
186
|
+
}
|
187
|
+
|
188
|
+
|
189
|
+
void FullCodeGenSyntaxChecker::VisitTryCatchStatement(TryCatchStatement* stmt) {
|
190
|
+
Visit(stmt->try_block());
|
191
|
+
CHECK_BAILOUT;
|
192
|
+
Visit(stmt->catch_block());
|
193
|
+
}
|
194
|
+
|
195
|
+
|
196
|
+
void FullCodeGenSyntaxChecker::VisitTryFinallyStatement(
|
197
|
+
TryFinallyStatement* stmt) {
|
198
|
+
Visit(stmt->try_block());
|
199
|
+
CHECK_BAILOUT;
|
200
|
+
Visit(stmt->finally_block());
|
201
|
+
}
|
202
|
+
|
203
|
+
|
204
|
+
void FullCodeGenSyntaxChecker::VisitDebuggerStatement(
|
205
|
+
DebuggerStatement* stmt) {
|
206
|
+
// Supported.
|
207
|
+
}
|
208
|
+
|
209
|
+
|
210
|
+
void FullCodeGenSyntaxChecker::VisitFunctionLiteral(FunctionLiteral* expr) {
|
211
|
+
// Supported.
|
212
|
+
}
|
213
|
+
|
214
|
+
|
215
|
+
void FullCodeGenSyntaxChecker::VisitSharedFunctionInfoLiteral(
|
216
|
+
SharedFunctionInfoLiteral* expr) {
|
217
|
+
BAILOUT("SharedFunctionInfoLiteral");
|
218
|
+
}
|
219
|
+
|
220
|
+
|
221
|
+
void FullCodeGenSyntaxChecker::VisitConditional(Conditional* expr) {
|
222
|
+
Visit(expr->condition());
|
223
|
+
CHECK_BAILOUT;
|
224
|
+
Visit(expr->then_expression());
|
225
|
+
CHECK_BAILOUT;
|
226
|
+
Visit(expr->else_expression());
|
227
|
+
}
|
228
|
+
|
229
|
+
|
230
|
+
void FullCodeGenSyntaxChecker::VisitSlot(Slot* expr) {
|
231
|
+
UNREACHABLE();
|
232
|
+
}
|
233
|
+
|
234
|
+
|
235
|
+
void FullCodeGenSyntaxChecker::VisitVariableProxy(VariableProxy* expr) {
|
236
|
+
// Supported.
|
237
|
+
}
|
238
|
+
|
239
|
+
|
240
|
+
void FullCodeGenSyntaxChecker::VisitLiteral(Literal* expr) {
|
241
|
+
// Supported.
|
242
|
+
}
|
243
|
+
|
244
|
+
|
245
|
+
void FullCodeGenSyntaxChecker::VisitRegExpLiteral(RegExpLiteral* expr) {
|
246
|
+
// Supported.
|
247
|
+
}
|
248
|
+
|
249
|
+
|
250
|
+
void FullCodeGenSyntaxChecker::VisitObjectLiteral(ObjectLiteral* expr) {
|
251
|
+
ZoneList<ObjectLiteral::Property*>* properties = expr->properties();
|
252
|
+
|
253
|
+
for (int i = 0, len = properties->length(); i < len; i++) {
|
254
|
+
ObjectLiteral::Property* property = properties->at(i);
|
255
|
+
if (property->IsCompileTimeValue()) continue;
|
256
|
+
Visit(property->key());
|
257
|
+
CHECK_BAILOUT;
|
258
|
+
Visit(property->value());
|
259
|
+
CHECK_BAILOUT;
|
260
|
+
}
|
261
|
+
}
|
262
|
+
|
263
|
+
|
264
|
+
void FullCodeGenSyntaxChecker::VisitArrayLiteral(ArrayLiteral* expr) {
|
265
|
+
ZoneList<Expression*>* subexprs = expr->values();
|
266
|
+
for (int i = 0, len = subexprs->length(); i < len; i++) {
|
267
|
+
Expression* subexpr = subexprs->at(i);
|
268
|
+
if (subexpr->AsLiteral() != NULL) continue;
|
269
|
+
if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue;
|
270
|
+
Visit(subexpr);
|
271
|
+
CHECK_BAILOUT;
|
272
|
+
}
|
273
|
+
}
|
274
|
+
|
275
|
+
|
276
|
+
void FullCodeGenSyntaxChecker::VisitCatchExtensionObject(
|
277
|
+
CatchExtensionObject* expr) {
|
278
|
+
Visit(expr->key());
|
279
|
+
CHECK_BAILOUT;
|
280
|
+
Visit(expr->value());
|
281
|
+
}
|
282
|
+
|
283
|
+
|
284
|
+
void FullCodeGenSyntaxChecker::VisitAssignment(Assignment* expr) {
|
285
|
+
Token::Value op = expr->op();
|
286
|
+
if (op == Token::INIT_CONST) BAILOUT("initialize constant");
|
287
|
+
|
288
|
+
Variable* var = expr->target()->AsVariableProxy()->AsVariable();
|
289
|
+
Property* prop = expr->target()->AsProperty();
|
290
|
+
ASSERT(var == NULL || prop == NULL);
|
291
|
+
if (var != NULL) {
|
292
|
+
if (var->mode() == Variable::CONST) BAILOUT("Assignment to const");
|
293
|
+
// All other variables are supported.
|
294
|
+
} else if (prop != NULL) {
|
295
|
+
Visit(prop->obj());
|
296
|
+
CHECK_BAILOUT;
|
297
|
+
Visit(prop->key());
|
298
|
+
CHECK_BAILOUT;
|
299
|
+
} else {
|
300
|
+
// This is a throw reference error.
|
301
|
+
BAILOUT("non-variable/non-property assignment");
|
302
|
+
}
|
303
|
+
|
304
|
+
Visit(expr->value());
|
305
|
+
}
|
306
|
+
|
307
|
+
|
308
|
+
void FullCodeGenSyntaxChecker::VisitThrow(Throw* expr) {
|
309
|
+
Visit(expr->exception());
|
310
|
+
}
|
311
|
+
|
312
|
+
|
313
|
+
void FullCodeGenSyntaxChecker::VisitProperty(Property* expr) {
|
314
|
+
Visit(expr->obj());
|
315
|
+
CHECK_BAILOUT;
|
316
|
+
Visit(expr->key());
|
317
|
+
}
|
318
|
+
|
319
|
+
|
320
|
+
void FullCodeGenSyntaxChecker::VisitCall(Call* expr) {
|
321
|
+
Expression* fun = expr->expression();
|
322
|
+
ZoneList<Expression*>* args = expr->arguments();
|
323
|
+
Variable* var = fun->AsVariableProxy()->AsVariable();
|
324
|
+
|
325
|
+
// Check for supported calls
|
326
|
+
if (var != NULL && var->is_possibly_eval()) {
|
327
|
+
BAILOUT("call to the identifier 'eval'");
|
328
|
+
} else if (var != NULL && !var->is_this() && var->is_global()) {
|
329
|
+
// Calls to global variables are supported.
|
330
|
+
} else if (var != NULL && var->slot() != NULL &&
|
331
|
+
var->slot()->type() == Slot::LOOKUP) {
|
332
|
+
BAILOUT("call to a lookup slot");
|
333
|
+
} else if (fun->AsProperty() != NULL) {
|
334
|
+
Property* prop = fun->AsProperty();
|
335
|
+
Visit(prop->obj());
|
336
|
+
CHECK_BAILOUT;
|
337
|
+
Visit(prop->key());
|
338
|
+
CHECK_BAILOUT;
|
339
|
+
} else {
|
340
|
+
// Otherwise the call is supported if the function expression is.
|
341
|
+
Visit(fun);
|
342
|
+
}
|
343
|
+
// Check all arguments to the call.
|
344
|
+
for (int i = 0; i < args->length(); i++) {
|
345
|
+
Visit(args->at(i));
|
346
|
+
CHECK_BAILOUT;
|
347
|
+
}
|
348
|
+
}
|
349
|
+
|
350
|
+
|
351
|
+
void FullCodeGenSyntaxChecker::VisitCallNew(CallNew* expr) {
|
352
|
+
Visit(expr->expression());
|
353
|
+
CHECK_BAILOUT;
|
354
|
+
ZoneList<Expression*>* args = expr->arguments();
|
355
|
+
// Check all arguments to the call
|
356
|
+
for (int i = 0; i < args->length(); i++) {
|
357
|
+
Visit(args->at(i));
|
358
|
+
CHECK_BAILOUT;
|
359
|
+
}
|
360
|
+
}
|
361
|
+
|
362
|
+
|
363
|
+
void FullCodeGenSyntaxChecker::VisitCallRuntime(CallRuntime* expr) {
|
364
|
+
// Check for inline runtime call
|
365
|
+
if (expr->name()->Get(0) == '_' &&
|
366
|
+
CodeGenerator::FindInlineRuntimeLUT(expr->name()) != NULL) {
|
367
|
+
BAILOUT("inlined runtime call");
|
368
|
+
}
|
369
|
+
// Check all arguments to the call. (Relies on TEMP meaning STACK.)
|
370
|
+
for (int i = 0; i < expr->arguments()->length(); i++) {
|
371
|
+
Visit(expr->arguments()->at(i));
|
372
|
+
CHECK_BAILOUT;
|
373
|
+
}
|
374
|
+
}
|
375
|
+
|
376
|
+
|
377
|
+
void FullCodeGenSyntaxChecker::VisitUnaryOperation(UnaryOperation* expr) {
|
378
|
+
switch (expr->op()) {
|
379
|
+
case Token::ADD:
|
380
|
+
case Token::BIT_NOT:
|
381
|
+
case Token::NOT:
|
382
|
+
case Token::SUB:
|
383
|
+
case Token::TYPEOF:
|
384
|
+
case Token::VOID:
|
385
|
+
Visit(expr->expression());
|
386
|
+
break;
|
387
|
+
case Token::DELETE:
|
388
|
+
BAILOUT("UnaryOperation: DELETE");
|
389
|
+
default:
|
390
|
+
UNREACHABLE();
|
391
|
+
}
|
392
|
+
}
|
393
|
+
|
394
|
+
|
395
|
+
void FullCodeGenSyntaxChecker::VisitCountOperation(CountOperation* expr) {
|
396
|
+
Variable* var = expr->expression()->AsVariableProxy()->AsVariable();
|
397
|
+
Property* prop = expr->expression()->AsProperty();
|
398
|
+
ASSERT(var == NULL || prop == NULL);
|
399
|
+
if (var != NULL) {
|
400
|
+
// All global variables are supported.
|
401
|
+
if (!var->is_global()) {
|
402
|
+
ASSERT(var->slot() != NULL);
|
403
|
+
Slot::Type type = var->slot()->type();
|
404
|
+
if (type == Slot::LOOKUP) {
|
405
|
+
BAILOUT("CountOperation with lookup slot");
|
406
|
+
}
|
407
|
+
}
|
408
|
+
} else if (prop != NULL) {
|
409
|
+
Visit(prop->obj());
|
410
|
+
CHECK_BAILOUT;
|
411
|
+
Visit(prop->key());
|
412
|
+
CHECK_BAILOUT;
|
413
|
+
} else {
|
414
|
+
// This is a throw reference error.
|
415
|
+
BAILOUT("CountOperation non-variable/non-property expression");
|
416
|
+
}
|
417
|
+
}
|
418
|
+
|
419
|
+
|
420
|
+
void FullCodeGenSyntaxChecker::VisitBinaryOperation(BinaryOperation* expr) {
|
421
|
+
Visit(expr->left());
|
422
|
+
CHECK_BAILOUT;
|
423
|
+
Visit(expr->right());
|
424
|
+
}
|
425
|
+
|
426
|
+
|
427
|
+
void FullCodeGenSyntaxChecker::VisitCompareOperation(CompareOperation* expr) {
|
428
|
+
Visit(expr->left());
|
429
|
+
CHECK_BAILOUT;
|
430
|
+
Visit(expr->right());
|
431
|
+
}
|
432
|
+
|
433
|
+
|
434
|
+
void FullCodeGenSyntaxChecker::VisitThisFunction(ThisFunction* expr) {
|
435
|
+
// Supported.
|
436
|
+
}
|
437
|
+
|
438
|
+
#undef BAILOUT
|
439
|
+
#undef CHECK_BAILOUT
|
440
|
+
|
441
|
+
|
39
442
|
#define __ ACCESS_MASM(masm())
|
40
443
|
|
41
|
-
Handle<Code>
|
42
|
-
|
43
|
-
|
44
|
-
|
444
|
+
Handle<Code> FullCodeGenerator::MakeCode(CompilationInfo* info) {
|
445
|
+
Handle<Script> script = info->script();
|
446
|
+
if (!script->IsUndefined() && !script->source()->IsUndefined()) {
|
447
|
+
int len = String::cast(script->source())->length();
|
448
|
+
Counters::total_full_codegen_source_size.Increment(len);
|
449
|
+
}
|
450
|
+
CodeGenerator::MakeCodePrologue(info);
|
45
451
|
const int kInitialBufferSize = 4 * KB;
|
46
452
|
MacroAssembler masm(NULL, kInitialBufferSize);
|
47
|
-
|
48
|
-
cgen
|
453
|
+
|
454
|
+
FullCodeGenerator cgen(&masm);
|
455
|
+
cgen.Generate(info, PRIMARY);
|
49
456
|
if (cgen.HasStackOverflow()) {
|
50
457
|
ASSERT(!Top::has_pending_exception());
|
51
458
|
return Handle<Code>::null();
|
52
459
|
}
|
53
460
|
Code::Flags flags = Code::ComputeFlags(Code::FUNCTION, NOT_IN_LOOP);
|
54
|
-
return CodeGenerator::MakeCodeEpilogue(
|
461
|
+
return CodeGenerator::MakeCodeEpilogue(&masm, flags, info);
|
55
462
|
}
|
56
463
|
|
57
464
|
|
58
|
-
int
|
465
|
+
int FullCodeGenerator::SlotOffset(Slot* slot) {
|
59
466
|
ASSERT(slot != NULL);
|
60
467
|
// Offset is negative because higher indexes are at lower addresses.
|
61
468
|
int offset = -slot->index() * kPointerSize;
|
62
469
|
// Adjust by a (parameter or local) base offset.
|
63
470
|
switch (slot->type()) {
|
64
471
|
case Slot::PARAMETER:
|
65
|
-
offset += (
|
472
|
+
offset += (scope()->num_parameters() + 1) * kPointerSize;
|
66
473
|
break;
|
67
474
|
case Slot::LOCAL:
|
68
475
|
offset += JavaScriptFrameConstants::kLocal0Offset;
|
@@ -75,7 +482,7 @@ int FastCodeGenerator::SlotOffset(Slot* slot) {
|
|
75
482
|
}
|
76
483
|
|
77
484
|
|
78
|
-
void
|
485
|
+
void FullCodeGenerator::VisitDeclarations(
|
79
486
|
ZoneList<Declaration*>* declarations) {
|
80
487
|
int length = declarations->length();
|
81
488
|
int globals = 0;
|
@@ -114,8 +521,8 @@ void FastCodeGenerator::VisitDeclarations(
|
|
114
521
|
array->set_undefined(j++);
|
115
522
|
}
|
116
523
|
} else {
|
117
|
-
Handle<
|
118
|
-
Compiler::
|
524
|
+
Handle<SharedFunctionInfo> function =
|
525
|
+
Compiler::BuildFunctionInfo(decl->fun(), script(), this);
|
119
526
|
// Check for stack-overflow exception.
|
120
527
|
if (HasStackOverflow()) return;
|
121
528
|
array->set(j++, *function);
|
@@ -129,104 +536,101 @@ void FastCodeGenerator::VisitDeclarations(
|
|
129
536
|
}
|
130
537
|
|
131
538
|
|
132
|
-
void
|
539
|
+
void FullCodeGenerator::SetFunctionPosition(FunctionLiteral* fun) {
|
133
540
|
if (FLAG_debug_info) {
|
134
541
|
CodeGenerator::RecordPositions(masm_, fun->start_position());
|
135
542
|
}
|
136
543
|
}
|
137
544
|
|
138
545
|
|
139
|
-
void
|
546
|
+
void FullCodeGenerator::SetReturnPosition(FunctionLiteral* fun) {
|
140
547
|
if (FLAG_debug_info) {
|
141
548
|
CodeGenerator::RecordPositions(masm_, fun->end_position());
|
142
549
|
}
|
143
550
|
}
|
144
551
|
|
145
552
|
|
146
|
-
void
|
553
|
+
void FullCodeGenerator::SetStatementPosition(Statement* stmt) {
|
147
554
|
if (FLAG_debug_info) {
|
148
555
|
CodeGenerator::RecordPositions(masm_, stmt->statement_pos());
|
149
556
|
}
|
150
557
|
}
|
151
558
|
|
152
559
|
|
153
|
-
void
|
560
|
+
void FullCodeGenerator::SetStatementPosition(int pos) {
|
154
561
|
if (FLAG_debug_info) {
|
155
562
|
CodeGenerator::RecordPositions(masm_, pos);
|
156
563
|
}
|
157
564
|
}
|
158
565
|
|
159
566
|
|
160
|
-
void
|
567
|
+
void FullCodeGenerator::SetSourcePosition(int pos) {
|
161
568
|
if (FLAG_debug_info && pos != RelocInfo::kNoPosition) {
|
162
569
|
masm_->RecordPosition(pos);
|
163
570
|
}
|
164
571
|
}
|
165
572
|
|
166
573
|
|
167
|
-
void
|
168
|
-
#ifdef DEBUG
|
169
|
-
Expression::Context expected = Expression::kUninitialized;
|
170
|
-
switch (expr->context()) {
|
171
|
-
case Expression::kUninitialized:
|
172
|
-
UNREACHABLE();
|
173
|
-
case Expression::kEffect:
|
174
|
-
case Expression::kTest:
|
175
|
-
// The value of the left subexpression is not needed.
|
176
|
-
expected = Expression::kTest;
|
177
|
-
break;
|
178
|
-
case Expression::kValue:
|
179
|
-
// The value of the left subexpression is needed and its specific
|
180
|
-
// context depends on the operator.
|
181
|
-
expected = (expr->op() == Token::OR)
|
182
|
-
? Expression::kValueTest
|
183
|
-
: Expression::kTestValue;
|
184
|
-
break;
|
185
|
-
case Expression::kValueTest:
|
186
|
-
// The value of the left subexpression is needed for OR.
|
187
|
-
expected = (expr->op() == Token::OR)
|
188
|
-
? Expression::kValueTest
|
189
|
-
: Expression::kTest;
|
190
|
-
break;
|
191
|
-
case Expression::kTestValue:
|
192
|
-
// The value of the left subexpression is needed for AND.
|
193
|
-
expected = (expr->op() == Token::OR)
|
194
|
-
? Expression::kTest
|
195
|
-
: Expression::kTestValue;
|
196
|
-
break;
|
197
|
-
}
|
198
|
-
ASSERT_EQ(expected, expr->left()->context());
|
199
|
-
ASSERT_EQ(expr->context(), expr->right()->context());
|
200
|
-
#endif
|
201
|
-
|
574
|
+
void FullCodeGenerator::EmitLogicalOperation(BinaryOperation* expr) {
|
202
575
|
Label eval_right, done;
|
203
576
|
|
204
577
|
// Set up the appropriate context for the left subexpression based
|
205
578
|
// on the operation and our own context. Initially assume we can
|
206
579
|
// inherit both true and false labels from our context.
|
207
|
-
Label* if_true = true_label_;
|
208
|
-
Label* if_false = false_label_;
|
209
580
|
if (expr->op() == Token::OR) {
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
581
|
+
switch (context_) {
|
582
|
+
case Expression::kUninitialized:
|
583
|
+
UNREACHABLE();
|
584
|
+
case Expression::kEffect:
|
585
|
+
VisitForControl(expr->left(), &done, &eval_right);
|
586
|
+
break;
|
587
|
+
case Expression::kValue:
|
588
|
+
VisitForValueControl(expr->left(),
|
589
|
+
location_,
|
590
|
+
&done,
|
591
|
+
&eval_right);
|
592
|
+
break;
|
593
|
+
case Expression::kTest:
|
594
|
+
VisitForControl(expr->left(), true_label_, &eval_right);
|
595
|
+
break;
|
596
|
+
case Expression::kValueTest:
|
597
|
+
VisitForValueControl(expr->left(),
|
598
|
+
location_,
|
599
|
+
true_label_,
|
600
|
+
&eval_right);
|
601
|
+
break;
|
602
|
+
case Expression::kTestValue:
|
603
|
+
VisitForControl(expr->left(), true_label_, &eval_right);
|
604
|
+
break;
|
215
605
|
}
|
216
|
-
// The false label is the label of the right subexpression.
|
217
|
-
if_false = &eval_right;
|
218
606
|
} else {
|
219
607
|
ASSERT_EQ(Token::AND, expr->op());
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
608
|
+
switch (context_) {
|
609
|
+
case Expression::kUninitialized:
|
610
|
+
UNREACHABLE();
|
611
|
+
case Expression::kEffect:
|
612
|
+
VisitForControl(expr->left(), &eval_right, &done);
|
613
|
+
break;
|
614
|
+
case Expression::kValue:
|
615
|
+
VisitForControlValue(expr->left(),
|
616
|
+
location_,
|
617
|
+
&eval_right,
|
618
|
+
&done);
|
619
|
+
break;
|
620
|
+
case Expression::kTest:
|
621
|
+
VisitForControl(expr->left(), &eval_right, false_label_);
|
622
|
+
break;
|
623
|
+
case Expression::kValueTest:
|
624
|
+
VisitForControl(expr->left(), &eval_right, false_label_);
|
625
|
+
break;
|
626
|
+
case Expression::kTestValue:
|
627
|
+
VisitForControlValue(expr->left(),
|
628
|
+
location_,
|
629
|
+
&eval_right,
|
630
|
+
false_label_);
|
631
|
+
break;
|
227
632
|
}
|
228
633
|
}
|
229
|
-
VisitForControl(expr->left(), if_true, if_false);
|
230
634
|
|
231
635
|
__ bind(&eval_right);
|
232
636
|
Visit(expr->right());
|
@@ -235,7 +639,7 @@ void FastCodeGenerator::EmitLogicalOperation(BinaryOperation* expr) {
|
|
235
639
|
}
|
236
640
|
|
237
641
|
|
238
|
-
void
|
642
|
+
void FullCodeGenerator::VisitBlock(Block* stmt) {
|
239
643
|
Comment cmnt(masm_, "[ Block");
|
240
644
|
Breakable nested_statement(this, stmt);
|
241
645
|
SetStatementPosition(stmt);
|
@@ -244,20 +648,20 @@ void FastCodeGenerator::VisitBlock(Block* stmt) {
|
|
244
648
|
}
|
245
649
|
|
246
650
|
|
247
|
-
void
|
651
|
+
void FullCodeGenerator::VisitExpressionStatement(ExpressionStatement* stmt) {
|
248
652
|
Comment cmnt(masm_, "[ ExpressionStatement");
|
249
653
|
SetStatementPosition(stmt);
|
250
|
-
|
654
|
+
VisitForEffect(stmt->expression());
|
251
655
|
}
|
252
656
|
|
253
657
|
|
254
|
-
void
|
658
|
+
void FullCodeGenerator::VisitEmptyStatement(EmptyStatement* stmt) {
|
255
659
|
Comment cmnt(masm_, "[ EmptyStatement");
|
256
660
|
SetStatementPosition(stmt);
|
257
661
|
}
|
258
662
|
|
259
663
|
|
260
|
-
void
|
664
|
+
void FullCodeGenerator::VisitIfStatement(IfStatement* stmt) {
|
261
665
|
Comment cmnt(masm_, "[ IfStatement");
|
262
666
|
SetStatementPosition(stmt);
|
263
667
|
Label then_part, else_part, done;
|
@@ -276,7 +680,7 @@ void FastCodeGenerator::VisitIfStatement(IfStatement* stmt) {
|
|
276
680
|
}
|
277
681
|
|
278
682
|
|
279
|
-
void
|
683
|
+
void FullCodeGenerator::VisitContinueStatement(ContinueStatement* stmt) {
|
280
684
|
Comment cmnt(masm_, "[ ContinueStatement");
|
281
685
|
SetStatementPosition(stmt);
|
282
686
|
NestedStatement* current = nesting_stack_;
|
@@ -292,7 +696,7 @@ void FastCodeGenerator::VisitContinueStatement(ContinueStatement* stmt) {
|
|
292
696
|
}
|
293
697
|
|
294
698
|
|
295
|
-
void
|
699
|
+
void FullCodeGenerator::VisitBreakStatement(BreakStatement* stmt) {
|
296
700
|
Comment cmnt(masm_, "[ BreakStatement");
|
297
701
|
SetStatementPosition(stmt);
|
298
702
|
NestedStatement* current = nesting_stack_;
|
@@ -308,7 +712,7 @@ void FastCodeGenerator::VisitBreakStatement(BreakStatement* stmt) {
|
|
308
712
|
}
|
309
713
|
|
310
714
|
|
311
|
-
void
|
715
|
+
void FullCodeGenerator::VisitReturnStatement(ReturnStatement* stmt) {
|
312
716
|
Comment cmnt(masm_, "[ ReturnStatement");
|
313
717
|
SetStatementPosition(stmt);
|
314
718
|
Expression* expr = stmt->expression();
|
@@ -327,7 +731,7 @@ void FastCodeGenerator::VisitReturnStatement(ReturnStatement* stmt) {
|
|
327
731
|
}
|
328
732
|
|
329
733
|
|
330
|
-
void
|
734
|
+
void FullCodeGenerator::VisitWithEnterStatement(WithEnterStatement* stmt) {
|
331
735
|
Comment cmnt(masm_, "[ WithEnterStatement");
|
332
736
|
SetStatementPosition(stmt);
|
333
737
|
|
@@ -345,7 +749,7 @@ void FastCodeGenerator::VisitWithEnterStatement(WithEnterStatement* stmt) {
|
|
345
749
|
}
|
346
750
|
|
347
751
|
|
348
|
-
void
|
752
|
+
void FullCodeGenerator::VisitWithExitStatement(WithExitStatement* stmt) {
|
349
753
|
Comment cmnt(masm_, "[ WithExitStatement");
|
350
754
|
SetStatementPosition(stmt);
|
351
755
|
|
@@ -356,12 +760,12 @@ void FastCodeGenerator::VisitWithExitStatement(WithExitStatement* stmt) {
|
|
356
760
|
}
|
357
761
|
|
358
762
|
|
359
|
-
void
|
763
|
+
void FullCodeGenerator::VisitSwitchStatement(SwitchStatement* stmt) {
|
360
764
|
UNREACHABLE();
|
361
765
|
}
|
362
766
|
|
363
767
|
|
364
|
-
void
|
768
|
+
void FullCodeGenerator::VisitDoWhileStatement(DoWhileStatement* stmt) {
|
365
769
|
Comment cmnt(masm_, "[ DoWhileStatement");
|
366
770
|
SetStatementPosition(stmt);
|
367
771
|
Label body, stack_limit_hit, stack_check_success;
|
@@ -391,7 +795,7 @@ void FastCodeGenerator::VisitDoWhileStatement(DoWhileStatement* stmt) {
|
|
391
795
|
}
|
392
796
|
|
393
797
|
|
394
|
-
void
|
798
|
+
void FullCodeGenerator::VisitWhileStatement(WhileStatement* stmt) {
|
395
799
|
Comment cmnt(masm_, "[ WhileStatement");
|
396
800
|
SetStatementPosition(stmt);
|
397
801
|
Label body, stack_limit_hit, stack_check_success;
|
@@ -422,17 +826,58 @@ void FastCodeGenerator::VisitWhileStatement(WhileStatement* stmt) {
|
|
422
826
|
}
|
423
827
|
|
424
828
|
|
425
|
-
void
|
426
|
-
|
829
|
+
void FullCodeGenerator::VisitForStatement(ForStatement* stmt) {
|
830
|
+
Comment cmnt(masm_, "[ ForStatement");
|
831
|
+
SetStatementPosition(stmt);
|
832
|
+
Label test, body, stack_limit_hit, stack_check_success;
|
833
|
+
|
834
|
+
Iteration loop_statement(this, stmt);
|
835
|
+
if (stmt->init() != NULL) {
|
836
|
+
Visit(stmt->init());
|
837
|
+
}
|
838
|
+
|
839
|
+
increment_loop_depth();
|
840
|
+
// Emit the test at the bottom of the loop (even if empty).
|
841
|
+
__ jmp(&test);
|
842
|
+
|
843
|
+
__ bind(&body);
|
844
|
+
Visit(stmt->body());
|
845
|
+
|
846
|
+
__ bind(loop_statement.continue_target());
|
847
|
+
|
848
|
+
SetStatementPosition(stmt);
|
849
|
+
if (stmt->next() != NULL) {
|
850
|
+
Visit(stmt->next());
|
851
|
+
}
|
852
|
+
|
853
|
+
__ bind(&test);
|
854
|
+
|
855
|
+
// Check stack before looping.
|
856
|
+
__ StackLimitCheck(&stack_limit_hit);
|
857
|
+
__ bind(&stack_check_success);
|
858
|
+
|
859
|
+
if (stmt->cond() != NULL) {
|
860
|
+
VisitForControl(stmt->cond(), &body, loop_statement.break_target());
|
861
|
+
} else {
|
862
|
+
__ jmp(&body);
|
863
|
+
}
|
864
|
+
|
865
|
+
__ bind(&stack_limit_hit);
|
866
|
+
StackCheckStub stack_stub;
|
867
|
+
__ CallStub(&stack_stub);
|
868
|
+
__ jmp(&stack_check_success);
|
869
|
+
|
870
|
+
__ bind(loop_statement.break_target());
|
871
|
+
decrement_loop_depth();
|
427
872
|
}
|
428
873
|
|
429
874
|
|
430
|
-
void
|
875
|
+
void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
|
431
876
|
UNREACHABLE();
|
432
877
|
}
|
433
878
|
|
434
879
|
|
435
|
-
void
|
880
|
+
void FullCodeGenerator::VisitTryCatchStatement(TryCatchStatement* stmt) {
|
436
881
|
Comment cmnt(masm_, "[ TryCatchStatement");
|
437
882
|
SetStatementPosition(stmt);
|
438
883
|
// The try block adds a handler to the exception handler chain
|
@@ -446,7 +891,6 @@ void FastCodeGenerator::VisitTryCatchStatement(TryCatchStatement* stmt) {
|
|
446
891
|
// that scope again afterwards.
|
447
892
|
|
448
893
|
Label try_handler_setup, catch_entry, done;
|
449
|
-
|
450
894
|
__ Call(&try_handler_setup);
|
451
895
|
// Try handler code, exception in result register.
|
452
896
|
|
@@ -476,7 +920,7 @@ void FastCodeGenerator::VisitTryCatchStatement(TryCatchStatement* stmt) {
|
|
476
920
|
}
|
477
921
|
|
478
922
|
|
479
|
-
void
|
923
|
+
void FullCodeGenerator::VisitTryFinallyStatement(TryFinallyStatement* stmt) {
|
480
924
|
Comment cmnt(masm_, "[ TryFinallyStatement");
|
481
925
|
SetStatementPosition(stmt);
|
482
926
|
// Try finally is compiled by setting up a try-handler on the stack while
|
@@ -540,161 +984,69 @@ void FastCodeGenerator::VisitTryFinallyStatement(TryFinallyStatement* stmt) {
|
|
540
984
|
}
|
541
985
|
|
542
986
|
|
543
|
-
void
|
987
|
+
void FullCodeGenerator::VisitDebuggerStatement(DebuggerStatement* stmt) {
|
544
988
|
#ifdef ENABLE_DEBUGGER_SUPPORT
|
545
989
|
Comment cmnt(masm_, "[ DebuggerStatement");
|
546
990
|
SetStatementPosition(stmt);
|
547
|
-
|
991
|
+
|
992
|
+
__ DebugBreak();
|
548
993
|
// Ignore the return value.
|
549
994
|
#endif
|
550
995
|
}
|
551
996
|
|
552
997
|
|
553
|
-
void
|
554
|
-
|
998
|
+
void FullCodeGenerator::VisitSharedFunctionInfoLiteral(
|
999
|
+
SharedFunctionInfoLiteral* expr) {
|
555
1000
|
UNREACHABLE();
|
556
1001
|
}
|
557
1002
|
|
558
1003
|
|
559
|
-
void
|
1004
|
+
void FullCodeGenerator::VisitConditional(Conditional* expr) {
|
560
1005
|
Comment cmnt(masm_, "[ Conditional");
|
561
|
-
ASSERT_EQ(Expression::kTest, expr->condition()->context());
|
562
|
-
ASSERT_EQ(expr->context(), expr->then_expression()->context());
|
563
|
-
ASSERT_EQ(expr->context(), expr->else_expression()->context());
|
564
|
-
|
565
|
-
|
566
1006
|
Label true_case, false_case, done;
|
567
1007
|
VisitForControl(expr->condition(), &true_case, &false_case);
|
568
1008
|
|
569
1009
|
__ bind(&true_case);
|
570
1010
|
Visit(expr->then_expression());
|
571
1011
|
// If control flow falls through Visit, jump to done.
|
572
|
-
if (
|
573
|
-
expr->context() == Expression::kValue) {
|
1012
|
+
if (context_ == Expression::kEffect || context_ == Expression::kValue) {
|
574
1013
|
__ jmp(&done);
|
575
1014
|
}
|
576
1015
|
|
577
1016
|
__ bind(&false_case);
|
578
1017
|
Visit(expr->else_expression());
|
579
1018
|
// If control flow falls through Visit, merge it with true case here.
|
580
|
-
if (
|
581
|
-
expr->context() == Expression::kValue) {
|
1019
|
+
if (context_ == Expression::kEffect || context_ == Expression::kValue) {
|
582
1020
|
__ bind(&done);
|
583
1021
|
}
|
584
1022
|
}
|
585
1023
|
|
586
1024
|
|
587
|
-
void
|
1025
|
+
void FullCodeGenerator::VisitSlot(Slot* expr) {
|
588
1026
|
// Slots do not appear directly in the AST.
|
589
1027
|
UNREACHABLE();
|
590
1028
|
}
|
591
1029
|
|
592
1030
|
|
593
|
-
void
|
1031
|
+
void FullCodeGenerator::VisitLiteral(Literal* expr) {
|
594
1032
|
Comment cmnt(masm_, "[ Literal");
|
595
|
-
Apply(
|
1033
|
+
Apply(context_, expr);
|
596
1034
|
}
|
597
1035
|
|
598
1036
|
|
599
|
-
void
|
600
|
-
Comment cmnt(masm_, "[ Assignment");
|
601
|
-
|
602
|
-
// Left-hand side can only be a property, a global or a (parameter or local)
|
603
|
-
// slot. Variables with rewrite to .arguments are treated as KEYED_PROPERTY.
|
604
|
-
enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY };
|
605
|
-
LhsKind assign_type = VARIABLE;
|
606
|
-
Property* prop = expr->target()->AsProperty();
|
607
|
-
// In case of a property we use the uninitialized expression context
|
608
|
-
// of the key to detect a named property.
|
609
|
-
if (prop != NULL) {
|
610
|
-
assign_type = (prop->key()->context() == Expression::kUninitialized)
|
611
|
-
? NAMED_PROPERTY
|
612
|
-
: KEYED_PROPERTY;
|
613
|
-
}
|
614
|
-
|
615
|
-
// Evaluate LHS expression.
|
616
|
-
switch (assign_type) {
|
617
|
-
case VARIABLE:
|
618
|
-
// Nothing to do here.
|
619
|
-
break;
|
620
|
-
case NAMED_PROPERTY:
|
621
|
-
VisitForValue(prop->obj(), kStack);
|
622
|
-
break;
|
623
|
-
case KEYED_PROPERTY:
|
624
|
-
VisitForValue(prop->obj(), kStack);
|
625
|
-
VisitForValue(prop->key(), kStack);
|
626
|
-
break;
|
627
|
-
}
|
628
|
-
|
629
|
-
// If we have a compound assignment: Get value of LHS expression and
|
630
|
-
// store in on top of the stack.
|
631
|
-
if (expr->is_compound()) {
|
632
|
-
Location saved_location = location_;
|
633
|
-
location_ = kStack;
|
634
|
-
switch (assign_type) {
|
635
|
-
case VARIABLE:
|
636
|
-
EmitVariableLoad(expr->target()->AsVariableProxy()->var(),
|
637
|
-
Expression::kValue);
|
638
|
-
break;
|
639
|
-
case NAMED_PROPERTY:
|
640
|
-
EmitNamedPropertyLoad(prop);
|
641
|
-
__ push(result_register());
|
642
|
-
break;
|
643
|
-
case KEYED_PROPERTY:
|
644
|
-
EmitKeyedPropertyLoad(prop);
|
645
|
-
__ push(result_register());
|
646
|
-
break;
|
647
|
-
}
|
648
|
-
location_ = saved_location;
|
649
|
-
}
|
650
|
-
|
651
|
-
// Evaluate RHS expression.
|
652
|
-
Expression* rhs = expr->value();
|
653
|
-
VisitForValue(rhs, kAccumulator);
|
654
|
-
|
655
|
-
// If we have a compount assignment: Apply operator.
|
656
|
-
if (expr->is_compound()) {
|
657
|
-
Location saved_location = location_;
|
658
|
-
location_ = kAccumulator;
|
659
|
-
EmitBinaryOp(expr->binary_op(), Expression::kValue);
|
660
|
-
location_ = saved_location;
|
661
|
-
}
|
662
|
-
|
663
|
-
// Record source position before possible IC call.
|
664
|
-
SetSourcePosition(expr->position());
|
665
|
-
|
666
|
-
// Store the value.
|
667
|
-
switch (assign_type) {
|
668
|
-
case VARIABLE:
|
669
|
-
EmitVariableAssignment(expr->target()->AsVariableProxy()->var(),
|
670
|
-
expr->context());
|
671
|
-
break;
|
672
|
-
case NAMED_PROPERTY:
|
673
|
-
EmitNamedPropertyAssignment(expr);
|
674
|
-
break;
|
675
|
-
case KEYED_PROPERTY:
|
676
|
-
EmitKeyedPropertyAssignment(expr);
|
677
|
-
break;
|
678
|
-
}
|
679
|
-
}
|
680
|
-
|
681
|
-
|
682
|
-
void FastCodeGenerator::VisitCatchExtensionObject(CatchExtensionObject* expr) {
|
1037
|
+
void FullCodeGenerator::VisitCatchExtensionObject(CatchExtensionObject* expr) {
|
683
1038
|
// Call runtime routine to allocate the catch extension object and
|
684
1039
|
// assign the exception value to the catch variable.
|
685
1040
|
Comment cmnt(masm_, "[ CatchExtensionObject");
|
686
|
-
|
687
1041
|
VisitForValue(expr->key(), kStack);
|
688
1042
|
VisitForValue(expr->value(), kStack);
|
689
|
-
|
690
1043
|
// Create catch extension object.
|
691
1044
|
__ CallRuntime(Runtime::kCreateCatchExtensionObject, 2);
|
692
|
-
|
693
|
-
__ push(result_register());
|
1045
|
+
Apply(context_, result_register());
|
694
1046
|
}
|
695
1047
|
|
696
1048
|
|
697
|
-
void
|
1049
|
+
void FullCodeGenerator::VisitThrow(Throw* expr) {
|
698
1050
|
Comment cmnt(masm_, "[ Throw");
|
699
1051
|
VisitForValue(expr->exception(), kStack);
|
700
1052
|
__ CallRuntime(Runtime::kThrow, 1);
|
@@ -702,7 +1054,7 @@ void FastCodeGenerator::VisitThrow(Throw* expr) {
|
|
702
1054
|
}
|
703
1055
|
|
704
1056
|
|
705
|
-
int
|
1057
|
+
int FullCodeGenerator::TryFinally::Exit(int stack_depth) {
|
706
1058
|
// The macros used here must preserve the result register.
|
707
1059
|
__ Drop(stack_depth);
|
708
1060
|
__ PopTryHandler();
|
@@ -711,14 +1063,13 @@ int FastCodeGenerator::TryFinally::Exit(int stack_depth) {
|
|
711
1063
|
}
|
712
1064
|
|
713
1065
|
|
714
|
-
int
|
1066
|
+
int FullCodeGenerator::TryCatch::Exit(int stack_depth) {
|
715
1067
|
// The macros used here must preserve the result register.
|
716
1068
|
__ Drop(stack_depth);
|
717
1069
|
__ PopTryHandler();
|
718
1070
|
return 0;
|
719
1071
|
}
|
720
1072
|
|
721
|
-
|
722
1073
|
#undef __
|
723
1074
|
|
724
1075
|
|