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
@@ -316,10 +316,21 @@ class GCExtension : public v8::Extension {
|
|
316
316
|
v8::Handle<v8::String> name);
|
317
317
|
static v8::Handle<v8::Value> GC(const v8::Arguments& args);
|
318
318
|
private:
|
319
|
-
static const char* kSource;
|
319
|
+
static const char* const kSource;
|
320
320
|
};
|
321
321
|
|
322
322
|
|
323
|
+
class ExternalizeStringExtension : public v8::Extension {
|
324
|
+
public:
|
325
|
+
ExternalizeStringExtension() : v8::Extension("v8/externalize", kSource) {}
|
326
|
+
virtual v8::Handle<v8::FunctionTemplate> GetNativeFunction(
|
327
|
+
v8::Handle<v8::String> name);
|
328
|
+
static v8::Handle<v8::Value> Externalize(const v8::Arguments& args);
|
329
|
+
static v8::Handle<v8::Value> IsAscii(const v8::Arguments& args);
|
330
|
+
private:
|
331
|
+
static const char* const kSource;
|
332
|
+
};
|
333
|
+
|
323
334
|
} } // namespace v8::internal
|
324
335
|
|
325
336
|
#endif // V8_EXECUTION_H_
|
@@ -96,6 +96,12 @@ Handle<String> Factory::NewStringFromTwoByte(Vector<const uc16> string,
|
|
96
96
|
}
|
97
97
|
|
98
98
|
|
99
|
+
Handle<String> Factory::NewRawAsciiString(int length,
|
100
|
+
PretenureFlag pretenure) {
|
101
|
+
CALL_HEAP_FUNCTION(Heap::AllocateRawAsciiString(length, pretenure), String);
|
102
|
+
}
|
103
|
+
|
104
|
+
|
99
105
|
Handle<String> Factory::NewRawTwoByteString(int length,
|
100
106
|
PretenureFlag pretenure) {
|
101
107
|
CALL_HEAP_FUNCTION(Heap::AllocateRawTwoByteString(length, pretenure), String);
|
@@ -271,14 +277,27 @@ Handle<Map> Factory::CopyMap(Handle<Map> src,
|
|
271
277
|
copy->set_inobject_properties(inobject_properties);
|
272
278
|
copy->set_unused_property_fields(inobject_properties);
|
273
279
|
copy->set_instance_size(copy->instance_size() + instance_size_delta);
|
280
|
+
copy->set_scavenger(Heap::GetScavenger(copy->instance_type(),
|
281
|
+
copy->instance_size()));
|
274
282
|
return copy;
|
275
283
|
}
|
276
284
|
|
285
|
+
|
277
286
|
Handle<Map> Factory::CopyMapDropTransitions(Handle<Map> src) {
|
278
287
|
CALL_HEAP_FUNCTION(src->CopyDropTransitions(), Map);
|
279
288
|
}
|
280
289
|
|
281
290
|
|
291
|
+
Handle<Map> Factory::GetFastElementsMap(Handle<Map> src) {
|
292
|
+
CALL_HEAP_FUNCTION(src->GetFastElementsMap(), Map);
|
293
|
+
}
|
294
|
+
|
295
|
+
|
296
|
+
Handle<Map> Factory::GetSlowElementsMap(Handle<Map> src) {
|
297
|
+
CALL_HEAP_FUNCTION(src->GetSlowElementsMap(), Map);
|
298
|
+
}
|
299
|
+
|
300
|
+
|
282
301
|
Handle<FixedArray> Factory::CopyFixedArray(Handle<FixedArray> array) {
|
283
302
|
CALL_HEAP_FUNCTION(array->Copy(), FixedArray);
|
284
303
|
}
|
@@ -524,10 +543,9 @@ Handle<JSFunction> Factory::NewFunctionWithoutPrototype(Handle<String> name,
|
|
524
543
|
|
525
544
|
|
526
545
|
Handle<Code> Factory::NewCode(const CodeDesc& desc,
|
527
|
-
ZoneScopeInfo* sinfo,
|
528
546
|
Code::Flags flags,
|
529
547
|
Handle<Object> self_ref) {
|
530
|
-
CALL_HEAP_FUNCTION(Heap::CreateCode(desc,
|
548
|
+
CALL_HEAP_FUNCTION(Heap::CreateCode(desc, flags, self_ref), Code);
|
531
549
|
}
|
532
550
|
|
533
551
|
|
@@ -663,9 +681,13 @@ Handle<JSArray> Factory::NewJSArrayWithElements(Handle<FixedArray> elements,
|
|
663
681
|
|
664
682
|
|
665
683
|
Handle<SharedFunctionInfo> Factory::NewSharedFunctionInfo(
|
666
|
-
Handle<String> name,
|
684
|
+
Handle<String> name,
|
685
|
+
int number_of_literals,
|
686
|
+
Handle<Code> code,
|
687
|
+
Handle<SerializedScopeInfo> scope_info) {
|
667
688
|
Handle<SharedFunctionInfo> shared = NewSharedFunctionInfo(name);
|
668
689
|
shared->set_code(*code);
|
690
|
+
shared->set_scope_info(*scope_info);
|
669
691
|
int literals_array_size = number_of_literals;
|
670
692
|
// If the function contains object, regexp or array literals,
|
671
693
|
// allocate extra space for a literals array prefix containing the
|
@@ -34,9 +34,6 @@
|
|
34
34
|
namespace v8 {
|
35
35
|
namespace internal {
|
36
36
|
|
37
|
-
// Forward declarations.
|
38
|
-
class ZoneScopeInfo;
|
39
|
-
|
40
37
|
// Interface for handle based allocation.
|
41
38
|
|
42
39
|
class Factory : public AllStatic {
|
@@ -95,12 +92,16 @@ class Factory : public AllStatic {
|
|
95
92
|
Vector<const char> str,
|
96
93
|
PretenureFlag pretenure = NOT_TENURED);
|
97
94
|
|
98
|
-
static Handle<String> NewStringFromTwoByte(
|
95
|
+
static Handle<String> NewStringFromTwoByte(
|
96
|
+
Vector<const uc16> str,
|
99
97
|
PretenureFlag pretenure = NOT_TENURED);
|
100
98
|
|
101
|
-
// Allocates and partially initializes
|
102
|
-
// the string are uninitialized. Currently used in regexp code
|
103
|
-
// they are pretenured.
|
99
|
+
// Allocates and partially initializes an ASCII or TwoByte String. The
|
100
|
+
// characters of the string are uninitialized. Currently used in regexp code
|
101
|
+
// only, where they are pretenured.
|
102
|
+
static Handle<String> NewRawAsciiString(
|
103
|
+
int length,
|
104
|
+
PretenureFlag pretenure = NOT_TENURED);
|
104
105
|
static Handle<String> NewRawTwoByteString(
|
105
106
|
int length,
|
106
107
|
PretenureFlag pretenure = NOT_TENURED);
|
@@ -180,6 +181,10 @@ class Factory : public AllStatic {
|
|
180
181
|
|
181
182
|
static Handle<Map> CopyMapDropTransitions(Handle<Map> map);
|
182
183
|
|
184
|
+
static Handle<Map> GetFastElementsMap(Handle<Map> map);
|
185
|
+
|
186
|
+
static Handle<Map> GetSlowElementsMap(Handle<Map> map);
|
187
|
+
|
183
188
|
static Handle<FixedArray> CopyFixedArray(Handle<FixedArray> array);
|
184
189
|
|
185
190
|
// Numbers (eg, literals) are pretenured by the parser.
|
@@ -233,7 +238,6 @@ class Factory : public AllStatic {
|
|
233
238
|
PretenureFlag pretenure = TENURED);
|
234
239
|
|
235
240
|
static Handle<Code> NewCode(const CodeDesc& desc,
|
236
|
-
ZoneScopeInfo* sinfo,
|
237
241
|
Code::Flags flags,
|
238
242
|
Handle<Object> self_reference);
|
239
243
|
|
@@ -344,7 +348,10 @@ class Factory : public AllStatic {
|
|
344
348
|
}
|
345
349
|
|
346
350
|
static Handle<SharedFunctionInfo> NewSharedFunctionInfo(
|
347
|
-
Handle<String> name,
|
351
|
+
Handle<String> name,
|
352
|
+
int number_of_literals,
|
353
|
+
Handle<Code> code,
|
354
|
+
Handle<SerializedScopeInfo> scope_info);
|
348
355
|
static Handle<SharedFunctionInfo> NewSharedFunctionInfo(Handle<String> name);
|
349
356
|
|
350
357
|
static Handle<NumberDictionary> DictionaryAtNumberPut(
|
File without changes
|
File without changes
|
@@ -314,7 +314,7 @@ static void BiggestPowerTen(uint32_t number,
|
|
314
314
|
// w's fractional part is therefore 0x567890abcdef.
|
315
315
|
// Printing w's integral part is easy (simply print 0x1234 in decimal).
|
316
316
|
// In order to print its fraction we repeatedly multiply the fraction by 10 and
|
317
|
-
// get each digit. Example the first digit after the
|
317
|
+
// get each digit. Example the first digit after the point would be computed by
|
318
318
|
// (0x567890abcdef * 10) >> 48. -> 3
|
319
319
|
// The whole thing becomes slightly more complicated because we want to stop
|
320
320
|
// once we have enough digits. That is, once the digits inside the buffer
|
@@ -490,18 +490,11 @@ bool grisu3(double v, Vector<char> buffer, int* length, int* decimal_exponent) {
|
|
490
490
|
|
491
491
|
bool FastDtoa(double v,
|
492
492
|
Vector<char> buffer,
|
493
|
-
int* sign,
|
494
493
|
int* length,
|
495
494
|
int* point) {
|
496
|
-
ASSERT(v
|
495
|
+
ASSERT(v > 0);
|
497
496
|
ASSERT(!Double(v).IsSpecial());
|
498
497
|
|
499
|
-
if (v < 0) {
|
500
|
-
v = -v;
|
501
|
-
*sign = 1;
|
502
|
-
} else {
|
503
|
-
*sign = 0;
|
504
|
-
}
|
505
498
|
int decimal_exponent;
|
506
499
|
bool result = grisu3(v, buffer, length, &decimal_exponent);
|
507
500
|
*point = *length + decimal_exponent;
|
@@ -36,7 +36,7 @@ namespace internal {
|
|
36
36
|
static const int kFastDtoaMaximalLength = 17;
|
37
37
|
|
38
38
|
// Provides a decimal representation of v.
|
39
|
-
// v must
|
39
|
+
// v must be a strictly positive finite double.
|
40
40
|
// Returns true if it succeeds, otherwise the result can not be trusted.
|
41
41
|
// There will be *length digits inside the buffer followed by a null terminator.
|
42
42
|
// If the function returns true then
|
@@ -50,7 +50,6 @@ static const int kFastDtoaMaximalLength = 17;
|
|
50
50
|
// otherwise.
|
51
51
|
bool FastDtoa(double d,
|
52
52
|
Vector<char> buffer,
|
53
|
-
int* sign,
|
54
53
|
int* length,
|
55
54
|
int* point);
|
56
55
|
|
@@ -0,0 +1,405 @@
|
|
1
|
+
// Copyright 2010 the V8 project authors. All rights reserved.
|
2
|
+
// Redistribution and use in source and binary forms, with or without
|
3
|
+
// modification, are permitted provided that the following conditions are
|
4
|
+
// met:
|
5
|
+
//
|
6
|
+
// * Redistributions of source code must retain the above copyright
|
7
|
+
// notice, this list of conditions and the following disclaimer.
|
8
|
+
// * Redistributions in binary form must reproduce the above
|
9
|
+
// copyright notice, this list of conditions and the following
|
10
|
+
// disclaimer in the documentation and/or other materials provided
|
11
|
+
// with the distribution.
|
12
|
+
// * Neither the name of Google Inc. nor the names of its
|
13
|
+
// contributors may be used to endorse or promote products derived
|
14
|
+
// from this software without specific prior written permission.
|
15
|
+
//
|
16
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
17
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
18
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
19
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
20
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
21
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
22
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
24
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
25
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
26
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
+
|
28
|
+
#include <math.h>
|
29
|
+
|
30
|
+
#include "v8.h"
|
31
|
+
|
32
|
+
#include "double.h"
|
33
|
+
#include "fixed-dtoa.h"
|
34
|
+
|
35
|
+
namespace v8 {
|
36
|
+
namespace internal {
|
37
|
+
|
38
|
+
// Represents a 128bit type. This class should be replaced by a native type on
|
39
|
+
// platforms that support 128bit integers.
|
40
|
+
class UInt128 {
|
41
|
+
public:
|
42
|
+
UInt128() : high_bits_(0), low_bits_(0) { }
|
43
|
+
UInt128(uint64_t high, uint64_t low) : high_bits_(high), low_bits_(low) { }
|
44
|
+
|
45
|
+
void Multiply(uint32_t multiplicand) {
|
46
|
+
uint64_t accumulator;
|
47
|
+
|
48
|
+
accumulator = (low_bits_ & kMask32) * multiplicand;
|
49
|
+
uint32_t part = static_cast<uint32_t>(accumulator & kMask32);
|
50
|
+
accumulator >>= 32;
|
51
|
+
accumulator = accumulator + (low_bits_ >> 32) * multiplicand;
|
52
|
+
low_bits_ = (accumulator << 32) + part;
|
53
|
+
accumulator >>= 32;
|
54
|
+
accumulator = accumulator + (high_bits_ & kMask32) * multiplicand;
|
55
|
+
part = static_cast<uint32_t>(accumulator & kMask32);
|
56
|
+
accumulator >>= 32;
|
57
|
+
accumulator = accumulator + (high_bits_ >> 32) * multiplicand;
|
58
|
+
high_bits_ = (accumulator << 32) + part;
|
59
|
+
ASSERT((accumulator >> 32) == 0);
|
60
|
+
}
|
61
|
+
|
62
|
+
void Shift(int shift_amount) {
|
63
|
+
ASSERT(-64 <= shift_amount && shift_amount <= 64);
|
64
|
+
if (shift_amount == 0) {
|
65
|
+
return;
|
66
|
+
} else if (shift_amount == -64) {
|
67
|
+
high_bits_ = low_bits_;
|
68
|
+
low_bits_ = 0;
|
69
|
+
} else if (shift_amount == 64) {
|
70
|
+
low_bits_ = high_bits_;
|
71
|
+
high_bits_ = 0;
|
72
|
+
} else if (shift_amount <= 0) {
|
73
|
+
high_bits_ <<= -shift_amount;
|
74
|
+
high_bits_ += low_bits_ >> (64 + shift_amount);
|
75
|
+
low_bits_ <<= -shift_amount;
|
76
|
+
} else {
|
77
|
+
low_bits_ >>= shift_amount;
|
78
|
+
low_bits_ += high_bits_ << (64 - shift_amount);
|
79
|
+
high_bits_ >>= shift_amount;
|
80
|
+
}
|
81
|
+
}
|
82
|
+
|
83
|
+
// Modifies *this to *this MOD (2^power).
|
84
|
+
// Returns *this DIV (2^power).
|
85
|
+
int DivModPowerOf2(int power) {
|
86
|
+
if (power >= 64) {
|
87
|
+
int result = static_cast<int>(high_bits_ >> (power - 64));
|
88
|
+
high_bits_ -= static_cast<uint64_t>(result) << (power - 64);
|
89
|
+
return result;
|
90
|
+
} else {
|
91
|
+
uint64_t part_low = low_bits_ >> power;
|
92
|
+
uint64_t part_high = high_bits_ << (64 - power);
|
93
|
+
int result = static_cast<int>(part_low + part_high);
|
94
|
+
high_bits_ = 0;
|
95
|
+
low_bits_ -= part_low << power;
|
96
|
+
return result;
|
97
|
+
}
|
98
|
+
}
|
99
|
+
|
100
|
+
bool IsZero() const {
|
101
|
+
return high_bits_ == 0 && low_bits_ == 0;
|
102
|
+
}
|
103
|
+
|
104
|
+
int BitAt(int position) {
|
105
|
+
if (position >= 64) {
|
106
|
+
return static_cast<int>(high_bits_ >> (position - 64)) & 1;
|
107
|
+
} else {
|
108
|
+
return static_cast<int>(low_bits_ >> position) & 1;
|
109
|
+
}
|
110
|
+
}
|
111
|
+
|
112
|
+
private:
|
113
|
+
static const uint64_t kMask32 = 0xFFFFFFFF;
|
114
|
+
// Value == (high_bits_ << 64) + low_bits_
|
115
|
+
uint64_t high_bits_;
|
116
|
+
uint64_t low_bits_;
|
117
|
+
};
|
118
|
+
|
119
|
+
|
120
|
+
static const int kDoubleSignificandSize = 53; // Includes the hidden bit.
|
121
|
+
|
122
|
+
|
123
|
+
static void FillDigits32FixedLength(uint32_t number, int requested_length,
|
124
|
+
Vector<char> buffer, int* length) {
|
125
|
+
for (int i = requested_length - 1; i >= 0; --i) {
|
126
|
+
buffer[(*length) + i] = '0' + number % 10;
|
127
|
+
number /= 10;
|
128
|
+
}
|
129
|
+
*length += requested_length;
|
130
|
+
}
|
131
|
+
|
132
|
+
|
133
|
+
static void FillDigits32(uint32_t number, Vector<char> buffer, int* length) {
|
134
|
+
int number_length = 0;
|
135
|
+
// We fill the digits in reverse order and exchange them afterwards.
|
136
|
+
while (number != 0) {
|
137
|
+
int digit = number % 10;
|
138
|
+
number /= 10;
|
139
|
+
buffer[(*length) + number_length] = '0' + digit;
|
140
|
+
number_length++;
|
141
|
+
}
|
142
|
+
// Exchange the digits.
|
143
|
+
int i = *length;
|
144
|
+
int j = *length + number_length - 1;
|
145
|
+
while (i < j) {
|
146
|
+
char tmp = buffer[i];
|
147
|
+
buffer[i] = buffer[j];
|
148
|
+
buffer[j] = tmp;
|
149
|
+
i++;
|
150
|
+
j--;
|
151
|
+
}
|
152
|
+
*length += number_length;
|
153
|
+
}
|
154
|
+
|
155
|
+
|
156
|
+
static void FillDigits64FixedLength(uint64_t number, int requested_length,
|
157
|
+
Vector<char> buffer, int* length) {
|
158
|
+
const uint32_t kTen7 = 10000000;
|
159
|
+
// For efficiency cut the number into 3 uint32_t parts, and print those.
|
160
|
+
uint32_t part2 = static_cast<uint32_t>(number % kTen7);
|
161
|
+
number /= kTen7;
|
162
|
+
uint32_t part1 = static_cast<uint32_t>(number % kTen7);
|
163
|
+
uint32_t part0 = static_cast<uint32_t>(number / kTen7);
|
164
|
+
|
165
|
+
FillDigits32FixedLength(part0, 3, buffer, length);
|
166
|
+
FillDigits32FixedLength(part1, 7, buffer, length);
|
167
|
+
FillDigits32FixedLength(part2, 7, buffer, length);
|
168
|
+
}
|
169
|
+
|
170
|
+
|
171
|
+
static void FillDigits64(uint64_t number, Vector<char> buffer, int* length) {
|
172
|
+
const uint32_t kTen7 = 10000000;
|
173
|
+
// For efficiency cut the number into 3 uint32_t parts, and print those.
|
174
|
+
uint32_t part2 = static_cast<uint32_t>(number % kTen7);
|
175
|
+
number /= kTen7;
|
176
|
+
uint32_t part1 = static_cast<uint32_t>(number % kTen7);
|
177
|
+
uint32_t part0 = static_cast<uint32_t>(number / kTen7);
|
178
|
+
|
179
|
+
if (part0 != 0) {
|
180
|
+
FillDigits32(part0, buffer, length);
|
181
|
+
FillDigits32FixedLength(part1, 7, buffer, length);
|
182
|
+
FillDigits32FixedLength(part2, 7, buffer, length);
|
183
|
+
} else if (part1 != 0) {
|
184
|
+
FillDigits32(part1, buffer, length);
|
185
|
+
FillDigits32FixedLength(part2, 7, buffer, length);
|
186
|
+
} else {
|
187
|
+
FillDigits32(part2, buffer, length);
|
188
|
+
}
|
189
|
+
}
|
190
|
+
|
191
|
+
|
192
|
+
static void RoundUp(Vector<char> buffer, int* length, int* decimal_point) {
|
193
|
+
// An empty buffer represents 0.
|
194
|
+
if (*length == 0) {
|
195
|
+
buffer[0] = '1';
|
196
|
+
*decimal_point = 1;
|
197
|
+
*length = 1;
|
198
|
+
return;
|
199
|
+
}
|
200
|
+
// Round the last digit until we either have a digit that was not '9' or until
|
201
|
+
// we reached the first digit.
|
202
|
+
buffer[(*length) - 1]++;
|
203
|
+
for (int i = (*length) - 1; i > 0; --i) {
|
204
|
+
if (buffer[i] != '0' + 10) {
|
205
|
+
return;
|
206
|
+
}
|
207
|
+
buffer[i] = '0';
|
208
|
+
buffer[i - 1]++;
|
209
|
+
}
|
210
|
+
// If the first digit is now '0' + 10, we would need to set it to '0' and add
|
211
|
+
// a '1' in front. However we reach the first digit only if all following
|
212
|
+
// digits had been '9' before rounding up. Now all trailing digits are '0' and
|
213
|
+
// we simply switch the first digit to '1' and update the decimal-point
|
214
|
+
// (indicating that the point is now one digit to the right).
|
215
|
+
if (buffer[0] == '0' + 10) {
|
216
|
+
buffer[0] = '1';
|
217
|
+
(*decimal_point)++;
|
218
|
+
}
|
219
|
+
}
|
220
|
+
|
221
|
+
|
222
|
+
// The given fractionals number represents a fixed-point number with binary
|
223
|
+
// point at bit (-exponent).
|
224
|
+
// Preconditions:
|
225
|
+
// -128 <= exponent <= 0.
|
226
|
+
// 0 <= fractionals * 2^exponent < 1
|
227
|
+
// The buffer holds the result.
|
228
|
+
// The function will round its result. During the rounding-process digits not
|
229
|
+
// generated by this function might be updated, and the decimal-point variable
|
230
|
+
// might be updated. If this function generates the digits 99 and the buffer
|
231
|
+
// already contained "199" (thus yielding a buffer of "19999") then a
|
232
|
+
// rounding-up will change the contents of the buffer to "20000".
|
233
|
+
static void FillFractionals(uint64_t fractionals, int exponent,
|
234
|
+
int fractional_count, Vector<char> buffer,
|
235
|
+
int* length, int* decimal_point) {
|
236
|
+
ASSERT(-128 <= exponent && exponent <= 0);
|
237
|
+
// 'fractionals' is a fixed-point number, with binary point at bit
|
238
|
+
// (-exponent). Inside the function the non-converted remainder of fractionals
|
239
|
+
// is a fixed-point number, with binary point at bit 'point'.
|
240
|
+
if (-exponent <= 64) {
|
241
|
+
// One 64 bit number is sufficient.
|
242
|
+
ASSERT(fractionals >> 56 == 0);
|
243
|
+
int point = -exponent;
|
244
|
+
for (int i = 0; i < fractional_count; ++i) {
|
245
|
+
if (fractionals == 0) break;
|
246
|
+
// Instead of multiplying by 10 we multiply by 5 and adjust the point
|
247
|
+
// location. This way the fractionals variable will not overflow.
|
248
|
+
// Invariant at the beginning of the loop: fractionals < 2^point.
|
249
|
+
// Initially we have: point <= 64 and fractionals < 2^56
|
250
|
+
// After each iteration the point is decremented by one.
|
251
|
+
// Note that 5^3 = 125 < 128 = 2^7.
|
252
|
+
// Therefore three iterations of this loop will not overflow fractionals
|
253
|
+
// (even without the subtraction at the end of the loop body). At this
|
254
|
+
// time point will satisfy point <= 61 and therefore fractionals < 2^point
|
255
|
+
// and any further multiplication of fractionals by 5 will not overflow.
|
256
|
+
fractionals *= 5;
|
257
|
+
point--;
|
258
|
+
int digit = static_cast<int>(fractionals >> point);
|
259
|
+
buffer[*length] = '0' + digit;
|
260
|
+
(*length)++;
|
261
|
+
fractionals -= static_cast<uint64_t>(digit) << point;
|
262
|
+
}
|
263
|
+
// If the first bit after the point is set we have to round up.
|
264
|
+
if (((fractionals >> (point - 1)) & 1) == 1) {
|
265
|
+
RoundUp(buffer, length, decimal_point);
|
266
|
+
}
|
267
|
+
} else { // We need 128 bits.
|
268
|
+
ASSERT(64 < -exponent && -exponent <= 128);
|
269
|
+
UInt128 fractionals128 = UInt128(fractionals, 0);
|
270
|
+
fractionals128.Shift(-exponent - 64);
|
271
|
+
int point = 128;
|
272
|
+
for (int i = 0; i < fractional_count; ++i) {
|
273
|
+
if (fractionals128.IsZero()) break;
|
274
|
+
// As before: instead of multiplying by 10 we multiply by 5 and adjust the
|
275
|
+
// point location.
|
276
|
+
// This multiplication will not overflow for the same reasons as before.
|
277
|
+
fractionals128.Multiply(5);
|
278
|
+
point--;
|
279
|
+
int digit = fractionals128.DivModPowerOf2(point);
|
280
|
+
buffer[*length] = '0' + digit;
|
281
|
+
(*length)++;
|
282
|
+
}
|
283
|
+
if (fractionals128.BitAt(point - 1) == 1) {
|
284
|
+
RoundUp(buffer, length, decimal_point);
|
285
|
+
}
|
286
|
+
}
|
287
|
+
}
|
288
|
+
|
289
|
+
|
290
|
+
// Removes leading and trailing zeros.
|
291
|
+
// If leading zeros are removed then the decimal point position is adjusted.
|
292
|
+
static void TrimZeros(Vector<char> buffer, int* length, int* decimal_point) {
|
293
|
+
while (*length > 0 && buffer[(*length) - 1] == '0') {
|
294
|
+
(*length)--;
|
295
|
+
}
|
296
|
+
int first_non_zero = 0;
|
297
|
+
while (first_non_zero < *length && buffer[first_non_zero] == '0') {
|
298
|
+
first_non_zero++;
|
299
|
+
}
|
300
|
+
if (first_non_zero != 0) {
|
301
|
+
for (int i = first_non_zero; i < *length; ++i) {
|
302
|
+
buffer[i - first_non_zero] = buffer[i];
|
303
|
+
}
|
304
|
+
*length -= first_non_zero;
|
305
|
+
*decimal_point -= first_non_zero;
|
306
|
+
}
|
307
|
+
}
|
308
|
+
|
309
|
+
|
310
|
+
bool FastFixedDtoa(double v,
|
311
|
+
int fractional_count,
|
312
|
+
Vector<char> buffer,
|
313
|
+
int* length,
|
314
|
+
int* decimal_point) {
|
315
|
+
const uint32_t kMaxUInt32 = 0xFFFFFFFF;
|
316
|
+
uint64_t significand = Double(v).Significand();
|
317
|
+
int exponent = Double(v).Exponent();
|
318
|
+
// v = significand * 2^exponent (with significand a 53bit integer).
|
319
|
+
// If the exponent is larger than 20 (i.e. we may have a 73bit number) then we
|
320
|
+
// don't know how to compute the representation. 2^73 ~= 9.5*10^21.
|
321
|
+
// If necessary this limit could probably be increased, but we don't need
|
322
|
+
// more.
|
323
|
+
if (exponent > 20) return false;
|
324
|
+
if (fractional_count > 20) return false;
|
325
|
+
*length = 0;
|
326
|
+
// At most kDoubleSignificandSize bits of the significand are non-zero.
|
327
|
+
// Given a 64 bit integer we have 11 0s followed by 53 potentially non-zero
|
328
|
+
// bits: 0..11*..0xxx..53*..xx
|
329
|
+
if (exponent + kDoubleSignificandSize > 64) {
|
330
|
+
// The exponent must be > 11.
|
331
|
+
//
|
332
|
+
// We know that v = significand * 2^exponent.
|
333
|
+
// And the exponent > 11.
|
334
|
+
// We simplify the task by dividing v by 10^17.
|
335
|
+
// The quotient delivers the first digits, and the remainder fits into a 64
|
336
|
+
// bit number.
|
337
|
+
// Dividing by 10^17 is equivalent to dividing by 5^17*2^17.
|
338
|
+
const uint64_t kFive17 = V8_2PART_UINT64_C(0xB1, A2BC2EC5); // 5^17
|
339
|
+
uint64_t divisor = kFive17;
|
340
|
+
int divisor_power = 17;
|
341
|
+
uint64_t dividend = significand;
|
342
|
+
uint32_t quotient;
|
343
|
+
uint64_t remainder;
|
344
|
+
// Let v = f * 2^e with f == significand and e == exponent.
|
345
|
+
// Then need q (quotient) and r (remainder) as follows:
|
346
|
+
// v = q * 10^17 + r
|
347
|
+
// f * 2^e = q * 10^17 + r
|
348
|
+
// f * 2^e = q * 5^17 * 2^17 + r
|
349
|
+
// If e > 17 then
|
350
|
+
// f * 2^(e-17) = q * 5^17 + r/2^17
|
351
|
+
// else
|
352
|
+
// f = q * 5^17 * 2^(17-e) + r/2^e
|
353
|
+
if (exponent > divisor_power) {
|
354
|
+
// We only allow exponents of up to 20 and therefore (17 - e) <= 3
|
355
|
+
dividend <<= exponent - divisor_power;
|
356
|
+
quotient = static_cast<uint32_t>(dividend / divisor);
|
357
|
+
remainder = (dividend % divisor) << divisor_power;
|
358
|
+
} else {
|
359
|
+
divisor <<= divisor_power - exponent;
|
360
|
+
quotient = static_cast<uint32_t>(dividend / divisor);
|
361
|
+
remainder = (dividend % divisor) << exponent;
|
362
|
+
}
|
363
|
+
FillDigits32(quotient, buffer, length);
|
364
|
+
FillDigits64FixedLength(remainder, divisor_power, buffer, length);
|
365
|
+
*decimal_point = *length;
|
366
|
+
} else if (exponent >= 0) {
|
367
|
+
// 0 <= exponent <= 11
|
368
|
+
significand <<= exponent;
|
369
|
+
FillDigits64(significand, buffer, length);
|
370
|
+
*decimal_point = *length;
|
371
|
+
} else if (exponent > -kDoubleSignificandSize) {
|
372
|
+
// We have to cut the number.
|
373
|
+
uint64_t integrals = significand >> -exponent;
|
374
|
+
uint64_t fractionals = significand - (integrals << -exponent);
|
375
|
+
if (integrals > kMaxUInt32) {
|
376
|
+
FillDigits64(integrals, buffer, length);
|
377
|
+
} else {
|
378
|
+
FillDigits32(static_cast<uint32_t>(integrals), buffer, length);
|
379
|
+
}
|
380
|
+
*decimal_point = *length;
|
381
|
+
FillFractionals(fractionals, exponent, fractional_count,
|
382
|
+
buffer, length, decimal_point);
|
383
|
+
} else if (exponent < -128) {
|
384
|
+
// This configuration (with at most 20 digits) means that all digits must be
|
385
|
+
// 0.
|
386
|
+
ASSERT(fractional_count <= 20);
|
387
|
+
buffer[0] = '\0';
|
388
|
+
*length = 0;
|
389
|
+
*decimal_point = -fractional_count;
|
390
|
+
} else {
|
391
|
+
*decimal_point = 0;
|
392
|
+
FillFractionals(significand, exponent, fractional_count,
|
393
|
+
buffer, length, decimal_point);
|
394
|
+
}
|
395
|
+
TrimZeros(buffer, length, decimal_point);
|
396
|
+
buffer[*length] = '\0';
|
397
|
+
if ((*length) == 0) {
|
398
|
+
// The string is empty and the decimal_point thus has no importance. Mimick
|
399
|
+
// Gay's dtoa and and set it to -fractional_count.
|
400
|
+
*decimal_point = -fractional_count;
|
401
|
+
}
|
402
|
+
return true;
|
403
|
+
}
|
404
|
+
|
405
|
+
} } // namespace v8::internal
|