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
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -62,26 +62,21 @@ function StringValueOf() {
|
|
62
62
|
|
63
63
|
// ECMA-262, section 15.5.4.4
|
64
64
|
function StringCharAt(pos) {
|
65
|
-
var
|
66
|
-
if (
|
67
|
-
|
68
|
-
var index = TO_INTEGER(pos);
|
69
|
-
if (index >= subject.length || index < 0) return "";
|
70
|
-
char_code = %StringCharCodeAt(subject, index);
|
65
|
+
var result = %_StringCharAt(this, pos);
|
66
|
+
if (%_IsSmi(result)) {
|
67
|
+
result = %_StringCharAt(TO_STRING_INLINE(this), TO_INTEGER(pos));
|
71
68
|
}
|
72
|
-
return
|
69
|
+
return result;
|
73
70
|
}
|
74
71
|
|
75
72
|
|
76
73
|
// ECMA-262 section 15.5.4.5
|
77
74
|
function StringCharCodeAt(pos) {
|
78
|
-
var
|
79
|
-
if (
|
80
|
-
|
75
|
+
var result = %_StringCharCodeAt(this, pos);
|
76
|
+
if (!%_IsSmi(result)) {
|
77
|
+
result = %_StringCharCodeAt(TO_STRING_INLINE(this), TO_INTEGER(pos));
|
81
78
|
}
|
82
|
-
|
83
|
-
var index = TO_INTEGER(pos);
|
84
|
-
return %StringCharCodeAt(subject, index);
|
79
|
+
return result;
|
85
80
|
}
|
86
81
|
|
87
82
|
|
@@ -214,11 +209,7 @@ function StringMatch(regexp) {
|
|
214
209
|
function SubString(string, start, end) {
|
215
210
|
// Use the one character string cache.
|
216
211
|
if (start + 1 == end) {
|
217
|
-
|
218
|
-
if (!%_IsSmi(char_code)) {
|
219
|
-
char_code = %StringCharCodeAt(string, start);
|
220
|
-
}
|
221
|
-
return %_CharFromCode(char_code);
|
212
|
+
return %_StringCharAt(string, start);
|
222
213
|
}
|
223
214
|
return %_SubString(string, start, end);
|
224
215
|
}
|
@@ -241,7 +232,13 @@ function StringReplace(search, replace) {
|
|
241
232
|
%_Log('regexp', 'regexp-replace,%0r,%1S', [search, subject]);
|
242
233
|
if (IS_FUNCTION(replace)) {
|
243
234
|
regExpCache.type = 'none';
|
244
|
-
|
235
|
+
if (search.global) {
|
236
|
+
return StringReplaceGlobalRegExpWithFunction(subject, search, replace);
|
237
|
+
} else {
|
238
|
+
return StringReplaceNonGlobalRegExpWithFunction(subject,
|
239
|
+
search,
|
240
|
+
replace);
|
241
|
+
}
|
245
242
|
} else {
|
246
243
|
return StringReplaceRegExp(subject, search, replace);
|
247
244
|
}
|
@@ -316,10 +313,7 @@ function ExpandReplacement(string, subject, matchInfo, builder) {
|
|
316
313
|
var expansion = '$';
|
317
314
|
var position = next + 1;
|
318
315
|
if (position < length) {
|
319
|
-
var peek = %
|
320
|
-
if (!%_IsSmi(peek)) {
|
321
|
-
peek = %StringCharCodeAt(string, position);
|
322
|
-
}
|
316
|
+
var peek = %_StringCharCodeAt(string, position);
|
323
317
|
if (peek == 36) { // $$
|
324
318
|
++position;
|
325
319
|
builder.add('$');
|
@@ -337,10 +331,7 @@ function ExpandReplacement(string, subject, matchInfo, builder) {
|
|
337
331
|
++position;
|
338
332
|
var n = peek - 48;
|
339
333
|
if (position < length) {
|
340
|
-
peek = %
|
341
|
-
if (!%_IsSmi(peek)) {
|
342
|
-
peek = %StringCharCodeAt(string, position);
|
343
|
-
}
|
334
|
+
peek = %_StringCharCodeAt(string, position);
|
344
335
|
// $nn, 01 <= nn <= 99
|
345
336
|
if (n != 0 && peek == 48 || peek >= 49 && peek <= 57) {
|
346
337
|
var nn = n * 10 + (peek - 48);
|
@@ -396,9 +387,9 @@ function CaptureString(string, lastCaptureInfo, index) {
|
|
396
387
|
var scaled = index << 1;
|
397
388
|
// Compute start and end.
|
398
389
|
var start = lastCaptureInfo[CAPTURE(scaled)];
|
390
|
+
// If start isn't valid, return undefined.
|
391
|
+
if (start < 0) return;
|
399
392
|
var end = lastCaptureInfo[CAPTURE(scaled + 1)];
|
400
|
-
// If either start or end is missing return undefined.
|
401
|
-
if (start < 0 || end < 0) return;
|
402
393
|
return SubString(string, start, end);
|
403
394
|
};
|
404
395
|
|
@@ -410,9 +401,8 @@ function addCaptureString(builder, matchInfo, index) {
|
|
410
401
|
var scaled = index << 1;
|
411
402
|
// Compute start and end.
|
412
403
|
var start = matchInfo[CAPTURE(scaled)];
|
404
|
+
if (start < 0) return;
|
413
405
|
var end = matchInfo[CAPTURE(scaled + 1)];
|
414
|
-
// If either start or end is missing return.
|
415
|
-
if (start < 0 || end <= start) return;
|
416
406
|
builder.addSpecialSlice(start, end);
|
417
407
|
};
|
418
408
|
|
@@ -423,112 +413,116 @@ var reusableReplaceArray = $Array(16);
|
|
423
413
|
|
424
414
|
// Helper function for replacing regular expressions with the result of a
|
425
415
|
// function application in String.prototype.replace.
|
426
|
-
function
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
} else {
|
459
|
-
match_start = res[++i] - elem;
|
460
|
-
}
|
416
|
+
function StringReplaceGlobalRegExpWithFunction(subject, regexp, replace) {
|
417
|
+
var resultArray = reusableReplaceArray;
|
418
|
+
if (resultArray) {
|
419
|
+
reusableReplaceArray = null;
|
420
|
+
} else {
|
421
|
+
// Inside a nested replace (replace called from the replacement function
|
422
|
+
// of another replace) or we have failed to set the reusable array
|
423
|
+
// back due to an exception in a replacement function. Create a new
|
424
|
+
// array to use in the future, or until the original is written back.
|
425
|
+
resultArray = $Array(16);
|
426
|
+
}
|
427
|
+
var res = %RegExpExecMultiple(regexp,
|
428
|
+
subject,
|
429
|
+
lastMatchInfo,
|
430
|
+
resultArray);
|
431
|
+
regexp.lastIndex = 0;
|
432
|
+
if (IS_NULL(res)) {
|
433
|
+
// No matches at all.
|
434
|
+
reusableReplaceArray = resultArray;
|
435
|
+
return subject;
|
436
|
+
}
|
437
|
+
var len = res.length;
|
438
|
+
var i = 0;
|
439
|
+
if (NUMBER_OF_CAPTURES(lastMatchInfo) == 2) {
|
440
|
+
var match_start = 0;
|
441
|
+
var override = [null, 0, subject];
|
442
|
+
var receiver = %GetGlobalReceiver();
|
443
|
+
while (i < len) {
|
444
|
+
var elem = res[i];
|
445
|
+
if (%_IsSmi(elem)) {
|
446
|
+
if (elem > 0) {
|
447
|
+
match_start = (elem >> 11) + (elem & 0x7ff);
|
461
448
|
} else {
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
449
|
+
match_start = res[++i] - elem;
|
450
|
+
}
|
451
|
+
} else {
|
452
|
+
override[0] = elem;
|
453
|
+
override[1] = match_start;
|
454
|
+
lastMatchInfoOverride = override;
|
455
|
+
var func_result =
|
456
|
+
%_CallFunction(receiver, elem, match_start, subject, replace);
|
457
|
+
if (!IS_STRING(func_result)) {
|
458
|
+
func_result = NonStringToString(func_result);
|
471
459
|
}
|
472
|
-
i
|
460
|
+
res[i] = func_result;
|
461
|
+
match_start += elem.length;
|
473
462
|
}
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
463
|
+
i++;
|
464
|
+
}
|
465
|
+
} else {
|
466
|
+
while (i < len) {
|
467
|
+
var elem = res[i];
|
468
|
+
if (!%_IsSmi(elem)) {
|
469
|
+
// elem must be an Array.
|
470
|
+
// Use the apply argument as backing for global RegExp properties.
|
471
|
+
lastMatchInfoOverride = elem;
|
472
|
+
var func_result = replace.apply(null, elem);
|
473
|
+
if (!IS_STRING(func_result)) {
|
474
|
+
func_result = NonStringToString(func_result);
|
486
475
|
}
|
487
|
-
i
|
476
|
+
res[i] = func_result;
|
488
477
|
}
|
478
|
+
i++;
|
489
479
|
}
|
490
|
-
var resultBuilder = new ReplaceResultBuilder(subject, res);
|
491
|
-
var result = resultBuilder.generate();
|
492
|
-
resultArray.length = 0;
|
493
|
-
reusableReplaceArray = resultArray;
|
494
|
-
return result;
|
495
|
-
} else { // Not a global regexp, no need to loop.
|
496
|
-
var matchInfo = DoRegExpExec(regexp, subject, 0);
|
497
|
-
if (IS_NULL(matchInfo)) return subject;
|
498
|
-
|
499
|
-
var result = new ReplaceResultBuilder(subject);
|
500
|
-
result.addSpecialSlice(0, matchInfo[CAPTURE0]);
|
501
|
-
var endOfMatch = matchInfo[CAPTURE1];
|
502
|
-
result.add(ApplyReplacementFunction(replace, matchInfo, subject));
|
503
|
-
// Can't use matchInfo any more from here, since the function could
|
504
|
-
// overwrite it.
|
505
|
-
result.addSpecialSlice(endOfMatch, subject.length);
|
506
|
-
return result.generate();
|
507
480
|
}
|
481
|
+
var resultBuilder = new ReplaceResultBuilder(subject, res);
|
482
|
+
var result = resultBuilder.generate();
|
483
|
+
resultArray.length = 0;
|
484
|
+
reusableReplaceArray = resultArray;
|
485
|
+
return result;
|
508
486
|
}
|
509
487
|
|
510
488
|
|
511
|
-
|
512
|
-
|
489
|
+
function StringReplaceNonGlobalRegExpWithFunction(subject, regexp, replace) {
|
490
|
+
var matchInfo = DoRegExpExec(regexp, subject, 0);
|
491
|
+
if (IS_NULL(matchInfo)) return subject;
|
492
|
+
var result = new ReplaceResultBuilder(subject);
|
493
|
+
var index = matchInfo[CAPTURE0];
|
494
|
+
result.addSpecialSlice(0, index);
|
495
|
+
var endOfMatch = matchInfo[CAPTURE1];
|
513
496
|
// Compute the parameter list consisting of the match, captures, index,
|
514
497
|
// and subject for the replace function invocation.
|
515
|
-
var index = matchInfo[CAPTURE0];
|
516
498
|
// The number of captures plus one for the match.
|
517
499
|
var m = NUMBER_OF_CAPTURES(matchInfo) >> 1;
|
500
|
+
var replacement;
|
518
501
|
if (m == 1) {
|
519
|
-
|
502
|
+
// No captures, only the match, which is always valid.
|
503
|
+
var s = SubString(subject, index, endOfMatch);
|
520
504
|
// Don't call directly to avoid exposing the built-in global object.
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
505
|
+
replacement =
|
506
|
+
%_CallFunction(%GetGlobalReceiver(), s, index, subject, replace);
|
507
|
+
} else {
|
508
|
+
var parameters = $Array(m + 2);
|
509
|
+
for (var j = 0; j < m; j++) {
|
510
|
+
parameters[j] = CaptureString(subject, matchInfo, j);
|
511
|
+
}
|
512
|
+
parameters[j] = index;
|
513
|
+
parameters[j + 1] = subject;
|
514
|
+
|
515
|
+
replacement = replace.apply(null, parameters);
|
526
516
|
}
|
527
|
-
|
528
|
-
|
529
|
-
|
517
|
+
|
518
|
+
result.add(replacement); // The add method converts to string if necessary.
|
519
|
+
// Can't use matchInfo any more from here, since the function could
|
520
|
+
// overwrite it.
|
521
|
+
result.addSpecialSlice(endOfMatch, subject.length);
|
522
|
+
return result.generate();
|
530
523
|
}
|
531
524
|
|
525
|
+
|
532
526
|
// ECMA-262 section 15.5.4.12
|
533
527
|
function StringSearch(re) {
|
534
528
|
var regexp;
|
@@ -815,7 +809,7 @@ function StringFromCharCode(code) {
|
|
815
809
|
var n = %_ArgumentsLength();
|
816
810
|
if (n == 1) {
|
817
811
|
if (!%_IsSmi(code)) code = ToNumber(code);
|
818
|
-
return %
|
812
|
+
return %_StringCharFromCode(code & 0xffff);
|
819
813
|
}
|
820
814
|
|
821
815
|
// NOTE: This is not super-efficient, but it is necessary because we
|
@@ -94,6 +94,7 @@ Code* StubCache::Set(String* name, Map* map, Code* code) {
|
|
94
94
|
|
95
95
|
|
96
96
|
Object* StubCache::ComputeLoadNonexistent(String* name, JSObject* receiver) {
|
97
|
+
ASSERT(receiver->IsGlobalObject() || receiver->HasFastProperties());
|
97
98
|
// If no global objects are present in the prototype chain, the load
|
98
99
|
// nonexistent IC stub can be shared for all names for a given map
|
99
100
|
// and we use the empty string for the map cache in that case. If
|
@@ -121,7 +122,7 @@ Object* StubCache::ComputeLoadNonexistent(String* name, JSObject* receiver) {
|
|
121
122
|
receiver->map()->UpdateCodeCache(cache_name, Code::cast(code));
|
122
123
|
if (result->IsFailure()) return result;
|
123
124
|
}
|
124
|
-
return
|
125
|
+
return code;
|
125
126
|
}
|
126
127
|
|
127
128
|
|
@@ -129,17 +130,19 @@ Object* StubCache::ComputeLoadField(String* name,
|
|
129
130
|
JSObject* receiver,
|
130
131
|
JSObject* holder,
|
131
132
|
int field_index) {
|
133
|
+
ASSERT(IC::GetCodeCacheForObject(receiver, holder) == OWN_MAP);
|
134
|
+
Map* map = receiver->map();
|
132
135
|
Code::Flags flags = Code::ComputeMonomorphicFlags(Code::LOAD_IC, FIELD);
|
133
|
-
Object* code =
|
136
|
+
Object* code = map->FindInCodeCache(name, flags);
|
134
137
|
if (code->IsUndefined()) {
|
135
138
|
LoadStubCompiler compiler;
|
136
139
|
code = compiler.CompileLoadField(receiver, holder, field_index, name);
|
137
140
|
if (code->IsFailure()) return code;
|
138
141
|
PROFILE(CodeCreateEvent(Logger::LOAD_IC_TAG, Code::cast(code), name));
|
139
|
-
Object* result =
|
142
|
+
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
140
143
|
if (result->IsFailure()) return result;
|
141
144
|
}
|
142
|
-
return
|
145
|
+
return code;
|
143
146
|
}
|
144
147
|
|
145
148
|
|
@@ -148,17 +151,19 @@ Object* StubCache::ComputeLoadCallback(String* name,
|
|
148
151
|
JSObject* holder,
|
149
152
|
AccessorInfo* callback) {
|
150
153
|
ASSERT(v8::ToCData<Address>(callback->getter()) != 0);
|
154
|
+
ASSERT(IC::GetCodeCacheForObject(receiver, holder) == OWN_MAP);
|
155
|
+
Map* map = receiver->map();
|
151
156
|
Code::Flags flags = Code::ComputeMonomorphicFlags(Code::LOAD_IC, CALLBACKS);
|
152
|
-
Object* code =
|
157
|
+
Object* code = map->FindInCodeCache(name, flags);
|
153
158
|
if (code->IsUndefined()) {
|
154
159
|
LoadStubCompiler compiler;
|
155
160
|
code = compiler.CompileLoadCallback(name, receiver, holder, callback);
|
156
161
|
if (code->IsFailure()) return code;
|
157
162
|
PROFILE(CodeCreateEvent(Logger::LOAD_IC_TAG, Code::cast(code), name));
|
158
|
-
Object* result =
|
163
|
+
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
159
164
|
if (result->IsFailure()) return result;
|
160
165
|
}
|
161
|
-
return
|
166
|
+
return code;
|
162
167
|
}
|
163
168
|
|
164
169
|
|
@@ -166,41 +171,44 @@ Object* StubCache::ComputeLoadConstant(String* name,
|
|
166
171
|
JSObject* receiver,
|
167
172
|
JSObject* holder,
|
168
173
|
Object* value) {
|
174
|
+
ASSERT(IC::GetCodeCacheForObject(receiver, holder) == OWN_MAP);
|
175
|
+
Map* map = receiver->map();
|
169
176
|
Code::Flags flags =
|
170
177
|
Code::ComputeMonomorphicFlags(Code::LOAD_IC, CONSTANT_FUNCTION);
|
171
|
-
Object* code =
|
178
|
+
Object* code = map->FindInCodeCache(name, flags);
|
172
179
|
if (code->IsUndefined()) {
|
173
180
|
LoadStubCompiler compiler;
|
174
181
|
code = compiler.CompileLoadConstant(receiver, holder, value, name);
|
175
182
|
if (code->IsFailure()) return code;
|
176
183
|
PROFILE(CodeCreateEvent(Logger::LOAD_IC_TAG, Code::cast(code), name));
|
177
|
-
Object* result =
|
184
|
+
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
178
185
|
if (result->IsFailure()) return result;
|
179
186
|
}
|
180
|
-
return
|
187
|
+
return code;
|
181
188
|
}
|
182
189
|
|
183
190
|
|
184
191
|
Object* StubCache::ComputeLoadInterceptor(String* name,
|
185
192
|
JSObject* receiver,
|
186
193
|
JSObject* holder) {
|
194
|
+
ASSERT(IC::GetCodeCacheForObject(receiver, holder) == OWN_MAP);
|
195
|
+
Map* map = receiver->map();
|
187
196
|
Code::Flags flags = Code::ComputeMonomorphicFlags(Code::LOAD_IC, INTERCEPTOR);
|
188
|
-
Object* code =
|
197
|
+
Object* code = map->FindInCodeCache(name, flags);
|
189
198
|
if (code->IsUndefined()) {
|
190
199
|
LoadStubCompiler compiler;
|
191
200
|
code = compiler.CompileLoadInterceptor(receiver, holder, name);
|
192
201
|
if (code->IsFailure()) return code;
|
193
202
|
PROFILE(CodeCreateEvent(Logger::LOAD_IC_TAG, Code::cast(code), name));
|
194
|
-
Object* result =
|
203
|
+
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
195
204
|
if (result->IsFailure()) return result;
|
196
205
|
}
|
197
|
-
return
|
206
|
+
return code;
|
198
207
|
}
|
199
208
|
|
200
209
|
|
201
|
-
Object* StubCache::ComputeLoadNormal(
|
202
|
-
|
203
|
-
return Set(name, receiver->map(), code);
|
210
|
+
Object* StubCache::ComputeLoadNormal() {
|
211
|
+
return Builtins::builtin(Builtins::LoadIC_Normal);
|
204
212
|
}
|
205
213
|
|
206
214
|
|
@@ -209,8 +217,10 @@ Object* StubCache::ComputeLoadGlobal(String* name,
|
|
209
217
|
GlobalObject* holder,
|
210
218
|
JSGlobalPropertyCell* cell,
|
211
219
|
bool is_dont_delete) {
|
220
|
+
ASSERT(IC::GetCodeCacheForObject(receiver, holder) == OWN_MAP);
|
221
|
+
Map* map = receiver->map();
|
212
222
|
Code::Flags flags = Code::ComputeMonomorphicFlags(Code::LOAD_IC, NORMAL);
|
213
|
-
Object* code =
|
223
|
+
Object* code = map->FindInCodeCache(name, flags);
|
214
224
|
if (code->IsUndefined()) {
|
215
225
|
LoadStubCompiler compiler;
|
216
226
|
code = compiler.CompileLoadGlobal(receiver,
|
@@ -220,10 +230,10 @@ Object* StubCache::ComputeLoadGlobal(String* name,
|
|
220
230
|
is_dont_delete);
|
221
231
|
if (code->IsFailure()) return code;
|
222
232
|
PROFILE(CodeCreateEvent(Logger::LOAD_IC_TAG, Code::cast(code), name));
|
223
|
-
Object* result =
|
233
|
+
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
224
234
|
if (result->IsFailure()) return result;
|
225
235
|
}
|
226
|
-
return
|
236
|
+
return code;
|
227
237
|
}
|
228
238
|
|
229
239
|
|
@@ -231,14 +241,16 @@ Object* StubCache::ComputeKeyedLoadField(String* name,
|
|
231
241
|
JSObject* receiver,
|
232
242
|
JSObject* holder,
|
233
243
|
int field_index) {
|
244
|
+
ASSERT(IC::GetCodeCacheForObject(receiver, holder) == OWN_MAP);
|
245
|
+
Map* map = receiver->map();
|
234
246
|
Code::Flags flags = Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, FIELD);
|
235
|
-
Object* code =
|
247
|
+
Object* code = map->FindInCodeCache(name, flags);
|
236
248
|
if (code->IsUndefined()) {
|
237
249
|
KeyedLoadStubCompiler compiler;
|
238
250
|
code = compiler.CompileLoadField(name, receiver, holder, field_index);
|
239
251
|
if (code->IsFailure()) return code;
|
240
252
|
PROFILE(CodeCreateEvent(Logger::KEYED_LOAD_IC_TAG, Code::cast(code), name));
|
241
|
-
Object* result =
|
253
|
+
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
242
254
|
if (result->IsFailure()) return result;
|
243
255
|
}
|
244
256
|
return code;
|
@@ -249,15 +261,17 @@ Object* StubCache::ComputeKeyedLoadConstant(String* name,
|
|
249
261
|
JSObject* receiver,
|
250
262
|
JSObject* holder,
|
251
263
|
Object* value) {
|
264
|
+
ASSERT(IC::GetCodeCacheForObject(receiver, holder) == OWN_MAP);
|
265
|
+
Map* map = receiver->map();
|
252
266
|
Code::Flags flags =
|
253
267
|
Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, CONSTANT_FUNCTION);
|
254
|
-
Object* code =
|
268
|
+
Object* code = map->FindInCodeCache(name, flags);
|
255
269
|
if (code->IsUndefined()) {
|
256
270
|
KeyedLoadStubCompiler compiler;
|
257
271
|
code = compiler.CompileLoadConstant(name, receiver, holder, value);
|
258
272
|
if (code->IsFailure()) return code;
|
259
273
|
PROFILE(CodeCreateEvent(Logger::KEYED_LOAD_IC_TAG, Code::cast(code), name));
|
260
|
-
Object* result =
|
274
|
+
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
261
275
|
if (result->IsFailure()) return result;
|
262
276
|
}
|
263
277
|
return code;
|
@@ -267,15 +281,17 @@ Object* StubCache::ComputeKeyedLoadConstant(String* name,
|
|
267
281
|
Object* StubCache::ComputeKeyedLoadInterceptor(String* name,
|
268
282
|
JSObject* receiver,
|
269
283
|
JSObject* holder) {
|
284
|
+
ASSERT(IC::GetCodeCacheForObject(receiver, holder) == OWN_MAP);
|
285
|
+
Map* map = receiver->map();
|
270
286
|
Code::Flags flags =
|
271
287
|
Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, INTERCEPTOR);
|
272
|
-
Object* code =
|
288
|
+
Object* code = map->FindInCodeCache(name, flags);
|
273
289
|
if (code->IsUndefined()) {
|
274
290
|
KeyedLoadStubCompiler compiler;
|
275
291
|
code = compiler.CompileLoadInterceptor(receiver, holder, name);
|
276
292
|
if (code->IsFailure()) return code;
|
277
293
|
PROFILE(CodeCreateEvent(Logger::KEYED_LOAD_IC_TAG, Code::cast(code), name));
|
278
|
-
Object* result =
|
294
|
+
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
279
295
|
if (result->IsFailure()) return result;
|
280
296
|
}
|
281
297
|
return code;
|
@@ -286,15 +302,17 @@ Object* StubCache::ComputeKeyedLoadCallback(String* name,
|
|
286
302
|
JSObject* receiver,
|
287
303
|
JSObject* holder,
|
288
304
|
AccessorInfo* callback) {
|
305
|
+
ASSERT(IC::GetCodeCacheForObject(receiver, holder) == OWN_MAP);
|
306
|
+
Map* map = receiver->map();
|
289
307
|
Code::Flags flags =
|
290
308
|
Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, CALLBACKS);
|
291
|
-
Object* code =
|
309
|
+
Object* code = map->FindInCodeCache(name, flags);
|
292
310
|
if (code->IsUndefined()) {
|
293
311
|
KeyedLoadStubCompiler compiler;
|
294
312
|
code = compiler.CompileLoadCallback(name, receiver, holder, callback);
|
295
313
|
if (code->IsFailure()) return code;
|
296
314
|
PROFILE(CodeCreateEvent(Logger::KEYED_LOAD_IC_TAG, Code::cast(code), name));
|
297
|
-
Object* result =
|
315
|
+
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
298
316
|
if (result->IsFailure()) return result;
|
299
317
|
}
|
300
318
|
return code;
|
@@ -306,13 +324,15 @@ Object* StubCache::ComputeKeyedLoadArrayLength(String* name,
|
|
306
324
|
JSArray* receiver) {
|
307
325
|
Code::Flags flags =
|
308
326
|
Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, CALLBACKS);
|
309
|
-
|
327
|
+
ASSERT(receiver->IsJSObject());
|
328
|
+
Map* map = receiver->map();
|
329
|
+
Object* code = map->FindInCodeCache(name, flags);
|
310
330
|
if (code->IsUndefined()) {
|
311
331
|
KeyedLoadStubCompiler compiler;
|
312
332
|
code = compiler.CompileLoadArrayLength(name);
|
313
333
|
if (code->IsFailure()) return code;
|
314
334
|
PROFILE(CodeCreateEvent(Logger::KEYED_LOAD_IC_TAG, Code::cast(code), name));
|
315
|
-
Object* result =
|
335
|
+
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
316
336
|
if (result->IsFailure()) return result;
|
317
337
|
}
|
318
338
|
return code;
|
@@ -323,13 +343,14 @@ Object* StubCache::ComputeKeyedLoadStringLength(String* name,
|
|
323
343
|
String* receiver) {
|
324
344
|
Code::Flags flags =
|
325
345
|
Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, CALLBACKS);
|
326
|
-
|
346
|
+
Map* map = receiver->map();
|
347
|
+
Object* code = map->FindInCodeCache(name, flags);
|
327
348
|
if (code->IsUndefined()) {
|
328
349
|
KeyedLoadStubCompiler compiler;
|
329
350
|
code = compiler.CompileLoadStringLength(name);
|
330
351
|
if (code->IsFailure()) return code;
|
331
352
|
PROFILE(CodeCreateEvent(Logger::KEYED_LOAD_IC_TAG, Code::cast(code), name));
|
332
|
-
Object* result =
|
353
|
+
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
333
354
|
if (result->IsFailure()) return result;
|
334
355
|
}
|
335
356
|
return code;
|
@@ -340,13 +361,14 @@ Object* StubCache::ComputeKeyedLoadFunctionPrototype(String* name,
|
|
340
361
|
JSFunction* receiver) {
|
341
362
|
Code::Flags flags =
|
342
363
|
Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, CALLBACKS);
|
343
|
-
|
364
|
+
Map* map = receiver->map();
|
365
|
+
Object* code = map->FindInCodeCache(name, flags);
|
344
366
|
if (code->IsUndefined()) {
|
345
367
|
KeyedLoadStubCompiler compiler;
|
346
368
|
code = compiler.CompileLoadFunctionPrototype(name);
|
347
369
|
if (code->IsFailure()) return code;
|
348
370
|
PROFILE(CodeCreateEvent(Logger::KEYED_LOAD_IC_TAG, Code::cast(code), name));
|
349
|
-
Object* result =
|
371
|
+
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
350
372
|
if (result->IsFailure()) return result;
|
351
373
|
}
|
352
374
|
return code;
|
@@ -368,7 +390,12 @@ Object* StubCache::ComputeStoreField(String* name,
|
|
368
390
|
Object* result = receiver->map()->UpdateCodeCache(name, Code::cast(code));
|
369
391
|
if (result->IsFailure()) return result;
|
370
392
|
}
|
371
|
-
return
|
393
|
+
return code;
|
394
|
+
}
|
395
|
+
|
396
|
+
|
397
|
+
Object* StubCache::ComputeStoreNormal() {
|
398
|
+
return Builtins::builtin(Builtins::StoreIC_Normal);
|
372
399
|
}
|
373
400
|
|
374
401
|
|
@@ -381,11 +408,11 @@ Object* StubCache::ComputeStoreGlobal(String* name,
|
|
381
408
|
StoreStubCompiler compiler;
|
382
409
|
code = compiler.CompileStoreGlobal(receiver, cell, name);
|
383
410
|
if (code->IsFailure()) return code;
|
384
|
-
PROFILE(CodeCreateEvent(Logger::
|
411
|
+
PROFILE(CodeCreateEvent(Logger::STORE_IC_TAG, Code::cast(code), name));
|
385
412
|
Object* result = receiver->map()->UpdateCodeCache(name, Code::cast(code));
|
386
413
|
if (result->IsFailure()) return result;
|
387
414
|
}
|
388
|
-
return
|
415
|
+
return code;
|
389
416
|
}
|
390
417
|
|
391
418
|
|
@@ -403,7 +430,7 @@ Object* StubCache::ComputeStoreCallback(String* name,
|
|
403
430
|
Object* result = receiver->map()->UpdateCodeCache(name, Code::cast(code));
|
404
431
|
if (result->IsFailure()) return result;
|
405
432
|
}
|
406
|
-
return
|
433
|
+
return code;
|
407
434
|
}
|
408
435
|
|
409
436
|
|
@@ -420,7 +447,7 @@ Object* StubCache::ComputeStoreInterceptor(String* name,
|
|
420
447
|
Object* result = receiver->map()->UpdateCodeCache(name, Code::cast(code));
|
421
448
|
if (result->IsFailure()) return result;
|
422
449
|
}
|
423
|
-
return
|
450
|
+
return code;
|
424
451
|
}
|
425
452
|
|
426
453
|
|
@@ -441,15 +468,20 @@ Object* StubCache::ComputeKeyedStoreField(String* name, JSObject* receiver,
|
|
441
468
|
return code;
|
442
469
|
}
|
443
470
|
|
471
|
+
#define CALL_LOGGER_TAG(kind, type) \
|
472
|
+
(kind == Code::CALL_IC ? Logger::type : Logger::KEYED_##type)
|
444
473
|
|
445
474
|
Object* StubCache::ComputeCallConstant(int argc,
|
446
475
|
InLoopFlag in_loop,
|
476
|
+
Code::Kind kind,
|
447
477
|
String* name,
|
448
478
|
Object* object,
|
449
479
|
JSObject* holder,
|
450
480
|
JSFunction* function) {
|
451
481
|
// Compute the check type and the map.
|
452
|
-
|
482
|
+
InlineCacheHolderFlag cache_holder =
|
483
|
+
IC::GetCodeCacheForObject(object, holder);
|
484
|
+
Map* map = IC::GetCodeCacheMap(object, cache_holder);
|
453
485
|
|
454
486
|
// Compute check type based on receiver/holder.
|
455
487
|
StubCompiler::CheckType check = StubCompiler::RECEIVER_MAP_CHECK;
|
@@ -462,8 +494,9 @@ Object* StubCache::ComputeCallConstant(int argc,
|
|
462
494
|
}
|
463
495
|
|
464
496
|
Code::Flags flags =
|
465
|
-
Code::ComputeMonomorphicFlags(
|
497
|
+
Code::ComputeMonomorphicFlags(kind,
|
466
498
|
CONSTANT_FUNCTION,
|
499
|
+
cache_holder,
|
467
500
|
in_loop,
|
468
501
|
argc);
|
469
502
|
Object* code = map->FindInCodeCache(name, flags);
|
@@ -474,26 +507,30 @@ Object* StubCache::ComputeCallConstant(int argc,
|
|
474
507
|
// caches.
|
475
508
|
if (!function->is_compiled()) return Failure::InternalError();
|
476
509
|
// Compile the stub - only create stubs for fully compiled functions.
|
477
|
-
CallStubCompiler compiler(argc, in_loop);
|
510
|
+
CallStubCompiler compiler(argc, in_loop, kind, cache_holder);
|
478
511
|
code = compiler.CompileCallConstant(object, holder, function, name, check);
|
479
512
|
if (code->IsFailure()) return code;
|
480
513
|
ASSERT_EQ(flags, Code::cast(code)->flags());
|
481
|
-
PROFILE(CodeCreateEvent(
|
514
|
+
PROFILE(CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_IC_TAG),
|
515
|
+
Code::cast(code), name));
|
482
516
|
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
483
517
|
if (result->IsFailure()) return result;
|
484
518
|
}
|
485
|
-
return
|
519
|
+
return code;
|
486
520
|
}
|
487
521
|
|
488
522
|
|
489
523
|
Object* StubCache::ComputeCallField(int argc,
|
490
524
|
InLoopFlag in_loop,
|
525
|
+
Code::Kind kind,
|
491
526
|
String* name,
|
492
527
|
Object* object,
|
493
528
|
JSObject* holder,
|
494
529
|
int index) {
|
495
530
|
// Compute the check type and the map.
|
496
|
-
|
531
|
+
InlineCacheHolderFlag cache_holder =
|
532
|
+
IC::GetCodeCacheForObject(object, holder);
|
533
|
+
Map* map = IC::GetCodeCacheMap(object, cache_holder);
|
497
534
|
|
498
535
|
// TODO(1233596): We cannot do receiver map check for non-JS objects
|
499
536
|
// because they may be represented as immediates without a
|
@@ -502,34 +539,38 @@ Object* StubCache::ComputeCallField(int argc,
|
|
502
539
|
object = holder;
|
503
540
|
}
|
504
541
|
|
505
|
-
Code::Flags flags = Code::ComputeMonomorphicFlags(
|
542
|
+
Code::Flags flags = Code::ComputeMonomorphicFlags(kind,
|
506
543
|
FIELD,
|
544
|
+
cache_holder,
|
507
545
|
in_loop,
|
508
546
|
argc);
|
509
547
|
Object* code = map->FindInCodeCache(name, flags);
|
510
548
|
if (code->IsUndefined()) {
|
511
|
-
CallStubCompiler compiler(argc, in_loop);
|
549
|
+
CallStubCompiler compiler(argc, in_loop, kind, cache_holder);
|
512
550
|
code = compiler.CompileCallField(JSObject::cast(object),
|
513
551
|
holder,
|
514
552
|
index,
|
515
553
|
name);
|
516
554
|
if (code->IsFailure()) return code;
|
517
555
|
ASSERT_EQ(flags, Code::cast(code)->flags());
|
518
|
-
PROFILE(CodeCreateEvent(
|
556
|
+
PROFILE(CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_IC_TAG),
|
557
|
+
Code::cast(code), name));
|
519
558
|
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
520
559
|
if (result->IsFailure()) return result;
|
521
560
|
}
|
522
|
-
return
|
561
|
+
return code;
|
523
562
|
}
|
524
563
|
|
525
564
|
|
526
565
|
Object* StubCache::ComputeCallInterceptor(int argc,
|
566
|
+
Code::Kind kind,
|
527
567
|
String* name,
|
528
568
|
Object* object,
|
529
569
|
JSObject* holder) {
|
530
570
|
// Compute the check type and the map.
|
531
|
-
|
532
|
-
|
571
|
+
InlineCacheHolderFlag cache_holder =
|
572
|
+
IC::GetCodeCacheForObject(object, holder);
|
573
|
+
Map* map = IC::GetCodeCacheMap(object, cache_holder);
|
533
574
|
|
534
575
|
// TODO(1233596): We cannot do receiver map check for non-JS objects
|
535
576
|
// because they may be represented as immediates without a
|
@@ -539,61 +580,73 @@ Object* StubCache::ComputeCallInterceptor(int argc,
|
|
539
580
|
}
|
540
581
|
|
541
582
|
Code::Flags flags =
|
542
|
-
Code::ComputeMonomorphicFlags(
|
583
|
+
Code::ComputeMonomorphicFlags(kind,
|
543
584
|
INTERCEPTOR,
|
585
|
+
cache_holder,
|
544
586
|
NOT_IN_LOOP,
|
545
587
|
argc);
|
546
588
|
Object* code = map->FindInCodeCache(name, flags);
|
547
589
|
if (code->IsUndefined()) {
|
548
|
-
CallStubCompiler compiler(argc, NOT_IN_LOOP);
|
590
|
+
CallStubCompiler compiler(argc, NOT_IN_LOOP, kind, cache_holder);
|
549
591
|
code = compiler.CompileCallInterceptor(JSObject::cast(object),
|
550
592
|
holder,
|
551
593
|
name);
|
552
594
|
if (code->IsFailure()) return code;
|
553
595
|
ASSERT_EQ(flags, Code::cast(code)->flags());
|
554
|
-
PROFILE(CodeCreateEvent(
|
596
|
+
PROFILE(CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_IC_TAG),
|
597
|
+
Code::cast(code), name));
|
555
598
|
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
556
599
|
if (result->IsFailure()) return result;
|
557
600
|
}
|
558
|
-
return
|
601
|
+
return code;
|
559
602
|
}
|
560
603
|
|
561
604
|
|
562
605
|
Object* StubCache::ComputeCallNormal(int argc,
|
563
606
|
InLoopFlag in_loop,
|
607
|
+
Code::Kind kind,
|
564
608
|
String* name,
|
565
609
|
JSObject* receiver) {
|
566
|
-
Object* code = ComputeCallNormal(argc, in_loop);
|
610
|
+
Object* code = ComputeCallNormal(argc, in_loop, kind);
|
567
611
|
if (code->IsFailure()) return code;
|
568
|
-
return
|
612
|
+
return code;
|
569
613
|
}
|
570
614
|
|
571
615
|
|
572
616
|
Object* StubCache::ComputeCallGlobal(int argc,
|
573
617
|
InLoopFlag in_loop,
|
618
|
+
Code::Kind kind,
|
574
619
|
String* name,
|
575
620
|
JSObject* receiver,
|
576
621
|
GlobalObject* holder,
|
577
622
|
JSGlobalPropertyCell* cell,
|
578
623
|
JSFunction* function) {
|
624
|
+
InlineCacheHolderFlag cache_holder =
|
625
|
+
IC::GetCodeCacheForObject(receiver, holder);
|
626
|
+
Map* map = IC::GetCodeCacheMap(receiver, cache_holder);
|
579
627
|
Code::Flags flags =
|
580
|
-
Code::ComputeMonomorphicFlags(
|
581
|
-
|
628
|
+
Code::ComputeMonomorphicFlags(kind,
|
629
|
+
NORMAL,
|
630
|
+
cache_holder,
|
631
|
+
in_loop,
|
632
|
+
argc);
|
633
|
+
Object* code = map->FindInCodeCache(name, flags);
|
582
634
|
if (code->IsUndefined()) {
|
583
635
|
// If the function hasn't been compiled yet, we cannot do it now
|
584
636
|
// because it may cause GC. To avoid this issue, we return an
|
585
637
|
// internal error which will make sure we do not update any
|
586
638
|
// caches.
|
587
639
|
if (!function->is_compiled()) return Failure::InternalError();
|
588
|
-
CallStubCompiler compiler(argc, in_loop);
|
640
|
+
CallStubCompiler compiler(argc, in_loop, kind, cache_holder);
|
589
641
|
code = compiler.CompileCallGlobal(receiver, holder, cell, function, name);
|
590
642
|
if (code->IsFailure()) return code;
|
591
643
|
ASSERT_EQ(flags, Code::cast(code)->flags());
|
592
|
-
PROFILE(CodeCreateEvent(
|
593
|
-
|
644
|
+
PROFILE(CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_IC_TAG),
|
645
|
+
Code::cast(code), name));
|
646
|
+
Object* result = map->UpdateCodeCache(name, Code::cast(code));
|
594
647
|
if (result->IsFailure()) return result;
|
595
648
|
}
|
596
|
-
return
|
649
|
+
return code;
|
597
650
|
}
|
598
651
|
|
599
652
|
|
@@ -637,9 +690,11 @@ static Object* FillCache(Object* code) {
|
|
637
690
|
}
|
638
691
|
|
639
692
|
|
640
|
-
Code* StubCache::FindCallInitialize(int argc,
|
693
|
+
Code* StubCache::FindCallInitialize(int argc,
|
694
|
+
InLoopFlag in_loop,
|
695
|
+
Code::Kind kind) {
|
641
696
|
Code::Flags flags =
|
642
|
-
Code::ComputeFlags(
|
697
|
+
Code::ComputeFlags(kind, in_loop, UNINITIALIZED, NORMAL, argc);
|
643
698
|
Object* result = ProbeCache(flags);
|
644
699
|
ASSERT(!result->IsUndefined());
|
645
700
|
// This might be called during the marking phase of the collector
|
@@ -648,9 +703,11 @@ Code* StubCache::FindCallInitialize(int argc, InLoopFlag in_loop) {
|
|
648
703
|
}
|
649
704
|
|
650
705
|
|
651
|
-
Object* StubCache::ComputeCallInitialize(int argc,
|
706
|
+
Object* StubCache::ComputeCallInitialize(int argc,
|
707
|
+
InLoopFlag in_loop,
|
708
|
+
Code::Kind kind) {
|
652
709
|
Code::Flags flags =
|
653
|
-
Code::ComputeFlags(
|
710
|
+
Code::ComputeFlags(kind, in_loop, UNINITIALIZED, NORMAL, argc);
|
654
711
|
Object* probe = ProbeCache(flags);
|
655
712
|
if (!probe->IsUndefined()) return probe;
|
656
713
|
StubCompiler compiler;
|
@@ -658,9 +715,11 @@ Object* StubCache::ComputeCallInitialize(int argc, InLoopFlag in_loop) {
|
|
658
715
|
}
|
659
716
|
|
660
717
|
|
661
|
-
Object* StubCache::ComputeCallPreMonomorphic(int argc,
|
718
|
+
Object* StubCache::ComputeCallPreMonomorphic(int argc,
|
719
|
+
InLoopFlag in_loop,
|
720
|
+
Code::Kind kind) {
|
662
721
|
Code::Flags flags =
|
663
|
-
Code::ComputeFlags(
|
722
|
+
Code::ComputeFlags(kind, in_loop, PREMONOMORPHIC, NORMAL, argc);
|
664
723
|
Object* probe = ProbeCache(flags);
|
665
724
|
if (!probe->IsUndefined()) return probe;
|
666
725
|
StubCompiler compiler;
|
@@ -668,9 +727,11 @@ Object* StubCache::ComputeCallPreMonomorphic(int argc, InLoopFlag in_loop) {
|
|
668
727
|
}
|
669
728
|
|
670
729
|
|
671
|
-
Object* StubCache::ComputeCallNormal(int argc,
|
730
|
+
Object* StubCache::ComputeCallNormal(int argc,
|
731
|
+
InLoopFlag in_loop,
|
732
|
+
Code::Kind kind) {
|
672
733
|
Code::Flags flags =
|
673
|
-
Code::ComputeFlags(
|
734
|
+
Code::ComputeFlags(kind, in_loop, MONOMORPHIC, NORMAL, argc);
|
674
735
|
Object* probe = ProbeCache(flags);
|
675
736
|
if (!probe->IsUndefined()) return probe;
|
676
737
|
StubCompiler compiler;
|
@@ -678,9 +739,11 @@ Object* StubCache::ComputeCallNormal(int argc, InLoopFlag in_loop) {
|
|
678
739
|
}
|
679
740
|
|
680
741
|
|
681
|
-
Object* StubCache::ComputeCallMegamorphic(int argc,
|
742
|
+
Object* StubCache::ComputeCallMegamorphic(int argc,
|
743
|
+
InLoopFlag in_loop,
|
744
|
+
Code::Kind kind) {
|
682
745
|
Code::Flags flags =
|
683
|
-
Code::ComputeFlags(
|
746
|
+
Code::ComputeFlags(kind, in_loop, MEGAMORPHIC, NORMAL, argc);
|
684
747
|
Object* probe = ProbeCache(flags);
|
685
748
|
if (!probe->IsUndefined()) return probe;
|
686
749
|
StubCompiler compiler;
|
@@ -688,9 +751,11 @@ Object* StubCache::ComputeCallMegamorphic(int argc, InLoopFlag in_loop) {
|
|
688
751
|
}
|
689
752
|
|
690
753
|
|
691
|
-
Object* StubCache::ComputeCallMiss(int argc) {
|
692
|
-
|
693
|
-
|
754
|
+
Object* StubCache::ComputeCallMiss(int argc, Code::Kind kind) {
|
755
|
+
// MONOMORPHIC_PROTOTYPE_FAILURE state is used to make sure that miss stubs
|
756
|
+
// and monomorphic stubs are not mixed up together in the stub cache.
|
757
|
+
Code::Flags flags = Code::ComputeFlags(
|
758
|
+
kind, NOT_IN_LOOP, MONOMORPHIC_PROTOTYPE_FAILURE, NORMAL, argc);
|
694
759
|
Object* probe = ProbeCache(flags);
|
695
760
|
if (!probe->IsUndefined()) return probe;
|
696
761
|
StubCompiler compiler;
|
@@ -699,9 +764,9 @@ Object* StubCache::ComputeCallMiss(int argc) {
|
|
699
764
|
|
700
765
|
|
701
766
|
#ifdef ENABLE_DEBUGGER_SUPPORT
|
702
|
-
Object* StubCache::ComputeCallDebugBreak(int argc) {
|
767
|
+
Object* StubCache::ComputeCallDebugBreak(int argc, Code::Kind kind) {
|
703
768
|
Code::Flags flags =
|
704
|
-
Code::ComputeFlags(
|
769
|
+
Code::ComputeFlags(kind, NOT_IN_LOOP, DEBUG_BREAK, NORMAL, argc);
|
705
770
|
Object* probe = ProbeCache(flags);
|
706
771
|
if (!probe->IsUndefined()) return probe;
|
707
772
|
StubCompiler compiler;
|
@@ -709,9 +774,9 @@ Object* StubCache::ComputeCallDebugBreak(int argc) {
|
|
709
774
|
}
|
710
775
|
|
711
776
|
|
712
|
-
Object* StubCache::ComputeCallDebugPrepareStepIn(int argc) {
|
777
|
+
Object* StubCache::ComputeCallDebugPrepareStepIn(int argc, Code::Kind kind) {
|
713
778
|
Code::Flags flags =
|
714
|
-
Code::ComputeFlags(
|
779
|
+
Code::ComputeFlags(kind,
|
715
780
|
NOT_IN_LOOP,
|
716
781
|
DEBUG_PREPARE_STEP_IN,
|
717
782
|
NORMAL,
|
@@ -758,8 +823,8 @@ void StubCache::Clear() {
|
|
758
823
|
|
759
824
|
|
760
825
|
// Support function for computing call IC miss stubs.
|
761
|
-
Handle<Code> ComputeCallMiss(int argc) {
|
762
|
-
CALL_HEAP_FUNCTION(StubCache::ComputeCallMiss(argc), Code);
|
826
|
+
Handle<Code> ComputeCallMiss(int argc, Code::Kind kind) {
|
827
|
+
CALL_HEAP_FUNCTION(StubCache::ComputeCallMiss(argc, kind), Code);
|
763
828
|
}
|
764
829
|
|
765
830
|
|
@@ -966,13 +1031,18 @@ Object* KeyedLoadPropertyWithInterceptor(Arguments args) {
|
|
966
1031
|
Object* StubCompiler::CompileCallInitialize(Code::Flags flags) {
|
967
1032
|
HandleScope scope;
|
968
1033
|
int argc = Code::ExtractArgumentsCountFromFlags(flags);
|
969
|
-
|
1034
|
+
Code::Kind kind = Code::ExtractKindFromFlags(flags);
|
1035
|
+
if (kind == Code::CALL_IC) {
|
1036
|
+
CallIC::GenerateInitialize(masm(), argc);
|
1037
|
+
} else {
|
1038
|
+
KeyedCallIC::GenerateInitialize(masm(), argc);
|
1039
|
+
}
|
970
1040
|
Object* result = GetCodeWithFlags(flags, "CompileCallInitialize");
|
971
1041
|
if (!result->IsFailure()) {
|
972
1042
|
Counters::call_initialize_stubs.Increment();
|
973
1043
|
Code* code = Code::cast(result);
|
974
1044
|
USE(code);
|
975
|
-
PROFILE(CodeCreateEvent(
|
1045
|
+
PROFILE(CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_INITIALIZE_TAG),
|
976
1046
|
code, code->arguments_count()));
|
977
1047
|
}
|
978
1048
|
return result;
|
@@ -984,13 +1054,18 @@ Object* StubCompiler::CompileCallPreMonomorphic(Code::Flags flags) {
|
|
984
1054
|
int argc = Code::ExtractArgumentsCountFromFlags(flags);
|
985
1055
|
// The code of the PreMonomorphic stub is the same as the code
|
986
1056
|
// of the Initialized stub. They just differ on the code object flags.
|
987
|
-
|
1057
|
+
Code::Kind kind = Code::ExtractKindFromFlags(flags);
|
1058
|
+
if (kind == Code::CALL_IC) {
|
1059
|
+
CallIC::GenerateInitialize(masm(), argc);
|
1060
|
+
} else {
|
1061
|
+
KeyedCallIC::GenerateInitialize(masm(), argc);
|
1062
|
+
}
|
988
1063
|
Object* result = GetCodeWithFlags(flags, "CompileCallPreMonomorphic");
|
989
1064
|
if (!result->IsFailure()) {
|
990
1065
|
Counters::call_premonomorphic_stubs.Increment();
|
991
1066
|
Code* code = Code::cast(result);
|
992
1067
|
USE(code);
|
993
|
-
PROFILE(CodeCreateEvent(
|
1068
|
+
PROFILE(CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_PRE_MONOMORPHIC_TAG),
|
994
1069
|
code, code->arguments_count()));
|
995
1070
|
}
|
996
1071
|
return result;
|
@@ -1000,13 +1075,18 @@ Object* StubCompiler::CompileCallPreMonomorphic(Code::Flags flags) {
|
|
1000
1075
|
Object* StubCompiler::CompileCallNormal(Code::Flags flags) {
|
1001
1076
|
HandleScope scope;
|
1002
1077
|
int argc = Code::ExtractArgumentsCountFromFlags(flags);
|
1003
|
-
|
1078
|
+
Code::Kind kind = Code::ExtractKindFromFlags(flags);
|
1079
|
+
if (kind == Code::CALL_IC) {
|
1080
|
+
CallIC::GenerateNormal(masm(), argc);
|
1081
|
+
} else {
|
1082
|
+
KeyedCallIC::GenerateNormal(masm(), argc);
|
1083
|
+
}
|
1004
1084
|
Object* result = GetCodeWithFlags(flags, "CompileCallNormal");
|
1005
1085
|
if (!result->IsFailure()) {
|
1006
1086
|
Counters::call_normal_stubs.Increment();
|
1007
1087
|
Code* code = Code::cast(result);
|
1008
1088
|
USE(code);
|
1009
|
-
PROFILE(CodeCreateEvent(
|
1089
|
+
PROFILE(CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_NORMAL_TAG),
|
1010
1090
|
code, code->arguments_count()));
|
1011
1091
|
}
|
1012
1092
|
return result;
|
@@ -1016,13 +1096,19 @@ Object* StubCompiler::CompileCallNormal(Code::Flags flags) {
|
|
1016
1096
|
Object* StubCompiler::CompileCallMegamorphic(Code::Flags flags) {
|
1017
1097
|
HandleScope scope;
|
1018
1098
|
int argc = Code::ExtractArgumentsCountFromFlags(flags);
|
1019
|
-
|
1099
|
+
Code::Kind kind = Code::ExtractKindFromFlags(flags);
|
1100
|
+
if (kind == Code::CALL_IC) {
|
1101
|
+
CallIC::GenerateMegamorphic(masm(), argc);
|
1102
|
+
} else {
|
1103
|
+
KeyedCallIC::GenerateMegamorphic(masm(), argc);
|
1104
|
+
}
|
1105
|
+
|
1020
1106
|
Object* result = GetCodeWithFlags(flags, "CompileCallMegamorphic");
|
1021
1107
|
if (!result->IsFailure()) {
|
1022
1108
|
Counters::call_megamorphic_stubs.Increment();
|
1023
1109
|
Code* code = Code::cast(result);
|
1024
1110
|
USE(code);
|
1025
|
-
PROFILE(CodeCreateEvent(
|
1111
|
+
PROFILE(CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_MEGAMORPHIC_TAG),
|
1026
1112
|
code, code->arguments_count()));
|
1027
1113
|
}
|
1028
1114
|
return result;
|
@@ -1032,13 +1118,18 @@ Object* StubCompiler::CompileCallMegamorphic(Code::Flags flags) {
|
|
1032
1118
|
Object* StubCompiler::CompileCallMiss(Code::Flags flags) {
|
1033
1119
|
HandleScope scope;
|
1034
1120
|
int argc = Code::ExtractArgumentsCountFromFlags(flags);
|
1035
|
-
|
1121
|
+
Code::Kind kind = Code::ExtractKindFromFlags(flags);
|
1122
|
+
if (kind == Code::CALL_IC) {
|
1123
|
+
CallIC::GenerateMiss(masm(), argc);
|
1124
|
+
} else {
|
1125
|
+
KeyedCallIC::GenerateMiss(masm(), argc);
|
1126
|
+
}
|
1036
1127
|
Object* result = GetCodeWithFlags(flags, "CompileCallMiss");
|
1037
1128
|
if (!result->IsFailure()) {
|
1038
1129
|
Counters::call_megamorphic_stubs.Increment();
|
1039
1130
|
Code* code = Code::cast(result);
|
1040
1131
|
USE(code);
|
1041
|
-
PROFILE(CodeCreateEvent(
|
1132
|
+
PROFILE(CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_MISS_TAG),
|
1042
1133
|
code, code->arguments_count()));
|
1043
1134
|
}
|
1044
1135
|
return result;
|
@@ -1053,7 +1144,9 @@ Object* StubCompiler::CompileCallDebugBreak(Code::Flags flags) {
|
|
1053
1144
|
if (!result->IsFailure()) {
|
1054
1145
|
Code* code = Code::cast(result);
|
1055
1146
|
USE(code);
|
1056
|
-
|
1147
|
+
Code::Kind kind = Code::ExtractKindFromFlags(flags);
|
1148
|
+
USE(kind);
|
1149
|
+
PROFILE(CodeCreateEvent(CALL_LOGGER_TAG(kind, CALL_DEBUG_BREAK_TAG),
|
1057
1150
|
code, code->arguments_count()));
|
1058
1151
|
}
|
1059
1152
|
return result;
|
@@ -1065,18 +1158,26 @@ Object* StubCompiler::CompileCallDebugPrepareStepIn(Code::Flags flags) {
|
|
1065
1158
|
// Use the same code for the the step in preparations as we do for
|
1066
1159
|
// the miss case.
|
1067
1160
|
int argc = Code::ExtractArgumentsCountFromFlags(flags);
|
1068
|
-
|
1161
|
+
Code::Kind kind = Code::ExtractKindFromFlags(flags);
|
1162
|
+
if (kind == Code::CALL_IC) {
|
1163
|
+
CallIC::GenerateMiss(masm(), argc);
|
1164
|
+
} else {
|
1165
|
+
KeyedCallIC::GenerateMiss(masm(), argc);
|
1166
|
+
}
|
1069
1167
|
Object* result = GetCodeWithFlags(flags, "CompileCallDebugPrepareStepIn");
|
1070
1168
|
if (!result->IsFailure()) {
|
1071
1169
|
Code* code = Code::cast(result);
|
1072
1170
|
USE(code);
|
1073
|
-
PROFILE(CodeCreateEvent(
|
1074
|
-
|
1171
|
+
PROFILE(CodeCreateEvent(
|
1172
|
+
CALL_LOGGER_TAG(kind, CALL_DEBUG_PREPARE_STEP_IN_TAG),
|
1173
|
+
code,
|
1174
|
+
code->arguments_count()));
|
1075
1175
|
}
|
1076
1176
|
return result;
|
1077
1177
|
}
|
1078
1178
|
#endif
|
1079
1179
|
|
1180
|
+
#undef CALL_LOGGER_TAG
|
1080
1181
|
|
1081
1182
|
Object* StubCompiler::GetCodeWithFlags(Code::Flags flags, const char* name) {
|
1082
1183
|
// Check for allocation failures during stub compilation.
|
@@ -1085,7 +1186,7 @@ Object* StubCompiler::GetCodeWithFlags(Code::Flags flags, const char* name) {
|
|
1085
1186
|
// Create code object in the heap.
|
1086
1187
|
CodeDesc desc;
|
1087
1188
|
masm_.GetCode(&desc);
|
1088
|
-
Object* result = Heap::CreateCode(desc,
|
1189
|
+
Object* result = Heap::CreateCode(desc, flags, masm_.CodeObject());
|
1089
1190
|
#ifdef ENABLE_DISASSEMBLER
|
1090
1191
|
if (FLAG_print_code_stubs && !result->IsFailure()) {
|
1091
1192
|
Code::cast(result)->Disassemble(name);
|
@@ -1142,16 +1243,60 @@ Object* KeyedStoreStubCompiler::GetCode(PropertyType type, String* name) {
|
|
1142
1243
|
}
|
1143
1244
|
|
1144
1245
|
|
1246
|
+
CallStubCompiler::CallStubCompiler(int argc,
|
1247
|
+
InLoopFlag in_loop,
|
1248
|
+
Code::Kind kind,
|
1249
|
+
InlineCacheHolderFlag cache_holder)
|
1250
|
+
: arguments_(argc)
|
1251
|
+
, in_loop_(in_loop)
|
1252
|
+
, kind_(kind)
|
1253
|
+
, cache_holder_(cache_holder) {
|
1254
|
+
}
|
1255
|
+
|
1256
|
+
|
1257
|
+
Object* CallStubCompiler::CompileCustomCall(int generator_id,
|
1258
|
+
Object* object,
|
1259
|
+
JSObject* holder,
|
1260
|
+
JSFunction* function,
|
1261
|
+
String* fname,
|
1262
|
+
CheckType check) {
|
1263
|
+
ASSERT(generator_id >= 0 && generator_id < kNumCallGenerators);
|
1264
|
+
switch (generator_id) {
|
1265
|
+
#define CALL_GENERATOR_CASE(ignored1, ignored2, name) \
|
1266
|
+
case k##name##CallGenerator: \
|
1267
|
+
return CallStubCompiler::Compile##name##Call(object, \
|
1268
|
+
holder, \
|
1269
|
+
function, \
|
1270
|
+
fname, \
|
1271
|
+
check);
|
1272
|
+
CUSTOM_CALL_IC_GENERATORS(CALL_GENERATOR_CASE)
|
1273
|
+
#undef CALL_GENERATOR_CASE
|
1274
|
+
}
|
1275
|
+
UNREACHABLE();
|
1276
|
+
return Heap::undefined_value();
|
1277
|
+
}
|
1278
|
+
|
1279
|
+
|
1145
1280
|
Object* CallStubCompiler::GetCode(PropertyType type, String* name) {
|
1146
1281
|
int argc = arguments_.immediate();
|
1147
|
-
Code::Flags flags = Code::ComputeMonomorphicFlags(
|
1282
|
+
Code::Flags flags = Code::ComputeMonomorphicFlags(kind_,
|
1148
1283
|
type,
|
1284
|
+
cache_holder_,
|
1149
1285
|
in_loop_,
|
1150
1286
|
argc);
|
1151
1287
|
return GetCodeWithFlags(flags, name);
|
1152
1288
|
}
|
1153
1289
|
|
1154
1290
|
|
1291
|
+
Object* CallStubCompiler::GetCode(JSFunction* function) {
|
1292
|
+
String* function_name = NULL;
|
1293
|
+
if (function->shared()->name()->IsString()) {
|
1294
|
+
function_name = String::cast(function->shared()->name());
|
1295
|
+
}
|
1296
|
+
return GetCode(CONSTANT_FUNCTION, function_name);
|
1297
|
+
}
|
1298
|
+
|
1299
|
+
|
1155
1300
|
Object* ConstructStubCompiler::GetCode() {
|
1156
1301
|
Code::Flags flags = Code::ComputeFlags(Code::STUB);
|
1157
1302
|
Object* result = GetCodeWithFlags(flags, "ConstructStub");
|