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
@@ -39,7 +39,7 @@
|
|
39
39
|
#endif
|
40
40
|
|
41
41
|
//
|
42
|
-
//
|
42
|
+
// Most object types in the V8 JavaScript are described in this file.
|
43
43
|
//
|
44
44
|
// Inheritance hierarchy:
|
45
45
|
// - Object
|
@@ -54,29 +54,28 @@
|
|
54
54
|
// - JSGlobalObject
|
55
55
|
// - JSBuiltinsObject
|
56
56
|
// - JSGlobalProxy
|
57
|
-
//
|
58
|
-
// -
|
59
|
-
//
|
60
|
-
//
|
61
|
-
// -
|
62
|
-
//
|
63
|
-
//
|
64
|
-
//
|
65
|
-
//
|
66
|
-
//
|
67
|
-
//
|
68
|
-
//
|
69
|
-
// -
|
70
|
-
//
|
71
|
-
// -
|
72
|
-
//
|
73
|
-
//
|
74
|
-
//
|
75
|
-
//
|
76
|
-
//
|
77
|
-
//
|
78
|
-
//
|
79
|
-
// - JSFunctionResultCache
|
57
|
+
// - JSValue
|
58
|
+
// - ByteArray
|
59
|
+
// - PixelArray
|
60
|
+
// - ExternalArray
|
61
|
+
// - ExternalByteArray
|
62
|
+
// - ExternalUnsignedByteArray
|
63
|
+
// - ExternalShortArray
|
64
|
+
// - ExternalUnsignedShortArray
|
65
|
+
// - ExternalIntArray
|
66
|
+
// - ExternalUnsignedIntArray
|
67
|
+
// - ExternalFloatArray
|
68
|
+
// - FixedArray
|
69
|
+
// - DescriptorArray
|
70
|
+
// - HashTable
|
71
|
+
// - Dictionary
|
72
|
+
// - SymbolTable
|
73
|
+
// - CompilationCacheTable
|
74
|
+
// - CodeCacheHashTable
|
75
|
+
// - MapCache
|
76
|
+
// - Context
|
77
|
+
// - JSFunctionResultCache
|
78
|
+
// - SerializedScopeInfo
|
80
79
|
// - String
|
81
80
|
// - SeqString
|
82
81
|
// - SeqAsciiString
|
@@ -321,6 +320,10 @@ enum PropertyNormalizationMode {
|
|
321
320
|
ExternalTwoByteString::kSize, \
|
322
321
|
external_symbol, \
|
323
322
|
ExternalSymbol) \
|
323
|
+
V(EXTERNAL_SYMBOL_WITH_ASCII_DATA_TYPE, \
|
324
|
+
ExternalTwoByteString::kSize, \
|
325
|
+
external_symbol_with_ascii_data, \
|
326
|
+
ExternalSymbolWithAsciiData) \
|
324
327
|
V(EXTERNAL_ASCII_SYMBOL_TYPE, \
|
325
328
|
ExternalAsciiString::kSize, \
|
326
329
|
external_ascii_symbol, \
|
@@ -345,6 +348,10 @@ enum PropertyNormalizationMode {
|
|
345
348
|
ExternalTwoByteString::kSize, \
|
346
349
|
external_string, \
|
347
350
|
ExternalString) \
|
351
|
+
V(EXTERNAL_STRING_WITH_ASCII_DATA_TYPE, \
|
352
|
+
ExternalTwoByteString::kSize, \
|
353
|
+
external_string_with_ascii_data, \
|
354
|
+
ExternalStringWithAsciiData) \
|
348
355
|
V(EXTERNAL_ASCII_STRING_TYPE, \
|
349
356
|
ExternalAsciiString::kSize, \
|
350
357
|
external_ascii_string, \
|
@@ -409,8 +416,14 @@ const uint32_t kStringRepresentationMask = 0x03;
|
|
409
416
|
enum StringRepresentationTag {
|
410
417
|
kSeqStringTag = 0x0,
|
411
418
|
kConsStringTag = 0x1,
|
412
|
-
kExternalStringTag =
|
419
|
+
kExternalStringTag = 0x2
|
413
420
|
};
|
421
|
+
const uint32_t kIsConsStringMask = 0x1;
|
422
|
+
|
423
|
+
// If bit 7 is clear, then bit 3 indicates whether this two-byte
|
424
|
+
// string actually contains ascii data.
|
425
|
+
const uint32_t kAsciiDataHintMask = 0x08;
|
426
|
+
const uint32_t kAsciiDataHintTag = 0x08;
|
414
427
|
|
415
428
|
|
416
429
|
// A ConsString with an empty string as the right side is a candidate
|
@@ -427,18 +440,22 @@ const uint32_t kShortcutTypeTag = kConsStringTag;
|
|
427
440
|
|
428
441
|
enum InstanceType {
|
429
442
|
// String types.
|
430
|
-
SYMBOL_TYPE = kSymbolTag | kSeqStringTag,
|
443
|
+
SYMBOL_TYPE = kTwoByteStringTag | kSymbolTag | kSeqStringTag,
|
431
444
|
ASCII_SYMBOL_TYPE = kAsciiStringTag | kSymbolTag | kSeqStringTag,
|
432
|
-
CONS_SYMBOL_TYPE = kSymbolTag | kConsStringTag,
|
445
|
+
CONS_SYMBOL_TYPE = kTwoByteStringTag | kSymbolTag | kConsStringTag,
|
433
446
|
CONS_ASCII_SYMBOL_TYPE = kAsciiStringTag | kSymbolTag | kConsStringTag,
|
434
|
-
EXTERNAL_SYMBOL_TYPE = kSymbolTag | kExternalStringTag,
|
447
|
+
EXTERNAL_SYMBOL_TYPE = kTwoByteStringTag | kSymbolTag | kExternalStringTag,
|
448
|
+
EXTERNAL_SYMBOL_WITH_ASCII_DATA_TYPE =
|
449
|
+
kTwoByteStringTag | kSymbolTag | kExternalStringTag | kAsciiDataHintTag,
|
435
450
|
EXTERNAL_ASCII_SYMBOL_TYPE =
|
436
451
|
kAsciiStringTag | kSymbolTag | kExternalStringTag,
|
437
|
-
STRING_TYPE = kSeqStringTag,
|
452
|
+
STRING_TYPE = kTwoByteStringTag | kSeqStringTag,
|
438
453
|
ASCII_STRING_TYPE = kAsciiStringTag | kSeqStringTag,
|
439
|
-
CONS_STRING_TYPE = kConsStringTag,
|
454
|
+
CONS_STRING_TYPE = kTwoByteStringTag | kConsStringTag,
|
440
455
|
CONS_ASCII_STRING_TYPE = kAsciiStringTag | kConsStringTag,
|
441
|
-
EXTERNAL_STRING_TYPE = kExternalStringTag,
|
456
|
+
EXTERNAL_STRING_TYPE = kTwoByteStringTag | kExternalStringTag,
|
457
|
+
EXTERNAL_STRING_WITH_ASCII_DATA_TYPE =
|
458
|
+
kTwoByteStringTag | kExternalStringTag | kAsciiDataHintTag,
|
442
459
|
EXTERNAL_ASCII_STRING_TYPE = kAsciiStringTag | kExternalStringTag,
|
443
460
|
PRIVATE_EXTERNAL_ASCII_STRING_TYPE = EXTERNAL_ASCII_STRING_TYPE,
|
444
461
|
|
@@ -474,10 +491,12 @@ enum InstanceType {
|
|
474
491
|
TYPE_SWITCH_INFO_TYPE,
|
475
492
|
SCRIPT_TYPE,
|
476
493
|
CODE_CACHE_TYPE,
|
477
|
-
|
494
|
+
// The following two instance types are only used when ENABLE_DEBUGGER_SUPPORT
|
495
|
+
// is defined. However as include/v8.h contain some of the instance type
|
496
|
+
// constants always having them avoids them getting different numbers
|
497
|
+
// depending on whether ENABLE_DEBUGGER_SUPPORT is defined or not.
|
478
498
|
DEBUG_INFO_TYPE,
|
479
499
|
BREAK_POINT_INFO_TYPE,
|
480
|
-
#endif
|
481
500
|
|
482
501
|
FIXED_ARRAY_TYPE,
|
483
502
|
SHARED_FUNCTION_INFO_TYPE,
|
@@ -511,6 +530,11 @@ enum InstanceType {
|
|
511
530
|
};
|
512
531
|
|
513
532
|
|
533
|
+
STATIC_CHECK(JS_OBJECT_TYPE == Internals::kJSObjectType);
|
534
|
+
STATIC_CHECK(FIRST_NONSTRING_TYPE == Internals::kFirstNonstringType);
|
535
|
+
STATIC_CHECK(PROXY_TYPE == Internals::kProxyType);
|
536
|
+
|
537
|
+
|
514
538
|
enum CompareResult {
|
515
539
|
LESS = -1,
|
516
540
|
EQUAL = 0,
|
@@ -676,6 +700,10 @@ class Object BASE_EMBEDDED {
|
|
676
700
|
// Return the object's prototype (might be Heap::null_value()).
|
677
701
|
Object* GetPrototype();
|
678
702
|
|
703
|
+
// Tries to convert an object to an array index. Returns true and sets
|
704
|
+
// the output parameter if it succeeds.
|
705
|
+
inline bool ToArrayIndex(uint32_t* index);
|
706
|
+
|
679
707
|
// Returns true if this is a JSValue containing a string and the index is
|
680
708
|
// < the length of the string. Used to implement [] on strings.
|
681
709
|
inline bool IsStringObjectWithCharacterAt(uint32_t index);
|
@@ -1026,7 +1054,7 @@ class HeapObject: public Object {
|
|
1026
1054
|
|
1027
1055
|
// Returns the field at offset in obj, as a read/write Object* reference.
|
1028
1056
|
// Does no checking, and is safe to use during GC, while maps are invalid.
|
1029
|
-
// Does not
|
1057
|
+
// Does not invoke write barrier, so should only be assigned to
|
1030
1058
|
// during marking GC.
|
1031
1059
|
static inline Object** RawField(HeapObject* obj, int offset);
|
1032
1060
|
|
@@ -1046,6 +1074,7 @@ class HeapObject: public Object {
|
|
1046
1074
|
void HeapObjectPrint();
|
1047
1075
|
void HeapObjectVerify();
|
1048
1076
|
inline void VerifyObjectField(int offset);
|
1077
|
+
inline void VerifySmiField(int offset);
|
1049
1078
|
|
1050
1079
|
void PrintHeader(const char* id);
|
1051
1080
|
|
@@ -1118,7 +1147,7 @@ class HeapNumber: public HeapObject {
|
|
1118
1147
|
static const uint32_t kExponentMask = 0x7ff00000u;
|
1119
1148
|
static const uint32_t kMantissaMask = 0xfffffu;
|
1120
1149
|
static const int kMantissaBits = 52;
|
1121
|
-
static const int
|
1150
|
+
static const int kExponentBits = 11;
|
1122
1151
|
static const int kExponentBias = 1023;
|
1123
1152
|
static const int kExponentShift = 20;
|
1124
1153
|
static const int kMantissaBitsInTopWord = 20;
|
@@ -1150,7 +1179,7 @@ class JSObject: public HeapObject {
|
|
1150
1179
|
};
|
1151
1180
|
|
1152
1181
|
// [properties]: Backing storage for properties.
|
1153
|
-
// properties is a FixedArray in the fast case
|
1182
|
+
// properties is a FixedArray in the fast case and a Dictionary in the
|
1154
1183
|
// slow case.
|
1155
1184
|
DECL_ACCESSORS(properties, FixedArray) // Get and set fast properties.
|
1156
1185
|
inline void initialize_properties();
|
@@ -1158,10 +1187,11 @@ class JSObject: public HeapObject {
|
|
1158
1187
|
inline StringDictionary* property_dictionary(); // Gets slow properties.
|
1159
1188
|
|
1160
1189
|
// [elements]: The elements (properties with names that are integers).
|
1161
|
-
// elements is a FixedArray in the fast case,
|
1162
|
-
// case
|
1163
|
-
DECL_ACCESSORS(elements,
|
1190
|
+
// elements is a FixedArray in the fast case, a Dictionary in the slow
|
1191
|
+
// case, and a PixelArray or ExternalArray in special cases.
|
1192
|
+
DECL_ACCESSORS(elements, HeapObject)
|
1164
1193
|
inline void initialize_elements();
|
1194
|
+
inline Object* ResetElements();
|
1165
1195
|
inline ElementsKind GetElementsKind();
|
1166
1196
|
inline bool HasFastElements();
|
1167
1197
|
inline bool HasDictionaryElements();
|
@@ -1248,6 +1278,8 @@ class JSObject: public HeapObject {
|
|
1248
1278
|
PropertyAttributes attributes);
|
1249
1279
|
Object* LookupAccessor(String* name, bool is_getter);
|
1250
1280
|
|
1281
|
+
Object* DefineAccessor(AccessorInfo* info);
|
1282
|
+
|
1251
1283
|
// Used from Object::GetProperty().
|
1252
1284
|
Object* GetPropertyWithFailedAccessCheck(Object* receiver,
|
1253
1285
|
LookupResult* result,
|
@@ -1335,8 +1367,9 @@ class JSObject: public HeapObject {
|
|
1335
1367
|
// Returns the index'th element.
|
1336
1368
|
// The undefined object if index is out of bounds.
|
1337
1369
|
Object* GetElementWithReceiver(JSObject* receiver, uint32_t index);
|
1370
|
+
Object* GetElementWithInterceptor(JSObject* receiver, uint32_t index);
|
1338
1371
|
|
1339
|
-
|
1372
|
+
Object* SetFastElementsCapacityAndLength(int capacity, int length);
|
1340
1373
|
Object* SetSlowElements(Object* length);
|
1341
1374
|
|
1342
1375
|
// Lookup interceptors are used for handling properties controlled by host
|
@@ -1370,7 +1403,7 @@ class JSObject: public HeapObject {
|
|
1370
1403
|
void LookupRealNamedProperty(String* name, LookupResult* result);
|
1371
1404
|
void LookupRealNamedPropertyInPrototypes(String* name, LookupResult* result);
|
1372
1405
|
void LookupCallbackSetterInPrototypes(String* name, LookupResult* result);
|
1373
|
-
|
1406
|
+
bool SetElementWithCallbackSetterInPrototypes(uint32_t index, Object* value);
|
1374
1407
|
void LookupCallback(String* name, LookupResult* result);
|
1375
1408
|
|
1376
1409
|
// Returns the number of properties on this object filtering out properties
|
@@ -1484,6 +1517,10 @@ class JSObject: public HeapObject {
|
|
1484
1517
|
// Casting.
|
1485
1518
|
static inline JSObject* cast(Object* obj);
|
1486
1519
|
|
1520
|
+
// Disalow further properties to be added to the object.
|
1521
|
+
Object* PreventExtensions();
|
1522
|
+
|
1523
|
+
|
1487
1524
|
// Dispatched behavior.
|
1488
1525
|
void JSObjectIterateBody(int object_size, ObjectVisitor* v);
|
1489
1526
|
void JSObjectShortPrint(StringStream* accumulator);
|
@@ -1515,6 +1552,11 @@ class JSObject: public HeapObject {
|
|
1515
1552
|
#endif
|
1516
1553
|
Object* SlowReverseLookup(Object* value);
|
1517
1554
|
|
1555
|
+
// Maximal number of fast properties for the JSObject. Used to
|
1556
|
+
// restrict the number of map transitions to avoid an explosion in
|
1557
|
+
// the number of maps for objects used as dictionaries.
|
1558
|
+
inline int MaxFastProperties();
|
1559
|
+
|
1518
1560
|
// Maximal number of elements (numbered 0 .. kMaxElementCount - 1).
|
1519
1561
|
// Also maximal value of JSArray's length property.
|
1520
1562
|
static const uint32_t kMaxElementCount = 0xffffffffu;
|
@@ -1536,9 +1578,15 @@ class JSObject: public HeapObject {
|
|
1536
1578
|
|
1537
1579
|
STATIC_CHECK(kHeaderSize == Internals::kJSObjectHeaderSize);
|
1538
1580
|
|
1539
|
-
Object* GetElementWithInterceptor(JSObject* receiver, uint32_t index);
|
1540
|
-
|
1541
1581
|
private:
|
1582
|
+
Object* GetElementWithCallback(Object* receiver,
|
1583
|
+
Object* structure,
|
1584
|
+
uint32_t index,
|
1585
|
+
Object* holder);
|
1586
|
+
Object* SetElementWithCallback(Object* structure,
|
1587
|
+
uint32_t index,
|
1588
|
+
Object* value,
|
1589
|
+
JSObject* holder);
|
1542
1590
|
Object* SetElementWithInterceptor(uint32_t index, Object* value);
|
1543
1591
|
Object* SetElementWithoutInterceptor(uint32_t index, Object* value);
|
1544
1592
|
|
@@ -1569,6 +1617,13 @@ class JSObject: public HeapObject {
|
|
1569
1617
|
// Returns true if most of the elements backing storage is used.
|
1570
1618
|
bool HasDenseElements();
|
1571
1619
|
|
1620
|
+
bool CanSetCallback(String* name);
|
1621
|
+
Object* SetElementCallback(uint32_t index,
|
1622
|
+
Object* structure,
|
1623
|
+
PropertyAttributes attributes);
|
1624
|
+
Object* SetPropertyCallback(String* name,
|
1625
|
+
Object* structure,
|
1626
|
+
PropertyAttributes attributes);
|
1572
1627
|
Object* DefineGetterSetter(String* name, PropertyAttributes attributes);
|
1573
1628
|
|
1574
1629
|
void LookupInDescriptor(String* name, LookupResult* result);
|
@@ -1577,37 +1632,13 @@ class JSObject: public HeapObject {
|
|
1577
1632
|
};
|
1578
1633
|
|
1579
1634
|
|
1580
|
-
//
|
1581
|
-
class
|
1635
|
+
// FixedArray describes fixed-sized arrays with element type Object*.
|
1636
|
+
class FixedArray: public HeapObject {
|
1582
1637
|
public:
|
1583
1638
|
// [length]: length of the array.
|
1584
1639
|
inline int length();
|
1585
1640
|
inline void set_length(int value);
|
1586
1641
|
|
1587
|
-
// Convert an object to an array index.
|
1588
|
-
// Returns true if the conversion succeeded.
|
1589
|
-
static inline bool IndexFromObject(Object* object, uint32_t* index);
|
1590
|
-
|
1591
|
-
// Layout descriptor.
|
1592
|
-
static const int kLengthOffset = HeapObject::kHeaderSize;
|
1593
|
-
|
1594
|
-
protected:
|
1595
|
-
// No code should use the Array class directly, only its subclasses.
|
1596
|
-
// Use the kHeaderSize of the appropriate subclass, which may be aligned.
|
1597
|
-
static const int kHeaderSize = kLengthOffset + kIntSize;
|
1598
|
-
static const int kAlignedSize = POINTER_SIZE_ALIGN(kHeaderSize);
|
1599
|
-
|
1600
|
-
private:
|
1601
|
-
DISALLOW_IMPLICIT_CONSTRUCTORS(Array);
|
1602
|
-
};
|
1603
|
-
|
1604
|
-
|
1605
|
-
// FixedArray describes fixed sized arrays where element
|
1606
|
-
// type is Object*.
|
1607
|
-
|
1608
|
-
class FixedArray: public Array {
|
1609
|
-
public:
|
1610
|
-
|
1611
1642
|
// Setter and getter for elements.
|
1612
1643
|
inline Object* get(int index);
|
1613
1644
|
// Setter that uses write barrier.
|
@@ -1648,7 +1679,10 @@ class FixedArray: public Array {
|
|
1648
1679
|
// Casting.
|
1649
1680
|
static inline FixedArray* cast(Object* obj);
|
1650
1681
|
|
1651
|
-
|
1682
|
+
// Layout description.
|
1683
|
+
// Length is smi tagged when it is stored.
|
1684
|
+
static const int kLengthOffset = HeapObject::kHeaderSize;
|
1685
|
+
static const int kHeaderSize = kLengthOffset + kPointerSize;
|
1652
1686
|
|
1653
1687
|
// Maximal allowed size, in bytes, of a single FixedArray.
|
1654
1688
|
// Prevents overflowing size computations, as well as extreme memory
|
@@ -1978,7 +2012,7 @@ class HashTable: public FixedArray {
|
|
1978
2012
|
static const int kMaxCapacity =
|
1979
2013
|
(FixedArray::kMaxLength - kElementsStartOffset) / kEntrySize;
|
1980
2014
|
|
1981
|
-
// Find entry for key otherwise return
|
2015
|
+
// Find entry for key otherwise return kNotFound.
|
1982
2016
|
int FindEntry(Key key);
|
1983
2017
|
|
1984
2018
|
protected:
|
@@ -2150,6 +2184,11 @@ class Dictionary: public HashTable<Shape, Key> {
|
|
2150
2184
|
|
2151
2185
|
// Set the value for entry.
|
2152
2186
|
void ValueAtPut(int entry, Object* value) {
|
2187
|
+
// Check that this value can actually be written.
|
2188
|
+
PropertyDetails details = DetailsAt(entry);
|
2189
|
+
// If a value has not been initilized we allow writing to it even if
|
2190
|
+
// it is read only (a declared const that has not been initialized).
|
2191
|
+
if (details.IsReadOnly() && !ValueAt(entry)->IsTheHole()) return;
|
2153
2192
|
this->set(HashTable<Shape, Key>::EntryToIndex(entry)+1, value);
|
2154
2193
|
}
|
2155
2194
|
|
@@ -2255,6 +2294,10 @@ class StringDictionary: public Dictionary<StringDictionaryShape, String*> {
|
|
2255
2294
|
// For transforming properties of a JSObject.
|
2256
2295
|
Object* TransformPropertiesToFastFor(JSObject* obj,
|
2257
2296
|
int unused_property_fields);
|
2297
|
+
|
2298
|
+
// Find entry for key otherwise return kNotFound. Optimzed version of
|
2299
|
+
// HashTable::FindEntry.
|
2300
|
+
int FindEntry(String* key);
|
2258
2301
|
};
|
2259
2302
|
|
2260
2303
|
|
@@ -2328,6 +2371,10 @@ class JSFunctionResultCache: public FixedArray {
|
|
2328
2371
|
|
2329
2372
|
static const int kEntrySize = 2; // key + value
|
2330
2373
|
|
2374
|
+
static const int kFactoryOffset = kHeaderSize;
|
2375
|
+
static const int kFingerOffset = kFactoryOffset + kPointerSize;
|
2376
|
+
static const int kCacheSizeOffset = kFingerOffset + kPointerSize;
|
2377
|
+
|
2331
2378
|
inline void MakeZeroSize();
|
2332
2379
|
inline void Clear();
|
2333
2380
|
|
@@ -2343,8 +2390,12 @@ class JSFunctionResultCache: public FixedArray {
|
|
2343
2390
|
// ByteArray represents fixed sized byte arrays. Used by the outside world,
|
2344
2391
|
// such as PCRE, and also by the memory allocator and garbage collector to
|
2345
2392
|
// fill in free blocks in the heap.
|
2346
|
-
class ByteArray: public
|
2393
|
+
class ByteArray: public HeapObject {
|
2347
2394
|
public:
|
2395
|
+
// [length]: length of the array.
|
2396
|
+
inline int length();
|
2397
|
+
inline void set_length(int value);
|
2398
|
+
|
2348
2399
|
// Setter and getter.
|
2349
2400
|
inline byte get(int index);
|
2350
2401
|
inline void set(int index, byte value);
|
@@ -2353,7 +2404,7 @@ class ByteArray: public Array {
|
|
2353
2404
|
inline int get_int(int index);
|
2354
2405
|
|
2355
2406
|
static int SizeFor(int length) {
|
2356
|
-
return
|
2407
|
+
return OBJECT_POINTER_ALIGN(kHeaderSize + length);
|
2357
2408
|
}
|
2358
2409
|
// We use byte arrays for free blocks in the heap. Given a desired size in
|
2359
2410
|
// bytes that is a multiple of the word size and big enough to hold a byte
|
@@ -2381,9 +2432,12 @@ class ByteArray: public Array {
|
|
2381
2432
|
void ByteArrayVerify();
|
2382
2433
|
#endif
|
2383
2434
|
|
2384
|
-
//
|
2385
|
-
|
2386
|
-
static const int
|
2435
|
+
// Layout description.
|
2436
|
+
// Length is smi tagged when it is stored.
|
2437
|
+
static const int kLengthOffset = HeapObject::kHeaderSize;
|
2438
|
+
static const int kHeaderSize = kLengthOffset + kPointerSize;
|
2439
|
+
|
2440
|
+
static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize);
|
2387
2441
|
|
2388
2442
|
// Maximal memory consumption for a single ByteArray.
|
2389
2443
|
static const int kMaxSize = 512 * MB;
|
@@ -2402,8 +2456,12 @@ class ByteArray: public Array {
|
|
2402
2456
|
// multipage/the-canvas-element.html#canvaspixelarray
|
2403
2457
|
// In particular, write access clamps the value written to 0 or 255 if the
|
2404
2458
|
// value written is outside this range.
|
2405
|
-
class PixelArray: public
|
2459
|
+
class PixelArray: public HeapObject {
|
2406
2460
|
public:
|
2461
|
+
// [length]: length of the array.
|
2462
|
+
inline int length();
|
2463
|
+
inline void set_length(int value);
|
2464
|
+
|
2407
2465
|
// [external_pointer]: The pointer to the external memory area backing this
|
2408
2466
|
// pixel array.
|
2409
2467
|
DECL_ACCESSORS(external_pointer, uint8_t) // Pointer to the data store.
|
@@ -2428,9 +2486,11 @@ class PixelArray: public Array {
|
|
2428
2486
|
static const int kMaxLength = 0x3fffffff;
|
2429
2487
|
|
2430
2488
|
// PixelArray headers are not quadword aligned.
|
2431
|
-
static const int
|
2489
|
+
static const int kLengthOffset = HeapObject::kHeaderSize;
|
2490
|
+
static const int kExternalPointerOffset =
|
2491
|
+
POINTER_SIZE_ALIGN(kLengthOffset + kIntSize);
|
2432
2492
|
static const int kHeaderSize = kExternalPointerOffset + kPointerSize;
|
2433
|
-
static const int kAlignedSize =
|
2493
|
+
static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize);
|
2434
2494
|
|
2435
2495
|
private:
|
2436
2496
|
DISALLOW_IMPLICIT_CONSTRUCTORS(PixelArray);
|
@@ -2448,8 +2508,12 @@ class PixelArray: public Array {
|
|
2448
2508
|
// Out-of-range values passed to the setter are converted via a C
|
2449
2509
|
// cast, not clamping. Out-of-range indices cause exceptions to be
|
2450
2510
|
// raised rather than being silently ignored.
|
2451
|
-
class ExternalArray: public
|
2511
|
+
class ExternalArray: public HeapObject {
|
2452
2512
|
public:
|
2513
|
+
// [length]: length of the array.
|
2514
|
+
inline int length();
|
2515
|
+
inline void set_length(int value);
|
2516
|
+
|
2453
2517
|
// [external_pointer]: The pointer to the external memory area backing this
|
2454
2518
|
// external array.
|
2455
2519
|
DECL_ACCESSORS(external_pointer, void) // Pointer to the data store.
|
@@ -2461,9 +2525,11 @@ class ExternalArray: public Array {
|
|
2461
2525
|
static const int kMaxLength = 0x3fffffff;
|
2462
2526
|
|
2463
2527
|
// ExternalArray headers are not quadword aligned.
|
2464
|
-
static const int
|
2528
|
+
static const int kLengthOffset = HeapObject::kHeaderSize;
|
2529
|
+
static const int kExternalPointerOffset =
|
2530
|
+
POINTER_SIZE_ALIGN(kLengthOffset + kIntSize);
|
2465
2531
|
static const int kHeaderSize = kExternalPointerOffset + kPointerSize;
|
2466
|
-
static const int kAlignedSize =
|
2532
|
+
static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize);
|
2467
2533
|
|
2468
2534
|
private:
|
2469
2535
|
DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalArray);
|
@@ -2645,6 +2711,7 @@ class Code: public HeapObject {
|
|
2645
2711
|
LOAD_IC,
|
2646
2712
|
KEYED_LOAD_IC,
|
2647
2713
|
CALL_IC,
|
2714
|
+
KEYED_CALL_IC,
|
2648
2715
|
STORE_IC,
|
2649
2716
|
KEYED_STORE_IC,
|
2650
2717
|
BINARY_OP_IC,
|
@@ -2658,7 +2725,7 @@ class Code: public HeapObject {
|
|
2658
2725
|
};
|
2659
2726
|
|
2660
2727
|
enum {
|
2661
|
-
NUMBER_OF_KINDS =
|
2728
|
+
NUMBER_OF_KINDS = LAST_IC_KIND + 1
|
2662
2729
|
};
|
2663
2730
|
|
2664
2731
|
#ifdef ENABLE_DISASSEMBLER
|
@@ -2673,13 +2740,13 @@ class Code: public HeapObject {
|
|
2673
2740
|
inline int instruction_size();
|
2674
2741
|
inline void set_instruction_size(int value);
|
2675
2742
|
|
2676
|
-
// [
|
2677
|
-
|
2678
|
-
inline void set_relocation_size(int value);
|
2743
|
+
// [relocation_info]: Code relocation information
|
2744
|
+
DECL_ACCESSORS(relocation_info, ByteArray)
|
2679
2745
|
|
2680
|
-
//
|
2681
|
-
inline
|
2682
|
-
|
2746
|
+
// Unchecked accessor to be used during GC.
|
2747
|
+
inline ByteArray* unchecked_relocation_info();
|
2748
|
+
|
2749
|
+
inline int relocation_size();
|
2683
2750
|
|
2684
2751
|
// [flags]: Various code flags.
|
2685
2752
|
inline Flags flags();
|
@@ -2699,6 +2766,7 @@ class Code: public HeapObject {
|
|
2699
2766
|
inline bool is_store_stub() { return kind() == STORE_IC; }
|
2700
2767
|
inline bool is_keyed_store_stub() { return kind() == KEYED_STORE_IC; }
|
2701
2768
|
inline bool is_call_stub() { return kind() == CALL_IC; }
|
2769
|
+
inline bool is_keyed_call_stub() { return kind() == KEYED_CALL_IC; }
|
2702
2770
|
|
2703
2771
|
// [major_key]: For kind STUB or BINARY_OP_IC, the major key.
|
2704
2772
|
inline CodeStub::Major major_key();
|
@@ -2709,11 +2777,13 @@ class Code: public HeapObject {
|
|
2709
2777
|
InLoopFlag in_loop = NOT_IN_LOOP,
|
2710
2778
|
InlineCacheState ic_state = UNINITIALIZED,
|
2711
2779
|
PropertyType type = NORMAL,
|
2712
|
-
int argc = -1
|
2780
|
+
int argc = -1,
|
2781
|
+
InlineCacheHolderFlag holder = OWN_MAP);
|
2713
2782
|
|
2714
2783
|
static inline Flags ComputeMonomorphicFlags(
|
2715
2784
|
Kind kind,
|
2716
2785
|
PropertyType type,
|
2786
|
+
InlineCacheHolderFlag holder = OWN_MAP,
|
2717
2787
|
InLoopFlag in_loop = NOT_IN_LOOP,
|
2718
2788
|
int argc = -1);
|
2719
2789
|
|
@@ -2722,6 +2792,7 @@ class Code: public HeapObject {
|
|
2722
2792
|
static inline InLoopFlag ExtractICInLoopFromFlags(Flags flags);
|
2723
2793
|
static inline PropertyType ExtractTypeFromFlags(Flags flags);
|
2724
2794
|
static inline int ExtractArgumentsCountFromFlags(Flags flags);
|
2795
|
+
static inline InlineCacheHolderFlag ExtractCacheHolderFromFlags(Flags flags);
|
2725
2796
|
static inline Flags RemoveTypeFromFlags(Flags flags);
|
2726
2797
|
|
2727
2798
|
// Convert a target address into a code object.
|
@@ -2730,6 +2801,9 @@ class Code: public HeapObject {
|
|
2730
2801
|
// Returns the address of the first instruction.
|
2731
2802
|
inline byte* instruction_start();
|
2732
2803
|
|
2804
|
+
// Returns the address right after the last instruction.
|
2805
|
+
inline byte* instruction_end();
|
2806
|
+
|
2733
2807
|
// Returns the size of the instructions, padding, and relocation information.
|
2734
2808
|
inline int body_size();
|
2735
2809
|
|
@@ -2742,9 +2816,6 @@ class Code: public HeapObject {
|
|
2742
2816
|
// Returns true if pc is inside this object's instructions.
|
2743
2817
|
inline bool contains(byte* pc);
|
2744
2818
|
|
2745
|
-
// Returns the address of the scope information.
|
2746
|
-
inline byte* sinfo_start();
|
2747
|
-
|
2748
2819
|
// Relocate the code by delta bytes. Called to signal that this code
|
2749
2820
|
// object has been moved by delta bytes.
|
2750
2821
|
void Relocate(intptr_t delta);
|
@@ -2752,12 +2823,10 @@ class Code: public HeapObject {
|
|
2752
2823
|
// Migrate code described by desc.
|
2753
2824
|
void CopyFrom(const CodeDesc& desc);
|
2754
2825
|
|
2755
|
-
// Returns the object size for a given body
|
2756
|
-
|
2757
|
-
static int SizeFor(int body_size, int sinfo_size) {
|
2826
|
+
// Returns the object size for a given body (used for allocation).
|
2827
|
+
static int SizeFor(int body_size) {
|
2758
2828
|
ASSERT_SIZE_TAG_ALIGNED(body_size);
|
2759
|
-
|
2760
|
-
return RoundUp(kHeaderSize + body_size + sinfo_size, kCodeAlignment);
|
2829
|
+
return RoundUp(kHeaderSize + body_size, kCodeAlignment);
|
2761
2830
|
}
|
2762
2831
|
|
2763
2832
|
// Calculate the size of the code object to report for log events. This takes
|
@@ -2777,7 +2846,7 @@ class Code: public HeapObject {
|
|
2777
2846
|
static inline Code* cast(Object* obj);
|
2778
2847
|
|
2779
2848
|
// Dispatched behavior.
|
2780
|
-
int CodeSize() { return SizeFor(body_size()
|
2849
|
+
int CodeSize() { return SizeFor(body_size()); }
|
2781
2850
|
void CodeIterateBody(ObjectVisitor* v);
|
2782
2851
|
#ifdef DEBUG
|
2783
2852
|
void CodePrint();
|
@@ -2790,9 +2859,8 @@ class Code: public HeapObject {
|
|
2790
2859
|
|
2791
2860
|
// Layout description.
|
2792
2861
|
static const int kInstructionSizeOffset = HeapObject::kHeaderSize;
|
2793
|
-
static const int
|
2794
|
-
static const int
|
2795
|
-
static const int kFlagsOffset = kSInfoSizeOffset + kIntSize;
|
2862
|
+
static const int kRelocationInfoOffset = kInstructionSizeOffset + kIntSize;
|
2863
|
+
static const int kFlagsOffset = kRelocationInfoOffset + kPointerSize;
|
2796
2864
|
static const int kKindSpecificFlagsOffset = kFlagsOffset + kIntSize;
|
2797
2865
|
// Add padding to align the instruction start following right after
|
2798
2866
|
// the Code object header.
|
@@ -2806,23 +2874,26 @@ class Code: public HeapObject {
|
|
2806
2874
|
// Flags layout.
|
2807
2875
|
static const int kFlagsICStateShift = 0;
|
2808
2876
|
static const int kFlagsICInLoopShift = 3;
|
2809
|
-
static const int
|
2810
|
-
static const int
|
2811
|
-
static const int
|
2877
|
+
static const int kFlagsTypeShift = 4;
|
2878
|
+
static const int kFlagsKindShift = 7;
|
2879
|
+
static const int kFlagsICHolderShift = 11;
|
2880
|
+
static const int kFlagsArgumentsCountShift = 12;
|
2812
2881
|
|
2813
2882
|
static const int kFlagsICStateMask = 0x00000007; // 00000000111
|
2814
2883
|
static const int kFlagsICInLoopMask = 0x00000008; // 00000001000
|
2815
|
-
static const int
|
2816
|
-
static const int
|
2817
|
-
static const int
|
2884
|
+
static const int kFlagsTypeMask = 0x00000070; // 00001110000
|
2885
|
+
static const int kFlagsKindMask = 0x00000780; // 11110000000
|
2886
|
+
static const int kFlagsCacheInPrototypeMapMask = 0x00000800;
|
2887
|
+
static const int kFlagsArgumentsCountMask = 0xFFFFF000;
|
2818
2888
|
|
2819
2889
|
static const int kFlagsNotUsedInLookup =
|
2820
|
-
(kFlagsICInLoopMask | kFlagsTypeMask);
|
2890
|
+
(kFlagsICInLoopMask | kFlagsTypeMask | kFlagsCacheInPrototypeMapMask);
|
2821
2891
|
|
2822
2892
|
private:
|
2823
2893
|
DISALLOW_IMPLICIT_CONSTRUCTORS(Code);
|
2824
2894
|
};
|
2825
2895
|
|
2896
|
+
typedef void (*Scavenger)(Map* map, HeapObject** slot, HeapObject* object);
|
2826
2897
|
|
2827
2898
|
// All heap objects have a Map that describes their structure.
|
2828
2899
|
// A Map contains information about:
|
@@ -2924,12 +2995,20 @@ class Map: public HeapObject {
|
|
2924
2995
|
return ((1 << kHasInstanceCallHandler) & bit_field()) != 0;
|
2925
2996
|
}
|
2926
2997
|
|
2927
|
-
inline void set_is_extensible()
|
2928
|
-
|
2998
|
+
inline void set_is_extensible(bool value);
|
2999
|
+
inline bool is_extensible();
|
3000
|
+
|
3001
|
+
// Tells whether the instance has fast elements.
|
3002
|
+
void set_has_fast_elements(bool value) {
|
3003
|
+
if (value) {
|
3004
|
+
set_bit_field2(bit_field2() | (1 << kHasFastElements));
|
3005
|
+
} else {
|
3006
|
+
set_bit_field2(bit_field2() & ~(1 << kHasFastElements));
|
3007
|
+
}
|
2929
3008
|
}
|
2930
3009
|
|
2931
|
-
|
2932
|
-
return ((1 <<
|
3010
|
+
bool has_fast_elements() {
|
3011
|
+
return ((1 << kHasFastElements) & bit_field2()) != 0;
|
2933
3012
|
}
|
2934
3013
|
|
2935
3014
|
// Tells whether the instance needs security checks when accessing its
|
@@ -2955,6 +3034,16 @@ class Map: public HeapObject {
|
|
2955
3034
|
// instance descriptors.
|
2956
3035
|
Object* CopyDropTransitions();
|
2957
3036
|
|
3037
|
+
// Returns this map if it has the fast elements bit set, otherwise
|
3038
|
+
// returns a copy of the map, with all transitions dropped from the
|
3039
|
+
// descriptors and the fast elements bit set.
|
3040
|
+
inline Object* GetFastElementsMap();
|
3041
|
+
|
3042
|
+
// Returns this map if it has the fast elements bit cleared,
|
3043
|
+
// otherwise returns a copy of the map, with all transitions dropped
|
3044
|
+
// from the descriptors and the fast elements bit cleared.
|
3045
|
+
inline Object* GetSlowElementsMap();
|
3046
|
+
|
2958
3047
|
// Returns the property index for name (only valid for FAST MODE).
|
2959
3048
|
int PropertyIndexFor(String* name);
|
2960
3049
|
|
@@ -3006,6 +3095,13 @@ class Map: public HeapObject {
|
|
3006
3095
|
void MapVerify();
|
3007
3096
|
#endif
|
3008
3097
|
|
3098
|
+
inline Scavenger scavenger();
|
3099
|
+
inline void set_scavenger(Scavenger callback);
|
3100
|
+
|
3101
|
+
inline void Scavenge(HeapObject** slot, HeapObject* obj) {
|
3102
|
+
scavenger()(this, slot, obj);
|
3103
|
+
}
|
3104
|
+
|
3009
3105
|
static const int kMaxPreAllocatedPropertyFields = 255;
|
3010
3106
|
|
3011
3107
|
// Layout description.
|
@@ -3016,8 +3112,15 @@ class Map: public HeapObject {
|
|
3016
3112
|
static const int kInstanceDescriptorsOffset =
|
3017
3113
|
kConstructorOffset + kPointerSize;
|
3018
3114
|
static const int kCodeCacheOffset = kInstanceDescriptorsOffset + kPointerSize;
|
3019
|
-
static const int
|
3020
|
-
static const int
|
3115
|
+
static const int kScavengerCallbackOffset = kCodeCacheOffset + kPointerSize;
|
3116
|
+
static const int kPadStart = kScavengerCallbackOffset + kPointerSize;
|
3117
|
+
static const int kSize = MAP_POINTER_ALIGN(kPadStart);
|
3118
|
+
|
3119
|
+
// Layout of pointer fields. Heap iteration code relies on them
|
3120
|
+
// being continiously allocated.
|
3121
|
+
static const int kPointerFieldsBeginOffset = Map::kPrototypeOffset;
|
3122
|
+
static const int kPointerFieldsEndOffset =
|
3123
|
+
Map::kCodeCacheOffset + kPointerSize;
|
3021
3124
|
|
3022
3125
|
// Byte offsets within kInstanceSizesOffset.
|
3023
3126
|
static const int kInstanceSizeOffset = kInstanceSizesOffset + 0;
|
@@ -3050,6 +3153,7 @@ class Map: public HeapObject {
|
|
3050
3153
|
// Bit positions for bit field 2
|
3051
3154
|
static const int kIsExtensible = 0;
|
3052
3155
|
static const int kFunctionWithPrototype = 1;
|
3156
|
+
static const int kHasFastElements = 2;
|
3053
3157
|
|
3054
3158
|
// Layout of the default cache. It holds alternating name and code objects.
|
3055
3159
|
static const int kCodeCacheEntrySize = 2;
|
@@ -3172,6 +3276,9 @@ class SharedFunctionInfo: public HeapObject {
|
|
3172
3276
|
// [code]: Function code.
|
3173
3277
|
DECL_ACCESSORS(code, Code)
|
3174
3278
|
|
3279
|
+
// [scope_info]: Scope info.
|
3280
|
+
DECL_ACCESSORS(scope_info, SerializedScopeInfo)
|
3281
|
+
|
3175
3282
|
// [construct stub]: Code stub for constructing instances of this function.
|
3176
3283
|
DECL_ACCESSORS(construct_stub, Code)
|
3177
3284
|
|
@@ -3200,7 +3307,7 @@ class SharedFunctionInfo: public HeapObject {
|
|
3200
3307
|
|
3201
3308
|
// [function data]: This field holds some additional data for function.
|
3202
3309
|
// Currently it either has FunctionTemplateInfo to make benefit the API
|
3203
|
-
// or
|
3310
|
+
// or Smi identifying a custom call generator.
|
3204
3311
|
// In the long run we don't want all functions to have this field but
|
3205
3312
|
// we can fix that when we have a better model for storing hidden data
|
3206
3313
|
// on objects.
|
@@ -3209,6 +3316,7 @@ class SharedFunctionInfo: public HeapObject {
|
|
3209
3316
|
inline bool IsApiFunction();
|
3210
3317
|
inline FunctionTemplateInfo* get_api_func_data();
|
3211
3318
|
inline bool HasCustomCallGenerator();
|
3319
|
+
inline int custom_call_generator_id();
|
3212
3320
|
|
3213
3321
|
// [script info]: Script from which the function originates.
|
3214
3322
|
DECL_ACCESSORS(script, Object)
|
@@ -3275,6 +3383,12 @@ class SharedFunctionInfo: public HeapObject {
|
|
3275
3383
|
inline bool try_full_codegen();
|
3276
3384
|
inline void set_try_full_codegen(bool flag);
|
3277
3385
|
|
3386
|
+
// Indicates if this function can be lazy compiled.
|
3387
|
+
// This is used to determine if we can safely flush code from a function
|
3388
|
+
// when doing GC if we expect that the function will no longer be used.
|
3389
|
+
inline bool allows_lazy_compilation();
|
3390
|
+
inline void set_allows_lazy_compilation(bool flag);
|
3391
|
+
|
3278
3392
|
// Check whether a inlined constructor can be generated with the given
|
3279
3393
|
// prototype.
|
3280
3394
|
bool CanGenerateInlineConstructor(Object* prototype);
|
@@ -3318,7 +3432,8 @@ class SharedFunctionInfo: public HeapObject {
|
|
3318
3432
|
// Pointer fields.
|
3319
3433
|
static const int kNameOffset = HeapObject::kHeaderSize;
|
3320
3434
|
static const int kCodeOffset = kNameOffset + kPointerSize;
|
3321
|
-
static const int
|
3435
|
+
static const int kScopeInfoOffset = kCodeOffset + kPointerSize;
|
3436
|
+
static const int kConstructStubOffset = kScopeInfoOffset + kPointerSize;
|
3322
3437
|
static const int kInstanceClassNameOffset =
|
3323
3438
|
kConstructStubOffset + kPointerSize;
|
3324
3439
|
static const int kFunctionDataOffset =
|
@@ -3328,23 +3443,64 @@ class SharedFunctionInfo: public HeapObject {
|
|
3328
3443
|
static const int kInferredNameOffset = kDebugInfoOffset + kPointerSize;
|
3329
3444
|
static const int kThisPropertyAssignmentsOffset =
|
3330
3445
|
kInferredNameOffset + kPointerSize;
|
3331
|
-
|
3446
|
+
#if V8_HOST_ARCH_32_BIT
|
3447
|
+
// Smi fields.
|
3332
3448
|
static const int kLengthOffset =
|
3333
3449
|
kThisPropertyAssignmentsOffset + kPointerSize;
|
3334
|
-
static const int kFormalParameterCountOffset = kLengthOffset +
|
3450
|
+
static const int kFormalParameterCountOffset = kLengthOffset + kPointerSize;
|
3335
3451
|
static const int kExpectedNofPropertiesOffset =
|
3336
|
-
kFormalParameterCountOffset +
|
3337
|
-
static const int kNumLiteralsOffset =
|
3452
|
+
kFormalParameterCountOffset + kPointerSize;
|
3453
|
+
static const int kNumLiteralsOffset =
|
3454
|
+
kExpectedNofPropertiesOffset + kPointerSize;
|
3338
3455
|
static const int kStartPositionAndTypeOffset =
|
3456
|
+
kNumLiteralsOffset + kPointerSize;
|
3457
|
+
static const int kEndPositionOffset =
|
3458
|
+
kStartPositionAndTypeOffset + kPointerSize;
|
3459
|
+
static const int kFunctionTokenPositionOffset =
|
3460
|
+
kEndPositionOffset + kPointerSize;
|
3461
|
+
static const int kCompilerHintsOffset =
|
3462
|
+
kFunctionTokenPositionOffset + kPointerSize;
|
3463
|
+
static const int kThisPropertyAssignmentsCountOffset =
|
3464
|
+
kCompilerHintsOffset + kPointerSize;
|
3465
|
+
// Total size.
|
3466
|
+
static const int kSize = kThisPropertyAssignmentsCountOffset + kPointerSize;
|
3467
|
+
#else
|
3468
|
+
// The only reason to use smi fields instead of int fields
|
3469
|
+
// is to allow interation without maps decoding during
|
3470
|
+
// garbage collections.
|
3471
|
+
// To avoid wasting space on 64-bit architectures we use
|
3472
|
+
// the following trick: we group integer fields into pairs
|
3473
|
+
// First integer in each pair is shifted left by 1.
|
3474
|
+
// By doing this we guarantee that LSB of each kPointerSize aligned
|
3475
|
+
// word is not set and thus this word cannot be treated as pointer
|
3476
|
+
// to HeapObject during old space traversal.
|
3477
|
+
static const int kLengthOffset =
|
3478
|
+
kThisPropertyAssignmentsOffset + kPointerSize;
|
3479
|
+
static const int kFormalParameterCountOffset =
|
3480
|
+
kLengthOffset + kIntSize;
|
3481
|
+
|
3482
|
+
static const int kExpectedNofPropertiesOffset =
|
3483
|
+
kFormalParameterCountOffset + kIntSize;
|
3484
|
+
static const int kNumLiteralsOffset =
|
3485
|
+
kExpectedNofPropertiesOffset + kIntSize;
|
3486
|
+
|
3487
|
+
static const int kEndPositionOffset =
|
3339
3488
|
kNumLiteralsOffset + kIntSize;
|
3340
|
-
static const int
|
3341
|
-
|
3489
|
+
static const int kStartPositionAndTypeOffset =
|
3490
|
+
kEndPositionOffset + kIntSize;
|
3491
|
+
|
3492
|
+
static const int kFunctionTokenPositionOffset =
|
3493
|
+
kStartPositionAndTypeOffset + kIntSize;
|
3342
3494
|
static const int kCompilerHintsOffset =
|
3343
3495
|
kFunctionTokenPositionOffset + kIntSize;
|
3496
|
+
|
3344
3497
|
static const int kThisPropertyAssignmentsCountOffset =
|
3345
3498
|
kCompilerHintsOffset + kIntSize;
|
3499
|
+
|
3346
3500
|
// Total size.
|
3347
3501
|
static const int kSize = kThisPropertyAssignmentsCountOffset + kIntSize;
|
3502
|
+
|
3503
|
+
#endif
|
3348
3504
|
static const int kAlignedSize = POINTER_SIZE_ALIGN(kSize);
|
3349
3505
|
|
3350
3506
|
private:
|
@@ -3359,6 +3515,7 @@ class SharedFunctionInfo: public HeapObject {
|
|
3359
3515
|
// Bit positions in compiler_hints.
|
3360
3516
|
static const int kHasOnlySimpleThisPropertyAssignments = 0;
|
3361
3517
|
static const int kTryFullCodegen = 1;
|
3518
|
+
static const int kAllowLazyCompilation = 2;
|
3362
3519
|
|
3363
3520
|
DISALLOW_IMPLICIT_CONSTRUCTORS(SharedFunctionInfo);
|
3364
3521
|
};
|
@@ -3983,12 +4140,14 @@ class String: public HeapObject {
|
|
3983
4140
|
inline bool IsAsciiRepresentation();
|
3984
4141
|
inline bool IsTwoByteRepresentation();
|
3985
4142
|
|
3986
|
-
//
|
3987
|
-
//
|
4143
|
+
// Returns whether this string has ascii chars, i.e. all of them can
|
4144
|
+
// be ascii encoded. This might be the case even if the string is
|
4145
|
+
// two-byte. Such strings may appear when the embedder prefers
|
4146
|
+
// two-byte external representations even for ascii data.
|
3988
4147
|
//
|
3989
|
-
//
|
3990
|
-
//
|
3991
|
-
inline bool
|
4148
|
+
// NOTE: this should be considered only a hint. False negatives are
|
4149
|
+
// possible.
|
4150
|
+
inline bool HasOnlyAsciiChars();
|
3992
4151
|
|
3993
4152
|
// Get and set individual two byte chars in the string.
|
3994
4153
|
inline void Set(int index, uint16_t value);
|
@@ -3996,17 +4155,28 @@ class String: public HeapObject {
|
|
3996
4155
|
// to this method are not efficient unless the string is flat.
|
3997
4156
|
inline uint16_t Get(int index);
|
3998
4157
|
|
3999
|
-
// Try to flatten the
|
4000
|
-
//
|
4001
|
-
//
|
4002
|
-
|
4003
|
-
|
4004
|
-
//
|
4005
|
-
//
|
4006
|
-
//
|
4007
|
-
//
|
4158
|
+
// Try to flatten the string. Checks first inline to see if it is
|
4159
|
+
// necessary. Does nothing if the string is not a cons string.
|
4160
|
+
// Flattening allocates a sequential string with the same data as
|
4161
|
+
// the given string and mutates the cons string to a degenerate
|
4162
|
+
// form, where the first component is the new sequential string and
|
4163
|
+
// the second component is the empty string. If allocation fails,
|
4164
|
+
// this function returns a failure. If flattening succeeds, this
|
4165
|
+
// function returns the sequential string that is now the first
|
4166
|
+
// component of the cons string.
|
4167
|
+
//
|
4168
|
+
// Degenerate cons strings are handled specially by the garbage
|
4169
|
+
// collector (see IsShortcutCandidate).
|
4170
|
+
//
|
4171
|
+
// Use FlattenString from Handles.cc to flatten even in case an
|
4172
|
+
// allocation failure happens.
|
4008
4173
|
inline Object* TryFlatten(PretenureFlag pretenure = NOT_TENURED);
|
4009
4174
|
|
4175
|
+
// Convenience function. Has exactly the same behavior as
|
4176
|
+
// TryFlatten(), except in the case of failure returns the original
|
4177
|
+
// string.
|
4178
|
+
inline String* TryFlattenGetString(PretenureFlag pretenure = NOT_TENURED);
|
4179
|
+
|
4010
4180
|
Vector<const char> ToAsciiVector();
|
4011
4181
|
Vector<const uc16> ToUC16Vector();
|
4012
4182
|
|
@@ -4089,8 +4259,7 @@ class String: public HeapObject {
|
|
4089
4259
|
// Layout description.
|
4090
4260
|
static const int kLengthOffset = HeapObject::kHeaderSize;
|
4091
4261
|
static const int kHashFieldOffset = kLengthOffset + kPointerSize;
|
4092
|
-
static const int kSize = kHashFieldOffset +
|
4093
|
-
// Notice: kSize is not pointer-size aligned if pointers are 64-bit.
|
4262
|
+
static const int kSize = kHashFieldOffset + kPointerSize;
|
4094
4263
|
|
4095
4264
|
// Maximum number of characters to consider when trying to convert a string
|
4096
4265
|
// value into an array index.
|
@@ -4109,12 +4278,12 @@ class String: public HeapObject {
|
|
4109
4278
|
// whether a hash code has been computed. If the hash code has been
|
4110
4279
|
// computed the 2nd bit tells whether the string can be used as an
|
4111
4280
|
// array index.
|
4112
|
-
static const int
|
4113
|
-
static const int
|
4114
|
-
static const int
|
4281
|
+
static const int kHashNotComputedMask = 1;
|
4282
|
+
static const int kIsNotArrayIndexMask = 1 << 1;
|
4283
|
+
static const int kNofHashBitFields = 2;
|
4115
4284
|
|
4116
4285
|
// Shift constant retrieving hash code from hash field.
|
4117
|
-
static const int kHashShift =
|
4286
|
+
static const int kHashShift = kNofHashBitFields;
|
4118
4287
|
|
4119
4288
|
// Array index strings this short can keep their index in the hash
|
4120
4289
|
// field.
|
@@ -4123,13 +4292,35 @@ class String: public HeapObject {
|
|
4123
4292
|
// For strings which are array indexes the hash value has the string length
|
4124
4293
|
// mixed into the hash, mainly to avoid a hash value of zero which would be
|
4125
4294
|
// the case for the string '0'. 24 bits are used for the array index value.
|
4126
|
-
static const int
|
4295
|
+
static const int kArrayIndexValueBits = 24;
|
4296
|
+
static const int kArrayIndexLengthBits =
|
4297
|
+
kBitsPerInt - kArrayIndexValueBits - kNofHashBitFields;
|
4298
|
+
|
4299
|
+
STATIC_CHECK((kArrayIndexLengthBits > 0));
|
4300
|
+
|
4301
|
+
static const int kArrayIndexHashLengthShift =
|
4302
|
+
kArrayIndexValueBits + kNofHashBitFields;
|
4303
|
+
|
4127
4304
|
static const int kArrayIndexHashMask = (1 << kArrayIndexHashLengthShift) - 1;
|
4128
|
-
|
4129
|
-
|
4305
|
+
|
4306
|
+
static const int kArrayIndexValueMask =
|
4307
|
+
((1 << kArrayIndexValueBits) - 1) << kHashShift;
|
4308
|
+
|
4309
|
+
// Check that kMaxCachedArrayIndexLength + 1 is a power of two so we
|
4310
|
+
// could use a mask to test if the length of string is less than or equal to
|
4311
|
+
// kMaxCachedArrayIndexLength.
|
4312
|
+
STATIC_CHECK(IS_POWER_OF_TWO(kMaxCachedArrayIndexLength + 1));
|
4313
|
+
|
4314
|
+
static const int kContainsCachedArrayIndexMask =
|
4315
|
+
(~kMaxCachedArrayIndexLength << kArrayIndexHashLengthShift) |
|
4316
|
+
kIsNotArrayIndexMask;
|
4130
4317
|
|
4131
4318
|
// Value of empty hash field indicating that the hash is not computed.
|
4132
|
-
static const int kEmptyHashField =
|
4319
|
+
static const int kEmptyHashField =
|
4320
|
+
kIsNotArrayIndexMask | kHashNotComputedMask;
|
4321
|
+
|
4322
|
+
// Value of hash field containing computed hash equal to zero.
|
4323
|
+
static const int kZeroHash = kIsNotArrayIndexMask;
|
4133
4324
|
|
4134
4325
|
// Maximal string length.
|
4135
4326
|
static const int kMaxLength = (1 << (32 - 2)) - 1;
|
@@ -4192,6 +4383,13 @@ class String: public HeapObject {
|
|
4192
4383
|
unsigned max_chars);
|
4193
4384
|
|
4194
4385
|
private:
|
4386
|
+
// Try to flatten the top level ConsString that is hiding behind this
|
4387
|
+
// string. This is a no-op unless the string is a ConsString. Flatten
|
4388
|
+
// mutates the ConsString and might return a failure.
|
4389
|
+
Object* SlowTryFlatten(PretenureFlag pretenure);
|
4390
|
+
|
4391
|
+
static inline bool IsHashFieldComputed(uint32_t field);
|
4392
|
+
|
4195
4393
|
// Slow case of String::Equals. This implementation works on any strings
|
4196
4394
|
// but it is most efficient on strings that are almost flat.
|
4197
4395
|
bool SlowEquals(String* other);
|
@@ -4222,6 +4420,8 @@ class SeqString: public String {
|
|
4222
4420
|
// Each character in the AsciiString is an ascii character.
|
4223
4421
|
class SeqAsciiString: public SeqString {
|
4224
4422
|
public:
|
4423
|
+
static const bool kHasAsciiEncoding = true;
|
4424
|
+
|
4225
4425
|
// Dispatched behavior.
|
4226
4426
|
inline uint16_t SeqAsciiStringGet(int index);
|
4227
4427
|
inline void SeqAsciiStringSet(int index, uint16_t value);
|
@@ -4241,7 +4441,7 @@ class SeqAsciiString: public SeqString {
|
|
4241
4441
|
|
4242
4442
|
// Computes the size for an AsciiString instance of a given length.
|
4243
4443
|
static int SizeFor(int length) {
|
4244
|
-
return
|
4444
|
+
return OBJECT_POINTER_ALIGN(kHeaderSize + length * kCharSize);
|
4245
4445
|
}
|
4246
4446
|
|
4247
4447
|
// Layout description.
|
@@ -4271,6 +4471,8 @@ class SeqAsciiString: public SeqString {
|
|
4271
4471
|
// Each character in the TwoByteString is a two-byte uint16_t.
|
4272
4472
|
class SeqTwoByteString: public SeqString {
|
4273
4473
|
public:
|
4474
|
+
static const bool kHasAsciiEncoding = false;
|
4475
|
+
|
4274
4476
|
// Dispatched behavior.
|
4275
4477
|
inline uint16_t SeqTwoByteStringGet(int index);
|
4276
4478
|
inline void SeqTwoByteStringSet(int index, uint16_t value);
|
@@ -4293,7 +4495,7 @@ class SeqTwoByteString: public SeqString {
|
|
4293
4495
|
|
4294
4496
|
// Computes the size for a TwoByteString instance of a given length.
|
4295
4497
|
static int SizeFor(int length) {
|
4296
|
-
return
|
4498
|
+
return OBJECT_POINTER_ALIGN(kHeaderSize + length * kShortSize);
|
4297
4499
|
}
|
4298
4500
|
|
4299
4501
|
// Layout description.
|
@@ -4403,6 +4605,8 @@ class ExternalString: public String {
|
|
4403
4605
|
// ASCII string.
|
4404
4606
|
class ExternalAsciiString: public ExternalString {
|
4405
4607
|
public:
|
4608
|
+
static const bool kHasAsciiEncoding = true;
|
4609
|
+
|
4406
4610
|
typedef v8::String::ExternalAsciiStringResource Resource;
|
4407
4611
|
|
4408
4612
|
// The underlying resource.
|
@@ -4435,6 +4639,8 @@ class ExternalAsciiString: public ExternalString {
|
|
4435
4639
|
// encoded string.
|
4436
4640
|
class ExternalTwoByteString: public ExternalString {
|
4437
4641
|
public:
|
4642
|
+
static const bool kHasAsciiEncoding = false;
|
4643
|
+
|
4438
4644
|
typedef v8::String::ExternalStringResource Resource;
|
4439
4645
|
|
4440
4646
|
// The underlying string resource.
|