therubyracer 0.5.0-x86-linux → 0.11.0beta5-x86-linux
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/.gitignore +23 -11
- data/.travis.yml +10 -0
- data/Changelog.md +242 -0
- data/Gemfile +16 -0
- data/README.md +185 -0
- data/Rakefile +42 -51
- data/benchmarks.rb +217 -0
- data/ext/v8/accessor.cc +181 -0
- data/ext/v8/array.cc +26 -0
- data/ext/v8/backref.cc +56 -0
- data/ext/v8/build.rb +52 -0
- data/ext/v8/constants.cc +34 -0
- data/ext/v8/constraints.cc +52 -0
- data/ext/v8/context.cc +130 -0
- data/ext/v8/date.cc +18 -0
- data/ext/v8/exception.cc +38 -0
- data/ext/v8/extconf.rb +16 -29
- data/ext/v8/external.cc +43 -0
- data/ext/v8/function.cc +58 -0
- data/ext/v8/gc.cc +43 -0
- data/ext/v8/handles.cc +34 -0
- data/ext/v8/heap.cc +31 -0
- data/ext/v8/init.cc +39 -0
- data/ext/v8/init.so +0 -0
- data/ext/v8/invocation.cc +86 -0
- data/ext/v8/locker.cc +77 -0
- data/ext/v8/message.cc +51 -0
- data/ext/v8/object.cc +334 -0
- data/ext/v8/primitive.cc +8 -0
- data/ext/v8/rr.cc +83 -0
- data/ext/v8/rr.h +883 -0
- data/ext/v8/script.cc +80 -0
- data/ext/v8/signature.cc +18 -0
- data/ext/v8/stack.cc +75 -0
- data/ext/v8/string.cc +47 -0
- data/ext/v8/template.cc +175 -0
- data/ext/v8/trycatch.cc +86 -0
- data/ext/v8/v8.cc +87 -0
- data/ext/v8/value.cc +239 -0
- data/lib/v8.rb +30 -9
- data/lib/v8/access.rb +5 -0
- data/lib/v8/access/indices.rb +40 -0
- data/lib/v8/access/invocation.rb +47 -0
- data/lib/v8/access/names.rb +65 -0
- data/lib/v8/array.rb +26 -0
- data/lib/v8/context.rb +217 -75
- data/lib/v8/conversion.rb +35 -0
- data/lib/v8/conversion/array.rb +11 -0
- data/lib/v8/conversion/class.rb +120 -0
- data/lib/v8/conversion/code.rb +38 -0
- data/lib/v8/conversion/fundamental.rb +11 -0
- data/lib/v8/conversion/hash.rb +11 -0
- data/lib/v8/conversion/indentity.rb +31 -0
- data/lib/v8/conversion/method.rb +26 -0
- data/lib/v8/conversion/object.rb +28 -0
- data/lib/v8/conversion/primitive.rb +7 -0
- data/lib/v8/conversion/proc.rb +5 -0
- data/lib/v8/conversion/reference.rb +16 -0
- data/lib/v8/conversion/string.rb +12 -0
- data/lib/v8/conversion/symbol.rb +7 -0
- data/lib/v8/conversion/time.rb +13 -0
- data/lib/v8/error.rb +25 -0
- data/lib/v8/error/protect.rb +20 -0
- data/lib/v8/error/try.rb +15 -0
- data/lib/v8/function.rb +28 -0
- data/lib/v8/object.rb +69 -28
- data/lib/v8/util/weakcell.rb +29 -0
- data/lib/v8/version.rb +3 -0
- data/spec/c/array_spec.rb +17 -0
- data/spec/c/constants_spec.rb +20 -0
- data/spec/c/exception_spec.rb +26 -0
- data/spec/c/external_spec.rb +9 -0
- data/spec/c/function_spec.rb +46 -0
- data/spec/c/handles_spec.rb +35 -0
- data/spec/c/locker_spec.rb +38 -0
- data/spec/c/object_spec.rb +46 -0
- data/spec/c/script_spec.rb +28 -0
- data/spec/c/string_spec.rb +16 -0
- data/spec/c/template_spec.rb +30 -0
- data/spec/c/trycatch_spec.rb +51 -0
- data/spec/mem/blunt_spec.rb +42 -0
- data/spec/redjs_spec.rb +10 -0
- data/spec/spec_helper.rb +43 -12
- data/spec/threading_spec.rb +52 -0
- data/spec/v8/context_spec.rb +19 -0
- data/spec/v8/conversion_spec.rb +9 -0
- data/spec/v8/error_spec.rb +21 -0
- data/spec/v8/function_spec.rb +9 -0
- data/spec/v8/object_spec.rb +15 -0
- data/thefrontside.png +0 -0
- data/therubyracer.gemspec +15 -676
- metadata +146 -680
- data/.gitmodules +0 -3
- data/Doxyfile +0 -1514
- data/History.txt +0 -51
- data/README.rdoc +0 -158
- data/docs/data_conversion.txt +0 -18
- data/ext/v8/callbacks.cpp +0 -160
- data/ext/v8/callbacks.h +0 -14
- data/ext/v8/convert_ruby.cpp +0 -8
- data/ext/v8/convert_ruby.h +0 -99
- data/ext/v8/convert_string.cpp +0 -10
- data/ext/v8/convert_string.h +0 -73
- data/ext/v8/convert_v8.cpp +0 -9
- data/ext/v8/convert_v8.h +0 -121
- data/ext/v8/converters.cpp +0 -83
- data/ext/v8/converters.h +0 -23
- data/ext/v8/upstream/2.0.6/.gitignore +0 -26
- data/ext/v8/upstream/2.0.6/AUTHORS +0 -23
- data/ext/v8/upstream/2.0.6/ChangeLog +0 -1479
- data/ext/v8/upstream/2.0.6/LICENSE +0 -55
- data/ext/v8/upstream/2.0.6/SConstruct +0 -1028
- data/ext/v8/upstream/2.0.6/include/v8-debug.h +0 -275
- data/ext/v8/upstream/2.0.6/include/v8.h +0 -3236
- data/ext/v8/upstream/2.0.6/src/SConscript +0 -283
- data/ext/v8/upstream/2.0.6/src/accessors.cc +0 -695
- data/ext/v8/upstream/2.0.6/src/accessors.h +0 -114
- data/ext/v8/upstream/2.0.6/src/allocation.cc +0 -198
- data/ext/v8/upstream/2.0.6/src/allocation.h +0 -169
- data/ext/v8/upstream/2.0.6/src/api.cc +0 -3831
- data/ext/v8/upstream/2.0.6/src/api.h +0 -479
- data/ext/v8/upstream/2.0.6/src/apinatives.js +0 -110
- data/ext/v8/upstream/2.0.6/src/apiutils.h +0 -69
- data/ext/v8/upstream/2.0.6/src/arguments.h +0 -97
- data/ext/v8/upstream/2.0.6/src/arm/assembler-arm-inl.h +0 -277
- data/ext/v8/upstream/2.0.6/src/arm/assembler-arm.cc +0 -1821
- data/ext/v8/upstream/2.0.6/src/arm/assembler-arm.h +0 -1027
- data/ext/v8/upstream/2.0.6/src/arm/assembler-thumb2-inl.h +0 -267
- data/ext/v8/upstream/2.0.6/src/arm/assembler-thumb2.cc +0 -1821
- data/ext/v8/upstream/2.0.6/src/arm/assembler-thumb2.h +0 -1027
- data/ext/v8/upstream/2.0.6/src/arm/builtins-arm.cc +0 -1271
- data/ext/v8/upstream/2.0.6/src/arm/codegen-arm-inl.h +0 -74
- data/ext/v8/upstream/2.0.6/src/arm/codegen-arm.cc +0 -6682
- data/ext/v8/upstream/2.0.6/src/arm/codegen-arm.h +0 -535
- data/ext/v8/upstream/2.0.6/src/arm/constants-arm.cc +0 -112
- data/ext/v8/upstream/2.0.6/src/arm/constants-arm.h +0 -347
- data/ext/v8/upstream/2.0.6/src/arm/cpu-arm.cc +0 -132
- data/ext/v8/upstream/2.0.6/src/arm/debug-arm.cc +0 -213
- data/ext/v8/upstream/2.0.6/src/arm/disasm-arm.cc +0 -1166
- data/ext/v8/upstream/2.0.6/src/arm/fast-codegen-arm.cc +0 -1698
- data/ext/v8/upstream/2.0.6/src/arm/frames-arm.cc +0 -123
- data/ext/v8/upstream/2.0.6/src/arm/frames-arm.h +0 -162
- data/ext/v8/upstream/2.0.6/src/arm/ic-arm.cc +0 -849
- data/ext/v8/upstream/2.0.6/src/arm/jump-target-arm.cc +0 -238
- data/ext/v8/upstream/2.0.6/src/arm/macro-assembler-arm.cc +0 -1259
- data/ext/v8/upstream/2.0.6/src/arm/macro-assembler-arm.h +0 -423
- data/ext/v8/upstream/2.0.6/src/arm/regexp-macro-assembler-arm.cc +0 -1266
- data/ext/v8/upstream/2.0.6/src/arm/regexp-macro-assembler-arm.h +0 -282
- data/ext/v8/upstream/2.0.6/src/arm/register-allocator-arm-inl.h +0 -103
- data/ext/v8/upstream/2.0.6/src/arm/register-allocator-arm.cc +0 -59
- data/ext/v8/upstream/2.0.6/src/arm/register-allocator-arm.h +0 -43
- data/ext/v8/upstream/2.0.6/src/arm/simulator-arm.cc +0 -2264
- data/ext/v8/upstream/2.0.6/src/arm/simulator-arm.h +0 -306
- data/ext/v8/upstream/2.0.6/src/arm/stub-cache-arm.cc +0 -1516
- data/ext/v8/upstream/2.0.6/src/arm/virtual-frame-arm.cc +0 -412
- data/ext/v8/upstream/2.0.6/src/arm/virtual-frame-arm.h +0 -532
- data/ext/v8/upstream/2.0.6/src/array.js +0 -1154
- data/ext/v8/upstream/2.0.6/src/assembler.cc +0 -772
- data/ext/v8/upstream/2.0.6/src/assembler.h +0 -525
- data/ext/v8/upstream/2.0.6/src/ast.cc +0 -512
- data/ext/v8/upstream/2.0.6/src/ast.h +0 -1820
- data/ext/v8/upstream/2.0.6/src/bootstrapper.cc +0 -1680
- data/ext/v8/upstream/2.0.6/src/bootstrapper.h +0 -103
- data/ext/v8/upstream/2.0.6/src/builtins.cc +0 -851
- data/ext/v8/upstream/2.0.6/src/builtins.h +0 -245
- data/ext/v8/upstream/2.0.6/src/bytecodes-irregexp.h +0 -104
- data/ext/v8/upstream/2.0.6/src/char-predicates-inl.h +0 -86
- data/ext/v8/upstream/2.0.6/src/char-predicates.h +0 -65
- data/ext/v8/upstream/2.0.6/src/checks.cc +0 -100
- data/ext/v8/upstream/2.0.6/src/checks.h +0 -284
- data/ext/v8/upstream/2.0.6/src/code-stubs.cc +0 -164
- data/ext/v8/upstream/2.0.6/src/code-stubs.h +0 -164
- data/ext/v8/upstream/2.0.6/src/code.h +0 -68
- data/ext/v8/upstream/2.0.6/src/codegen-inl.h +0 -88
- data/ext/v8/upstream/2.0.6/src/codegen.cc +0 -504
- data/ext/v8/upstream/2.0.6/src/codegen.h +0 -522
- data/ext/v8/upstream/2.0.6/src/compilation-cache.cc +0 -490
- data/ext/v8/upstream/2.0.6/src/compilation-cache.h +0 -98
- 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/contexts.cc +0 -256
- data/ext/v8/upstream/2.0.6/src/contexts.h +0 -345
- data/ext/v8/upstream/2.0.6/src/conversions-inl.h +0 -95
- data/ext/v8/upstream/2.0.6/src/conversions.cc +0 -709
- data/ext/v8/upstream/2.0.6/src/conversions.h +0 -118
- data/ext/v8/upstream/2.0.6/src/counters.cc +0 -78
- data/ext/v8/upstream/2.0.6/src/counters.h +0 -239
- data/ext/v8/upstream/2.0.6/src/cpu.h +0 -65
- data/ext/v8/upstream/2.0.6/src/d8-debug.cc +0 -345
- data/ext/v8/upstream/2.0.6/src/d8-debug.h +0 -155
- data/ext/v8/upstream/2.0.6/src/d8-posix.cc +0 -675
- data/ext/v8/upstream/2.0.6/src/d8-readline.cc +0 -128
- data/ext/v8/upstream/2.0.6/src/d8-windows.cc +0 -42
- data/ext/v8/upstream/2.0.6/src/d8.cc +0 -776
- data/ext/v8/upstream/2.0.6/src/d8.h +0 -225
- data/ext/v8/upstream/2.0.6/src/d8.js +0 -1625
- data/ext/v8/upstream/2.0.6/src/date-delay.js +0 -1138
- data/ext/v8/upstream/2.0.6/src/dateparser-inl.h +0 -114
- data/ext/v8/upstream/2.0.6/src/dateparser.cc +0 -186
- data/ext/v8/upstream/2.0.6/src/dateparser.h +0 -240
- data/ext/v8/upstream/2.0.6/src/debug-agent.cc +0 -425
- data/ext/v8/upstream/2.0.6/src/debug-agent.h +0 -129
- data/ext/v8/upstream/2.0.6/src/debug-delay.js +0 -2073
- data/ext/v8/upstream/2.0.6/src/debug.cc +0 -2751
- data/ext/v8/upstream/2.0.6/src/debug.h +0 -866
- data/ext/v8/upstream/2.0.6/src/disasm.h +0 -77
- data/ext/v8/upstream/2.0.6/src/disassembler.cc +0 -318
- data/ext/v8/upstream/2.0.6/src/disassembler.h +0 -56
- data/ext/v8/upstream/2.0.6/src/dtoa-config.c +0 -91
- data/ext/v8/upstream/2.0.6/src/execution.cc +0 -701
- data/ext/v8/upstream/2.0.6/src/execution.h +0 -312
- data/ext/v8/upstream/2.0.6/src/factory.cc +0 -957
- data/ext/v8/upstream/2.0.6/src/factory.h +0 -393
- data/ext/v8/upstream/2.0.6/src/fast-codegen.cc +0 -725
- data/ext/v8/upstream/2.0.6/src/fast-codegen.h +0 -371
- data/ext/v8/upstream/2.0.6/src/flag-definitions.h +0 -426
- data/ext/v8/upstream/2.0.6/src/flags.cc +0 -555
- data/ext/v8/upstream/2.0.6/src/flags.h +0 -81
- data/ext/v8/upstream/2.0.6/src/frame-element.cc +0 -45
- data/ext/v8/upstream/2.0.6/src/frame-element.h +0 -235
- data/ext/v8/upstream/2.0.6/src/frames-inl.h +0 -215
- data/ext/v8/upstream/2.0.6/src/frames.cc +0 -749
- data/ext/v8/upstream/2.0.6/src/frames.h +0 -659
- data/ext/v8/upstream/2.0.6/src/func-name-inferrer.cc +0 -76
- data/ext/v8/upstream/2.0.6/src/func-name-inferrer.h +0 -135
- data/ext/v8/upstream/2.0.6/src/global-handles.cc +0 -516
- data/ext/v8/upstream/2.0.6/src/global-handles.h +0 -180
- data/ext/v8/upstream/2.0.6/src/globals.h +0 -608
- data/ext/v8/upstream/2.0.6/src/handles-inl.h +0 -76
- data/ext/v8/upstream/2.0.6/src/handles.cc +0 -811
- data/ext/v8/upstream/2.0.6/src/handles.h +0 -367
- data/ext/v8/upstream/2.0.6/src/hashmap.cc +0 -226
- data/ext/v8/upstream/2.0.6/src/hashmap.h +0 -120
- data/ext/v8/upstream/2.0.6/src/heap-inl.h +0 -407
- data/ext/v8/upstream/2.0.6/src/heap-profiler.cc +0 -695
- data/ext/v8/upstream/2.0.6/src/heap-profiler.h +0 -277
- data/ext/v8/upstream/2.0.6/src/heap.cc +0 -4204
- data/ext/v8/upstream/2.0.6/src/heap.h +0 -1704
- data/ext/v8/upstream/2.0.6/src/ia32/assembler-ia32-inl.h +0 -325
- data/ext/v8/upstream/2.0.6/src/ia32/assembler-ia32.cc +0 -2375
- data/ext/v8/upstream/2.0.6/src/ia32/assembler-ia32.h +0 -914
- data/ext/v8/upstream/2.0.6/src/ia32/builtins-ia32.cc +0 -1222
- data/ext/v8/upstream/2.0.6/src/ia32/codegen-ia32-inl.h +0 -46
- data/ext/v8/upstream/2.0.6/src/ia32/codegen-ia32.cc +0 -9770
- data/ext/v8/upstream/2.0.6/src/ia32/codegen-ia32.h +0 -834
- data/ext/v8/upstream/2.0.6/src/ia32/cpu-ia32.cc +0 -79
- data/ext/v8/upstream/2.0.6/src/ia32/debug-ia32.cc +0 -208
- data/ext/v8/upstream/2.0.6/src/ia32/disasm-ia32.cc +0 -1357
- data/ext/v8/upstream/2.0.6/src/ia32/fast-codegen-ia32.cc +0 -1813
- data/ext/v8/upstream/2.0.6/src/ia32/frames-ia32.cc +0 -111
- data/ext/v8/upstream/2.0.6/src/ia32/frames-ia32.h +0 -135
- data/ext/v8/upstream/2.0.6/src/ia32/ic-ia32.cc +0 -1490
- data/ext/v8/upstream/2.0.6/src/ia32/jump-target-ia32.cc +0 -432
- data/ext/v8/upstream/2.0.6/src/ia32/macro-assembler-ia32.cc +0 -1517
- data/ext/v8/upstream/2.0.6/src/ia32/macro-assembler-ia32.h +0 -528
- data/ext/v8/upstream/2.0.6/src/ia32/regexp-macro-assembler-ia32.cc +0 -1219
- data/ext/v8/upstream/2.0.6/src/ia32/regexp-macro-assembler-ia32.h +0 -230
- data/ext/v8/upstream/2.0.6/src/ia32/register-allocator-ia32-inl.h +0 -82
- data/ext/v8/upstream/2.0.6/src/ia32/register-allocator-ia32.cc +0 -99
- data/ext/v8/upstream/2.0.6/src/ia32/register-allocator-ia32.h +0 -43
- data/ext/v8/upstream/2.0.6/src/ia32/simulator-ia32.cc +0 -30
- data/ext/v8/upstream/2.0.6/src/ia32/simulator-ia32.h +0 -62
- data/ext/v8/upstream/2.0.6/src/ia32/stub-cache-ia32.cc +0 -1961
- data/ext/v8/upstream/2.0.6/src/ia32/virtual-frame-ia32.cc +0 -1105
- data/ext/v8/upstream/2.0.6/src/ia32/virtual-frame-ia32.h +0 -580
- data/ext/v8/upstream/2.0.6/src/ic-inl.h +0 -93
- data/ext/v8/upstream/2.0.6/src/ic.cc +0 -1426
- data/ext/v8/upstream/2.0.6/src/ic.h +0 -443
- data/ext/v8/upstream/2.0.6/src/interpreter-irregexp.cc +0 -646
- data/ext/v8/upstream/2.0.6/src/interpreter-irregexp.h +0 -48
- data/ext/v8/upstream/2.0.6/src/json-delay.js +0 -254
- data/ext/v8/upstream/2.0.6/src/jsregexp.cc +0 -5234
- data/ext/v8/upstream/2.0.6/src/jsregexp.h +0 -1439
- data/ext/v8/upstream/2.0.6/src/jump-target-inl.h +0 -49
- data/ext/v8/upstream/2.0.6/src/jump-target.cc +0 -383
- data/ext/v8/upstream/2.0.6/src/jump-target.h +0 -280
- data/ext/v8/upstream/2.0.6/src/list-inl.h +0 -166
- data/ext/v8/upstream/2.0.6/src/list.h +0 -158
- data/ext/v8/upstream/2.0.6/src/log-inl.h +0 -126
- data/ext/v8/upstream/2.0.6/src/log-utils.cc +0 -503
- data/ext/v8/upstream/2.0.6/src/log-utils.h +0 -292
- data/ext/v8/upstream/2.0.6/src/log.cc +0 -1457
- data/ext/v8/upstream/2.0.6/src/log.h +0 -371
- data/ext/v8/upstream/2.0.6/src/macro-assembler.h +0 -93
- data/ext/v8/upstream/2.0.6/src/macros.py +0 -137
- data/ext/v8/upstream/2.0.6/src/mark-compact.cc +0 -2007
- data/ext/v8/upstream/2.0.6/src/mark-compact.h +0 -442
- data/ext/v8/upstream/2.0.6/src/math.js +0 -263
- data/ext/v8/upstream/2.0.6/src/memory.h +0 -74
- data/ext/v8/upstream/2.0.6/src/messages.cc +0 -177
- data/ext/v8/upstream/2.0.6/src/messages.h +0 -112
- data/ext/v8/upstream/2.0.6/src/messages.js +0 -937
- data/ext/v8/upstream/2.0.6/src/mirror-delay.js +0 -2332
- data/ext/v8/upstream/2.0.6/src/mksnapshot.cc +0 -169
- data/ext/v8/upstream/2.0.6/src/natives.h +0 -63
- data/ext/v8/upstream/2.0.6/src/objects-debug.cc +0 -1317
- data/ext/v8/upstream/2.0.6/src/objects-inl.h +0 -3044
- data/ext/v8/upstream/2.0.6/src/objects.cc +0 -8306
- data/ext/v8/upstream/2.0.6/src/objects.h +0 -4960
- data/ext/v8/upstream/2.0.6/src/oprofile-agent.cc +0 -116
- data/ext/v8/upstream/2.0.6/src/oprofile-agent.h +0 -69
- data/ext/v8/upstream/2.0.6/src/parser.cc +0 -4810
- data/ext/v8/upstream/2.0.6/src/parser.h +0 -195
- data/ext/v8/upstream/2.0.6/src/platform-freebsd.cc +0 -645
- data/ext/v8/upstream/2.0.6/src/platform-linux.cc +0 -808
- data/ext/v8/upstream/2.0.6/src/platform-macos.cc +0 -643
- data/ext/v8/upstream/2.0.6/src/platform-nullos.cc +0 -454
- data/ext/v8/upstream/2.0.6/src/platform-openbsd.cc +0 -597
- data/ext/v8/upstream/2.0.6/src/platform-posix.cc +0 -380
- data/ext/v8/upstream/2.0.6/src/platform-win32.cc +0 -1908
- data/ext/v8/upstream/2.0.6/src/platform.h +0 -556
- data/ext/v8/upstream/2.0.6/src/prettyprinter.cc +0 -1511
- data/ext/v8/upstream/2.0.6/src/prettyprinter.h +0 -219
- data/ext/v8/upstream/2.0.6/src/property.cc +0 -96
- data/ext/v8/upstream/2.0.6/src/property.h +0 -327
- data/ext/v8/upstream/2.0.6/src/regexp-delay.js +0 -406
- data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-irregexp-inl.h +0 -78
- data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-irregexp.cc +0 -464
- data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-irregexp.h +0 -141
- data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-tracer.cc +0 -356
- data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler-tracer.h +0 -103
- data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler.cc +0 -240
- data/ext/v8/upstream/2.0.6/src/regexp-macro-assembler.h +0 -220
- data/ext/v8/upstream/2.0.6/src/regexp-stack.cc +0 -103
- data/ext/v8/upstream/2.0.6/src/regexp-stack.h +0 -123
- data/ext/v8/upstream/2.0.6/src/register-allocator-inl.h +0 -74
- data/ext/v8/upstream/2.0.6/src/register-allocator.cc +0 -100
- data/ext/v8/upstream/2.0.6/src/register-allocator.h +0 -295
- data/ext/v8/upstream/2.0.6/src/rewriter.cc +0 -855
- data/ext/v8/upstream/2.0.6/src/rewriter.h +0 -54
- data/ext/v8/upstream/2.0.6/src/runtime.cc +0 -8163
- data/ext/v8/upstream/2.0.6/src/runtime.h +0 -432
- data/ext/v8/upstream/2.0.6/src/runtime.js +0 -626
- data/ext/v8/upstream/2.0.6/src/scanner.cc +0 -1098
- data/ext/v8/upstream/2.0.6/src/scanner.h +0 -425
- data/ext/v8/upstream/2.0.6/src/scopeinfo.cc +0 -649
- data/ext/v8/upstream/2.0.6/src/scopeinfo.h +0 -236
- data/ext/v8/upstream/2.0.6/src/scopes.cc +0 -963
- data/ext/v8/upstream/2.0.6/src/scopes.h +0 -401
- data/ext/v8/upstream/2.0.6/src/serialize.cc +0 -1260
- data/ext/v8/upstream/2.0.6/src/serialize.h +0 -404
- data/ext/v8/upstream/2.0.6/src/shell.h +0 -55
- data/ext/v8/upstream/2.0.6/src/simulator.h +0 -41
- data/ext/v8/upstream/2.0.6/src/smart-pointer.h +0 -109
- data/ext/v8/upstream/2.0.6/src/snapshot-common.cc +0 -97
- data/ext/v8/upstream/2.0.6/src/snapshot-empty.cc +0 -40
- data/ext/v8/upstream/2.0.6/src/snapshot.h +0 -59
- data/ext/v8/upstream/2.0.6/src/spaces-inl.h +0 -372
- data/ext/v8/upstream/2.0.6/src/spaces.cc +0 -2864
- data/ext/v8/upstream/2.0.6/src/spaces.h +0 -2072
- data/ext/v8/upstream/2.0.6/src/string-stream.cc +0 -584
- data/ext/v8/upstream/2.0.6/src/string-stream.h +0 -189
- data/ext/v8/upstream/2.0.6/src/string.js +0 -901
- data/ext/v8/upstream/2.0.6/src/stub-cache.cc +0 -1108
- data/ext/v8/upstream/2.0.6/src/stub-cache.h +0 -578
- data/ext/v8/upstream/2.0.6/src/third_party/dtoa/COPYING +0 -15
- data/ext/v8/upstream/2.0.6/src/third_party/dtoa/dtoa.c +0 -3330
- data/ext/v8/upstream/2.0.6/src/third_party/valgrind/valgrind.h +0 -3925
- data/ext/v8/upstream/2.0.6/src/token.cc +0 -56
- data/ext/v8/upstream/2.0.6/src/token.h +0 -270
- data/ext/v8/upstream/2.0.6/src/top.cc +0 -991
- data/ext/v8/upstream/2.0.6/src/top.h +0 -459
- data/ext/v8/upstream/2.0.6/src/unicode-inl.h +0 -238
- data/ext/v8/upstream/2.0.6/src/unicode.cc +0 -749
- data/ext/v8/upstream/2.0.6/src/unicode.h +0 -279
- data/ext/v8/upstream/2.0.6/src/uri.js +0 -415
- data/ext/v8/upstream/2.0.6/src/usage-analyzer.cc +0 -426
- data/ext/v8/upstream/2.0.6/src/usage-analyzer.h +0 -40
- data/ext/v8/upstream/2.0.6/src/utils.cc +0 -322
- data/ext/v8/upstream/2.0.6/src/utils.h +0 -592
- data/ext/v8/upstream/2.0.6/src/v8-counters.cc +0 -55
- data/ext/v8/upstream/2.0.6/src/v8-counters.h +0 -198
- data/ext/v8/upstream/2.0.6/src/v8.cc +0 -193
- data/ext/v8/upstream/2.0.6/src/v8.h +0 -119
- data/ext/v8/upstream/2.0.6/src/v8natives.js +0 -846
- data/ext/v8/upstream/2.0.6/src/v8threads.cc +0 -450
- data/ext/v8/upstream/2.0.6/src/v8threads.h +0 -144
- data/ext/v8/upstream/2.0.6/src/variables.cc +0 -163
- data/ext/v8/upstream/2.0.6/src/variables.h +0 -235
- data/ext/v8/upstream/2.0.6/src/version.cc +0 -88
- data/ext/v8/upstream/2.0.6/src/version.h +0 -64
- data/ext/v8/upstream/2.0.6/src/virtual-frame.cc +0 -381
- data/ext/v8/upstream/2.0.6/src/virtual-frame.h +0 -44
- data/ext/v8/upstream/2.0.6/src/x64/assembler-x64-inl.h +0 -352
- data/ext/v8/upstream/2.0.6/src/x64/assembler-x64.cc +0 -2539
- data/ext/v8/upstream/2.0.6/src/x64/assembler-x64.h +0 -1399
- data/ext/v8/upstream/2.0.6/src/x64/builtins-x64.cc +0 -1255
- data/ext/v8/upstream/2.0.6/src/x64/codegen-x64-inl.h +0 -46
- data/ext/v8/upstream/2.0.6/src/x64/codegen-x64.cc +0 -8223
- data/ext/v8/upstream/2.0.6/src/x64/codegen-x64.h +0 -785
- data/ext/v8/upstream/2.0.6/src/x64/cpu-x64.cc +0 -79
- data/ext/v8/upstream/2.0.6/src/x64/debug-x64.cc +0 -202
- data/ext/v8/upstream/2.0.6/src/x64/disasm-x64.cc +0 -1596
- data/ext/v8/upstream/2.0.6/src/x64/fast-codegen-x64.cc +0 -1820
- data/ext/v8/upstream/2.0.6/src/x64/frames-x64.cc +0 -109
- data/ext/v8/upstream/2.0.6/src/x64/frames-x64.h +0 -121
- data/ext/v8/upstream/2.0.6/src/x64/ic-x64.cc +0 -1392
- data/ext/v8/upstream/2.0.6/src/x64/jump-target-x64.cc +0 -432
- data/ext/v8/upstream/2.0.6/src/x64/macro-assembler-x64.cc +0 -2409
- data/ext/v8/upstream/2.0.6/src/x64/macro-assembler-x64.h +0 -765
- data/ext/v8/upstream/2.0.6/src/x64/regexp-macro-assembler-x64.cc +0 -1337
- data/ext/v8/upstream/2.0.6/src/x64/regexp-macro-assembler-x64.h +0 -295
- data/ext/v8/upstream/2.0.6/src/x64/register-allocator-x64-inl.h +0 -86
- data/ext/v8/upstream/2.0.6/src/x64/register-allocator-x64.cc +0 -84
- data/ext/v8/upstream/2.0.6/src/x64/register-allocator-x64.h +0 -43
- data/ext/v8/upstream/2.0.6/src/x64/simulator-x64.cc +0 -27
- data/ext/v8/upstream/2.0.6/src/x64/simulator-x64.h +0 -63
- data/ext/v8/upstream/2.0.6/src/x64/stub-cache-x64.cc +0 -1884
- data/ext/v8/upstream/2.0.6/src/x64/virtual-frame-x64.cc +0 -1089
- data/ext/v8/upstream/2.0.6/src/x64/virtual-frame-x64.h +0 -560
- data/ext/v8/upstream/2.0.6/src/zone-inl.h +0 -297
- data/ext/v8/upstream/2.0.6/src/zone.cc +0 -193
- data/ext/v8/upstream/2.0.6/src/zone.h +0 -305
- data/ext/v8/upstream/2.0.6/tools/codemap.js +0 -258
- data/ext/v8/upstream/2.0.6/tools/consarray.js +0 -93
- data/ext/v8/upstream/2.0.6/tools/csvparser.js +0 -98
- data/ext/v8/upstream/2.0.6/tools/gyp/v8.gyp +0 -620
- data/ext/v8/upstream/2.0.6/tools/js2c.py +0 -376
- data/ext/v8/upstream/2.0.6/tools/jsmin.py +0 -280
- data/ext/v8/upstream/2.0.6/tools/linux-tick-processor +0 -24
- data/ext/v8/upstream/2.0.6/tools/linux-tick-processor.py +0 -78
- data/ext/v8/upstream/2.0.6/tools/logreader.js +0 -320
- data/ext/v8/upstream/2.0.6/tools/mac-nm +0 -18
- data/ext/v8/upstream/2.0.6/tools/mac-tick-processor +0 -6
- data/ext/v8/upstream/2.0.6/tools/oprofile/annotate +0 -7
- data/ext/v8/upstream/2.0.6/tools/oprofile/common +0 -19
- data/ext/v8/upstream/2.0.6/tools/oprofile/dump +0 -7
- data/ext/v8/upstream/2.0.6/tools/oprofile/report +0 -7
- data/ext/v8/upstream/2.0.6/tools/oprofile/reset +0 -7
- data/ext/v8/upstream/2.0.6/tools/oprofile/run +0 -14
- data/ext/v8/upstream/2.0.6/tools/oprofile/shutdown +0 -7
- data/ext/v8/upstream/2.0.6/tools/oprofile/start +0 -7
- data/ext/v8/upstream/2.0.6/tools/presubmit.py +0 -299
- data/ext/v8/upstream/2.0.6/tools/process-heap-prof.py +0 -120
- data/ext/v8/upstream/2.0.6/tools/profile.js +0 -621
- data/ext/v8/upstream/2.0.6/tools/profile_view.js +0 -224
- data/ext/v8/upstream/2.0.6/tools/run-valgrind.py +0 -77
- data/ext/v8/upstream/2.0.6/tools/splaytree.js +0 -322
- data/ext/v8/upstream/2.0.6/tools/splaytree.py +0 -226
- data/ext/v8/upstream/2.0.6/tools/stats-viewer.py +0 -456
- data/ext/v8/upstream/2.0.6/tools/test.py +0 -1370
- data/ext/v8/upstream/2.0.6/tools/tickprocessor-driver.js +0 -53
- data/ext/v8/upstream/2.0.6/tools/tickprocessor.js +0 -731
- data/ext/v8/upstream/2.0.6/tools/tickprocessor.py +0 -535
- data/ext/v8/upstream/2.0.6/tools/utils.py +0 -82
- data/ext/v8/upstream/2.0.6/tools/visual_studio/README.txt +0 -71
- data/ext/v8/upstream/2.0.6/tools/visual_studio/arm.vsprops +0 -14
- data/ext/v8/upstream/2.0.6/tools/visual_studio/common.vsprops +0 -35
- data/ext/v8/upstream/2.0.6/tools/visual_studio/d8.vcproj +0 -199
- data/ext/v8/upstream/2.0.6/tools/visual_studio/d8_arm.vcproj +0 -199
- data/ext/v8/upstream/2.0.6/tools/visual_studio/d8_x64.vcproj +0 -201
- data/ext/v8/upstream/2.0.6/tools/visual_studio/d8js2c.cmd +0 -6
- data/ext/v8/upstream/2.0.6/tools/visual_studio/debug.vsprops +0 -17
- data/ext/v8/upstream/2.0.6/tools/visual_studio/ia32.vsprops +0 -13
- data/ext/v8/upstream/2.0.6/tools/visual_studio/js2c.cmd +0 -6
- data/ext/v8/upstream/2.0.6/tools/visual_studio/release.vsprops +0 -24
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8.sln +0 -101
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8.vcproj +0 -223
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_arm.sln +0 -74
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_arm.vcproj +0 -223
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_base.vcproj +0 -971
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_base_arm.vcproj +0 -983
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_base_x64.vcproj +0 -959
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_cctest.vcproj +0 -255
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_cctest_arm.vcproj +0 -243
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_cctest_x64.vcproj +0 -257
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_mksnapshot.vcproj +0 -151
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_mksnapshot_x64.vcproj +0 -151
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_process_sample.vcproj +0 -151
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_process_sample_arm.vcproj +0 -151
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_process_sample_x64.vcproj +0 -151
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_shell_sample.vcproj +0 -151
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_shell_sample_arm.vcproj +0 -151
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_shell_sample_x64.vcproj +0 -153
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_snapshot.vcproj +0 -142
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_snapshot_cc.vcproj +0 -92
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_snapshot_cc_x64.vcproj +0 -92
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_snapshot_x64.vcproj +0 -142
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_x64.sln +0 -101
- data/ext/v8/upstream/2.0.6/tools/visual_studio/v8_x64.vcproj +0 -223
- data/ext/v8/upstream/2.0.6/tools/visual_studio/x64.vsprops +0 -13
- data/ext/v8/upstream/2.0.6/tools/windows-tick-processor.bat +0 -5
- data/ext/v8/upstream/2.0.6/tools/windows-tick-processor.py +0 -137
- data/ext/v8/upstream/Makefile +0 -32
- data/ext/v8/upstream/fpic-on-linux-amd64.patch +0 -13
- data/ext/v8/upstream/no-strict-aliasing.patch +0 -13
- data/ext/v8/upstream/scons/CHANGES.txt +0 -5183
- data/ext/v8/upstream/scons/LICENSE.txt +0 -20
- data/ext/v8/upstream/scons/MANIFEST +0 -202
- data/ext/v8/upstream/scons/PKG-INFO +0 -13
- data/ext/v8/upstream/scons/README.txt +0 -273
- data/ext/v8/upstream/scons/RELEASE.txt +0 -1040
- data/ext/v8/upstream/scons/engine/SCons/Action.py +0 -1256
- data/ext/v8/upstream/scons/engine/SCons/Builder.py +0 -868
- data/ext/v8/upstream/scons/engine/SCons/CacheDir.py +0 -217
- data/ext/v8/upstream/scons/engine/SCons/Conftest.py +0 -794
- data/ext/v8/upstream/scons/engine/SCons/Debug.py +0 -237
- data/ext/v8/upstream/scons/engine/SCons/Defaults.py +0 -485
- data/ext/v8/upstream/scons/engine/SCons/Environment.py +0 -2327
- data/ext/v8/upstream/scons/engine/SCons/Errors.py +0 -207
- data/ext/v8/upstream/scons/engine/SCons/Executor.py +0 -636
- data/ext/v8/upstream/scons/engine/SCons/Job.py +0 -435
- data/ext/v8/upstream/scons/engine/SCons/Memoize.py +0 -292
- data/ext/v8/upstream/scons/engine/SCons/Node/Alias.py +0 -153
- data/ext/v8/upstream/scons/engine/SCons/Node/FS.py +0 -3220
- data/ext/v8/upstream/scons/engine/SCons/Node/Python.py +0 -128
- data/ext/v8/upstream/scons/engine/SCons/Node/__init__.py +0 -1341
- data/ext/v8/upstream/scons/engine/SCons/Options/BoolOption.py +0 -50
- data/ext/v8/upstream/scons/engine/SCons/Options/EnumOption.py +0 -50
- data/ext/v8/upstream/scons/engine/SCons/Options/ListOption.py +0 -50
- data/ext/v8/upstream/scons/engine/SCons/Options/PackageOption.py +0 -50
- data/ext/v8/upstream/scons/engine/SCons/Options/PathOption.py +0 -76
- data/ext/v8/upstream/scons/engine/SCons/Options/__init__.py +0 -74
- data/ext/v8/upstream/scons/engine/SCons/PathList.py +0 -232
- data/ext/v8/upstream/scons/engine/SCons/Platform/__init__.py +0 -236
- data/ext/v8/upstream/scons/engine/SCons/Platform/aix.py +0 -70
- data/ext/v8/upstream/scons/engine/SCons/Platform/cygwin.py +0 -55
- data/ext/v8/upstream/scons/engine/SCons/Platform/darwin.py +0 -46
- data/ext/v8/upstream/scons/engine/SCons/Platform/hpux.py +0 -46
- data/ext/v8/upstream/scons/engine/SCons/Platform/irix.py +0 -44
- data/ext/v8/upstream/scons/engine/SCons/Platform/os2.py +0 -58
- data/ext/v8/upstream/scons/engine/SCons/Platform/posix.py +0 -264
- data/ext/v8/upstream/scons/engine/SCons/Platform/sunos.py +0 -50
- data/ext/v8/upstream/scons/engine/SCons/Platform/win32.py +0 -386
- data/ext/v8/upstream/scons/engine/SCons/SConf.py +0 -1038
- data/ext/v8/upstream/scons/engine/SCons/SConsign.py +0 -381
- data/ext/v8/upstream/scons/engine/SCons/Scanner/C.py +0 -132
- data/ext/v8/upstream/scons/engine/SCons/Scanner/D.py +0 -74
- data/ext/v8/upstream/scons/engine/SCons/Scanner/Dir.py +0 -111
- data/ext/v8/upstream/scons/engine/SCons/Scanner/Fortran.py +0 -320
- data/ext/v8/upstream/scons/engine/SCons/Scanner/IDL.py +0 -48
- data/ext/v8/upstream/scons/engine/SCons/Scanner/LaTeX.py +0 -378
- data/ext/v8/upstream/scons/engine/SCons/Scanner/Prog.py +0 -103
- data/ext/v8/upstream/scons/engine/SCons/Scanner/RC.py +0 -55
- data/ext/v8/upstream/scons/engine/SCons/Scanner/__init__.py +0 -415
- data/ext/v8/upstream/scons/engine/SCons/Script/Interactive.py +0 -386
- data/ext/v8/upstream/scons/engine/SCons/Script/Main.py +0 -1360
- data/ext/v8/upstream/scons/engine/SCons/Script/SConsOptions.py +0 -944
- data/ext/v8/upstream/scons/engine/SCons/Script/SConscript.py +0 -642
- data/ext/v8/upstream/scons/engine/SCons/Script/__init__.py +0 -414
- data/ext/v8/upstream/scons/engine/SCons/Sig.py +0 -63
- data/ext/v8/upstream/scons/engine/SCons/Subst.py +0 -911
- data/ext/v8/upstream/scons/engine/SCons/Taskmaster.py +0 -1030
- data/ext/v8/upstream/scons/engine/SCons/Tool/386asm.py +0 -61
- data/ext/v8/upstream/scons/engine/SCons/Tool/BitKeeper.py +0 -65
- data/ext/v8/upstream/scons/engine/SCons/Tool/CVS.py +0 -73
- data/ext/v8/upstream/scons/engine/SCons/Tool/FortranCommon.py +0 -247
- data/ext/v8/upstream/scons/engine/SCons/Tool/JavaCommon.py +0 -324
- data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/__init__.py +0 -56
- data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/arch.py +0 -61
- data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/common.py +0 -210
- data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/netframework.py +0 -84
- data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/sdk.py +0 -321
- data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/vc.py +0 -367
- data/ext/v8/upstream/scons/engine/SCons/Tool/MSCommon/vs.py +0 -497
- data/ext/v8/upstream/scons/engine/SCons/Tool/Perforce.py +0 -104
- data/ext/v8/upstream/scons/engine/SCons/Tool/PharLapCommon.py +0 -138
- data/ext/v8/upstream/scons/engine/SCons/Tool/RCS.py +0 -64
- data/ext/v8/upstream/scons/engine/SCons/Tool/SCCS.py +0 -64
- data/ext/v8/upstream/scons/engine/SCons/Tool/Subversion.py +0 -71
- data/ext/v8/upstream/scons/engine/SCons/Tool/__init__.py +0 -675
- data/ext/v8/upstream/scons/engine/SCons/Tool/aixc++.py +0 -82
- data/ext/v8/upstream/scons/engine/SCons/Tool/aixcc.py +0 -74
- data/ext/v8/upstream/scons/engine/SCons/Tool/aixf77.py +0 -80
- data/ext/v8/upstream/scons/engine/SCons/Tool/aixlink.py +0 -76
- data/ext/v8/upstream/scons/engine/SCons/Tool/applelink.py +0 -71
- data/ext/v8/upstream/scons/engine/SCons/Tool/ar.py +0 -63
- data/ext/v8/upstream/scons/engine/SCons/Tool/as.py +0 -78
- data/ext/v8/upstream/scons/engine/SCons/Tool/bcc32.py +0 -82
- data/ext/v8/upstream/scons/engine/SCons/Tool/c++.py +0 -99
- data/ext/v8/upstream/scons/engine/SCons/Tool/cc.py +0 -114
- data/ext/v8/upstream/scons/engine/SCons/Tool/cvf.py +0 -58
- data/ext/v8/upstream/scons/engine/SCons/Tool/default.py +0 -50
- data/ext/v8/upstream/scons/engine/SCons/Tool/dmd.py +0 -224
- data/ext/v8/upstream/scons/engine/SCons/Tool/dvi.py +0 -64
- data/ext/v8/upstream/scons/engine/SCons/Tool/dvipdf.py +0 -125
- data/ext/v8/upstream/scons/engine/SCons/Tool/dvips.py +0 -94
- data/ext/v8/upstream/scons/engine/SCons/Tool/f77.py +0 -62
- data/ext/v8/upstream/scons/engine/SCons/Tool/f90.py +0 -62
- data/ext/v8/upstream/scons/engine/SCons/Tool/f95.py +0 -63
- data/ext/v8/upstream/scons/engine/SCons/Tool/filesystem.py +0 -98
- data/ext/v8/upstream/scons/engine/SCons/Tool/fortran.py +0 -63
- data/ext/v8/upstream/scons/engine/SCons/Tool/g++.py +0 -90
- data/ext/v8/upstream/scons/engine/SCons/Tool/g77.py +0 -73
- data/ext/v8/upstream/scons/engine/SCons/Tool/gas.py +0 -53
- data/ext/v8/upstream/scons/engine/SCons/Tool/gcc.py +0 -80
- data/ext/v8/upstream/scons/engine/SCons/Tool/gfortran.py +0 -64
- data/ext/v8/upstream/scons/engine/SCons/Tool/gnulink.py +0 -63
- data/ext/v8/upstream/scons/engine/SCons/Tool/gs.py +0 -81
- data/ext/v8/upstream/scons/engine/SCons/Tool/hpc++.py +0 -85
- data/ext/v8/upstream/scons/engine/SCons/Tool/hpcc.py +0 -53
- data/ext/v8/upstream/scons/engine/SCons/Tool/hplink.py +0 -77
- data/ext/v8/upstream/scons/engine/SCons/Tool/icc.py +0 -59
- data/ext/v8/upstream/scons/engine/SCons/Tool/icl.py +0 -52
- data/ext/v8/upstream/scons/engine/SCons/Tool/ifl.py +0 -72
- data/ext/v8/upstream/scons/engine/SCons/Tool/ifort.py +0 -90
- data/ext/v8/upstream/scons/engine/SCons/Tool/ilink.py +0 -59
- data/ext/v8/upstream/scons/engine/SCons/Tool/ilink32.py +0 -60
- data/ext/v8/upstream/scons/engine/SCons/Tool/install.py +0 -229
- data/ext/v8/upstream/scons/engine/SCons/Tool/intelc.py +0 -490
- data/ext/v8/upstream/scons/engine/SCons/Tool/ipkg.py +0 -71
- data/ext/v8/upstream/scons/engine/SCons/Tool/jar.py +0 -110
- data/ext/v8/upstream/scons/engine/SCons/Tool/javac.py +0 -234
- data/ext/v8/upstream/scons/engine/SCons/Tool/javah.py +0 -138
- data/ext/v8/upstream/scons/engine/SCons/Tool/latex.py +0 -79
- data/ext/v8/upstream/scons/engine/SCons/Tool/lex.py +0 -99
- data/ext/v8/upstream/scons/engine/SCons/Tool/link.py +0 -121
- data/ext/v8/upstream/scons/engine/SCons/Tool/linkloc.py +0 -112
- data/ext/v8/upstream/scons/engine/SCons/Tool/m4.py +0 -63
- data/ext/v8/upstream/scons/engine/SCons/Tool/masm.py +0 -77
- data/ext/v8/upstream/scons/engine/SCons/Tool/midl.py +0 -90
- data/ext/v8/upstream/scons/engine/SCons/Tool/mingw.py +0 -159
- data/ext/v8/upstream/scons/engine/SCons/Tool/mslib.py +0 -64
- data/ext/v8/upstream/scons/engine/SCons/Tool/mslink.py +0 -266
- data/ext/v8/upstream/scons/engine/SCons/Tool/mssdk.py +0 -50
- data/ext/v8/upstream/scons/engine/SCons/Tool/msvc.py +0 -269
- data/ext/v8/upstream/scons/engine/SCons/Tool/msvs.py +0 -1439
- data/ext/v8/upstream/scons/engine/SCons/Tool/mwcc.py +0 -208
- data/ext/v8/upstream/scons/engine/SCons/Tool/mwld.py +0 -107
- data/ext/v8/upstream/scons/engine/SCons/Tool/nasm.py +0 -72
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/__init__.py +0 -314
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/ipk.py +0 -185
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/msi.py +0 -526
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/rpm.py +0 -367
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_tarbz2.py +0 -43
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_targz.py +0 -43
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/src_zip.py +0 -43
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/tarbz2.py +0 -44
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/targz.py +0 -44
- data/ext/v8/upstream/scons/engine/SCons/Tool/packaging/zip.py +0 -44
- data/ext/v8/upstream/scons/engine/SCons/Tool/pdf.py +0 -78
- data/ext/v8/upstream/scons/engine/SCons/Tool/pdflatex.py +0 -83
- data/ext/v8/upstream/scons/engine/SCons/Tool/pdftex.py +0 -108
- data/ext/v8/upstream/scons/engine/SCons/Tool/qt.py +0 -336
- data/ext/v8/upstream/scons/engine/SCons/Tool/rmic.py +0 -121
- data/ext/v8/upstream/scons/engine/SCons/Tool/rpcgen.py +0 -70
- data/ext/v8/upstream/scons/engine/SCons/Tool/rpm.py +0 -132
- data/ext/v8/upstream/scons/engine/SCons/Tool/sgiar.py +0 -68
- data/ext/v8/upstream/scons/engine/SCons/Tool/sgic++.py +0 -58
- data/ext/v8/upstream/scons/engine/SCons/Tool/sgicc.py +0 -53
- data/ext/v8/upstream/scons/engine/SCons/Tool/sgilink.py +0 -63
- data/ext/v8/upstream/scons/engine/SCons/Tool/sunar.py +0 -67
- data/ext/v8/upstream/scons/engine/SCons/Tool/sunc++.py +0 -142
- data/ext/v8/upstream/scons/engine/SCons/Tool/suncc.py +0 -58
- data/ext/v8/upstream/scons/engine/SCons/Tool/sunf77.py +0 -63
- data/ext/v8/upstream/scons/engine/SCons/Tool/sunf90.py +0 -64
- data/ext/v8/upstream/scons/engine/SCons/Tool/sunf95.py +0 -64
- data/ext/v8/upstream/scons/engine/SCons/Tool/sunlink.py +0 -77
- data/ext/v8/upstream/scons/engine/SCons/Tool/swig.py +0 -186
- data/ext/v8/upstream/scons/engine/SCons/Tool/tar.py +0 -73
- data/ext/v8/upstream/scons/engine/SCons/Tool/tex.py +0 -805
- data/ext/v8/upstream/scons/engine/SCons/Tool/textfile.py +0 -175
- data/ext/v8/upstream/scons/engine/SCons/Tool/tlib.py +0 -53
- data/ext/v8/upstream/scons/engine/SCons/Tool/wix.py +0 -100
- data/ext/v8/upstream/scons/engine/SCons/Tool/yacc.py +0 -131
- data/ext/v8/upstream/scons/engine/SCons/Tool/zip.py +0 -100
- data/ext/v8/upstream/scons/engine/SCons/Util.py +0 -1645
- data/ext/v8/upstream/scons/engine/SCons/Variables/BoolVariable.py +0 -91
- data/ext/v8/upstream/scons/engine/SCons/Variables/EnumVariable.py +0 -107
- data/ext/v8/upstream/scons/engine/SCons/Variables/ListVariable.py +0 -139
- data/ext/v8/upstream/scons/engine/SCons/Variables/PackageVariable.py +0 -109
- data/ext/v8/upstream/scons/engine/SCons/Variables/PathVariable.py +0 -147
- data/ext/v8/upstream/scons/engine/SCons/Variables/__init__.py +0 -317
- data/ext/v8/upstream/scons/engine/SCons/Warnings.py +0 -228
- data/ext/v8/upstream/scons/engine/SCons/__init__.py +0 -49
- data/ext/v8/upstream/scons/engine/SCons/compat/__init__.py +0 -302
- data/ext/v8/upstream/scons/engine/SCons/compat/_scons_UserString.py +0 -98
- data/ext/v8/upstream/scons/engine/SCons/compat/_scons_hashlib.py +0 -91
- data/ext/v8/upstream/scons/engine/SCons/compat/_scons_itertools.py +0 -124
- data/ext/v8/upstream/scons/engine/SCons/compat/_scons_optparse.py +0 -1725
- data/ext/v8/upstream/scons/engine/SCons/compat/_scons_sets.py +0 -583
- data/ext/v8/upstream/scons/engine/SCons/compat/_scons_sets15.py +0 -176
- data/ext/v8/upstream/scons/engine/SCons/compat/_scons_shlex.py +0 -325
- data/ext/v8/upstream/scons/engine/SCons/compat/_scons_subprocess.py +0 -1296
- data/ext/v8/upstream/scons/engine/SCons/compat/_scons_textwrap.py +0 -382
- data/ext/v8/upstream/scons/engine/SCons/compat/builtins.py +0 -187
- data/ext/v8/upstream/scons/engine/SCons/cpp.py +0 -598
- data/ext/v8/upstream/scons/engine/SCons/dblite.py +0 -248
- data/ext/v8/upstream/scons/engine/SCons/exitfuncs.py +0 -77
- data/ext/v8/upstream/scons/os_spawnv_fix.diff +0 -83
- data/ext/v8/upstream/scons/scons-time.1 +0 -1017
- data/ext/v8/upstream/scons/scons.1 +0 -15179
- data/ext/v8/upstream/scons/sconsign.1 +0 -208
- data/ext/v8/upstream/scons/script/scons +0 -184
- data/ext/v8/upstream/scons/script/scons-time +0 -1529
- data/ext/v8/upstream/scons/script/scons.bat +0 -31
- data/ext/v8/upstream/scons/script/sconsign +0 -508
- data/ext/v8/upstream/scons/setup.cfg +0 -6
- data/ext/v8/upstream/scons/setup.py +0 -427
- data/ext/v8/v8.cpp +0 -89
- data/ext/v8/v8_cxt.cpp +0 -92
- data/ext/v8/v8_cxt.h +0 -20
- data/ext/v8/v8_func.cpp +0 -10
- data/ext/v8/v8_func.h +0 -11
- data/ext/v8/v8_msg.cpp +0 -54
- data/ext/v8/v8_msg.h +0 -18
- data/ext/v8/v8_obj.cpp +0 -52
- data/ext/v8/v8_obj.h +0 -13
- data/ext/v8/v8_ref.cpp +0 -26
- data/ext/v8/v8_ref.h +0 -31
- data/ext/v8/v8_script.cpp +0 -20
- data/ext/v8/v8_script.h +0 -8
- data/ext/v8/v8_standalone.cpp +0 -69
- data/ext/v8/v8_standalone.h +0 -31
- data/ext/v8/v8_str.cpp +0 -17
- data/ext/v8/v8_str.h +0 -9
- data/ext/v8/v8_template.cpp +0 -53
- data/ext/v8/v8_template.h +0 -13
- data/lib/v8/to.rb +0 -33
- data/lib/v8/v8.so +0 -0
- data/script/console +0 -10
- data/script/destroy +0 -14
- data/script/generate +0 -14
- data/spec/ext/cxt_spec.rb +0 -25
- data/spec/ext/obj_spec.rb +0 -13
- data/spec/redjs/jsapi_spec.rb +0 -405
- data/spec/redjs/tap.rb +0 -8
- data/spec/redjs_helper.rb +0 -3
- data/spec/spec.opts +0 -1
- data/spec/v8/to_spec.rb +0 -15
- data/tasks/rspec.rake +0 -21
data/ext/v8/object.cc
ADDED
@@ -0,0 +1,334 @@
|
|
1
|
+
#include "rr.h"
|
2
|
+
|
3
|
+
namespace rr {
|
4
|
+
|
5
|
+
void Object::Init() {
|
6
|
+
ClassBuilder("Object", Value::Class).
|
7
|
+
defineSingletonMethod("New", &New).
|
8
|
+
defineMethod("Set", &Set).
|
9
|
+
defineMethod("ForceSet", &ForceSet).
|
10
|
+
defineMethod("Get", &Get).
|
11
|
+
defineMethod("GetPropertyAttributes", &GetPropertyAttributes).
|
12
|
+
defineMethod("Has", &Has).
|
13
|
+
defineMethod("Delete", &Delete).
|
14
|
+
defineMethod("ForceDelete", &ForceDelete).
|
15
|
+
defineMethod("SetAccessor", &SetAccessor).
|
16
|
+
defineMethod("GetPropertyNames", &GetPropertyNames).
|
17
|
+
defineMethod("GetOwnPropertyNames", &GetOwnPropertyNames).
|
18
|
+
defineMethod("GetPrototype", &GetPrototype).
|
19
|
+
defineMethod("SetPrototype", &SetPrototype).
|
20
|
+
defineMethod("FindInstanceInPrototypeChain", &FindInstanceInPrototypeChain).
|
21
|
+
defineMethod("ObjectProtoToString", &ObjectProtoToString).
|
22
|
+
defineMethod("GetConstructorName", &GetConstructorName).
|
23
|
+
defineMethod("InternalFieldCount", &InternalFieldCount).
|
24
|
+
defineMethod("GetInternalField", &GetInternalField).
|
25
|
+
defineMethod("SetInternalField", &SetInternalField).
|
26
|
+
defineMethod("HasOwnProperty", &HasOwnProperty).
|
27
|
+
defineMethod("HasRealNamedProperty", &HasRealNamedProperty).
|
28
|
+
defineMethod("HasRealIndexedProperty", &HasRealIndexedProperty).
|
29
|
+
defineMethod("HasRealNamedCallbackProperty", &HasRealNamedCallbackProperty).
|
30
|
+
defineMethod("GetRealNamedPropertyInPrototypeChain", &GetRealNamedPropertyInPrototypeChain).
|
31
|
+
defineMethod("GetRealNamedProperty", &GetRealNamedProperty).
|
32
|
+
defineMethod("HasNamedLookupInterceptor", &HasNamedLookupInterceptor).
|
33
|
+
defineMethod("HasIndexedLookupInterceptor", &HasIndexedLookupInterceptor).
|
34
|
+
defineMethod("TurnOnAccessCheck", &TurnOnAccessCheck).
|
35
|
+
defineMethod("GetIdentityHash", &GetIdentityHash).
|
36
|
+
defineMethod("SetHiddenValue", &SetHiddenValue).
|
37
|
+
defineMethod("GetHiddenValue", &GetHiddenValue).
|
38
|
+
defineMethod("DeleteHiddenValue", &DeleteHiddenValue).
|
39
|
+
defineMethod("IsDirty", &IsDirty).
|
40
|
+
defineMethod("Clone", &Clone).
|
41
|
+
defineMethod("CreationContext", &CreationContext).
|
42
|
+
defineMethod("SetIndexedPropertiesToPixelData", &SetIndexedPropertiesToPixelData).
|
43
|
+
defineMethod("GetIndexedPropertiesPixelData", &GetIndexedPropertiesPixelData).
|
44
|
+
defineMethod("HasIndexedPropertiesToPixelData", &HasIndexedPropertiesInPixelData).
|
45
|
+
defineMethod("GetIndexedPropertiesPixelDataLength", &GetIndexedPropertiesPixelDataLength).
|
46
|
+
defineMethod("SetIndexedPropertiesToExternalArrayData", &SetIndexedPropertiesToExternalArrayData).
|
47
|
+
defineMethod("HasIndexedPropertiesInExternalArrayData", &HasIndexedPropertiesInExternalArrayData).
|
48
|
+
defineMethod("GetIndexedPropertiesExternalArrayData", &GetIndexedPropertiesExternalArrayData).
|
49
|
+
defineMethod("GetIndexedPropertiesExternalArrayDataType", &GetIndexedPropertiesExternalArrayDataType).
|
50
|
+
defineMethod("GetIndexedPropertiesExternalArrayDataLength", &GetIndexedPropertiesExternalArrayDataLength).
|
51
|
+
defineMethod("IsCallable", &IsCallable).
|
52
|
+
defineMethod("CallAsFunction", &CallAsFunction).
|
53
|
+
defineMethod("CallAsConstructor", &CallAsConstructor).
|
54
|
+
store(&Class);
|
55
|
+
ClassBuilder("PropertyAttribute").
|
56
|
+
defineEnumConst("None", v8::None).
|
57
|
+
defineEnumConst("ReadOnly", v8::ReadOnly).
|
58
|
+
defineEnumConst("DontEnum", v8::DontEnum).
|
59
|
+
defineEnumConst("DontDelete", v8::DontDelete);
|
60
|
+
ClassBuilder("AccessControl").
|
61
|
+
defineEnumConst("DEFAULT", v8::DEFAULT).
|
62
|
+
defineEnumConst("ALL_CAN_READ", v8::ALL_CAN_READ).
|
63
|
+
defineEnumConst("ALL_CAN_WRITE", v8::ALL_CAN_WRITE).
|
64
|
+
defineEnumConst("PROHIBITS_OVERWRITING", v8::PROHIBITS_OVERWRITING);
|
65
|
+
}
|
66
|
+
|
67
|
+
|
68
|
+
VALUE Object::New(VALUE self) {
|
69
|
+
return Object(v8::Object::New());
|
70
|
+
}
|
71
|
+
|
72
|
+
//TODO: Allow setting of property attributes
|
73
|
+
VALUE Object::Set(VALUE self, VALUE key, VALUE value) {
|
74
|
+
if (rb_obj_is_kind_of(key, rb_cNumeric)) {
|
75
|
+
return Bool(Object(self)->Set(UInt32(key), Value(value)));
|
76
|
+
} else {
|
77
|
+
return Bool(Object(self)->Set(*Value(key), Value(value)));
|
78
|
+
}
|
79
|
+
}
|
80
|
+
|
81
|
+
VALUE Object::ForceSet(VALUE self, VALUE key, VALUE value) {
|
82
|
+
return Bool(Object(self)->ForceSet(Value(key), Value(value)));
|
83
|
+
}
|
84
|
+
|
85
|
+
VALUE Object::Get(VALUE self, VALUE key) {
|
86
|
+
if (rb_obj_is_kind_of(key, rb_cNumeric)) {
|
87
|
+
return Value(Object(self)->Get(UInt32(key)));
|
88
|
+
} else {
|
89
|
+
return Value(Object(self)->Get(*Value(key)));
|
90
|
+
}
|
91
|
+
}
|
92
|
+
|
93
|
+
VALUE Object::GetPropertyAttributes(VALUE self, VALUE key) {
|
94
|
+
return PropertyAttribute(Object(self)->GetPropertyAttributes(Value(key)));
|
95
|
+
}
|
96
|
+
|
97
|
+
VALUE Object::Has(VALUE self, VALUE key) {
|
98
|
+
Object obj(self);
|
99
|
+
if (rb_obj_is_kind_of(key, rb_cNumeric)) {
|
100
|
+
return Bool(obj->Has(UInt32(key)));
|
101
|
+
} else {
|
102
|
+
return Bool(obj->Has(*String(key)));
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
106
|
+
VALUE Object::Delete(VALUE self, VALUE key) {
|
107
|
+
Object obj(self);
|
108
|
+
if (rb_obj_is_kind_of(key, rb_cNumeric)) {
|
109
|
+
return Bool(obj->Delete(UInt32(key)));
|
110
|
+
} else {
|
111
|
+
return Bool(obj->Delete(*String(key)));
|
112
|
+
}
|
113
|
+
}
|
114
|
+
|
115
|
+
VALUE Object::ForceDelete(VALUE self, VALUE key) {
|
116
|
+
return Bool(Object(self)->ForceDelete(Value(key)));
|
117
|
+
}
|
118
|
+
|
119
|
+
|
120
|
+
VALUE Object::SetAccessor(int argc, VALUE* argv, VALUE self) {
|
121
|
+
VALUE name; VALUE get; VALUE set; VALUE data; VALUE settings; VALUE attribs;
|
122
|
+
rb_scan_args(argc, argv, "24", &name, &get, &set, &data, &settings, &attribs);
|
123
|
+
Accessor access(get, set, data);
|
124
|
+
return Bool(Object(self)->SetAccessor(
|
125
|
+
String(name),
|
126
|
+
access.accessorGetter(),
|
127
|
+
access.accessorSetter(),
|
128
|
+
access,
|
129
|
+
AccessControl(settings),
|
130
|
+
PropertyAttribute(attribs))
|
131
|
+
);
|
132
|
+
}
|
133
|
+
|
134
|
+
Object::operator VALUE() {
|
135
|
+
if (handle.IsEmpty()) {
|
136
|
+
return Qnil;
|
137
|
+
}
|
138
|
+
Backref* backref;
|
139
|
+
v8::Local<v8::String> key(v8::String::NewSymbol("rr::Backref"));
|
140
|
+
v8::Local<v8::Value> external = handle->GetHiddenValue(key);
|
141
|
+
VALUE value;
|
142
|
+
if (external.IsEmpty()) {
|
143
|
+
value = downcast();
|
144
|
+
backref = new Backref(value);
|
145
|
+
handle->SetHiddenValue(key, backref->toExternal());
|
146
|
+
} else {
|
147
|
+
backref = (Backref*)v8::External::Unwrap(external);
|
148
|
+
value = backref->get();
|
149
|
+
if (!RTEST(value)) {
|
150
|
+
value = downcast();
|
151
|
+
backref->set(value);
|
152
|
+
}
|
153
|
+
}
|
154
|
+
return value;
|
155
|
+
}
|
156
|
+
|
157
|
+
VALUE Object::downcast() {
|
158
|
+
if (handle->IsFunction()) {
|
159
|
+
return Function((v8::Handle<v8::Function>) v8::Function::Cast(*handle));
|
160
|
+
}
|
161
|
+
if (handle->IsArray()) {
|
162
|
+
return Array((v8::Handle<v8::Array>)v8::Array::Cast(*handle));
|
163
|
+
}
|
164
|
+
if (handle->IsDate()) {
|
165
|
+
// return Date(handle);
|
166
|
+
}
|
167
|
+
if (handle->IsBooleanObject()) {
|
168
|
+
// return BooleanObject(handle);
|
169
|
+
}
|
170
|
+
if (handle->IsNumberObject()) {
|
171
|
+
// return NumberObject(handle);
|
172
|
+
}
|
173
|
+
if (handle->IsStringObject()) {
|
174
|
+
// return StringObject(handle);
|
175
|
+
}
|
176
|
+
if (handle->IsRegExp()) {
|
177
|
+
// return RegExp(handle);
|
178
|
+
}
|
179
|
+
return Ref<v8::Object>::operator VALUE();
|
180
|
+
}
|
181
|
+
|
182
|
+
VALUE Object::GetPropertyNames(VALUE self) {
|
183
|
+
return Array(Object(self)->GetPropertyNames());
|
184
|
+
}
|
185
|
+
|
186
|
+
VALUE Object::GetOwnPropertyNames(VALUE self) {
|
187
|
+
return Array(Object(self)->GetOwnPropertyNames());
|
188
|
+
}
|
189
|
+
|
190
|
+
VALUE Object::GetPrototype(VALUE self) {
|
191
|
+
return Value(Object(self)->GetPrototype());
|
192
|
+
}
|
193
|
+
|
194
|
+
VALUE Object::SetPrototype(VALUE self, VALUE prototype) {
|
195
|
+
return Bool(Object(self)->SetPrototype(Value(prototype)));
|
196
|
+
}
|
197
|
+
|
198
|
+
VALUE Object::FindInstanceInPrototypeChain(VALUE self, VALUE impl) {
|
199
|
+
return Object(Object(self)->FindInstanceInPrototypeChain(FunctionTemplate(impl)));
|
200
|
+
}
|
201
|
+
|
202
|
+
VALUE Object::ObjectProtoToString(VALUE self) {
|
203
|
+
return String(Object(self)->ObjectProtoToString());
|
204
|
+
}
|
205
|
+
|
206
|
+
VALUE Object::GetConstructorName(VALUE self) {
|
207
|
+
return String(Object(self)->GetConstructorName());
|
208
|
+
}
|
209
|
+
|
210
|
+
VALUE Object::InternalFieldCount(VALUE self) {
|
211
|
+
return INT2FIX(Object(self)->InternalFieldCount());
|
212
|
+
}
|
213
|
+
|
214
|
+
VALUE Object::GetInternalField(VALUE self, VALUE idx) {
|
215
|
+
return Value(Object(self)->GetInternalField(NUM2INT(idx)));
|
216
|
+
}
|
217
|
+
|
218
|
+
VALUE Object::SetInternalField(VALUE self, VALUE idx, VALUE value) {
|
219
|
+
Void(Object(self)->SetInternalField(NUM2INT(idx), Value(value)));
|
220
|
+
}
|
221
|
+
|
222
|
+
VALUE Object::HasOwnProperty(VALUE self, VALUE key) {
|
223
|
+
return Bool(Object(self)->HasOwnProperty(String(key)));
|
224
|
+
}
|
225
|
+
|
226
|
+
VALUE Object::HasRealNamedProperty(VALUE self, VALUE key) {
|
227
|
+
return Bool(Object(self)->HasRealNamedProperty(String(key)));
|
228
|
+
}
|
229
|
+
|
230
|
+
VALUE Object::HasRealIndexedProperty(VALUE self, VALUE idx) {
|
231
|
+
return Bool(Object(self)->HasRealIndexedProperty(UInt32(idx)));
|
232
|
+
}
|
233
|
+
|
234
|
+
VALUE Object::HasRealNamedCallbackProperty(VALUE self, VALUE key) {
|
235
|
+
return Bool(Object(self)->HasRealNamedCallbackProperty(String(key)));
|
236
|
+
}
|
237
|
+
|
238
|
+
VALUE Object::GetRealNamedPropertyInPrototypeChain(VALUE self, VALUE key) {
|
239
|
+
return Value(Object(self)->GetRealNamedPropertyInPrototypeChain(String(key)));
|
240
|
+
}
|
241
|
+
|
242
|
+
VALUE Object::GetRealNamedProperty(VALUE self, VALUE key) {
|
243
|
+
return Value(Object(self)->GetRealNamedProperty(String(key)));
|
244
|
+
}
|
245
|
+
|
246
|
+
VALUE Object::HasNamedLookupInterceptor(VALUE self) {
|
247
|
+
return Bool(Object(self)->HasNamedLookupInterceptor());
|
248
|
+
}
|
249
|
+
|
250
|
+
VALUE Object::HasIndexedLookupInterceptor(VALUE self) {
|
251
|
+
return Bool(Object(self)->HasIndexedLookupInterceptor());
|
252
|
+
}
|
253
|
+
|
254
|
+
VALUE Object::TurnOnAccessCheck(VALUE self) {
|
255
|
+
Void(Object(self)->TurnOnAccessCheck());
|
256
|
+
}
|
257
|
+
|
258
|
+
VALUE Object::GetIdentityHash(VALUE self) {
|
259
|
+
return INT2FIX(Object(self)->GetIdentityHash());
|
260
|
+
}
|
261
|
+
|
262
|
+
VALUE Object::SetHiddenValue(VALUE self, VALUE key, VALUE value) {
|
263
|
+
return Bool(Object(self)->SetHiddenValue(String(key), Value(value)));
|
264
|
+
}
|
265
|
+
|
266
|
+
VALUE Object::GetHiddenValue(VALUE self, VALUE key) {
|
267
|
+
return Value(Object(self)->GetHiddenValue(String(key)));
|
268
|
+
}
|
269
|
+
|
270
|
+
VALUE Object::DeleteHiddenValue(VALUE self, VALUE key) {
|
271
|
+
return Bool(Object(self)->DeleteHiddenValue(String(key)));
|
272
|
+
}
|
273
|
+
|
274
|
+
VALUE Object::IsDirty(VALUE self) {
|
275
|
+
return Bool(Object(self)->IsDirty());
|
276
|
+
}
|
277
|
+
|
278
|
+
VALUE Object::Clone(VALUE self) {
|
279
|
+
return Object(Object(self)->Clone());
|
280
|
+
}
|
281
|
+
|
282
|
+
VALUE Object::CreationContext(VALUE self) {
|
283
|
+
return Context(Object(self)->CreationContext());
|
284
|
+
}
|
285
|
+
|
286
|
+
VALUE Object::SetIndexedPropertiesToPixelData(VALUE self, VALUE data, VALUE length) {
|
287
|
+
return not_implemented("SetIndexedPropertiesToPixelData");
|
288
|
+
}
|
289
|
+
|
290
|
+
VALUE Object::GetIndexedPropertiesPixelData(VALUE self) {
|
291
|
+
return not_implemented("GetIndexedPropertiesPixelData");
|
292
|
+
}
|
293
|
+
|
294
|
+
VALUE Object::HasIndexedPropertiesInPixelData(VALUE self) {
|
295
|
+
return Bool(Object(self)->HasIndexedPropertiesInPixelData());
|
296
|
+
}
|
297
|
+
|
298
|
+
VALUE Object::GetIndexedPropertiesPixelDataLength(VALUE self) {
|
299
|
+
return INT2FIX(Object(self)->GetIndexedPropertiesPixelDataLength());
|
300
|
+
}
|
301
|
+
|
302
|
+
VALUE Object::SetIndexedPropertiesToExternalArrayData(VALUE self) {
|
303
|
+
return not_implemented("SetIndexedPropertiesToExternalArrayData");
|
304
|
+
}
|
305
|
+
|
306
|
+
VALUE Object::HasIndexedPropertiesInExternalArrayData(VALUE self) {
|
307
|
+
return Bool(Object(self)->HasIndexedPropertiesInExternalArrayData());
|
308
|
+
}
|
309
|
+
|
310
|
+
VALUE Object::GetIndexedPropertiesExternalArrayData(VALUE self) {
|
311
|
+
return not_implemented("GetIndexedPropertiesExternalArrayData");
|
312
|
+
}
|
313
|
+
|
314
|
+
VALUE Object::GetIndexedPropertiesExternalArrayDataType(VALUE self) {
|
315
|
+
return not_implemented("GetIndexedPropertiesExternalArrayDataType");
|
316
|
+
}
|
317
|
+
|
318
|
+
VALUE Object::GetIndexedPropertiesExternalArrayDataLength(VALUE self) {
|
319
|
+
return INT2FIX(Object(self)->GetIndexedPropertiesExternalArrayDataLength());
|
320
|
+
}
|
321
|
+
|
322
|
+
VALUE Object::IsCallable(VALUE self) {
|
323
|
+
return Bool(Object(self)->IsCallable());
|
324
|
+
}
|
325
|
+
|
326
|
+
VALUE Object::CallAsFunction(VALUE self, VALUE recv, VALUE argv) {
|
327
|
+
return Value(Object(self)->CallAsFunction(Object(recv), RARRAY_LENINT(argv), Value::array<Value>(argv)));
|
328
|
+
}
|
329
|
+
|
330
|
+
VALUE Object::CallAsConstructor(VALUE self, VALUE argv) {
|
331
|
+
return Value(Object(self)->CallAsConstructor(RARRAY_LENINT(argv), Value::array<Value>(argv)));
|
332
|
+
}
|
333
|
+
|
334
|
+
}
|
data/ext/v8/primitive.cc
ADDED
data/ext/v8/rr.cc
ADDED
@@ -0,0 +1,83 @@
|
|
1
|
+
#include "rr.h"
|
2
|
+
|
3
|
+
namespace rr {
|
4
|
+
VALUE defineClass(const char *name, VALUE superclass = rb_cObject) {
|
5
|
+
VALUE V8 = rb_define_module("V8");
|
6
|
+
VALUE V8_C = rb_define_module_under(V8, "C");
|
7
|
+
VALUE klass = rb_define_class_under(V8_C, name, superclass);
|
8
|
+
rb_funcall(klass, rb_intern("private_class_method"), 1, rb_str_new2("new"));
|
9
|
+
return klass;
|
10
|
+
}
|
11
|
+
|
12
|
+
VALUE defineModule(const char *name) {
|
13
|
+
VALUE V8 = rb_define_module("V8");
|
14
|
+
VALUE V8_C = rb_define_module_under(V8, "C");
|
15
|
+
return rb_define_module_under(V8_C, name);
|
16
|
+
}
|
17
|
+
|
18
|
+
VALUE not_implemented(const char* message) {
|
19
|
+
Void(rb_raise(rb_eStandardError, "not yet implemented %s", message));
|
20
|
+
}
|
21
|
+
|
22
|
+
ClassBuilder::ClassBuilder(const char* name, VALUE superclass) {
|
23
|
+
this->value = defineClass(name, superclass);
|
24
|
+
}
|
25
|
+
|
26
|
+
ClassBuilder::ClassBuilder(const char* name, const char* supername) {
|
27
|
+
VALUE superclass = defineClass(supername);
|
28
|
+
this->value = defineClass(name, superclass);
|
29
|
+
}
|
30
|
+
ClassBuilder& ClassBuilder::defineConst(const char* name, VALUE value) {
|
31
|
+
rb_define_const(this->value, name, value);
|
32
|
+
return *this;
|
33
|
+
}
|
34
|
+
ClassBuilder& ClassBuilder::defineMethod(const char* name, VALUE (*impl)(int, VALUE*, VALUE)) {
|
35
|
+
rb_define_method(this->value, name, (VALUE (*)(...))impl, -1);
|
36
|
+
return *this;
|
37
|
+
}
|
38
|
+
ClassBuilder& ClassBuilder::defineMethod(const char* name, VALUE (*impl)(VALUE)) {
|
39
|
+
rb_define_method(this->value, name, (VALUE (*)(...))impl, 0);
|
40
|
+
return *this;
|
41
|
+
}
|
42
|
+
ClassBuilder& ClassBuilder::defineMethod(const char* name, VALUE (*impl)(VALUE, VALUE)) {
|
43
|
+
rb_define_method(this->value, name, (VALUE (*)(...))impl, 1);
|
44
|
+
return *this;
|
45
|
+
}
|
46
|
+
ClassBuilder& ClassBuilder::defineMethod(const char* name, VALUE (*impl)(VALUE, VALUE, VALUE)) {
|
47
|
+
rb_define_method(this->value, name, (VALUE (*)(...))impl, 2);
|
48
|
+
return *this;
|
49
|
+
}
|
50
|
+
ClassBuilder& ClassBuilder::defineMethod(const char* name, VALUE (*impl)(VALUE, VALUE, VALUE, VALUE)) {
|
51
|
+
rb_define_method(this->value, name, (VALUE (*)(...))impl, 3);
|
52
|
+
return *this;
|
53
|
+
}
|
54
|
+
ClassBuilder& ClassBuilder::defineSingletonMethod(const char* name, VALUE (*impl)(int, VALUE*, VALUE)) {
|
55
|
+
rb_define_singleton_method(this->value, name, (VALUE (*)(...))impl, -1);
|
56
|
+
return *this;
|
57
|
+
}
|
58
|
+
ClassBuilder& ClassBuilder::defineSingletonMethod(const char* name, VALUE (*impl)(VALUE)) {
|
59
|
+
rb_define_singleton_method(this->value, name, (VALUE (*)(...))impl, 0);
|
60
|
+
return *this;
|
61
|
+
}
|
62
|
+
ClassBuilder& ClassBuilder::defineSingletonMethod(const char* name, VALUE (*impl)(VALUE, VALUE)) {
|
63
|
+
rb_define_singleton_method(this->value, name, (VALUE (*)(...))impl, 1);
|
64
|
+
return *this;
|
65
|
+
}
|
66
|
+
ClassBuilder& ClassBuilder::defineSingletonMethod(const char* name, VALUE (*impl)(VALUE, VALUE, VALUE)) {
|
67
|
+
rb_define_singleton_method(this->value, name, (VALUE (*)(...))impl, 2);
|
68
|
+
return *this;
|
69
|
+
}
|
70
|
+
ClassBuilder& ClassBuilder::defineSingletonMethod(const char* name, VALUE (*impl)(VALUE, VALUE, VALUE, VALUE)) {
|
71
|
+
rb_define_singleton_method(this->value, name, (VALUE (*)(...))impl, 3);
|
72
|
+
return *this;
|
73
|
+
}
|
74
|
+
ClassBuilder& ClassBuilder::defineEnumConst(const char* name, int value) {
|
75
|
+
rb_define_const(this->value, name, INT2FIX(value));
|
76
|
+
return *this;
|
77
|
+
}
|
78
|
+
ClassBuilder& ClassBuilder::store(VALUE* storage) {
|
79
|
+
rb_gc_register_address(storage);
|
80
|
+
*storage = this->value;
|
81
|
+
return *this;
|
82
|
+
}
|
83
|
+
}
|
data/ext/v8/rr.h
ADDED
@@ -0,0 +1,883 @@
|
|
1
|
+
#ifndef THE_RUBY_RACER
|
2
|
+
#define THE_RUBY_RACER
|
3
|
+
|
4
|
+
#include <v8.h>
|
5
|
+
#include <ruby.h>
|
6
|
+
#include <vector>
|
7
|
+
#ifdef HAVE_RUBY_ENCODING_H
|
8
|
+
#include "ruby/encoding.h"
|
9
|
+
#endif
|
10
|
+
|
11
|
+
#if !defined(RARRAY_LENINT)
|
12
|
+
# define RARRAY_LENINT(v) (int)RARRAY_LEN(v)
|
13
|
+
#endif /* ! defined(RARRAY_LENINT) */
|
14
|
+
|
15
|
+
#if !defined(SIZET2NUM)
|
16
|
+
# if SIZEOF_SIZE_T == SIZEOF_LONG
|
17
|
+
# define SIZET2NUM(n) ULONG2NUM(n)
|
18
|
+
# else
|
19
|
+
# define SIZET2NUM(n) ULL2NUM(n)
|
20
|
+
# endif
|
21
|
+
#endif /* ! defined(SIZET2NUM) */
|
22
|
+
|
23
|
+
#if !defined(NUM2SIZET)
|
24
|
+
# if SIZEOF_SIZE_T == SIZEOF_LONG
|
25
|
+
# define NUM2SIZET(n) ((size_t)NUM2ULONG(n))
|
26
|
+
# else
|
27
|
+
# define NUM2SIZET(n) ((size_t)NUM2ULL(n))
|
28
|
+
# endif
|
29
|
+
#endif /* ! defined(NUM2SIZET) */
|
30
|
+
|
31
|
+
namespace rr {
|
32
|
+
|
33
|
+
#define Void(expr) expr; return Qnil;
|
34
|
+
VALUE not_implemented(const char* message);
|
35
|
+
|
36
|
+
class Equiv {
|
37
|
+
public:
|
38
|
+
Equiv(VALUE val) : value(val) {}
|
39
|
+
inline operator VALUE() {return value;}
|
40
|
+
protected:
|
41
|
+
VALUE value;
|
42
|
+
};
|
43
|
+
|
44
|
+
class Bool : public Equiv {
|
45
|
+
public:
|
46
|
+
Bool(VALUE val) : Equiv(val) {}
|
47
|
+
Bool(bool b) : Equiv(b ? Qtrue : Qfalse) {}
|
48
|
+
Bool(v8::Handle<v8::Boolean> b) : Equiv(b->Value() ? Qtrue : Qfalse) {}
|
49
|
+
inline operator bool() {return RTEST(value);}
|
50
|
+
};
|
51
|
+
|
52
|
+
class UInt32 : public Equiv {
|
53
|
+
public:
|
54
|
+
UInt32(VALUE val) : Equiv(val) {}
|
55
|
+
UInt32(uint32_t ui) : Equiv(UINT2NUM(ui)) {}
|
56
|
+
inline operator uint32_t() {return RTEST(value) ? NUM2UINT(value) : 0;}
|
57
|
+
};
|
58
|
+
|
59
|
+
class GC {
|
60
|
+
public:
|
61
|
+
class Queue {
|
62
|
+
public:
|
63
|
+
Queue();
|
64
|
+
void Enqueue(void* phantom);
|
65
|
+
void* Dequeue();
|
66
|
+
private:
|
67
|
+
struct Node {
|
68
|
+
Node(void* val ) : value(val), next(NULL) { }
|
69
|
+
void* value;
|
70
|
+
Node* next;
|
71
|
+
};
|
72
|
+
Node* first; // for producer only
|
73
|
+
Node* divider;
|
74
|
+
Node* last;
|
75
|
+
};
|
76
|
+
static void Finalize(void* phantom);
|
77
|
+
static void Drain(v8::GCType type, v8::GCCallbackFlags flags);
|
78
|
+
static void Init();
|
79
|
+
};
|
80
|
+
|
81
|
+
/**
|
82
|
+
* A V8 Enum
|
83
|
+
*/
|
84
|
+
|
85
|
+
template <class T> class Enum : public Equiv {
|
86
|
+
public:
|
87
|
+
Enum<T>(VALUE value, T defaultValue = 0) : Equiv(value) {
|
88
|
+
this->defaultValue = defaultValue;
|
89
|
+
}
|
90
|
+
inline operator T() {
|
91
|
+
return (T)(RTEST(value) ? NUM2INT(value) : defaultValue);
|
92
|
+
}
|
93
|
+
private:
|
94
|
+
T defaultValue;
|
95
|
+
};
|
96
|
+
|
97
|
+
/**
|
98
|
+
* A pointer to V8 object managed by Ruby
|
99
|
+
*/
|
100
|
+
|
101
|
+
template <class T> class Pointer {
|
102
|
+
public:
|
103
|
+
inline Pointer(T* t) : pointer(t) {};
|
104
|
+
inline Pointer(VALUE v) {
|
105
|
+
if (RTEST(v)) {
|
106
|
+
this->unwrap(v);
|
107
|
+
} else {
|
108
|
+
this->pointer = NULL;
|
109
|
+
}
|
110
|
+
};
|
111
|
+
inline operator T*() {return pointer;}
|
112
|
+
inline T* operator ->() {return pointer;}
|
113
|
+
inline operator VALUE() {
|
114
|
+
return Data_Wrap_Struct(Class, 0, &release, pointer);
|
115
|
+
}
|
116
|
+
void unwrap(VALUE value);
|
117
|
+
static void release(T* pointer) {
|
118
|
+
delete pointer;
|
119
|
+
}
|
120
|
+
static VALUE Class;
|
121
|
+
protected:
|
122
|
+
T* pointer;
|
123
|
+
};
|
124
|
+
template <class T> VALUE Pointer<T>::Class;
|
125
|
+
|
126
|
+
/**
|
127
|
+
* A Reference to a V8 managed object
|
128
|
+
*/
|
129
|
+
template <class T> class Ref {
|
130
|
+
public:
|
131
|
+
Ref(VALUE value) {
|
132
|
+
this->value = value;
|
133
|
+
}
|
134
|
+
Ref(v8::Handle<T> handle, const char* label = "v8::Handle<void>") {
|
135
|
+
this->handle = handle;
|
136
|
+
}
|
137
|
+
virtual ~Ref() {}
|
138
|
+
virtual operator VALUE() const {
|
139
|
+
return handle.IsEmpty() ? Qnil : (new Holder(handle, Class))->value;
|
140
|
+
}
|
141
|
+
virtual operator v8::Handle<T>() const {
|
142
|
+
if (RTEST(this->value)) {
|
143
|
+
Holder* holder = NULL;
|
144
|
+
Data_Get_Struct(this->value, class Holder, holder);
|
145
|
+
return holder->handle;
|
146
|
+
} else {
|
147
|
+
return v8::Handle<T>();
|
148
|
+
}
|
149
|
+
}
|
150
|
+
void dispose() {
|
151
|
+
Holder* holder = NULL;
|
152
|
+
Data_Get_Struct(this->value, class Holder, holder);
|
153
|
+
holder->dispose();
|
154
|
+
}
|
155
|
+
|
156
|
+
inline v8::Handle<T> operator->() const { return *this;}
|
157
|
+
inline v8::Handle<T> operator*() const {return *this;}
|
158
|
+
|
159
|
+
template <class C> class array {
|
160
|
+
public:
|
161
|
+
inline array(VALUE ary) : argv(ary), vector(RARRAY_LENINT(argv)) {}
|
162
|
+
inline operator v8::Handle<T>*() {
|
163
|
+
for (uint32_t i = 0; i < vector.size(); i++) {
|
164
|
+
vector[i] = C(rb_ary_entry(argv, i));
|
165
|
+
}
|
166
|
+
return &vector[0];
|
167
|
+
}
|
168
|
+
private:
|
169
|
+
VALUE argv;
|
170
|
+
std::vector< v8::Handle<T> > vector;
|
171
|
+
};
|
172
|
+
|
173
|
+
class Holder {
|
174
|
+
friend class Ref;
|
175
|
+
public:
|
176
|
+
Holder(v8::Handle<T> handle, VALUE klass) {
|
177
|
+
this->disposed_p = false;
|
178
|
+
this->handle = v8::Persistent<T>::New(handle);
|
179
|
+
this->value = Data_Wrap_Struct(klass, 0, &enqueue, this);
|
180
|
+
}
|
181
|
+
virtual ~Holder() {
|
182
|
+
this->dispose();
|
183
|
+
}
|
184
|
+
void dispose() {
|
185
|
+
if (!this->disposed_p) {
|
186
|
+
handle.Dispose();
|
187
|
+
this->disposed_p = true;
|
188
|
+
}
|
189
|
+
}
|
190
|
+
protected:
|
191
|
+
VALUE value;
|
192
|
+
v8::Persistent<T> handle;
|
193
|
+
bool disposed_p;
|
194
|
+
|
195
|
+
static void enqueue(Holder* holder) {
|
196
|
+
holder->value = Qnil;
|
197
|
+
GC::Finalize(holder);
|
198
|
+
}
|
199
|
+
};
|
200
|
+
|
201
|
+
VALUE value;
|
202
|
+
v8::Handle<T> handle;
|
203
|
+
static VALUE Class;
|
204
|
+
};
|
205
|
+
template <class T> VALUE Ref<T>::Class;
|
206
|
+
|
207
|
+
class Backref {
|
208
|
+
public:
|
209
|
+
static void Init();
|
210
|
+
Backref(VALUE value);
|
211
|
+
virtual ~Backref();
|
212
|
+
VALUE get();
|
213
|
+
VALUE set(VALUE value);
|
214
|
+
v8::Handle<v8::Value> toExternal();
|
215
|
+
static void release(v8::Persistent<v8::Value> handle, void* data);
|
216
|
+
private:
|
217
|
+
void allocate(VALUE data);
|
218
|
+
void deallocate();
|
219
|
+
VALUE storage;
|
220
|
+
static VALUE Storage;
|
221
|
+
static ID _new;
|
222
|
+
static ID object;
|
223
|
+
};
|
224
|
+
class Handles {
|
225
|
+
public:
|
226
|
+
static void Init();
|
227
|
+
static VALUE HandleScope(int argc, VALUE* argv, VALUE self);
|
228
|
+
private:
|
229
|
+
static VALUE SetupAndCall(int* state, VALUE code);
|
230
|
+
static VALUE DoCall(VALUE code);
|
231
|
+
};
|
232
|
+
|
233
|
+
class Phantom {
|
234
|
+
public:
|
235
|
+
inline Phantom(void* reference) : holder((Ref<void>::Holder*)reference) {}
|
236
|
+
inline bool NotNull() {
|
237
|
+
return this->holder != NULL;
|
238
|
+
}
|
239
|
+
inline void destroy() {
|
240
|
+
delete holder;
|
241
|
+
}
|
242
|
+
Ref<void>::Holder* holder;
|
243
|
+
};
|
244
|
+
|
245
|
+
class ExtensionConfiguration : public Pointer<v8::ExtensionConfiguration> {
|
246
|
+
public:
|
247
|
+
static VALUE initialize(VALUE self, VALUE names);
|
248
|
+
inline ExtensionConfiguration(v8::ExtensionConfiguration* config) : Pointer<v8::ExtensionConfiguration>(config) {}
|
249
|
+
inline ExtensionConfiguration(VALUE value) : Pointer<v8::ExtensionConfiguration>(value) {}
|
250
|
+
};
|
251
|
+
|
252
|
+
class Context : public Ref<v8::Context> {
|
253
|
+
public:
|
254
|
+
static void Init();
|
255
|
+
static VALUE New(int argc, VALUE argv[], VALUE self);
|
256
|
+
static VALUE Dispose(VALUE self);
|
257
|
+
static VALUE Enter(VALUE self);
|
258
|
+
static VALUE Exit(VALUE self);
|
259
|
+
static VALUE Global(VALUE self);
|
260
|
+
static VALUE DetachGlobal(VALUE self);
|
261
|
+
static VALUE ReattachGlobal(VALUE self, VALUE global);
|
262
|
+
static VALUE GetEntered(VALUE self);
|
263
|
+
static VALUE GetCurrent(VALUE self);
|
264
|
+
static VALUE GetCalling(VALUE self);
|
265
|
+
static VALUE SetSecurityToken(VALUE self, VALUE token);
|
266
|
+
static VALUE UseDefaultSecurityToken(VALUE self);
|
267
|
+
static VALUE GetSecurityToken(VALUE self);
|
268
|
+
static VALUE HasOutOfMemoryException(VALUE self);
|
269
|
+
static VALUE InContext(VALUE self);
|
270
|
+
static VALUE SetData(VALUE self, VALUE data);
|
271
|
+
static VALUE GetData(VALUE self);
|
272
|
+
static VALUE AllowCodeGenerationFromStrings(VALUE self, VALUE allow);
|
273
|
+
static VALUE IsCodeGenerationFromStringsAllowed(VALUE self);
|
274
|
+
|
275
|
+
inline Context(VALUE value) : Ref<v8::Context>(value) {}
|
276
|
+
inline Context(v8::Handle<v8::Context> cxt) : Ref<v8::Context>(cxt) {}
|
277
|
+
};
|
278
|
+
|
279
|
+
class External: public Ref<v8::External> {
|
280
|
+
public:
|
281
|
+
static void Init();
|
282
|
+
static VALUE New(VALUE self, VALUE data);
|
283
|
+
static VALUE Value(VALUE self);
|
284
|
+
|
285
|
+
inline External(VALUE value) : Ref<v8::External>(value) {}
|
286
|
+
inline External(v8::Handle<v8::External> ext) : Ref<v8::External>(ext) {}
|
287
|
+
static v8::Handle<v8::External> wrap(VALUE data);
|
288
|
+
static VALUE unwrap(v8::Handle<v8::External> external);
|
289
|
+
private:
|
290
|
+
static void release(v8::Persistent<v8::Value> object, void* parameter);
|
291
|
+
struct Data {
|
292
|
+
Data(VALUE data);
|
293
|
+
~Data();
|
294
|
+
VALUE value;
|
295
|
+
};
|
296
|
+
};
|
297
|
+
|
298
|
+
class ScriptOrigin : public Pointer<v8::ScriptOrigin> {
|
299
|
+
public:
|
300
|
+
inline ScriptOrigin(v8::ScriptOrigin* o) : Pointer<v8::ScriptOrigin>(o) {};
|
301
|
+
inline ScriptOrigin(VALUE value) : Pointer<v8::ScriptOrigin>(value) {}
|
302
|
+
|
303
|
+
static VALUE initialize(int argc, VALUE argv[], VALUE self);
|
304
|
+
};
|
305
|
+
|
306
|
+
class ScriptData : public Pointer<v8::ScriptData> {
|
307
|
+
public:
|
308
|
+
inline ScriptData(v8::ScriptData* d) : Pointer<v8::ScriptData>(d) {};
|
309
|
+
inline ScriptData(VALUE value) : Pointer<v8::ScriptData>(value) {}
|
310
|
+
|
311
|
+
static VALUE PreCompile(VALUE self, VALUE input, VALUE length);
|
312
|
+
static VALUE New(VALUE self, VALUE data, VALUE length);
|
313
|
+
static VALUE Length(VALUE self);
|
314
|
+
static VALUE Data(VALUE self);
|
315
|
+
static VALUE HasError(VALUE self);
|
316
|
+
};
|
317
|
+
|
318
|
+
class Script : public Ref<v8::Script> {
|
319
|
+
public:
|
320
|
+
static void Init();
|
321
|
+
static VALUE New(int argc, VALUE argv[], VALUE self);
|
322
|
+
static VALUE Run(VALUE self);
|
323
|
+
|
324
|
+
inline Script(VALUE value) : Ref<v8::Script>(value) {}
|
325
|
+
inline Script(v8::Handle<v8::Script> script) : Ref<v8::Script>(script) {}
|
326
|
+
};
|
327
|
+
|
328
|
+
class Value : public Ref<v8::Value> {
|
329
|
+
public:
|
330
|
+
static void Init();
|
331
|
+
static VALUE IsUndefined(VALUE self);
|
332
|
+
static VALUE IsNull(VALUE self);
|
333
|
+
static VALUE IsTrue(VALUE self);
|
334
|
+
static VALUE IsFalse(VALUE self);
|
335
|
+
static VALUE IsString(VALUE self);
|
336
|
+
static VALUE IsFunction(VALUE self);
|
337
|
+
static VALUE IsArray(VALUE self);
|
338
|
+
static VALUE IsObject(VALUE self);
|
339
|
+
static VALUE IsBoolean(VALUE self);
|
340
|
+
static VALUE IsNumber(VALUE self);
|
341
|
+
static VALUE IsExternal(VALUE self);
|
342
|
+
static VALUE IsInt32(VALUE self);
|
343
|
+
static VALUE IsUint32(VALUE self);
|
344
|
+
static VALUE IsDate(VALUE self);
|
345
|
+
static VALUE IsBooleanObject(VALUE self);
|
346
|
+
static VALUE IsNumberObject(VALUE self);
|
347
|
+
static VALUE IsStringObject(VALUE self);
|
348
|
+
static VALUE IsNativeError(VALUE self);
|
349
|
+
static VALUE IsRegExp(VALUE self);
|
350
|
+
// VALUE ToBoolean(VALUE self);
|
351
|
+
// VALUE ToNumber(VALUE self);
|
352
|
+
static VALUE ToString(VALUE self);
|
353
|
+
static VALUE ToDetailString(VALUE self);
|
354
|
+
static VALUE ToObject(VALUE self);
|
355
|
+
// static VALUE ToInteger(VALUE self);
|
356
|
+
// static VALUE ToUint32(VALUE self);
|
357
|
+
// static VALUE ToInt32(VALUE self);
|
358
|
+
// static VALUE ToArrayIndex(VALUE self);
|
359
|
+
static VALUE BooleanValue(VALUE self);
|
360
|
+
static VALUE NumberValue(VALUE self);
|
361
|
+
static VALUE IntegerValue(VALUE self);
|
362
|
+
static VALUE Uint32Value(VALUE self);
|
363
|
+
static VALUE Int32Value(VALUE self);
|
364
|
+
|
365
|
+
static VALUE Equals(VALUE self, VALUE other);
|
366
|
+
static VALUE StrictEquals(VALUE self, VALUE other);
|
367
|
+
inline Value(VALUE value) : Ref<v8::Value>(value) {}
|
368
|
+
inline Value(v8::Handle<v8::Value> value) : Ref<v8::Value>(value) {}
|
369
|
+
virtual operator VALUE();
|
370
|
+
virtual operator v8::Handle<v8::Value>() const;
|
371
|
+
static VALUE Empty;
|
372
|
+
};
|
373
|
+
|
374
|
+
class Primitive: public Ref<v8::Primitive> {
|
375
|
+
public:
|
376
|
+
static void Init();
|
377
|
+
inline Primitive(VALUE value) : Ref<v8::Primitive>(value) {}
|
378
|
+
inline Primitive(v8::Handle<v8::Primitive> primitive) : Ref<v8::Primitive>(primitive) {}
|
379
|
+
};
|
380
|
+
|
381
|
+
class String: public Ref<v8::String> {
|
382
|
+
public:
|
383
|
+
static void Init();
|
384
|
+
static VALUE New(VALUE self, VALUE value);
|
385
|
+
static VALUE NewSymbol(VALUE self, VALUE string);
|
386
|
+
static VALUE Utf8Value(VALUE self);
|
387
|
+
static VALUE Concat(VALUE self, VALUE left, VALUE right);
|
388
|
+
|
389
|
+
inline String(VALUE value) : Ref<v8::String>(value) {}
|
390
|
+
inline String(v8::Handle<v8::String> string) : Ref<v8::String>(string) {}
|
391
|
+
virtual operator v8::Handle<v8::String>() const;
|
392
|
+
};
|
393
|
+
|
394
|
+
class PropertyAttribute: public Enum<v8::PropertyAttribute> {
|
395
|
+
public:
|
396
|
+
inline PropertyAttribute(VALUE value) : Enum<v8::PropertyAttribute>(value, v8::None) {}
|
397
|
+
};
|
398
|
+
class AccessControl: public Enum<v8::AccessControl> {
|
399
|
+
public:
|
400
|
+
inline AccessControl(VALUE value) : Enum<v8::AccessControl>(value, v8::DEFAULT) {}
|
401
|
+
};
|
402
|
+
|
403
|
+
class Accessor {
|
404
|
+
public:
|
405
|
+
static void Init();
|
406
|
+
Accessor(VALUE get, VALUE set, VALUE data);
|
407
|
+
Accessor(VALUE get, VALUE set, VALUE query, VALUE deleter, VALUE enumerator, VALUE data);
|
408
|
+
Accessor(v8::Handle<v8::Value> value);
|
409
|
+
|
410
|
+
inline v8::AccessorGetter accessorGetter() {return &AccessorGetter;}
|
411
|
+
inline v8::AccessorSetter accessorSetter() {return RTEST(set) ? &AccessorSetter : 0;}
|
412
|
+
|
413
|
+
inline v8::NamedPropertyGetter namedPropertyGetter() {return &NamedPropertyGetter;}
|
414
|
+
inline v8::NamedPropertySetter namedPropertySetter() {return RTEST(set) ? &NamedPropertySetter : 0;}
|
415
|
+
inline v8::NamedPropertyQuery namedPropertyQuery() {return RTEST(query) ? &NamedPropertyQuery : 0;}
|
416
|
+
inline v8::NamedPropertyDeleter namedPropertyDeleter() {return RTEST(deleter) ? &NamedPropertyDeleter : 0;}
|
417
|
+
inline v8::NamedPropertyEnumerator namedPropertyEnumerator() {return RTEST(enumerator) ? &NamedPropertyEnumerator : 0;}
|
418
|
+
|
419
|
+
inline v8::IndexedPropertyGetter indexedPropertyGetter() {return &IndexedPropertyGetter;}
|
420
|
+
inline v8::IndexedPropertySetter indexedPropertySetter() {return RTEST(set) ? &IndexedPropertySetter : 0;}
|
421
|
+
inline v8::IndexedPropertyQuery indexedPropertyQuery() {return RTEST(query) ? &IndexedPropertyQuery : 0;}
|
422
|
+
inline v8::IndexedPropertyDeleter indexedPropertyDeleter() {return RTEST(deleter) ? &IndexedPropertyDeleter : 0;}
|
423
|
+
inline v8::IndexedPropertyEnumerator indexedPropertyEnumerator() {return RTEST(enumerator) ? &IndexedPropertyEnumerator : 0;}
|
424
|
+
|
425
|
+
operator v8::Handle<v8::Value>();
|
426
|
+
|
427
|
+
class Info {
|
428
|
+
public:
|
429
|
+
Info(const v8::AccessorInfo& info);
|
430
|
+
Info(VALUE value);
|
431
|
+
static VALUE This(VALUE self);
|
432
|
+
static VALUE Holder(VALUE self);
|
433
|
+
static VALUE Data(VALUE self);
|
434
|
+
operator VALUE();
|
435
|
+
inline const v8::AccessorInfo* operator->() {return this->info;}
|
436
|
+
v8::Handle<v8::Value> get(v8::Local<v8::String> property);
|
437
|
+
v8::Handle<v8::Value> set(v8::Local<v8::String> property, v8::Local<v8::Value> value);
|
438
|
+
v8::Handle<v8::Integer> query(v8::Local<v8::String> property);
|
439
|
+
v8::Handle<v8::Boolean> remove(v8::Local<v8::String> property);
|
440
|
+
v8::Handle<v8::Array> enumerateNames();
|
441
|
+
v8::Handle<v8::Value> get(uint32_t index);
|
442
|
+
v8::Handle<v8::Value> set(uint32_t index, v8::Local<v8::Value> value);
|
443
|
+
v8::Handle<v8::Integer> query(uint32_t index);
|
444
|
+
v8::Handle<v8::Boolean> remove(uint32_t index);
|
445
|
+
v8::Handle<v8::Array> enumerateIndices();
|
446
|
+
|
447
|
+
static VALUE Class;
|
448
|
+
private:
|
449
|
+
const v8::AccessorInfo* info;
|
450
|
+
};
|
451
|
+
friend class Info;
|
452
|
+
private:
|
453
|
+
static v8::Handle<v8::Value> AccessorGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info);
|
454
|
+
static void AccessorSetter(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
|
455
|
+
|
456
|
+
static v8::Handle<v8::Value> NamedPropertyGetter(v8::Local<v8::String> property, const v8::AccessorInfo& info);
|
457
|
+
static v8::Handle<v8::Value> NamedPropertySetter(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
|
458
|
+
static v8::Handle<v8::Integer> NamedPropertyQuery(v8::Local<v8::String> property, const v8::AccessorInfo& info);
|
459
|
+
static v8::Handle<v8::Boolean> NamedPropertyDeleter(v8::Local<v8::String> property, const v8::AccessorInfo& info);
|
460
|
+
static v8::Handle<v8::Array> NamedPropertyEnumerator(const v8::AccessorInfo& info);
|
461
|
+
|
462
|
+
static v8::Handle<v8::Value> IndexedPropertyGetter(uint32_t index, const v8::AccessorInfo& info);
|
463
|
+
static v8::Handle<v8::Value> IndexedPropertySetter(uint32_t index, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
|
464
|
+
static v8::Handle<v8::Integer> IndexedPropertyQuery(uint32_t index, const v8::AccessorInfo& info);
|
465
|
+
static v8::Handle<v8::Boolean> IndexedPropertyDeleter(uint32_t index, const v8::AccessorInfo& info);
|
466
|
+
static v8::Handle<v8::Array> IndexedPropertyEnumerator(const v8::AccessorInfo& info);
|
467
|
+
|
468
|
+
void wrap(v8::Handle<v8::Object> wrapper, int index, VALUE value);
|
469
|
+
VALUE unwrap(v8::Handle<v8::Object> wrapper, int index);
|
470
|
+
VALUE get;
|
471
|
+
VALUE set;
|
472
|
+
VALUE query;
|
473
|
+
VALUE deleter;
|
474
|
+
VALUE enumerator;
|
475
|
+
VALUE data;
|
476
|
+
};
|
477
|
+
|
478
|
+
class Invocation {
|
479
|
+
public:
|
480
|
+
static void Init();
|
481
|
+
Invocation(VALUE code, VALUE data);
|
482
|
+
Invocation(v8::Handle<v8::Value> wrapper);
|
483
|
+
operator v8::InvocationCallback();
|
484
|
+
operator v8::Handle<v8::Value>();
|
485
|
+
static v8::Handle<v8::Value> Callback(const v8::Arguments& args);
|
486
|
+
|
487
|
+
class Arguments {
|
488
|
+
public:
|
489
|
+
static void Init();
|
490
|
+
Arguments(const v8::Arguments& args);
|
491
|
+
Arguments(VALUE value);
|
492
|
+
inline const v8::Arguments* operator->() {return this->args;}
|
493
|
+
inline const v8::Arguments operator*() {return *this->args;}
|
494
|
+
v8::Handle<v8::Value> Call();
|
495
|
+
|
496
|
+
static VALUE Length(VALUE self);
|
497
|
+
static VALUE Get(VALUE self, VALUE index);
|
498
|
+
static VALUE Callee(VALUE self);
|
499
|
+
static VALUE This(VALUE self);
|
500
|
+
static VALUE Holder(VALUE self);
|
501
|
+
static VALUE IsConstructCall(VALUE self);
|
502
|
+
static VALUE Data(VALUE self);
|
503
|
+
private:
|
504
|
+
const v8::Arguments* args;
|
505
|
+
static VALUE Class;
|
506
|
+
};
|
507
|
+
private:
|
508
|
+
VALUE code;
|
509
|
+
VALUE data;
|
510
|
+
friend class Arguments;
|
511
|
+
};
|
512
|
+
|
513
|
+
class Object : public Ref<v8::Object> {
|
514
|
+
public:
|
515
|
+
static void Init();
|
516
|
+
static VALUE New(VALUE self);
|
517
|
+
static VALUE Set(VALUE self, VALUE key, VALUE value);
|
518
|
+
static VALUE ForceSet(VALUE self, VALUE key, VALUE value);
|
519
|
+
static VALUE Get(VALUE self, VALUE key);
|
520
|
+
static VALUE GetPropertyAttributes(VALUE self, VALUE key);
|
521
|
+
static VALUE Has(VALUE self, VALUE key);
|
522
|
+
static VALUE Delete(VALUE self, VALUE key);
|
523
|
+
static VALUE ForceDelete(VALUE self, VALUE key);
|
524
|
+
static VALUE SetAccessor(int argc, VALUE* argv, VALUE self);
|
525
|
+
static VALUE GetPropertyNames(VALUE self);
|
526
|
+
static VALUE GetOwnPropertyNames(VALUE self);
|
527
|
+
static VALUE GetPrototype(VALUE self);
|
528
|
+
static VALUE SetPrototype(VALUE self, VALUE prototype);
|
529
|
+
static VALUE FindInstanceInPrototypeChain(VALUE self, VALUE impl);
|
530
|
+
static VALUE ObjectProtoToString(VALUE self);
|
531
|
+
static VALUE GetConstructorName(VALUE self);
|
532
|
+
static VALUE InternalFieldCount(VALUE self);
|
533
|
+
static VALUE GetInternalField(VALUE self, VALUE idx);
|
534
|
+
static VALUE SetInternalField(VALUE self, VALUE idx, VALUE value);
|
535
|
+
static VALUE HasOwnProperty(VALUE self, VALUE key);
|
536
|
+
static VALUE HasRealNamedProperty(VALUE self, VALUE key);
|
537
|
+
static VALUE HasRealIndexedProperty(VALUE self, VALUE idx);
|
538
|
+
static VALUE HasRealNamedCallbackProperty(VALUE self, VALUE key);
|
539
|
+
static VALUE GetRealNamedPropertyInPrototypeChain(VALUE self, VALUE key);
|
540
|
+
static VALUE GetRealNamedProperty(VALUE self, VALUE key);
|
541
|
+
static VALUE HasNamedLookupInterceptor(VALUE self);
|
542
|
+
static VALUE HasIndexedLookupInterceptor(VALUE self);
|
543
|
+
static VALUE TurnOnAccessCheck(VALUE self);
|
544
|
+
static VALUE GetIdentityHash(VALUE self);
|
545
|
+
static VALUE SetHiddenValue(VALUE self, VALUE key, VALUE value);
|
546
|
+
static VALUE GetHiddenValue(VALUE self, VALUE key);
|
547
|
+
static VALUE DeleteHiddenValue(VALUE self, VALUE key);
|
548
|
+
static VALUE IsDirty(VALUE self);
|
549
|
+
static VALUE Clone(VALUE self);
|
550
|
+
static VALUE CreationContext(VALUE self);
|
551
|
+
static VALUE SetIndexedPropertiesToPixelData(VALUE self, VALUE data, VALUE length);
|
552
|
+
static VALUE GetIndexedPropertiesPixelData(VALUE self);
|
553
|
+
static VALUE HasIndexedPropertiesInPixelData(VALUE self);
|
554
|
+
static VALUE GetIndexedPropertiesPixelDataLength(VALUE self);
|
555
|
+
static VALUE SetIndexedPropertiesToExternalArrayData(VALUE self);
|
556
|
+
static VALUE HasIndexedPropertiesInExternalArrayData(VALUE self);
|
557
|
+
static VALUE GetIndexedPropertiesExternalArrayData(VALUE self);
|
558
|
+
static VALUE GetIndexedPropertiesExternalArrayDataType(VALUE self);
|
559
|
+
static VALUE GetIndexedPropertiesExternalArrayDataLength(VALUE self);
|
560
|
+
static VALUE IsCallable(VALUE self);
|
561
|
+
static VALUE CallAsFunction(VALUE self, VALUE recv, VALUE argv);
|
562
|
+
static VALUE CallAsConstructor(VALUE self, VALUE argv);
|
563
|
+
|
564
|
+
inline Object(VALUE value) : Ref<v8::Object>(value) {}
|
565
|
+
inline Object(v8::Handle<v8::Object> object) : Ref<v8::Object>(object) {}
|
566
|
+
virtual operator VALUE();
|
567
|
+
static VALUE toVALUE(VALUE yield, VALUE wrapper);
|
568
|
+
|
569
|
+
protected:
|
570
|
+
VALUE downcast();
|
571
|
+
};
|
572
|
+
|
573
|
+
class Array : public Ref<v8::Array> {
|
574
|
+
public:
|
575
|
+
static void Init();
|
576
|
+
static VALUE New(int argc, VALUE argv[], VALUE self);
|
577
|
+
static VALUE Length(VALUE self);
|
578
|
+
static VALUE CloneElementAt(VALUE self, VALUE index);
|
579
|
+
|
580
|
+
inline Array(v8::Handle<v8::Array> array) : Ref<v8::Array>(array) {}
|
581
|
+
inline Array(VALUE value) : Ref<v8::Array>(value) {}
|
582
|
+
};
|
583
|
+
|
584
|
+
class Function : public Ref<v8::Function> {
|
585
|
+
public:
|
586
|
+
static void Init();
|
587
|
+
static VALUE NewInstance(int argc, VALUE argv[], VALUE self);
|
588
|
+
static VALUE Call(VALUE self, VALUE receiver, VALUE argv);
|
589
|
+
static VALUE SetName(VALUE self, VALUE name);
|
590
|
+
static VALUE GetName(VALUE self);
|
591
|
+
static VALUE GetInferredName(VALUE self);
|
592
|
+
static VALUE GetScriptLineNumber(VALUE self);
|
593
|
+
static VALUE GetScriptColumnNumber(VALUE self);
|
594
|
+
static VALUE GetScriptId(VALUE self);
|
595
|
+
static VALUE GetScriptOrigin(VALUE self);
|
596
|
+
|
597
|
+
inline Function(VALUE value) : Ref<v8::Function>(value) {}
|
598
|
+
inline Function(v8::Handle<v8::Function> function) : Ref<v8::Function>(function) {}
|
599
|
+
};
|
600
|
+
|
601
|
+
class Date : public Ref<v8::Date> {
|
602
|
+
public:
|
603
|
+
static void Init();
|
604
|
+
static VALUE New(VALUE self, VALUE time);
|
605
|
+
static VALUE NumberValue(VALUE self);
|
606
|
+
|
607
|
+
inline Date(VALUE value) : Ref<v8::Date>(value) {}
|
608
|
+
inline Date(v8::Handle<v8::Date> date) : Ref<v8::Date>(date) {}
|
609
|
+
};
|
610
|
+
|
611
|
+
class Signature : public Ref<v8::Signature> {
|
612
|
+
public:
|
613
|
+
static void Init();
|
614
|
+
static VALUE New(int argc, VALUE argv[], VALUE self);
|
615
|
+
|
616
|
+
inline Signature(v8::Handle<v8::Signature> sig) : Ref<v8::Signature>(sig) {}
|
617
|
+
inline Signature(VALUE value) : Ref<v8::Signature>(value) {}
|
618
|
+
};
|
619
|
+
|
620
|
+
class Template : public Ref<v8::Template> {
|
621
|
+
public:
|
622
|
+
static void Init();
|
623
|
+
static VALUE Set(int argc, VALUE argv[], VALUE self);
|
624
|
+
inline Template(v8::Handle<v8::Template> t) : Ref<v8::Template>(t) {}
|
625
|
+
inline Template(VALUE value) : Ref<v8::Template>(value) {}
|
626
|
+
};
|
627
|
+
|
628
|
+
class ObjectTemplate : public Ref<v8::ObjectTemplate> {
|
629
|
+
public:
|
630
|
+
static void Init();
|
631
|
+
static VALUE New(VALUE self);
|
632
|
+
static VALUE NewInstance(VALUE self);
|
633
|
+
static VALUE SetAccessor(int argc, VALUE argv[], VALUE self);
|
634
|
+
static VALUE SetNamedPropertyHandler(int argc, VALUE argv[], VALUE self);
|
635
|
+
static VALUE SetIndexedPropertyHandler(int argc, VALUE argv[], VALUE self);
|
636
|
+
static VALUE SetCallAsFunctionHandler(int argc, VALUE argv[], VALUE self);
|
637
|
+
static VALUE MarkAsUndetectable(VALUE self);
|
638
|
+
static VALUE SetAccessCheckCallbacks(int argc, VALUE argv[], VALUE self);
|
639
|
+
static VALUE InternalFieldCount(VALUE self);
|
640
|
+
static VALUE SetInternalFieldCount(VALUE self, VALUE count);
|
641
|
+
|
642
|
+
inline ObjectTemplate(VALUE value) : Ref<v8::ObjectTemplate>(value) {}
|
643
|
+
inline ObjectTemplate(v8::Handle<v8::ObjectTemplate> t) : Ref<v8::ObjectTemplate>(t) {}
|
644
|
+
};
|
645
|
+
|
646
|
+
class FunctionTemplate : public Ref<v8::FunctionTemplate> {
|
647
|
+
public:
|
648
|
+
static void Init();
|
649
|
+
static VALUE New(int argc, VALUE argv[], VALUE self);
|
650
|
+
static VALUE GetFunction(VALUE self);
|
651
|
+
static VALUE SetCallHandler(int argc, VALUE argv[], VALUE self);
|
652
|
+
static VALUE InstanceTemplate(VALUE self);
|
653
|
+
static VALUE Inherit(VALUE self, VALUE parent);
|
654
|
+
static VALUE PrototypeTemplate(VALUE self);
|
655
|
+
static VALUE SetClassName(VALUE self, VALUE name);
|
656
|
+
static VALUE SetHiddenPrototype(VALUE self, VALUE value);
|
657
|
+
static VALUE ReadOnlyPrototype(VALUE self);
|
658
|
+
static VALUE HasInstance(VALUE self, VALUE object);
|
659
|
+
|
660
|
+
inline FunctionTemplate(VALUE value) : Ref<v8::FunctionTemplate>(value) {}
|
661
|
+
inline FunctionTemplate(v8::Handle<v8::FunctionTemplate> t) : Ref<v8::FunctionTemplate>(t) {}
|
662
|
+
};
|
663
|
+
|
664
|
+
class Message : public Ref<v8::Message> {
|
665
|
+
public:
|
666
|
+
static void Init();
|
667
|
+
inline Message(v8::Handle<v8::Message> message) : Ref<v8::Message>(message) {}
|
668
|
+
inline Message(VALUE value) : Ref<v8::Message>(value) {}
|
669
|
+
|
670
|
+
static VALUE Get(VALUE self);
|
671
|
+
static VALUE GetSourceLine(VALUE self);
|
672
|
+
static VALUE GetScriptResourceName(VALUE self);
|
673
|
+
static VALUE GetScriptData(VALUE self);
|
674
|
+
static VALUE GetStackTrace(VALUE self);
|
675
|
+
static VALUE GetLineNumber(VALUE self);
|
676
|
+
static VALUE GetStartPosition(VALUE self);
|
677
|
+
static VALUE GetEndPosition(VALUE self);
|
678
|
+
static VALUE GetStartColumn(VALUE self);
|
679
|
+
static VALUE GetEndColumn(VALUE self);
|
680
|
+
static inline VALUE kNoLineNumberInfo(VALUE self) {return INT2FIX(v8::Message::kNoLineNumberInfo);}
|
681
|
+
static inline VALUE kNoColumnInfo(VALUE self) {return INT2FIX(v8::Message::kNoColumnInfo);}
|
682
|
+
};
|
683
|
+
|
684
|
+
class Stack {
|
685
|
+
public:
|
686
|
+
static void Init();
|
687
|
+
|
688
|
+
class Trace : public Ref<v8::StackTrace> {
|
689
|
+
public:
|
690
|
+
class StackTraceOptions : public Enum<v8::StackTrace::StackTraceOptions> {
|
691
|
+
public:
|
692
|
+
inline StackTraceOptions(VALUE value) : Enum<v8::StackTrace::StackTraceOptions>(value, v8::StackTrace::kOverview) {}
|
693
|
+
};
|
694
|
+
public:
|
695
|
+
inline Trace(v8::Handle<v8::StackTrace> trace) : Ref<v8::StackTrace>(trace) {}
|
696
|
+
inline Trace(VALUE value) : Ref<v8::StackTrace>(value) {}
|
697
|
+
static inline VALUE kLineNumber(VALUE self) {return INT2FIX(v8::StackTrace::kLineNumber);}
|
698
|
+
static inline VALUE kColumnOffset(VALUE self) {return INT2FIX(v8::StackTrace::kColumnOffset);}
|
699
|
+
static inline VALUE kScriptName(VALUE self) {return INT2FIX(v8::StackTrace::kScriptName);}
|
700
|
+
static inline VALUE kFunctionName(VALUE self) {return INT2FIX(v8::StackTrace::kFunctionName);}
|
701
|
+
static inline VALUE kIsEval(VALUE self) {return INT2FIX(v8::StackTrace::kIsEval);}
|
702
|
+
static inline VALUE kIsConstructor(VALUE self) {return INT2FIX(v8::StackTrace::kIsConstructor);}
|
703
|
+
static inline VALUE kScriptNameOrSourceURL(VALUE self) {return INT2FIX(v8::StackTrace::kScriptNameOrSourceURL);}
|
704
|
+
static inline VALUE kOverview(VALUE self) {return INT2FIX(v8::StackTrace::kOverview);}
|
705
|
+
static inline VALUE kDetailed(VALUE self) {return INT2FIX(v8::StackTrace::kDetailed);}
|
706
|
+
|
707
|
+
static VALUE GetFrame(VALUE self, VALUE index);
|
708
|
+
static VALUE GetFrameCount(VALUE self);
|
709
|
+
static VALUE AsArray(VALUE self);
|
710
|
+
static VALUE CurrentStackTrace(int argc, VALUE argv[], VALUE self);
|
711
|
+
};
|
712
|
+
class Frame : public Ref<v8::StackFrame> {
|
713
|
+
public:
|
714
|
+
inline Frame(v8::Handle<v8::StackFrame> frame) : Ref<v8::StackFrame>(frame) {}
|
715
|
+
inline Frame(VALUE value) : Ref<v8::StackFrame>(value) {}
|
716
|
+
static VALUE GetLineNumber(VALUE self);
|
717
|
+
static VALUE GetColumn(VALUE self);
|
718
|
+
static VALUE GetScriptName(VALUE self);
|
719
|
+
static VALUE GetScriptNameOrSourceURL(VALUE self);
|
720
|
+
static VALUE GetFunctionName(VALUE self);
|
721
|
+
static VALUE IsEval(VALUE self);
|
722
|
+
static VALUE IsConstructor(VALUE self);
|
723
|
+
};
|
724
|
+
};
|
725
|
+
|
726
|
+
class TryCatch {
|
727
|
+
public:
|
728
|
+
static void Init();
|
729
|
+
TryCatch();
|
730
|
+
TryCatch(VALUE value);
|
731
|
+
~TryCatch();
|
732
|
+
operator VALUE();
|
733
|
+
inline v8::TryCatch* operator->() {return this->impl;}
|
734
|
+
static VALUE HasCaught(VALUE self);
|
735
|
+
static VALUE CanContinue(VALUE self);
|
736
|
+
static VALUE ReThrow(VALUE self);
|
737
|
+
static VALUE Exception(VALUE self);
|
738
|
+
static VALUE StackTrace(VALUE self);
|
739
|
+
static VALUE Message(VALUE self);
|
740
|
+
static VALUE Reset(VALUE self);
|
741
|
+
static VALUE SetVerbose(VALUE self, VALUE value);
|
742
|
+
static VALUE SetCaptureMessage(VALUE self, VALUE value);
|
743
|
+
private:
|
744
|
+
static VALUE doTryCatch(int argc, VALUE argv[], VALUE self);
|
745
|
+
static VALUE setupAndCall(int* state, VALUE code);
|
746
|
+
static VALUE doCall(VALUE code);
|
747
|
+
static VALUE Class;
|
748
|
+
v8::TryCatch* impl;
|
749
|
+
bool allocated;
|
750
|
+
};
|
751
|
+
|
752
|
+
class Locker {
|
753
|
+
public:
|
754
|
+
static void Init();
|
755
|
+
static VALUE StartPreemption(VALUE self, VALUE every_n_ms);
|
756
|
+
static VALUE StopPreemption(VALUE self);
|
757
|
+
static VALUE IsLocked(VALUE self);
|
758
|
+
static VALUE IsActive(VALUE self);
|
759
|
+
static VALUE doLock(int argc, VALUE* argv, VALUE self);
|
760
|
+
static VALUE setupLockAndCall(int* state, VALUE code);
|
761
|
+
static VALUE doLockCall(VALUE code);
|
762
|
+
static VALUE doUnlock(int argc, VALUE* argv, VALUE self);
|
763
|
+
static VALUE setupUnlockAndCall(int* state, VALUE code);
|
764
|
+
static VALUE doUnlockCall(VALUE code);
|
765
|
+
};
|
766
|
+
|
767
|
+
class HeapStatistics : public Pointer<v8::HeapStatistics> {
|
768
|
+
public:
|
769
|
+
static void Init();
|
770
|
+
static VALUE initialize(VALUE self);
|
771
|
+
static VALUE total_heap_size(VALUE self);
|
772
|
+
static VALUE total_heap_size_executable(VALUE self);
|
773
|
+
static VALUE used_heap_size(VALUE self);
|
774
|
+
static VALUE heap_size_limit(VALUE self);
|
775
|
+
|
776
|
+
inline HeapStatistics(v8::HeapStatistics* stats) : Pointer<v8::HeapStatistics>(stats) {}
|
777
|
+
inline HeapStatistics(VALUE value) : Pointer<v8::HeapStatistics>(value) {}
|
778
|
+
};
|
779
|
+
|
780
|
+
class ResourceConstraints : Pointer<v8::ResourceConstraints> {
|
781
|
+
public:
|
782
|
+
static void Init();
|
783
|
+
static VALUE initialize(VALUE self);
|
784
|
+
static VALUE max_young_space_size(VALUE self);
|
785
|
+
static VALUE set_max_young_space_size(VALUE self, VALUE value);
|
786
|
+
static VALUE max_old_space_size(VALUE self);
|
787
|
+
static VALUE set_max_old_space_size(VALUE self, VALUE value);
|
788
|
+
static VALUE max_executable_size(VALUE self);
|
789
|
+
static VALUE set_max_executable_size(VALUE self, VALUE value);
|
790
|
+
|
791
|
+
static VALUE SetResourceConstraints(VALUE self, VALUE constraints);
|
792
|
+
|
793
|
+
inline ResourceConstraints(v8::ResourceConstraints* o) : Pointer<v8::ResourceConstraints>(o) {};
|
794
|
+
inline ResourceConstraints(VALUE value) : Pointer<v8::ResourceConstraints>(value) {}
|
795
|
+
};
|
796
|
+
|
797
|
+
class Exception {
|
798
|
+
public:
|
799
|
+
static void Init();
|
800
|
+
static VALUE ThrowException(VALUE self, VALUE exception);
|
801
|
+
static VALUE RangeError(VALUE self, VALUE message);
|
802
|
+
static VALUE ReferenceError(VALUE self, VALUE message);
|
803
|
+
static VALUE SyntaxError(VALUE self, VALUE message);
|
804
|
+
static VALUE TypeError(VALUE self, VALUE message);
|
805
|
+
static VALUE Error(VALUE self, VALUE message);
|
806
|
+
};
|
807
|
+
|
808
|
+
class Constants {
|
809
|
+
public:
|
810
|
+
static void Init();
|
811
|
+
static VALUE Undefined(VALUE self);
|
812
|
+
static VALUE Null(VALUE self);
|
813
|
+
static VALUE True(VALUE self);
|
814
|
+
static VALUE False(VALUE self);
|
815
|
+
|
816
|
+
private:
|
817
|
+
template <class R, class V> static VALUE cached(VALUE* storage, v8::Handle<V> value) {
|
818
|
+
if (!RTEST(*storage)) {
|
819
|
+
*storage = R(value);
|
820
|
+
}
|
821
|
+
return *storage;
|
822
|
+
}
|
823
|
+
static VALUE _Undefined;
|
824
|
+
static VALUE _Null;
|
825
|
+
static VALUE _True;
|
826
|
+
static VALUE _False;
|
827
|
+
};
|
828
|
+
|
829
|
+
class V8 {
|
830
|
+
public:
|
831
|
+
static void Init();
|
832
|
+
static VALUE IdleNotification(int argc, VALUE argv[], VALUE self);
|
833
|
+
static VALUE SetFlagsFromString(VALUE self, VALUE string);
|
834
|
+
static VALUE SetFlagsFromCommandLine(VALUE self, VALUE args, VALUE remove_flags);
|
835
|
+
static VALUE AdjustAmountOfExternalAllocatedMemory(VALUE self, VALUE change_in_bytes);
|
836
|
+
static VALUE PauseProfiler(VALUE self);
|
837
|
+
static VALUE ResumeProfiler(VALUE self);
|
838
|
+
static VALUE IsProfilerPaused(VALUE self);
|
839
|
+
static VALUE GetCurrentThreadId(VALUE self);
|
840
|
+
static VALUE TerminateExecution(VALUE self, VALUE thread_id);
|
841
|
+
static VALUE IsExecutionTerminating(VALUE self);
|
842
|
+
static VALUE Dispose(VALUE self);
|
843
|
+
static VALUE LowMemoryNotification(VALUE self);
|
844
|
+
static VALUE ContextDisposedNotification(VALUE self);
|
845
|
+
|
846
|
+
static VALUE SetCaptureStackTraceForUncaughtExceptions(int argc, VALUE argv[], VALUE self);
|
847
|
+
static VALUE GetHeapStatistics(VALUE self, VALUE statistics_ptr);
|
848
|
+
static VALUE GetVersion(VALUE self);
|
849
|
+
};
|
850
|
+
|
851
|
+
class ClassBuilder {
|
852
|
+
public:
|
853
|
+
ClassBuilder() {};
|
854
|
+
ClassBuilder(const char* name, VALUE superclass = rb_cObject);
|
855
|
+
ClassBuilder(const char* name, const char* supername);
|
856
|
+
ClassBuilder& defineConst(const char* name, VALUE value);
|
857
|
+
ClassBuilder& defineMethod(const char* name, VALUE (*impl)(int, VALUE*, VALUE));
|
858
|
+
ClassBuilder& defineMethod(const char* name, VALUE (*impl)(VALUE));
|
859
|
+
ClassBuilder& defineMethod(const char* name, VALUE (*impl)(VALUE, VALUE));
|
860
|
+
ClassBuilder& defineMethod(const char* name, VALUE (*impl)(VALUE, VALUE, VALUE));
|
861
|
+
ClassBuilder& defineMethod(const char* name, VALUE (*impl)(VALUE, VALUE, VALUE, VALUE));
|
862
|
+
ClassBuilder& defineSingletonMethod(const char* name, VALUE (*impl)(int, VALUE*, VALUE));
|
863
|
+
ClassBuilder& defineSingletonMethod(const char* name, VALUE (*impl)(VALUE));
|
864
|
+
ClassBuilder& defineSingletonMethod(const char* name, VALUE (*impl)(VALUE, VALUE));
|
865
|
+
ClassBuilder& defineSingletonMethod(const char* name, VALUE (*impl)(VALUE, VALUE, VALUE));
|
866
|
+
ClassBuilder& defineSingletonMethod(const char* name, VALUE (*impl)(VALUE, VALUE, VALUE, VALUE));
|
867
|
+
ClassBuilder& defineEnumConst(const char* name, int value);
|
868
|
+
ClassBuilder& store(VALUE* storage);
|
869
|
+
inline operator VALUE() {return this->value;}
|
870
|
+
protected:
|
871
|
+
VALUE value;
|
872
|
+
};
|
873
|
+
|
874
|
+
class ModuleBuilder : public ClassBuilder {
|
875
|
+
public:
|
876
|
+
inline ModuleBuilder(const char* name) {
|
877
|
+
this->value = rb_eval_string(name);
|
878
|
+
}
|
879
|
+
};
|
880
|
+
|
881
|
+
}
|
882
|
+
|
883
|
+
#endif
|