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
@@ -30,6 +30,7 @@
|
|
30
30
|
#include "codegen-inl.h"
|
31
31
|
#include "jump-target-inl.h"
|
32
32
|
#include "register-allocator-inl.h"
|
33
|
+
#include "virtual-frame-inl.h"
|
33
34
|
|
34
35
|
namespace v8 {
|
35
36
|
namespace internal {
|
@@ -172,14 +173,7 @@ void BreakTarget::Jump() {
|
|
172
173
|
|
173
174
|
|
174
175
|
void BreakTarget::Jump(Result* arg) {
|
175
|
-
|
176
|
-
// it explicitly here. The only merging necessary is to drop extra
|
177
|
-
// statement state from the stack.
|
178
|
-
ASSERT(cgen()->has_valid_frame());
|
179
|
-
int count = cgen()->frame()->height() - expected_height_;
|
180
|
-
cgen()->frame()->Drop(count);
|
181
|
-
cgen()->frame()->Push(arg);
|
182
|
-
DoJump();
|
176
|
+
UNIMPLEMENTED();
|
183
177
|
}
|
184
178
|
|
185
179
|
|
@@ -208,27 +202,7 @@ void BreakTarget::Bind() {
|
|
208
202
|
|
209
203
|
|
210
204
|
void BreakTarget::Bind(Result* arg) {
|
211
|
-
|
212
|
-
// All the forward-reaching frames should have been adjusted at the
|
213
|
-
// jumps to this target.
|
214
|
-
for (int i = 0; i < reaching_frames_.length(); i++) {
|
215
|
-
ASSERT(reaching_frames_[i] == NULL ||
|
216
|
-
reaching_frames_[i]->height() == expected_height_ + 1);
|
217
|
-
}
|
218
|
-
#endif
|
219
|
-
// Drop leftover statement state from the frame before merging, even
|
220
|
-
// on the fall through. This is so we can bind the return target
|
221
|
-
// with state on the frame.
|
222
|
-
if (cgen()->has_valid_frame()) {
|
223
|
-
int count = cgen()->frame()->height() - expected_height_;
|
224
|
-
// On ARM we do not currently emit merge code at binding sites, so we need
|
225
|
-
// to do it explicitly here. The only merging necessary is to drop extra
|
226
|
-
// statement state from the stack.
|
227
|
-
cgen()->frame()->ForgetElements(count);
|
228
|
-
cgen()->frame()->Push(arg);
|
229
|
-
}
|
230
|
-
DoBind();
|
231
|
-
*arg = cgen()->frame()->Pop();
|
205
|
+
UNIMPLEMENTED();
|
232
206
|
}
|
233
207
|
|
234
208
|
|
@@ -37,7 +37,6 @@ namespace internal {
|
|
37
37
|
|
38
38
|
MacroAssembler::MacroAssembler(void* buffer, int size)
|
39
39
|
: Assembler(buffer, size),
|
40
|
-
unresolved_(0),
|
41
40
|
generating_stub_(false),
|
42
41
|
allow_stub_calls_(true),
|
43
42
|
code_object_(Heap::undefined_value()) {
|
@@ -59,11 +58,6 @@ MacroAssembler::MacroAssembler(void* buffer, int size)
|
|
59
58
|
#endif
|
60
59
|
|
61
60
|
|
62
|
-
// Using blx may yield better code, so use it when required or when available
|
63
|
-
#if defined(USE_THUMB_INTERWORK) || defined(CAN_USE_ARMV5_INSTRUCTIONS)
|
64
|
-
#define USE_BLX 1
|
65
|
-
#endif
|
66
|
-
|
67
61
|
// Using bx does not yield better code, so use it only when required
|
68
62
|
#if defined(USE_THUMB_INTERWORK)
|
69
63
|
#define USE_BX 1
|
@@ -118,16 +112,34 @@ void MacroAssembler::Call(Register target, Condition cond) {
|
|
118
112
|
|
119
113
|
void MacroAssembler::Call(intptr_t target, RelocInfo::Mode rmode,
|
120
114
|
Condition cond) {
|
115
|
+
#if USE_BLX
|
116
|
+
// On ARMv5 and after the recommended call sequence is:
|
117
|
+
// ldr ip, [pc, #...]
|
118
|
+
// blx ip
|
119
|
+
|
120
|
+
// The two instructions (ldr and blx) could be separated by a constant
|
121
|
+
// pool and the code would still work. The issue comes from the
|
122
|
+
// patching code which expect the ldr to be just above the blx.
|
123
|
+
{ BlockConstPoolScope block_const_pool(this);
|
124
|
+
// Statement positions are expected to be recorded when the target
|
125
|
+
// address is loaded. The mov method will automatically record
|
126
|
+
// positions when pc is the target, since this is not the case here
|
127
|
+
// we have to do it explicitly.
|
128
|
+
WriteRecordedPositions();
|
129
|
+
|
130
|
+
mov(ip, Operand(target, rmode), LeaveCC, cond);
|
131
|
+
blx(ip, cond);
|
132
|
+
}
|
133
|
+
|
134
|
+
ASSERT(kCallTargetAddressOffset == 2 * kInstrSize);
|
135
|
+
#else
|
121
136
|
// Set lr for return at current pc + 8.
|
122
137
|
mov(lr, Operand(pc), LeaveCC, cond);
|
123
138
|
// Emit a ldr<cond> pc, [pc + offset of target in constant pool].
|
124
139
|
mov(pc, Operand(target, rmode), LeaveCC, cond);
|
125
|
-
|
126
|
-
// 'blx ip'; however, the code would not be shorter than the above sequence
|
127
|
-
// and the target address of the call would be referenced by the first
|
128
|
-
// instruction rather than the second one, which would make it harder to patch
|
129
|
-
// (two instructions before the return address, instead of one).
|
140
|
+
|
130
141
|
ASSERT(kCallTargetAddressOffset == kInstrSize);
|
142
|
+
#endif
|
131
143
|
}
|
132
144
|
|
133
145
|
|
@@ -169,6 +181,19 @@ void MacroAssembler::Drop(int count, Condition cond) {
|
|
169
181
|
}
|
170
182
|
|
171
183
|
|
184
|
+
void MacroAssembler::Swap(Register reg1, Register reg2, Register scratch) {
|
185
|
+
if (scratch.is(no_reg)) {
|
186
|
+
eor(reg1, reg1, Operand(reg2));
|
187
|
+
eor(reg2, reg2, Operand(reg1));
|
188
|
+
eor(reg1, reg1, Operand(reg2));
|
189
|
+
} else {
|
190
|
+
mov(scratch, reg1);
|
191
|
+
mov(reg1, reg2);
|
192
|
+
mov(reg2, scratch);
|
193
|
+
}
|
194
|
+
}
|
195
|
+
|
196
|
+
|
172
197
|
void MacroAssembler::Call(Label* target) {
|
173
198
|
bl(target);
|
174
199
|
}
|
@@ -179,6 +204,13 @@ void MacroAssembler::Move(Register dst, Handle<Object> value) {
|
|
179
204
|
}
|
180
205
|
|
181
206
|
|
207
|
+
void MacroAssembler::Move(Register dst, Register src) {
|
208
|
+
if (!dst.is(src)) {
|
209
|
+
mov(dst, src);
|
210
|
+
}
|
211
|
+
}
|
212
|
+
|
213
|
+
|
182
214
|
void MacroAssembler::SmiJumpTable(Register index, Vector<Label*> targets) {
|
183
215
|
// Empty the const pool.
|
184
216
|
CheckConstPool(true, true);
|
@@ -196,29 +228,27 @@ void MacroAssembler::SmiJumpTable(Register index, Vector<Label*> targets) {
|
|
196
228
|
void MacroAssembler::LoadRoot(Register destination,
|
197
229
|
Heap::RootListIndex index,
|
198
230
|
Condition cond) {
|
199
|
-
ldr(destination, MemOperand(
|
231
|
+
ldr(destination, MemOperand(roots, index << kPointerSizeLog2), cond);
|
200
232
|
}
|
201
233
|
|
202
234
|
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
235
|
+
void MacroAssembler::RecordWriteHelper(Register object,
|
236
|
+
Register offset,
|
237
|
+
Register scratch) {
|
238
|
+
if (FLAG_debug_code) {
|
239
|
+
// Check that the object is not in new space.
|
240
|
+
Label not_in_new_space;
|
241
|
+
InNewSpace(object, scratch, ne, ¬_in_new_space);
|
242
|
+
Abort("new-space object passed to RecordWriteHelper");
|
243
|
+
bind(¬_in_new_space);
|
244
|
+
}
|
245
|
+
|
208
246
|
// This is how much we shift the remembered set bit offset to get the
|
209
247
|
// offset of the word in the remembered set. We divide by kBitsPerInt (32,
|
210
248
|
// shift right 5) and then multiply by kIntSize (4, shift left 2).
|
211
249
|
const int kRSetWordShift = 3;
|
212
250
|
|
213
|
-
Label fast
|
214
|
-
|
215
|
-
// First, test that the object is not in the new space. We cannot set
|
216
|
-
// remembered set bits in the new space.
|
217
|
-
// object: heap object pointer (with tag)
|
218
|
-
// offset: offset to store location from the object
|
219
|
-
and_(scratch, object, Operand(Heap::NewSpaceMask()));
|
220
|
-
cmp(scratch, Operand(ExternalReference::new_space_start()));
|
221
|
-
b(eq, &done);
|
251
|
+
Label fast;
|
222
252
|
|
223
253
|
// Compute the bit offset in the remembered set.
|
224
254
|
// object: heap object pointer (with tag)
|
@@ -270,8 +300,48 @@ void MacroAssembler::RecordWrite(Register object, Register offset,
|
|
270
300
|
mov(ip, Operand(1));
|
271
301
|
orr(scratch, scratch, Operand(ip, LSL, offset));
|
272
302
|
str(scratch, MemOperand(object));
|
303
|
+
}
|
304
|
+
|
305
|
+
|
306
|
+
void MacroAssembler::InNewSpace(Register object,
|
307
|
+
Register scratch,
|
308
|
+
Condition cc,
|
309
|
+
Label* branch) {
|
310
|
+
ASSERT(cc == eq || cc == ne);
|
311
|
+
and_(scratch, object, Operand(ExternalReference::new_space_mask()));
|
312
|
+
cmp(scratch, Operand(ExternalReference::new_space_start()));
|
313
|
+
b(cc, branch);
|
314
|
+
}
|
315
|
+
|
316
|
+
|
317
|
+
// Will clobber 4 registers: object, offset, scratch, ip. The
|
318
|
+
// register 'object' contains a heap object pointer. The heap object
|
319
|
+
// tag is shifted away.
|
320
|
+
void MacroAssembler::RecordWrite(Register object, Register offset,
|
321
|
+
Register scratch) {
|
322
|
+
// The compiled code assumes that record write doesn't change the
|
323
|
+
// context register, so we check that none of the clobbered
|
324
|
+
// registers are cp.
|
325
|
+
ASSERT(!object.is(cp) && !offset.is(cp) && !scratch.is(cp));
|
326
|
+
|
327
|
+
Label done;
|
328
|
+
|
329
|
+
// First, test that the object is not in the new space. We cannot set
|
330
|
+
// remembered set bits in the new space.
|
331
|
+
InNewSpace(object, scratch, eq, &done);
|
332
|
+
|
333
|
+
// Record the actual write.
|
334
|
+
RecordWriteHelper(object, offset, scratch);
|
273
335
|
|
274
336
|
bind(&done);
|
337
|
+
|
338
|
+
// Clobber all input registers when running with the debug-code flag
|
339
|
+
// turned on to provoke errors.
|
340
|
+
if (FLAG_debug_code) {
|
341
|
+
mov(object, Operand(BitCast<int32_t>(kZapValue)));
|
342
|
+
mov(offset, Operand(BitCast<int32_t>(kZapValue)));
|
343
|
+
mov(scratch, Operand(BitCast<int32_t>(kZapValue)));
|
344
|
+
}
|
275
345
|
}
|
276
346
|
|
277
347
|
|
@@ -311,21 +381,26 @@ void MacroAssembler::EnterExitFrame(ExitFrame::Mode mode) {
|
|
311
381
|
// ip = sp + kPointerSize * #args;
|
312
382
|
add(ip, sp, Operand(r0, LSL, kPointerSizeLog2));
|
313
383
|
|
314
|
-
//
|
315
|
-
//
|
316
|
-
//
|
317
|
-
|
384
|
+
// Prepare the stack to be aligned when calling into C. After this point there
|
385
|
+
// are 5 pushes before the call into C, so the stack needs to be aligned after
|
386
|
+
// 5 pushes.
|
387
|
+
int frame_alignment = ActivationFrameAlignment();
|
388
|
+
int frame_alignment_mask = frame_alignment - 1;
|
389
|
+
if (frame_alignment != kPointerSize) {
|
390
|
+
// The following code needs to be more general if this assert does not hold.
|
391
|
+
ASSERT(frame_alignment == 2 * kPointerSize);
|
392
|
+
// With 5 pushes left the frame must be unaligned at this point.
|
393
|
+
mov(r7, Operand(Smi::FromInt(0)));
|
394
|
+
tst(sp, Operand((frame_alignment - kPointerSize) & frame_alignment_mask));
|
395
|
+
push(r7, eq); // Push if aligned to make it unaligned.
|
396
|
+
}
|
318
397
|
|
319
398
|
// Push in reverse order: caller_fp, sp_on_exit, and caller_pc.
|
320
399
|
stm(db_w, sp, fp.bit() | ip.bit() | lr.bit());
|
321
|
-
mov(fp, Operand(sp)); //
|
400
|
+
mov(fp, Operand(sp)); // Setup new frame pointer.
|
322
401
|
|
323
|
-
|
324
|
-
|
325
|
-
} else {
|
326
|
-
mov(ip, Operand(CodeObject()));
|
327
|
-
}
|
328
|
-
push(ip);
|
402
|
+
mov(ip, Operand(CodeObject()));
|
403
|
+
push(ip); // Accessed from ExitFrame::code_slot.
|
329
404
|
|
330
405
|
// Save the frame pointer and the context in top.
|
331
406
|
mov(ip, Operand(ExternalReference(Top::k_c_entry_fp_address)));
|
@@ -349,27 +424,34 @@ void MacroAssembler::EnterExitFrame(ExitFrame::Mode mode) {
|
|
349
424
|
}
|
350
425
|
|
351
426
|
|
352
|
-
void MacroAssembler::
|
427
|
+
void MacroAssembler::InitializeNewString(Register string,
|
428
|
+
Register length,
|
429
|
+
Heap::RootListIndex map_index,
|
430
|
+
Register scratch1,
|
431
|
+
Register scratch2) {
|
432
|
+
mov(scratch1, Operand(length, LSL, kSmiTagSize));
|
433
|
+
LoadRoot(scratch2, map_index);
|
434
|
+
str(scratch1, FieldMemOperand(string, String::kLengthOffset));
|
435
|
+
mov(scratch1, Operand(String::kEmptyHashField));
|
436
|
+
str(scratch2, FieldMemOperand(string, HeapObject::kMapOffset));
|
437
|
+
str(scratch1, FieldMemOperand(string, String::kHashFieldOffset));
|
438
|
+
}
|
439
|
+
|
440
|
+
|
441
|
+
int MacroAssembler::ActivationFrameAlignment() {
|
353
442
|
#if defined(V8_HOST_ARCH_ARM)
|
354
443
|
// Running on the real platform. Use the alignment as mandated by the local
|
355
444
|
// environment.
|
356
445
|
// Note: This will break if we ever start generating snapshots on one ARM
|
357
446
|
// platform for another ARM platform with a different alignment.
|
358
|
-
|
447
|
+
return OS::ActivationFrameAlignment();
|
359
448
|
#else // defined(V8_HOST_ARCH_ARM)
|
360
449
|
// If we are using the simulator then we should always align to the expected
|
361
450
|
// alignment. As the simulator is used to generate snapshots we do not know
|
362
|
-
// if the target platform will need alignment, so
|
363
|
-
//
|
364
|
-
|
451
|
+
// if the target platform will need alignment, so this is controlled from a
|
452
|
+
// flag.
|
453
|
+
return FLAG_sim_stack_alignment;
|
365
454
|
#endif // defined(V8_HOST_ARCH_ARM)
|
366
|
-
if (activation_frame_alignment != kPointerSize) {
|
367
|
-
// This code needs to be made more general if this assert doesn't hold.
|
368
|
-
ASSERT(activation_frame_alignment == 2 * kPointerSize);
|
369
|
-
mov(r7, Operand(Smi::FromInt(0)));
|
370
|
-
tst(sp, Operand(activation_frame_alignment - offset));
|
371
|
-
push(r7, eq); // Conditional push instruction.
|
372
|
-
}
|
373
455
|
}
|
374
456
|
|
375
457
|
|
@@ -537,6 +619,21 @@ void MacroAssembler::InvokeFunction(Register fun,
|
|
537
619
|
}
|
538
620
|
|
539
621
|
|
622
|
+
void MacroAssembler::InvokeFunction(JSFunction* function,
|
623
|
+
const ParameterCount& actual,
|
624
|
+
InvokeFlag flag) {
|
625
|
+
ASSERT(function->is_compiled());
|
626
|
+
|
627
|
+
// Get the function and setup the context.
|
628
|
+
mov(r1, Operand(Handle<JSFunction>(function)));
|
629
|
+
ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset));
|
630
|
+
|
631
|
+
// Invoke the cached code.
|
632
|
+
Handle<Code> code(function->code());
|
633
|
+
ParameterCount expected(function->shared()->formal_parameter_count());
|
634
|
+
InvokeCode(code, expected, actual, RelocInfo::CODE_TARGET, flag);
|
635
|
+
}
|
636
|
+
|
540
637
|
#ifdef ENABLE_DEBUGGER_SUPPORT
|
541
638
|
void MacroAssembler::SaveRegistersToMemory(RegList regs) {
|
542
639
|
ASSERT((regs & ~kJSCallerSaved) == 0);
|
@@ -595,6 +692,15 @@ void MacroAssembler::CopyRegistersFromStackToMemory(Register base,
|
|
595
692
|
}
|
596
693
|
}
|
597
694
|
}
|
695
|
+
|
696
|
+
|
697
|
+
void MacroAssembler::DebugBreak() {
|
698
|
+
ASSERT(allow_stub_calls());
|
699
|
+
mov(r0, Operand(0));
|
700
|
+
mov(r1, Operand(ExternalReference(Runtime::kDebugBreak)));
|
701
|
+
CEntryStub ces(1);
|
702
|
+
Call(ces.GetCode(), RelocInfo::DEBUG_BREAK);
|
703
|
+
}
|
598
704
|
#endif
|
599
705
|
|
600
706
|
|
@@ -655,6 +761,7 @@ void MacroAssembler::PopTryHandler() {
|
|
655
761
|
Register MacroAssembler::CheckMaps(JSObject* object, Register object_reg,
|
656
762
|
JSObject* holder, Register holder_reg,
|
657
763
|
Register scratch,
|
764
|
+
int save_at_depth,
|
658
765
|
Label* miss) {
|
659
766
|
// Make sure there's no overlap between scratch and the other
|
660
767
|
// registers.
|
@@ -662,7 +769,11 @@ Register MacroAssembler::CheckMaps(JSObject* object, Register object_reg,
|
|
662
769
|
|
663
770
|
// Keep track of the current object in register reg.
|
664
771
|
Register reg = object_reg;
|
665
|
-
int depth =
|
772
|
+
int depth = 0;
|
773
|
+
|
774
|
+
if (save_at_depth == depth) {
|
775
|
+
str(reg, MemOperand(sp));
|
776
|
+
}
|
666
777
|
|
667
778
|
// Check the maps in the prototype chain.
|
668
779
|
// Traverse the prototype chain from the object and do map checks.
|
@@ -702,6 +813,10 @@ Register MacroAssembler::CheckMaps(JSObject* object, Register object_reg,
|
|
702
813
|
mov(reg, Operand(Handle<JSObject>(prototype)));
|
703
814
|
}
|
704
815
|
|
816
|
+
if (save_at_depth == depth) {
|
817
|
+
str(reg, MemOperand(sp));
|
818
|
+
}
|
819
|
+
|
705
820
|
// Go to the next object in the prototype chain.
|
706
821
|
object = prototype;
|
707
822
|
}
|
@@ -712,7 +827,7 @@ Register MacroAssembler::CheckMaps(JSObject* object, Register object_reg,
|
|
712
827
|
b(ne, miss);
|
713
828
|
|
714
829
|
// Log the check depth.
|
715
|
-
LOG(IntEvent("check-maps-depth", depth));
|
830
|
+
LOG(IntEvent("check-maps-depth", depth + 1));
|
716
831
|
|
717
832
|
// Perform security check for access to the global object and return
|
718
833
|
// the holder register.
|
@@ -927,11 +1042,119 @@ void MacroAssembler::UndoAllocationInNewSpace(Register object,
|
|
927
1042
|
}
|
928
1043
|
|
929
1044
|
|
930
|
-
void MacroAssembler::
|
1045
|
+
void MacroAssembler::AllocateTwoByteString(Register result,
|
1046
|
+
Register length,
|
1047
|
+
Register scratch1,
|
1048
|
+
Register scratch2,
|
1049
|
+
Register scratch3,
|
1050
|
+
Label* gc_required) {
|
1051
|
+
// Calculate the number of bytes needed for the characters in the string while
|
1052
|
+
// observing object alignment.
|
1053
|
+
ASSERT((SeqTwoByteString::kHeaderSize & kObjectAlignmentMask) == 0);
|
1054
|
+
mov(scratch1, Operand(length, LSL, 1)); // Length in bytes, not chars.
|
1055
|
+
add(scratch1, scratch1,
|
1056
|
+
Operand(kObjectAlignmentMask + SeqTwoByteString::kHeaderSize));
|
1057
|
+
// AllocateInNewSpace expects the size in words, so we can round down
|
1058
|
+
// to kObjectAlignment and divide by kPointerSize in the same shift.
|
1059
|
+
ASSERT_EQ(kPointerSize, kObjectAlignmentMask + 1);
|
1060
|
+
mov(scratch1, Operand(scratch1, ASR, kPointerSizeLog2));
|
1061
|
+
|
1062
|
+
// Allocate two-byte string in new space.
|
1063
|
+
AllocateInNewSpace(scratch1,
|
1064
|
+
result,
|
1065
|
+
scratch2,
|
1066
|
+
scratch3,
|
1067
|
+
gc_required,
|
1068
|
+
TAG_OBJECT);
|
1069
|
+
|
1070
|
+
// Set the map, length and hash field.
|
1071
|
+
InitializeNewString(result,
|
1072
|
+
length,
|
1073
|
+
Heap::kStringMapRootIndex,
|
1074
|
+
scratch1,
|
1075
|
+
scratch2);
|
1076
|
+
}
|
1077
|
+
|
1078
|
+
|
1079
|
+
void MacroAssembler::AllocateAsciiString(Register result,
|
1080
|
+
Register length,
|
1081
|
+
Register scratch1,
|
1082
|
+
Register scratch2,
|
1083
|
+
Register scratch3,
|
1084
|
+
Label* gc_required) {
|
1085
|
+
// Calculate the number of bytes needed for the characters in the string while
|
1086
|
+
// observing object alignment.
|
1087
|
+
ASSERT((SeqAsciiString::kHeaderSize & kObjectAlignmentMask) == 0);
|
1088
|
+
ASSERT(kCharSize == 1);
|
1089
|
+
add(scratch1, length,
|
1090
|
+
Operand(kObjectAlignmentMask + SeqAsciiString::kHeaderSize));
|
1091
|
+
// AllocateInNewSpace expects the size in words, so we can round down
|
1092
|
+
// to kObjectAlignment and divide by kPointerSize in the same shift.
|
1093
|
+
ASSERT_EQ(kPointerSize, kObjectAlignmentMask + 1);
|
1094
|
+
mov(scratch1, Operand(scratch1, ASR, kPointerSizeLog2));
|
1095
|
+
|
1096
|
+
// Allocate ASCII string in new space.
|
1097
|
+
AllocateInNewSpace(scratch1,
|
1098
|
+
result,
|
1099
|
+
scratch2,
|
1100
|
+
scratch3,
|
1101
|
+
gc_required,
|
1102
|
+
TAG_OBJECT);
|
1103
|
+
|
1104
|
+
// Set the map, length and hash field.
|
1105
|
+
InitializeNewString(result,
|
1106
|
+
length,
|
1107
|
+
Heap::kAsciiStringMapRootIndex,
|
1108
|
+
scratch1,
|
1109
|
+
scratch2);
|
1110
|
+
}
|
1111
|
+
|
1112
|
+
|
1113
|
+
void MacroAssembler::AllocateTwoByteConsString(Register result,
|
1114
|
+
Register length,
|
1115
|
+
Register scratch1,
|
1116
|
+
Register scratch2,
|
1117
|
+
Label* gc_required) {
|
1118
|
+
AllocateInNewSpace(ConsString::kSize / kPointerSize,
|
1119
|
+
result,
|
1120
|
+
scratch1,
|
1121
|
+
scratch2,
|
1122
|
+
gc_required,
|
1123
|
+
TAG_OBJECT);
|
1124
|
+
|
1125
|
+
InitializeNewString(result,
|
1126
|
+
length,
|
1127
|
+
Heap::kConsStringMapRootIndex,
|
1128
|
+
scratch1,
|
1129
|
+
scratch2);
|
1130
|
+
}
|
1131
|
+
|
1132
|
+
|
1133
|
+
void MacroAssembler::AllocateAsciiConsString(Register result,
|
1134
|
+
Register length,
|
1135
|
+
Register scratch1,
|
1136
|
+
Register scratch2,
|
1137
|
+
Label* gc_required) {
|
1138
|
+
AllocateInNewSpace(ConsString::kSize / kPointerSize,
|
1139
|
+
result,
|
1140
|
+
scratch1,
|
1141
|
+
scratch2,
|
1142
|
+
gc_required,
|
1143
|
+
TAG_OBJECT);
|
1144
|
+
|
1145
|
+
InitializeNewString(result,
|
1146
|
+
length,
|
1147
|
+
Heap::kConsAsciiStringMapRootIndex,
|
1148
|
+
scratch1,
|
1149
|
+
scratch2);
|
1150
|
+
}
|
1151
|
+
|
1152
|
+
|
1153
|
+
void MacroAssembler::CompareObjectType(Register object,
|
931
1154
|
Register map,
|
932
1155
|
Register type_reg,
|
933
1156
|
InstanceType type) {
|
934
|
-
ldr(map, FieldMemOperand(
|
1157
|
+
ldr(map, FieldMemOperand(object, HeapObject::kMapOffset));
|
935
1158
|
CompareInstanceType(map, type_reg, type);
|
936
1159
|
}
|
937
1160
|
|
@@ -944,6 +1167,21 @@ void MacroAssembler::CompareInstanceType(Register map,
|
|
944
1167
|
}
|
945
1168
|
|
946
1169
|
|
1170
|
+
void MacroAssembler::CheckMap(Register obj,
|
1171
|
+
Register scratch,
|
1172
|
+
Handle<Map> map,
|
1173
|
+
Label* fail,
|
1174
|
+
bool is_heap_object) {
|
1175
|
+
if (!is_heap_object) {
|
1176
|
+
BranchOnSmi(obj, fail);
|
1177
|
+
}
|
1178
|
+
ldr(scratch, FieldMemOperand(obj, HeapObject::kMapOffset));
|
1179
|
+
mov(ip, Operand(map));
|
1180
|
+
cmp(scratch, ip);
|
1181
|
+
b(ne, fail);
|
1182
|
+
}
|
1183
|
+
|
1184
|
+
|
947
1185
|
void MacroAssembler::TryGetFunctionPrototype(Register function,
|
948
1186
|
Register result,
|
949
1187
|
Register scratch,
|
@@ -997,10 +1235,17 @@ void MacroAssembler::CallStub(CodeStub* stub, Condition cond) {
|
|
997
1235
|
}
|
998
1236
|
|
999
1237
|
|
1238
|
+
void MacroAssembler::TailCallStub(CodeStub* stub, Condition cond) {
|
1239
|
+
ASSERT(allow_stub_calls()); // stub calls are not allowed in some stubs
|
1240
|
+
Jump(stub->GetCode(), RelocInfo::CODE_TARGET, cond);
|
1241
|
+
}
|
1242
|
+
|
1243
|
+
|
1000
1244
|
void MacroAssembler::StubReturn(int argc) {
|
1001
1245
|
ASSERT(argc >= 1 && generating_stub());
|
1002
|
-
if (argc > 1)
|
1246
|
+
if (argc > 1) {
|
1003
1247
|
add(sp, sp, Operand((argc - 1) * kPointerSize));
|
1248
|
+
}
|
1004
1249
|
Ret();
|
1005
1250
|
}
|
1006
1251
|
|
@@ -1019,11 +1264,23 @@ void MacroAssembler::IntegerToDoubleConversionWithVFP3(Register inReg,
|
|
1019
1264
|
// ARMv7 VFP3 instructions to implement integer to double conversion.
|
1020
1265
|
mov(r7, Operand(inReg, ASR, kSmiTagSize));
|
1021
1266
|
vmov(s15, r7);
|
1022
|
-
|
1267
|
+
vcvt_f64_s32(d7, s15);
|
1023
1268
|
vmov(outLowReg, outHighReg, d7);
|
1024
1269
|
}
|
1025
1270
|
|
1026
1271
|
|
1272
|
+
void MacroAssembler::GetLeastBitsFromSmi(Register dst,
|
1273
|
+
Register src,
|
1274
|
+
int num_least_bits) {
|
1275
|
+
if (CpuFeatures::IsSupported(ARMv7)) {
|
1276
|
+
ubfx(dst, src, Operand(kSmiTagSize), Operand(num_least_bits - 1));
|
1277
|
+
} else {
|
1278
|
+
mov(dst, Operand(src, ASR, kSmiTagSize));
|
1279
|
+
and_(dst, dst, Operand((1 << num_least_bits) - 1));
|
1280
|
+
}
|
1281
|
+
}
|
1282
|
+
|
1283
|
+
|
1027
1284
|
void MacroAssembler::CallRuntime(Runtime::Function* f, int num_arguments) {
|
1028
1285
|
// All parameters are on the stack. r0 has the return value after call.
|
1029
1286
|
|
@@ -1035,9 +1292,13 @@ void MacroAssembler::CallRuntime(Runtime::Function* f, int num_arguments) {
|
|
1035
1292
|
return;
|
1036
1293
|
}
|
1037
1294
|
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1295
|
+
// TODO(1236192): Most runtime routines don't need the number of
|
1296
|
+
// arguments passed in because it is constant. At some point we
|
1297
|
+
// should remove this need and make the runtime routine entry code
|
1298
|
+
// smarter.
|
1299
|
+
mov(r0, Operand(num_arguments));
|
1300
|
+
mov(r1, Operand(ExternalReference(f)));
|
1301
|
+
CEntryStub stub(1);
|
1041
1302
|
CallStub(&stub);
|
1042
1303
|
}
|
1043
1304
|
|
@@ -1047,19 +1308,36 @@ void MacroAssembler::CallRuntime(Runtime::FunctionId fid, int num_arguments) {
|
|
1047
1308
|
}
|
1048
1309
|
|
1049
1310
|
|
1050
|
-
void MacroAssembler::
|
1051
|
-
|
1052
|
-
|
1311
|
+
void MacroAssembler::CallExternalReference(const ExternalReference& ext,
|
1312
|
+
int num_arguments) {
|
1313
|
+
mov(r0, Operand(num_arguments));
|
1314
|
+
mov(r1, Operand(ext));
|
1315
|
+
|
1316
|
+
CEntryStub stub(1);
|
1317
|
+
CallStub(&stub);
|
1318
|
+
}
|
1319
|
+
|
1320
|
+
|
1321
|
+
void MacroAssembler::TailCallExternalReference(const ExternalReference& ext,
|
1322
|
+
int num_arguments,
|
1323
|
+
int result_size) {
|
1053
1324
|
// TODO(1236192): Most runtime routines don't need the number of
|
1054
1325
|
// arguments passed in because it is constant. At some point we
|
1055
1326
|
// should remove this need and make the runtime routine entry code
|
1056
1327
|
// smarter.
|
1057
1328
|
mov(r0, Operand(num_arguments));
|
1058
|
-
|
1329
|
+
JumpToExternalReference(ext);
|
1330
|
+
}
|
1331
|
+
|
1332
|
+
|
1333
|
+
void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid,
|
1334
|
+
int num_arguments,
|
1335
|
+
int result_size) {
|
1336
|
+
TailCallExternalReference(ExternalReference(fid), num_arguments, result_size);
|
1059
1337
|
}
|
1060
1338
|
|
1061
1339
|
|
1062
|
-
void MacroAssembler::
|
1340
|
+
void MacroAssembler::JumpToExternalReference(const ExternalReference& builtin) {
|
1063
1341
|
#if defined(__thumb__)
|
1064
1342
|
// Thumb mode builtin.
|
1065
1343
|
ASSERT((reinterpret_cast<intptr_t>(builtin.address()) & 1) == 1);
|
@@ -1070,58 +1348,42 @@ void MacroAssembler::JumpToRuntime(const ExternalReference& builtin) {
|
|
1070
1348
|
}
|
1071
1349
|
|
1072
1350
|
|
1073
|
-
Handle<Code> MacroAssembler::ResolveBuiltin(Builtins::JavaScript id,
|
1074
|
-
bool* resolved) {
|
1075
|
-
// Contract with compiled functions is that the function is passed in r1.
|
1076
|
-
int builtins_offset =
|
1077
|
-
JSBuiltinsObject::kJSBuiltinsOffset + (id * kPointerSize);
|
1078
|
-
ldr(r1, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
|
1079
|
-
ldr(r1, FieldMemOperand(r1, GlobalObject::kBuiltinsOffset));
|
1080
|
-
ldr(r1, FieldMemOperand(r1, builtins_offset));
|
1081
|
-
|
1082
|
-
return Builtins::GetCode(id, resolved);
|
1083
|
-
}
|
1084
|
-
|
1085
|
-
|
1086
1351
|
void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id,
|
1087
1352
|
InvokeJSFlags flags) {
|
1088
|
-
|
1089
|
-
Handle<Code> code = ResolveBuiltin(id, &resolved);
|
1090
|
-
|
1353
|
+
GetBuiltinEntry(r2, id);
|
1091
1354
|
if (flags == CALL_JS) {
|
1092
|
-
Call(
|
1355
|
+
Call(r2);
|
1093
1356
|
} else {
|
1094
1357
|
ASSERT(flags == JUMP_JS);
|
1095
|
-
Jump(
|
1096
|
-
}
|
1097
|
-
|
1098
|
-
if (!resolved) {
|
1099
|
-
const char* name = Builtins::GetName(id);
|
1100
|
-
int argc = Builtins::GetArgumentsCount(id);
|
1101
|
-
uint32_t flags =
|
1102
|
-
Bootstrapper::FixupFlagsArgumentsCount::encode(argc) |
|
1103
|
-
Bootstrapper::FixupFlagsUseCodeObject::encode(false);
|
1104
|
-
Unresolved entry = { pc_offset() - kInstrSize, flags, name };
|
1105
|
-
unresolved_.Add(entry);
|
1358
|
+
Jump(r2);
|
1106
1359
|
}
|
1107
1360
|
}
|
1108
1361
|
|
1109
1362
|
|
1110
1363
|
void MacroAssembler::GetBuiltinEntry(Register target, Builtins::JavaScript id) {
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
const char* name = Builtins::GetName(id);
|
1117
|
-
int argc = Builtins::GetArgumentsCount(id);
|
1118
|
-
uint32_t flags =
|
1119
|
-
Bootstrapper::FixupFlagsArgumentsCount::encode(argc) |
|
1120
|
-
Bootstrapper::FixupFlagsUseCodeObject::encode(true);
|
1121
|
-
Unresolved entry = { pc_offset() - kInstrSize, flags, name };
|
1122
|
-
unresolved_.Add(entry);
|
1123
|
-
}
|
1364
|
+
ASSERT(!target.is(r1));
|
1365
|
+
|
1366
|
+
// Load the builtins object into target register.
|
1367
|
+
ldr(target, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX)));
|
1368
|
+
ldr(target, FieldMemOperand(target, GlobalObject::kBuiltinsOffset));
|
1124
1369
|
|
1370
|
+
// Load the JavaScript builtin function from the builtins object.
|
1371
|
+
ldr(r1, FieldMemOperand(target,
|
1372
|
+
JSBuiltinsObject::OffsetOfFunctionWithId(id)));
|
1373
|
+
|
1374
|
+
// Load the code entry point from the builtins object.
|
1375
|
+
ldr(target, FieldMemOperand(target,
|
1376
|
+
JSBuiltinsObject::OffsetOfCodeWithId(id)));
|
1377
|
+
if (FLAG_debug_code) {
|
1378
|
+
// Make sure the code objects in the builtins object and in the
|
1379
|
+
// builtin function are the same.
|
1380
|
+
push(r1);
|
1381
|
+
ldr(r1, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset));
|
1382
|
+
ldr(r1, FieldMemOperand(r1, SharedFunctionInfo::kCodeOffset));
|
1383
|
+
cmp(r1, target);
|
1384
|
+
Assert(eq, "Builtin code object changed");
|
1385
|
+
pop(r1);
|
1386
|
+
}
|
1125
1387
|
add(target, target, Operand(Code::kHeaderSize - kHeapObjectTag));
|
1126
1388
|
}
|
1127
1389
|
|
@@ -1221,6 +1483,204 @@ void MacroAssembler::LoadContext(Register dst, int context_chain_length) {
|
|
1221
1483
|
}
|
1222
1484
|
|
1223
1485
|
|
1486
|
+
void MacroAssembler::JumpIfNotBothSmi(Register reg1,
|
1487
|
+
Register reg2,
|
1488
|
+
Label* on_not_both_smi) {
|
1489
|
+
ASSERT_EQ(0, kSmiTag);
|
1490
|
+
tst(reg1, Operand(kSmiTagMask));
|
1491
|
+
tst(reg2, Operand(kSmiTagMask), eq);
|
1492
|
+
b(ne, on_not_both_smi);
|
1493
|
+
}
|
1494
|
+
|
1495
|
+
|
1496
|
+
void MacroAssembler::JumpIfEitherSmi(Register reg1,
|
1497
|
+
Register reg2,
|
1498
|
+
Label* on_either_smi) {
|
1499
|
+
ASSERT_EQ(0, kSmiTag);
|
1500
|
+
tst(reg1, Operand(kSmiTagMask));
|
1501
|
+
tst(reg2, Operand(kSmiTagMask), ne);
|
1502
|
+
b(eq, on_either_smi);
|
1503
|
+
}
|
1504
|
+
|
1505
|
+
|
1506
|
+
void MacroAssembler::JumpIfNonSmisNotBothSequentialAsciiStrings(
|
1507
|
+
Register first,
|
1508
|
+
Register second,
|
1509
|
+
Register scratch1,
|
1510
|
+
Register scratch2,
|
1511
|
+
Label* failure) {
|
1512
|
+
// Test that both first and second are sequential ASCII strings.
|
1513
|
+
// Assume that they are non-smis.
|
1514
|
+
ldr(scratch1, FieldMemOperand(first, HeapObject::kMapOffset));
|
1515
|
+
ldr(scratch2, FieldMemOperand(second, HeapObject::kMapOffset));
|
1516
|
+
ldrb(scratch1, FieldMemOperand(scratch1, Map::kInstanceTypeOffset));
|
1517
|
+
ldrb(scratch2, FieldMemOperand(scratch2, Map::kInstanceTypeOffset));
|
1518
|
+
|
1519
|
+
JumpIfBothInstanceTypesAreNotSequentialAscii(scratch1,
|
1520
|
+
scratch2,
|
1521
|
+
scratch1,
|
1522
|
+
scratch2,
|
1523
|
+
failure);
|
1524
|
+
}
|
1525
|
+
|
1526
|
+
void MacroAssembler::JumpIfNotBothSequentialAsciiStrings(Register first,
|
1527
|
+
Register second,
|
1528
|
+
Register scratch1,
|
1529
|
+
Register scratch2,
|
1530
|
+
Label* failure) {
|
1531
|
+
// Check that neither is a smi.
|
1532
|
+
ASSERT_EQ(0, kSmiTag);
|
1533
|
+
and_(scratch1, first, Operand(second));
|
1534
|
+
tst(scratch1, Operand(kSmiTagMask));
|
1535
|
+
b(eq, failure);
|
1536
|
+
JumpIfNonSmisNotBothSequentialAsciiStrings(first,
|
1537
|
+
second,
|
1538
|
+
scratch1,
|
1539
|
+
scratch2,
|
1540
|
+
failure);
|
1541
|
+
}
|
1542
|
+
|
1543
|
+
|
1544
|
+
// Allocates a heap number or jumps to the need_gc label if the young space
|
1545
|
+
// is full and a scavenge is needed.
|
1546
|
+
void MacroAssembler::AllocateHeapNumber(Register result,
|
1547
|
+
Register scratch1,
|
1548
|
+
Register scratch2,
|
1549
|
+
Label* gc_required) {
|
1550
|
+
// Allocate an object in the heap for the heap number and tag it as a heap
|
1551
|
+
// object.
|
1552
|
+
AllocateInNewSpace(HeapNumber::kSize / kPointerSize,
|
1553
|
+
result,
|
1554
|
+
scratch1,
|
1555
|
+
scratch2,
|
1556
|
+
gc_required,
|
1557
|
+
TAG_OBJECT);
|
1558
|
+
|
1559
|
+
// Get heap number map and store it in the allocated object.
|
1560
|
+
LoadRoot(scratch1, Heap::kHeapNumberMapRootIndex);
|
1561
|
+
str(scratch1, FieldMemOperand(result, HeapObject::kMapOffset));
|
1562
|
+
}
|
1563
|
+
|
1564
|
+
|
1565
|
+
void MacroAssembler::CountLeadingZeros(Register source,
|
1566
|
+
Register scratch,
|
1567
|
+
Register zeros) {
|
1568
|
+
#ifdef CAN_USE_ARMV5_INSTRUCTIONS
|
1569
|
+
clz(zeros, source); // This instruction is only supported after ARM5.
|
1570
|
+
#else
|
1571
|
+
mov(zeros, Operand(0));
|
1572
|
+
mov(scratch, source);
|
1573
|
+
// Top 16.
|
1574
|
+
tst(scratch, Operand(0xffff0000));
|
1575
|
+
add(zeros, zeros, Operand(16), LeaveCC, eq);
|
1576
|
+
mov(scratch, Operand(scratch, LSL, 16), LeaveCC, eq);
|
1577
|
+
// Top 8.
|
1578
|
+
tst(scratch, Operand(0xff000000));
|
1579
|
+
add(zeros, zeros, Operand(8), LeaveCC, eq);
|
1580
|
+
mov(scratch, Operand(scratch, LSL, 8), LeaveCC, eq);
|
1581
|
+
// Top 4.
|
1582
|
+
tst(scratch, Operand(0xf0000000));
|
1583
|
+
add(zeros, zeros, Operand(4), LeaveCC, eq);
|
1584
|
+
mov(scratch, Operand(scratch, LSL, 4), LeaveCC, eq);
|
1585
|
+
// Top 2.
|
1586
|
+
tst(scratch, Operand(0xc0000000));
|
1587
|
+
add(zeros, zeros, Operand(2), LeaveCC, eq);
|
1588
|
+
mov(scratch, Operand(scratch, LSL, 2), LeaveCC, eq);
|
1589
|
+
// Top bit.
|
1590
|
+
tst(scratch, Operand(0x80000000u));
|
1591
|
+
add(zeros, zeros, Operand(1), LeaveCC, eq);
|
1592
|
+
#endif
|
1593
|
+
}
|
1594
|
+
|
1595
|
+
|
1596
|
+
void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialAscii(
|
1597
|
+
Register first,
|
1598
|
+
Register second,
|
1599
|
+
Register scratch1,
|
1600
|
+
Register scratch2,
|
1601
|
+
Label* failure) {
|
1602
|
+
int kFlatAsciiStringMask =
|
1603
|
+
kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask;
|
1604
|
+
int kFlatAsciiStringTag = ASCII_STRING_TYPE;
|
1605
|
+
and_(scratch1, first, Operand(kFlatAsciiStringMask));
|
1606
|
+
and_(scratch2, second, Operand(kFlatAsciiStringMask));
|
1607
|
+
cmp(scratch1, Operand(kFlatAsciiStringTag));
|
1608
|
+
// Ignore second test if first test failed.
|
1609
|
+
cmp(scratch2, Operand(kFlatAsciiStringTag), eq);
|
1610
|
+
b(ne, failure);
|
1611
|
+
}
|
1612
|
+
|
1613
|
+
|
1614
|
+
void MacroAssembler::JumpIfInstanceTypeIsNotSequentialAscii(Register type,
|
1615
|
+
Register scratch,
|
1616
|
+
Label* failure) {
|
1617
|
+
int kFlatAsciiStringMask =
|
1618
|
+
kIsNotStringMask | kStringEncodingMask | kStringRepresentationMask;
|
1619
|
+
int kFlatAsciiStringTag = ASCII_STRING_TYPE;
|
1620
|
+
and_(scratch, type, Operand(kFlatAsciiStringMask));
|
1621
|
+
cmp(scratch, Operand(kFlatAsciiStringTag));
|
1622
|
+
b(ne, failure);
|
1623
|
+
}
|
1624
|
+
|
1625
|
+
|
1626
|
+
void MacroAssembler::PrepareCallCFunction(int num_arguments, Register scratch) {
|
1627
|
+
int frame_alignment = ActivationFrameAlignment();
|
1628
|
+
// Up to four simple arguments are passed in registers r0..r3.
|
1629
|
+
int stack_passed_arguments = (num_arguments <= 4) ? 0 : num_arguments - 4;
|
1630
|
+
if (frame_alignment > kPointerSize) {
|
1631
|
+
// Make stack end at alignment and make room for num_arguments - 4 words
|
1632
|
+
// and the original value of sp.
|
1633
|
+
mov(scratch, sp);
|
1634
|
+
sub(sp, sp, Operand((stack_passed_arguments + 1) * kPointerSize));
|
1635
|
+
ASSERT(IsPowerOf2(frame_alignment));
|
1636
|
+
and_(sp, sp, Operand(-frame_alignment));
|
1637
|
+
str(scratch, MemOperand(sp, stack_passed_arguments * kPointerSize));
|
1638
|
+
} else {
|
1639
|
+
sub(sp, sp, Operand(stack_passed_arguments * kPointerSize));
|
1640
|
+
}
|
1641
|
+
}
|
1642
|
+
|
1643
|
+
|
1644
|
+
void MacroAssembler::CallCFunction(ExternalReference function,
|
1645
|
+
int num_arguments) {
|
1646
|
+
mov(ip, Operand(function));
|
1647
|
+
CallCFunction(ip, num_arguments);
|
1648
|
+
}
|
1649
|
+
|
1650
|
+
|
1651
|
+
void MacroAssembler::CallCFunction(Register function, int num_arguments) {
|
1652
|
+
// Make sure that the stack is aligned before calling a C function unless
|
1653
|
+
// running in the simulator. The simulator has its own alignment check which
|
1654
|
+
// provides more information.
|
1655
|
+
#if defined(V8_HOST_ARCH_ARM)
|
1656
|
+
if (FLAG_debug_code) {
|
1657
|
+
int frame_alignment = OS::ActivationFrameAlignment();
|
1658
|
+
int frame_alignment_mask = frame_alignment - 1;
|
1659
|
+
if (frame_alignment > kPointerSize) {
|
1660
|
+
ASSERT(IsPowerOf2(frame_alignment));
|
1661
|
+
Label alignment_as_expected;
|
1662
|
+
tst(sp, Operand(frame_alignment_mask));
|
1663
|
+
b(eq, &alignment_as_expected);
|
1664
|
+
// Don't use Check here, as it will call Runtime_Abort possibly
|
1665
|
+
// re-entering here.
|
1666
|
+
stop("Unexpected alignment");
|
1667
|
+
bind(&alignment_as_expected);
|
1668
|
+
}
|
1669
|
+
}
|
1670
|
+
#endif
|
1671
|
+
|
1672
|
+
// Just call directly. The function called cannot cause a GC, or
|
1673
|
+
// allow preemption, so the return address in the link register
|
1674
|
+
// stays correct.
|
1675
|
+
Call(function);
|
1676
|
+
int stack_passed_arguments = (num_arguments <= 4) ? 0 : num_arguments - 4;
|
1677
|
+
if (OS::ActivationFrameAlignment() > kPointerSize) {
|
1678
|
+
ldr(sp, MemOperand(sp, stack_passed_arguments * kPointerSize));
|
1679
|
+
} else {
|
1680
|
+
add(sp, sp, Operand(stack_passed_arguments * sizeof(kPointerSize)));
|
1681
|
+
}
|
1682
|
+
}
|
1683
|
+
|
1224
1684
|
|
1225
1685
|
#ifdef ENABLE_DEBUGGER_SUPPORT
|
1226
1686
|
CodePatcher::CodePatcher(byte* address, int instructions)
|