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
@@ -0,0 +1,129 @@
|
|
1
|
+
// Copyright 2010 the V8 project authors. All rights reserved.
|
2
|
+
// Redistribution and use in source and binary forms, with or without
|
3
|
+
// modification, are permitted provided that the following conditions are
|
4
|
+
// met:
|
5
|
+
//
|
6
|
+
// * Redistributions of source code must retain the above copyright
|
7
|
+
// notice, this list of conditions and the following disclaimer.
|
8
|
+
// * Redistributions in binary form must reproduce the above
|
9
|
+
// copyright notice, this list of conditions and the following
|
10
|
+
// disclaimer in the documentation and/or other materials provided
|
11
|
+
// with the distribution.
|
12
|
+
// * Neither the name of Google Inc. nor the names of its
|
13
|
+
// contributors may be used to endorse or promote products derived
|
14
|
+
// from this software without specific prior written permission.
|
15
|
+
//
|
16
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
17
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
18
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
19
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
20
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
21
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
22
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
24
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
25
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
26
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
+
|
28
|
+
#ifndef V8_CIRCULAR_QUEUE_H_
|
29
|
+
#define V8_CIRCULAR_QUEUE_H_
|
30
|
+
|
31
|
+
namespace v8 {
|
32
|
+
namespace internal {
|
33
|
+
|
34
|
+
|
35
|
+
// Lock-based blocking circular queue for small records. Intended for
|
36
|
+
// transfer of small records between a single producer and a single
|
37
|
+
// consumer. Blocks on enqueue operation if the queue is full.
|
38
|
+
template<typename Record>
|
39
|
+
class CircularQueue {
|
40
|
+
public:
|
41
|
+
inline explicit CircularQueue(int desired_buffer_size_in_bytes);
|
42
|
+
inline ~CircularQueue();
|
43
|
+
|
44
|
+
INLINE(void Dequeue(Record* rec));
|
45
|
+
INLINE(void Enqueue(const Record& rec));
|
46
|
+
INLINE(bool IsEmpty()) { return enqueue_pos_ == dequeue_pos_; }
|
47
|
+
|
48
|
+
private:
|
49
|
+
INLINE(Record* Next(Record* curr));
|
50
|
+
|
51
|
+
Record* buffer_;
|
52
|
+
Record* const buffer_end_;
|
53
|
+
Semaphore* enqueue_semaphore_;
|
54
|
+
Record* enqueue_pos_;
|
55
|
+
Record* dequeue_pos_;
|
56
|
+
|
57
|
+
DISALLOW_COPY_AND_ASSIGN(CircularQueue);
|
58
|
+
};
|
59
|
+
|
60
|
+
|
61
|
+
// Lock-free cache-friendly sampling circular queue for large
|
62
|
+
// records. Intended for fast transfer of large records between a
|
63
|
+
// single producer and a single consumer. If the queue is full,
|
64
|
+
// previous unread records are overwritten. The queue is designed with
|
65
|
+
// a goal in mind to evade cache lines thrashing by preventing
|
66
|
+
// simultaneous reads and writes to adjanced memory locations.
|
67
|
+
//
|
68
|
+
// IMPORTANT: as a producer never checks for chunks cleanness, it is
|
69
|
+
// possible that it can catch up and overwrite a chunk that a consumer
|
70
|
+
// is currently reading, resulting in a corrupt record being read.
|
71
|
+
class SamplingCircularQueue {
|
72
|
+
public:
|
73
|
+
// Executed on the application thread.
|
74
|
+
SamplingCircularQueue(int record_size_in_bytes,
|
75
|
+
int desired_chunk_size_in_bytes,
|
76
|
+
int buffer_size_in_chunks);
|
77
|
+
~SamplingCircularQueue();
|
78
|
+
|
79
|
+
// Enqueue returns a pointer to a memory location for storing the next
|
80
|
+
// record.
|
81
|
+
INLINE(void* Enqueue());
|
82
|
+
|
83
|
+
// Executed on the consumer (analyzer) thread.
|
84
|
+
// StartDequeue returns a pointer to a memory location for retrieving
|
85
|
+
// the next record. After the record had been read by a consumer,
|
86
|
+
// FinishDequeue must be called. Until that moment, subsequent calls
|
87
|
+
// to StartDequeue will return the same pointer.
|
88
|
+
void* StartDequeue();
|
89
|
+
void FinishDequeue();
|
90
|
+
// Due to a presence of slipping between the producer and the consumer,
|
91
|
+
// the queue must be notified whether producing has been finished in order
|
92
|
+
// to process remaining records from the buffer.
|
93
|
+
void FlushResidualRecords();
|
94
|
+
|
95
|
+
typedef AtomicWord Cell;
|
96
|
+
// Reserved values for the first cell of a record.
|
97
|
+
static const Cell kClear = 0; // Marks clean (processed) chunks.
|
98
|
+
static const Cell kEnd = -1; // Marks the end of the buffer.
|
99
|
+
|
100
|
+
private:
|
101
|
+
struct ProducerPosition {
|
102
|
+
Cell* enqueue_pos;
|
103
|
+
};
|
104
|
+
struct ConsumerPosition {
|
105
|
+
Cell* dequeue_chunk_pos;
|
106
|
+
Cell* dequeue_chunk_poll_pos;
|
107
|
+
Cell* dequeue_pos;
|
108
|
+
Cell* dequeue_end_pos;
|
109
|
+
};
|
110
|
+
|
111
|
+
INLINE(void WrapPositionIfNeeded(Cell** pos));
|
112
|
+
|
113
|
+
const int record_size_;
|
114
|
+
const int chunk_size_in_bytes_;
|
115
|
+
const int chunk_size_;
|
116
|
+
const int buffer_size_;
|
117
|
+
const int producer_consumer_distance_;
|
118
|
+
Cell* buffer_;
|
119
|
+
byte* positions_;
|
120
|
+
ProducerPosition* producer_pos_;
|
121
|
+
ConsumerPosition* consumer_pos_;
|
122
|
+
|
123
|
+
DISALLOW_COPY_AND_ASSIGN(SamplingCircularQueue);
|
124
|
+
};
|
125
|
+
|
126
|
+
|
127
|
+
} } // namespace v8::internal
|
128
|
+
|
129
|
+
#endif // V8_CIRCULAR_QUEUE_H_
|
@@ -31,6 +31,7 @@
|
|
31
31
|
#include "code-stubs.h"
|
32
32
|
#include "factory.h"
|
33
33
|
#include "macro-assembler.h"
|
34
|
+
#include "oprofile-agent.h"
|
34
35
|
|
35
36
|
namespace v8 {
|
36
37
|
namespace internal {
|
@@ -60,10 +61,10 @@ void CodeStub::GenerateCode(MacroAssembler* masm) {
|
|
60
61
|
void CodeStub::RecordCodeGeneration(Code* code, MacroAssembler* masm) {
|
61
62
|
code->set_major_key(MajorKey());
|
62
63
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
64
|
+
OPROFILE(CreateNativeCodeRegion(GetName(),
|
65
|
+
code->instruction_start(),
|
66
|
+
code->instruction_size()));
|
67
|
+
PROFILE(CodeCreateEvent(Logger::STUB_TAG, code, GetName()));
|
67
68
|
Counters::total_stubs_code_size.Increment(code->instruction_size());
|
68
69
|
|
69
70
|
#ifdef ENABLE_DISASSEMBLER
|
@@ -78,6 +79,11 @@ void CodeStub::RecordCodeGeneration(Code* code, MacroAssembler* masm) {
|
|
78
79
|
}
|
79
80
|
|
80
81
|
|
82
|
+
int CodeStub::GetCodeKind() {
|
83
|
+
return Code::STUB;
|
84
|
+
}
|
85
|
+
|
86
|
+
|
81
87
|
Handle<Code> CodeStub::GetCode() {
|
82
88
|
Code* code;
|
83
89
|
if (!FindCodeInCache(&code)) {
|
@@ -92,7 +98,10 @@ Handle<Code> CodeStub::GetCode() {
|
|
92
98
|
masm.GetCode(&desc);
|
93
99
|
|
94
100
|
// Copy the generated code into a heap object.
|
95
|
-
Code::Flags flags = Code::ComputeFlags(
|
101
|
+
Code::Flags flags = Code::ComputeFlags(
|
102
|
+
static_cast<Code::Kind>(GetCodeKind()),
|
103
|
+
InLoop(),
|
104
|
+
GetICState());
|
96
105
|
Handle<Code> new_object =
|
97
106
|
Factory::NewCode(desc, NULL, flags, masm.CodeObject());
|
98
107
|
RecordCodeGeneration(*new_object, &masm);
|
@@ -127,7 +136,10 @@ Object* CodeStub::TryGetCode() {
|
|
127
136
|
masm.GetCode(&desc);
|
128
137
|
|
129
138
|
// Try to copy the generated code into a heap object.
|
130
|
-
Code::Flags flags = Code::ComputeFlags(
|
139
|
+
Code::Flags flags = Code::ComputeFlags(
|
140
|
+
static_cast<Code::Kind>(GetCodeKind()),
|
141
|
+
InLoop(),
|
142
|
+
GetICState());
|
131
143
|
Object* new_object =
|
132
144
|
Heap::CreateCode(desc, NULL, flags, masm.CodeObject());
|
133
145
|
if (new_object->IsFailure()) return new_object;
|
@@ -149,13 +161,16 @@ Object* CodeStub::TryGetCode() {
|
|
149
161
|
}
|
150
162
|
|
151
163
|
|
152
|
-
const char* CodeStub::MajorName(CodeStub::Major major_key
|
164
|
+
const char* CodeStub::MajorName(CodeStub::Major major_key,
|
165
|
+
bool allow_unknown_keys) {
|
153
166
|
switch (major_key) {
|
154
167
|
#define DEF_CASE(name) case name: return #name;
|
155
168
|
CODE_STUB_LIST(DEF_CASE)
|
156
169
|
#undef DEF_CASE
|
157
170
|
default:
|
158
|
-
|
171
|
+
if (!allow_unknown_keys) {
|
172
|
+
UNREACHABLE();
|
173
|
+
}
|
159
174
|
return NULL;
|
160
175
|
}
|
161
176
|
}
|
@@ -28,6 +28,8 @@
|
|
28
28
|
#ifndef V8_CODE_STUBS_H_
|
29
29
|
#define V8_CODE_STUBS_H_
|
30
30
|
|
31
|
+
#include "globals.h"
|
32
|
+
|
31
33
|
namespace v8 {
|
32
34
|
namespace internal {
|
33
35
|
|
@@ -48,6 +50,7 @@ namespace internal {
|
|
48
50
|
V(FastNewClosure) \
|
49
51
|
V(FastNewContext) \
|
50
52
|
V(FastCloneShallowArray) \
|
53
|
+
V(TranscendentalCache) \
|
51
54
|
V(GenericUnaryOp) \
|
52
55
|
V(RevertToNumber) \
|
53
56
|
V(ToBoolean) \
|
@@ -55,9 +58,10 @@ namespace internal {
|
|
55
58
|
V(CounterOp) \
|
56
59
|
V(ArgumentsAccess) \
|
57
60
|
V(RegExpExec) \
|
58
|
-
V(
|
61
|
+
V(NumberToString) \
|
59
62
|
V(CEntry) \
|
60
|
-
V(JSEntry)
|
63
|
+
V(JSEntry) \
|
64
|
+
V(DebuggerStatement)
|
61
65
|
|
62
66
|
// List of code stubs only used on ARM platforms.
|
63
67
|
#ifdef V8_TARGET_ARCH_ARM
|
@@ -100,7 +104,7 @@ class CodeStub BASE_EMBEDDED {
|
|
100
104
|
static int MinorKeyFromKey(uint32_t key) {
|
101
105
|
return MinorKeyBits::decode(key);
|
102
106
|
};
|
103
|
-
static const char* MajorName(Major major_key);
|
107
|
+
static const char* MajorName(Major major_key, bool allow_unknown_keys);
|
104
108
|
|
105
109
|
virtual ~CodeStub() {}
|
106
110
|
|
@@ -137,8 +141,16 @@ class CodeStub BASE_EMBEDDED {
|
|
137
141
|
// lazily generated function should be fully optimized or not.
|
138
142
|
virtual InLoopFlag InLoop() { return NOT_IN_LOOP; }
|
139
143
|
|
144
|
+
// GenericBinaryOpStub needs to override this.
|
145
|
+
virtual int GetCodeKind();
|
146
|
+
|
147
|
+
// GenericBinaryOpStub needs to override this.
|
148
|
+
virtual InlineCacheState GetICState() {
|
149
|
+
return UNINITIALIZED;
|
150
|
+
}
|
151
|
+
|
140
152
|
// Returns a name for logging/debugging purposes.
|
141
|
-
virtual const char* GetName() { return MajorName(MajorKey()); }
|
153
|
+
virtual const char* GetName() { return MajorName(MajorKey(), false); }
|
142
154
|
|
143
155
|
#ifdef DEBUG
|
144
156
|
virtual void Print() { PrintF("%s\n", GetName()); }
|
File without changes
|
@@ -30,6 +30,7 @@
|
|
30
30
|
#define V8_CODEGEN_INL_H_
|
31
31
|
|
32
32
|
#include "codegen.h"
|
33
|
+
#include "compiler.h"
|
33
34
|
#include "register-allocator-inl.h"
|
34
35
|
|
35
36
|
#if V8_TARGET_ARCH_IA32
|
@@ -38,6 +39,8 @@
|
|
38
39
|
#include "x64/codegen-x64-inl.h"
|
39
40
|
#elif V8_TARGET_ARCH_ARM
|
40
41
|
#include "arm/codegen-arm-inl.h"
|
42
|
+
#elif V8_TARGET_ARCH_MIPS
|
43
|
+
#include "mips/codegen-mips-inl.h"
|
41
44
|
#else
|
42
45
|
#error Unsupported target architecture.
|
43
46
|
#endif
|
@@ -46,42 +49,11 @@
|
|
46
49
|
namespace v8 {
|
47
50
|
namespace internal {
|
48
51
|
|
49
|
-
|
52
|
+
Handle<Script> CodeGenerator::script() { return info_->script(); }
|
50
53
|
|
51
|
-
|
52
|
-
// Support for "structured" code comments.
|
53
|
-
//
|
54
|
-
// By selecting matching brackets in disassembler output,
|
55
|
-
// code segments can be identified more easily.
|
56
|
-
|
57
|
-
#ifdef DEBUG
|
58
|
-
|
59
|
-
class Comment BASE_EMBEDDED {
|
60
|
-
public:
|
61
|
-
Comment(MacroAssembler* masm, const char* msg) : masm_(masm), msg_(msg) {
|
62
|
-
__ RecordComment(msg);
|
63
|
-
}
|
64
|
-
|
65
|
-
~Comment() {
|
66
|
-
if (msg_[0] == '[') __ RecordComment("]");
|
67
|
-
}
|
68
|
-
|
69
|
-
private:
|
70
|
-
MacroAssembler* masm_;
|
71
|
-
const char* msg_;
|
72
|
-
};
|
73
|
-
|
74
|
-
#else
|
75
|
-
|
76
|
-
class Comment BASE_EMBEDDED {
|
77
|
-
public:
|
78
|
-
Comment(MacroAssembler*, const char*) {}
|
79
|
-
};
|
80
|
-
|
81
|
-
#endif // DEBUG
|
82
|
-
|
83
|
-
#undef __
|
54
|
+
bool CodeGenerator::is_eval() { return info_->is_eval(); }
|
84
55
|
|
56
|
+
Scope* CodeGenerator::scope() { return info_->function()->scope(); }
|
85
57
|
|
86
58
|
} } // namespace v8::internal
|
87
59
|
|
@@ -38,45 +38,32 @@
|
|
38
38
|
#include "runtime.h"
|
39
39
|
#include "scopeinfo.h"
|
40
40
|
#include "stub-cache.h"
|
41
|
+
#include "virtual-frame-inl.h"
|
41
42
|
|
42
43
|
namespace v8 {
|
43
44
|
namespace internal {
|
44
45
|
|
46
|
+
#define __ ACCESS_MASM(masm_)
|
45
47
|
|
46
|
-
|
47
|
-
|
48
|
+
#ifdef DEBUG
|
48
49
|
|
49
|
-
|
50
|
-
: masm_(
|
51
|
-
|
52
|
-
|
53
|
-
ASSERT(statement_position_ != RelocInfo::kNoPosition);
|
54
|
-
ASSERT(position_ != RelocInfo::kNoPosition);
|
50
|
+
Comment::Comment(MacroAssembler* masm, const char* msg)
|
51
|
+
: masm_(masm), msg_(msg) {
|
52
|
+
__ RecordComment(msg);
|
53
|
+
}
|
55
54
|
|
56
|
-
CodeGeneratorScope::Current()->AddDeferred(this);
|
57
|
-
#ifdef DEBUG
|
58
|
-
comment_ = "";
|
59
|
-
#endif
|
60
55
|
|
61
|
-
|
62
|
-
|
63
|
-
// deferred code and restored on exit.
|
64
|
-
VirtualFrame* frame = CodeGeneratorScope::Current()->frame();
|
65
|
-
int sp_offset = frame->fp_relative(frame->stack_pointer_);
|
66
|
-
for (int i = 0; i < RegisterAllocator::kNumRegisters; i++) {
|
67
|
-
int loc = frame->register_location(i);
|
68
|
-
if (loc == VirtualFrame::kIllegalIndex) {
|
69
|
-
registers_[i] = kIgnore;
|
70
|
-
} else if (frame->elements_[loc].is_synced()) {
|
71
|
-
// Needs to be restored on exit but not saved on entry.
|
72
|
-
registers_[i] = frame->fp_relative(loc) | kSyncedFlag;
|
73
|
-
} else {
|
74
|
-
int offset = frame->fp_relative(loc);
|
75
|
-
registers_[i] = (offset < sp_offset) ? kPush : offset;
|
76
|
-
}
|
77
|
-
}
|
56
|
+
Comment::~Comment() {
|
57
|
+
if (msg_[0] == '[') __ RecordComment("]");
|
78
58
|
}
|
79
59
|
|
60
|
+
#endif // DEBUG
|
61
|
+
|
62
|
+
#undef __
|
63
|
+
|
64
|
+
|
65
|
+
CodeGenerator* CodeGeneratorScope::top_ = NULL;
|
66
|
+
|
80
67
|
|
81
68
|
void CodeGenerator::ProcessDeferred() {
|
82
69
|
while (!deferred_.is_empty()) {
|
@@ -126,7 +113,7 @@ void CodeGenerator::DeleteFrame() {
|
|
126
113
|
}
|
127
114
|
|
128
115
|
|
129
|
-
void CodeGenerator::MakeCodePrologue(
|
116
|
+
void CodeGenerator::MakeCodePrologue(CompilationInfo* info) {
|
130
117
|
#ifdef DEBUG
|
131
118
|
bool print_source = false;
|
132
119
|
bool print_ast = false;
|
@@ -147,60 +134,61 @@ void CodeGenerator::MakeCodePrologue(FunctionLiteral* fun) {
|
|
147
134
|
|
148
135
|
if (FLAG_trace_codegen || print_source || print_ast) {
|
149
136
|
PrintF("*** Generate code for %s function: ", ftype);
|
150
|
-
|
137
|
+
info->function()->name()->ShortPrint();
|
151
138
|
PrintF(" ***\n");
|
152
139
|
}
|
153
140
|
|
154
141
|
if (print_source) {
|
155
|
-
PrintF("--- Source from AST ---\n%s\n",
|
142
|
+
PrintF("--- Source from AST ---\n%s\n",
|
143
|
+
PrettyPrinter().PrintProgram(info->function()));
|
156
144
|
}
|
157
145
|
|
158
146
|
if (print_ast) {
|
159
|
-
PrintF("--- AST ---\n%s\n",
|
147
|
+
PrintF("--- AST ---\n%s\n",
|
148
|
+
AstPrinter().PrintProgram(info->function()));
|
160
149
|
}
|
161
150
|
|
162
151
|
if (print_json_ast) {
|
163
152
|
JsonAstBuilder builder;
|
164
|
-
PrintF("%s", builder.BuildProgram(
|
153
|
+
PrintF("%s", builder.BuildProgram(info->function()));
|
165
154
|
}
|
166
155
|
#endif // DEBUG
|
167
156
|
}
|
168
157
|
|
169
158
|
|
170
|
-
Handle<Code> CodeGenerator::MakeCodeEpilogue(
|
171
|
-
MacroAssembler* masm,
|
159
|
+
Handle<Code> CodeGenerator::MakeCodeEpilogue(MacroAssembler* masm,
|
172
160
|
Code::Flags flags,
|
173
|
-
|
161
|
+
CompilationInfo* info) {
|
174
162
|
// Allocate and install the code.
|
175
163
|
CodeDesc desc;
|
176
164
|
masm->GetCode(&desc);
|
177
|
-
ZoneScopeInfo sinfo(
|
165
|
+
ZoneScopeInfo sinfo(info->scope());
|
178
166
|
Handle<Code> code =
|
179
167
|
Factory::NewCode(desc, &sinfo, flags, masm->CodeObject());
|
180
168
|
|
181
|
-
// Add unresolved entries in the code to the fixup list.
|
182
|
-
Bootstrapper::AddFixup(*code, masm);
|
183
|
-
|
184
169
|
#ifdef ENABLE_DISASSEMBLER
|
185
170
|
bool print_code = Bootstrapper::IsActive()
|
186
171
|
? FLAG_print_builtin_code
|
187
172
|
: FLAG_print_code;
|
188
173
|
if (print_code) {
|
189
174
|
// Print the source code if available.
|
175
|
+
Handle<Script> script = info->script();
|
176
|
+
FunctionLiteral* function = info->function();
|
190
177
|
if (!script->IsUndefined() && !script->source()->IsUndefined()) {
|
191
178
|
PrintF("--- Raw source ---\n");
|
192
179
|
StringInputBuffer stream(String::cast(script->source()));
|
193
|
-
stream.Seek(
|
180
|
+
stream.Seek(function->start_position());
|
194
181
|
// fun->end_position() points to the last character in the stream. We
|
195
182
|
// need to compensate by adding one to calculate the length.
|
196
|
-
int source_len =
|
183
|
+
int source_len =
|
184
|
+
function->end_position() - function->start_position() + 1;
|
197
185
|
for (int i = 0; i < source_len; i++) {
|
198
186
|
if (stream.has_more()) PrintF("%c", stream.GetNext());
|
199
187
|
}
|
200
188
|
PrintF("\n\n");
|
201
189
|
}
|
202
190
|
PrintF("--- Code ---\n");
|
203
|
-
code->Disassemble(*
|
191
|
+
code->Disassemble(*function->name()->ToCString());
|
204
192
|
}
|
205
193
|
#endif // ENABLE_DISASSEMBLER
|
206
194
|
|
@@ -214,15 +202,19 @@ Handle<Code> CodeGenerator::MakeCodeEpilogue(FunctionLiteral* fun,
|
|
214
202
|
// Generate the code. Takes a function literal, generates code for it, assemble
|
215
203
|
// all the pieces into a Code object. This function is only to be called by
|
216
204
|
// the compiler.cc code.
|
217
|
-
Handle<Code> CodeGenerator::MakeCode(
|
218
|
-
|
219
|
-
|
220
|
-
|
205
|
+
Handle<Code> CodeGenerator::MakeCode(CompilationInfo* info) {
|
206
|
+
Handle<Script> script = info->script();
|
207
|
+
if (!script->IsUndefined() && !script->source()->IsUndefined()) {
|
208
|
+
int len = String::cast(script->source())->length();
|
209
|
+
Counters::total_old_codegen_source_size.Increment(len);
|
210
|
+
}
|
211
|
+
MakeCodePrologue(info);
|
221
212
|
// Generate code.
|
222
213
|
const int kInitialBufferSize = 4 * KB;
|
223
|
-
|
214
|
+
MacroAssembler masm(NULL, kInitialBufferSize);
|
215
|
+
CodeGenerator cgen(&masm);
|
224
216
|
CodeGeneratorScope scope(&cgen);
|
225
|
-
cgen.
|
217
|
+
cgen.Generate(info);
|
226
218
|
if (cgen.HasStackOverflow()) {
|
227
219
|
ASSERT(!Top::has_pending_exception());
|
228
220
|
return Handle<Code>::null();
|
@@ -230,7 +222,7 @@ Handle<Code> CodeGenerator::MakeCode(FunctionLiteral* fun,
|
|
230
222
|
|
231
223
|
InLoopFlag in_loop = (cgen.loop_nesting() != 0) ? IN_LOOP : NOT_IN_LOOP;
|
232
224
|
Code::Flags flags = Code::ComputeFlags(Code::FUNCTION, in_loop);
|
233
|
-
return MakeCodeEpilogue(
|
225
|
+
return MakeCodeEpilogue(cgen.masm(), flags, info);
|
234
226
|
}
|
235
227
|
|
236
228
|
|
@@ -238,7 +230,7 @@ Handle<Code> CodeGenerator::MakeCode(FunctionLiteral* fun,
|
|
238
230
|
|
239
231
|
bool CodeGenerator::ShouldGenerateLog(Expression* type) {
|
240
232
|
ASSERT(type != NULL);
|
241
|
-
if (!Logger::is_logging()) return false;
|
233
|
+
if (!Logger::is_logging() && !CpuProfiler::is_profiling()) return false;
|
242
234
|
Handle<String> name = Handle<String>::cast(type->AsLiteral()->handle());
|
243
235
|
if (FLAG_log_regexp) {
|
244
236
|
static Vector<const char> kRegexp = CStrVector("regexp");
|
@@ -307,8 +299,8 @@ void CodeGenerator::ProcessDeclarations(ZoneList<Declaration*>* declarations) {
|
|
307
299
|
array->set_undefined(j++);
|
308
300
|
}
|
309
301
|
} else {
|
310
|
-
Handle<
|
311
|
-
Compiler::
|
302
|
+
Handle<SharedFunctionInfo> function =
|
303
|
+
Compiler::BuildFunctionInfo(node->fun(), script(), this);
|
312
304
|
// Check for stack-overflow exception.
|
313
305
|
if (HasStackOverflow()) return;
|
314
306
|
array->set(j++, *function);
|
@@ -322,34 +314,18 @@ void CodeGenerator::ProcessDeclarations(ZoneList<Declaration*>* declarations) {
|
|
322
314
|
}
|
323
315
|
|
324
316
|
|
317
|
+
// List of special runtime calls which are generated inline. For some of these
|
318
|
+
// functions the code will be generated inline, and for others a call to a code
|
319
|
+
// stub will be inlined.
|
320
|
+
|
321
|
+
#define INLINE_RUNTIME_ENTRY(Name, argc, ressize) \
|
322
|
+
{&CodeGenerator::Generate##Name, "_" #Name, argc}, \
|
325
323
|
|
326
|
-
// Special cases: These 'runtime calls' manipulate the current
|
327
|
-
// frame and are only used 1 or two places, so we generate them
|
328
|
-
// inline instead of generating calls to them. They are used
|
329
|
-
// for implementing Function.prototype.call() and
|
330
|
-
// Function.prototype.apply().
|
331
324
|
CodeGenerator::InlineRuntimeLUT CodeGenerator::kInlineRuntimeLUT[] = {
|
332
|
-
|
333
|
-
{&CodeGenerator::GenerateIsNonNegativeSmi, "_IsNonNegativeSmi"},
|
334
|
-
{&CodeGenerator::GenerateIsArray, "_IsArray"},
|
335
|
-
{&CodeGenerator::GenerateIsConstructCall, "_IsConstructCall"},
|
336
|
-
{&CodeGenerator::GenerateArgumentsLength, "_ArgumentsLength"},
|
337
|
-
{&CodeGenerator::GenerateArgumentsAccess, "_Arguments"},
|
338
|
-
{&CodeGenerator::GenerateClassOf, "_ClassOf"},
|
339
|
-
{&CodeGenerator::GenerateValueOf, "_ValueOf"},
|
340
|
-
{&CodeGenerator::GenerateSetValueOf, "_SetValueOf"},
|
341
|
-
{&CodeGenerator::GenerateFastCharCodeAt, "_FastCharCodeAt"},
|
342
|
-
{&CodeGenerator::GenerateObjectEquals, "_ObjectEquals"},
|
343
|
-
{&CodeGenerator::GenerateLog, "_Log"},
|
344
|
-
{&CodeGenerator::GenerateRandomPositiveSmi, "_RandomPositiveSmi"},
|
345
|
-
{&CodeGenerator::GenerateIsObject, "_IsObject"},
|
346
|
-
{&CodeGenerator::GenerateIsFunction, "_IsFunction"},
|
347
|
-
{&CodeGenerator::GenerateStringAdd, "_StringAdd"},
|
348
|
-
{&CodeGenerator::GenerateSubString, "_SubString"},
|
349
|
-
{&CodeGenerator::GenerateStringCompare, "_StringCompare"},
|
350
|
-
{&CodeGenerator::GenerateRegExpExec, "_RegExpExec"},
|
325
|
+
INLINE_RUNTIME_FUNCTION_LIST(INLINE_RUNTIME_ENTRY)
|
351
326
|
};
|
352
327
|
|
328
|
+
#undef INLINE_RUNTIME_ENTRY
|
353
329
|
|
354
330
|
CodeGenerator::InlineRuntimeLUT* CodeGenerator::FindInlineRuntimeLUT(
|
355
331
|
Handle<String> name) {
|
@@ -394,6 +370,14 @@ bool CodeGenerator::PatchInlineRuntimeEntry(Handle<String> name,
|
|
394
370
|
}
|
395
371
|
|
396
372
|
|
373
|
+
int CodeGenerator::InlineRuntimeCallArgumentsCount(Handle<String> name) {
|
374
|
+
CodeGenerator::InlineRuntimeLUT* f =
|
375
|
+
CodeGenerator::FindInlineRuntimeLUT(name);
|
376
|
+
if (f != NULL) return f->nargs;
|
377
|
+
return -1;
|
378
|
+
}
|
379
|
+
|
380
|
+
|
397
381
|
// Simple condition analysis. ALWAYS_TRUE and ALWAYS_FALSE represent a
|
398
382
|
// known result for the test expression, with no side effects.
|
399
383
|
CodeGenerator::ConditionAnalysis CodeGenerator::AnalyzeCondition(
|
@@ -446,11 +430,6 @@ void CodeGenerator::CodeForSourcePosition(int pos) {
|
|
446
430
|
}
|
447
431
|
|
448
432
|
|
449
|
-
const char* RuntimeStub::GetName() {
|
450
|
-
return Runtime::FunctionForId(id_)->stub_name;
|
451
|
-
}
|
452
|
-
|
453
|
-
|
454
433
|
const char* GenericUnaryOpStub::GetName() {
|
455
434
|
switch (op_) {
|
456
435
|
case Token::SUB:
|
@@ -468,23 +447,25 @@ const char* GenericUnaryOpStub::GetName() {
|
|
468
447
|
}
|
469
448
|
|
470
449
|
|
471
|
-
void RuntimeStub::Generate(MacroAssembler* masm) {
|
472
|
-
Runtime::Function* f = Runtime::FunctionForId(id_);
|
473
|
-
masm->TailCallRuntime(ExternalReference(f),
|
474
|
-
num_arguments_,
|
475
|
-
f->result_size);
|
476
|
-
}
|
477
|
-
|
478
|
-
|
479
450
|
void ArgumentsAccessStub::Generate(MacroAssembler* masm) {
|
480
451
|
switch (type_) {
|
481
|
-
case READ_LENGTH: GenerateReadLength(masm); break;
|
482
452
|
case READ_ELEMENT: GenerateReadElement(masm); break;
|
483
453
|
case NEW_OBJECT: GenerateNewObject(masm); break;
|
484
454
|
}
|
485
455
|
}
|
486
456
|
|
487
457
|
|
458
|
+
int CEntryStub::MinorKey() {
|
459
|
+
ASSERT(result_size_ <= 2);
|
460
|
+
#ifdef _WIN64
|
461
|
+
return ExitFrameModeBits::encode(mode_)
|
462
|
+
| IndirectResultBits::encode(result_size_ > 1);
|
463
|
+
#else
|
464
|
+
return ExitFrameModeBits::encode(mode_);
|
465
|
+
#endif
|
466
|
+
}
|
467
|
+
|
468
|
+
|
488
469
|
bool ApiGetterEntryStub::GetCustomCache(Code** code_out) {
|
489
470
|
Object* cache = info()->load_stub_cache();
|
490
471
|
if (cache->IsUndefined()) {
|