therubyracer 0.6.3 → 0.7.0.pre
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of therubyracer might be problematic. Click here for more details.
- data/Rakefile +10 -9
- data/ext/v8/callbacks.cpp +15 -8
- data/ext/v8/converters.cpp +7 -8
- data/ext/v8/converters.h +0 -2
- data/ext/v8/extconf.rb +2 -0
- data/ext/v8/rr.cpp +169 -0
- data/ext/v8/rr.h +34 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/AUTHORS +8 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/ChangeLog +198 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/LICENSE +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/SConstruct +152 -38
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/include/v8-debug.h +52 -4
- data/ext/v8/upstream/2.1.10/include/v8-profiler.h +176 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/include/v8.h +227 -48
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/SConscript +60 -10
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/accessors.cc +5 -39
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/accessors.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/allocation.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/allocation.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/api.cc +477 -57
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/api.h +8 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/apinatives.js +1 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/apiutils.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arguments.h +5 -6
- data/ext/v8/upstream/{2.0.6/src/arm/assembler-thumb2-inl.h → 2.1.10/src/arm/assembler-arm-inl.h} +42 -27
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/assembler-arm.cc +430 -216
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/assembler-arm.h +199 -110
- data/ext/v8/upstream/{2.0.6/src/arm/assembler-arm-inl.h → 2.1.10/src/arm/assembler-thumb2-inl.h} +4 -18
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/assembler-thumb2.cc +142 -85
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/assembler-thumb2.h +18 -9
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/builtins-arm.cc +127 -87
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/codegen-arm-inl.h +3 -5
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/codegen-arm.cc +4634 -1427
- data/ext/v8/upstream/2.1.10/src/arm/codegen-arm.h +946 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/constants-arm.cc +21 -3
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/constants-arm.h +39 -13
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/cpu-arm.cc +9 -3
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/debug-arm.cc +34 -8
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/disasm-arm.cc +262 -117
- data/ext/v8/upstream/2.1.10/src/arm/fast-codegen-arm.cc +238 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/frames-arm.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/frames-arm.h +0 -0
- data/ext/v8/upstream/{2.0.6/src/arm/fast-codegen-arm.cc → 2.1.10/src/arm/full-codegen-arm.cc} +453 -283
- data/ext/v8/upstream/2.1.10/src/arm/ic-arm.cc +1833 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/jump-target-arm.cc +3 -29
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/macro-assembler-arm.cc +564 -104
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/macro-assembler-arm.h +255 -46
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/regexp-macro-assembler-arm.cc +78 -104
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/regexp-macro-assembler-arm.h +6 -22
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/register-allocator-arm-inl.h +0 -3
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/register-allocator-arm.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/register-allocator-arm.h +2 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/simulator-arm.cc +557 -180
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/simulator-arm.h +52 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/stub-cache-arm.cc +904 -240
- data/ext/v8/upstream/2.1.10/src/arm/virtual-frame-arm.cc +668 -0
- data/ext/v8/upstream/2.1.10/src/arm/virtual-frame-arm.h +503 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/array.js +82 -109
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/assembler.cc +49 -13
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/assembler.h +27 -5
- data/ext/v8/upstream/2.1.10/src/ast.cc +1138 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ast.h +354 -53
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/bootstrapper.cc +609 -501
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/bootstrapper.h +27 -8
- data/ext/v8/upstream/2.1.10/src/builtins.cc +1512 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/builtins.h +41 -25
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/bytecodes-irregexp.h +0 -0
- data/ext/v8/upstream/2.1.10/src/cached-powers.h +119 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/char-predicates-inl.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/char-predicates.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/checks.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/checks.h +25 -1
- data/ext/v8/upstream/2.1.10/src/circular-queue-inl.h +101 -0
- data/ext/v8/upstream/2.1.10/src/circular-queue.cc +121 -0
- data/ext/v8/upstream/2.1.10/src/circular-queue.h +129 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/code-stubs.cc +23 -8
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/code-stubs.h +16 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/code.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/codegen-inl.h +6 -34
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/codegen.cc +73 -92
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/codegen.h +164 -68
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/compilation-cache.cc +117 -73
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/compilation-cache.h +18 -17
- data/ext/v8/upstream/2.1.10/src/compiler.cc +623 -0
- data/ext/v8/upstream/2.1.10/src/compiler.h +299 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/contexts.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/contexts.h +8 -11
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/conversions-inl.h +28 -13
- data/ext/v8/upstream/2.1.10/src/conversions.cc +1105 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/conversions.h +9 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/counters.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/counters.h +1 -1
- data/ext/v8/upstream/2.1.10/src/cpu-profiler-inl.h +99 -0
- data/ext/v8/upstream/2.1.10/src/cpu-profiler.cc +494 -0
- data/ext/v8/upstream/2.1.10/src/cpu-profiler.h +277 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/cpu.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8-debug.cc +15 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8-debug.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8-posix.cc +18 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8-readline.cc +2 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8-windows.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8.cc +10 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8.h +2 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8.js +43 -38
- data/ext/v8/upstream/2.1.10/src/data-flow.cc +755 -0
- data/ext/v8/upstream/2.1.10/src/data-flow.h +278 -0
- data/ext/v8/upstream/{2.0.6/src/date-delay.js → 2.1.10/src/date.js} +100 -110
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/dateparser-inl.h +11 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/dateparser.cc +24 -26
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/dateparser.h +8 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/debug-agent.cc +3 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/debug-agent.h +0 -0
- data/ext/v8/upstream/{2.0.6/src/debug-delay.js → 2.1.10/src/debug-debugger.js} +111 -15
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/debug.cc +156 -96
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/debug.h +53 -5
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/disasm.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/disassembler.cc +2 -8
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/disassembler.h +0 -0
- data/ext/v8/upstream/2.1.10/src/diy-fp.cc +58 -0
- data/ext/v8/upstream/2.1.10/src/diy-fp.h +117 -0
- data/ext/v8/upstream/2.1.10/src/double.h +169 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/dtoa-config.c +4 -3
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/execution.cc +22 -22
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/execution.h +17 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/factory.cc +70 -46
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/factory.h +27 -17
- data/ext/v8/upstream/2.1.10/src/fast-codegen.cc +746 -0
- data/ext/v8/upstream/2.1.10/src/fast-codegen.h +161 -0
- data/ext/v8/upstream/2.1.10/src/fast-dtoa.cc +512 -0
- data/ext/v8/upstream/2.1.10/src/fast-dtoa.h +59 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/flag-definitions.h +32 -11
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/flags.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/flags.h +0 -0
- data/ext/v8/upstream/2.1.10/src/flow-graph.cc +763 -0
- data/ext/v8/upstream/2.1.10/src/flow-graph.h +180 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/frame-element.cc +1 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/frame-element.h +49 -11
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/frames-inl.h +2 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/frames.cc +91 -17
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/frames.h +24 -2
- data/ext/v8/upstream/{2.0.6/src/fast-codegen.cc → 2.1.10/src/full-codegen.cc} +549 -198
- data/ext/v8/upstream/{2.0.6/src/fast-codegen.h → 2.1.10/src/full-codegen.h} +109 -29
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/func-name-inferrer.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/func-name-inferrer.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/global-handles.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/global-handles.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/globals.h +67 -43
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/handles-inl.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/handles.cc +124 -129
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/handles.h +33 -15
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/hashmap.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/hashmap.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/heap-inl.h +56 -12
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/heap-profiler.cc +2 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/heap-profiler.h +2 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/heap.cc +413 -221
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/heap.h +192 -67
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/assembler-ia32-inl.h +6 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/assembler-ia32.cc +187 -32
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/assembler-ia32.h +31 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/builtins-ia32.cc +160 -133
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/codegen-ia32-inl.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/codegen-ia32.cc +5533 -2177
- data/ext/v8/upstream/{2.0.6/src/x64/codegen-x64.h → 2.1.10/src/ia32/codegen-ia32.h} +453 -134
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/cpu-ia32.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/debug-ia32.cc +63 -8
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/disasm-ia32.cc +99 -16
- data/ext/v8/upstream/2.1.10/src/ia32/fast-codegen-ia32.cc +950 -0
- data/ext/v8/upstream/2.1.10/src/ia32/fast-codegen-ia32.h +155 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/frames-ia32.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/frames-ia32.h +0 -0
- data/ext/v8/upstream/{2.0.6/src/ia32/fast-codegen-ia32.cc → 2.1.10/src/ia32/full-codegen-ia32.cc} +454 -253
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/ic-ia32.cc +545 -390
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/jump-target-ia32.cc +1 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/macro-assembler-ia32.cc +330 -139
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/macro-assembler-ia32.h +96 -30
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/regexp-macro-assembler-ia32.cc +73 -89
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/regexp-macro-assembler-ia32.h +6 -21
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/register-allocator-ia32-inl.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/register-allocator-ia32.cc +59 -5
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/register-allocator-ia32.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/simulator-ia32.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/simulator-ia32.h +2 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/stub-cache-ia32.cc +745 -303
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/virtual-frame-ia32.cc +278 -71
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/virtual-frame-ia32.h +78 -22
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ic-inl.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ic.cc +172 -89
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ic.h +51 -20
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/interpreter-irregexp.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/interpreter-irregexp.h +0 -0
- data/ext/v8/upstream/{2.0.6/src/json-delay.js → 2.1.10/src/json.js} +26 -12
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/jsregexp.cc +151 -118
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/jsregexp.h +31 -7
- data/ext/v8/upstream/2.1.10/src/jump-target-heavy-inl.h +51 -0
- data/ext/v8/upstream/{2.0.6/src/jump-target.cc → 2.1.10/src/jump-target-heavy.cc} +164 -184
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/jump-target-inl.h +8 -9
- data/ext/v8/upstream/{2.0.6/src/usage-analyzer.h → 2.1.10/src/jump-target-light-inl.h} +9 -7
- data/ext/v8/upstream/2.1.10/src/jump-target-light.cc +86 -0
- data/ext/v8/upstream/2.1.10/src/jump-target.cc +155 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/jump-target.h +6 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/list-inl.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/list.h +2 -1
- data/ext/v8/upstream/2.1.10/src/liveedit-debugger.js +944 -0
- data/ext/v8/upstream/2.1.10/src/liveedit.cc +1468 -0
- data/ext/v8/upstream/2.1.10/src/liveedit.h +170 -0
- data/ext/v8/upstream/2.1.10/src/log-inl.h +59 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/log-utils.cc +3 -9
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/log-utils.h +1 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/log.cc +198 -95
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/log.h +50 -49
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/macro-assembler.h +9 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/macros.py +30 -11
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/mark-compact.cc +464 -152
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/mark-compact.h +41 -20
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/math.js +9 -8
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/memory.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/messages.cc +1 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/messages.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/messages.js +46 -9
- data/ext/v8/upstream/2.1.10/src/mips/assembler-mips-inl.h +215 -0
- data/ext/v8/upstream/2.1.10/src/mips/assembler-mips.cc +1208 -0
- data/ext/v8/upstream/2.1.10/src/mips/assembler-mips.h +665 -0
- data/ext/v8/upstream/2.1.10/src/mips/builtins-mips.cc +202 -0
- data/ext/v8/upstream/2.1.10/src/mips/codegen-mips-inl.h +70 -0
- data/ext/v8/upstream/2.1.10/src/mips/codegen-mips.cc +1428 -0
- data/ext/v8/upstream/{2.0.6/src/arm/codegen-arm.h → 2.1.10/src/mips/codegen-mips.h} +103 -205
- data/ext/v8/upstream/2.1.10/src/mips/constants-mips.cc +323 -0
- data/ext/v8/upstream/2.1.10/src/mips/constants-mips.h +525 -0
- data/ext/v8/upstream/2.1.10/src/mips/cpu-mips.cc +69 -0
- data/ext/v8/upstream/2.1.10/src/mips/debug-mips.cc +128 -0
- data/ext/v8/upstream/2.1.10/src/mips/disasm-mips.cc +784 -0
- data/ext/v8/upstream/2.1.10/src/mips/fast-codegen-mips.cc +74 -0
- data/ext/v8/upstream/2.1.10/src/mips/frames-mips.cc +99 -0
- data/ext/v8/upstream/2.1.10/src/mips/frames-mips.h +164 -0
- data/ext/v8/upstream/2.1.10/src/mips/full-codegen-mips.cc +273 -0
- data/ext/v8/upstream/2.1.10/src/mips/ic-mips.cc +217 -0
- data/ext/v8/upstream/2.1.10/src/mips/jump-target-mips.cc +172 -0
- data/ext/v8/upstream/2.1.10/src/mips/macro-assembler-mips.cc +1323 -0
- data/ext/v8/upstream/2.1.10/src/mips/macro-assembler-mips.h +461 -0
- data/ext/v8/upstream/2.1.10/src/mips/register-allocator-mips-inl.h +137 -0
- data/ext/v8/upstream/2.1.10/src/mips/register-allocator-mips.cc +60 -0
- data/ext/v8/upstream/2.1.10/src/mips/register-allocator-mips.h +46 -0
- data/ext/v8/upstream/2.1.10/src/mips/simulator-mips.cc +1648 -0
- data/ext/v8/upstream/2.1.10/src/mips/simulator-mips.h +311 -0
- data/ext/v8/upstream/2.1.10/src/mips/stub-cache-mips.cc +400 -0
- data/ext/v8/upstream/2.1.10/src/mips/virtual-frame-mips.cc +316 -0
- data/ext/v8/upstream/{2.0.6/src/arm/virtual-frame-arm.h → 2.1.10/src/mips/virtual-frame-mips.h} +87 -71
- data/ext/v8/upstream/{2.0.6/src/mirror-delay.js → 2.1.10/src/mirror-debugger.js} +51 -45
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/mksnapshot.cc +97 -10
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/natives.h +6 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/objects-debug.cc +47 -5
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/objects-inl.h +154 -38
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/objects.cc +528 -280
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/objects.h +302 -95
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/oprofile-agent.cc +25 -33
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/oprofile-agent.h +9 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/parser.cc +444 -72
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/parser.h +4 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform-freebsd.cc +32 -13
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform-linux.cc +59 -25
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform-macos.cc +30 -13
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform-nullos.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform-openbsd.cc +21 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform-posix.cc +0 -18
- data/ext/v8/upstream/2.1.10/src/platform-solaris.cc +607 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform-win32.cc +16 -17
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform.h +25 -8
- data/ext/v8/upstream/2.1.10/src/powers-ten.h +2461 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/prettyprinter.cc +49 -29
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/prettyprinter.h +3 -1
- data/ext/v8/upstream/2.1.10/src/profile-generator-inl.h +124 -0
- data/ext/v8/upstream/2.1.10/src/profile-generator.cc +583 -0
- data/ext/v8/upstream/2.1.10/src/profile-generator.h +364 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/property.cc +1 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/property.h +12 -24
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-macro-assembler-irregexp-inl.h +2 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-macro-assembler-irregexp.cc +2 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-macro-assembler-irregexp.h +2 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-macro-assembler-tracer.cc +2 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-macro-assembler-tracer.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-macro-assembler.cc +33 -10
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-macro-assembler.h +12 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-stack.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-stack.h +0 -0
- data/ext/v8/upstream/{2.0.6/src/regexp-delay.js → 2.1.10/src/regexp.js} +180 -58
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/register-allocator-inl.h +68 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/register-allocator.cc +5 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/register-allocator.h +42 -17
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/rewriter.cc +110 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/rewriter.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/runtime.cc +2733 -623
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/runtime.h +43 -20
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/runtime.js +46 -35
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/scanner.cc +278 -36
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/scanner.h +97 -26
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/scopeinfo.cc +3 -3
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/scopeinfo.h +1 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/scopes.cc +11 -12
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/scopes.h +0 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/serialize.cc +298 -175
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/serialize.h +184 -40
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/shell.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/simulator.h +2 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/smart-pointer.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/snapshot-common.cc +16 -31
- data/ext/v8/upstream/2.1.10/src/snapshot-empty.cc +50 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/snapshot.h +13 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/spaces-inl.h +35 -27
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/spaces.cc +256 -42
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/spaces.h +136 -42
- data/ext/v8/upstream/{2.0.6/src/zone-inl.h → 2.1.10/src/splay-tree-inl.h} +102 -89
- data/ext/v8/upstream/2.1.10/src/splay-tree.h +203 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/string-stream.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/string-stream.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/string.js +260 -149
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/stub-cache.cc +195 -69
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/stub-cache.h +127 -12
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/third_party/dtoa/COPYING +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/third_party/dtoa/dtoa.c +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/third_party/valgrind/valgrind.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/token.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/token.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/top.cc +26 -31
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/top.h +3 -4
- data/ext/v8/upstream/2.1.10/src/type-info.cc +53 -0
- data/ext/v8/upstream/2.1.10/src/type-info.h +244 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/unicode-inl.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/unicode.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/unicode.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/uri.js +6 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/utils.cc +0 -37
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/utils.h +121 -50
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/v8-counters.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/v8-counters.h +130 -98
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/v8.cc +42 -11
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/v8.h +4 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/v8natives.js +202 -37
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/v8threads.cc +11 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/v8threads.h +15 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/variables.cc +7 -51
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/variables.h +5 -35
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/version.cc +3 -3
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/version.h +0 -0
- data/ext/v8/upstream/2.1.10/src/virtual-frame-heavy-inl.h +152 -0
- data/ext/v8/upstream/{2.0.6/src/virtual-frame.cc → 2.1.10/src/virtual-frame-heavy.cc} +107 -176
- data/ext/v8/upstream/2.1.10/src/virtual-frame-inl.h +39 -0
- data/ext/v8/upstream/2.1.10/src/virtual-frame-light-inl.h +69 -0
- data/ext/v8/upstream/2.1.10/src/virtual-frame-light.cc +49 -0
- data/ext/v8/upstream/2.1.10/src/virtual-frame.cc +49 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/virtual-frame.h +2 -0
- data/ext/v8/upstream/{2.0.6/src/log-inl.h → 2.1.10/src/vm-state-inl.h} +28 -20
- data/ext/v8/upstream/{2.0.6/src/snapshot-empty.cc → 2.1.10/src/vm-state.cc} +5 -6
- data/ext/v8/upstream/2.1.10/src/vm-state.h +75 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/assembler-x64-inl.h +11 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/assembler-x64.cc +285 -93
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/assembler-x64.h +81 -78
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/builtins-x64.cc +130 -87
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/codegen-x64-inl.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/codegen-x64.cc +4520 -1317
- data/ext/v8/upstream/{2.0.6/src/ia32/codegen-ia32.h → 2.1.10/src/x64/codegen-x64.h} +362 -141
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/cpu-x64.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/debug-x64.cc +20 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/disasm-x64.cc +121 -44
- data/ext/v8/upstream/2.1.10/src/x64/fast-codegen-x64.cc +246 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/frames-x64.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/frames-x64.h +0 -0
- data/ext/v8/upstream/{2.0.6/src/x64/fast-codegen-x64.cc → 2.1.10/src/x64/full-codegen-x64.cc} +404 -231
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/ic-x64.cc +346 -117
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/jump-target-x64.cc +1 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/macro-assembler-x64.cc +537 -181
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/macro-assembler-x64.h +140 -34
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/regexp-macro-assembler-x64.cc +74 -96
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/regexp-macro-assembler-x64.h +8 -25
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/register-allocator-x64-inl.h +1 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/register-allocator-x64.cc +3 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/register-allocator-x64.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/simulator-x64.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/simulator-x64.h +2 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/stub-cache-x64.cc +785 -288
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/virtual-frame-x64.cc +128 -52
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/virtual-frame-x64.h +40 -19
- data/ext/v8/upstream/2.1.10/src/zone-inl.h +82 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/zone.cc +1 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/zone.h +6 -90
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/codemap.js +12 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/consarray.js +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/csvparser.js +22 -37
- data/ext/v8/upstream/2.1.10/tools/generate-ten-powers.scm +286 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/gyp/v8.gyp +86 -24
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/js2c.py +22 -22
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/jsmin.py +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/linux-tick-processor +10 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/linux-tick-processor.py +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/logreader.js +34 -16
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/mac-nm +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/mac-tick-processor +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/annotate +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/common +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/dump +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/report +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/reset +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/run +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/shutdown +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/start +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/presubmit.py +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/process-heap-prof.py +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/profile.js +70 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/profile_view.js +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/run-valgrind.py +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/splaytree.js +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/splaytree.py +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/stats-viewer.py +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/test.py +7 -7
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/tickprocessor-driver.js +7 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/tickprocessor.js +140 -9
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/tickprocessor.py +40 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/utils.py +6 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/README.txt +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/arm.vsprops +1 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/common.vsprops +1 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/d8.vcproj +0 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/d8_arm.vcproj +193 -199
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/d8_x64.vcproj +16 -8
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/d8js2c.cmd +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/debug.vsprops +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/ia32.vsprops +5 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/js2c.cmd +1 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/release.vsprops +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8.sln +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8.vcproj +11 -7
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_arm.sln +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_arm.vcproj +227 -223
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_base.vcproj +137 -5
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_base_arm.vcproj +116 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_base_x64.vcproj +125 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_cctest.vcproj +12 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_cctest_arm.vcproj +12 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_cctest_x64.vcproj +11 -11
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_mksnapshot.vcproj +0 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_mksnapshot_x64.vcproj +0 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_process_sample.vcproj +0 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_process_sample_arm.vcproj +145 -151
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_process_sample_x64.vcproj +16 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_shell_sample.vcproj +0 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_shell_sample_arm.vcproj +145 -151
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_shell_sample_x64.vcproj +16 -8
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_snapshot.vcproj +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_snapshot_cc.vcproj +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_snapshot_cc_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_snapshot_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_x64.sln +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_x64.vcproj +11 -7
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/x64.vsprops +5 -1
- data/ext/v8/upstream/2.1.10/tools/windows-tick-processor.bat +29 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/windows-tick-processor.py +0 -0
- data/ext/v8/upstream/Makefile +8 -2
- data/ext/v8/v8.cpp +21 -73
- data/ext/v8/v8_array.cpp +56 -0
- data/ext/v8/v8_array.h +8 -0
- data/ext/v8/v8_callbacks.cpp +121 -0
- data/ext/v8/v8_callbacks.h +8 -0
- data/ext/v8/v8_cxt.cpp +74 -77
- data/ext/v8/v8_cxt.h +2 -9
- data/ext/v8/v8_date.cpp +26 -0
- data/ext/v8/v8_date.h +6 -0
- data/ext/v8/v8_exception.cpp +55 -0
- data/ext/v8/v8_exception.h +6 -0
- data/ext/v8/v8_external.cpp +50 -0
- data/ext/v8/v8_external.h +8 -0
- data/ext/v8/v8_func.cpp +76 -18
- data/ext/v8/v8_func.h +5 -4
- data/ext/v8/v8_msg.cpp +55 -46
- data/ext/v8/v8_msg.h +3 -11
- data/ext/v8/v8_obj.cpp +67 -36
- data/ext/v8/v8_obj.h +6 -8
- data/ext/v8/v8_ref.cpp +25 -9
- data/ext/v8/v8_ref.h +3 -5
- data/ext/v8/v8_script.cpp +17 -10
- data/ext/v8/v8_script.h +3 -3
- data/ext/v8/v8_str.cpp +34 -6
- data/ext/v8/v8_str.h +4 -2
- data/ext/v8/v8_template.cpp +195 -33
- data/ext/v8/v8_template.h +4 -5
- data/ext/v8/v8_try_catch.cpp +99 -0
- data/ext/v8/v8_try_catch.h +5 -0
- data/ext/v8/v8_value.cpp +164 -0
- data/ext/v8/v8_value.h +10 -0
- data/lib/v8.rb +3 -1
- data/lib/v8/access.rb +60 -0
- data/lib/v8/array.rb +15 -0
- data/lib/v8/callbacks.rb +88 -0
- data/lib/v8/cli.rb +1 -1
- data/lib/v8/context.rb +55 -66
- data/lib/v8/function.rb +20 -2
- data/lib/v8/object.rb +14 -12
- data/lib/v8/ruby_error.rb +3 -0
- data/lib/v8/to.rb +59 -7
- data/spec/ext/cxt_spec.rb +2 -15
- data/spec/ext/func_spec.rb +17 -10
- data/spec/ext/try_catch_spec.rb +32 -0
- data/spec/foo.rb +17 -0
- data/spec/redjs/jsapi_spec.rb +173 -96
- data/spec/spec_helper.rb +7 -0
- data/spec/v8/to_spec.rb +0 -1
- data/therubyracer.gemspec +6 -6
- metadata +493 -386
- data/ext/v8/upstream/2.0.6/src/arm/ic-arm.cc +0 -849
- data/ext/v8/upstream/2.0.6/src/arm/virtual-frame-arm.cc +0 -412
- data/ext/v8/upstream/2.0.6/src/ast.cc +0 -512
- data/ext/v8/upstream/2.0.6/src/builtins.cc +0 -851
- data/ext/v8/upstream/2.0.6/src/compiler.cc +0 -1132
- data/ext/v8/upstream/2.0.6/src/compiler.h +0 -107
- data/ext/v8/upstream/2.0.6/src/conversions.cc +0 -709
- data/ext/v8/upstream/2.0.6/src/usage-analyzer.cc +0 -426
- data/ext/v8/upstream/2.0.6/tools/windows-tick-processor.bat +0 -5
- data/ext/v8/upstream/no-strict-aliasing.patch +0 -13
- data/ext/v8/v8_standalone.cpp +0 -69
- data/ext/v8/v8_standalone.h +0 -31
- data/spec/ext/obj_spec.rb +0 -13
@@ -0,0 +1,69 @@
|
|
1
|
+
// Copyright 2010 the V8 project authors. All rights reserved.
|
2
|
+
// Redistribution and use in source and binary forms, with or without
|
3
|
+
// modification, are permitted provided that the following conditions are
|
4
|
+
// met:
|
5
|
+
//
|
6
|
+
// * Redistributions of source code must retain the above copyright
|
7
|
+
// notice, this list of conditions and the following disclaimer.
|
8
|
+
// * Redistributions in binary form must reproduce the above
|
9
|
+
// copyright notice, this list of conditions and the following
|
10
|
+
// disclaimer in the documentation and/or other materials provided
|
11
|
+
// with the distribution.
|
12
|
+
// * Neither the name of Google Inc. nor the names of its
|
13
|
+
// contributors may be used to endorse or promote products derived
|
14
|
+
// from this software without specific prior written permission.
|
15
|
+
//
|
16
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
17
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
18
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
19
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
20
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
21
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
22
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
24
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
25
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
26
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
+
|
28
|
+
// CPU specific code for arm independent of OS goes here.
|
29
|
+
|
30
|
+
#include <sys/syscall.h>
|
31
|
+
#include <unistd.h>
|
32
|
+
|
33
|
+
#ifdef __mips
|
34
|
+
#include <asm/cachectl.h>
|
35
|
+
#endif // #ifdef __mips
|
36
|
+
|
37
|
+
#include "v8.h"
|
38
|
+
#include "cpu.h"
|
39
|
+
|
40
|
+
namespace v8 {
|
41
|
+
namespace internal {
|
42
|
+
|
43
|
+
void CPU::Setup() {
|
44
|
+
// Nothing to do.
|
45
|
+
}
|
46
|
+
|
47
|
+
void CPU::FlushICache(void* start, size_t size) {
|
48
|
+
#ifdef __mips
|
49
|
+
int res;
|
50
|
+
|
51
|
+
// See http://www.linux-mips.org/wiki/Cacheflush_Syscall
|
52
|
+
res = syscall(__NR_cacheflush, start, size, ICACHE);
|
53
|
+
|
54
|
+
if (res) {
|
55
|
+
V8_Fatal(__FILE__, __LINE__, "Failed to flush the instruction cache");
|
56
|
+
}
|
57
|
+
|
58
|
+
#endif // #ifdef __mips
|
59
|
+
}
|
60
|
+
|
61
|
+
|
62
|
+
void CPU::DebugBreak() {
|
63
|
+
#ifdef __mips
|
64
|
+
asm volatile("break");
|
65
|
+
#endif // #ifdef __mips
|
66
|
+
}
|
67
|
+
|
68
|
+
} } // namespace v8::internal
|
69
|
+
|
@@ -0,0 +1,128 @@
|
|
1
|
+
// Copyright 2010 the V8 project authors. All rights reserved.
|
2
|
+
// Redistribution and use in source and binary forms, with or without
|
3
|
+
// modification, are permitted provided that the following conditions are
|
4
|
+
// met:
|
5
|
+
//
|
6
|
+
// * Redistributions of source code must retain the above copyright
|
7
|
+
// notice, this list of conditions and the following disclaimer.
|
8
|
+
// * Redistributions in binary form must reproduce the above
|
9
|
+
// copyright notice, this list of conditions and the following
|
10
|
+
// disclaimer in the documentation and/or other materials provided
|
11
|
+
// with the distribution.
|
12
|
+
// * Neither the name of Google Inc. nor the names of its
|
13
|
+
// contributors may be used to endorse or promote products derived
|
14
|
+
// from this software without specific prior written permission.
|
15
|
+
//
|
16
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
17
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
18
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
19
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
20
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
21
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
22
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
24
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
25
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
26
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
#include "v8.h"
|
31
|
+
|
32
|
+
#include "codegen-inl.h"
|
33
|
+
#include "debug.h"
|
34
|
+
|
35
|
+
namespace v8 {
|
36
|
+
namespace internal {
|
37
|
+
|
38
|
+
#ifdef ENABLE_DEBUGGER_SUPPORT
|
39
|
+
bool BreakLocationIterator::IsDebugBreakAtReturn() {
|
40
|
+
return Debug::IsDebugBreakAtReturn(rinfo());
|
41
|
+
}
|
42
|
+
|
43
|
+
|
44
|
+
void BreakLocationIterator::SetDebugBreakAtReturn() {
|
45
|
+
UNIMPLEMENTED_MIPS();
|
46
|
+
}
|
47
|
+
|
48
|
+
|
49
|
+
// Restore the JS frame exit code.
|
50
|
+
void BreakLocationIterator::ClearDebugBreakAtReturn() {
|
51
|
+
UNIMPLEMENTED_MIPS();
|
52
|
+
}
|
53
|
+
|
54
|
+
|
55
|
+
// A debug break in the exit code is identified by a call.
|
56
|
+
bool Debug::IsDebugBreakAtReturn(RelocInfo* rinfo) {
|
57
|
+
ASSERT(RelocInfo::IsJSReturn(rinfo->rmode()));
|
58
|
+
return rinfo->IsPatchedReturnSequence();
|
59
|
+
}
|
60
|
+
|
61
|
+
|
62
|
+
#define __ ACCESS_MASM(masm)
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
void Debug::GenerateLoadICDebugBreak(MacroAssembler* masm) {
|
68
|
+
UNIMPLEMENTED_MIPS();
|
69
|
+
}
|
70
|
+
|
71
|
+
|
72
|
+
void Debug::GenerateStoreICDebugBreak(MacroAssembler* masm) {
|
73
|
+
UNIMPLEMENTED_MIPS();
|
74
|
+
}
|
75
|
+
|
76
|
+
|
77
|
+
void Debug::GenerateKeyedLoadICDebugBreak(MacroAssembler* masm) {
|
78
|
+
UNIMPLEMENTED_MIPS();
|
79
|
+
}
|
80
|
+
|
81
|
+
|
82
|
+
void Debug::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) {
|
83
|
+
UNIMPLEMENTED_MIPS();
|
84
|
+
}
|
85
|
+
|
86
|
+
|
87
|
+
void Debug::GenerateCallICDebugBreak(MacroAssembler* masm) {
|
88
|
+
UNIMPLEMENTED_MIPS();
|
89
|
+
}
|
90
|
+
|
91
|
+
|
92
|
+
void Debug::GenerateConstructCallDebugBreak(MacroAssembler* masm) {
|
93
|
+
UNIMPLEMENTED_MIPS();
|
94
|
+
}
|
95
|
+
|
96
|
+
|
97
|
+
void Debug::GenerateReturnDebugBreak(MacroAssembler* masm) {
|
98
|
+
UNIMPLEMENTED_MIPS();
|
99
|
+
}
|
100
|
+
|
101
|
+
|
102
|
+
void Debug::GenerateStubNoRegistersDebugBreak(MacroAssembler* masm) {
|
103
|
+
UNIMPLEMENTED_MIPS();
|
104
|
+
}
|
105
|
+
|
106
|
+
|
107
|
+
void Debug::GeneratePlainReturnLiveEdit(MacroAssembler* masm) {
|
108
|
+
masm->Abort("LiveEdit frame dropping is not supported on mips");
|
109
|
+
}
|
110
|
+
|
111
|
+
void Debug::GenerateFrameDropperLiveEdit(MacroAssembler* masm) {
|
112
|
+
masm->Abort("LiveEdit frame dropping is not supported on mips");
|
113
|
+
}
|
114
|
+
|
115
|
+
#undef __
|
116
|
+
|
117
|
+
|
118
|
+
void Debug::SetUpFrameDropperFrame(StackFrame* bottom_js_frame,
|
119
|
+
Handle<Code> code) {
|
120
|
+
UNREACHABLE();
|
121
|
+
}
|
122
|
+
const int Debug::kFrameDropperFrameSize = -1;
|
123
|
+
|
124
|
+
|
125
|
+
#endif // ENABLE_DEBUGGER_SUPPORT
|
126
|
+
|
127
|
+
} } // namespace v8::internal
|
128
|
+
|
@@ -0,0 +1,784 @@
|
|
1
|
+
// Copyright 2010 the V8 project authors. All rights reserved.
|
2
|
+
// Redistribution and use in source and binary forms, with or without
|
3
|
+
// modification, are permitted provided that the following conditions are
|
4
|
+
// met:
|
5
|
+
//
|
6
|
+
// * Redistributions of source code must retain the above copyright
|
7
|
+
// notice, this list of conditions and the following disclaimer.
|
8
|
+
// * Redistributions in binary form must reproduce the above
|
9
|
+
// copyright notice, this list of conditions and the following
|
10
|
+
// disclaimer in the documentation and/or other materials provided
|
11
|
+
// with the distribution.
|
12
|
+
// * Neither the name of Google Inc. nor the names of its
|
13
|
+
// contributors may be used to endorse or promote products derived
|
14
|
+
// from this software without specific prior written permission.
|
15
|
+
//
|
16
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
17
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
18
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
19
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
20
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
21
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
22
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
24
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
25
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
26
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
+
|
28
|
+
// A Disassembler object is used to disassemble a block of code instruction by
|
29
|
+
// instruction. The default implementation of the NameConverter object can be
|
30
|
+
// overriden to modify register names or to do symbol lookup on addresses.
|
31
|
+
//
|
32
|
+
// The example below will disassemble a block of code and print it to stdout.
|
33
|
+
//
|
34
|
+
// NameConverter converter;
|
35
|
+
// Disassembler d(converter);
|
36
|
+
// for (byte_* pc = begin; pc < end;) {
|
37
|
+
// char buffer[128];
|
38
|
+
// buffer[0] = '\0';
|
39
|
+
// byte_* prev_pc = pc;
|
40
|
+
// pc += d.InstructionDecode(buffer, sizeof buffer, pc);
|
41
|
+
// printf("%p %08x %s\n",
|
42
|
+
// prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer);
|
43
|
+
// }
|
44
|
+
//
|
45
|
+
// The Disassembler class also has a convenience method to disassemble a block
|
46
|
+
// of code into a FILE*, meaning that the above functionality could also be
|
47
|
+
// achieved by just calling Disassembler::Disassemble(stdout, begin, end);
|
48
|
+
|
49
|
+
|
50
|
+
#include <assert.h>
|
51
|
+
#include <stdio.h>
|
52
|
+
#include <stdarg.h>
|
53
|
+
#include <string.h>
|
54
|
+
#ifndef WIN32
|
55
|
+
#include <stdint.h>
|
56
|
+
#endif
|
57
|
+
|
58
|
+
#include "v8.h"
|
59
|
+
|
60
|
+
#include "constants-mips.h"
|
61
|
+
#include "disasm.h"
|
62
|
+
#include "macro-assembler.h"
|
63
|
+
#include "platform.h"
|
64
|
+
|
65
|
+
namespace assembler {
|
66
|
+
namespace mips {
|
67
|
+
|
68
|
+
|
69
|
+
namespace v8i = v8::internal;
|
70
|
+
|
71
|
+
|
72
|
+
//------------------------------------------------------------------------------
|
73
|
+
|
74
|
+
// Decoder decodes and disassembles instructions into an output buffer.
|
75
|
+
// It uses the converter to convert register names and call destinations into
|
76
|
+
// more informative description.
|
77
|
+
class Decoder {
|
78
|
+
public:
|
79
|
+
Decoder(const disasm::NameConverter& converter,
|
80
|
+
v8::internal::Vector<char> out_buffer)
|
81
|
+
: converter_(converter),
|
82
|
+
out_buffer_(out_buffer),
|
83
|
+
out_buffer_pos_(0) {
|
84
|
+
out_buffer_[out_buffer_pos_] = '\0';
|
85
|
+
}
|
86
|
+
|
87
|
+
~Decoder() {}
|
88
|
+
|
89
|
+
// Writes one disassembled instruction into 'buffer' (0-terminated).
|
90
|
+
// Returns the length of the disassembled machine instruction in bytes.
|
91
|
+
int InstructionDecode(byte_* instruction);
|
92
|
+
|
93
|
+
private:
|
94
|
+
// Bottleneck functions to print into the out_buffer.
|
95
|
+
void PrintChar(const char ch);
|
96
|
+
void Print(const char* str);
|
97
|
+
|
98
|
+
// Printing of common values.
|
99
|
+
void PrintRegister(int reg);
|
100
|
+
void PrintCRegister(int creg);
|
101
|
+
void PrintRs(Instruction* instr);
|
102
|
+
void PrintRt(Instruction* instr);
|
103
|
+
void PrintRd(Instruction* instr);
|
104
|
+
void PrintFs(Instruction* instr);
|
105
|
+
void PrintFt(Instruction* instr);
|
106
|
+
void PrintFd(Instruction* instr);
|
107
|
+
void PrintSa(Instruction* instr);
|
108
|
+
void PrintFunction(Instruction* instr);
|
109
|
+
void PrintSecondaryField(Instruction* instr);
|
110
|
+
void PrintUImm16(Instruction* instr);
|
111
|
+
void PrintSImm16(Instruction* instr);
|
112
|
+
void PrintXImm16(Instruction* instr);
|
113
|
+
void PrintImm26(Instruction* instr);
|
114
|
+
void PrintCode(Instruction* instr); // For break and trap instructions.
|
115
|
+
// Printing of instruction name.
|
116
|
+
void PrintInstructionName(Instruction* instr);
|
117
|
+
|
118
|
+
// Handle formatting of instructions and their options.
|
119
|
+
int FormatRegister(Instruction* instr, const char* option);
|
120
|
+
int FormatCRegister(Instruction* instr, const char* option);
|
121
|
+
int FormatOption(Instruction* instr, const char* option);
|
122
|
+
void Format(Instruction* instr, const char* format);
|
123
|
+
void Unknown(Instruction* instr);
|
124
|
+
|
125
|
+
// Each of these functions decodes one particular instruction type.
|
126
|
+
void DecodeTypeRegister(Instruction* instr);
|
127
|
+
void DecodeTypeImmediate(Instruction* instr);
|
128
|
+
void DecodeTypeJump(Instruction* instr);
|
129
|
+
|
130
|
+
const disasm::NameConverter& converter_;
|
131
|
+
v8::internal::Vector<char> out_buffer_;
|
132
|
+
int out_buffer_pos_;
|
133
|
+
|
134
|
+
DISALLOW_COPY_AND_ASSIGN(Decoder);
|
135
|
+
};
|
136
|
+
|
137
|
+
|
138
|
+
// Support for assertions in the Decoder formatting functions.
|
139
|
+
#define STRING_STARTS_WITH(string, compare_string) \
|
140
|
+
(strncmp(string, compare_string, strlen(compare_string)) == 0)
|
141
|
+
|
142
|
+
|
143
|
+
// Append the ch to the output buffer.
|
144
|
+
void Decoder::PrintChar(const char ch) {
|
145
|
+
out_buffer_[out_buffer_pos_++] = ch;
|
146
|
+
}
|
147
|
+
|
148
|
+
|
149
|
+
// Append the str to the output buffer.
|
150
|
+
void Decoder::Print(const char* str) {
|
151
|
+
char cur = *str++;
|
152
|
+
while (cur != '\0' && (out_buffer_pos_ < (out_buffer_.length() - 1))) {
|
153
|
+
PrintChar(cur);
|
154
|
+
cur = *str++;
|
155
|
+
}
|
156
|
+
out_buffer_[out_buffer_pos_] = 0;
|
157
|
+
}
|
158
|
+
|
159
|
+
|
160
|
+
// Print the register name according to the active name converter.
|
161
|
+
void Decoder::PrintRegister(int reg) {
|
162
|
+
Print(converter_.NameOfCPURegister(reg));
|
163
|
+
}
|
164
|
+
|
165
|
+
|
166
|
+
void Decoder::PrintRs(Instruction* instr) {
|
167
|
+
int reg = instr->RsField();
|
168
|
+
PrintRegister(reg);
|
169
|
+
}
|
170
|
+
|
171
|
+
|
172
|
+
void Decoder::PrintRt(Instruction* instr) {
|
173
|
+
int reg = instr->RtField();
|
174
|
+
PrintRegister(reg);
|
175
|
+
}
|
176
|
+
|
177
|
+
|
178
|
+
void Decoder::PrintRd(Instruction* instr) {
|
179
|
+
int reg = instr->RdField();
|
180
|
+
PrintRegister(reg);
|
181
|
+
}
|
182
|
+
|
183
|
+
|
184
|
+
// Print the Cregister name according to the active name converter.
|
185
|
+
void Decoder::PrintCRegister(int creg) {
|
186
|
+
Print(converter_.NameOfXMMRegister(creg));
|
187
|
+
}
|
188
|
+
|
189
|
+
|
190
|
+
void Decoder::PrintFs(Instruction* instr) {
|
191
|
+
int creg = instr->RsField();
|
192
|
+
PrintCRegister(creg);
|
193
|
+
}
|
194
|
+
|
195
|
+
|
196
|
+
void Decoder::PrintFt(Instruction* instr) {
|
197
|
+
int creg = instr->RtField();
|
198
|
+
PrintCRegister(creg);
|
199
|
+
}
|
200
|
+
|
201
|
+
|
202
|
+
void Decoder::PrintFd(Instruction* instr) {
|
203
|
+
int creg = instr->RdField();
|
204
|
+
PrintCRegister(creg);
|
205
|
+
}
|
206
|
+
|
207
|
+
|
208
|
+
// Print the integer value of the sa field.
|
209
|
+
void Decoder::PrintSa(Instruction* instr) {
|
210
|
+
int sa = instr->SaField();
|
211
|
+
out_buffer_pos_ += v8i::OS::SNPrintF(out_buffer_ + out_buffer_pos_,
|
212
|
+
"%d", sa);
|
213
|
+
}
|
214
|
+
|
215
|
+
|
216
|
+
// Print 16-bit unsigned immediate value.
|
217
|
+
void Decoder::PrintUImm16(Instruction* instr) {
|
218
|
+
int32_t imm = instr->Imm16Field();
|
219
|
+
out_buffer_pos_ += v8i::OS::SNPrintF(out_buffer_ + out_buffer_pos_,
|
220
|
+
"%u", imm);
|
221
|
+
}
|
222
|
+
|
223
|
+
|
224
|
+
// Print 16-bit signed immediate value.
|
225
|
+
void Decoder::PrintSImm16(Instruction* instr) {
|
226
|
+
int32_t imm = ((instr->Imm16Field())<<16)>>16;
|
227
|
+
out_buffer_pos_ += v8i::OS::SNPrintF(out_buffer_ + out_buffer_pos_,
|
228
|
+
"%d", imm);
|
229
|
+
}
|
230
|
+
|
231
|
+
|
232
|
+
// Print 16-bit hexa immediate value.
|
233
|
+
void Decoder::PrintXImm16(Instruction* instr) {
|
234
|
+
int32_t imm = instr->Imm16Field();
|
235
|
+
out_buffer_pos_ += v8i::OS::SNPrintF(out_buffer_ + out_buffer_pos_,
|
236
|
+
"0x%x", imm);
|
237
|
+
}
|
238
|
+
|
239
|
+
|
240
|
+
// Print 26-bit immediate value.
|
241
|
+
void Decoder::PrintImm26(Instruction* instr) {
|
242
|
+
int32_t imm = instr->Imm26Field();
|
243
|
+
out_buffer_pos_ += v8i::OS::SNPrintF(out_buffer_ + out_buffer_pos_,
|
244
|
+
"%d", imm);
|
245
|
+
}
|
246
|
+
|
247
|
+
|
248
|
+
// Print 26-bit immediate value.
|
249
|
+
void Decoder::PrintCode(Instruction* instr) {
|
250
|
+
if (instr->OpcodeFieldRaw() != SPECIAL)
|
251
|
+
return; // Not a break or trap instruction.
|
252
|
+
switch (instr->FunctionFieldRaw()) {
|
253
|
+
case BREAK: {
|
254
|
+
int32_t code = instr->Bits(25, 6);
|
255
|
+
out_buffer_pos_ +=
|
256
|
+
v8i::OS::SNPrintF(out_buffer_ + out_buffer_pos_, "0x%05x", code);
|
257
|
+
break;
|
258
|
+
}
|
259
|
+
case TGE:
|
260
|
+
case TGEU:
|
261
|
+
case TLT:
|
262
|
+
case TLTU:
|
263
|
+
case TEQ:
|
264
|
+
case TNE: {
|
265
|
+
int32_t code = instr->Bits(15, 6);
|
266
|
+
out_buffer_pos_ +=
|
267
|
+
v8i::OS::SNPrintF(out_buffer_ + out_buffer_pos_, "0x%03x", code);
|
268
|
+
break;
|
269
|
+
}
|
270
|
+
default: // Not a break or trap instruction.
|
271
|
+
break;
|
272
|
+
};
|
273
|
+
}
|
274
|
+
|
275
|
+
|
276
|
+
// Printing of instruction name.
|
277
|
+
void Decoder::PrintInstructionName(Instruction* instr) {
|
278
|
+
}
|
279
|
+
|
280
|
+
|
281
|
+
// Handle all register based formatting in this function to reduce the
|
282
|
+
// complexity of FormatOption.
|
283
|
+
int Decoder::FormatRegister(Instruction* instr, const char* format) {
|
284
|
+
ASSERT(format[0] == 'r');
|
285
|
+
if (format[1] == 's') { // 'rs: Rs register
|
286
|
+
int reg = instr->RsField();
|
287
|
+
PrintRegister(reg);
|
288
|
+
return 2;
|
289
|
+
} else if (format[1] == 't') { // 'rt: rt register
|
290
|
+
int reg = instr->RtField();
|
291
|
+
PrintRegister(reg);
|
292
|
+
return 2;
|
293
|
+
} else if (format[1] == 'd') { // 'rd: rd register
|
294
|
+
int reg = instr->RdField();
|
295
|
+
PrintRegister(reg);
|
296
|
+
return 2;
|
297
|
+
}
|
298
|
+
UNREACHABLE();
|
299
|
+
return -1;
|
300
|
+
}
|
301
|
+
|
302
|
+
|
303
|
+
// Handle all Cregister based formatting in this function to reduce the
|
304
|
+
// complexity of FormatOption.
|
305
|
+
int Decoder::FormatCRegister(Instruction* instr, const char* format) {
|
306
|
+
ASSERT(format[0] == 'f');
|
307
|
+
if (format[1] == 's') { // 'fs: fs register
|
308
|
+
int reg = instr->RsField();
|
309
|
+
PrintCRegister(reg);
|
310
|
+
return 2;
|
311
|
+
} else if (format[1] == 't') { // 'ft: ft register
|
312
|
+
int reg = instr->RtField();
|
313
|
+
PrintCRegister(reg);
|
314
|
+
return 2;
|
315
|
+
} else if (format[1] == 'd') { // 'fd: fd register
|
316
|
+
int reg = instr->RdField();
|
317
|
+
PrintCRegister(reg);
|
318
|
+
return 2;
|
319
|
+
}
|
320
|
+
UNREACHABLE();
|
321
|
+
return -1;
|
322
|
+
}
|
323
|
+
|
324
|
+
|
325
|
+
// FormatOption takes a formatting string and interprets it based on
|
326
|
+
// the current instructions. The format string points to the first
|
327
|
+
// character of the option string (the option escape has already been
|
328
|
+
// consumed by the caller.) FormatOption returns the number of
|
329
|
+
// characters that were consumed from the formatting string.
|
330
|
+
int Decoder::FormatOption(Instruction* instr, const char* format) {
|
331
|
+
switch (format[0]) {
|
332
|
+
case 'c': { // 'code for break or trap instructions
|
333
|
+
ASSERT(STRING_STARTS_WITH(format, "code"));
|
334
|
+
PrintCode(instr);
|
335
|
+
return 4;
|
336
|
+
}
|
337
|
+
case 'i': { // 'imm16u or 'imm26
|
338
|
+
if (format[3] == '1') {
|
339
|
+
ASSERT(STRING_STARTS_WITH(format, "imm16"));
|
340
|
+
if (format[5] == 's') {
|
341
|
+
ASSERT(STRING_STARTS_WITH(format, "imm16s"));
|
342
|
+
PrintSImm16(instr);
|
343
|
+
} else if (format[5] == 'u') {
|
344
|
+
ASSERT(STRING_STARTS_WITH(format, "imm16u"));
|
345
|
+
PrintSImm16(instr);
|
346
|
+
} else {
|
347
|
+
ASSERT(STRING_STARTS_WITH(format, "imm16x"));
|
348
|
+
PrintXImm16(instr);
|
349
|
+
}
|
350
|
+
return 6;
|
351
|
+
} else {
|
352
|
+
ASSERT(STRING_STARTS_WITH(format, "imm26"));
|
353
|
+
PrintImm26(instr);
|
354
|
+
return 5;
|
355
|
+
}
|
356
|
+
}
|
357
|
+
case 'r': { // 'r: registers
|
358
|
+
return FormatRegister(instr, format);
|
359
|
+
}
|
360
|
+
case 'f': { // 'f: Cregisters
|
361
|
+
return FormatCRegister(instr, format);
|
362
|
+
}
|
363
|
+
case 's': { // 'sa
|
364
|
+
ASSERT(STRING_STARTS_WITH(format, "sa"));
|
365
|
+
PrintSa(instr);
|
366
|
+
return 2;
|
367
|
+
}
|
368
|
+
};
|
369
|
+
UNREACHABLE();
|
370
|
+
return -1;
|
371
|
+
}
|
372
|
+
|
373
|
+
|
374
|
+
// Format takes a formatting string for a whole instruction and prints it into
|
375
|
+
// the output buffer. All escaped options are handed to FormatOption to be
|
376
|
+
// parsed further.
|
377
|
+
void Decoder::Format(Instruction* instr, const char* format) {
|
378
|
+
char cur = *format++;
|
379
|
+
while ((cur != 0) && (out_buffer_pos_ < (out_buffer_.length() - 1))) {
|
380
|
+
if (cur == '\'') { // Single quote is used as the formatting escape.
|
381
|
+
format += FormatOption(instr, format);
|
382
|
+
} else {
|
383
|
+
out_buffer_[out_buffer_pos_++] = cur;
|
384
|
+
}
|
385
|
+
cur = *format++;
|
386
|
+
}
|
387
|
+
out_buffer_[out_buffer_pos_] = '\0';
|
388
|
+
}
|
389
|
+
|
390
|
+
|
391
|
+
// For currently unimplemented decodings the disassembler calls Unknown(instr)
|
392
|
+
// which will just print "unknown" of the instruction bits.
|
393
|
+
void Decoder::Unknown(Instruction* instr) {
|
394
|
+
Format(instr, "unknown");
|
395
|
+
}
|
396
|
+
|
397
|
+
|
398
|
+
void Decoder::DecodeTypeRegister(Instruction* instr) {
|
399
|
+
switch (instr->OpcodeFieldRaw()) {
|
400
|
+
case COP1: // Coprocessor instructions
|
401
|
+
switch (instr->RsFieldRaw()) {
|
402
|
+
case BC1: // branch on coprocessor condition
|
403
|
+
UNREACHABLE();
|
404
|
+
break;
|
405
|
+
case MFC1:
|
406
|
+
Format(instr, "mfc1 'rt, 'fs");
|
407
|
+
break;
|
408
|
+
case MFHC1:
|
409
|
+
Format(instr, "mfhc1 rt, 'fs");
|
410
|
+
break;
|
411
|
+
case MTC1:
|
412
|
+
Format(instr, "mtc1 'rt, 'fs");
|
413
|
+
break;
|
414
|
+
case MTHC1:
|
415
|
+
Format(instr, "mthc1 rt, 'fs");
|
416
|
+
break;
|
417
|
+
case S:
|
418
|
+
case D:
|
419
|
+
UNIMPLEMENTED_MIPS();
|
420
|
+
break;
|
421
|
+
case W:
|
422
|
+
switch (instr->FunctionFieldRaw()) {
|
423
|
+
case CVT_S_W:
|
424
|
+
UNIMPLEMENTED_MIPS();
|
425
|
+
break;
|
426
|
+
case CVT_D_W: // Convert word to double.
|
427
|
+
Format(instr, "cvt.d.w 'fd, 'fs");
|
428
|
+
break;
|
429
|
+
default:
|
430
|
+
UNREACHABLE();
|
431
|
+
};
|
432
|
+
break;
|
433
|
+
case L:
|
434
|
+
case PS:
|
435
|
+
UNIMPLEMENTED_MIPS();
|
436
|
+
break;
|
437
|
+
break;
|
438
|
+
default:
|
439
|
+
UNREACHABLE();
|
440
|
+
};
|
441
|
+
break;
|
442
|
+
case SPECIAL:
|
443
|
+
switch (instr->FunctionFieldRaw()) {
|
444
|
+
case JR:
|
445
|
+
Format(instr, "jr 'rs");
|
446
|
+
break;
|
447
|
+
case JALR:
|
448
|
+
Format(instr, "jalr 'rs");
|
449
|
+
break;
|
450
|
+
case SLL:
|
451
|
+
if ( 0x0 == static_cast<int>(instr->InstructionBits()))
|
452
|
+
Format(instr, "nop");
|
453
|
+
else
|
454
|
+
Format(instr, "sll 'rd, 'rt, 'sa");
|
455
|
+
break;
|
456
|
+
case SRL:
|
457
|
+
Format(instr, "srl 'rd, 'rt, 'sa");
|
458
|
+
break;
|
459
|
+
case SRA:
|
460
|
+
Format(instr, "sra 'rd, 'rt, 'sa");
|
461
|
+
break;
|
462
|
+
case SLLV:
|
463
|
+
Format(instr, "sllv 'rd, 'rt, 'rs");
|
464
|
+
break;
|
465
|
+
case SRLV:
|
466
|
+
Format(instr, "srlv 'rd, 'rt, 'rs");
|
467
|
+
break;
|
468
|
+
case SRAV:
|
469
|
+
Format(instr, "srav 'rd, 'rt, 'rs");
|
470
|
+
break;
|
471
|
+
case MFHI:
|
472
|
+
Format(instr, "mfhi 'rd");
|
473
|
+
break;
|
474
|
+
case MFLO:
|
475
|
+
Format(instr, "mflo 'rd");
|
476
|
+
break;
|
477
|
+
case MULT:
|
478
|
+
Format(instr, "mult 'rs, 'rt");
|
479
|
+
break;
|
480
|
+
case MULTU:
|
481
|
+
Format(instr, "multu 'rs, 'rt");
|
482
|
+
break;
|
483
|
+
case DIV:
|
484
|
+
Format(instr, "div 'rs, 'rt");
|
485
|
+
break;
|
486
|
+
case DIVU:
|
487
|
+
Format(instr, "divu 'rs, 'rt");
|
488
|
+
break;
|
489
|
+
case ADD:
|
490
|
+
Format(instr, "add 'rd, 'rs, 'rt");
|
491
|
+
break;
|
492
|
+
case ADDU:
|
493
|
+
Format(instr, "addu 'rd, 'rs, 'rt");
|
494
|
+
break;
|
495
|
+
case SUB:
|
496
|
+
Format(instr, "sub 'rd, 'rs, 'rt");
|
497
|
+
break;
|
498
|
+
case SUBU:
|
499
|
+
Format(instr, "sub 'rd, 'rs, 'rt");
|
500
|
+
break;
|
501
|
+
case AND:
|
502
|
+
Format(instr, "and 'rd, 'rs, 'rt");
|
503
|
+
break;
|
504
|
+
case OR:
|
505
|
+
if (0 == instr->RsField()) {
|
506
|
+
Format(instr, "mov 'rd, 'rt");
|
507
|
+
} else if (0 == instr->RtField()) {
|
508
|
+
Format(instr, "mov 'rd, 'rs");
|
509
|
+
} else {
|
510
|
+
Format(instr, "or 'rd, 'rs, 'rt");
|
511
|
+
}
|
512
|
+
break;
|
513
|
+
case XOR:
|
514
|
+
Format(instr, "xor 'rd, 'rs, 'rt");
|
515
|
+
break;
|
516
|
+
case NOR:
|
517
|
+
Format(instr, "nor 'rd, 'rs, 'rt");
|
518
|
+
break;
|
519
|
+
case SLT:
|
520
|
+
Format(instr, "slt 'rd, 'rs, 'rt");
|
521
|
+
break;
|
522
|
+
case SLTU:
|
523
|
+
Format(instr, "sltu 'rd, 'rs, 'rt");
|
524
|
+
break;
|
525
|
+
case BREAK:
|
526
|
+
Format(instr, "break, code: 'code");
|
527
|
+
break;
|
528
|
+
case TGE:
|
529
|
+
Format(instr, "tge 'rs, 'rt, code: 'code");
|
530
|
+
break;
|
531
|
+
case TGEU:
|
532
|
+
Format(instr, "tgeu 'rs, 'rt, code: 'code");
|
533
|
+
break;
|
534
|
+
case TLT:
|
535
|
+
Format(instr, "tlt 'rs, 'rt, code: 'code");
|
536
|
+
break;
|
537
|
+
case TLTU:
|
538
|
+
Format(instr, "tltu 'rs, 'rt, code: 'code");
|
539
|
+
break;
|
540
|
+
case TEQ:
|
541
|
+
Format(instr, "teq 'rs, 'rt, code: 'code");
|
542
|
+
break;
|
543
|
+
case TNE:
|
544
|
+
Format(instr, "tne 'rs, 'rt, code: 'code");
|
545
|
+
break;
|
546
|
+
default:
|
547
|
+
UNREACHABLE();
|
548
|
+
};
|
549
|
+
break;
|
550
|
+
case SPECIAL2:
|
551
|
+
switch (instr->FunctionFieldRaw()) {
|
552
|
+
case MUL:
|
553
|
+
break;
|
554
|
+
default:
|
555
|
+
UNREACHABLE();
|
556
|
+
};
|
557
|
+
break;
|
558
|
+
default:
|
559
|
+
UNREACHABLE();
|
560
|
+
};
|
561
|
+
}
|
562
|
+
|
563
|
+
|
564
|
+
void Decoder::DecodeTypeImmediate(Instruction* instr) {
|
565
|
+
switch (instr->OpcodeFieldRaw()) {
|
566
|
+
// ------------- REGIMM class.
|
567
|
+
case REGIMM:
|
568
|
+
switch (instr->RtFieldRaw()) {
|
569
|
+
case BLTZ:
|
570
|
+
Format(instr, "bltz 'rs, 'imm16u");
|
571
|
+
break;
|
572
|
+
case BLTZAL:
|
573
|
+
Format(instr, "bltzal 'rs, 'imm16u");
|
574
|
+
break;
|
575
|
+
case BGEZ:
|
576
|
+
Format(instr, "bgez 'rs, 'imm16u");
|
577
|
+
break;
|
578
|
+
case BGEZAL:
|
579
|
+
Format(instr, "bgezal 'rs, 'imm16u");
|
580
|
+
break;
|
581
|
+
default:
|
582
|
+
UNREACHABLE();
|
583
|
+
};
|
584
|
+
break; // case REGIMM
|
585
|
+
// ------------- Branch instructions.
|
586
|
+
case BEQ:
|
587
|
+
Format(instr, "beq 'rs, 'rt, 'imm16u");
|
588
|
+
break;
|
589
|
+
case BNE:
|
590
|
+
Format(instr, "bne 'rs, 'rt, 'imm16u");
|
591
|
+
break;
|
592
|
+
case BLEZ:
|
593
|
+
Format(instr, "blez 'rs, 'imm16u");
|
594
|
+
break;
|
595
|
+
case BGTZ:
|
596
|
+
Format(instr, "bgtz 'rs, 'imm16u");
|
597
|
+
break;
|
598
|
+
// ------------- Arithmetic instructions.
|
599
|
+
case ADDI:
|
600
|
+
Format(instr, "addi 'rt, 'rs, 'imm16s");
|
601
|
+
break;
|
602
|
+
case ADDIU:
|
603
|
+
Format(instr, "addiu 'rt, 'rs, 'imm16s");
|
604
|
+
break;
|
605
|
+
case SLTI:
|
606
|
+
Format(instr, "slti 'rt, 'rs, 'imm16s");
|
607
|
+
break;
|
608
|
+
case SLTIU:
|
609
|
+
Format(instr, "sltiu 'rt, 'rs, 'imm16u");
|
610
|
+
break;
|
611
|
+
case ANDI:
|
612
|
+
Format(instr, "andi 'rt, 'rs, 'imm16x");
|
613
|
+
break;
|
614
|
+
case ORI:
|
615
|
+
Format(instr, "ori 'rt, 'rs, 'imm16x");
|
616
|
+
break;
|
617
|
+
case XORI:
|
618
|
+
Format(instr, "xori 'rt, 'rs, 'imm16x");
|
619
|
+
break;
|
620
|
+
case LUI:
|
621
|
+
Format(instr, "lui 'rt, 'imm16x");
|
622
|
+
break;
|
623
|
+
// ------------- Memory instructions.
|
624
|
+
case LB:
|
625
|
+
Format(instr, "lb 'rt, 'imm16s('rs)");
|
626
|
+
break;
|
627
|
+
case LW:
|
628
|
+
Format(instr, "lw 'rt, 'imm16s('rs)");
|
629
|
+
break;
|
630
|
+
case LBU:
|
631
|
+
Format(instr, "lbu 'rt, 'imm16s('rs)");
|
632
|
+
break;
|
633
|
+
case SB:
|
634
|
+
Format(instr, "sb 'rt, 'imm16s('rs)");
|
635
|
+
break;
|
636
|
+
case SW:
|
637
|
+
Format(instr, "sw 'rt, 'imm16s('rs)");
|
638
|
+
break;
|
639
|
+
case LWC1:
|
640
|
+
Format(instr, "lwc1 'ft, 'imm16s('rs)");
|
641
|
+
break;
|
642
|
+
case LDC1:
|
643
|
+
Format(instr, "ldc1 'ft, 'imm16s('rs)");
|
644
|
+
break;
|
645
|
+
case SWC1:
|
646
|
+
Format(instr, "swc1 'rt, 'imm16s('fs)");
|
647
|
+
break;
|
648
|
+
case SDC1:
|
649
|
+
Format(instr, "sdc1 'rt, 'imm16s('fs)");
|
650
|
+
break;
|
651
|
+
default:
|
652
|
+
UNREACHABLE();
|
653
|
+
break;
|
654
|
+
};
|
655
|
+
}
|
656
|
+
|
657
|
+
|
658
|
+
void Decoder::DecodeTypeJump(Instruction* instr) {
|
659
|
+
switch (instr->OpcodeFieldRaw()) {
|
660
|
+
case J:
|
661
|
+
Format(instr, "j 'imm26");
|
662
|
+
break;
|
663
|
+
case JAL:
|
664
|
+
Format(instr, "jal 'imm26");
|
665
|
+
break;
|
666
|
+
default:
|
667
|
+
UNREACHABLE();
|
668
|
+
}
|
669
|
+
}
|
670
|
+
|
671
|
+
|
672
|
+
// Disassemble the instruction at *instr_ptr into the output buffer.
|
673
|
+
int Decoder::InstructionDecode(byte_* instr_ptr) {
|
674
|
+
Instruction* instr = Instruction::At(instr_ptr);
|
675
|
+
// Print raw instruction bytes.
|
676
|
+
out_buffer_pos_ += v8i::OS::SNPrintF(out_buffer_ + out_buffer_pos_,
|
677
|
+
"%08x ",
|
678
|
+
instr->InstructionBits());
|
679
|
+
switch (instr->InstructionType()) {
|
680
|
+
case Instruction::kRegisterType: {
|
681
|
+
DecodeTypeRegister(instr);
|
682
|
+
break;
|
683
|
+
}
|
684
|
+
case Instruction::kImmediateType: {
|
685
|
+
DecodeTypeImmediate(instr);
|
686
|
+
break;
|
687
|
+
}
|
688
|
+
case Instruction::kJumpType: {
|
689
|
+
DecodeTypeJump(instr);
|
690
|
+
break;
|
691
|
+
}
|
692
|
+
default: {
|
693
|
+
UNSUPPORTED_MIPS();
|
694
|
+
}
|
695
|
+
}
|
696
|
+
return Instruction::kInstructionSize;
|
697
|
+
}
|
698
|
+
|
699
|
+
|
700
|
+
} } // namespace assembler::mips
|
701
|
+
|
702
|
+
|
703
|
+
|
704
|
+
//------------------------------------------------------------------------------
|
705
|
+
|
706
|
+
namespace disasm {
|
707
|
+
|
708
|
+
namespace v8i = v8::internal;
|
709
|
+
|
710
|
+
|
711
|
+
const char* NameConverter::NameOfAddress(byte_* addr) const {
|
712
|
+
static v8::internal::EmbeddedVector<char, 32> tmp_buffer;
|
713
|
+
v8::internal::OS::SNPrintF(tmp_buffer, "%p", addr);
|
714
|
+
return tmp_buffer.start();
|
715
|
+
}
|
716
|
+
|
717
|
+
|
718
|
+
const char* NameConverter::NameOfConstant(byte_* addr) const {
|
719
|
+
return NameOfAddress(addr);
|
720
|
+
}
|
721
|
+
|
722
|
+
|
723
|
+
const char* NameConverter::NameOfCPURegister(int reg) const {
|
724
|
+
return assembler::mips::Registers::Name(reg);
|
725
|
+
}
|
726
|
+
|
727
|
+
|
728
|
+
const char* NameConverter::NameOfXMMRegister(int reg) const {
|
729
|
+
return assembler::mips::FPURegister::Name(reg);
|
730
|
+
}
|
731
|
+
|
732
|
+
|
733
|
+
const char* NameConverter::NameOfByteCPURegister(int reg) const {
|
734
|
+
UNREACHABLE(); // MIPS does not have the concept of a byte register
|
735
|
+
return "nobytereg";
|
736
|
+
}
|
737
|
+
|
738
|
+
|
739
|
+
const char* NameConverter::NameInCode(byte_* addr) const {
|
740
|
+
// The default name converter is called for unknown code. So we will not try
|
741
|
+
// to access any memory.
|
742
|
+
return "";
|
743
|
+
}
|
744
|
+
|
745
|
+
|
746
|
+
//------------------------------------------------------------------------------
|
747
|
+
|
748
|
+
Disassembler::Disassembler(const NameConverter& converter)
|
749
|
+
: converter_(converter) {}
|
750
|
+
|
751
|
+
|
752
|
+
Disassembler::~Disassembler() {}
|
753
|
+
|
754
|
+
|
755
|
+
int Disassembler::InstructionDecode(v8::internal::Vector<char> buffer,
|
756
|
+
byte_* instruction) {
|
757
|
+
assembler::mips::Decoder d(converter_, buffer);
|
758
|
+
return d.InstructionDecode(instruction);
|
759
|
+
}
|
760
|
+
|
761
|
+
|
762
|
+
int Disassembler::ConstantPoolSizeAt(byte_* instruction) {
|
763
|
+
UNIMPLEMENTED_MIPS();
|
764
|
+
return -1;
|
765
|
+
}
|
766
|
+
|
767
|
+
|
768
|
+
void Disassembler::Disassemble(FILE* f, byte_* begin, byte_* end) {
|
769
|
+
NameConverter converter;
|
770
|
+
Disassembler d(converter);
|
771
|
+
for (byte_* pc = begin; pc < end;) {
|
772
|
+
v8::internal::EmbeddedVector<char, 128> buffer;
|
773
|
+
buffer[0] = '\0';
|
774
|
+
byte_* prev_pc = pc;
|
775
|
+
pc += d.InstructionDecode(buffer, pc);
|
776
|
+
fprintf(f, "%p %08x %s\n",
|
777
|
+
prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start());
|
778
|
+
}
|
779
|
+
}
|
780
|
+
|
781
|
+
#undef UNSUPPORTED
|
782
|
+
|
783
|
+
} // namespace disasm
|
784
|
+
|