therubyracer 0.7.4 → 0.7.5
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/History.txt +11 -0
- data/Rakefile +1 -1
- data/ext/v8/extconf.rb +0 -18
- data/ext/v8/rr.cpp +2 -2
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/AUTHORS +1 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/ChangeLog +239 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/LICENSE +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/SConstruct +29 -17
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/include/v8-debug.h +61 -3
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/include/v8-profiler.h +182 -5
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/include/v8.h +458 -257
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/SConscript +2 -5
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/accessors.cc +2 -2
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/accessors.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/allocation.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/allocation.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/api.cc +574 -30
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/api.h +12 -10
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/apinatives.js +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/apiutils.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arguments.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/assembler-arm-inl.h +38 -15
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/assembler-arm.cc +646 -101
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/assembler-arm.h +174 -15
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/builtins-arm.cc +56 -47
- data/ext/v8/upstream/2.3.3/src/arm/codegen-arm-inl.h +48 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/codegen-arm.cc +2957 -1448
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/codegen-arm.h +230 -74
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/constants-arm.cc +25 -1
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/constants-arm.h +16 -1
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/cpu-arm.cc +4 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/debug-arm.cc +76 -6
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/disasm-arm.cc +168 -20
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/fast-codegen-arm.cc +5 -2
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/frames-arm.cc +4 -4
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/frames-arm.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/full-codegen-arm.cc +1558 -248
- data/ext/v8/upstream/2.3.3/src/arm/ic-arm.cc +2258 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/jump-target-arm.cc +55 -103
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/macro-assembler-arm.cc +358 -185
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/macro-assembler-arm.h +136 -41
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/regexp-macro-assembler-arm.cc +26 -5
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/regexp-macro-assembler-arm.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/register-allocator-arm-inl.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/register-allocator-arm.cc +4 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/register-allocator-arm.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/simulator-arm.cc +203 -22
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/simulator-arm.h +7 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/stub-cache-arm.cc +531 -324
- data/ext/v8/upstream/2.3.3/src/arm/virtual-frame-arm-inl.h +59 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/virtual-frame-arm.cc +247 -81
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/arm/virtual-frame-arm.h +99 -83
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/array.js +2 -2
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/assembler.cc +6 -13
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/assembler.h +36 -10
- data/ext/v8/upstream/2.3.3/src/ast-inl.h +81 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ast.cc +14 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ast.h +20 -35
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/bootstrapper.cc +32 -1
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/bootstrapper.h +0 -4
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/builtins.cc +50 -33
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/builtins.h +2 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/bytecodes-irregexp.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/cached-powers.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/char-predicates-inl.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/char-predicates.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/checks.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/checks.h +8 -6
- data/ext/v8/upstream/2.3.3/src/circular-queue-inl.h +53 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/circular-queue.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/circular-queue.h +0 -26
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/code-stubs.cc +2 -4
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/code-stubs.h +1 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/code.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/codegen-inl.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/codegen.cc +44 -13
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/codegen.h +310 -31
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/compilation-cache.cc +28 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/compilation-cache.h +3 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/compiler.cc +45 -14
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/compiler.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/contexts.cc +11 -11
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/contexts.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/conversions-inl.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/conversions.cc +25 -11
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/conversions.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/counters.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/counters.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/cpu-profiler-inl.h +2 -1
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/cpu-profiler.cc +68 -24
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/cpu-profiler.h +19 -11
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/cpu.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/d8-debug.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/d8-debug.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/d8-posix.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/d8-readline.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/d8-windows.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/d8.cc +3 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/d8.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/d8.js +55 -2
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/data-flow.cc +3 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/data-flow.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/date.js +68 -137
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/dateparser-inl.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/dateparser.cc +2 -8
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/dateparser.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/debug-agent.cc +3 -3
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/debug-agent.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/debug-debugger.js +81 -23
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/debug.cc +275 -81
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/debug.h +85 -6
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/disasm.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/disassembler.cc +1 -1
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/disassembler.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/diy-fp.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/diy-fp.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/double.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/dtoa-config.c +0 -0
- data/ext/v8/upstream/2.3.3/src/dtoa.cc +77 -0
- data/ext/v8/upstream/2.3.3/src/dtoa.h +81 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/execution.cc +111 -3
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/execution.h +12 -1
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/factory.cc +25 -3
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/factory.h +16 -9
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/fast-codegen.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/fast-codegen.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/fast-dtoa.cc +2 -9
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/fast-dtoa.h +1 -2
- data/ext/v8/upstream/2.3.3/src/fixed-dtoa.cc +405 -0
- data/ext/v8/upstream/{2.1.10/src/jump-target-light.cc → 2.3.3/src/fixed-dtoa.h} +22 -53
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/flag-definitions.h +14 -6
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/flags.cc +5 -9
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/flags.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/flow-graph.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/flow-graph.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/frame-element.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/frame-element.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/frames-inl.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/frames.cc +5 -2
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/frames.h +1 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/full-codegen.cc +387 -20
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/full-codegen.h +102 -5
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/func-name-inferrer.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/func-name-inferrer.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/global-handles.cc +8 -4
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/global-handles.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/globals.h +44 -7
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/handles-inl.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/handles.cc +19 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/handles.h +8 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/hashmap.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/hashmap.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/heap-inl.h +56 -14
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/heap-profiler.cc +85 -1
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/heap-profiler.h +45 -1
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/heap.cc +994 -396
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/heap.h +220 -65
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/assembler-ia32-inl.h +41 -12
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/assembler-ia32.cc +94 -24
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/assembler-ia32.h +32 -4
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/builtins-ia32.cc +42 -30
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/codegen-ia32-inl.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/codegen-ia32.cc +1758 -916
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/codegen-ia32.h +67 -74
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/cpu-ia32.cc +4 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/debug-ia32.cc +46 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/disasm-ia32.cc +37 -6
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/fast-codegen-ia32.cc +4 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/fast-codegen-ia32.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/frames-ia32.cc +4 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/frames-ia32.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/full-codegen-ia32.cc +1465 -198
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/ic-ia32.cc +688 -367
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/jump-target-ia32.cc +4 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/macro-assembler-ia32.cc +82 -180
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/macro-assembler-ia32.h +41 -25
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/regexp-macro-assembler-ia32.cc +68 -24
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/regexp-macro-assembler-ia32.h +1 -2
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/register-allocator-ia32-inl.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/register-allocator-ia32.cc +4 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/register-allocator-ia32.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/simulator-ia32.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/simulator-ia32.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/stub-cache-ia32.cc +649 -302
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/virtual-frame-ia32.cc +23 -1
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ia32/virtual-frame-ia32.h +18 -27
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ic-inl.h +30 -3
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ic.cc +384 -66
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/ic.h +65 -24
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/interpreter-irregexp.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/interpreter-irregexp.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/json.js +3 -3
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/jsregexp.cc +20 -4
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/jsregexp.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/jump-target-heavy-inl.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/jump-target-heavy.cc +79 -13
- data/ext/v8/upstream/{2.1.10/src/jump-target.h → 2.3.3/src/jump-target-heavy.h} +5 -47
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/jump-target-inl.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/jump-target-light-inl.h +16 -2
- data/ext/v8/upstream/2.3.3/src/jump-target-light.cc +110 -0
- data/ext/v8/upstream/2.3.3/src/jump-target-light.h +192 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/jump-target.cc +0 -64
- data/ext/v8/upstream/2.3.3/src/jump-target.h +90 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/list-inl.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/list.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/liveedit-debugger.js +141 -28
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/liveedit.cc +19 -7
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/liveedit.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/log-inl.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/log-utils.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/log-utils.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/log.cc +12 -11
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/log.h +12 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/macro-assembler.h +0 -16
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/macros.py +21 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mark-compact.cc +120 -109
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mark-compact.h +25 -37
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/math.js +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/memory.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/messages.cc +8 -3
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/messages.h +2 -1
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/messages.js +15 -7
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/assembler-mips-inl.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/assembler-mips.cc +12 -1
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/assembler-mips.h +4 -1
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/builtins-mips.cc +3 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/codegen-mips-inl.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/codegen-mips.cc +9 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/codegen-mips.h +1 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/constants-mips.cc +5 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/constants-mips.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/cpu-mips.cc +4 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/debug-mips.cc +3 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/disasm-mips.cc +3 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/fast-codegen-mips.cc +3 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/frames-mips.cc +3 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/frames-mips.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/full-codegen-mips.cc +5 -1
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/ic-mips.cc +3 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/jump-target-mips.cc +3 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/macro-assembler-mips.cc +3 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/macro-assembler-mips.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/register-allocator-mips-inl.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/register-allocator-mips.cc +3 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/register-allocator-mips.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/simulator-mips.cc +3 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/simulator-mips.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/stub-cache-mips.cc +3 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/virtual-frame-mips.cc +3 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mips/virtual-frame-mips.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mirror-debugger.js +46 -4
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/mksnapshot.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/natives.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/objects-debug.cc +8 -1
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/objects-inl.h +235 -62
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/objects.cc +497 -231
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/objects.h +355 -149
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/oprofile-agent.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/oprofile-agent.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/parser.cc +31 -6
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/parser.h +1 -1
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/platform-freebsd.cc +9 -6
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/platform-linux.cc +26 -6
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/platform-macos.cc +11 -6
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/platform-nullos.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/platform-openbsd.cc +6 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/platform-posix.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/platform-solaris.cc +69 -23
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/platform-win32.cc +15 -11
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/platform.h +10 -6
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/powers-ten.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/prettyprinter.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/prettyprinter.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/profile-generator-inl.h +26 -2
- data/ext/v8/upstream/2.3.3/src/profile-generator.cc +1830 -0
- data/ext/v8/upstream/2.3.3/src/profile-generator.h +853 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/property.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/property.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp-macro-assembler-irregexp-inl.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp-macro-assembler-irregexp.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp-macro-assembler-irregexp.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp-macro-assembler-tracer.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp-macro-assembler-tracer.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp-macro-assembler.cc +1 -3
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp-macro-assembler.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp-stack.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp-stack.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/regexp.js +25 -4
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/register-allocator-inl.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/register-allocator.cc +4 -3
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/register-allocator.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/rewriter.cc +85 -8
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/rewriter.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/runtime.cc +547 -221
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/runtime.h +5 -1
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/runtime.js +23 -31
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/scanner.cc +12 -6
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/scanner.h +60 -53
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/scopeinfo.cc +156 -168
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/scopeinfo.h +58 -62
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/scopes.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/scopes.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/serialize.cc +320 -242
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/serialize.h +81 -48
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/shell.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/simulator.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/smart-pointer.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/snapshot-common.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/snapshot-empty.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/snapshot.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/spaces-inl.h +177 -74
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/spaces.cc +138 -315
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/spaces.h +155 -124
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/splay-tree-inl.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/splay-tree.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/string-stream.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/string-stream.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/string.js +113 -119
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/stub-cache.cc +242 -97
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/stub-cache.h +118 -55
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/third_party/dtoa/COPYING +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/third_party/dtoa/dtoa.c +4 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/third_party/valgrind/valgrind.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/token.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/token.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/top.cc +107 -26
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/top.h +9 -4
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/type-info.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/type-info.h +2 -2
- data/ext/v8/upstream/2.3.3/src/unbound-queue-inl.h +95 -0
- data/ext/v8/upstream/2.3.3/src/unbound-queue.h +67 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/unicode-inl.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/unicode.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/unicode.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/uri.js +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/utils.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/utils.h +83 -1
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/v8-counters.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/v8-counters.h +20 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/v8.cc +5 -1
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/v8.h +0 -0
- data/ext/v8/upstream/2.3.3/src/v8dll-main.cc +39 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/v8natives.js +210 -33
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/v8threads.cc +1 -1
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/v8threads.h +1 -1
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/variables.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/variables.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/version.cc +3 -3
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/version.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/virtual-frame-heavy-inl.h +40 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/virtual-frame-heavy.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/virtual-frame-inl.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/virtual-frame-light-inl.h +106 -5
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/virtual-frame-light.cc +4 -1
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/virtual-frame.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/virtual-frame.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/vm-state-inl.h +6 -3
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/vm-state.cc +1 -1
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/vm-state.h +6 -4
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/assembler-x64-inl.h +42 -5
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/assembler-x64.cc +285 -53
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/assembler-x64.h +54 -18
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/builtins-x64.cc +31 -33
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/codegen-x64-inl.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/codegen-x64.cc +9787 -8722
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/codegen-x64.h +82 -47
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/cpu-x64.cc +4 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/debug-x64.cc +55 -6
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/disasm-x64.cc +42 -19
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/fast-codegen-x64.cc +4 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/frames-x64.cc +4 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/frames-x64.h +4 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/full-codegen-x64.cc +1487 -210
- data/ext/v8/upstream/2.3.3/src/x64/ic-x64.cc +1907 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/jump-target-x64.cc +4 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/macro-assembler-x64.cc +366 -338
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/macro-assembler-x64.h +83 -38
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/regexp-macro-assembler-x64.cc +82 -23
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/regexp-macro-assembler-x64.h +1 -2
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/register-allocator-x64-inl.h +6 -5
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/register-allocator-x64.cc +4 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/register-allocator-x64.h +1 -1
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/simulator-x64.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/simulator-x64.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/stub-cache-x64.cc +556 -377
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/virtual-frame-x64.cc +197 -98
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/x64/virtual-frame-x64.h +37 -28
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/zone-inl.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/zone.cc +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/src/zone.h +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/codemap.js +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/consarray.js +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/csvparser.js +0 -0
- data/ext/v8/upstream/2.3.3/tools/gc-nvp-trace-processor.py +317 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/generate-ten-powers.scm +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/gyp/v8.gyp +87 -20
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/js2c.py +19 -15
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/jsmin.py +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/linux-tick-processor +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/linux-tick-processor.py +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/logreader.js +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/mac-nm +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/mac-tick-processor +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/oprofile/annotate +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/oprofile/common +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/oprofile/dump +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/oprofile/report +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/oprofile/reset +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/oprofile/run +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/oprofile/shutdown +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/oprofile/start +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/presubmit.py +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/process-heap-prof.py +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/profile.js +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/profile_view.js +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/run-valgrind.py +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/splaytree.js +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/splaytree.py +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/stats-viewer.py +25 -13
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/test.py +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/tickprocessor-driver.js +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/tickprocessor.js +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/tickprocessor.py +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/utils.py +0 -0
- data/ext/v8/upstream/2.3.3/tools/v8.xcodeproj/project.pbxproj +1855 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/README.txt +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/arm.vsprops +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/common.vsprops +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/d8.vcproj +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/d8_arm.vcproj +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/d8_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/d8js2c.cmd +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/debug.vsprops +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/ia32.vsprops +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/js2c.cmd +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/release.vsprops +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8.sln +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8.vcproj +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_arm.sln +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_arm.vcproj +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_base.vcproj +40 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_base_arm.vcproj +20 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_base_x64.vcproj +16 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_cctest.vcproj +4 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_cctest_arm.vcproj +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_cctest_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_mksnapshot.vcproj +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_mksnapshot_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_process_sample.vcproj +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_process_sample_arm.vcproj +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_process_sample_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_shell_sample.vcproj +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_shell_sample_arm.vcproj +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_shell_sample_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_snapshot.vcproj +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_snapshot_cc.vcproj +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_snapshot_cc_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_snapshot_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_x64.sln +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/v8_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/visual_studio/x64.vsprops +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/windows-tick-processor.bat +0 -0
- data/ext/v8/upstream/{2.1.10 → 2.3.3}/tools/windows-tick-processor.py +0 -0
- data/ext/v8/upstream/Makefile +1 -1
- data/ext/v8/v8_template.cpp +94 -2
- data/ext/v8/v8_try_catch.cpp +2 -2
- data/lib/v8.rb +1 -1
- data/lib/v8/access.rb +93 -40
- data/lib/v8/cli.rb +1 -1
- data/lib/v8/function.rb +14 -2
- data/spec/redjs/jsapi_spec.rb +231 -42
- data/therubyracer.gemspec +3 -3
- metadata +463 -453
- data/ext/v8/upstream/2.1.10/src/arm/assembler-thumb2-inl.h +0 -263
- data/ext/v8/upstream/2.1.10/src/arm/assembler-thumb2.cc +0 -1878
- data/ext/v8/upstream/2.1.10/src/arm/assembler-thumb2.h +0 -1036
- data/ext/v8/upstream/2.1.10/src/arm/codegen-arm-inl.h +0 -72
- data/ext/v8/upstream/2.1.10/src/arm/ic-arm.cc +0 -1833
- data/ext/v8/upstream/2.1.10/src/circular-queue-inl.h +0 -101
- data/ext/v8/upstream/2.1.10/src/profile-generator.cc +0 -583
- data/ext/v8/upstream/2.1.10/src/profile-generator.h +0 -364
- data/ext/v8/upstream/2.1.10/src/x64/ic-x64.cc +0 -1621
@@ -134,16 +134,6 @@ class ApiFunction {
|
|
134
134
|
};
|
135
135
|
|
136
136
|
|
137
|
-
v8::Arguments::Arguments(v8::Local<v8::Value> data,
|
138
|
-
v8::Local<v8::Object> holder,
|
139
|
-
v8::Local<v8::Function> callee,
|
140
|
-
bool is_construct_call,
|
141
|
-
void** values, int length)
|
142
|
-
: data_(data), holder_(holder), callee_(callee),
|
143
|
-
is_construct_call_(is_construct_call),
|
144
|
-
values_(values), length_(length) { }
|
145
|
-
|
146
|
-
|
147
137
|
enum ExtensionTraversalState {
|
148
138
|
UNVISITED, VISITED, INSTALLED
|
149
139
|
};
|
@@ -192,6 +182,10 @@ class Utils {
|
|
192
182
|
v8::internal::Handle<v8::internal::Proxy> obj);
|
193
183
|
static inline Local<Message> MessageToLocal(
|
194
184
|
v8::internal::Handle<v8::internal::Object> obj);
|
185
|
+
static inline Local<StackTrace> StackTraceToLocal(
|
186
|
+
v8::internal::Handle<v8::internal::JSArray> obj);
|
187
|
+
static inline Local<StackFrame> StackFrameToLocal(
|
188
|
+
v8::internal::Handle<v8::internal::JSObject> obj);
|
195
189
|
static inline Local<Number> NumberToLocal(
|
196
190
|
v8::internal::Handle<v8::internal::Object> obj);
|
197
191
|
static inline Local<Integer> IntegerToLocal(
|
@@ -227,6 +221,10 @@ class Utils {
|
|
227
221
|
OpenHandle(const Function* data);
|
228
222
|
static inline v8::internal::Handle<v8::internal::JSObject>
|
229
223
|
OpenHandle(const Message* message);
|
224
|
+
static inline v8::internal::Handle<v8::internal::JSArray>
|
225
|
+
OpenHandle(const StackTrace* stack_trace);
|
226
|
+
static inline v8::internal::Handle<v8::internal::JSObject>
|
227
|
+
OpenHandle(const StackFrame* stack_frame);
|
230
228
|
static inline v8::internal::Handle<v8::internal::Context>
|
231
229
|
OpenHandle(const v8::Context* context);
|
232
230
|
static inline v8::internal::Handle<v8::internal::SignatureInfo>
|
@@ -275,6 +273,8 @@ MAKE_TO_LOCAL(ToLocal, ObjectTemplateInfo, ObjectTemplate)
|
|
275
273
|
MAKE_TO_LOCAL(ToLocal, SignatureInfo, Signature)
|
276
274
|
MAKE_TO_LOCAL(ToLocal, TypeSwitchInfo, TypeSwitch)
|
277
275
|
MAKE_TO_LOCAL(MessageToLocal, Object, Message)
|
276
|
+
MAKE_TO_LOCAL(StackTraceToLocal, JSArray, StackTrace)
|
277
|
+
MAKE_TO_LOCAL(StackFrameToLocal, JSObject, StackFrame)
|
278
278
|
MAKE_TO_LOCAL(NumberToLocal, Object, Number)
|
279
279
|
MAKE_TO_LOCAL(IntegerToLocal, Object, Integer)
|
280
280
|
MAKE_TO_LOCAL(Uint32ToLocal, Object, Uint32)
|
@@ -305,6 +305,8 @@ MAKE_OPEN_HANDLE(Function, JSFunction)
|
|
305
305
|
MAKE_OPEN_HANDLE(Message, JSObject)
|
306
306
|
MAKE_OPEN_HANDLE(Context, Context)
|
307
307
|
MAKE_OPEN_HANDLE(External, Proxy)
|
308
|
+
MAKE_OPEN_HANDLE(StackTrace, JSArray)
|
309
|
+
MAKE_OPEN_HANDLE(StackFrame, JSObject)
|
308
310
|
|
309
311
|
#undef MAKE_OPEN_HANDLE
|
310
312
|
|
File without changes
|
File without changes
|
File without changes
|
@@ -39,16 +39,12 @@
|
|
39
39
|
|
40
40
|
#include "arm/assembler-arm.h"
|
41
41
|
#include "cpu.h"
|
42
|
+
#include "debug.h"
|
42
43
|
|
43
44
|
|
44
45
|
namespace v8 {
|
45
46
|
namespace internal {
|
46
47
|
|
47
|
-
Condition NegateCondition(Condition cc) {
|
48
|
-
ASSERT(cc != al);
|
49
|
-
return static_cast<Condition>(cc ^ ne);
|
50
|
-
}
|
51
|
-
|
52
48
|
|
53
49
|
void RelocInfo::apply(intptr_t delta) {
|
54
50
|
if (RelocInfo::IsInternalReference(rmode_)) {
|
@@ -73,6 +69,11 @@ Address RelocInfo::target_address_address() {
|
|
73
69
|
}
|
74
70
|
|
75
71
|
|
72
|
+
int RelocInfo::target_address_size() {
|
73
|
+
return Assembler::kExternalTargetSize;
|
74
|
+
}
|
75
|
+
|
76
|
+
|
76
77
|
void RelocInfo::set_target_address(Address target) {
|
77
78
|
ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY);
|
78
79
|
Assembler::set_target_address_at(pc_, target);
|
@@ -110,9 +111,10 @@ Address* RelocInfo::target_reference_address() {
|
|
110
111
|
|
111
112
|
|
112
113
|
Address RelocInfo::call_address() {
|
113
|
-
|
114
|
-
//
|
115
|
-
ASSERT(IsJSReturn(rmode()))
|
114
|
+
// The 2 instructions offset assumes patched debug break slot or return
|
115
|
+
// sequence.
|
116
|
+
ASSERT((IsJSReturn(rmode()) && IsPatchedReturnSequence()) ||
|
117
|
+
(IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence()));
|
116
118
|
return Memory::Address_at(pc_ + 2 * Assembler::kInstrSize);
|
117
119
|
}
|
118
120
|
|
@@ -162,17 +164,38 @@ bool RelocInfo::IsPatchedReturnSequence() {
|
|
162
164
|
}
|
163
165
|
|
164
166
|
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
167
|
+
bool RelocInfo::IsPatchedDebugBreakSlotSequence() {
|
168
|
+
Instr current_instr = Assembler::instr_at(pc_);
|
169
|
+
return !Assembler::IsNop(current_instr, 2);
|
170
|
+
}
|
171
|
+
|
172
|
+
|
173
|
+
void RelocInfo::Visit(ObjectVisitor* visitor) {
|
174
|
+
RelocInfo::Mode mode = rmode();
|
175
|
+
if (mode == RelocInfo::EMBEDDED_OBJECT) {
|
176
|
+
visitor->VisitPointer(target_object_address());
|
177
|
+
} else if (RelocInfo::IsCodeTarget(mode)) {
|
178
|
+
visitor->VisitCodeTarget(this);
|
179
|
+
} else if (mode == RelocInfo::EXTERNAL_REFERENCE) {
|
180
|
+
visitor->VisitExternalReference(target_reference_address());
|
181
|
+
#ifdef ENABLE_DEBUGGER_SUPPORT
|
182
|
+
} else if (Debug::has_break_points() &&
|
183
|
+
((RelocInfo::IsJSReturn(mode) &&
|
184
|
+
IsPatchedReturnSequence()) ||
|
185
|
+
(RelocInfo::IsDebugBreakSlot(mode) &&
|
186
|
+
IsPatchedDebugBreakSlotSequence()))) {
|
187
|
+
visitor->VisitDebugTarget(this);
|
188
|
+
#endif
|
189
|
+
} else if (mode == RelocInfo::RUNTIME_ENTRY) {
|
190
|
+
visitor->VisitRuntimeEntry(this);
|
191
|
+
}
|
169
192
|
}
|
170
193
|
|
171
194
|
|
172
|
-
Operand::Operand(
|
195
|
+
Operand::Operand(int32_t immediate, RelocInfo::Mode rmode) {
|
173
196
|
rm_ = no_reg;
|
174
|
-
imm32_ =
|
175
|
-
rmode_ =
|
197
|
+
imm32_ = immediate;
|
198
|
+
rmode_ = rmode;
|
176
199
|
}
|
177
200
|
|
178
201
|
|
@@ -36,6 +36,8 @@
|
|
36
36
|
|
37
37
|
#include "v8.h"
|
38
38
|
|
39
|
+
#if defined(V8_TARGET_ARCH_ARM)
|
40
|
+
|
39
41
|
#include "arm/assembler-arm-inl.h"
|
40
42
|
#include "serialize.h"
|
41
43
|
|
@@ -106,6 +108,15 @@ void CpuFeatures::Probe() {
|
|
106
108
|
const int RelocInfo::kApplyMask = 0;
|
107
109
|
|
108
110
|
|
111
|
+
bool RelocInfo::IsCodedSpecially() {
|
112
|
+
// The deserializer needs to know whether a pointer is specially coded. Being
|
113
|
+
// specially coded on ARM means that it is a movw/movt instruction. We don't
|
114
|
+
// generate those yet.
|
115
|
+
return false;
|
116
|
+
}
|
117
|
+
|
118
|
+
|
119
|
+
|
109
120
|
void RelocInfo::PatchCode(byte* instructions, int instruction_count) {
|
110
121
|
// Patch the code at the current address with the supplied instructions.
|
111
122
|
Instr* pc = reinterpret_cast<Instr*>(pc_);
|
@@ -268,6 +279,39 @@ const Instr kBlxRegMask =
|
|
268
279
|
15 * B24 | 15 * B20 | 15 * B16 | 15 * B12 | 15 * B8 | 15 * B4;
|
269
280
|
const Instr kBlxRegPattern =
|
270
281
|
B24 | B21 | 15 * B16 | 15 * B12 | 15 * B8 | 3 * B4;
|
282
|
+
const Instr kMovMvnMask = 0x6d * B21 | 0xf * B16;
|
283
|
+
const Instr kMovMvnPattern = 0xd * B21;
|
284
|
+
const Instr kMovMvnFlip = B22;
|
285
|
+
const Instr kMovLeaveCCMask = 0xdff * B16;
|
286
|
+
const Instr kMovLeaveCCPattern = 0x1a0 * B16;
|
287
|
+
const Instr kMovwMask = 0xff * B20;
|
288
|
+
const Instr kMovwPattern = 0x30 * B20;
|
289
|
+
const Instr kMovwLeaveCCFlip = 0x5 * B21;
|
290
|
+
const Instr kCmpCmnMask = 0xdd * B20 | 0xf * B12;
|
291
|
+
const Instr kCmpCmnPattern = 0x15 * B20;
|
292
|
+
const Instr kCmpCmnFlip = B21;
|
293
|
+
const Instr kALUMask = 0x6f * B21;
|
294
|
+
const Instr kAddPattern = 0x4 * B21;
|
295
|
+
const Instr kSubPattern = 0x2 * B21;
|
296
|
+
const Instr kBicPattern = 0xe * B21;
|
297
|
+
const Instr kAndPattern = 0x0 * B21;
|
298
|
+
const Instr kAddSubFlip = 0x6 * B21;
|
299
|
+
const Instr kAndBicFlip = 0xe * B21;
|
300
|
+
|
301
|
+
// A mask for the Rd register for push, pop, ldr, str instructions.
|
302
|
+
const Instr kRdMask = 0x0000f000;
|
303
|
+
static const int kRdShift = 12;
|
304
|
+
static const Instr kLdrRegFpOffsetPattern =
|
305
|
+
al | B26 | L | Offset | fp.code() * B16;
|
306
|
+
static const Instr kStrRegFpOffsetPattern =
|
307
|
+
al | B26 | Offset | fp.code() * B16;
|
308
|
+
static const Instr kLdrRegFpNegOffsetPattern =
|
309
|
+
al | B26 | L | NegOffset | fp.code() * B16;
|
310
|
+
static const Instr kStrRegFpNegOffsetPattern =
|
311
|
+
al | B26 | NegOffset | fp.code() * B16;
|
312
|
+
static const Instr kLdrStrInstrTypeMask = 0xffff0000;
|
313
|
+
static const Instr kLdrStrInstrArgumentMask = 0x0000ffff;
|
314
|
+
static const Instr kLdrStrOffsetMask = 0x00000fff;
|
271
315
|
|
272
316
|
// Spare buffer.
|
273
317
|
static const int kMinimalBufferSize = 4*KB;
|
@@ -350,6 +394,12 @@ void Assembler::Align(int m) {
|
|
350
394
|
}
|
351
395
|
|
352
396
|
|
397
|
+
void Assembler::CodeTargetAlign() {
|
398
|
+
// Preferred alignment of jump targets on some ARM chips.
|
399
|
+
Align(8);
|
400
|
+
}
|
401
|
+
|
402
|
+
|
353
403
|
bool Assembler::IsNop(Instr instr, int type) {
|
354
404
|
// Check for mov rx, rx.
|
355
405
|
ASSERT(0 <= type && type <= 14); // mov pc, pc is not a nop.
|
@@ -395,6 +445,74 @@ Instr Assembler::SetLdrRegisterImmediateOffset(Instr instr, int offset) {
|
|
395
445
|
}
|
396
446
|
|
397
447
|
|
448
|
+
bool Assembler::IsStrRegisterImmediate(Instr instr) {
|
449
|
+
return (instr & (B27 | B26 | B25 | B22 | B20)) == B26;
|
450
|
+
}
|
451
|
+
|
452
|
+
|
453
|
+
Instr Assembler::SetStrRegisterImmediateOffset(Instr instr, int offset) {
|
454
|
+
ASSERT(IsStrRegisterImmediate(instr));
|
455
|
+
bool positive = offset >= 0;
|
456
|
+
if (!positive) offset = -offset;
|
457
|
+
ASSERT(is_uint12(offset));
|
458
|
+
// Set bit indicating whether the offset should be added.
|
459
|
+
instr = (instr & ~B23) | (positive ? B23 : 0);
|
460
|
+
// Set the actual offset.
|
461
|
+
return (instr & ~Off12Mask) | offset;
|
462
|
+
}
|
463
|
+
|
464
|
+
|
465
|
+
bool Assembler::IsAddRegisterImmediate(Instr instr) {
|
466
|
+
return (instr & (B27 | B26 | B25 | B24 | B23 | B22 | B21)) == (B25 | B23);
|
467
|
+
}
|
468
|
+
|
469
|
+
|
470
|
+
Instr Assembler::SetAddRegisterImmediateOffset(Instr instr, int offset) {
|
471
|
+
ASSERT(IsAddRegisterImmediate(instr));
|
472
|
+
ASSERT(offset >= 0);
|
473
|
+
ASSERT(is_uint12(offset));
|
474
|
+
// Set the offset.
|
475
|
+
return (instr & ~Off12Mask) | offset;
|
476
|
+
}
|
477
|
+
|
478
|
+
|
479
|
+
Register Assembler::GetRd(Instr instr) {
|
480
|
+
Register reg;
|
481
|
+
reg.code_ = ((instr & kRdMask) >> kRdShift);
|
482
|
+
return reg;
|
483
|
+
}
|
484
|
+
|
485
|
+
|
486
|
+
bool Assembler::IsPush(Instr instr) {
|
487
|
+
return ((instr & ~kRdMask) == kPushRegPattern);
|
488
|
+
}
|
489
|
+
|
490
|
+
|
491
|
+
bool Assembler::IsPop(Instr instr) {
|
492
|
+
return ((instr & ~kRdMask) == kPopRegPattern);
|
493
|
+
}
|
494
|
+
|
495
|
+
|
496
|
+
bool Assembler::IsStrRegFpOffset(Instr instr) {
|
497
|
+
return ((instr & kLdrStrInstrTypeMask) == kStrRegFpOffsetPattern);
|
498
|
+
}
|
499
|
+
|
500
|
+
|
501
|
+
bool Assembler::IsLdrRegFpOffset(Instr instr) {
|
502
|
+
return ((instr & kLdrStrInstrTypeMask) == kLdrRegFpOffsetPattern);
|
503
|
+
}
|
504
|
+
|
505
|
+
|
506
|
+
bool Assembler::IsStrRegFpNegOffset(Instr instr) {
|
507
|
+
return ((instr & kLdrStrInstrTypeMask) == kStrRegFpNegOffsetPattern);
|
508
|
+
}
|
509
|
+
|
510
|
+
|
511
|
+
bool Assembler::IsLdrRegFpNegOffset(Instr instr) {
|
512
|
+
return ((instr & kLdrStrInstrTypeMask) == kLdrRegFpNegOffsetPattern);
|
513
|
+
}
|
514
|
+
|
515
|
+
|
398
516
|
// Labels refer to positions in the (to be) generated code.
|
399
517
|
// There are bound, linked, and unused labels.
|
400
518
|
//
|
@@ -564,7 +682,16 @@ void Assembler::next(Label* L) {
|
|
564
682
|
}
|
565
683
|
|
566
684
|
|
685
|
+
static Instr EncodeMovwImmediate(uint32_t immediate) {
|
686
|
+
ASSERT(immediate < 0x10000);
|
687
|
+
return ((immediate & 0xf000) << 4) | (immediate & 0xfff);
|
688
|
+
}
|
689
|
+
|
690
|
+
|
567
691
|
// Low-level code emission routines depending on the addressing mode.
|
692
|
+
// If this returns true then you have to use the rotate_imm and immed_8
|
693
|
+
// that it returns, because it may have already changed the instruction
|
694
|
+
// to match them!
|
568
695
|
static bool fits_shifter(uint32_t imm32,
|
569
696
|
uint32_t* rotate_imm,
|
570
697
|
uint32_t* immed_8,
|
@@ -578,11 +705,43 @@ static bool fits_shifter(uint32_t imm32,
|
|
578
705
|
return true;
|
579
706
|
}
|
580
707
|
}
|
581
|
-
// If the opcode is
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
708
|
+
// If the opcode is one with a complementary version and the complementary
|
709
|
+
// immediate fits, change the opcode.
|
710
|
+
if (instr != NULL) {
|
711
|
+
if ((*instr & kMovMvnMask) == kMovMvnPattern) {
|
712
|
+
if (fits_shifter(~imm32, rotate_imm, immed_8, NULL)) {
|
713
|
+
*instr ^= kMovMvnFlip;
|
714
|
+
return true;
|
715
|
+
} else if ((*instr & kMovLeaveCCMask) == kMovLeaveCCPattern) {
|
716
|
+
if (CpuFeatures::IsSupported(ARMv7)) {
|
717
|
+
if (imm32 < 0x10000) {
|
718
|
+
*instr ^= kMovwLeaveCCFlip;
|
719
|
+
*instr |= EncodeMovwImmediate(imm32);
|
720
|
+
*rotate_imm = *immed_8 = 0; // Not used for movw.
|
721
|
+
return true;
|
722
|
+
}
|
723
|
+
}
|
724
|
+
}
|
725
|
+
} else if ((*instr & kCmpCmnMask) == kCmpCmnPattern) {
|
726
|
+
if (fits_shifter(-imm32, rotate_imm, immed_8, NULL)) {
|
727
|
+
*instr ^= kCmpCmnFlip;
|
728
|
+
return true;
|
729
|
+
}
|
730
|
+
} else {
|
731
|
+
Instr alu_insn = (*instr & kALUMask);
|
732
|
+
if (alu_insn == kAddPattern ||
|
733
|
+
alu_insn == kSubPattern) {
|
734
|
+
if (fits_shifter(-imm32, rotate_imm, immed_8, NULL)) {
|
735
|
+
*instr ^= kAddSubFlip;
|
736
|
+
return true;
|
737
|
+
}
|
738
|
+
} else if (alu_insn == kAndPattern ||
|
739
|
+
alu_insn == kBicPattern) {
|
740
|
+
if (fits_shifter(~imm32, rotate_imm, immed_8, NULL)) {
|
741
|
+
*instr ^= kAndBicFlip;
|
742
|
+
return true;
|
743
|
+
}
|
744
|
+
}
|
586
745
|
}
|
587
746
|
}
|
588
747
|
return false;
|
@@ -593,7 +752,7 @@ static bool fits_shifter(uint32_t imm32,
|
|
593
752
|
// if they can be encoded in the ARM's 12 bits of immediate-offset instruction
|
594
753
|
// space. There is no guarantee that the relocated location can be similarly
|
595
754
|
// encoded.
|
596
|
-
static bool
|
755
|
+
static bool MustUseConstantPool(RelocInfo::Mode rmode) {
|
597
756
|
if (rmode == RelocInfo::EXTERNAL_REFERENCE) {
|
598
757
|
#ifdef DEBUG
|
599
758
|
if (!Serializer::enabled()) {
|
@@ -608,6 +767,14 @@ static bool MustUseIp(RelocInfo::Mode rmode) {
|
|
608
767
|
}
|
609
768
|
|
610
769
|
|
770
|
+
bool Operand::is_single_instruction() const {
|
771
|
+
if (rm_.is_valid()) return true;
|
772
|
+
if (MustUseConstantPool(rmode_)) return false;
|
773
|
+
uint32_t dummy1, dummy2;
|
774
|
+
return fits_shifter(imm32_, &dummy1, &dummy2, NULL);
|
775
|
+
}
|
776
|
+
|
777
|
+
|
611
778
|
void Assembler::addrmod1(Instr instr,
|
612
779
|
Register rn,
|
613
780
|
Register rd,
|
@@ -618,19 +785,34 @@ void Assembler::addrmod1(Instr instr,
|
|
618
785
|
// Immediate.
|
619
786
|
uint32_t rotate_imm;
|
620
787
|
uint32_t immed_8;
|
621
|
-
if (
|
788
|
+
if (MustUseConstantPool(x.rmode_) ||
|
622
789
|
!fits_shifter(x.imm32_, &rotate_imm, &immed_8, &instr)) {
|
623
790
|
// The immediate operand cannot be encoded as a shifter operand, so load
|
624
791
|
// it first to register ip and change the original instruction to use ip.
|
625
792
|
// However, if the original instruction is a 'mov rd, x' (not setting the
|
626
793
|
// condition code), then replace it with a 'ldr rd, [pc]'.
|
627
|
-
RecordRelocInfo(x.rmode_, x.imm32_);
|
628
794
|
CHECK(!rn.is(ip)); // rn should never be ip, or will be trashed
|
629
795
|
Condition cond = static_cast<Condition>(instr & CondMask);
|
630
796
|
if ((instr & ~CondMask) == 13*B21) { // mov, S not set
|
631
|
-
|
797
|
+
if (MustUseConstantPool(x.rmode_) ||
|
798
|
+
!CpuFeatures::IsSupported(ARMv7)) {
|
799
|
+
RecordRelocInfo(x.rmode_, x.imm32_);
|
800
|
+
ldr(rd, MemOperand(pc, 0), cond);
|
801
|
+
} else {
|
802
|
+
// Will probably use movw, will certainly not use constant pool.
|
803
|
+
mov(rd, Operand(x.imm32_ & 0xffff), LeaveCC, cond);
|
804
|
+
movt(rd, static_cast<uint32_t>(x.imm32_) >> 16, cond);
|
805
|
+
}
|
632
806
|
} else {
|
633
|
-
|
807
|
+
// If this is not a mov or mvn instruction we may still be able to avoid
|
808
|
+
// a constant pool entry by using mvn or movw.
|
809
|
+
if (!MustUseConstantPool(x.rmode_) &&
|
810
|
+
(instr & kMovMvnMask) != kMovMvnPattern) {
|
811
|
+
mov(ip, x, LeaveCC, cond);
|
812
|
+
} else {
|
813
|
+
RecordRelocInfo(x.rmode_, x.imm32_);
|
814
|
+
ldr(ip, MemOperand(pc, 0), cond);
|
815
|
+
}
|
634
816
|
addrmod1(instr, rn, rd, Operand(ip));
|
635
817
|
}
|
636
818
|
return;
|
@@ -645,9 +827,10 @@ void Assembler::addrmod1(Instr instr,
|
|
645
827
|
instr |= x.rs_.code()*B8 | x.shift_op_ | B4 | x.rm_.code();
|
646
828
|
}
|
647
829
|
emit(instr | rn.code()*B16 | rd.code()*B12);
|
648
|
-
if (rn.is(pc) || x.rm_.is(pc))
|
830
|
+
if (rn.is(pc) || x.rm_.is(pc)) {
|
649
831
|
// Block constant pool emission for one instruction after reading pc.
|
650
832
|
BlockConstPoolBefore(pc_offset() + kInstrSize);
|
833
|
+
}
|
651
834
|
}
|
652
835
|
|
653
836
|
|
@@ -841,20 +1024,6 @@ void Assembler::bx(Register target, Condition cond) { // v5 and above, plus v4t
|
|
841
1024
|
|
842
1025
|
// Data-processing instructions.
|
843
1026
|
|
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
|
-
|
858
1027
|
void Assembler::and_(Register dst, Register src1, const Operand& src2,
|
859
1028
|
SBit s, Condition cond) {
|
860
1029
|
addrmod1(cond | 0*B21 | s, src1, dst, src2);
|
@@ -887,15 +1056,12 @@ void Assembler::add(Register dst, Register src1, const Operand& src2,
|
|
887
1056
|
// str(src, MemOperand(sp, 4, NegPreIndex), al);
|
888
1057
|
// add(sp, sp, Operand(kPointerSize));
|
889
1058
|
// Both instructions can be eliminated.
|
890
|
-
|
891
|
-
if (FLAG_push_pop_elimination &&
|
892
|
-
last_bound_pos_ <= (pc_offset() - pattern_size) &&
|
893
|
-
reloc_info_writer.last_pc() <= (pc_ - pattern_size) &&
|
1059
|
+
if (can_peephole_optimize(2) &&
|
894
1060
|
// Pattern.
|
895
1061
|
instr_at(pc_ - 1 * kInstrSize) == kPopInstruction &&
|
896
1062
|
(instr_at(pc_ - 2 * kInstrSize) & ~RdMask) == kPushRegPattern) {
|
897
1063
|
pc_ -= 2 * kInstrSize;
|
898
|
-
if (
|
1064
|
+
if (FLAG_print_peephole_optimization) {
|
899
1065
|
PrintF("%x push(reg)/pop() eliminated\n", pc_offset());
|
900
1066
|
}
|
901
1067
|
}
|
@@ -958,6 +1124,17 @@ void Assembler::mov(Register dst, const Operand& src, SBit s, Condition cond) {
|
|
958
1124
|
}
|
959
1125
|
|
960
1126
|
|
1127
|
+
void Assembler::movw(Register reg, uint32_t immediate, Condition cond) {
|
1128
|
+
ASSERT(immediate < 0x10000);
|
1129
|
+
mov(reg, Operand(immediate), LeaveCC, cond);
|
1130
|
+
}
|
1131
|
+
|
1132
|
+
|
1133
|
+
void Assembler::movt(Register reg, uint32_t immediate, Condition cond) {
|
1134
|
+
emit(cond | 0x34*B20 | reg.code()*B12 | EncodeMovwImmediate(immediate));
|
1135
|
+
}
|
1136
|
+
|
1137
|
+
|
961
1138
|
void Assembler::bic(Register dst, Register src1, const Operand& src2,
|
962
1139
|
SBit s, Condition cond) {
|
963
1140
|
addrmod1(cond | 14*B21 | s, src1, dst, src2);
|
@@ -1047,6 +1224,106 @@ void Assembler::clz(Register dst, Register src, Condition cond) {
|
|
1047
1224
|
}
|
1048
1225
|
|
1049
1226
|
|
1227
|
+
// Saturating instructions.
|
1228
|
+
|
1229
|
+
// Unsigned saturate.
|
1230
|
+
void Assembler::usat(Register dst,
|
1231
|
+
int satpos,
|
1232
|
+
const Operand& src,
|
1233
|
+
Condition cond) {
|
1234
|
+
// v6 and above.
|
1235
|
+
ASSERT(CpuFeatures::IsSupported(ARMv7));
|
1236
|
+
ASSERT(!dst.is(pc) && !src.rm_.is(pc));
|
1237
|
+
ASSERT((satpos >= 0) && (satpos <= 31));
|
1238
|
+
ASSERT((src.shift_op_ == ASR) || (src.shift_op_ == LSL));
|
1239
|
+
ASSERT(src.rs_.is(no_reg));
|
1240
|
+
|
1241
|
+
int sh = 0;
|
1242
|
+
if (src.shift_op_ == ASR) {
|
1243
|
+
sh = 1;
|
1244
|
+
}
|
1245
|
+
|
1246
|
+
emit(cond | 0x6*B24 | 0xe*B20 | satpos*B16 | dst.code()*B12 |
|
1247
|
+
src.shift_imm_*B7 | sh*B6 | 0x1*B4 | src.rm_.code());
|
1248
|
+
}
|
1249
|
+
|
1250
|
+
|
1251
|
+
// Bitfield manipulation instructions.
|
1252
|
+
|
1253
|
+
// Unsigned bit field extract.
|
1254
|
+
// Extracts #width adjacent bits from position #lsb in a register, and
|
1255
|
+
// writes them to the low bits of a destination register.
|
1256
|
+
// ubfx dst, src, #lsb, #width
|
1257
|
+
void Assembler::ubfx(Register dst,
|
1258
|
+
Register src,
|
1259
|
+
int lsb,
|
1260
|
+
int width,
|
1261
|
+
Condition cond) {
|
1262
|
+
// v7 and above.
|
1263
|
+
ASSERT(CpuFeatures::IsSupported(ARMv7));
|
1264
|
+
ASSERT(!dst.is(pc) && !src.is(pc));
|
1265
|
+
ASSERT((lsb >= 0) && (lsb <= 31));
|
1266
|
+
ASSERT((width >= 1) && (width <= (32 - lsb)));
|
1267
|
+
emit(cond | 0xf*B23 | B22 | B21 | (width - 1)*B16 | dst.code()*B12 |
|
1268
|
+
lsb*B7 | B6 | B4 | src.code());
|
1269
|
+
}
|
1270
|
+
|
1271
|
+
|
1272
|
+
// Signed bit field extract.
|
1273
|
+
// Extracts #width adjacent bits from position #lsb in a register, and
|
1274
|
+
// writes them to the low bits of a destination register. The extracted
|
1275
|
+
// value is sign extended to fill the destination register.
|
1276
|
+
// sbfx dst, src, #lsb, #width
|
1277
|
+
void Assembler::sbfx(Register dst,
|
1278
|
+
Register src,
|
1279
|
+
int lsb,
|
1280
|
+
int width,
|
1281
|
+
Condition cond) {
|
1282
|
+
// v7 and above.
|
1283
|
+
ASSERT(CpuFeatures::IsSupported(ARMv7));
|
1284
|
+
ASSERT(!dst.is(pc) && !src.is(pc));
|
1285
|
+
ASSERT((lsb >= 0) && (lsb <= 31));
|
1286
|
+
ASSERT((width >= 1) && (width <= (32 - lsb)));
|
1287
|
+
emit(cond | 0xf*B23 | B21 | (width - 1)*B16 | dst.code()*B12 |
|
1288
|
+
lsb*B7 | B6 | B4 | src.code());
|
1289
|
+
}
|
1290
|
+
|
1291
|
+
|
1292
|
+
// Bit field clear.
|
1293
|
+
// Sets #width adjacent bits at position #lsb in the destination register
|
1294
|
+
// to zero, preserving the value of the other bits.
|
1295
|
+
// bfc dst, #lsb, #width
|
1296
|
+
void Assembler::bfc(Register dst, int lsb, int width, Condition cond) {
|
1297
|
+
// v7 and above.
|
1298
|
+
ASSERT(CpuFeatures::IsSupported(ARMv7));
|
1299
|
+
ASSERT(!dst.is(pc));
|
1300
|
+
ASSERT((lsb >= 0) && (lsb <= 31));
|
1301
|
+
ASSERT((width >= 1) && (width <= (32 - lsb)));
|
1302
|
+
int msb = lsb + width - 1;
|
1303
|
+
emit(cond | 0x1f*B22 | msb*B16 | dst.code()*B12 | lsb*B7 | B4 | 0xf);
|
1304
|
+
}
|
1305
|
+
|
1306
|
+
|
1307
|
+
// Bit field insert.
|
1308
|
+
// Inserts #width adjacent bits from the low bits of the source register
|
1309
|
+
// into position #lsb of the destination register.
|
1310
|
+
// bfi dst, src, #lsb, #width
|
1311
|
+
void Assembler::bfi(Register dst,
|
1312
|
+
Register src,
|
1313
|
+
int lsb,
|
1314
|
+
int width,
|
1315
|
+
Condition cond) {
|
1316
|
+
// v7 and above.
|
1317
|
+
ASSERT(CpuFeatures::IsSupported(ARMv7));
|
1318
|
+
ASSERT(!dst.is(pc) && !src.is(pc));
|
1319
|
+
ASSERT((lsb >= 0) && (lsb <= 31));
|
1320
|
+
ASSERT((width >= 1) && (width <= (32 - lsb)));
|
1321
|
+
int msb = lsb + width - 1;
|
1322
|
+
emit(cond | 0x1f*B22 | msb*B16 | dst.code()*B12 | lsb*B7 | B4 |
|
1323
|
+
src.code());
|
1324
|
+
}
|
1325
|
+
|
1326
|
+
|
1050
1327
|
// Status register access instructions.
|
1051
1328
|
void Assembler::mrs(Register dst, SRegister s, Condition cond) {
|
1052
1329
|
ASSERT(!dst.is(pc));
|
@@ -1062,7 +1339,7 @@ void Assembler::msr(SRegisterFieldMask fields, const Operand& src,
|
|
1062
1339
|
// Immediate.
|
1063
1340
|
uint32_t rotate_imm;
|
1064
1341
|
uint32_t immed_8;
|
1065
|
-
if (
|
1342
|
+
if (MustUseConstantPool(src.rmode_) ||
|
1066
1343
|
!fits_shifter(src.imm32_, &rotate_imm, &immed_8, NULL)) {
|
1067
1344
|
// Immediate operand cannot be encoded, load it first to register ip.
|
1068
1345
|
RecordRelocInfo(src.rmode_, src.imm32_);
|
@@ -1086,20 +1363,171 @@ void Assembler::ldr(Register dst, const MemOperand& src, Condition cond) {
|
|
1086
1363
|
}
|
1087
1364
|
addrmod2(cond | B26 | L, dst, src);
|
1088
1365
|
|
1089
|
-
// Eliminate pattern: push(
|
1090
|
-
// str(
|
1091
|
-
// ldr(
|
1092
|
-
// Both instructions can be eliminated.
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1366
|
+
// Eliminate pattern: push(ry), pop(rx)
|
1367
|
+
// str(ry, MemOperand(sp, 4, NegPreIndex), al)
|
1368
|
+
// ldr(rx, MemOperand(sp, 4, PostIndex), al)
|
1369
|
+
// Both instructions can be eliminated if ry = rx.
|
1370
|
+
// If ry != rx, a register copy from ry to rx is inserted
|
1371
|
+
// after eliminating the push and the pop instructions.
|
1372
|
+
if (can_peephole_optimize(2)) {
|
1373
|
+
Instr push_instr = instr_at(pc_ - 2 * kInstrSize);
|
1374
|
+
Instr pop_instr = instr_at(pc_ - 1 * kInstrSize);
|
1375
|
+
|
1376
|
+
if (IsPush(push_instr) && IsPop(pop_instr)) {
|
1377
|
+
if ((pop_instr & kRdMask) != (push_instr & kRdMask)) {
|
1378
|
+
// For consecutive push and pop on different registers,
|
1379
|
+
// we delete both the push & pop and insert a register move.
|
1380
|
+
// push ry, pop rx --> mov rx, ry
|
1381
|
+
Register reg_pushed, reg_popped;
|
1382
|
+
reg_pushed = GetRd(push_instr);
|
1383
|
+
reg_popped = GetRd(pop_instr);
|
1384
|
+
pc_ -= 2 * kInstrSize;
|
1385
|
+
// Insert a mov instruction, which is better than a pair of push & pop
|
1386
|
+
mov(reg_popped, reg_pushed);
|
1387
|
+
if (FLAG_print_peephole_optimization) {
|
1388
|
+
PrintF("%x push/pop (diff reg) replaced by a reg move\n",
|
1389
|
+
pc_offset());
|
1390
|
+
}
|
1391
|
+
} else {
|
1392
|
+
// For consecutive push and pop on the same register,
|
1393
|
+
// both the push and the pop can be deleted.
|
1394
|
+
pc_ -= 2 * kInstrSize;
|
1395
|
+
if (FLAG_print_peephole_optimization) {
|
1396
|
+
PrintF("%x push/pop (same reg) eliminated\n", pc_offset());
|
1397
|
+
}
|
1398
|
+
}
|
1399
|
+
}
|
1400
|
+
}
|
1401
|
+
|
1402
|
+
if (can_peephole_optimize(2)) {
|
1403
|
+
Instr str_instr = instr_at(pc_ - 2 * kInstrSize);
|
1404
|
+
Instr ldr_instr = instr_at(pc_ - 1 * kInstrSize);
|
1405
|
+
|
1406
|
+
if ((IsStrRegFpOffset(str_instr) &&
|
1407
|
+
IsLdrRegFpOffset(ldr_instr)) ||
|
1408
|
+
(IsStrRegFpNegOffset(str_instr) &&
|
1409
|
+
IsLdrRegFpNegOffset(ldr_instr))) {
|
1410
|
+
if ((ldr_instr & kLdrStrInstrArgumentMask) ==
|
1411
|
+
(str_instr & kLdrStrInstrArgumentMask)) {
|
1412
|
+
// Pattern: Ldr/str same fp+offset, same register.
|
1413
|
+
//
|
1414
|
+
// The following:
|
1415
|
+
// str rx, [fp, #-12]
|
1416
|
+
// ldr rx, [fp, #-12]
|
1417
|
+
//
|
1418
|
+
// Becomes:
|
1419
|
+
// str rx, [fp, #-12]
|
1420
|
+
|
1421
|
+
pc_ -= 1 * kInstrSize;
|
1422
|
+
if (FLAG_print_peephole_optimization) {
|
1423
|
+
PrintF("%x str/ldr (fp + same offset), same reg\n", pc_offset());
|
1424
|
+
}
|
1425
|
+
} else if ((ldr_instr & kLdrStrOffsetMask) ==
|
1426
|
+
(str_instr & kLdrStrOffsetMask)) {
|
1427
|
+
// Pattern: Ldr/str same fp+offset, different register.
|
1428
|
+
//
|
1429
|
+
// The following:
|
1430
|
+
// str rx, [fp, #-12]
|
1431
|
+
// ldr ry, [fp, #-12]
|
1432
|
+
//
|
1433
|
+
// Becomes:
|
1434
|
+
// str rx, [fp, #-12]
|
1435
|
+
// mov ry, rx
|
1436
|
+
|
1437
|
+
Register reg_stored, reg_loaded;
|
1438
|
+
reg_stored = GetRd(str_instr);
|
1439
|
+
reg_loaded = GetRd(ldr_instr);
|
1440
|
+
pc_ -= 1 * kInstrSize;
|
1441
|
+
// Insert a mov instruction, which is better than ldr.
|
1442
|
+
mov(reg_loaded, reg_stored);
|
1443
|
+
if (FLAG_print_peephole_optimization) {
|
1444
|
+
PrintF("%x str/ldr (fp + same offset), diff reg \n", pc_offset());
|
1445
|
+
}
|
1446
|
+
}
|
1447
|
+
}
|
1448
|
+
}
|
1449
|
+
|
1450
|
+
if (can_peephole_optimize(3)) {
|
1451
|
+
Instr mem_write_instr = instr_at(pc_ - 3 * kInstrSize);
|
1452
|
+
Instr ldr_instr = instr_at(pc_ - 2 * kInstrSize);
|
1453
|
+
Instr mem_read_instr = instr_at(pc_ - 1 * kInstrSize);
|
1454
|
+
if (IsPush(mem_write_instr) &&
|
1455
|
+
IsPop(mem_read_instr)) {
|
1456
|
+
if ((IsLdrRegFpOffset(ldr_instr) ||
|
1457
|
+
IsLdrRegFpNegOffset(ldr_instr))) {
|
1458
|
+
if ((mem_write_instr & kRdMask) ==
|
1459
|
+
(mem_read_instr & kRdMask)) {
|
1460
|
+
// Pattern: push & pop from/to same register,
|
1461
|
+
// with a fp+offset ldr in between
|
1462
|
+
//
|
1463
|
+
// The following:
|
1464
|
+
// str rx, [sp, #-4]!
|
1465
|
+
// ldr rz, [fp, #-24]
|
1466
|
+
// ldr rx, [sp], #+4
|
1467
|
+
//
|
1468
|
+
// Becomes:
|
1469
|
+
// if(rx == rz)
|
1470
|
+
// delete all
|
1471
|
+
// else
|
1472
|
+
// ldr rz, [fp, #-24]
|
1473
|
+
|
1474
|
+
if ((mem_write_instr & kRdMask) == (ldr_instr & kRdMask)) {
|
1475
|
+
pc_ -= 3 * kInstrSize;
|
1476
|
+
} else {
|
1477
|
+
pc_ -= 3 * kInstrSize;
|
1478
|
+
// Reinsert back the ldr rz.
|
1479
|
+
emit(ldr_instr);
|
1480
|
+
}
|
1481
|
+
if (FLAG_print_peephole_optimization) {
|
1482
|
+
PrintF("%x push/pop -dead ldr fp+offset in middle\n", pc_offset());
|
1483
|
+
}
|
1484
|
+
} else {
|
1485
|
+
// Pattern: push & pop from/to different registers
|
1486
|
+
// with a fp+offset ldr in between
|
1487
|
+
//
|
1488
|
+
// The following:
|
1489
|
+
// str rx, [sp, #-4]!
|
1490
|
+
// ldr rz, [fp, #-24]
|
1491
|
+
// ldr ry, [sp], #+4
|
1492
|
+
//
|
1493
|
+
// Becomes:
|
1494
|
+
// if(ry == rz)
|
1495
|
+
// mov ry, rx;
|
1496
|
+
// else if(rx != rz)
|
1497
|
+
// ldr rz, [fp, #-24]
|
1498
|
+
// mov ry, rx
|
1499
|
+
// else if((ry != rz) || (rx == rz)) becomes:
|
1500
|
+
// mov ry, rx
|
1501
|
+
// ldr rz, [fp, #-24]
|
1502
|
+
|
1503
|
+
Register reg_pushed, reg_popped;
|
1504
|
+
if ((mem_read_instr & kRdMask) == (ldr_instr & kRdMask)) {
|
1505
|
+
reg_pushed = GetRd(mem_write_instr);
|
1506
|
+
reg_popped = GetRd(mem_read_instr);
|
1507
|
+
pc_ -= 3 * kInstrSize;
|
1508
|
+
mov(reg_popped, reg_pushed);
|
1509
|
+
} else if ((mem_write_instr & kRdMask)
|
1510
|
+
!= (ldr_instr & kRdMask)) {
|
1511
|
+
reg_pushed = GetRd(mem_write_instr);
|
1512
|
+
reg_popped = GetRd(mem_read_instr);
|
1513
|
+
pc_ -= 3 * kInstrSize;
|
1514
|
+
emit(ldr_instr);
|
1515
|
+
mov(reg_popped, reg_pushed);
|
1516
|
+
} else if (((mem_read_instr & kRdMask)
|
1517
|
+
!= (ldr_instr & kRdMask)) ||
|
1518
|
+
((mem_write_instr & kRdMask)
|
1519
|
+
== (ldr_instr & kRdMask)) ) {
|
1520
|
+
reg_pushed = GetRd(mem_write_instr);
|
1521
|
+
reg_popped = GetRd(mem_read_instr);
|
1522
|
+
pc_ -= 3 * kInstrSize;
|
1523
|
+
mov(reg_popped, reg_pushed);
|
1524
|
+
emit(ldr_instr);
|
1525
|
+
}
|
1526
|
+
if (FLAG_print_peephole_optimization) {
|
1527
|
+
PrintF("%x push/pop (ldr fp+off in middle)\n", pc_offset());
|
1528
|
+
}
|
1529
|
+
}
|
1530
|
+
}
|
1103
1531
|
}
|
1104
1532
|
}
|
1105
1533
|
}
|
@@ -1111,16 +1539,13 @@ void Assembler::str(Register src, const MemOperand& dst, Condition cond) {
|
|
1111
1539
|
// Eliminate pattern: pop(), push(r)
|
1112
1540
|
// add sp, sp, #4 LeaveCC, al; str r, [sp, #-4], al
|
1113
1541
|
// -> str r, [sp, 0], al
|
1114
|
-
|
1115
|
-
if (FLAG_push_pop_elimination &&
|
1116
|
-
last_bound_pos_ <= (pc_offset() - pattern_size) &&
|
1117
|
-
reloc_info_writer.last_pc() <= (pc_ - pattern_size) &&
|
1542
|
+
if (can_peephole_optimize(2) &&
|
1118
1543
|
// Pattern.
|
1119
1544
|
instr_at(pc_ - 1 * kInstrSize) == (kPushRegPattern | src.code() * B12) &&
|
1120
1545
|
instr_at(pc_ - 2 * kInstrSize) == kPopInstruction) {
|
1121
1546
|
pc_ -= 2 * kInstrSize;
|
1122
1547
|
emit(al | B26 | 0 | Offset | sp.code() * B16 | src.code() * B12);
|
1123
|
-
if (
|
1548
|
+
if (FLAG_print_peephole_optimization) {
|
1124
1549
|
PrintF("%x pop()/push(reg) eliminated\n", pc_offset());
|
1125
1550
|
}
|
1126
1551
|
}
|
@@ -1157,6 +1582,27 @@ void Assembler::ldrsh(Register dst, const MemOperand& src, Condition cond) {
|
|
1157
1582
|
}
|
1158
1583
|
|
1159
1584
|
|
1585
|
+
void Assembler::ldrd(Register dst1, Register dst2,
|
1586
|
+
const MemOperand& src, Condition cond) {
|
1587
|
+
ASSERT(CpuFeatures::IsEnabled(ARMv7));
|
1588
|
+
ASSERT(src.rm().is(no_reg));
|
1589
|
+
ASSERT(!dst1.is(lr)); // r14.
|
1590
|
+
ASSERT_EQ(0, dst1.code() % 2);
|
1591
|
+
ASSERT_EQ(dst1.code() + 1, dst2.code());
|
1592
|
+
addrmod3(cond | B7 | B6 | B4, dst1, src);
|
1593
|
+
}
|
1594
|
+
|
1595
|
+
|
1596
|
+
void Assembler::strd(Register src1, Register src2,
|
1597
|
+
const MemOperand& dst, Condition cond) {
|
1598
|
+
ASSERT(dst.rm().is(no_reg));
|
1599
|
+
ASSERT(!src1.is(lr)); // r14.
|
1600
|
+
ASSERT_EQ(0, src1.code() % 2);
|
1601
|
+
ASSERT_EQ(src1.code() + 1, src2.code());
|
1602
|
+
ASSERT(CpuFeatures::IsEnabled(ARMv7));
|
1603
|
+
addrmod3(cond | B7 | B6 | B5 | B4, src1, dst);
|
1604
|
+
}
|
1605
|
+
|
1160
1606
|
// Load/Store multiple instructions.
|
1161
1607
|
void Assembler::ldm(BlockAddrMode am,
|
1162
1608
|
Register base,
|
@@ -1187,26 +1633,6 @@ void Assembler::stm(BlockAddrMode am,
|
|
1187
1633
|
}
|
1188
1634
|
|
1189
1635
|
|
1190
|
-
// Semaphore instructions.
|
1191
|
-
void Assembler::swp(Register dst, Register src, Register base, Condition cond) {
|
1192
|
-
ASSERT(!dst.is(pc) && !src.is(pc) && !base.is(pc));
|
1193
|
-
ASSERT(!dst.is(base) && !src.is(base));
|
1194
|
-
emit(cond | P | base.code()*B16 | dst.code()*B12 |
|
1195
|
-
B7 | B4 | src.code());
|
1196
|
-
}
|
1197
|
-
|
1198
|
-
|
1199
|
-
void Assembler::swpb(Register dst,
|
1200
|
-
Register src,
|
1201
|
-
Register base,
|
1202
|
-
Condition cond) {
|
1203
|
-
ASSERT(!dst.is(pc) && !src.is(pc) && !base.is(pc));
|
1204
|
-
ASSERT(!dst.is(base) && !src.is(base));
|
1205
|
-
emit(cond | P | B | base.code()*B16 | dst.code()*B12 |
|
1206
|
-
B7 | B4 | src.code());
|
1207
|
-
}
|
1208
|
-
|
1209
|
-
|
1210
1636
|
// Exception-generating instructions and debugging support.
|
1211
1637
|
void Assembler::stop(const char* msg) {
|
1212
1638
|
#ifndef __arm__
|
@@ -1431,6 +1857,124 @@ void Assembler::vstr(const DwVfpRegister src,
|
|
1431
1857
|
}
|
1432
1858
|
|
1433
1859
|
|
1860
|
+
static void DoubleAsTwoUInt32(double d, uint32_t* lo, uint32_t* hi) {
|
1861
|
+
uint64_t i;
|
1862
|
+
memcpy(&i, &d, 8);
|
1863
|
+
|
1864
|
+
*lo = i & 0xffffffff;
|
1865
|
+
*hi = i >> 32;
|
1866
|
+
}
|
1867
|
+
|
1868
|
+
// Only works for little endian floating point formats.
|
1869
|
+
// We don't support VFP on the mixed endian floating point platform.
|
1870
|
+
static bool FitsVMOVDoubleImmediate(double d, uint32_t *encoding) {
|
1871
|
+
ASSERT(CpuFeatures::IsEnabled(VFP3));
|
1872
|
+
|
1873
|
+
// VMOV can accept an immediate of the form:
|
1874
|
+
//
|
1875
|
+
// +/- m * 2^(-n) where 16 <= m <= 31 and 0 <= n <= 7
|
1876
|
+
//
|
1877
|
+
// The immediate is encoded using an 8-bit quantity, comprised of two
|
1878
|
+
// 4-bit fields. For an 8-bit immediate of the form:
|
1879
|
+
//
|
1880
|
+
// [abcdefgh]
|
1881
|
+
//
|
1882
|
+
// where a is the MSB and h is the LSB, an immediate 64-bit double can be
|
1883
|
+
// created of the form:
|
1884
|
+
//
|
1885
|
+
// [aBbbbbbb,bbcdefgh,00000000,00000000,
|
1886
|
+
// 00000000,00000000,00000000,00000000]
|
1887
|
+
//
|
1888
|
+
// where B = ~b.
|
1889
|
+
//
|
1890
|
+
|
1891
|
+
uint32_t lo, hi;
|
1892
|
+
DoubleAsTwoUInt32(d, &lo, &hi);
|
1893
|
+
|
1894
|
+
// The most obvious constraint is the long block of zeroes.
|
1895
|
+
if ((lo != 0) || ((hi & 0xffff) != 0)) {
|
1896
|
+
return false;
|
1897
|
+
}
|
1898
|
+
|
1899
|
+
// Bits 62:55 must be all clear or all set.
|
1900
|
+
if (((hi & 0x3fc00000) != 0) && ((hi & 0x3fc00000) != 0x3fc00000)) {
|
1901
|
+
return false;
|
1902
|
+
}
|
1903
|
+
|
1904
|
+
// Bit 63 must be NOT bit 62.
|
1905
|
+
if (((hi ^ (hi << 1)) & (0x40000000)) == 0) {
|
1906
|
+
return false;
|
1907
|
+
}
|
1908
|
+
|
1909
|
+
// Create the encoded immediate in the form:
|
1910
|
+
// [00000000,0000abcd,00000000,0000efgh]
|
1911
|
+
*encoding = (hi >> 16) & 0xf; // Low nybble.
|
1912
|
+
*encoding |= (hi >> 4) & 0x70000; // Low three bits of the high nybble.
|
1913
|
+
*encoding |= (hi >> 12) & 0x80000; // Top bit of the high nybble.
|
1914
|
+
|
1915
|
+
return true;
|
1916
|
+
}
|
1917
|
+
|
1918
|
+
|
1919
|
+
void Assembler::vmov(const DwVfpRegister dst,
|
1920
|
+
double imm,
|
1921
|
+
const Condition cond) {
|
1922
|
+
// Dd = immediate
|
1923
|
+
// Instruction details available in ARM DDI 0406B, A8-640.
|
1924
|
+
ASSERT(CpuFeatures::IsEnabled(VFP3));
|
1925
|
+
|
1926
|
+
uint32_t enc;
|
1927
|
+
if (FitsVMOVDoubleImmediate(imm, &enc)) {
|
1928
|
+
// The double can be encoded in the instruction.
|
1929
|
+
emit(cond | 0xE*B24 | 0xB*B20 | dst.code()*B12 | 0xB*B8 | enc);
|
1930
|
+
} else {
|
1931
|
+
// Synthesise the double from ARM immediates. This could be implemented
|
1932
|
+
// using vldr from a constant pool.
|
1933
|
+
uint32_t lo, hi;
|
1934
|
+
DoubleAsTwoUInt32(imm, &lo, &hi);
|
1935
|
+
|
1936
|
+
if (lo == hi) {
|
1937
|
+
// If the lo and hi parts of the double are equal, the literal is easier
|
1938
|
+
// to create. This is the case with 0.0.
|
1939
|
+
mov(ip, Operand(lo));
|
1940
|
+
vmov(dst, ip, ip);
|
1941
|
+
} else {
|
1942
|
+
// Move the low part of the double into the lower of the corresponsing S
|
1943
|
+
// registers of D register dst.
|
1944
|
+
mov(ip, Operand(lo));
|
1945
|
+
vmov(dst.low(), ip, cond);
|
1946
|
+
|
1947
|
+
// Move the high part of the double into the higher of the corresponsing S
|
1948
|
+
// registers of D register dst.
|
1949
|
+
mov(ip, Operand(hi));
|
1950
|
+
vmov(dst.high(), ip, cond);
|
1951
|
+
}
|
1952
|
+
}
|
1953
|
+
}
|
1954
|
+
|
1955
|
+
|
1956
|
+
void Assembler::vmov(const SwVfpRegister dst,
|
1957
|
+
const SwVfpRegister src,
|
1958
|
+
const Condition cond) {
|
1959
|
+
// Sd = Sm
|
1960
|
+
// Instruction details available in ARM DDI 0406B, A8-642.
|
1961
|
+
ASSERT(CpuFeatures::IsEnabled(VFP3));
|
1962
|
+
emit(cond | 0xE*B24 | 0xB*B20 |
|
1963
|
+
dst.code()*B12 | 0x5*B9 | B6 | src.code());
|
1964
|
+
}
|
1965
|
+
|
1966
|
+
|
1967
|
+
void Assembler::vmov(const DwVfpRegister dst,
|
1968
|
+
const DwVfpRegister src,
|
1969
|
+
const Condition cond) {
|
1970
|
+
// Dd = Dm
|
1971
|
+
// Instruction details available in ARM DDI 0406B, A8-642.
|
1972
|
+
ASSERT(CpuFeatures::IsEnabled(VFP3));
|
1973
|
+
emit(cond | 0xE*B24 | 0xB*B20 |
|
1974
|
+
dst.code()*B12 | 0x5*B9 | B8 | B6 | src.code());
|
1975
|
+
}
|
1976
|
+
|
1977
|
+
|
1434
1978
|
void Assembler::vmov(const DwVfpRegister dst,
|
1435
1979
|
const Register src1,
|
1436
1980
|
const Register src2,
|
@@ -1742,6 +2286,18 @@ void Assembler::vmrs(Register dst, Condition cond) {
|
|
1742
2286
|
}
|
1743
2287
|
|
1744
2288
|
|
2289
|
+
|
2290
|
+
void Assembler::vsqrt(const DwVfpRegister dst,
|
2291
|
+
const DwVfpRegister src,
|
2292
|
+
const Condition cond) {
|
2293
|
+
// cond(31-28) | 11101 (27-23)| D=?(22) | 11 (21-20) | 0001 (19-16) |
|
2294
|
+
// Vd(15-12) | 101(11-9) | sz(8)=1 | 11 (7-6) | M(5)=? | 0(4) | Vm(3-0)
|
2295
|
+
ASSERT(CpuFeatures::IsEnabled(VFP3));
|
2296
|
+
emit(cond | 0xE*B24 | B23 | 0x3*B20 | B16 |
|
2297
|
+
dst.code()*B12 | 0x5*B9 | B8 | 3*B6 | src.code());
|
2298
|
+
}
|
2299
|
+
|
2300
|
+
|
1745
2301
|
// Pseudo instructions.
|
1746
2302
|
void Assembler::nop(int type) {
|
1747
2303
|
// This is mov rx, rx.
|
@@ -1750,34 +2306,6 @@ void Assembler::nop(int type) {
|
|
1750
2306
|
}
|
1751
2307
|
|
1752
2308
|
|
1753
|
-
void Assembler::lea(Register dst,
|
1754
|
-
const MemOperand& x,
|
1755
|
-
SBit s,
|
1756
|
-
Condition cond) {
|
1757
|
-
int am = x.am_;
|
1758
|
-
if (!x.rm_.is_valid()) {
|
1759
|
-
// Immediate offset.
|
1760
|
-
if ((am & P) == 0) // post indexing
|
1761
|
-
mov(dst, Operand(x.rn_), s, cond);
|
1762
|
-
else if ((am & U) == 0) // negative indexing
|
1763
|
-
sub(dst, x.rn_, Operand(x.offset_), s, cond);
|
1764
|
-
else
|
1765
|
-
add(dst, x.rn_, Operand(x.offset_), s, cond);
|
1766
|
-
} else {
|
1767
|
-
// Register offset (shift_imm_ and shift_op_ are 0) or scaled
|
1768
|
-
// register offset the constructors make sure than both shift_imm_
|
1769
|
-
// and shift_op_ are initialized.
|
1770
|
-
ASSERT(!x.rm_.is(pc));
|
1771
|
-
if ((am & P) == 0) // post indexing
|
1772
|
-
mov(dst, Operand(x.rn_), s, cond);
|
1773
|
-
else if ((am & U) == 0) // negative indexing
|
1774
|
-
sub(dst, x.rn_, Operand(x.rm_, x.shift_op_, x.shift_imm_), s, cond);
|
1775
|
-
else
|
1776
|
-
add(dst, x.rn_, Operand(x.rm_, x.shift_op_, x.shift_imm_), s, cond);
|
1777
|
-
}
|
1778
|
-
}
|
1779
|
-
|
1780
|
-
|
1781
2309
|
bool Assembler::ImmediateFitsAddrMode1Instruction(int32_t imm32) {
|
1782
2310
|
uint32_t dummy1;
|
1783
2311
|
uint32_t dummy2;
|
@@ -1798,6 +2326,13 @@ void Assembler::RecordJSReturn() {
|
|
1798
2326
|
}
|
1799
2327
|
|
1800
2328
|
|
2329
|
+
void Assembler::RecordDebugBreakSlot() {
|
2330
|
+
WriteRecordedPositions();
|
2331
|
+
CheckBuffer();
|
2332
|
+
RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT);
|
2333
|
+
}
|
2334
|
+
|
2335
|
+
|
1801
2336
|
void Assembler::RecordComment(const char* msg) {
|
1802
2337
|
if (FLAG_debug_code) {
|
1803
2338
|
CheckBuffer();
|
@@ -1820,13 +2355,16 @@ void Assembler::RecordStatementPosition(int pos) {
|
|
1820
2355
|
}
|
1821
2356
|
|
1822
2357
|
|
1823
|
-
|
2358
|
+
bool Assembler::WriteRecordedPositions() {
|
2359
|
+
bool written = false;
|
2360
|
+
|
1824
2361
|
// Write the statement position if it is different from what was written last
|
1825
2362
|
// time.
|
1826
2363
|
if (current_statement_position_ != written_statement_position_) {
|
1827
2364
|
CheckBuffer();
|
1828
2365
|
RecordRelocInfo(RelocInfo::STATEMENT_POSITION, current_statement_position_);
|
1829
2366
|
written_statement_position_ = current_statement_position_;
|
2367
|
+
written = true;
|
1830
2368
|
}
|
1831
2369
|
|
1832
2370
|
// Write the position if it is different from what was written last time and
|
@@ -1836,7 +2374,11 @@ void Assembler::WriteRecordedPositions() {
|
|
1836
2374
|
CheckBuffer();
|
1837
2375
|
RecordRelocInfo(RelocInfo::POSITION, current_position_);
|
1838
2376
|
written_position_ = current_position_;
|
2377
|
+
written = true;
|
1839
2378
|
}
|
2379
|
+
|
2380
|
+
// Return whether something was written.
|
2381
|
+
return written;
|
1840
2382
|
}
|
1841
2383
|
|
1842
2384
|
|
@@ -1893,9 +2435,10 @@ void Assembler::GrowBuffer() {
|
|
1893
2435
|
|
1894
2436
|
void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) {
|
1895
2437
|
RelocInfo rinfo(pc_, rmode, data); // we do not try to reuse pool constants
|
1896
|
-
if (rmode >= RelocInfo::JS_RETURN && rmode <= RelocInfo::
|
2438
|
+
if (rmode >= RelocInfo::JS_RETURN && rmode <= RelocInfo::DEBUG_BREAK_SLOT) {
|
1897
2439
|
// Adjust code for new modes.
|
1898
|
-
ASSERT(RelocInfo::
|
2440
|
+
ASSERT(RelocInfo::IsDebugBreakSlot(rmode)
|
2441
|
+
|| RelocInfo::IsJSReturn(rmode)
|
1899
2442
|
|| RelocInfo::IsComment(rmode)
|
1900
2443
|
|| RelocInfo::IsPosition(rmode));
|
1901
2444
|
// These modes do not need an entry in the constant pool.
|
@@ -2033,3 +2576,5 @@ void Assembler::CheckConstPool(bool force_emit, bool require_jump) {
|
|
2033
2576
|
|
2034
2577
|
|
2035
2578
|
} } // namespace v8::internal
|
2579
|
+
|
2580
|
+
#endif // V8_TARGET_ARCH_ARM
|