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
@@ -27,6 +27,8 @@
|
|
27
27
|
|
28
28
|
#include "v8.h"
|
29
29
|
|
30
|
+
#if defined(V8_TARGET_ARCH_IA32)
|
31
|
+
|
30
32
|
#include "codegen-inl.h"
|
31
33
|
#include "register-allocator-inl.h"
|
32
34
|
#include "scopes.h"
|
@@ -1032,7 +1034,7 @@ Result VirtualFrame::CallKeyedLoadIC(RelocInfo::Mode mode) {
|
|
1032
1034
|
|
1033
1035
|
Result VirtualFrame::CallStoreIC(Handle<String> name, bool is_contextual) {
|
1034
1036
|
// Value and (if not contextual) receiver are on top of the frame.
|
1035
|
-
//
|
1037
|
+
// The IC expects name in ecx, value in eax, and receiver in edx.
|
1036
1038
|
Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Initialize));
|
1037
1039
|
Result value = Pop();
|
1038
1040
|
if (is_contextual) {
|
@@ -1117,6 +1119,24 @@ Result VirtualFrame::CallCallIC(RelocInfo::Mode mode,
|
|
1117
1119
|
}
|
1118
1120
|
|
1119
1121
|
|
1122
|
+
Result VirtualFrame::CallKeyedCallIC(RelocInfo::Mode mode,
|
1123
|
+
int arg_count,
|
1124
|
+
int loop_nesting) {
|
1125
|
+
// Function name, arguments, and receiver are on top of the frame.
|
1126
|
+
// The IC expects the name in ecx and the rest on the stack and
|
1127
|
+
// drops them all.
|
1128
|
+
InLoopFlag in_loop = loop_nesting > 0 ? IN_LOOP : NOT_IN_LOOP;
|
1129
|
+
Handle<Code> ic = cgen()->ComputeKeyedCallInitialize(arg_count, in_loop);
|
1130
|
+
// Spill args, receiver, and function. The call will drop args and
|
1131
|
+
// receiver.
|
1132
|
+
Result name = Pop();
|
1133
|
+
PrepareForCall(arg_count + 1, arg_count + 1); // Arguments + receiver.
|
1134
|
+
name.ToRegister(ecx);
|
1135
|
+
name.Unuse();
|
1136
|
+
return RawCallCodeObject(ic, mode);
|
1137
|
+
}
|
1138
|
+
|
1139
|
+
|
1120
1140
|
Result VirtualFrame::CallConstructor(int arg_count) {
|
1121
1141
|
// Arguments, receiver, and function are on top of the frame. The
|
1122
1142
|
// IC expects arg count in eax, function in edi, and the arguments
|
@@ -1310,3 +1330,5 @@ void VirtualFrame::Push(Expression* expr) {
|
|
1310
1330
|
#undef __
|
1311
1331
|
|
1312
1332
|
} } // namespace v8::internal
|
1333
|
+
|
1334
|
+
#endif // V8_TARGET_ARCH_IA32
|
@@ -28,9 +28,10 @@
|
|
28
28
|
#ifndef V8_IA32_VIRTUAL_FRAME_IA32_H_
|
29
29
|
#define V8_IA32_VIRTUAL_FRAME_IA32_H_
|
30
30
|
|
31
|
-
#include "
|
31
|
+
#include "codegen.h"
|
32
32
|
#include "register-allocator.h"
|
33
33
|
#include "scopes.h"
|
34
|
+
#include "type-info.h"
|
34
35
|
|
35
36
|
namespace v8 {
|
36
37
|
namespace internal {
|
@@ -97,23 +98,16 @@ class VirtualFrame: public ZoneObject {
|
|
97
98
|
return register_locations_[num];
|
98
99
|
}
|
99
100
|
|
100
|
-
int register_location(Register reg)
|
101
|
-
return register_locations_[RegisterAllocator::ToNumber(reg)];
|
102
|
-
}
|
101
|
+
inline int register_location(Register reg);
|
103
102
|
|
104
|
-
void set_register_location(Register reg, int index)
|
105
|
-
register_locations_[RegisterAllocator::ToNumber(reg)] = index;
|
106
|
-
}
|
103
|
+
inline void set_register_location(Register reg, int index);
|
107
104
|
|
108
105
|
bool is_used(int num) {
|
109
106
|
ASSERT(num >= 0 && num < RegisterAllocator::kNumRegisters);
|
110
107
|
return register_locations_[num] != kIllegalIndex;
|
111
108
|
}
|
112
109
|
|
113
|
-
bool is_used(Register reg)
|
114
|
-
return register_locations_[RegisterAllocator::ToNumber(reg)]
|
115
|
-
!= kIllegalIndex;
|
116
|
-
}
|
110
|
+
inline bool is_used(Register reg);
|
117
111
|
|
118
112
|
// Add extra in-memory elements to the top of the frame to match an actual
|
119
113
|
// frame (eg, the frame after an exception handler is pushed). No code is
|
@@ -150,6 +144,9 @@ class VirtualFrame: public ZoneObject {
|
|
150
144
|
// (ie, they all have frame-external references).
|
151
145
|
Register SpillAnyRegister();
|
152
146
|
|
147
|
+
// Spill the top element of the frame.
|
148
|
+
void SpillTop() { SpillElementAt(element_count() - 1); }
|
149
|
+
|
153
150
|
// Sync the range of elements in [begin, end] with memory.
|
154
151
|
void SyncRange(int begin, int end);
|
155
152
|
|
@@ -217,10 +214,7 @@ class VirtualFrame: public ZoneObject {
|
|
217
214
|
void SetElementAt(int index, Result* value);
|
218
215
|
|
219
216
|
// Set a frame element to a constant. The index is frame-top relative.
|
220
|
-
void SetElementAt(int index, Handle<Object> value)
|
221
|
-
Result temp(value);
|
222
|
-
SetElementAt(index, &temp);
|
223
|
-
}
|
217
|
+
inline void SetElementAt(int index, Handle<Object> value);
|
224
218
|
|
225
219
|
void PushElementAt(int index) {
|
226
220
|
PushFrameSlotAt(element_count() - index - 1);
|
@@ -315,10 +309,7 @@ class VirtualFrame: public ZoneObject {
|
|
315
309
|
|
316
310
|
// Call stub given the number of arguments it expects on (and
|
317
311
|
// removes from) the stack.
|
318
|
-
Result CallStub(CodeStub* stub, int arg_count)
|
319
|
-
PrepareForCall(arg_count, arg_count);
|
320
|
-
return RawCallStub(stub);
|
321
|
-
}
|
312
|
+
inline Result CallStub(CodeStub* stub, int arg_count);
|
322
313
|
|
323
314
|
// Call stub that takes a single argument passed in eax. The
|
324
315
|
// argument is given as a result which does not have to be eax or
|
@@ -361,7 +352,7 @@ class VirtualFrame: public ZoneObject {
|
|
361
352
|
Result CallStoreIC(Handle<String> name, bool is_contextual);
|
362
353
|
|
363
354
|
// Call keyed store IC. Value, key, and receiver are found on top
|
364
|
-
// of the frame.
|
355
|
+
// of the frame. All three are dropped.
|
365
356
|
Result CallKeyedStoreIC();
|
366
357
|
|
367
358
|
// Call call IC. Function name, arguments, and receiver are found on top
|
@@ -369,6 +360,9 @@ class VirtualFrame: public ZoneObject {
|
|
369
360
|
// include the receiver.
|
370
361
|
Result CallCallIC(RelocInfo::Mode mode, int arg_count, int loop_nesting);
|
371
362
|
|
363
|
+
// Call keyed call IC. Same calling convention as CallCallIC.
|
364
|
+
Result CallKeyedCallIC(RelocInfo::Mode mode, int arg_count, int loop_nesting);
|
365
|
+
|
372
366
|
// Allocate and call JS function as constructor. Arguments,
|
373
367
|
// receiver (global object), and function are found on top of the
|
374
368
|
// frame. Function is not dropped. The argument count does not
|
@@ -473,12 +467,9 @@ class VirtualFrame: public ZoneObject {
|
|
473
467
|
int register_locations_[RegisterAllocator::kNumRegisters];
|
474
468
|
|
475
469
|
// The number of frame-allocated locals and parameters respectively.
|
476
|
-
int parameter_count()
|
477
|
-
|
478
|
-
|
479
|
-
int local_count() {
|
480
|
-
return cgen()->scope()->num_stack_slots();
|
481
|
-
}
|
470
|
+
inline int parameter_count();
|
471
|
+
|
472
|
+
inline int local_count();
|
482
473
|
|
483
474
|
// The index of the element that is at the processor's frame pointer
|
484
475
|
// (the ebp register). The parameters, receiver, and return address
|
@@ -627,7 +618,7 @@ class VirtualFrame: public ZoneObject {
|
|
627
618
|
inline bool Equals(VirtualFrame* other);
|
628
619
|
|
629
620
|
// Classes that need raw access to the elements_ array.
|
630
|
-
friend class
|
621
|
+
friend class FrameRegisterState;
|
631
622
|
friend class JumpTarget;
|
632
623
|
};
|
633
624
|
|
@@ -80,11 +80,38 @@ void IC::SetTargetAtAddress(Address address, Code* target) {
|
|
80
80
|
}
|
81
81
|
|
82
82
|
|
83
|
-
|
84
|
-
|
83
|
+
InlineCacheHolderFlag IC::GetCodeCacheForObject(Object* object,
|
84
|
+
JSObject* holder) {
|
85
|
+
if (object->IsJSObject()) {
|
86
|
+
return GetCodeCacheForObject(JSObject::cast(object), holder);
|
87
|
+
}
|
85
88
|
// If the object is a value, we use the prototype map for the cache.
|
86
89
|
ASSERT(object->IsString() || object->IsNumber() || object->IsBoolean());
|
87
|
-
return
|
90
|
+
return PROTOTYPE_MAP;
|
91
|
+
}
|
92
|
+
|
93
|
+
|
94
|
+
InlineCacheHolderFlag IC::GetCodeCacheForObject(JSObject* object,
|
95
|
+
JSObject* holder) {
|
96
|
+
// Fast-properties and global objects store stubs in their own maps.
|
97
|
+
// Slow properties objects use prototype's map (unless the property is its own
|
98
|
+
// when holder == object). It works because slow properties objects having
|
99
|
+
// the same prototype (or a prototype with the same map) and not having
|
100
|
+
// the property are interchangeable for such a stub.
|
101
|
+
if (holder != object &&
|
102
|
+
!object->HasFastProperties() &&
|
103
|
+
!object->IsJSGlobalProxy() &&
|
104
|
+
!object->IsJSGlobalObject()) {
|
105
|
+
return PROTOTYPE_MAP;
|
106
|
+
}
|
107
|
+
return OWN_MAP;
|
108
|
+
}
|
109
|
+
|
110
|
+
|
111
|
+
Map* IC::GetCodeCacheMap(Object* object, InlineCacheHolderFlag holder) {
|
112
|
+
Object* map_owner = (holder == OWN_MAP ? object : object->GetPrototype());
|
113
|
+
ASSERT(map_owner->IsJSObject());
|
114
|
+
return JSObject::cast(map_owner)->map();
|
88
115
|
}
|
89
116
|
|
90
117
|
|
@@ -58,7 +58,7 @@ static char TransitionMarkFromState(IC::State state) {
|
|
58
58
|
}
|
59
59
|
|
60
60
|
void IC::TraceIC(const char* type,
|
61
|
-
Handle<
|
61
|
+
Handle<Object> name,
|
62
62
|
State old_state,
|
63
63
|
Code* new_target,
|
64
64
|
const char* extra_info) {
|
@@ -134,13 +134,45 @@ Address IC::OriginalCodeAddress() {
|
|
134
134
|
}
|
135
135
|
#endif
|
136
136
|
|
137
|
+
|
138
|
+
static bool HasNormalObjectsInPrototypeChain(LookupResult* lookup,
|
139
|
+
Object* receiver) {
|
140
|
+
Object* end = lookup->IsProperty() ? lookup->holder() : Heap::null_value();
|
141
|
+
for (Object* current = receiver;
|
142
|
+
current != end;
|
143
|
+
current = current->GetPrototype()) {
|
144
|
+
if (current->IsJSObject() &&
|
145
|
+
!JSObject::cast(current)->HasFastProperties() &&
|
146
|
+
!current->IsJSGlobalProxy() &&
|
147
|
+
!current->IsJSGlobalObject()) {
|
148
|
+
return true;
|
149
|
+
}
|
150
|
+
}
|
151
|
+
|
152
|
+
return false;
|
153
|
+
}
|
154
|
+
|
155
|
+
|
137
156
|
IC::State IC::StateFrom(Code* target, Object* receiver, Object* name) {
|
138
157
|
IC::State state = target->ic_state();
|
139
158
|
|
140
159
|
if (state != MONOMORPHIC) return state;
|
141
160
|
if (receiver->IsUndefined() || receiver->IsNull()) return state;
|
142
161
|
|
143
|
-
|
162
|
+
InlineCacheHolderFlag cache_holder =
|
163
|
+
Code::ExtractCacheHolderFromFlags(target->flags());
|
164
|
+
|
165
|
+
|
166
|
+
if (cache_holder == OWN_MAP && !receiver->IsJSObject()) {
|
167
|
+
// The stub was generated for JSObject but called for non-JSObject.
|
168
|
+
// IC::GetCodeCacheMap is not applicable.
|
169
|
+
return MONOMORPHIC;
|
170
|
+
} else if (cache_holder == PROTOTYPE_MAP &&
|
171
|
+
receiver->GetPrototype()->IsNull()) {
|
172
|
+
// IC::GetCodeCacheMap is not applicable.
|
173
|
+
return MONOMORPHIC;
|
174
|
+
}
|
175
|
+
Map* map = IC::GetCodeCacheMap(receiver, cache_holder);
|
144
176
|
|
145
177
|
// Decide whether the inline cache failed because of changes to the
|
146
178
|
// receiver itself or changes to one of its prototypes.
|
@@ -152,11 +184,13 @@ IC::State IC::StateFrom(Code* target, Object* receiver, Object* name) {
|
|
152
184
|
// to prototype check failure.
|
153
185
|
int index = map->IndexInCodeCache(name, target);
|
154
186
|
if (index >= 0) {
|
155
|
-
// For keyed load/store, the most likely cause of cache failure is
|
187
|
+
// For keyed load/store/call, the most likely cause of cache failure is
|
156
188
|
// that the key has changed. We do not distinguish between
|
157
189
|
// prototype and non-prototype failures for keyed access.
|
158
190
|
Code::Kind kind = target->kind();
|
159
|
-
if (kind == Code::KEYED_LOAD_IC ||
|
191
|
+
if (kind == Code::KEYED_LOAD_IC ||
|
192
|
+
kind == Code::KEYED_STORE_IC ||
|
193
|
+
kind == Code::KEYED_CALL_IC) {
|
160
194
|
return MONOMORPHIC;
|
161
195
|
}
|
162
196
|
|
@@ -196,9 +230,9 @@ RelocInfo::Mode IC::ComputeMode() {
|
|
196
230
|
|
197
231
|
Failure* IC::TypeError(const char* type,
|
198
232
|
Handle<Object> object,
|
199
|
-
Handle<
|
233
|
+
Handle<Object> key) {
|
200
234
|
HandleScope scope;
|
201
|
-
Handle<Object> args[2] = {
|
235
|
+
Handle<Object> args[2] = { key, object };
|
202
236
|
Handle<Object> error = Factory::NewTypeError(type, HandleVector(args, 2));
|
203
237
|
return Top::Throw(*error);
|
204
238
|
}
|
@@ -224,6 +258,7 @@ void IC::Clear(Address address) {
|
|
224
258
|
case Code::STORE_IC: return StoreIC::Clear(address, target);
|
225
259
|
case Code::KEYED_STORE_IC: return KeyedStoreIC::Clear(address, target);
|
226
260
|
case Code::CALL_IC: return CallIC::Clear(address, target);
|
261
|
+
case Code::KEYED_CALL_IC: return KeyedCallIC::Clear(address, target);
|
227
262
|
case Code::BINARY_OP_IC: return; // Clearing these is tricky and does not
|
228
263
|
// make any performance difference.
|
229
264
|
default: UNREACHABLE();
|
@@ -231,16 +266,24 @@ void IC::Clear(Address address) {
|
|
231
266
|
}
|
232
267
|
|
233
268
|
|
234
|
-
void
|
269
|
+
void CallICBase::Clear(Address address, Code* target) {
|
235
270
|
State state = target->ic_state();
|
236
|
-
InLoopFlag in_loop = target->ic_in_loop();
|
237
271
|
if (state == UNINITIALIZED) return;
|
238
272
|
Code* code =
|
239
|
-
StubCache::FindCallInitialize(target->arguments_count(),
|
273
|
+
StubCache::FindCallInitialize(target->arguments_count(),
|
274
|
+
target->ic_in_loop(),
|
275
|
+
target->kind());
|
240
276
|
SetTargetAtAddress(address, code);
|
241
277
|
}
|
242
278
|
|
243
279
|
|
280
|
+
void KeyedLoadIC::ClearInlinedVersion(Address address) {
|
281
|
+
// Insert null as the map to check for to make sure the map check fails
|
282
|
+
// sending control flow to the IC instead of the inlined version.
|
283
|
+
PatchInlinedLoad(address, Heap::null_value());
|
284
|
+
}
|
285
|
+
|
286
|
+
|
244
287
|
void KeyedLoadIC::Clear(Address address, Code* target) {
|
245
288
|
if (target->ic_state() == UNINITIALIZED) return;
|
246
289
|
// Make sure to also clear the map used in inline fast cases. If we
|
@@ -251,6 +294,14 @@ void KeyedLoadIC::Clear(Address address, Code* target) {
|
|
251
294
|
}
|
252
295
|
|
253
296
|
|
297
|
+
void LoadIC::ClearInlinedVersion(Address address) {
|
298
|
+
// Reset the map check of the inlined inobject property load (if
|
299
|
+
// present) to guarantee failure by holding an invalid map (the null
|
300
|
+
// value). The offset can be patched to anything.
|
301
|
+
PatchInlinedLoad(address, Heap::null_value(), 0);
|
302
|
+
}
|
303
|
+
|
304
|
+
|
254
305
|
void LoadIC::Clear(Address address, Code* target) {
|
255
306
|
if (target->ic_state() == UNINITIALIZED) return;
|
256
307
|
ClearInlinedVersion(address);
|
@@ -258,12 +309,36 @@ void LoadIC::Clear(Address address, Code* target) {
|
|
258
309
|
}
|
259
310
|
|
260
311
|
|
312
|
+
void StoreIC::ClearInlinedVersion(Address address) {
|
313
|
+
// Reset the map check of the inlined inobject property store (if
|
314
|
+
// present) to guarantee failure by holding an invalid map (the null
|
315
|
+
// value). The offset can be patched to anything.
|
316
|
+
PatchInlinedStore(address, Heap::null_value(), 0);
|
317
|
+
}
|
318
|
+
|
319
|
+
|
261
320
|
void StoreIC::Clear(Address address, Code* target) {
|
262
321
|
if (target->ic_state() == UNINITIALIZED) return;
|
322
|
+
ClearInlinedVersion(address);
|
263
323
|
SetTargetAtAddress(address, initialize_stub());
|
264
324
|
}
|
265
325
|
|
266
326
|
|
327
|
+
void KeyedStoreIC::ClearInlinedVersion(Address address) {
|
328
|
+
// Insert null as the elements map to check for. This will make
|
329
|
+
// sure that the elements fast-case map check fails so that control
|
330
|
+
// flows to the IC instead of the inlined version.
|
331
|
+
PatchInlinedStore(address, Heap::null_value());
|
332
|
+
}
|
333
|
+
|
334
|
+
|
335
|
+
void KeyedStoreIC::RestoreInlinedVersion(Address address) {
|
336
|
+
// Restore the fast-case elements map check so that the inlined
|
337
|
+
// version can be used again.
|
338
|
+
PatchInlinedStore(address, Heap::fixed_array_map());
|
339
|
+
}
|
340
|
+
|
341
|
+
|
267
342
|
void KeyedStoreIC::Clear(Address address, Code* target) {
|
268
343
|
if (target->ic_state() == UNINITIALIZED) return;
|
269
344
|
SetTargetAtAddress(address, initialize_stub());
|
@@ -364,7 +439,7 @@ static void LookupForRead(Object* object,
|
|
364
439
|
}
|
365
440
|
|
366
441
|
|
367
|
-
Object*
|
442
|
+
Object* CallICBase::TryCallAsFunction(Object* object) {
|
368
443
|
HandleScope scope;
|
369
444
|
Handle<Object> target(object);
|
370
445
|
Handle<Object> delegate = Execution::GetFunctionDelegate(target);
|
@@ -383,7 +458,8 @@ Object* CallIC::TryCallAsFunction(Object* object) {
|
|
383
458
|
return *delegate;
|
384
459
|
}
|
385
460
|
|
386
|
-
|
461
|
+
|
462
|
+
void CallICBase::ReceiverToObject(Handle<Object> object) {
|
387
463
|
HandleScope scope;
|
388
464
|
Handle<Object> receiver(object);
|
389
465
|
|
@@ -396,9 +472,9 @@ void CallIC::ReceiverToObject(Handle<Object> object) {
|
|
396
472
|
}
|
397
473
|
|
398
474
|
|
399
|
-
Object*
|
400
|
-
|
401
|
-
|
475
|
+
Object* CallICBase::LoadFunction(State state,
|
476
|
+
Handle<Object> object,
|
477
|
+
Handle<String> name) {
|
402
478
|
// If the object is undefined or null it's illegal to try to get any
|
403
479
|
// of its properties; throw a TypeError in that case.
|
404
480
|
if (object->IsUndefined() || object->IsNull()) {
|
@@ -481,13 +557,20 @@ Object* CallIC::LoadFunction(State state,
|
|
481
557
|
}
|
482
558
|
|
483
559
|
|
484
|
-
void
|
485
|
-
|
486
|
-
|
487
|
-
|
560
|
+
void CallICBase::UpdateCaches(LookupResult* lookup,
|
561
|
+
State state,
|
562
|
+
Handle<Object> object,
|
563
|
+
Handle<String> name) {
|
488
564
|
// Bail out if we didn't find a result.
|
489
565
|
if (!lookup->IsProperty() || !lookup->IsCacheable()) return;
|
490
566
|
|
567
|
+
if (lookup->holder() != *object &&
|
568
|
+
HasNormalObjectsInPrototypeChain(lookup, object->GetPrototype())) {
|
569
|
+
// Suppress optimization for prototype chains with slow properties objects
|
570
|
+
// in the middle.
|
571
|
+
return;
|
572
|
+
}
|
573
|
+
|
491
574
|
// Compute the number of arguments.
|
492
575
|
int argc = target()->arguments_count();
|
493
576
|
InLoopFlag in_loop = target()->ic_in_loop();
|
@@ -497,16 +580,21 @@ void CallIC::UpdateCaches(LookupResult* lookup,
|
|
497
580
|
// This is the first time we execute this inline cache.
|
498
581
|
// Set the target to the pre monomorphic stub to delay
|
499
582
|
// setting the monomorphic state.
|
500
|
-
code = StubCache::ComputeCallPreMonomorphic(argc, in_loop);
|
583
|
+
code = StubCache::ComputeCallPreMonomorphic(argc, in_loop, kind_);
|
501
584
|
} else if (state == MONOMORPHIC) {
|
502
|
-
code = StubCache::ComputeCallMegamorphic(argc, in_loop);
|
585
|
+
code = StubCache::ComputeCallMegamorphic(argc, in_loop, kind_);
|
503
586
|
} else {
|
504
587
|
// Compute monomorphic stub.
|
505
588
|
switch (lookup->type()) {
|
506
589
|
case FIELD: {
|
507
590
|
int index = lookup->GetFieldIndex();
|
508
|
-
code = StubCache::ComputeCallField(argc,
|
509
|
-
|
591
|
+
code = StubCache::ComputeCallField(argc,
|
592
|
+
in_loop,
|
593
|
+
kind_,
|
594
|
+
*name,
|
595
|
+
*object,
|
596
|
+
lookup->holder(),
|
597
|
+
index);
|
510
598
|
break;
|
511
599
|
}
|
512
600
|
case CONSTANT_FUNCTION: {
|
@@ -514,8 +602,13 @@ void CallIC::UpdateCaches(LookupResult* lookup,
|
|
514
602
|
// call; used for rewriting to monomorphic state and making sure
|
515
603
|
// that the code stub is in the stub cache.
|
516
604
|
JSFunction* function = lookup->GetConstantFunction();
|
517
|
-
code = StubCache::ComputeCallConstant(argc,
|
518
|
-
|
605
|
+
code = StubCache::ComputeCallConstant(argc,
|
606
|
+
in_loop,
|
607
|
+
kind_,
|
608
|
+
*name,
|
609
|
+
*object,
|
610
|
+
lookup->holder(),
|
611
|
+
function);
|
519
612
|
break;
|
520
613
|
}
|
521
614
|
case NORMAL: {
|
@@ -530,6 +623,7 @@ void CallIC::UpdateCaches(LookupResult* lookup,
|
|
530
623
|
JSFunction* function = JSFunction::cast(cell->value());
|
531
624
|
code = StubCache::ComputeCallGlobal(argc,
|
532
625
|
in_loop,
|
626
|
+
kind_,
|
533
627
|
*name,
|
534
628
|
*receiver,
|
535
629
|
global,
|
@@ -541,13 +635,20 @@ void CallIC::UpdateCaches(LookupResult* lookup,
|
|
541
635
|
// property must be found in the receiver for the stub to be
|
542
636
|
// applicable.
|
543
637
|
if (lookup->holder() != *receiver) return;
|
544
|
-
code = StubCache::ComputeCallNormal(argc,
|
638
|
+
code = StubCache::ComputeCallNormal(argc,
|
639
|
+
in_loop,
|
640
|
+
kind_,
|
641
|
+
*name,
|
642
|
+
*receiver);
|
545
643
|
}
|
546
644
|
break;
|
547
645
|
}
|
548
646
|
case INTERCEPTOR: {
|
549
647
|
ASSERT(HasInterceptorGetter(lookup->holder()));
|
550
|
-
code = StubCache::ComputeCallInterceptor(argc,
|
648
|
+
code = StubCache::ComputeCallInterceptor(argc,
|
649
|
+
kind_,
|
650
|
+
*name,
|
651
|
+
*object,
|
551
652
|
lookup->holder());
|
552
653
|
break;
|
553
654
|
}
|
@@ -566,14 +667,59 @@ void CallIC::UpdateCaches(LookupResult* lookup,
|
|
566
667
|
state == MONOMORPHIC ||
|
567
668
|
state == MONOMORPHIC_PROTOTYPE_FAILURE) {
|
568
669
|
set_target(Code::cast(code));
|
670
|
+
} else if (state == MEGAMORPHIC) {
|
671
|
+
// Cache code holding map should be consistent with
|
672
|
+
// GenerateMonomorphicCacheProbe. It is not the map which holds the stub.
|
673
|
+
Map* map = JSObject::cast(object->IsJSObject() ? *object :
|
674
|
+
object->GetPrototype())->map();
|
675
|
+
|
676
|
+
// Update the stub cache.
|
677
|
+
StubCache::Set(*name, map, Code::cast(code));
|
569
678
|
}
|
570
679
|
|
571
680
|
#ifdef DEBUG
|
572
|
-
TraceIC(
|
681
|
+
TraceIC(kind_ == Code::CALL_IC ? "CallIC" : "KeyedCallIC",
|
682
|
+
name, state, target(), in_loop ? " (in-loop)" : "");
|
573
683
|
#endif
|
574
684
|
}
|
575
685
|
|
576
686
|
|
687
|
+
Object* KeyedCallIC::LoadFunction(State state,
|
688
|
+
Handle<Object> object,
|
689
|
+
Handle<Object> key) {
|
690
|
+
if (key->IsSymbol()) {
|
691
|
+
return CallICBase::LoadFunction(state, object, Handle<String>::cast(key));
|
692
|
+
}
|
693
|
+
|
694
|
+
if (object->IsUndefined() || object->IsNull()) {
|
695
|
+
return TypeError("non_object_property_call", object, key);
|
696
|
+
}
|
697
|
+
|
698
|
+
if (object->IsString() || object->IsNumber() || object->IsBoolean()) {
|
699
|
+
ReceiverToObject(object);
|
700
|
+
}
|
701
|
+
|
702
|
+
if (FLAG_use_ic && state != MEGAMORPHIC && !object->IsAccessCheckNeeded()) {
|
703
|
+
int argc = target()->arguments_count();
|
704
|
+
InLoopFlag in_loop = target()->ic_in_loop();
|
705
|
+
Object* code = StubCache::ComputeCallMegamorphic(
|
706
|
+
argc, in_loop, Code::KEYED_CALL_IC);
|
707
|
+
if (!code->IsFailure()) {
|
708
|
+
set_target(Code::cast(code));
|
709
|
+
#ifdef DEBUG
|
710
|
+
TraceIC(
|
711
|
+
"KeyedCallIC", key, state, target(), in_loop ? " (in-loop)" : "");
|
712
|
+
#endif
|
713
|
+
}
|
714
|
+
}
|
715
|
+
Object* result = Runtime::GetObjectProperty(object, key);
|
716
|
+
if (result->IsJSFunction()) return result;
|
717
|
+
result = TryCallAsFunction(result);
|
718
|
+
return result->IsJSFunction() ?
|
719
|
+
result : TypeError("property_not_function", object, key);
|
720
|
+
}
|
721
|
+
|
722
|
+
|
577
723
|
Object* LoadIC::Load(State state, Handle<Object> object, Handle<String> name) {
|
578
724
|
// If the object is undefined or null it's illegal to try to get any
|
579
725
|
// of its properties; throw a TypeError in that case.
|
@@ -596,10 +742,15 @@ Object* LoadIC::Load(State state, Handle<Object> object, Handle<String> name) {
|
|
596
742
|
#ifdef DEBUG
|
597
743
|
if (FLAG_trace_ic) PrintF("[LoadIC : +#length /string]\n");
|
598
744
|
#endif
|
745
|
+
Map* map = HeapObject::cast(*object)->map();
|
746
|
+
if (object->IsString()) {
|
747
|
+
const int offset = String::kLengthOffset;
|
748
|
+
PatchInlinedLoad(address(), map, offset);
|
749
|
+
}
|
750
|
+
|
599
751
|
Code* target = NULL;
|
600
752
|
target = Builtins::builtin(Builtins::LoadIC_StringLength);
|
601
753
|
set_target(target);
|
602
|
-
StubCache::Set(*name, HeapObject::cast(*object)->map(), target);
|
603
754
|
return Smi::FromInt(String::cast(*object)->length());
|
604
755
|
}
|
605
756
|
|
@@ -608,9 +759,12 @@ Object* LoadIC::Load(State state, Handle<Object> object, Handle<String> name) {
|
|
608
759
|
#ifdef DEBUG
|
609
760
|
if (FLAG_trace_ic) PrintF("[LoadIC : +#length /array]\n");
|
610
761
|
#endif
|
762
|
+
Map* map = HeapObject::cast(*object)->map();
|
763
|
+
const int offset = JSArray::kLengthOffset;
|
764
|
+
PatchInlinedLoad(address(), map, offset);
|
765
|
+
|
611
766
|
Code* target = Builtins::builtin(Builtins::LoadIC_ArrayLength);
|
612
767
|
set_target(target);
|
613
|
-
StubCache::Set(*name, HeapObject::cast(*object)->map(), target);
|
614
768
|
return JSArray::cast(*object)->length();
|
615
769
|
}
|
616
770
|
|
@@ -622,7 +776,6 @@ Object* LoadIC::Load(State state, Handle<Object> object, Handle<String> name) {
|
|
622
776
|
#endif
|
623
777
|
Code* target = Builtins::builtin(Builtins::LoadIC_FunctionPrototype);
|
624
778
|
set_target(target);
|
625
|
-
StubCache::Set(*name, HeapObject::cast(*object)->map(), target);
|
626
779
|
return Accessors::FunctionGetPrototype(*object, 0);
|
627
780
|
}
|
628
781
|
}
|
@@ -663,7 +816,31 @@ Object* LoadIC::Load(State state, Handle<Object> object, Handle<String> name) {
|
|
663
816
|
int offset = map->instance_size() + (index * kPointerSize);
|
664
817
|
if (PatchInlinedLoad(address(), map, offset)) {
|
665
818
|
set_target(megamorphic_stub());
|
819
|
+
#ifdef DEBUG
|
820
|
+
if (FLAG_trace_ic) {
|
821
|
+
PrintF("[LoadIC : inline patch %s]\n", *name->ToCString());
|
822
|
+
}
|
823
|
+
#endif
|
666
824
|
return lookup.holder()->FastPropertyAt(lookup.GetFieldIndex());
|
825
|
+
#ifdef DEBUG
|
826
|
+
} else {
|
827
|
+
if (FLAG_trace_ic) {
|
828
|
+
PrintF("[LoadIC : no inline patch %s (patching failed)]\n",
|
829
|
+
*name->ToCString());
|
830
|
+
}
|
831
|
+
}
|
832
|
+
} else {
|
833
|
+
if (FLAG_trace_ic) {
|
834
|
+
PrintF("[LoadIC : no inline patch %s (not inobject)]\n",
|
835
|
+
*name->ToCString());
|
836
|
+
}
|
837
|
+
}
|
838
|
+
} else {
|
839
|
+
if (FLAG_use_ic && state == PREMONOMORPHIC) {
|
840
|
+
if (FLAG_trace_ic) {
|
841
|
+
PrintF("[LoadIC : no inline patch %s (not inlinable)]\n",
|
842
|
+
*name->ToCString());
|
843
|
+
#endif
|
667
844
|
}
|
668
845
|
}
|
669
846
|
}
|
@@ -703,6 +880,8 @@ void LoadIC::UpdateCaches(LookupResult* lookup,
|
|
703
880
|
if (!object->IsJSObject()) return;
|
704
881
|
Handle<JSObject> receiver = Handle<JSObject>::cast(object);
|
705
882
|
|
883
|
+
if (HasNormalObjectsInPrototypeChain(lookup, *object)) return;
|
884
|
+
|
706
885
|
// Compute the code stub for this load.
|
707
886
|
Object* code = NULL;
|
708
887
|
if (state == UNINITIALIZED) {
|
@@ -744,7 +923,7 @@ void LoadIC::UpdateCaches(LookupResult* lookup,
|
|
744
923
|
// property must be found in the receiver for the stub to be
|
745
924
|
// applicable.
|
746
925
|
if (lookup->holder() != *receiver) return;
|
747
|
-
code = StubCache::ComputeLoadNormal(
|
926
|
+
code = StubCache::ComputeLoadNormal();
|
748
927
|
}
|
749
928
|
break;
|
750
929
|
}
|
@@ -778,6 +957,13 @@ void LoadIC::UpdateCaches(LookupResult* lookup,
|
|
778
957
|
set_target(Code::cast(code));
|
779
958
|
} else if (state == MONOMORPHIC) {
|
780
959
|
set_target(megamorphic_stub());
|
960
|
+
} else if (state == MEGAMORPHIC) {
|
961
|
+
// Cache code holding map should be consistent with
|
962
|
+
// GenerateMonomorphicCacheProbe.
|
963
|
+
Map* map = JSObject::cast(object->IsJSObject() ? *object :
|
964
|
+
object->GetPrototype())->map();
|
965
|
+
|
966
|
+
StubCache::Set(*name, map, Code::cast(code));
|
781
967
|
}
|
782
968
|
|
783
969
|
#ifdef DEBUG
|
@@ -897,12 +1083,14 @@ Object* KeyedLoadIC::Load(State state,
|
|
897
1083
|
}
|
898
1084
|
}
|
899
1085
|
set_target(stub);
|
900
|
-
// For JSObjects that are not value wrappers
|
901
|
-
// indexed interceptors, we initialize the
|
902
|
-
// present) by patching the inlined map
|
1086
|
+
// For JSObjects with fast elements that are not value wrappers
|
1087
|
+
// and that do not have indexed interceptors, we initialize the
|
1088
|
+
// inlined fast case (if present) by patching the inlined map
|
1089
|
+
// check.
|
903
1090
|
if (object->IsJSObject() &&
|
904
1091
|
!object->IsJSValue() &&
|
905
|
-
!JSObject::cast(*object)->HasIndexedInterceptor()
|
1092
|
+
!JSObject::cast(*object)->HasIndexedInterceptor() &&
|
1093
|
+
JSObject::cast(*object)->HasFastElements()) {
|
906
1094
|
Map* map = JSObject::cast(*object)->map();
|
907
1095
|
PatchInlinedLoad(address(), map);
|
908
1096
|
}
|
@@ -921,6 +1109,8 @@ void KeyedLoadIC::UpdateCaches(LookupResult* lookup, State state,
|
|
921
1109
|
if (!object->IsJSObject()) return;
|
922
1110
|
Handle<JSObject> receiver = Handle<JSObject>::cast(object);
|
923
1111
|
|
1112
|
+
if (HasNormalObjectsInPrototypeChain(lookup, *object)) return;
|
1113
|
+
|
924
1114
|
// Compute the code stub for this load.
|
925
1115
|
Object* code = NULL;
|
926
1116
|
|
@@ -1041,7 +1231,6 @@ Object* StoreIC::Store(State state,
|
|
1041
1231
|
return *value;
|
1042
1232
|
}
|
1043
1233
|
|
1044
|
-
|
1045
1234
|
// Use specialized code for setting the length of arrays.
|
1046
1235
|
if (receiver->IsJSArray()
|
1047
1236
|
&& name->Equals(Heap::length_symbol())
|
@@ -1051,14 +1240,63 @@ Object* StoreIC::Store(State state,
|
|
1051
1240
|
#endif
|
1052
1241
|
Code* target = Builtins::builtin(Builtins::StoreIC_ArrayLength);
|
1053
1242
|
set_target(target);
|
1054
|
-
StubCache::Set(*name, HeapObject::cast(*object)->map(), target);
|
1055
1243
|
return receiver->SetProperty(*name, *value, NONE);
|
1056
1244
|
}
|
1057
1245
|
|
1058
1246
|
// Lookup the property locally in the receiver.
|
1059
1247
|
if (FLAG_use_ic && !receiver->IsJSGlobalProxy()) {
|
1060
1248
|
LookupResult lookup;
|
1249
|
+
|
1061
1250
|
if (LookupForWrite(*receiver, *name, &lookup)) {
|
1251
|
+
bool can_be_inlined =
|
1252
|
+
state == UNINITIALIZED &&
|
1253
|
+
lookup.IsProperty() &&
|
1254
|
+
lookup.holder() == *receiver &&
|
1255
|
+
lookup.type() == FIELD &&
|
1256
|
+
!receiver->IsAccessCheckNeeded();
|
1257
|
+
|
1258
|
+
if (can_be_inlined) {
|
1259
|
+
Map* map = lookup.holder()->map();
|
1260
|
+
// Property's index in the properties array. If negative we have
|
1261
|
+
// an inobject property.
|
1262
|
+
int index = lookup.GetFieldIndex() - map->inobject_properties();
|
1263
|
+
if (index < 0) {
|
1264
|
+
// Index is an offset from the end of the object.
|
1265
|
+
int offset = map->instance_size() + (index * kPointerSize);
|
1266
|
+
if (PatchInlinedStore(address(), map, offset)) {
|
1267
|
+
set_target(megamorphic_stub());
|
1268
|
+
#ifdef DEBUG
|
1269
|
+
if (FLAG_trace_ic) {
|
1270
|
+
PrintF("[StoreIC : inline patch %s]\n", *name->ToCString());
|
1271
|
+
}
|
1272
|
+
#endif
|
1273
|
+
return receiver->SetProperty(*name, *value, NONE);
|
1274
|
+
#ifdef DEBUG
|
1275
|
+
|
1276
|
+
} else {
|
1277
|
+
if (FLAG_trace_ic) {
|
1278
|
+
PrintF("[StoreIC : no inline patch %s (patching failed)]\n",
|
1279
|
+
*name->ToCString());
|
1280
|
+
}
|
1281
|
+
}
|
1282
|
+
} else {
|
1283
|
+
if (FLAG_trace_ic) {
|
1284
|
+
PrintF("[StoreIC : no inline patch %s (not inobject)]\n",
|
1285
|
+
*name->ToCString());
|
1286
|
+
}
|
1287
|
+
}
|
1288
|
+
} else {
|
1289
|
+
if (state == PREMONOMORPHIC) {
|
1290
|
+
if (FLAG_trace_ic) {
|
1291
|
+
PrintF("[StoreIC : no inline patch %s (not inlinable)]\n",
|
1292
|
+
*name->ToCString());
|
1293
|
+
#endif
|
1294
|
+
}
|
1295
|
+
}
|
1296
|
+
}
|
1297
|
+
|
1298
|
+
// If no inlined store ic was patched, generate a stub for this
|
1299
|
+
// store.
|
1062
1300
|
UpdateCaches(&lookup, state, receiver, name, value);
|
1063
1301
|
}
|
1064
1302
|
}
|
@@ -1103,16 +1341,18 @@ void StoreIC::UpdateCaches(LookupResult* lookup,
|
|
1103
1341
|
break;
|
1104
1342
|
}
|
1105
1343
|
case NORMAL: {
|
1106
|
-
if (
|
1107
|
-
|
1344
|
+
if (receiver->IsGlobalObject()) {
|
1345
|
+
// The stub generated for the global object picks the value directly
|
1346
|
+
// from the property cell. So the property must be directly on the
|
1347
|
+
// global object.
|
1348
|
+
Handle<GlobalObject> global = Handle<GlobalObject>::cast(receiver);
|
1349
|
+
JSGlobalPropertyCell* cell =
|
1350
|
+
JSGlobalPropertyCell::cast(global->GetPropertyCell(lookup));
|
1351
|
+
code = StubCache::ComputeStoreGlobal(*name, *global, cell);
|
1352
|
+
} else {
|
1353
|
+
if (lookup->holder() != *receiver) return;
|
1354
|
+
code = StubCache::ComputeStoreNormal();
|
1108
1355
|
}
|
1109
|
-
// The stub generated for the global object picks the value directly
|
1110
|
-
// from the property cell. So the property must be directly on the
|
1111
|
-
// global object.
|
1112
|
-
Handle<GlobalObject> global = Handle<GlobalObject>::cast(receiver);
|
1113
|
-
JSGlobalPropertyCell* cell =
|
1114
|
-
JSGlobalPropertyCell::cast(global->GetPropertyCell(lookup));
|
1115
|
-
code = StubCache::ComputeStoreGlobal(*name, *global, cell);
|
1116
1356
|
break;
|
1117
1357
|
}
|
1118
1358
|
case CALLBACKS: {
|
@@ -1139,8 +1379,11 @@ void StoreIC::UpdateCaches(LookupResult* lookup,
|
|
1139
1379
|
if (state == UNINITIALIZED || state == MONOMORPHIC_PROTOTYPE_FAILURE) {
|
1140
1380
|
set_target(Code::cast(code));
|
1141
1381
|
} else if (state == MONOMORPHIC) {
|
1142
|
-
// Only move to
|
1382
|
+
// Only move to megamorphic if the target changes.
|
1143
1383
|
if (target() != Code::cast(code)) set_target(megamorphic_stub());
|
1384
|
+
} else if (state == MEGAMORPHIC) {
|
1385
|
+
// Update the stub cache.
|
1386
|
+
StubCache::Set(*name, receiver->map(), Code::cast(code));
|
1144
1387
|
}
|
1145
1388
|
|
1146
1389
|
#ifdef DEBUG
|
@@ -1283,7 +1526,22 @@ void KeyedStoreIC::UpdateCaches(LookupResult* lookup,
|
|
1283
1526
|
// Static IC stub generators.
|
1284
1527
|
//
|
1285
1528
|
|
1286
|
-
|
1529
|
+
static Object* CompileFunction(Object* result,
|
1530
|
+
Handle<Object> object,
|
1531
|
+
InLoopFlag in_loop) {
|
1532
|
+
// Compile now with optimization.
|
1533
|
+
HandleScope scope;
|
1534
|
+
Handle<JSFunction> function = Handle<JSFunction>(JSFunction::cast(result));
|
1535
|
+
if (in_loop == IN_LOOP) {
|
1536
|
+
CompileLazyInLoop(function, object, CLEAR_EXCEPTION);
|
1537
|
+
} else {
|
1538
|
+
CompileLazy(function, object, CLEAR_EXCEPTION);
|
1539
|
+
}
|
1540
|
+
return *function;
|
1541
|
+
}
|
1542
|
+
|
1543
|
+
|
1544
|
+
// Used from ic-<arch>.cc.
|
1287
1545
|
Object* CallIC_Miss(Arguments args) {
|
1288
1546
|
NoHandleAllocation na;
|
1289
1547
|
ASSERT(args.length() == 2);
|
@@ -1302,21 +1560,27 @@ Object* CallIC_Miss(Arguments args) {
|
|
1302
1560
|
if (!result->IsJSFunction() || JSFunction::cast(result)->is_compiled()) {
|
1303
1561
|
return result;
|
1304
1562
|
}
|
1563
|
+
return CompileFunction(result, args.at<Object>(0), ic.target()->ic_in_loop());
|
1564
|
+
}
|
1305
1565
|
|
1306
|
-
|
1307
|
-
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1311
|
-
|
1312
|
-
|
1313
|
-
|
1566
|
+
|
1567
|
+
// Used from ic-<arch>.cc.
|
1568
|
+
Object* KeyedCallIC_Miss(Arguments args) {
|
1569
|
+
NoHandleAllocation na;
|
1570
|
+
ASSERT(args.length() == 2);
|
1571
|
+
KeyedCallIC ic;
|
1572
|
+
IC::State state = IC::StateFrom(ic.target(), args[0], args[1]);
|
1573
|
+
Object* result =
|
1574
|
+
ic.LoadFunction(state, args.at<Object>(0), args.at<Object>(1));
|
1575
|
+
|
1576
|
+
if (!result->IsJSFunction() || JSFunction::cast(result)->is_compiled()) {
|
1577
|
+
return result;
|
1314
1578
|
}
|
1315
|
-
return
|
1579
|
+
return CompileFunction(result, args.at<Object>(0), ic.target()->ic_in_loop());
|
1316
1580
|
}
|
1317
1581
|
|
1318
1582
|
|
1319
|
-
// Used from
|
1583
|
+
// Used from ic-<arch>.cc.
|
1320
1584
|
Object* LoadIC_Miss(Arguments args) {
|
1321
1585
|
NoHandleAllocation na;
|
1322
1586
|
ASSERT(args.length() == 2);
|
@@ -1326,7 +1590,7 @@ Object* LoadIC_Miss(Arguments args) {
|
|
1326
1590
|
}
|
1327
1591
|
|
1328
1592
|
|
1329
|
-
// Used from
|
1593
|
+
// Used from ic-<arch>.cc
|
1330
1594
|
Object* KeyedLoadIC_Miss(Arguments args) {
|
1331
1595
|
NoHandleAllocation na;
|
1332
1596
|
ASSERT(args.length() == 2);
|
@@ -1336,7 +1600,7 @@ Object* KeyedLoadIC_Miss(Arguments args) {
|
|
1336
1600
|
}
|
1337
1601
|
|
1338
1602
|
|
1339
|
-
// Used from
|
1603
|
+
// Used from ic-<arch>.cc.
|
1340
1604
|
Object* StoreIC_Miss(Arguments args) {
|
1341
1605
|
NoHandleAllocation na;
|
1342
1606
|
ASSERT(args.length() == 3);
|
@@ -1394,7 +1658,7 @@ Object* SharedStoreIC_ExtendStorage(Arguments args) {
|
|
1394
1658
|
}
|
1395
1659
|
|
1396
1660
|
|
1397
|
-
// Used from
|
1661
|
+
// Used from ic-<arch>.cc.
|
1398
1662
|
Object* KeyedStoreIC_Miss(Arguments args) {
|
1399
1663
|
NoHandleAllocation na;
|
1400
1664
|
ASSERT(args.length() == 3);
|
@@ -1461,16 +1725,15 @@ Handle<Code> GetBinaryOpStub(int key, BinaryOpIC::TypeInfo type_info);
|
|
1461
1725
|
|
1462
1726
|
|
1463
1727
|
Object* BinaryOp_Patch(Arguments args) {
|
1464
|
-
ASSERT(args.length() ==
|
1728
|
+
ASSERT(args.length() == 5);
|
1465
1729
|
|
1466
1730
|
Handle<Object> left = args.at<Object>(0);
|
1467
1731
|
Handle<Object> right = args.at<Object>(1);
|
1468
|
-
|
1469
|
-
|
1732
|
+
int key = Smi::cast(args[2])->value();
|
1733
|
+
Token::Value op = static_cast<Token::Value>(Smi::cast(args[3])->value());
|
1470
1734
|
#ifdef DEBUG
|
1471
|
-
Token::Value op = static_cast<Token::Value>(Smi::cast(args[4])->value());
|
1472
1735
|
BinaryOpIC::TypeInfo prev_type_info =
|
1473
|
-
static_cast<BinaryOpIC::TypeInfo>(Smi::cast(args[
|
1736
|
+
static_cast<BinaryOpIC::TypeInfo>(Smi::cast(args[4])->value());
|
1474
1737
|
#endif // DEBUG
|
1475
1738
|
{ HandleScope scope;
|
1476
1739
|
BinaryOpIC::TypeInfo type_info = BinaryOpIC::GetTypeInfo(*left, *right);
|
@@ -1489,6 +1752,61 @@ Object* BinaryOp_Patch(Arguments args) {
|
|
1489
1752
|
}
|
1490
1753
|
}
|
1491
1754
|
|
1755
|
+
HandleScope scope;
|
1756
|
+
Handle<JSBuiltinsObject> builtins = Top::builtins();
|
1757
|
+
|
1758
|
+
Object* builtin = NULL; // Initialization calms down the compiler.
|
1759
|
+
|
1760
|
+
switch (op) {
|
1761
|
+
case Token::ADD:
|
1762
|
+
builtin = builtins->javascript_builtin(Builtins::ADD);
|
1763
|
+
break;
|
1764
|
+
case Token::SUB:
|
1765
|
+
builtin = builtins->javascript_builtin(Builtins::SUB);
|
1766
|
+
break;
|
1767
|
+
case Token::MUL:
|
1768
|
+
builtin = builtins->javascript_builtin(Builtins::MUL);
|
1769
|
+
break;
|
1770
|
+
case Token::DIV:
|
1771
|
+
builtin = builtins->javascript_builtin(Builtins::DIV);
|
1772
|
+
break;
|
1773
|
+
case Token::MOD:
|
1774
|
+
builtin = builtins->javascript_builtin(Builtins::MOD);
|
1775
|
+
break;
|
1776
|
+
case Token::BIT_AND:
|
1777
|
+
builtin = builtins->javascript_builtin(Builtins::BIT_AND);
|
1778
|
+
break;
|
1779
|
+
case Token::BIT_OR:
|
1780
|
+
builtin = builtins->javascript_builtin(Builtins::BIT_OR);
|
1781
|
+
break;
|
1782
|
+
case Token::BIT_XOR:
|
1783
|
+
builtin = builtins->javascript_builtin(Builtins::BIT_XOR);
|
1784
|
+
break;
|
1785
|
+
case Token::SHR:
|
1786
|
+
builtin = builtins->javascript_builtin(Builtins::SHR);
|
1787
|
+
break;
|
1788
|
+
case Token::SAR:
|
1789
|
+
builtin = builtins->javascript_builtin(Builtins::SAR);
|
1790
|
+
break;
|
1791
|
+
case Token::SHL:
|
1792
|
+
builtin = builtins->javascript_builtin(Builtins::SHL);
|
1793
|
+
break;
|
1794
|
+
default:
|
1795
|
+
UNREACHABLE();
|
1796
|
+
}
|
1797
|
+
|
1798
|
+
Handle<JSFunction> builtin_function(JSFunction::cast(builtin));
|
1799
|
+
|
1800
|
+
bool caught_exception;
|
1801
|
+
Object** builtin_args[] = { right.location() };
|
1802
|
+
Handle<Object> result = Execution::Call(builtin_function,
|
1803
|
+
left,
|
1804
|
+
ARRAY_SIZE(builtin_args),
|
1805
|
+
builtin_args,
|
1806
|
+
&caught_exception);
|
1807
|
+
if (caught_exception) {
|
1808
|
+
return Failure::Exception();
|
1809
|
+
}
|
1492
1810
|
return *result;
|
1493
1811
|
}
|
1494
1812
|
|