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
@@ -221,7 +221,7 @@ class Utils {
|
|
221
221
|
OpenHandle(const v8::Array* data);
|
222
222
|
static inline v8::internal::Handle<v8::internal::String>
|
223
223
|
OpenHandle(const String* data);
|
224
|
-
static inline v8::internal::Handle<v8::internal::
|
224
|
+
static inline v8::internal::Handle<v8::internal::Object>
|
225
225
|
OpenHandle(const Script* data);
|
226
226
|
static inline v8::internal::Handle<v8::internal::JSFunction>
|
227
227
|
OpenHandle(const Function* data);
|
@@ -247,7 +247,11 @@ static inline T* ToApi(v8::internal::Handle<v8::internal::Object> obj) {
|
|
247
247
|
template <class T>
|
248
248
|
v8::internal::Handle<T> v8::internal::Handle<T>::EscapeFrom(
|
249
249
|
v8::HandleScope* scope) {
|
250
|
-
|
250
|
+
v8::internal::Handle<T> handle;
|
251
|
+
if (!is_null()) {
|
252
|
+
handle = *this;
|
253
|
+
}
|
254
|
+
return Utils::OpenHandle(*scope->Close(Utils::ToLocal(handle)));
|
251
255
|
}
|
252
256
|
|
253
257
|
|
@@ -255,7 +259,7 @@ v8::internal::Handle<T> v8::internal::Handle<T>::EscapeFrom(
|
|
255
259
|
|
256
260
|
#define MAKE_TO_LOCAL(Name, From, To) \
|
257
261
|
Local<v8::To> Utils::Name(v8::internal::Handle<v8::internal::From> obj) { \
|
258
|
-
ASSERT(!obj->IsTheHole());
|
262
|
+
ASSERT(obj.is_null() || !obj->IsTheHole()); \
|
259
263
|
return Local<To>(reinterpret_cast<To*>(obj.location())); \
|
260
264
|
}
|
261
265
|
|
@@ -296,7 +300,7 @@ MAKE_OPEN_HANDLE(Data, Object)
|
|
296
300
|
MAKE_OPEN_HANDLE(Object, JSObject)
|
297
301
|
MAKE_OPEN_HANDLE(Array, JSArray)
|
298
302
|
MAKE_OPEN_HANDLE(String, String)
|
299
|
-
MAKE_OPEN_HANDLE(Script,
|
303
|
+
MAKE_OPEN_HANDLE(Script, Object)
|
300
304
|
MAKE_OPEN_HANDLE(Function, JSFunction)
|
301
305
|
MAKE_OPEN_HANDLE(Message, JSObject)
|
302
306
|
MAKE_OPEN_HANDLE(Context, Context)
|
File without changes
|
@@ -72,7 +72,7 @@ class Arguments BASE_EMBEDDED {
|
|
72
72
|
};
|
73
73
|
|
74
74
|
|
75
|
-
//
|
75
|
+
// Custom arguments replicate a small segment of stack that can be
|
76
76
|
// accessed through an Arguments object the same way the actual stack
|
77
77
|
// can.
|
78
78
|
class CustomArguments : public Relocatable {
|
@@ -80,15 +80,14 @@ class CustomArguments : public Relocatable {
|
|
80
80
|
inline CustomArguments(Object* data,
|
81
81
|
JSObject* self,
|
82
82
|
JSObject* holder) {
|
83
|
-
values_[
|
84
|
-
values_[
|
85
|
-
values_[1] = Smi::FromInt(0);
|
83
|
+
values_[2] = self;
|
84
|
+
values_[1] = holder;
|
86
85
|
values_[0] = data;
|
87
86
|
}
|
88
87
|
void IterateInstance(ObjectVisitor* v);
|
89
|
-
Object** end() { return values_ +
|
88
|
+
Object** end() { return values_ + ARRAY_SIZE(values_) - 1; }
|
90
89
|
private:
|
91
|
-
Object* values_[
|
90
|
+
Object* values_[3];
|
92
91
|
};
|
93
92
|
|
94
93
|
|
data/ext/v8/upstream/{2.0.6/src/arm/assembler-thumb2-inl.h → 2.1.10/src/arm/assembler-arm-inl.h}
RENAMED
@@ -34,10 +34,10 @@
|
|
34
34
|
// significantly by Google Inc.
|
35
35
|
// Copyright 2006-2008 the V8 project authors. All rights reserved.
|
36
36
|
|
37
|
-
#ifndef
|
38
|
-
#define
|
37
|
+
#ifndef V8_ARM_ASSEMBLER_ARM_INL_H_
|
38
|
+
#define V8_ARM_ASSEMBLER_ARM_INL_H_
|
39
39
|
|
40
|
-
#include "arm/assembler-
|
40
|
+
#include "arm/assembler-arm.h"
|
41
41
|
#include "cpu.h"
|
42
42
|
|
43
43
|
|
@@ -144,12 +144,21 @@ void RelocInfo::set_call_object(Object* target) {
|
|
144
144
|
|
145
145
|
|
146
146
|
bool RelocInfo::IsPatchedReturnSequence() {
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
return
|
151
|
-
|
152
|
-
|
147
|
+
Instr current_instr = Assembler::instr_at(pc_);
|
148
|
+
Instr next_instr = Assembler::instr_at(pc_ + Assembler::kInstrSize);
|
149
|
+
#ifdef USE_BLX
|
150
|
+
// A patched return sequence is:
|
151
|
+
// ldr ip, [pc, #0]
|
152
|
+
// blx ip
|
153
|
+
return ((current_instr & kLdrPCMask) == kLdrPCPattern)
|
154
|
+
&& ((next_instr & kBlxRegMask) == kBlxRegPattern);
|
155
|
+
#else
|
156
|
+
// A patched return sequence is:
|
157
|
+
// mov lr, pc
|
158
|
+
// ldr pc, [pc, #-4]
|
159
|
+
return (current_instr == kMovLrPc)
|
160
|
+
&& ((next_instr & kLdrPCMask) == kLdrPCPattern);
|
161
|
+
#endif
|
153
162
|
}
|
154
163
|
|
155
164
|
|
@@ -174,20 +183,6 @@ Operand::Operand(const ExternalReference& f) {
|
|
174
183
|
}
|
175
184
|
|
176
185
|
|
177
|
-
Operand::Operand(Object** opp) {
|
178
|
-
rm_ = no_reg;
|
179
|
-
imm32_ = reinterpret_cast<int32_t>(opp);
|
180
|
-
rmode_ = RelocInfo::NONE;
|
181
|
-
}
|
182
|
-
|
183
|
-
|
184
|
-
Operand::Operand(Context** cpp) {
|
185
|
-
rm_ = no_reg;
|
186
|
-
imm32_ = reinterpret_cast<int32_t>(cpp);
|
187
|
-
rmode_ = RelocInfo::NONE;
|
188
|
-
}
|
189
|
-
|
190
|
-
|
191
186
|
Operand::Operand(Smi* value) {
|
192
187
|
rm_ = no_reg;
|
193
188
|
imm32_ = reinterpret_cast<intptr_t>(value);
|
@@ -229,14 +224,34 @@ void Assembler::emit(Instr x) {
|
|
229
224
|
|
230
225
|
|
231
226
|
Address Assembler::target_address_address_at(Address pc) {
|
232
|
-
|
233
|
-
|
227
|
+
Address target_pc = pc;
|
228
|
+
Instr instr = Memory::int32_at(target_pc);
|
229
|
+
// If we have a bx instruction, the instruction before the bx is
|
230
|
+
// what we need to patch.
|
231
|
+
static const int32_t kBxInstMask = 0x0ffffff0;
|
232
|
+
static const int32_t kBxInstPattern = 0x012fff10;
|
233
|
+
if ((instr & kBxInstMask) == kBxInstPattern) {
|
234
|
+
target_pc -= kInstrSize;
|
235
|
+
instr = Memory::int32_at(target_pc);
|
236
|
+
}
|
237
|
+
|
238
|
+
#ifdef USE_BLX
|
239
|
+
// If we have a blx instruction, the instruction before it is
|
240
|
+
// what needs to be patched.
|
241
|
+
if ((instr & kBlxRegMask) == kBlxRegPattern) {
|
242
|
+
target_pc -= kInstrSize;
|
243
|
+
instr = Memory::int32_at(target_pc);
|
244
|
+
}
|
245
|
+
#endif
|
246
|
+
|
247
|
+
// Verify that the instruction to patch is a
|
248
|
+
// ldr<cond> <Rd>, [pc +/- offset_12].
|
234
249
|
ASSERT((instr & 0x0f7f0000) == 0x051f0000);
|
235
250
|
int offset = instr & 0xfff; // offset_12 is unsigned
|
236
251
|
if ((instr & (1 << 23)) == 0) offset = -offset; // U bit defines offset sign
|
237
252
|
// Verify that the constant pool comes after the instruction referencing it.
|
238
253
|
ASSERT(offset >= -4);
|
239
|
-
return
|
254
|
+
return target_pc + offset + 8;
|
240
255
|
}
|
241
256
|
|
242
257
|
|
@@ -264,4 +279,4 @@ void Assembler::set_target_address_at(Address pc, Address target) {
|
|
264
279
|
|
265
280
|
} } // namespace v8::internal
|
266
281
|
|
267
|
-
#endif //
|
282
|
+
#endif // V8_ARM_ASSEMBLER_ARM_INL_H_
|
@@ -30,9 +30,9 @@
|
|
30
30
|
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
31
31
|
// OF THE POSSIBILITY OF SUCH DAMAGE.
|
32
32
|
|
33
|
-
// The original source code covered by the above license above has been
|
34
|
-
// significantly by Google Inc.
|
35
|
-
// Copyright
|
33
|
+
// The original source code covered by the above license above has been
|
34
|
+
// modified significantly by Google Inc.
|
35
|
+
// Copyright 2010 the V8 project authors. All rights reserved.
|
36
36
|
|
37
37
|
#include "v8.h"
|
38
38
|
|
@@ -47,16 +47,41 @@ unsigned CpuFeatures::supported_ = 0;
|
|
47
47
|
unsigned CpuFeatures::enabled_ = 0;
|
48
48
|
unsigned CpuFeatures::found_by_runtime_probing_ = 0;
|
49
49
|
|
50
|
+
|
51
|
+
#ifdef __arm__
|
52
|
+
static uint64_t CpuFeaturesImpliedByCompiler() {
|
53
|
+
uint64_t answer = 0;
|
54
|
+
#ifdef CAN_USE_ARMV7_INSTRUCTIONS
|
55
|
+
answer |= 1u << ARMv7;
|
56
|
+
#endif // def CAN_USE_ARMV7_INSTRUCTIONS
|
57
|
+
// If the compiler is allowed to use VFP then we can use VFP too in our code
|
58
|
+
// generation even when generating snapshots. This won't work for cross
|
59
|
+
// compilation.
|
60
|
+
#if defined(__VFP_FP__) && !defined(__SOFTFP__)
|
61
|
+
answer |= 1u << VFP3;
|
62
|
+
#endif // defined(__VFP_FP__) && !defined(__SOFTFP__)
|
63
|
+
#ifdef CAN_USE_VFP_INSTRUCTIONS
|
64
|
+
answer |= 1u << VFP3;
|
65
|
+
#endif // def CAN_USE_VFP_INSTRUCTIONS
|
66
|
+
return answer;
|
67
|
+
}
|
68
|
+
#endif // def __arm__
|
69
|
+
|
70
|
+
|
50
71
|
void CpuFeatures::Probe() {
|
51
|
-
|
52
|
-
//
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
72
|
+
#ifndef __arm__
|
73
|
+
// For the simulator=arm build, use VFP when FLAG_enable_vfp3 is enabled.
|
74
|
+
if (FLAG_enable_vfp3) {
|
75
|
+
supported_ |= 1u << VFP3;
|
76
|
+
}
|
77
|
+
// For the simulator=arm build, use ARMv7 when FLAG_enable_armv7 is enabled
|
78
|
+
if (FLAG_enable_armv7) {
|
79
|
+
supported_ |= 1u << ARMv7;
|
80
|
+
}
|
81
|
+
#else // def __arm__
|
58
82
|
if (Serializer::enabled()) {
|
59
83
|
supported_ |= OS::CpuFeaturesImpliedByPlatform();
|
84
|
+
supported_ |= CpuFeaturesImpliedByCompiler();
|
60
85
|
return; // No features if we might serialize.
|
61
86
|
}
|
62
87
|
|
@@ -66,104 +91,15 @@ void CpuFeatures::Probe() {
|
|
66
91
|
supported_ |= 1u << VFP3;
|
67
92
|
found_by_runtime_probing_ |= 1u << VFP3;
|
68
93
|
}
|
94
|
+
|
95
|
+
if (OS::ArmCpuHasFeature(ARMv7)) {
|
96
|
+
supported_ |= 1u << ARMv7;
|
97
|
+
found_by_runtime_probing_ |= 1u << ARMv7;
|
98
|
+
}
|
69
99
|
#endif
|
70
100
|
}
|
71
101
|
|
72
102
|
|
73
|
-
// -----------------------------------------------------------------------------
|
74
|
-
// Implementation of Register and CRegister
|
75
|
-
|
76
|
-
Register no_reg = { -1 };
|
77
|
-
|
78
|
-
Register r0 = { 0 };
|
79
|
-
Register r1 = { 1 };
|
80
|
-
Register r2 = { 2 };
|
81
|
-
Register r3 = { 3 };
|
82
|
-
Register r4 = { 4 };
|
83
|
-
Register r5 = { 5 };
|
84
|
-
Register r6 = { 6 };
|
85
|
-
Register r7 = { 7 };
|
86
|
-
Register r8 = { 8 };
|
87
|
-
Register r9 = { 9 };
|
88
|
-
Register r10 = { 10 };
|
89
|
-
Register fp = { 11 };
|
90
|
-
Register ip = { 12 };
|
91
|
-
Register sp = { 13 };
|
92
|
-
Register lr = { 14 };
|
93
|
-
Register pc = { 15 };
|
94
|
-
|
95
|
-
|
96
|
-
CRegister no_creg = { -1 };
|
97
|
-
|
98
|
-
CRegister cr0 = { 0 };
|
99
|
-
CRegister cr1 = { 1 };
|
100
|
-
CRegister cr2 = { 2 };
|
101
|
-
CRegister cr3 = { 3 };
|
102
|
-
CRegister cr4 = { 4 };
|
103
|
-
CRegister cr5 = { 5 };
|
104
|
-
CRegister cr6 = { 6 };
|
105
|
-
CRegister cr7 = { 7 };
|
106
|
-
CRegister cr8 = { 8 };
|
107
|
-
CRegister cr9 = { 9 };
|
108
|
-
CRegister cr10 = { 10 };
|
109
|
-
CRegister cr11 = { 11 };
|
110
|
-
CRegister cr12 = { 12 };
|
111
|
-
CRegister cr13 = { 13 };
|
112
|
-
CRegister cr14 = { 14 };
|
113
|
-
CRegister cr15 = { 15 };
|
114
|
-
|
115
|
-
// Support for the VFP registers s0 to s31 (d0 to d15).
|
116
|
-
// Note that "sN:sM" is the same as "dN/2".
|
117
|
-
SwVfpRegister s0 = { 0 };
|
118
|
-
SwVfpRegister s1 = { 1 };
|
119
|
-
SwVfpRegister s2 = { 2 };
|
120
|
-
SwVfpRegister s3 = { 3 };
|
121
|
-
SwVfpRegister s4 = { 4 };
|
122
|
-
SwVfpRegister s5 = { 5 };
|
123
|
-
SwVfpRegister s6 = { 6 };
|
124
|
-
SwVfpRegister s7 = { 7 };
|
125
|
-
SwVfpRegister s8 = { 8 };
|
126
|
-
SwVfpRegister s9 = { 9 };
|
127
|
-
SwVfpRegister s10 = { 10 };
|
128
|
-
SwVfpRegister s11 = { 11 };
|
129
|
-
SwVfpRegister s12 = { 12 };
|
130
|
-
SwVfpRegister s13 = { 13 };
|
131
|
-
SwVfpRegister s14 = { 14 };
|
132
|
-
SwVfpRegister s15 = { 15 };
|
133
|
-
SwVfpRegister s16 = { 16 };
|
134
|
-
SwVfpRegister s17 = { 17 };
|
135
|
-
SwVfpRegister s18 = { 18 };
|
136
|
-
SwVfpRegister s19 = { 19 };
|
137
|
-
SwVfpRegister s20 = { 20 };
|
138
|
-
SwVfpRegister s21 = { 21 };
|
139
|
-
SwVfpRegister s22 = { 22 };
|
140
|
-
SwVfpRegister s23 = { 23 };
|
141
|
-
SwVfpRegister s24 = { 24 };
|
142
|
-
SwVfpRegister s25 = { 25 };
|
143
|
-
SwVfpRegister s26 = { 26 };
|
144
|
-
SwVfpRegister s27 = { 27 };
|
145
|
-
SwVfpRegister s28 = { 28 };
|
146
|
-
SwVfpRegister s29 = { 29 };
|
147
|
-
SwVfpRegister s30 = { 30 };
|
148
|
-
SwVfpRegister s31 = { 31 };
|
149
|
-
|
150
|
-
DwVfpRegister d0 = { 0 };
|
151
|
-
DwVfpRegister d1 = { 1 };
|
152
|
-
DwVfpRegister d2 = { 2 };
|
153
|
-
DwVfpRegister d3 = { 3 };
|
154
|
-
DwVfpRegister d4 = { 4 };
|
155
|
-
DwVfpRegister d5 = { 5 };
|
156
|
-
DwVfpRegister d6 = { 6 };
|
157
|
-
DwVfpRegister d7 = { 7 };
|
158
|
-
DwVfpRegister d8 = { 8 };
|
159
|
-
DwVfpRegister d9 = { 9 };
|
160
|
-
DwVfpRegister d10 = { 10 };
|
161
|
-
DwVfpRegister d11 = { 11 };
|
162
|
-
DwVfpRegister d12 = { 12 };
|
163
|
-
DwVfpRegister d13 = { 13 };
|
164
|
-
DwVfpRegister d14 = { 14 };
|
165
|
-
DwVfpRegister d15 = { 15 };
|
166
|
-
|
167
103
|
// -----------------------------------------------------------------------------
|
168
104
|
// Implementation of RelocInfo
|
169
105
|
|
@@ -264,9 +200,9 @@ MemOperand::MemOperand(Register rn, Register rm,
|
|
264
200
|
|
265
201
|
|
266
202
|
// -----------------------------------------------------------------------------
|
267
|
-
// Implementation of Assembler
|
203
|
+
// Implementation of Assembler.
|
268
204
|
|
269
|
-
// Instruction encoding bits
|
205
|
+
// Instruction encoding bits.
|
270
206
|
enum {
|
271
207
|
H = 1 << 5, // halfword (or byte)
|
272
208
|
S6 = 1 << 6, // signed (or unsigned)
|
@@ -299,14 +235,14 @@ enum {
|
|
299
235
|
B26 = 1 << 26,
|
300
236
|
B27 = 1 << 27,
|
301
237
|
|
302
|
-
// Instruction bit masks
|
238
|
+
// Instruction bit masks.
|
303
239
|
RdMask = 15 << 12, // in str instruction
|
304
240
|
CondMask = 15 << 28,
|
305
241
|
CoprocessorMask = 15 << 8,
|
306
242
|
OpCodeMask = 15 << 21, // in data-processing instructions
|
307
243
|
Imm24Mask = (1 << 24) - 1,
|
308
244
|
Off12Mask = (1 << 12) - 1,
|
309
|
-
// Reserved condition
|
245
|
+
// Reserved condition.
|
310
246
|
nv = 15 << 28
|
311
247
|
};
|
312
248
|
|
@@ -324,16 +260,22 @@ static const Instr kPopRegPattern =
|
|
324
260
|
al | B26 | L | 4 | PostIndex | sp.code() * B16;
|
325
261
|
// mov lr, pc
|
326
262
|
const Instr kMovLrPc = al | 13*B21 | pc.code() | lr.code() * B12;
|
327
|
-
// ldr
|
328
|
-
const Instr
|
329
|
-
|
330
|
-
//
|
263
|
+
// ldr rd, [pc, #offset]
|
264
|
+
const Instr kLdrPCMask = CondMask | 15 * B24 | 7 * B20 | 15 * B16;
|
265
|
+
const Instr kLdrPCPattern = al | 5 * B24 | L | pc.code() * B16;
|
266
|
+
// blxcc rm
|
267
|
+
const Instr kBlxRegMask =
|
268
|
+
15 * B24 | 15 * B20 | 15 * B16 | 15 * B12 | 15 * B8 | 15 * B4;
|
269
|
+
const Instr kBlxRegPattern =
|
270
|
+
B24 | B21 | 15 * B16 | 15 * B12 | 15 * B8 | 3 * B4;
|
271
|
+
|
272
|
+
// Spare buffer.
|
331
273
|
static const int kMinimalBufferSize = 4*KB;
|
332
274
|
static byte* spare_buffer_ = NULL;
|
333
275
|
|
334
276
|
Assembler::Assembler(void* buffer, int buffer_size) {
|
335
277
|
if (buffer == NULL) {
|
336
|
-
//
|
278
|
+
// Do our own buffer management.
|
337
279
|
if (buffer_size <= kMinimalBufferSize) {
|
338
280
|
buffer_size = kMinimalBufferSize;
|
339
281
|
|
@@ -351,19 +293,20 @@ Assembler::Assembler(void* buffer, int buffer_size) {
|
|
351
293
|
own_buffer_ = true;
|
352
294
|
|
353
295
|
} else {
|
354
|
-
//
|
296
|
+
// Use externally provided buffer instead.
|
355
297
|
ASSERT(buffer_size > 0);
|
356
298
|
buffer_ = static_cast<byte*>(buffer);
|
357
299
|
buffer_size_ = buffer_size;
|
358
300
|
own_buffer_ = false;
|
359
301
|
}
|
360
302
|
|
361
|
-
//
|
303
|
+
// Setup buffer pointers.
|
362
304
|
ASSERT(buffer_ != NULL);
|
363
305
|
pc_ = buffer_;
|
364
306
|
reloc_info_writer.Reposition(buffer_ + buffer_size, pc_);
|
365
307
|
num_prinfo_ = 0;
|
366
308
|
next_buffer_check_ = 0;
|
309
|
+
const_pool_blocked_nesting_ = 0;
|
367
310
|
no_const_pool_before_ = 0;
|
368
311
|
last_const_pool_end_ = 0;
|
369
312
|
last_bound_pos_ = 0;
|
@@ -375,6 +318,7 @@ Assembler::Assembler(void* buffer, int buffer_size) {
|
|
375
318
|
|
376
319
|
|
377
320
|
Assembler::~Assembler() {
|
321
|
+
ASSERT(const_pool_blocked_nesting_ == 0);
|
378
322
|
if (own_buffer_) {
|
379
323
|
if (spare_buffer_ == NULL && buffer_size_ == kMinimalBufferSize) {
|
380
324
|
spare_buffer_ = buffer_;
|
@@ -386,11 +330,11 @@ Assembler::~Assembler() {
|
|
386
330
|
|
387
331
|
|
388
332
|
void Assembler::GetCode(CodeDesc* desc) {
|
389
|
-
//
|
333
|
+
// Emit constant pool if necessary.
|
390
334
|
CheckConstPool(true, false);
|
391
335
|
ASSERT(num_prinfo_ == 0);
|
392
336
|
|
393
|
-
//
|
337
|
+
// Setup code descriptor.
|
394
338
|
desc->buffer = buffer_;
|
395
339
|
desc->buffer_size = buffer_size_;
|
396
340
|
desc->instr_size = pc_offset();
|
@@ -406,6 +350,51 @@ void Assembler::Align(int m) {
|
|
406
350
|
}
|
407
351
|
|
408
352
|
|
353
|
+
bool Assembler::IsNop(Instr instr, int type) {
|
354
|
+
// Check for mov rx, rx.
|
355
|
+
ASSERT(0 <= type && type <= 14); // mov pc, pc is not a nop.
|
356
|
+
return instr == (al | 13*B21 | type*B12 | type);
|
357
|
+
}
|
358
|
+
|
359
|
+
|
360
|
+
bool Assembler::IsBranch(Instr instr) {
|
361
|
+
return (instr & (B27 | B25)) == (B27 | B25);
|
362
|
+
}
|
363
|
+
|
364
|
+
|
365
|
+
int Assembler::GetBranchOffset(Instr instr) {
|
366
|
+
ASSERT(IsBranch(instr));
|
367
|
+
// Take the jump offset in the lower 24 bits, sign extend it and multiply it
|
368
|
+
// with 4 to get the offset in bytes.
|
369
|
+
return ((instr & Imm24Mask) << 8) >> 6;
|
370
|
+
}
|
371
|
+
|
372
|
+
|
373
|
+
bool Assembler::IsLdrRegisterImmediate(Instr instr) {
|
374
|
+
return (instr & (B27 | B26 | B25 | B22 | B20)) == (B26 | B20);
|
375
|
+
}
|
376
|
+
|
377
|
+
|
378
|
+
int Assembler::GetLdrRegisterImmediateOffset(Instr instr) {
|
379
|
+
ASSERT(IsLdrRegisterImmediate(instr));
|
380
|
+
bool positive = (instr & B23) == B23;
|
381
|
+
int offset = instr & Off12Mask; // Zero extended offset.
|
382
|
+
return positive ? offset : -offset;
|
383
|
+
}
|
384
|
+
|
385
|
+
|
386
|
+
Instr Assembler::SetLdrRegisterImmediateOffset(Instr instr, int offset) {
|
387
|
+
ASSERT(IsLdrRegisterImmediate(instr));
|
388
|
+
bool positive = offset >= 0;
|
389
|
+
if (!positive) offset = -offset;
|
390
|
+
ASSERT(is_uint12(offset));
|
391
|
+
// Set bit indicating whether the offset should be added.
|
392
|
+
instr = (instr & ~B23) | (positive ? B23 : 0);
|
393
|
+
// Set the actual offset.
|
394
|
+
return (instr & ~Off12Mask) | offset;
|
395
|
+
}
|
396
|
+
|
397
|
+
|
409
398
|
// Labels refer to positions in the (to be) generated code.
|
410
399
|
// There are bound, linked, and unused labels.
|
411
400
|
//
|
@@ -429,10 +418,10 @@ int Assembler::target_at(int pos) {
|
|
429
418
|
}
|
430
419
|
ASSERT((instr & 7*B25) == 5*B25); // b, bl, or blx imm24
|
431
420
|
int imm26 = ((instr & Imm24Mask) << 8) >> 6;
|
432
|
-
if ((instr & CondMask) == nv && (instr & B24) != 0)
|
421
|
+
if ((instr & CondMask) == nv && (instr & B24) != 0) {
|
433
422
|
// blx uses bit 24 to encode bit 2 of imm26
|
434
423
|
imm26 += 2;
|
435
|
-
|
424
|
+
}
|
436
425
|
return pos + kPcLoadDelta + imm26;
|
437
426
|
}
|
438
427
|
|
@@ -539,7 +528,7 @@ void Assembler::bind_to(Label* L, int pos) {
|
|
539
528
|
void Assembler::link_to(Label* L, Label* appendix) {
|
540
529
|
if (appendix->is_linked()) {
|
541
530
|
if (L->is_linked()) {
|
542
|
-
//
|
531
|
+
// Append appendix to L's list.
|
543
532
|
int fixup_pos;
|
544
533
|
int link = L->pos();
|
545
534
|
do {
|
@@ -549,7 +538,7 @@ void Assembler::link_to(Label* L, Label* appendix) {
|
|
549
538
|
ASSERT(link == kEndOfChain);
|
550
539
|
target_at_put(fixup_pos, appendix->pos());
|
551
540
|
} else {
|
552
|
-
// L is empty, simply use appendix
|
541
|
+
// L is empty, simply use appendix.
|
553
542
|
*L = *appendix;
|
554
543
|
}
|
555
544
|
}
|
@@ -575,12 +564,12 @@ void Assembler::next(Label* L) {
|
|
575
564
|
}
|
576
565
|
|
577
566
|
|
578
|
-
// Low-level code emission routines depending on the addressing mode
|
567
|
+
// Low-level code emission routines depending on the addressing mode.
|
579
568
|
static bool fits_shifter(uint32_t imm32,
|
580
569
|
uint32_t* rotate_imm,
|
581
570
|
uint32_t* immed_8,
|
582
571
|
Instr* instr) {
|
583
|
-
// imm32 must be unsigned
|
572
|
+
// imm32 must be unsigned.
|
584
573
|
for (int rot = 0; rot < 16; rot++) {
|
585
574
|
uint32_t imm8 = (imm32 << 2*rot) | (imm32 >> (32 - 2*rot));
|
586
575
|
if ((imm8 <= 0xff)) {
|
@@ -589,7 +578,7 @@ static bool fits_shifter(uint32_t imm32,
|
|
589
578
|
return true;
|
590
579
|
}
|
591
580
|
}
|
592
|
-
//
|
581
|
+
// If the opcode is mov or mvn and if ~imm32 fits, change the opcode.
|
593
582
|
if (instr != NULL && (*instr & 0xd*B21) == 0xd*B21) {
|
594
583
|
if (fits_shifter(~imm32, rotate_imm, immed_8, NULL)) {
|
595
584
|
*instr ^= 0x2*B21;
|
@@ -610,7 +599,7 @@ static bool MustUseIp(RelocInfo::Mode rmode) {
|
|
610
599
|
if (!Serializer::enabled()) {
|
611
600
|
Serializer::TooLateToEnableNow();
|
612
601
|
}
|
613
|
-
#endif
|
602
|
+
#endif // def DEBUG
|
614
603
|
return Serializer::enabled();
|
615
604
|
} else if (rmode == RelocInfo::NONE) {
|
616
605
|
return false;
|
@@ -626,7 +615,7 @@ void Assembler::addrmod1(Instr instr,
|
|
626
615
|
CheckBuffer();
|
627
616
|
ASSERT((instr & ~(CondMask | OpCodeMask | S)) == 0);
|
628
617
|
if (!x.rm_.is_valid()) {
|
629
|
-
//
|
618
|
+
// Immediate.
|
630
619
|
uint32_t rotate_imm;
|
631
620
|
uint32_t immed_8;
|
632
621
|
if (MustUseIp(x.rmode_) ||
|
@@ -634,7 +623,7 @@ void Assembler::addrmod1(Instr instr,
|
|
634
623
|
// The immediate operand cannot be encoded as a shifter operand, so load
|
635
624
|
// it first to register ip and change the original instruction to use ip.
|
636
625
|
// However, if the original instruction is a 'mov rd, x' (not setting the
|
637
|
-
// condition code), then replace it with a 'ldr rd, [pc]'
|
626
|
+
// condition code), then replace it with a 'ldr rd, [pc]'.
|
638
627
|
RecordRelocInfo(x.rmode_, x.imm32_);
|
639
628
|
CHECK(!rn.is(ip)); // rn should never be ip, or will be trashed
|
640
629
|
Condition cond = static_cast<Condition>(instr & CondMask);
|
@@ -648,16 +637,16 @@ void Assembler::addrmod1(Instr instr,
|
|
648
637
|
}
|
649
638
|
instr |= I | rotate_imm*B8 | immed_8;
|
650
639
|
} else if (!x.rs_.is_valid()) {
|
651
|
-
//
|
640
|
+
// Immediate shift.
|
652
641
|
instr |= x.shift_imm_*B7 | x.shift_op_ | x.rm_.code();
|
653
642
|
} else {
|
654
|
-
//
|
643
|
+
// Register shift.
|
655
644
|
ASSERT(!rn.is(pc) && !rd.is(pc) && !x.rm_.is(pc) && !x.rs_.is(pc));
|
656
645
|
instr |= x.rs_.code()*B8 | x.shift_op_ | B4 | x.rm_.code();
|
657
646
|
}
|
658
647
|
emit(instr | rn.code()*B16 | rd.code()*B12);
|
659
648
|
if (rn.is(pc) || x.rm_.is(pc))
|
660
|
-
//
|
649
|
+
// Block constant pool emission for one instruction after reading pc.
|
661
650
|
BlockConstPoolBefore(pc_offset() + kInstrSize);
|
662
651
|
}
|
663
652
|
|
@@ -666,15 +655,15 @@ void Assembler::addrmod2(Instr instr, Register rd, const MemOperand& x) {
|
|
666
655
|
ASSERT((instr & ~(CondMask | B | L)) == B26);
|
667
656
|
int am = x.am_;
|
668
657
|
if (!x.rm_.is_valid()) {
|
669
|
-
//
|
658
|
+
// Immediate offset.
|
670
659
|
int offset_12 = x.offset_;
|
671
660
|
if (offset_12 < 0) {
|
672
661
|
offset_12 = -offset_12;
|
673
662
|
am ^= U;
|
674
663
|
}
|
675
664
|
if (!is_uint12(offset_12)) {
|
676
|
-
//
|
677
|
-
// rn (and rd in a load) should never be ip, or will be trashed
|
665
|
+
// Immediate offset cannot be encoded, load it first to register ip
|
666
|
+
// rn (and rd in a load) should never be ip, or will be trashed.
|
678
667
|
ASSERT(!x.rn_.is(ip) && ((instr & L) == L || !rd.is(ip)));
|
679
668
|
mov(ip, Operand(x.offset_), LeaveCC,
|
680
669
|
static_cast<Condition>(instr & CondMask));
|
@@ -684,9 +673,9 @@ void Assembler::addrmod2(Instr instr, Register rd, const MemOperand& x) {
|
|
684
673
|
ASSERT(offset_12 >= 0); // no masking needed
|
685
674
|
instr |= offset_12;
|
686
675
|
} else {
|
687
|
-
//
|
676
|
+
// Register offset (shift_imm_ and shift_op_ are 0) or scaled
|
688
677
|
// register offset the constructors make sure than both shift_imm_
|
689
|
-
// and shift_op_ are initialized
|
678
|
+
// and shift_op_ are initialized.
|
690
679
|
ASSERT(!x.rm_.is(pc));
|
691
680
|
instr |= B25 | x.shift_imm_*B7 | x.shift_op_ | x.rm_.code();
|
692
681
|
}
|
@@ -700,15 +689,15 @@ void Assembler::addrmod3(Instr instr, Register rd, const MemOperand& x) {
|
|
700
689
|
ASSERT(x.rn_.is_valid());
|
701
690
|
int am = x.am_;
|
702
691
|
if (!x.rm_.is_valid()) {
|
703
|
-
//
|
692
|
+
// Immediate offset.
|
704
693
|
int offset_8 = x.offset_;
|
705
694
|
if (offset_8 < 0) {
|
706
695
|
offset_8 = -offset_8;
|
707
696
|
am ^= U;
|
708
697
|
}
|
709
698
|
if (!is_uint8(offset_8)) {
|
710
|
-
//
|
711
|
-
// rn (and rd in a load) should never be ip, or will be trashed
|
699
|
+
// Immediate offset cannot be encoded, load it first to register ip
|
700
|
+
// rn (and rd in a load) should never be ip, or will be trashed.
|
712
701
|
ASSERT(!x.rn_.is(ip) && ((instr & L) == L || !rd.is(ip)));
|
713
702
|
mov(ip, Operand(x.offset_), LeaveCC,
|
714
703
|
static_cast<Condition>(instr & CondMask));
|
@@ -718,15 +707,15 @@ void Assembler::addrmod3(Instr instr, Register rd, const MemOperand& x) {
|
|
718
707
|
ASSERT(offset_8 >= 0); // no masking needed
|
719
708
|
instr |= B | (offset_8 >> 4)*B8 | (offset_8 & 0xf);
|
720
709
|
} else if (x.shift_imm_ != 0) {
|
721
|
-
//
|
722
|
-
// rn (and rd in a load) should never be ip, or will be trashed
|
710
|
+
// Scaled register offset not supported, load index first
|
711
|
+
// rn (and rd in a load) should never be ip, or will be trashed.
|
723
712
|
ASSERT(!x.rn_.is(ip) && ((instr & L) == L || !rd.is(ip)));
|
724
713
|
mov(ip, Operand(x.rm_, x.shift_op_, x.shift_imm_), LeaveCC,
|
725
714
|
static_cast<Condition>(instr & CondMask));
|
726
715
|
addrmod3(instr, rd, MemOperand(x.rn_, ip, x.am_));
|
727
716
|
return;
|
728
717
|
} else {
|
729
|
-
//
|
718
|
+
// Register offset.
|
730
719
|
ASSERT((am & (P|W)) == P || !x.rm_.is(pc)); // no pc index with writeback
|
731
720
|
instr |= x.rm_.code();
|
732
721
|
}
|
@@ -744,7 +733,7 @@ void Assembler::addrmod4(Instr instr, Register rn, RegList rl) {
|
|
744
733
|
|
745
734
|
|
746
735
|
void Assembler::addrmod5(Instr instr, CRegister crd, const MemOperand& x) {
|
747
|
-
//
|
736
|
+
// Unindexed addressing is not encoded by this function.
|
748
737
|
ASSERT_EQ((B27 | B26),
|
749
738
|
(instr & ~(CondMask | CoprocessorMask | P | U | N | W | L)));
|
750
739
|
ASSERT(x.rn_.is_valid() && !x.rm_.is_valid());
|
@@ -759,7 +748,7 @@ void Assembler::addrmod5(Instr instr, CRegister crd, const MemOperand& x) {
|
|
759
748
|
ASSERT(is_uint8(offset_8)); // unsigned word offset must fit in a byte
|
760
749
|
ASSERT((am & (P|W)) == P || !x.rn_.is(pc)); // no pc base with writeback
|
761
750
|
|
762
|
-
//
|
751
|
+
// Post-indexed addressing requires W == 1; different than in addrmod2/3.
|
763
752
|
if ((am & P) == 0)
|
764
753
|
am |= W;
|
765
754
|
|
@@ -782,7 +771,7 @@ int Assembler::branch_offset(Label* L, bool jump_elimination_allowed) {
|
|
782
771
|
}
|
783
772
|
|
784
773
|
// Block the emission of the constant pool, since the branch instruction must
|
785
|
-
// be emitted at the pc offset recorded by the label
|
774
|
+
// be emitted at the pc offset recorded by the label.
|
786
775
|
BlockConstPoolBefore(pc_offset() + kInstrSize);
|
787
776
|
return target_pos - (pc_offset() + kPcLoadDelta);
|
788
777
|
}
|
@@ -804,16 +793,17 @@ void Assembler::label_at_put(Label* L, int at_offset) {
|
|
804
793
|
}
|
805
794
|
|
806
795
|
|
807
|
-
// Branch instructions
|
796
|
+
// Branch instructions.
|
808
797
|
void Assembler::b(int branch_offset, Condition cond) {
|
809
798
|
ASSERT((branch_offset & 3) == 0);
|
810
799
|
int imm24 = branch_offset >> 2;
|
811
800
|
ASSERT(is_int24(imm24));
|
812
801
|
emit(cond | B27 | B25 | (imm24 & Imm24Mask));
|
813
802
|
|
814
|
-
if (cond == al)
|
815
|
-
//
|
803
|
+
if (cond == al) {
|
804
|
+
// Dead code is a good location to emit the constant pool.
|
816
805
|
CheckConstPool(false, false);
|
806
|
+
}
|
817
807
|
}
|
818
808
|
|
819
809
|
|
@@ -849,7 +839,22 @@ void Assembler::bx(Register target, Condition cond) { // v5 and above, plus v4t
|
|
849
839
|
}
|
850
840
|
|
851
841
|
|
852
|
-
// Data-processing instructions
|
842
|
+
// Data-processing instructions.
|
843
|
+
|
844
|
+
// UBFX <Rd>,<Rn>,#<lsb>,#<width - 1>
|
845
|
+
// Instruction details available in ARM DDI 0406A, A8-464.
|
846
|
+
// cond(31-28) | 01111(27-23)| 1(22) | 1(21) | widthm1(20-16) |
|
847
|
+
// Rd(15-12) | lsb(11-7) | 101(6-4) | Rn(3-0)
|
848
|
+
void Assembler::ubfx(Register dst, Register src1, const Operand& src2,
|
849
|
+
const Operand& src3, Condition cond) {
|
850
|
+
ASSERT(!src2.rm_.is_valid() && !src3.rm_.is_valid());
|
851
|
+
ASSERT(static_cast<uint32_t>(src2.imm32_) <= 0x1f);
|
852
|
+
ASSERT(static_cast<uint32_t>(src3.imm32_) <= 0x1f);
|
853
|
+
emit(cond | 0x3F*B21 | src3.imm32_*B16 |
|
854
|
+
dst.code()*B12 | src2.imm32_*B7 | 0x5*B4 | src1.code());
|
855
|
+
}
|
856
|
+
|
857
|
+
|
853
858
|
void Assembler::and_(Register dst, Register src1, const Operand& src2,
|
854
859
|
SBit s, Condition cond) {
|
855
860
|
addrmod1(cond | 0*B21 | s, src1, dst, src2);
|
@@ -886,7 +891,7 @@ void Assembler::add(Register dst, Register src1, const Operand& src2,
|
|
886
891
|
if (FLAG_push_pop_elimination &&
|
887
892
|
last_bound_pos_ <= (pc_offset() - pattern_size) &&
|
888
893
|
reloc_info_writer.last_pc() <= (pc_ - pattern_size) &&
|
889
|
-
//
|
894
|
+
// Pattern.
|
890
895
|
instr_at(pc_ - 1 * kInstrSize) == kPopInstruction &&
|
891
896
|
(instr_at(pc_ - 2 * kInstrSize) & ~RdMask) == kPushRegPattern) {
|
892
897
|
pc_ -= 2 * kInstrSize;
|
@@ -945,6 +950,10 @@ void Assembler::mov(Register dst, const Operand& src, SBit s, Condition cond) {
|
|
945
950
|
if (dst.is(pc)) {
|
946
951
|
WriteRecordedPositions();
|
947
952
|
}
|
953
|
+
// Don't allow nop instructions in the form mov rn, rn to be generated using
|
954
|
+
// the mov instruction. They must be generated using nop(int)
|
955
|
+
// pseudo instructions.
|
956
|
+
ASSERT(!(src.is_reg() && src.rm().is(dst) && s == LeaveCC && cond == al));
|
948
957
|
addrmod1(cond | 13*B21 | s, r0, dst, src);
|
949
958
|
}
|
950
959
|
|
@@ -960,7 +969,7 @@ void Assembler::mvn(Register dst, const Operand& src, SBit s, Condition cond) {
|
|
960
969
|
}
|
961
970
|
|
962
971
|
|
963
|
-
// Multiply instructions
|
972
|
+
// Multiply instructions.
|
964
973
|
void Assembler::mla(Register dst, Register src1, Register src2, Register srcA,
|
965
974
|
SBit s, Condition cond) {
|
966
975
|
ASSERT(!dst.is(pc) && !src1.is(pc) && !src2.is(pc) && !srcA.is(pc));
|
@@ -1029,7 +1038,7 @@ void Assembler::umull(Register dstL,
|
|
1029
1038
|
}
|
1030
1039
|
|
1031
1040
|
|
1032
|
-
// Miscellaneous arithmetic instructions
|
1041
|
+
// Miscellaneous arithmetic instructions.
|
1033
1042
|
void Assembler::clz(Register dst, Register src, Condition cond) {
|
1034
1043
|
// v5 and above.
|
1035
1044
|
ASSERT(!dst.is(pc) && !src.is(pc));
|
@@ -1038,7 +1047,7 @@ void Assembler::clz(Register dst, Register src, Condition cond) {
|
|
1038
1047
|
}
|
1039
1048
|
|
1040
1049
|
|
1041
|
-
// Status register access instructions
|
1050
|
+
// Status register access instructions.
|
1042
1051
|
void Assembler::mrs(Register dst, SRegister s, Condition cond) {
|
1043
1052
|
ASSERT(!dst.is(pc));
|
1044
1053
|
emit(cond | B24 | s | 15*B16 | dst.code()*B12);
|
@@ -1050,12 +1059,12 @@ void Assembler::msr(SRegisterFieldMask fields, const Operand& src,
|
|
1050
1059
|
ASSERT(fields >= B16 && fields < B20); // at least one field set
|
1051
1060
|
Instr instr;
|
1052
1061
|
if (!src.rm_.is_valid()) {
|
1053
|
-
//
|
1062
|
+
// Immediate.
|
1054
1063
|
uint32_t rotate_imm;
|
1055
1064
|
uint32_t immed_8;
|
1056
1065
|
if (MustUseIp(src.rmode_) ||
|
1057
1066
|
!fits_shifter(src.imm32_, &rotate_imm, &immed_8, NULL)) {
|
1058
|
-
//
|
1067
|
+
// Immediate operand cannot be encoded, load it first to register ip.
|
1059
1068
|
RecordRelocInfo(src.rmode_, src.imm32_);
|
1060
1069
|
ldr(ip, MemOperand(pc, 0), cond);
|
1061
1070
|
msr(fields, Operand(ip), cond);
|
@@ -1070,7 +1079,7 @@ void Assembler::msr(SRegisterFieldMask fields, const Operand& src,
|
|
1070
1079
|
}
|
1071
1080
|
|
1072
1081
|
|
1073
|
-
// Load/Store instructions
|
1082
|
+
// Load/Store instructions.
|
1074
1083
|
void Assembler::ldr(Register dst, const MemOperand& src, Condition cond) {
|
1075
1084
|
if (dst.is(pc)) {
|
1076
1085
|
WriteRecordedPositions();
|
@@ -1085,7 +1094,7 @@ void Assembler::ldr(Register dst, const MemOperand& src, Condition cond) {
|
|
1085
1094
|
if (FLAG_push_pop_elimination &&
|
1086
1095
|
last_bound_pos_ <= (pc_offset() - pattern_size) &&
|
1087
1096
|
reloc_info_writer.last_pc() <= (pc_ - pattern_size) &&
|
1088
|
-
//
|
1097
|
+
// Pattern.
|
1089
1098
|
instr_at(pc_ - 1 * kInstrSize) == (kPopRegPattern | dst.code() * B12) &&
|
1090
1099
|
instr_at(pc_ - 2 * kInstrSize) == (kPushRegPattern | dst.code() * B12)) {
|
1091
1100
|
pc_ -= 2 * kInstrSize;
|
@@ -1106,6 +1115,7 @@ void Assembler::str(Register src, const MemOperand& dst, Condition cond) {
|
|
1106
1115
|
if (FLAG_push_pop_elimination &&
|
1107
1116
|
last_bound_pos_ <= (pc_offset() - pattern_size) &&
|
1108
1117
|
reloc_info_writer.last_pc() <= (pc_ - pattern_size) &&
|
1118
|
+
// Pattern.
|
1109
1119
|
instr_at(pc_ - 1 * kInstrSize) == (kPushRegPattern | src.code() * B12) &&
|
1110
1120
|
instr_at(pc_ - 2 * kInstrSize) == kPopInstruction) {
|
1111
1121
|
pc_ -= 2 * kInstrSize;
|
@@ -1147,17 +1157,17 @@ void Assembler::ldrsh(Register dst, const MemOperand& src, Condition cond) {
|
|
1147
1157
|
}
|
1148
1158
|
|
1149
1159
|
|
1150
|
-
// Load/Store multiple instructions
|
1160
|
+
// Load/Store multiple instructions.
|
1151
1161
|
void Assembler::ldm(BlockAddrMode am,
|
1152
1162
|
Register base,
|
1153
1163
|
RegList dst,
|
1154
1164
|
Condition cond) {
|
1155
|
-
// ABI stack constraint: ldmxx base, {..sp..} base != sp is not restartable
|
1165
|
+
// ABI stack constraint: ldmxx base, {..sp..} base != sp is not restartable.
|
1156
1166
|
ASSERT(base.is(sp) || (dst & sp.bit()) == 0);
|
1157
1167
|
|
1158
1168
|
addrmod4(cond | B27 | am | L, base, dst);
|
1159
1169
|
|
1160
|
-
//
|
1170
|
+
// Emit the constant pool after a function return implemented by ldm ..{..pc}.
|
1161
1171
|
if (cond == al && (dst & pc.bit()) != 0) {
|
1162
1172
|
// There is a slight chance that the ldm instruction was actually a call,
|
1163
1173
|
// in which case it would be wrong to return into the constant pool; we
|
@@ -1177,7 +1187,7 @@ void Assembler::stm(BlockAddrMode am,
|
|
1177
1187
|
}
|
1178
1188
|
|
1179
1189
|
|
1180
|
-
// Semaphore instructions
|
1190
|
+
// Semaphore instructions.
|
1181
1191
|
void Assembler::swp(Register dst, Register src, Register base, Condition cond) {
|
1182
1192
|
ASSERT(!dst.is(pc) && !src.is(pc) && !base.is(pc));
|
1183
1193
|
ASSERT(!dst.is(base) && !src.is(base));
|
@@ -1197,16 +1207,18 @@ void Assembler::swpb(Register dst,
|
|
1197
1207
|
}
|
1198
1208
|
|
1199
1209
|
|
1200
|
-
// Exception-generating instructions and debugging support
|
1210
|
+
// Exception-generating instructions and debugging support.
|
1201
1211
|
void Assembler::stop(const char* msg) {
|
1202
|
-
#
|
1212
|
+
#ifndef __arm__
|
1203
1213
|
// The simulator handles these special instructions and stops execution.
|
1204
1214
|
emit(15 << 28 | ((intptr_t) msg));
|
1205
|
-
#else
|
1206
|
-
|
1207
|
-
// the swi(0x9f0001) instruction on Linux.
|
1215
|
+
#else // def __arm__
|
1216
|
+
#ifdef CAN_USE_ARMV5_INSTRUCTIONS
|
1208
1217
|
bkpt(0);
|
1209
|
-
#
|
1218
|
+
#else // ndef CAN_USE_ARMV5_INSTRUCTIONS
|
1219
|
+
swi(0x9f0001);
|
1220
|
+
#endif // ndef CAN_USE_ARMV5_INSTRUCTIONS
|
1221
|
+
#endif // def __arm__
|
1210
1222
|
}
|
1211
1223
|
|
1212
1224
|
|
@@ -1222,7 +1234,7 @@ void Assembler::swi(uint32_t imm24, Condition cond) {
|
|
1222
1234
|
}
|
1223
1235
|
|
1224
1236
|
|
1225
|
-
// Coprocessor instructions
|
1237
|
+
// Coprocessor instructions.
|
1226
1238
|
void Assembler::cdp(Coprocessor coproc,
|
1227
1239
|
int opcode_1,
|
1228
1240
|
CRegister crd,
|
@@ -1307,7 +1319,7 @@ void Assembler::ldc(Coprocessor coproc,
|
|
1307
1319
|
int option,
|
1308
1320
|
LFlag l,
|
1309
1321
|
Condition cond) {
|
1310
|
-
//
|
1322
|
+
// Unindexed addressing.
|
1311
1323
|
ASSERT(is_uint8(option));
|
1312
1324
|
emit(cond | B27 | B26 | U | l | L | rn.code()*B16 | crd.code()*B12 |
|
1313
1325
|
coproc*B8 | (option & 255));
|
@@ -1346,7 +1358,7 @@ void Assembler::stc(Coprocessor coproc,
|
|
1346
1358
|
int option,
|
1347
1359
|
LFlag l,
|
1348
1360
|
Condition cond) {
|
1349
|
-
//
|
1361
|
+
// Unindexed addressing.
|
1350
1362
|
ASSERT(is_uint8(option));
|
1351
1363
|
emit(cond | B27 | B26 | U | l | rn.code()*B16 | crd.code()*B12 |
|
1352
1364
|
coproc*B8 | (option & 255));
|
@@ -1371,6 +1383,54 @@ void Assembler::stc2(Coprocessor coproc,
|
|
1371
1383
|
|
1372
1384
|
|
1373
1385
|
// Support for VFP.
|
1386
|
+
void Assembler::vldr(const DwVfpRegister dst,
|
1387
|
+
const Register base,
|
1388
|
+
int offset,
|
1389
|
+
const Condition cond) {
|
1390
|
+
// Ddst = MEM(Rbase + offset).
|
1391
|
+
// Instruction details available in ARM DDI 0406A, A8-628.
|
1392
|
+
// cond(31-28) | 1101(27-24)| 1001(23-20) | Rbase(19-16) |
|
1393
|
+
// Vdst(15-12) | 1011(11-8) | offset
|
1394
|
+
ASSERT(CpuFeatures::IsEnabled(VFP3));
|
1395
|
+
ASSERT(offset % 4 == 0);
|
1396
|
+
ASSERT((offset / 4) < 256);
|
1397
|
+
emit(cond | 0xD9*B20 | base.code()*B16 | dst.code()*B12 |
|
1398
|
+
0xB*B8 | ((offset / 4) & 255));
|
1399
|
+
}
|
1400
|
+
|
1401
|
+
|
1402
|
+
void Assembler::vldr(const SwVfpRegister dst,
|
1403
|
+
const Register base,
|
1404
|
+
int offset,
|
1405
|
+
const Condition cond) {
|
1406
|
+
// Sdst = MEM(Rbase + offset).
|
1407
|
+
// Instruction details available in ARM DDI 0406A, A8-628.
|
1408
|
+
// cond(31-28) | 1101(27-24)| 1001(23-20) | Rbase(19-16) |
|
1409
|
+
// Vdst(15-12) | 1010(11-8) | offset
|
1410
|
+
ASSERT(CpuFeatures::IsEnabled(VFP3));
|
1411
|
+
ASSERT(offset % 4 == 0);
|
1412
|
+
ASSERT((offset / 4) < 256);
|
1413
|
+
emit(cond | 0xD9*B20 | base.code()*B16 | dst.code()*B12 |
|
1414
|
+
0xA*B8 | ((offset / 4) & 255));
|
1415
|
+
}
|
1416
|
+
|
1417
|
+
|
1418
|
+
void Assembler::vstr(const DwVfpRegister src,
|
1419
|
+
const Register base,
|
1420
|
+
int offset,
|
1421
|
+
const Condition cond) {
|
1422
|
+
// MEM(Rbase + offset) = Dsrc.
|
1423
|
+
// Instruction details available in ARM DDI 0406A, A8-786.
|
1424
|
+
// cond(31-28) | 1101(27-24)| 1000(23-20) | | Rbase(19-16) |
|
1425
|
+
// Vsrc(15-12) | 1011(11-8) | (offset/4)
|
1426
|
+
ASSERT(CpuFeatures::IsEnabled(VFP3));
|
1427
|
+
ASSERT(offset % 4 == 0);
|
1428
|
+
ASSERT((offset / 4) < 256);
|
1429
|
+
emit(cond | 0xD8*B20 | base.code()*B16 | src.code()*B12 |
|
1430
|
+
0xB*B8 | ((offset / 4) & 255));
|
1431
|
+
}
|
1432
|
+
|
1433
|
+
|
1374
1434
|
void Assembler::vmov(const DwVfpRegister dst,
|
1375
1435
|
const Register src1,
|
1376
1436
|
const Register src2,
|
@@ -1429,31 +1489,172 @@ void Assembler::vmov(const Register dst,
|
|
1429
1489
|
}
|
1430
1490
|
|
1431
1491
|
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1435
|
-
|
1436
|
-
|
1437
|
-
|
1438
|
-
|
1492
|
+
// Type of data to read from or write to VFP register.
|
1493
|
+
// Used as specifier in generic vcvt instruction.
|
1494
|
+
enum VFPType { S32, U32, F32, F64 };
|
1495
|
+
|
1496
|
+
|
1497
|
+
static bool IsSignedVFPType(VFPType type) {
|
1498
|
+
switch (type) {
|
1499
|
+
case S32:
|
1500
|
+
return true;
|
1501
|
+
case U32:
|
1502
|
+
return false;
|
1503
|
+
default:
|
1504
|
+
UNREACHABLE();
|
1505
|
+
return false;
|
1506
|
+
}
|
1507
|
+
}
|
1508
|
+
|
1509
|
+
|
1510
|
+
static bool IsIntegerVFPType(VFPType type) {
|
1511
|
+
switch (type) {
|
1512
|
+
case S32:
|
1513
|
+
case U32:
|
1514
|
+
return true;
|
1515
|
+
case F32:
|
1516
|
+
case F64:
|
1517
|
+
return false;
|
1518
|
+
default:
|
1519
|
+
UNREACHABLE();
|
1520
|
+
return false;
|
1521
|
+
}
|
1522
|
+
}
|
1523
|
+
|
1524
|
+
|
1525
|
+
static bool IsDoubleVFPType(VFPType type) {
|
1526
|
+
switch (type) {
|
1527
|
+
case F32:
|
1528
|
+
return false;
|
1529
|
+
case F64:
|
1530
|
+
return true;
|
1531
|
+
default:
|
1532
|
+
UNREACHABLE();
|
1533
|
+
return false;
|
1534
|
+
}
|
1535
|
+
}
|
1536
|
+
|
1537
|
+
|
1538
|
+
// Depending on split_last_bit split binary representation of reg_code into Vm:M
|
1539
|
+
// or M:Vm form (where M is single bit).
|
1540
|
+
static void SplitRegCode(bool split_last_bit,
|
1541
|
+
int reg_code,
|
1542
|
+
int* vm,
|
1543
|
+
int* m) {
|
1544
|
+
if (split_last_bit) {
|
1545
|
+
*m = reg_code & 0x1;
|
1546
|
+
*vm = reg_code >> 1;
|
1547
|
+
} else {
|
1548
|
+
*m = (reg_code & 0x10) >> 4;
|
1549
|
+
*vm = reg_code & 0x0F;
|
1550
|
+
}
|
1551
|
+
}
|
1552
|
+
|
1553
|
+
|
1554
|
+
// Encode vcvt.src_type.dst_type instruction.
|
1555
|
+
static Instr EncodeVCVT(const VFPType dst_type,
|
1556
|
+
const int dst_code,
|
1557
|
+
const VFPType src_type,
|
1558
|
+
const int src_code,
|
1559
|
+
const Condition cond) {
|
1560
|
+
if (IsIntegerVFPType(dst_type) || IsIntegerVFPType(src_type)) {
|
1561
|
+
// Conversion between IEEE floating point and 32-bit integer.
|
1562
|
+
// Instruction details available in ARM DDI 0406B, A8.6.295.
|
1563
|
+
// cond(31-28) | 11101(27-23)| D(22) | 11(21-20) | 1(19) | opc2(18-16) |
|
1564
|
+
// Vd(15-12) | 101(11-9) | sz(8) | op(7) | 1(6) | M(5) | 0(4) | Vm(3-0)
|
1565
|
+
ASSERT(!IsIntegerVFPType(dst_type) || !IsIntegerVFPType(src_type));
|
1566
|
+
|
1567
|
+
int sz, opc2, D, Vd, M, Vm, op;
|
1568
|
+
|
1569
|
+
if (IsIntegerVFPType(dst_type)) {
|
1570
|
+
opc2 = IsSignedVFPType(dst_type) ? 0x5 : 0x4;
|
1571
|
+
sz = IsDoubleVFPType(src_type) ? 0x1 : 0x0;
|
1572
|
+
op = 1; // round towards zero
|
1573
|
+
SplitRegCode(!IsDoubleVFPType(src_type), src_code, &Vm, &M);
|
1574
|
+
SplitRegCode(true, dst_code, &Vd, &D);
|
1575
|
+
} else {
|
1576
|
+
ASSERT(IsIntegerVFPType(src_type));
|
1577
|
+
|
1578
|
+
opc2 = 0x0;
|
1579
|
+
sz = IsDoubleVFPType(dst_type) ? 0x1 : 0x0;
|
1580
|
+
op = IsSignedVFPType(src_type) ? 0x1 : 0x0;
|
1581
|
+
SplitRegCode(true, src_code, &Vm, &M);
|
1582
|
+
SplitRegCode(!IsDoubleVFPType(dst_type), dst_code, &Vd, &D);
|
1583
|
+
}
|
1584
|
+
|
1585
|
+
return (cond | 0xE*B24 | B23 | D*B22 | 0x3*B20 | B19 | opc2*B16 |
|
1586
|
+
Vd*B12 | 0x5*B9 | sz*B8 | op*B7 | B6 | M*B5 | Vm);
|
1587
|
+
} else {
|
1588
|
+
// Conversion between IEEE double and single precision.
|
1589
|
+
// Instruction details available in ARM DDI 0406B, A8.6.298.
|
1590
|
+
// cond(31-28) | 11101(27-23)| D(22) | 11(21-20) | 0111(19-16) |
|
1591
|
+
// Vd(15-12) | 101(11-9) | sz(8) | 1(7) | 1(6) | M(5) | 0(4) | Vm(3-0)
|
1592
|
+
int sz, D, Vd, M, Vm;
|
1593
|
+
|
1594
|
+
ASSERT(IsDoubleVFPType(dst_type) != IsDoubleVFPType(src_type));
|
1595
|
+
sz = IsDoubleVFPType(src_type) ? 0x1 : 0x0;
|
1596
|
+
SplitRegCode(IsDoubleVFPType(src_type), dst_code, &Vd, &D);
|
1597
|
+
SplitRegCode(!IsDoubleVFPType(src_type), src_code, &Vm, &M);
|
1598
|
+
|
1599
|
+
return (cond | 0xE*B24 | B23 | D*B22 | 0x3*B20 | 0x7*B16 |
|
1600
|
+
Vd*B12 | 0x5*B9 | sz*B8 | B7 | B6 | M*B5 | Vm);
|
1601
|
+
}
|
1602
|
+
}
|
1603
|
+
|
1604
|
+
|
1605
|
+
void Assembler::vcvt_f64_s32(const DwVfpRegister dst,
|
1606
|
+
const SwVfpRegister src,
|
1607
|
+
const Condition cond) {
|
1439
1608
|
ASSERT(CpuFeatures::IsEnabled(VFP3));
|
1440
|
-
emit(
|
1441
|
-
dst.code()*B12 | 0x5*B9 | B8 | B7 | B6 |
|
1442
|
-
(0x1 & src.code())*B5 | (src.code() >> 1));
|
1609
|
+
emit(EncodeVCVT(F64, dst.code(), S32, src.code(), cond));
|
1443
1610
|
}
|
1444
1611
|
|
1445
1612
|
|
1446
|
-
void Assembler::
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
1450
|
-
|
1451
|
-
|
1452
|
-
|
1613
|
+
void Assembler::vcvt_f32_s32(const SwVfpRegister dst,
|
1614
|
+
const SwVfpRegister src,
|
1615
|
+
const Condition cond) {
|
1616
|
+
ASSERT(CpuFeatures::IsEnabled(VFP3));
|
1617
|
+
emit(EncodeVCVT(F32, dst.code(), S32, src.code(), cond));
|
1618
|
+
}
|
1619
|
+
|
1620
|
+
|
1621
|
+
void Assembler::vcvt_f64_u32(const DwVfpRegister dst,
|
1622
|
+
const SwVfpRegister src,
|
1623
|
+
const Condition cond) {
|
1453
1624
|
ASSERT(CpuFeatures::IsEnabled(VFP3));
|
1454
|
-
emit(
|
1455
|
-
|
1456
|
-
|
1625
|
+
emit(EncodeVCVT(F64, dst.code(), U32, src.code(), cond));
|
1626
|
+
}
|
1627
|
+
|
1628
|
+
|
1629
|
+
void Assembler::vcvt_s32_f64(const SwVfpRegister dst,
|
1630
|
+
const DwVfpRegister src,
|
1631
|
+
const Condition cond) {
|
1632
|
+
ASSERT(CpuFeatures::IsEnabled(VFP3));
|
1633
|
+
emit(EncodeVCVT(S32, dst.code(), F64, src.code(), cond));
|
1634
|
+
}
|
1635
|
+
|
1636
|
+
|
1637
|
+
void Assembler::vcvt_u32_f64(const SwVfpRegister dst,
|
1638
|
+
const DwVfpRegister src,
|
1639
|
+
const Condition cond) {
|
1640
|
+
ASSERT(CpuFeatures::IsEnabled(VFP3));
|
1641
|
+
emit(EncodeVCVT(U32, dst.code(), F64, src.code(), cond));
|
1642
|
+
}
|
1643
|
+
|
1644
|
+
|
1645
|
+
void Assembler::vcvt_f64_f32(const DwVfpRegister dst,
|
1646
|
+
const SwVfpRegister src,
|
1647
|
+
const Condition cond) {
|
1648
|
+
ASSERT(CpuFeatures::IsEnabled(VFP3));
|
1649
|
+
emit(EncodeVCVT(F64, dst.code(), F32, src.code(), cond));
|
1650
|
+
}
|
1651
|
+
|
1652
|
+
|
1653
|
+
void Assembler::vcvt_f32_f64(const SwVfpRegister dst,
|
1654
|
+
const DwVfpRegister src,
|
1655
|
+
const Condition cond) {
|
1656
|
+
ASSERT(CpuFeatures::IsEnabled(VFP3));
|
1657
|
+
emit(EncodeVCVT(F32, dst.code(), F64, src.code(), cond));
|
1457
1658
|
}
|
1458
1659
|
|
1459
1660
|
|
@@ -1541,14 +1742,21 @@ void Assembler::vmrs(Register dst, Condition cond) {
|
|
1541
1742
|
}
|
1542
1743
|
|
1543
1744
|
|
1544
|
-
// Pseudo instructions
|
1745
|
+
// Pseudo instructions.
|
1746
|
+
void Assembler::nop(int type) {
|
1747
|
+
// This is mov rx, rx.
|
1748
|
+
ASSERT(0 <= type && type <= 14); // mov pc, pc is not a nop.
|
1749
|
+
emit(al | 13*B21 | type*B12 | type);
|
1750
|
+
}
|
1751
|
+
|
1752
|
+
|
1545
1753
|
void Assembler::lea(Register dst,
|
1546
1754
|
const MemOperand& x,
|
1547
1755
|
SBit s,
|
1548
1756
|
Condition cond) {
|
1549
1757
|
int am = x.am_;
|
1550
1758
|
if (!x.rm_.is_valid()) {
|
1551
|
-
//
|
1759
|
+
// Immediate offset.
|
1552
1760
|
if ((am & P) == 0) // post indexing
|
1553
1761
|
mov(dst, Operand(x.rn_), s, cond);
|
1554
1762
|
else if ((am & U) == 0) // negative indexing
|
@@ -1582,7 +1790,7 @@ void Assembler::BlockConstPoolFor(int instructions) {
|
|
1582
1790
|
}
|
1583
1791
|
|
1584
1792
|
|
1585
|
-
// Debugging
|
1793
|
+
// Debugging.
|
1586
1794
|
void Assembler::RecordJSReturn() {
|
1587
1795
|
WriteRecordedPositions();
|
1588
1796
|
CheckBuffer();
|
@@ -1635,7 +1843,7 @@ void Assembler::WriteRecordedPositions() {
|
|
1635
1843
|
void Assembler::GrowBuffer() {
|
1636
1844
|
if (!own_buffer_) FATAL("external code buffer is too small");
|
1637
1845
|
|
1638
|
-
//
|
1846
|
+
// Compute new buffer size.
|
1639
1847
|
CodeDesc desc; // the new buffer
|
1640
1848
|
if (buffer_size_ < 4*KB) {
|
1641
1849
|
desc.buffer_size = 4*KB;
|
@@ -1646,20 +1854,20 @@ void Assembler::GrowBuffer() {
|
|
1646
1854
|
}
|
1647
1855
|
CHECK_GT(desc.buffer_size, 0); // no overflow
|
1648
1856
|
|
1649
|
-
//
|
1857
|
+
// Setup new buffer.
|
1650
1858
|
desc.buffer = NewArray<byte>(desc.buffer_size);
|
1651
1859
|
|
1652
1860
|
desc.instr_size = pc_offset();
|
1653
1861
|
desc.reloc_size = (buffer_ + buffer_size_) - reloc_info_writer.pos();
|
1654
1862
|
|
1655
|
-
//
|
1863
|
+
// Copy the data.
|
1656
1864
|
int pc_delta = desc.buffer - buffer_;
|
1657
1865
|
int rc_delta = (desc.buffer + desc.buffer_size) - (buffer_ + buffer_size_);
|
1658
1866
|
memmove(desc.buffer, buffer_, desc.instr_size);
|
1659
1867
|
memmove(reloc_info_writer.pos() + rc_delta,
|
1660
1868
|
reloc_info_writer.pos(), desc.reloc_size);
|
1661
1869
|
|
1662
|
-
//
|
1870
|
+
// Switch buffers.
|
1663
1871
|
DeleteArray(buffer_);
|
1664
1872
|
buffer_ = desc.buffer;
|
1665
1873
|
buffer_size_ = desc.buffer_size;
|
@@ -1667,11 +1875,11 @@ void Assembler::GrowBuffer() {
|
|
1667
1875
|
reloc_info_writer.Reposition(reloc_info_writer.pos() + rc_delta,
|
1668
1876
|
reloc_info_writer.last_pc() + pc_delta);
|
1669
1877
|
|
1670
|
-
//
|
1878
|
+
// None of our relocation types are pc relative pointing outside the code
|
1671
1879
|
// buffer nor pc absolute pointing inside the code buffer, so there is no need
|
1672
|
-
// to relocate any emitted relocation entries
|
1880
|
+
// to relocate any emitted relocation entries.
|
1673
1881
|
|
1674
|
-
//
|
1882
|
+
// Relocate pending relocation entries.
|
1675
1883
|
for (int i = 0; i < num_prinfo_; i++) {
|
1676
1884
|
RelocInfo& rinfo = prinfo_[i];
|
1677
1885
|
ASSERT(rinfo.rmode() != RelocInfo::COMMENT &&
|
@@ -1686,16 +1894,16 @@ void Assembler::GrowBuffer() {
|
|
1686
1894
|
void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) {
|
1687
1895
|
RelocInfo rinfo(pc_, rmode, data); // we do not try to reuse pool constants
|
1688
1896
|
if (rmode >= RelocInfo::JS_RETURN && rmode <= RelocInfo::STATEMENT_POSITION) {
|
1689
|
-
// Adjust code for new modes
|
1897
|
+
// Adjust code for new modes.
|
1690
1898
|
ASSERT(RelocInfo::IsJSReturn(rmode)
|
1691
1899
|
|| RelocInfo::IsComment(rmode)
|
1692
1900
|
|| RelocInfo::IsPosition(rmode));
|
1693
|
-
//
|
1901
|
+
// These modes do not need an entry in the constant pool.
|
1694
1902
|
} else {
|
1695
1903
|
ASSERT(num_prinfo_ < kMaxNumPRInfo);
|
1696
1904
|
prinfo_[num_prinfo_++] = rinfo;
|
1697
1905
|
// Make sure the constant pool is not emitted in place of the next
|
1698
|
-
// instruction for which we just recorded relocation info
|
1906
|
+
// instruction for which we just recorded relocation info.
|
1699
1907
|
BlockConstPoolBefore(pc_offset() + kInstrSize);
|
1700
1908
|
}
|
1701
1909
|
if (rinfo.rmode() != RelocInfo::NONE) {
|
@@ -1722,7 +1930,7 @@ void Assembler::CheckConstPool(bool force_emit, bool require_jump) {
|
|
1722
1930
|
// blocked for a specific range.
|
1723
1931
|
next_buffer_check_ = pc_offset() + kCheckConstInterval;
|
1724
1932
|
|
1725
|
-
// There is nothing to do if there are no pending relocation info entries
|
1933
|
+
// There is nothing to do if there are no pending relocation info entries.
|
1726
1934
|
if (num_prinfo_ == 0) return;
|
1727
1935
|
|
1728
1936
|
// We emit a constant pool at regular intervals of about kDistBetweenPools
|
@@ -1745,13 +1953,19 @@ void Assembler::CheckConstPool(bool force_emit, bool require_jump) {
|
|
1745
1953
|
|
1746
1954
|
// However, some small sequences of instructions must not be broken up by the
|
1747
1955
|
// insertion of a constant pool; such sequences are protected by setting
|
1748
|
-
//
|
1749
|
-
// CheckConstPool are blocked by
|
1750
|
-
|
1751
|
-
|
1752
|
-
|
1956
|
+
// either const_pool_blocked_nesting_ or no_const_pool_before_, which are
|
1957
|
+
// both checked here. Also, recursive calls to CheckConstPool are blocked by
|
1958
|
+
// no_const_pool_before_.
|
1959
|
+
if (const_pool_blocked_nesting_ > 0 || pc_offset() < no_const_pool_before_) {
|
1960
|
+
// Emission is currently blocked; make sure we try again as soon as
|
1961
|
+
// possible.
|
1962
|
+
if (const_pool_blocked_nesting_ > 0) {
|
1963
|
+
next_buffer_check_ = pc_offset() + kInstrSize;
|
1964
|
+
} else {
|
1965
|
+
next_buffer_check_ = no_const_pool_before_;
|
1966
|
+
}
|
1753
1967
|
|
1754
|
-
// Something is wrong if emission is forced and blocked at the same time
|
1968
|
+
// Something is wrong if emission is forced and blocked at the same time.
|
1755
1969
|
ASSERT(!force_emit);
|
1756
1970
|
return;
|
1757
1971
|
}
|
@@ -1765,23 +1979,23 @@ void Assembler::CheckConstPool(bool force_emit, bool require_jump) {
|
|
1765
1979
|
jump_instr + kInstrSize + num_prinfo_*(kInstrSize + kMaxRelocSize);
|
1766
1980
|
while (buffer_space() <= (max_needed_space + kGap)) GrowBuffer();
|
1767
1981
|
|
1768
|
-
// Block recursive calls to CheckConstPool
|
1982
|
+
// Block recursive calls to CheckConstPool.
|
1769
1983
|
BlockConstPoolBefore(pc_offset() + jump_instr + kInstrSize +
|
1770
1984
|
num_prinfo_*kInstrSize);
|
1771
1985
|
// Don't bother to check for the emit calls below.
|
1772
1986
|
next_buffer_check_ = no_const_pool_before_;
|
1773
1987
|
|
1774
|
-
// Emit jump over constant pool if necessary
|
1988
|
+
// Emit jump over constant pool if necessary.
|
1775
1989
|
Label after_pool;
|
1776
1990
|
if (require_jump) b(&after_pool);
|
1777
1991
|
|
1778
1992
|
RecordComment("[ Constant Pool");
|
1779
1993
|
|
1780
|
-
// Put down constant pool marker
|
1781
|
-
//
|
1994
|
+
// Put down constant pool marker "Undefined instruction" as specified by
|
1995
|
+
// A3.1 Instruction set encoding.
|
1782
1996
|
emit(0x03000000 | num_prinfo_);
|
1783
1997
|
|
1784
|
-
// Emit constant pool entries
|
1998
|
+
// Emit constant pool entries.
|
1785
1999
|
for (int i = 0; i < num_prinfo_; i++) {
|
1786
2000
|
RelocInfo& rinfo = prinfo_[i];
|
1787
2001
|
ASSERT(rinfo.rmode() != RelocInfo::COMMENT &&
|
@@ -1789,8 +2003,8 @@ void Assembler::CheckConstPool(bool force_emit, bool require_jump) {
|
|
1789
2003
|
rinfo.rmode() != RelocInfo::STATEMENT_POSITION);
|
1790
2004
|
Instr instr = instr_at(rinfo.pc());
|
1791
2005
|
|
1792
|
-
// Instruction to patch must be a ldr/str [pc, #offset]
|
1793
|
-
// P and U set, B and W clear, Rn == pc, offset12 still 0
|
2006
|
+
// Instruction to patch must be a ldr/str [pc, #offset].
|
2007
|
+
// P and U set, B and W clear, Rn == pc, offset12 still 0.
|
1794
2008
|
ASSERT((instr & (7*B25 | P | U | B | W | 15*B16 | Off12Mask)) ==
|
1795
2009
|
(2*B25 | P | U | pc.code()*B16));
|
1796
2010
|
int delta = pc_ - rinfo.pc() - 8;
|