therubyracer 0.6.3 → 0.7.0.pre
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/Rakefile +10 -9
- data/ext/v8/callbacks.cpp +15 -8
- data/ext/v8/converters.cpp +7 -8
- data/ext/v8/converters.h +0 -2
- data/ext/v8/extconf.rb +2 -0
- data/ext/v8/rr.cpp +169 -0
- data/ext/v8/rr.h +34 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/AUTHORS +8 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/ChangeLog +198 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/LICENSE +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/SConstruct +152 -38
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/include/v8-debug.h +52 -4
- data/ext/v8/upstream/2.1.10/include/v8-profiler.h +176 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/include/v8.h +227 -48
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/SConscript +60 -10
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/accessors.cc +5 -39
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/accessors.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/allocation.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/allocation.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/api.cc +477 -57
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/api.h +8 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/apinatives.js +1 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/apiutils.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arguments.h +5 -6
- data/ext/v8/upstream/{2.0.6/src/arm/assembler-thumb2-inl.h → 2.1.10/src/arm/assembler-arm-inl.h} +42 -27
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/assembler-arm.cc +430 -216
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/assembler-arm.h +199 -110
- data/ext/v8/upstream/{2.0.6/src/arm/assembler-arm-inl.h → 2.1.10/src/arm/assembler-thumb2-inl.h} +4 -18
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/assembler-thumb2.cc +142 -85
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/assembler-thumb2.h +18 -9
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/builtins-arm.cc +127 -87
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/codegen-arm-inl.h +3 -5
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/codegen-arm.cc +4634 -1427
- data/ext/v8/upstream/2.1.10/src/arm/codegen-arm.h +946 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/constants-arm.cc +21 -3
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/constants-arm.h +39 -13
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/cpu-arm.cc +9 -3
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/debug-arm.cc +34 -8
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/disasm-arm.cc +262 -117
- data/ext/v8/upstream/2.1.10/src/arm/fast-codegen-arm.cc +238 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/frames-arm.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/frames-arm.h +0 -0
- data/ext/v8/upstream/{2.0.6/src/arm/fast-codegen-arm.cc → 2.1.10/src/arm/full-codegen-arm.cc} +453 -283
- data/ext/v8/upstream/2.1.10/src/arm/ic-arm.cc +1833 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/jump-target-arm.cc +3 -29
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/macro-assembler-arm.cc +564 -104
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/macro-assembler-arm.h +255 -46
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/regexp-macro-assembler-arm.cc +78 -104
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/regexp-macro-assembler-arm.h +6 -22
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/register-allocator-arm-inl.h +0 -3
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/register-allocator-arm.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/register-allocator-arm.h +2 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/simulator-arm.cc +557 -180
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/simulator-arm.h +52 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/arm/stub-cache-arm.cc +904 -240
- data/ext/v8/upstream/2.1.10/src/arm/virtual-frame-arm.cc +668 -0
- data/ext/v8/upstream/2.1.10/src/arm/virtual-frame-arm.h +503 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/array.js +82 -109
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/assembler.cc +49 -13
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/assembler.h +27 -5
- data/ext/v8/upstream/2.1.10/src/ast.cc +1138 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ast.h +354 -53
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/bootstrapper.cc +609 -501
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/bootstrapper.h +27 -8
- data/ext/v8/upstream/2.1.10/src/builtins.cc +1512 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/builtins.h +41 -25
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/bytecodes-irregexp.h +0 -0
- data/ext/v8/upstream/2.1.10/src/cached-powers.h +119 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/char-predicates-inl.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/char-predicates.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/checks.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/checks.h +25 -1
- data/ext/v8/upstream/2.1.10/src/circular-queue-inl.h +101 -0
- data/ext/v8/upstream/2.1.10/src/circular-queue.cc +121 -0
- data/ext/v8/upstream/2.1.10/src/circular-queue.h +129 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/code-stubs.cc +23 -8
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/code-stubs.h +16 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/code.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/codegen-inl.h +6 -34
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/codegen.cc +73 -92
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/codegen.h +164 -68
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/compilation-cache.cc +117 -73
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/compilation-cache.h +18 -17
- data/ext/v8/upstream/2.1.10/src/compiler.cc +623 -0
- data/ext/v8/upstream/2.1.10/src/compiler.h +299 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/contexts.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/contexts.h +8 -11
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/conversions-inl.h +28 -13
- data/ext/v8/upstream/2.1.10/src/conversions.cc +1105 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/conversions.h +9 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/counters.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/counters.h +1 -1
- data/ext/v8/upstream/2.1.10/src/cpu-profiler-inl.h +99 -0
- data/ext/v8/upstream/2.1.10/src/cpu-profiler.cc +494 -0
- data/ext/v8/upstream/2.1.10/src/cpu-profiler.h +277 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/cpu.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8-debug.cc +15 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8-debug.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8-posix.cc +18 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8-readline.cc +2 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8-windows.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8.cc +10 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8.h +2 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/d8.js +43 -38
- data/ext/v8/upstream/2.1.10/src/data-flow.cc +755 -0
- data/ext/v8/upstream/2.1.10/src/data-flow.h +278 -0
- data/ext/v8/upstream/{2.0.6/src/date-delay.js → 2.1.10/src/date.js} +100 -110
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/dateparser-inl.h +11 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/dateparser.cc +24 -26
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/dateparser.h +8 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/debug-agent.cc +3 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/debug-agent.h +0 -0
- data/ext/v8/upstream/{2.0.6/src/debug-delay.js → 2.1.10/src/debug-debugger.js} +111 -15
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/debug.cc +156 -96
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/debug.h +53 -5
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/disasm.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/disassembler.cc +2 -8
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/disassembler.h +0 -0
- data/ext/v8/upstream/2.1.10/src/diy-fp.cc +58 -0
- data/ext/v8/upstream/2.1.10/src/diy-fp.h +117 -0
- data/ext/v8/upstream/2.1.10/src/double.h +169 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/dtoa-config.c +4 -3
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/execution.cc +22 -22
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/execution.h +17 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/factory.cc +70 -46
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/factory.h +27 -17
- data/ext/v8/upstream/2.1.10/src/fast-codegen.cc +746 -0
- data/ext/v8/upstream/2.1.10/src/fast-codegen.h +161 -0
- data/ext/v8/upstream/2.1.10/src/fast-dtoa.cc +512 -0
- data/ext/v8/upstream/2.1.10/src/fast-dtoa.h +59 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/flag-definitions.h +32 -11
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/flags.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/flags.h +0 -0
- data/ext/v8/upstream/2.1.10/src/flow-graph.cc +763 -0
- data/ext/v8/upstream/2.1.10/src/flow-graph.h +180 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/frame-element.cc +1 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/frame-element.h +49 -11
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/frames-inl.h +2 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/frames.cc +91 -17
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/frames.h +24 -2
- data/ext/v8/upstream/{2.0.6/src/fast-codegen.cc → 2.1.10/src/full-codegen.cc} +549 -198
- data/ext/v8/upstream/{2.0.6/src/fast-codegen.h → 2.1.10/src/full-codegen.h} +109 -29
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/func-name-inferrer.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/func-name-inferrer.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/global-handles.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/global-handles.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/globals.h +67 -43
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/handles-inl.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/handles.cc +124 -129
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/handles.h +33 -15
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/hashmap.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/hashmap.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/heap-inl.h +56 -12
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/heap-profiler.cc +2 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/heap-profiler.h +2 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/heap.cc +413 -221
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/heap.h +192 -67
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/assembler-ia32-inl.h +6 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/assembler-ia32.cc +187 -32
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/assembler-ia32.h +31 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/builtins-ia32.cc +160 -133
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/codegen-ia32-inl.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/codegen-ia32.cc +5533 -2177
- data/ext/v8/upstream/{2.0.6/src/x64/codegen-x64.h → 2.1.10/src/ia32/codegen-ia32.h} +453 -134
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/cpu-ia32.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/debug-ia32.cc +63 -8
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/disasm-ia32.cc +99 -16
- data/ext/v8/upstream/2.1.10/src/ia32/fast-codegen-ia32.cc +950 -0
- data/ext/v8/upstream/2.1.10/src/ia32/fast-codegen-ia32.h +155 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/frames-ia32.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/frames-ia32.h +0 -0
- data/ext/v8/upstream/{2.0.6/src/ia32/fast-codegen-ia32.cc → 2.1.10/src/ia32/full-codegen-ia32.cc} +454 -253
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/ic-ia32.cc +545 -390
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/jump-target-ia32.cc +1 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/macro-assembler-ia32.cc +330 -139
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/macro-assembler-ia32.h +96 -30
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/regexp-macro-assembler-ia32.cc +73 -89
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/regexp-macro-assembler-ia32.h +6 -21
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/register-allocator-ia32-inl.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/register-allocator-ia32.cc +59 -5
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/register-allocator-ia32.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/simulator-ia32.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/simulator-ia32.h +2 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/stub-cache-ia32.cc +745 -303
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/virtual-frame-ia32.cc +278 -71
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ia32/virtual-frame-ia32.h +78 -22
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ic-inl.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ic.cc +172 -89
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/ic.h +51 -20
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/interpreter-irregexp.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/interpreter-irregexp.h +0 -0
- data/ext/v8/upstream/{2.0.6/src/json-delay.js → 2.1.10/src/json.js} +26 -12
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/jsregexp.cc +151 -118
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/jsregexp.h +31 -7
- data/ext/v8/upstream/2.1.10/src/jump-target-heavy-inl.h +51 -0
- data/ext/v8/upstream/{2.0.6/src/jump-target.cc → 2.1.10/src/jump-target-heavy.cc} +164 -184
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/jump-target-inl.h +8 -9
- data/ext/v8/upstream/{2.0.6/src/usage-analyzer.h → 2.1.10/src/jump-target-light-inl.h} +9 -7
- data/ext/v8/upstream/2.1.10/src/jump-target-light.cc +86 -0
- data/ext/v8/upstream/2.1.10/src/jump-target.cc +155 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/jump-target.h +6 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/list-inl.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/list.h +2 -1
- data/ext/v8/upstream/2.1.10/src/liveedit-debugger.js +944 -0
- data/ext/v8/upstream/2.1.10/src/liveedit.cc +1468 -0
- data/ext/v8/upstream/2.1.10/src/liveedit.h +170 -0
- data/ext/v8/upstream/2.1.10/src/log-inl.h +59 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/log-utils.cc +3 -9
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/log-utils.h +1 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/log.cc +198 -95
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/log.h +50 -49
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/macro-assembler.h +9 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/macros.py +30 -11
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/mark-compact.cc +464 -152
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/mark-compact.h +41 -20
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/math.js +9 -8
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/memory.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/messages.cc +1 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/messages.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/messages.js +46 -9
- data/ext/v8/upstream/2.1.10/src/mips/assembler-mips-inl.h +215 -0
- data/ext/v8/upstream/2.1.10/src/mips/assembler-mips.cc +1208 -0
- data/ext/v8/upstream/2.1.10/src/mips/assembler-mips.h +665 -0
- data/ext/v8/upstream/2.1.10/src/mips/builtins-mips.cc +202 -0
- data/ext/v8/upstream/2.1.10/src/mips/codegen-mips-inl.h +70 -0
- data/ext/v8/upstream/2.1.10/src/mips/codegen-mips.cc +1428 -0
- data/ext/v8/upstream/{2.0.6/src/arm/codegen-arm.h → 2.1.10/src/mips/codegen-mips.h} +103 -205
- data/ext/v8/upstream/2.1.10/src/mips/constants-mips.cc +323 -0
- data/ext/v8/upstream/2.1.10/src/mips/constants-mips.h +525 -0
- data/ext/v8/upstream/2.1.10/src/mips/cpu-mips.cc +69 -0
- data/ext/v8/upstream/2.1.10/src/mips/debug-mips.cc +128 -0
- data/ext/v8/upstream/2.1.10/src/mips/disasm-mips.cc +784 -0
- data/ext/v8/upstream/2.1.10/src/mips/fast-codegen-mips.cc +74 -0
- data/ext/v8/upstream/2.1.10/src/mips/frames-mips.cc +99 -0
- data/ext/v8/upstream/2.1.10/src/mips/frames-mips.h +164 -0
- data/ext/v8/upstream/2.1.10/src/mips/full-codegen-mips.cc +273 -0
- data/ext/v8/upstream/2.1.10/src/mips/ic-mips.cc +217 -0
- data/ext/v8/upstream/2.1.10/src/mips/jump-target-mips.cc +172 -0
- data/ext/v8/upstream/2.1.10/src/mips/macro-assembler-mips.cc +1323 -0
- data/ext/v8/upstream/2.1.10/src/mips/macro-assembler-mips.h +461 -0
- data/ext/v8/upstream/2.1.10/src/mips/register-allocator-mips-inl.h +137 -0
- data/ext/v8/upstream/2.1.10/src/mips/register-allocator-mips.cc +60 -0
- data/ext/v8/upstream/2.1.10/src/mips/register-allocator-mips.h +46 -0
- data/ext/v8/upstream/2.1.10/src/mips/simulator-mips.cc +1648 -0
- data/ext/v8/upstream/2.1.10/src/mips/simulator-mips.h +311 -0
- data/ext/v8/upstream/2.1.10/src/mips/stub-cache-mips.cc +400 -0
- data/ext/v8/upstream/2.1.10/src/mips/virtual-frame-mips.cc +316 -0
- data/ext/v8/upstream/{2.0.6/src/arm/virtual-frame-arm.h → 2.1.10/src/mips/virtual-frame-mips.h} +87 -71
- data/ext/v8/upstream/{2.0.6/src/mirror-delay.js → 2.1.10/src/mirror-debugger.js} +51 -45
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/mksnapshot.cc +97 -10
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/natives.h +6 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/objects-debug.cc +47 -5
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/objects-inl.h +154 -38
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/objects.cc +528 -280
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/objects.h +302 -95
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/oprofile-agent.cc +25 -33
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/oprofile-agent.h +9 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/parser.cc +444 -72
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/parser.h +4 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform-freebsd.cc +32 -13
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform-linux.cc +59 -25
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform-macos.cc +30 -13
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform-nullos.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform-openbsd.cc +21 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform-posix.cc +0 -18
- data/ext/v8/upstream/2.1.10/src/platform-solaris.cc +607 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform-win32.cc +16 -17
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/platform.h +25 -8
- data/ext/v8/upstream/2.1.10/src/powers-ten.h +2461 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/prettyprinter.cc +49 -29
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/prettyprinter.h +3 -1
- data/ext/v8/upstream/2.1.10/src/profile-generator-inl.h +124 -0
- data/ext/v8/upstream/2.1.10/src/profile-generator.cc +583 -0
- data/ext/v8/upstream/2.1.10/src/profile-generator.h +364 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/property.cc +1 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/property.h +12 -24
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-macro-assembler-irregexp-inl.h +2 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-macro-assembler-irregexp.cc +2 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-macro-assembler-irregexp.h +2 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-macro-assembler-tracer.cc +2 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-macro-assembler-tracer.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-macro-assembler.cc +33 -10
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-macro-assembler.h +12 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-stack.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/regexp-stack.h +0 -0
- data/ext/v8/upstream/{2.0.6/src/regexp-delay.js → 2.1.10/src/regexp.js} +180 -58
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/register-allocator-inl.h +68 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/register-allocator.cc +5 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/register-allocator.h +42 -17
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/rewriter.cc +110 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/rewriter.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/runtime.cc +2733 -623
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/runtime.h +43 -20
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/runtime.js +46 -35
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/scanner.cc +278 -36
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/scanner.h +97 -26
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/scopeinfo.cc +3 -3
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/scopeinfo.h +1 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/scopes.cc +11 -12
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/scopes.h +0 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/serialize.cc +298 -175
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/serialize.h +184 -40
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/shell.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/simulator.h +2 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/smart-pointer.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/snapshot-common.cc +16 -31
- data/ext/v8/upstream/2.1.10/src/snapshot-empty.cc +50 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/snapshot.h +13 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/spaces-inl.h +35 -27
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/spaces.cc +256 -42
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/spaces.h +136 -42
- data/ext/v8/upstream/{2.0.6/src/zone-inl.h → 2.1.10/src/splay-tree-inl.h} +102 -89
- data/ext/v8/upstream/2.1.10/src/splay-tree.h +203 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/string-stream.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/string-stream.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/string.js +260 -149
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/stub-cache.cc +195 -69
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/stub-cache.h +127 -12
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/third_party/dtoa/COPYING +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/third_party/dtoa/dtoa.c +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/third_party/valgrind/valgrind.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/token.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/token.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/top.cc +26 -31
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/top.h +3 -4
- data/ext/v8/upstream/2.1.10/src/type-info.cc +53 -0
- data/ext/v8/upstream/2.1.10/src/type-info.h +244 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/unicode-inl.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/unicode.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/unicode.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/uri.js +6 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/utils.cc +0 -37
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/utils.h +121 -50
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/v8-counters.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/v8-counters.h +130 -98
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/v8.cc +42 -11
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/v8.h +4 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/v8natives.js +202 -37
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/v8threads.cc +11 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/v8threads.h +15 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/variables.cc +7 -51
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/variables.h +5 -35
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/version.cc +3 -3
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/version.h +0 -0
- data/ext/v8/upstream/2.1.10/src/virtual-frame-heavy-inl.h +152 -0
- data/ext/v8/upstream/{2.0.6/src/virtual-frame.cc → 2.1.10/src/virtual-frame-heavy.cc} +107 -176
- data/ext/v8/upstream/2.1.10/src/virtual-frame-inl.h +39 -0
- data/ext/v8/upstream/2.1.10/src/virtual-frame-light-inl.h +69 -0
- data/ext/v8/upstream/2.1.10/src/virtual-frame-light.cc +49 -0
- data/ext/v8/upstream/2.1.10/src/virtual-frame.cc +49 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/virtual-frame.h +2 -0
- data/ext/v8/upstream/{2.0.6/src/log-inl.h → 2.1.10/src/vm-state-inl.h} +28 -20
- data/ext/v8/upstream/{2.0.6/src/snapshot-empty.cc → 2.1.10/src/vm-state.cc} +5 -6
- data/ext/v8/upstream/2.1.10/src/vm-state.h +75 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/assembler-x64-inl.h +11 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/assembler-x64.cc +285 -93
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/assembler-x64.h +81 -78
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/builtins-x64.cc +130 -87
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/codegen-x64-inl.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/codegen-x64.cc +4520 -1317
- data/ext/v8/upstream/{2.0.6/src/ia32/codegen-ia32.h → 2.1.10/src/x64/codegen-x64.h} +362 -141
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/cpu-x64.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/debug-x64.cc +20 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/disasm-x64.cc +121 -44
- data/ext/v8/upstream/2.1.10/src/x64/fast-codegen-x64.cc +246 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/frames-x64.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/frames-x64.h +0 -0
- data/ext/v8/upstream/{2.0.6/src/x64/fast-codegen-x64.cc → 2.1.10/src/x64/full-codegen-x64.cc} +404 -231
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/ic-x64.cc +346 -117
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/jump-target-x64.cc +1 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/macro-assembler-x64.cc +537 -181
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/macro-assembler-x64.h +140 -34
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/regexp-macro-assembler-x64.cc +74 -96
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/regexp-macro-assembler-x64.h +8 -25
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/register-allocator-x64-inl.h +1 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/register-allocator-x64.cc +3 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/register-allocator-x64.h +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/simulator-x64.cc +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/simulator-x64.h +2 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/stub-cache-x64.cc +785 -288
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/virtual-frame-x64.cc +128 -52
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/x64/virtual-frame-x64.h +40 -19
- data/ext/v8/upstream/2.1.10/src/zone-inl.h +82 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/zone.cc +1 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/src/zone.h +6 -90
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/codemap.js +12 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/consarray.js +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/csvparser.js +22 -37
- data/ext/v8/upstream/2.1.10/tools/generate-ten-powers.scm +286 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/gyp/v8.gyp +86 -24
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/js2c.py +22 -22
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/jsmin.py +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/linux-tick-processor +10 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/linux-tick-processor.py +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/logreader.js +34 -16
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/mac-nm +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/mac-tick-processor +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/annotate +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/common +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/dump +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/report +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/reset +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/run +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/shutdown +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/oprofile/start +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/presubmit.py +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/process-heap-prof.py +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/profile.js +70 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/profile_view.js +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/run-valgrind.py +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/splaytree.js +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/splaytree.py +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/stats-viewer.py +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/test.py +7 -7
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/tickprocessor-driver.js +7 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/tickprocessor.js +140 -9
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/tickprocessor.py +40 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/utils.py +6 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/README.txt +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/arm.vsprops +1 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/common.vsprops +1 -2
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/d8.vcproj +0 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/d8_arm.vcproj +193 -199
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/d8_x64.vcproj +16 -8
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/d8js2c.cmd +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/debug.vsprops +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/ia32.vsprops +5 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/js2c.cmd +1 -1
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/release.vsprops +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8.sln +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8.vcproj +11 -7
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_arm.sln +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_arm.vcproj +227 -223
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_base.vcproj +137 -5
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_base_arm.vcproj +116 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_base_x64.vcproj +125 -4
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_cctest.vcproj +12 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_cctest_arm.vcproj +12 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_cctest_x64.vcproj +11 -11
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_mksnapshot.vcproj +0 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_mksnapshot_x64.vcproj +0 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_process_sample.vcproj +0 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_process_sample_arm.vcproj +145 -151
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_process_sample_x64.vcproj +16 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_shell_sample.vcproj +0 -6
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_shell_sample_arm.vcproj +145 -151
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_shell_sample_x64.vcproj +16 -8
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_snapshot.vcproj +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_snapshot_cc.vcproj +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_snapshot_cc_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_snapshot_x64.vcproj +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_x64.sln +0 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/v8_x64.vcproj +11 -7
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/visual_studio/x64.vsprops +5 -1
- data/ext/v8/upstream/2.1.10/tools/windows-tick-processor.bat +29 -0
- data/ext/v8/upstream/{2.0.6 → 2.1.10}/tools/windows-tick-processor.py +0 -0
- data/ext/v8/upstream/Makefile +8 -2
- data/ext/v8/v8.cpp +21 -73
- data/ext/v8/v8_array.cpp +56 -0
- data/ext/v8/v8_array.h +8 -0
- data/ext/v8/v8_callbacks.cpp +121 -0
- data/ext/v8/v8_callbacks.h +8 -0
- data/ext/v8/v8_cxt.cpp +74 -77
- data/ext/v8/v8_cxt.h +2 -9
- data/ext/v8/v8_date.cpp +26 -0
- data/ext/v8/v8_date.h +6 -0
- data/ext/v8/v8_exception.cpp +55 -0
- data/ext/v8/v8_exception.h +6 -0
- data/ext/v8/v8_external.cpp +50 -0
- data/ext/v8/v8_external.h +8 -0
- data/ext/v8/v8_func.cpp +76 -18
- data/ext/v8/v8_func.h +5 -4
- data/ext/v8/v8_msg.cpp +55 -46
- data/ext/v8/v8_msg.h +3 -11
- data/ext/v8/v8_obj.cpp +67 -36
- data/ext/v8/v8_obj.h +6 -8
- data/ext/v8/v8_ref.cpp +25 -9
- data/ext/v8/v8_ref.h +3 -5
- data/ext/v8/v8_script.cpp +17 -10
- data/ext/v8/v8_script.h +3 -3
- data/ext/v8/v8_str.cpp +34 -6
- data/ext/v8/v8_str.h +4 -2
- data/ext/v8/v8_template.cpp +195 -33
- data/ext/v8/v8_template.h +4 -5
- data/ext/v8/v8_try_catch.cpp +99 -0
- data/ext/v8/v8_try_catch.h +5 -0
- data/ext/v8/v8_value.cpp +164 -0
- data/ext/v8/v8_value.h +10 -0
- data/lib/v8.rb +3 -1
- data/lib/v8/access.rb +60 -0
- data/lib/v8/array.rb +15 -0
- data/lib/v8/callbacks.rb +88 -0
- data/lib/v8/cli.rb +1 -1
- data/lib/v8/context.rb +55 -66
- data/lib/v8/function.rb +20 -2
- data/lib/v8/object.rb +14 -12
- data/lib/v8/ruby_error.rb +3 -0
- data/lib/v8/to.rb +59 -7
- data/spec/ext/cxt_spec.rb +2 -15
- data/spec/ext/func_spec.rb +17 -10
- data/spec/ext/try_catch_spec.rb +32 -0
- data/spec/foo.rb +17 -0
- data/spec/redjs/jsapi_spec.rb +173 -96
- data/spec/spec_helper.rb +7 -0
- data/spec/v8/to_spec.rb +0 -1
- data/therubyracer.gemspec +6 -6
- metadata +493 -386
- data/ext/v8/upstream/2.0.6/src/arm/ic-arm.cc +0 -849
- data/ext/v8/upstream/2.0.6/src/arm/virtual-frame-arm.cc +0 -412
- data/ext/v8/upstream/2.0.6/src/ast.cc +0 -512
- data/ext/v8/upstream/2.0.6/src/builtins.cc +0 -851
- data/ext/v8/upstream/2.0.6/src/compiler.cc +0 -1132
- data/ext/v8/upstream/2.0.6/src/compiler.h +0 -107
- data/ext/v8/upstream/2.0.6/src/conversions.cc +0 -709
- data/ext/v8/upstream/2.0.6/src/usage-analyzer.cc +0 -426
- data/ext/v8/upstream/2.0.6/tools/windows-tick-processor.bat +0 -5
- data/ext/v8/upstream/no-strict-aliasing.patch +0 -13
- data/ext/v8/v8_standalone.cpp +0 -69
- data/ext/v8/v8_standalone.h +0 -31
- data/spec/ext/obj_spec.rb +0 -13
@@ -0,0 +1,82 @@
|
|
1
|
+
// Copyright 2006-2008 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
|
+
#ifndef V8_ZONE_INL_H_
|
29
|
+
#define V8_ZONE_INL_H_
|
30
|
+
|
31
|
+
#include "zone.h"
|
32
|
+
#include "v8-counters.h"
|
33
|
+
|
34
|
+
namespace v8 {
|
35
|
+
namespace internal {
|
36
|
+
|
37
|
+
|
38
|
+
inline void* Zone::New(int size) {
|
39
|
+
ASSERT(AssertNoZoneAllocation::allow_allocation());
|
40
|
+
ASSERT(ZoneScope::nesting() > 0);
|
41
|
+
// Round up the requested size to fit the alignment.
|
42
|
+
size = RoundUp(size, kAlignment);
|
43
|
+
|
44
|
+
// Check if the requested size is available without expanding.
|
45
|
+
Address result = position_;
|
46
|
+
if ((position_ += size) > limit_) result = NewExpand(size);
|
47
|
+
|
48
|
+
// Check that the result has the proper alignment and return it.
|
49
|
+
ASSERT(IsAddressAligned(result, kAlignment, 0));
|
50
|
+
return reinterpret_cast<void*>(result);
|
51
|
+
}
|
52
|
+
|
53
|
+
|
54
|
+
template <typename T>
|
55
|
+
T* Zone::NewArray(int length) {
|
56
|
+
return static_cast<T*>(Zone::New(length * sizeof(T)));
|
57
|
+
}
|
58
|
+
|
59
|
+
|
60
|
+
bool Zone::excess_allocation() {
|
61
|
+
return segment_bytes_allocated_ > zone_excess_limit_;
|
62
|
+
}
|
63
|
+
|
64
|
+
|
65
|
+
void Zone::adjust_segment_bytes_allocated(int delta) {
|
66
|
+
segment_bytes_allocated_ += delta;
|
67
|
+
Counters::zone_segment_bytes.Set(segment_bytes_allocated_);
|
68
|
+
}
|
69
|
+
|
70
|
+
|
71
|
+
template <typename Config>
|
72
|
+
ZoneSplayTree<Config>::~ZoneSplayTree() {
|
73
|
+
// Reset the root to avoid unneeded iteration over all tree nodes
|
74
|
+
// in the destructor. For a zone-allocated tree, nodes will be
|
75
|
+
// freed by the Zone.
|
76
|
+
SplayTree<Config, ZoneListAllocationPolicy>::ResetRoot();
|
77
|
+
}
|
78
|
+
|
79
|
+
|
80
|
+
} } // namespace v8::internal
|
81
|
+
|
82
|
+
#endif // V8_ZONE_INL_H_
|
@@ -205,98 +205,14 @@ class ZoneScope BASE_EMBEDDED {
|
|
205
205
|
|
206
206
|
|
207
207
|
// A zone splay tree. The config type parameter encapsulates the
|
208
|
-
// different configurations of a concrete splay tree
|
209
|
-
//
|
210
|
-
// typedef Key: the key type
|
211
|
-
// typedef Value: the value type
|
212
|
-
// static const kNoKey: the dummy key used when no key is set
|
213
|
-
// static const kNoValue: the dummy value used to initialize nodes
|
214
|
-
// int (Compare)(Key& a, Key& b) -> {-1, 0, 1}: comparison function
|
215
|
-
//
|
208
|
+
// different configurations of a concrete splay tree (see splay-tree.h).
|
209
|
+
// The tree itself and all its elements are allocated in the Zone.
|
216
210
|
template <typename Config>
|
217
|
-
class ZoneSplayTree
|
211
|
+
class ZoneSplayTree: public SplayTree<Config, ZoneListAllocationPolicy> {
|
218
212
|
public:
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
class Locator;
|
223
|
-
|
224
|
-
ZoneSplayTree() : root_(NULL) { }
|
225
|
-
|
226
|
-
// Inserts the given key in this tree with the given value. Returns
|
227
|
-
// true if a node was inserted, otherwise false. If found the locator
|
228
|
-
// is enabled and provides access to the mapping for the key.
|
229
|
-
bool Insert(const Key& key, Locator* locator);
|
230
|
-
|
231
|
-
// Looks up the key in this tree and returns true if it was found,
|
232
|
-
// otherwise false. If the node is found the locator is enabled and
|
233
|
-
// provides access to the mapping for the key.
|
234
|
-
bool Find(const Key& key, Locator* locator);
|
235
|
-
|
236
|
-
// Finds the mapping with the greatest key less than or equal to the
|
237
|
-
// given key.
|
238
|
-
bool FindGreatestLessThan(const Key& key, Locator* locator);
|
239
|
-
|
240
|
-
// Find the mapping with the greatest key in this tree.
|
241
|
-
bool FindGreatest(Locator* locator);
|
242
|
-
|
243
|
-
// Finds the mapping with the least key greater than or equal to the
|
244
|
-
// given key.
|
245
|
-
bool FindLeastGreaterThan(const Key& key, Locator* locator);
|
246
|
-
|
247
|
-
// Find the mapping with the least key in this tree.
|
248
|
-
bool FindLeast(Locator* locator);
|
249
|
-
|
250
|
-
// Remove the node with the given key from the tree.
|
251
|
-
bool Remove(const Key& key);
|
252
|
-
|
253
|
-
bool is_empty() { return root_ == NULL; }
|
254
|
-
|
255
|
-
// Perform the splay operation for the given key. Moves the node with
|
256
|
-
// the given key to the top of the tree. If no node has the given
|
257
|
-
// key, the last node on the search path is moved to the top of the
|
258
|
-
// tree.
|
259
|
-
void Splay(const Key& key);
|
260
|
-
|
261
|
-
class Node : public ZoneObject {
|
262
|
-
public:
|
263
|
-
Node(const Key& key, const Value& value)
|
264
|
-
: key_(key),
|
265
|
-
value_(value),
|
266
|
-
left_(NULL),
|
267
|
-
right_(NULL) { }
|
268
|
-
Key key() { return key_; }
|
269
|
-
Value value() { return value_; }
|
270
|
-
Node* left() { return left_; }
|
271
|
-
Node* right() { return right_; }
|
272
|
-
private:
|
273
|
-
friend class ZoneSplayTree;
|
274
|
-
friend class Locator;
|
275
|
-
Key key_;
|
276
|
-
Value value_;
|
277
|
-
Node* left_;
|
278
|
-
Node* right_;
|
279
|
-
};
|
280
|
-
|
281
|
-
// A locator provides access to a node in the tree without actually
|
282
|
-
// exposing the node.
|
283
|
-
class Locator {
|
284
|
-
public:
|
285
|
-
explicit Locator(Node* node) : node_(node) { }
|
286
|
-
Locator() : node_(NULL) { }
|
287
|
-
const Key& key() { return node_->key_; }
|
288
|
-
Value& value() { return node_->value_; }
|
289
|
-
void set_value(const Value& value) { node_->value_ = value; }
|
290
|
-
inline void bind(Node* node) { node_ = node; }
|
291
|
-
private:
|
292
|
-
Node* node_;
|
293
|
-
};
|
294
|
-
|
295
|
-
template <class Callback>
|
296
|
-
void ForEach(Callback* callback);
|
297
|
-
|
298
|
-
private:
|
299
|
-
Node* root_;
|
213
|
+
ZoneSplayTree()
|
214
|
+
: SplayTree<Config, ZoneListAllocationPolicy>() {}
|
215
|
+
~ZoneSplayTree();
|
300
216
|
};
|
301
217
|
|
302
218
|
|
@@ -195,6 +195,18 @@ devtools.profiler.CodeMap.prototype.findEntry = function(addr) {
|
|
195
195
|
};
|
196
196
|
|
197
197
|
|
198
|
+
/**
|
199
|
+
* Returns a dynamic code entry using its starting address.
|
200
|
+
*
|
201
|
+
* @param {number} addr Address.
|
202
|
+
*/
|
203
|
+
devtools.profiler.CodeMap.prototype.findDynamicEntryByStartAddress =
|
204
|
+
function(addr) {
|
205
|
+
var node = this.dynamics_.find(addr);
|
206
|
+
return node ? node.value : null;
|
207
|
+
};
|
208
|
+
|
209
|
+
|
198
210
|
/**
|
199
211
|
* Returns an array of all dynamic code entries.
|
200
212
|
*/
|
File without changes
|
@@ -39,17 +39,17 @@ devtools.profiler.CsvParser = function() {
|
|
39
39
|
|
40
40
|
|
41
41
|
/**
|
42
|
-
* A regex for matching a
|
42
|
+
* A regex for matching a CSV field.
|
43
43
|
* @private
|
44
44
|
*/
|
45
|
-
devtools.profiler.CsvParser.
|
45
|
+
devtools.profiler.CsvParser.CSV_FIELD_RE_ = /^"((?:[^"]|"")*)"|([^,]*)/;
|
46
46
|
|
47
47
|
|
48
48
|
/**
|
49
49
|
* A regex for matching a double quote.
|
50
50
|
* @private
|
51
51
|
*/
|
52
|
-
devtools.profiler.CsvParser.DOUBLE_QUOTE_RE_ =
|
52
|
+
devtools.profiler.CsvParser.DOUBLE_QUOTE_RE_ = /""/g;
|
53
53
|
|
54
54
|
|
55
55
|
/**
|
@@ -58,41 +58,26 @@ devtools.profiler.CsvParser.DOUBLE_QUOTE_RE_ = /\"\"/g;
|
|
58
58
|
* @param {string} line Input line.
|
59
59
|
*/
|
60
60
|
devtools.profiler.CsvParser.prototype.parseLine = function(line) {
|
61
|
-
var
|
61
|
+
var fieldRe = devtools.profiler.CsvParser.CSV_FIELD_RE_;
|
62
|
+
var doubleQuoteRe = devtools.profiler.CsvParser.DOUBLE_QUOTE_RE_;
|
63
|
+
var pos = 0;
|
64
|
+
var endPos = line.length;
|
62
65
|
var fields = [];
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
if (i + 1 < n && line.charAt(i + 1) != '"') {
|
79
|
-
insideQuotes = false;
|
80
|
-
} else {
|
81
|
-
i++;
|
82
|
-
}
|
83
|
-
}
|
84
|
-
break;
|
85
|
-
}
|
86
|
-
}
|
87
|
-
if (n > 0) {
|
88
|
-
fields.push(line.substring(prevPos));
|
89
|
-
}
|
90
|
-
|
91
|
-
for (i = 0; i < fields.length; ++i) {
|
92
|
-
// Eliminate trailing quotes.
|
93
|
-
fields[i] = fields[i].replace(devtools.profiler.CsvParser.TRAILING_QUOTE_RE_, '');
|
94
|
-
// Convert quoted quotes into single ones.
|
95
|
-
fields[i] = fields[i].replace(devtools.profiler.CsvParser.DOUBLE_QUOTE_RE_, '"');
|
66
|
+
if (endPos > 0) {
|
67
|
+
do {
|
68
|
+
var fieldMatch = fieldRe.exec(line.substr(pos));
|
69
|
+
if (typeof fieldMatch[1] === "string") {
|
70
|
+
var field = fieldMatch[1];
|
71
|
+
pos += field.length + 3; // Skip comma and quotes.
|
72
|
+
fields.push(field.replace(doubleQuoteRe, '"'));
|
73
|
+
} else {
|
74
|
+
// The second field pattern will match anything, thus
|
75
|
+
// in the worst case the match will be an empty string.
|
76
|
+
var field = fieldMatch[2];
|
77
|
+
pos += field.length + 1; // Skip comma.
|
78
|
+
fields.push(field);
|
79
|
+
}
|
80
|
+
} while (pos <= endPos);
|
96
81
|
}
|
97
82
|
return fields;
|
98
83
|
};
|
@@ -0,0 +1,286 @@
|
|
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
|
+
;; This is a Scheme script for the Bigloo compiler. Bigloo must be compiled with
|
29
|
+
;; support for bignums. The compilation of the script can be done as follows:
|
30
|
+
;; bigloo -static-bigloo -o generate-ten-powers generate-ten-powers.scm
|
31
|
+
;;
|
32
|
+
;; Generate approximations of 10^k.
|
33
|
+
|
34
|
+
(module gen-ten-powers
|
35
|
+
(static (class Cached-Fast
|
36
|
+
v::bignum
|
37
|
+
e::bint
|
38
|
+
exact?::bool))
|
39
|
+
(main my-main))
|
40
|
+
|
41
|
+
|
42
|
+
;;----------------bignum shifts -----------------------------------------------
|
43
|
+
(define (bit-lshbx::bignum x::bignum by::bint)
|
44
|
+
(if (<fx by 0)
|
45
|
+
#z0
|
46
|
+
(*bx x (exptbx #z2 (fixnum->bignum by)))))
|
47
|
+
|
48
|
+
(define (bit-rshbx::bignum x::bignum by::bint)
|
49
|
+
(if (<fx by 0)
|
50
|
+
#z0
|
51
|
+
(/bx x (exptbx #z2 (fixnum->bignum by)))))
|
52
|
+
|
53
|
+
;;----------------the actual power generation -------------------------------
|
54
|
+
|
55
|
+
;; e should be an indication. it might be too small.
|
56
|
+
(define (round-n-cut n e nb-bits)
|
57
|
+
(define max-container (- (bit-lshbx #z1 nb-bits) 1))
|
58
|
+
(define (round n)
|
59
|
+
(case *round*
|
60
|
+
((down) n)
|
61
|
+
((up)
|
62
|
+
(+bx n
|
63
|
+
;; with the -1 it will only round up if the cut off part is
|
64
|
+
;; non-zero
|
65
|
+
(-bx (bit-lshbx #z1
|
66
|
+
(-fx (+fx e nb-bits) 1))
|
67
|
+
#z1)))
|
68
|
+
((round)
|
69
|
+
(+bx n
|
70
|
+
(bit-lshbx #z1
|
71
|
+
(-fx (+fx e nb-bits) 2))))))
|
72
|
+
(let* ((shift (-fx (+fx e nb-bits) 1))
|
73
|
+
(cut (bit-rshbx (round n) shift))
|
74
|
+
(exact? (=bx n (bit-lshbx cut shift))))
|
75
|
+
(if (<=bx cut max-container)
|
76
|
+
(values cut e exact?)
|
77
|
+
(round-n-cut n (+fx e 1) nb-bits))))
|
78
|
+
|
79
|
+
(define (rounded-/bx x y)
|
80
|
+
(case *round*
|
81
|
+
((down) (/bx x y))
|
82
|
+
((up) (+bx (/bx x y) #z1))
|
83
|
+
((round) (let ((tmp (/bx (*bx #z2 x) y)))
|
84
|
+
(if (zerobx? (remainderbx tmp #z2))
|
85
|
+
(/bx tmp #z2)
|
86
|
+
(+bx (/bx tmp #z2) #z1))))))
|
87
|
+
|
88
|
+
(define (generate-powers from to mantissa-size)
|
89
|
+
(let* ((nb-bits mantissa-size)
|
90
|
+
(offset (- from))
|
91
|
+
(nb-elements (+ (- from) to 1))
|
92
|
+
(vec (make-vector nb-elements))
|
93
|
+
(max-container (- (bit-lshbx #z1 nb-bits) 1)))
|
94
|
+
;; the negative ones. 10^-1, 10^-2, etc.
|
95
|
+
;; We already know, that we can't be exact, so exact? will always be #f.
|
96
|
+
;; Basically we will have a ten^i that we will *10 at each iteration. We
|
97
|
+
;; want to create the matissa of 1/ten^i. However the mantissa must be
|
98
|
+
;; normalized (start with a 1). -> we have to shift the number.
|
99
|
+
;; We shift by multiplying with two^e. -> We encode two^e*(1/ten^i) ==
|
100
|
+
;; two^e/ten^i.
|
101
|
+
(let loop ((i 1)
|
102
|
+
(ten^i #z10)
|
103
|
+
(two^e #z1)
|
104
|
+
(e 0))
|
105
|
+
(unless (< (- i) from)
|
106
|
+
(if (>bx (/bx (*bx #z2 two^e) ten^i) max-container)
|
107
|
+
;; another shift would make the number too big. We are
|
108
|
+
;; hence normalized now.
|
109
|
+
(begin
|
110
|
+
(vector-set! vec (-fx offset i)
|
111
|
+
(instantiate::Cached-Fast
|
112
|
+
(v (rounded-/bx two^e ten^i))
|
113
|
+
(e (negfx e))
|
114
|
+
(exact? #f)))
|
115
|
+
(loop (+fx i 1) (*bx ten^i #z10) two^e e))
|
116
|
+
(loop i ten^i (bit-lshbx two^e 1) (+fx e 1)))))
|
117
|
+
;; the positive ones 10^0, 10^1, etc.
|
118
|
+
;; start with 1.0. mantissa: 10...0 (1 followed by nb-bits-1 bits)
|
119
|
+
;; -> e = -(nb-bits-1)
|
120
|
+
;; exact? is true when the container can still hold the complete 10^i
|
121
|
+
(let loop ((i 0)
|
122
|
+
(n (bit-lshbx #z1 (-fx nb-bits 1)))
|
123
|
+
(e (-fx 1 nb-bits)))
|
124
|
+
(when (<= i to)
|
125
|
+
(receive (cut e exact?)
|
126
|
+
(round-n-cut n e nb-bits)
|
127
|
+
(vector-set! vec (+fx i offset)
|
128
|
+
(instantiate::Cached-Fast
|
129
|
+
(v cut)
|
130
|
+
(e e)
|
131
|
+
(exact? exact?)))
|
132
|
+
(loop (+fx i 1) (*bx n #z10) e))))
|
133
|
+
vec))
|
134
|
+
|
135
|
+
(define (print-c powers from to struct-type
|
136
|
+
cache-name max-distance-name offset-name macro64)
|
137
|
+
(define (display-power power k)
|
138
|
+
(with-access::Cached-Fast power (v e exact?)
|
139
|
+
(let ((tmp-p (open-output-string)))
|
140
|
+
;; really hackish way of getting the digits
|
141
|
+
(display (format "~x" v) tmp-p)
|
142
|
+
(let ((str (close-output-port tmp-p)))
|
143
|
+
(printf " {~a(0x~a, ~a), ~a, ~a},\n"
|
144
|
+
macro64
|
145
|
+
(substring str 0 8)
|
146
|
+
(substring str 8 16)
|
147
|
+
e
|
148
|
+
k)))))
|
149
|
+
(define (print-powers-reduced n)
|
150
|
+
(print "static const " struct-type " " cache-name
|
151
|
+
"(" n ")"
|
152
|
+
"[] = {")
|
153
|
+
(let loop ((i 0)
|
154
|
+
(nb-elements 0)
|
155
|
+
(last-e 0)
|
156
|
+
(max-distance 0))
|
157
|
+
(cond
|
158
|
+
((>= i (vector-length powers))
|
159
|
+
(print " };")
|
160
|
+
(print "static const int " max-distance-name "(" n ") = "
|
161
|
+
max-distance ";")
|
162
|
+
(print "// nb elements (" n "): " nb-elements))
|
163
|
+
(else
|
164
|
+
(let* ((power (vector-ref powers i))
|
165
|
+
(e (Cached-Fast-e power)))
|
166
|
+
(display-power power (+ i from))
|
167
|
+
(loop (+ i n)
|
168
|
+
(+ nb-elements 1)
|
169
|
+
e
|
170
|
+
(cond
|
171
|
+
((=fx i 0) max-distance)
|
172
|
+
((> (- e last-e) max-distance) (- e last-e))
|
173
|
+
(else max-distance))))))))
|
174
|
+
(print "// Copyright 2010 the V8 project authors. All rights reserved.")
|
175
|
+
(print "// ------------ GENERATED FILE ----------------")
|
176
|
+
(print "// command used:")
|
177
|
+
(print "// "
|
178
|
+
(apply string-append (map (lambda (str)
|
179
|
+
(string-append " " str))
|
180
|
+
*main-args*))
|
181
|
+
" // NOLINT")
|
182
|
+
(print)
|
183
|
+
(print
|
184
|
+
"// This file is intended to be included inside another .h or .cc files\n"
|
185
|
+
"// with the following defines set:\n"
|
186
|
+
"// GRISU_CACHE_STRUCT: should expand to the name of a struct that will\n"
|
187
|
+
"// hold the cached powers of ten. Each entry will hold a 64-bit\n"
|
188
|
+
"// significand, a 16-bit signed binary exponent, and a 16-bit\n"
|
189
|
+
"// signed decimal exponent. Each entry will be constructed as follows:\n"
|
190
|
+
"// { significand, binary_exponent, decimal_exponent }.\n"
|
191
|
+
"// GRISU_CACHE_NAME(i): generates the name for the different caches.\n"
|
192
|
+
"// The parameter i will be a number in the range 1-20. A cache will\n"
|
193
|
+
"// hold every i'th element of a full cache. GRISU_CACHE_NAME(1) will\n"
|
194
|
+
"// thus hold all elements. The higher i the fewer elements it has.\n"
|
195
|
+
"// Ideally the user should only reference one cache and let the\n"
|
196
|
+
"// compiler remove the unused ones.\n"
|
197
|
+
"// GRISU_CACHE_MAX_DISTANCE(i): generates the name for the maximum\n"
|
198
|
+
"// binary exponent distance between all elements of a given cache.\n"
|
199
|
+
"// GRISU_CACHE_OFFSET: is used as variable name for the decimal\n"
|
200
|
+
"// exponent offset. It is equal to -cache[0].decimal_exponent.\n"
|
201
|
+
"// GRISU_UINT64_C: used to construct 64-bit values in a platform\n"
|
202
|
+
"// independent way. In order to encode 0x123456789ABCDEF0 the macro\n"
|
203
|
+
"// will be invoked as follows: GRISU_UINT64_C(0x12345678,9ABCDEF0).\n")
|
204
|
+
(print)
|
205
|
+
(print-powers-reduced 1)
|
206
|
+
(print-powers-reduced 2)
|
207
|
+
(print-powers-reduced 3)
|
208
|
+
(print-powers-reduced 4)
|
209
|
+
(print-powers-reduced 5)
|
210
|
+
(print-powers-reduced 6)
|
211
|
+
(print-powers-reduced 7)
|
212
|
+
(print-powers-reduced 8)
|
213
|
+
(print-powers-reduced 9)
|
214
|
+
(print-powers-reduced 10)
|
215
|
+
(print-powers-reduced 11)
|
216
|
+
(print-powers-reduced 12)
|
217
|
+
(print-powers-reduced 13)
|
218
|
+
(print-powers-reduced 14)
|
219
|
+
(print-powers-reduced 15)
|
220
|
+
(print-powers-reduced 16)
|
221
|
+
(print-powers-reduced 17)
|
222
|
+
(print-powers-reduced 18)
|
223
|
+
(print-powers-reduced 19)
|
224
|
+
(print-powers-reduced 20)
|
225
|
+
(print "static const int GRISU_CACHE_OFFSET = " (- from) ";"))
|
226
|
+
|
227
|
+
;;----------------main --------------------------------------------------------
|
228
|
+
(define *main-args* #f)
|
229
|
+
(define *mantissa-size* #f)
|
230
|
+
(define *dest* #f)
|
231
|
+
(define *round* #f)
|
232
|
+
(define *from* #f)
|
233
|
+
(define *to* #f)
|
234
|
+
|
235
|
+
(define (my-main args)
|
236
|
+
(set! *main-args* args)
|
237
|
+
(args-parse (cdr args)
|
238
|
+
(section "Help")
|
239
|
+
(("?") (args-parse-usage #f))
|
240
|
+
((("-h" "--help") (help "?, -h, --help" "This help message"))
|
241
|
+
(args-parse-usage #f))
|
242
|
+
(section "Misc")
|
243
|
+
(("-o" ?file (help "The output file"))
|
244
|
+
(set! *dest* file))
|
245
|
+
(("--mantissa-size" ?size (help "Container-size in bits"))
|
246
|
+
(set! *mantissa-size* (string->number size)))
|
247
|
+
(("--round" ?direction (help "Round bignums (down, round or up)"))
|
248
|
+
(set! *round* (string->symbol direction)))
|
249
|
+
(("--from" ?from (help "start at 10^from"))
|
250
|
+
(set! *from* (string->number from)))
|
251
|
+
(("--to" ?to (help "go up to 10^to"))
|
252
|
+
(set! *to* (string->number to)))
|
253
|
+
(else
|
254
|
+
(print "Illegal argument `" else "'. Usage:")
|
255
|
+
(args-parse-usage #f)))
|
256
|
+
(when (not *from*)
|
257
|
+
(error "generate-ten-powers"
|
258
|
+
"Missing from"
|
259
|
+
#f))
|
260
|
+
(when (not *to*)
|
261
|
+
(error "generate-ten-powers"
|
262
|
+
"Missing to"
|
263
|
+
#f))
|
264
|
+
(when (not *mantissa-size*)
|
265
|
+
(error "generate-ten-powers"
|
266
|
+
"Missing mantissa size"
|
267
|
+
#f))
|
268
|
+
(when (not (memv *round* '(up down round)))
|
269
|
+
(error "generate-ten-powers"
|
270
|
+
"Missing round-method"
|
271
|
+
*round*))
|
272
|
+
|
273
|
+
(let ((dividers (generate-powers *from* *to* *mantissa-size*))
|
274
|
+
(p (if (not *dest*)
|
275
|
+
(current-output-port)
|
276
|
+
(open-output-file *dest*))))
|
277
|
+
(unwind-protect
|
278
|
+
(with-output-to-port p
|
279
|
+
(lambda ()
|
280
|
+
(print-c dividers *from* *to*
|
281
|
+
"GRISU_CACHE_STRUCT" "GRISU_CACHE_NAME"
|
282
|
+
"GRISU_CACHE_MAX_DISTANCE" "GRISU_CACHE_OFFSET"
|
283
|
+
"GRISU_UINT64_C"
|
284
|
+
)))
|
285
|
+
(if *dest*
|
286
|
+
(close-output-port p)))))
|