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
@@ -1,208 +0,0 @@
|
|
1
|
-
.\" Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
|
2
|
-
.\"
|
3
|
-
.\" Permission is hereby granted, free of charge, to any person obtaining
|
4
|
-
.\" a copy of this software and associated documentation files (the
|
5
|
-
.\" "Software"), to deal in the Software without restriction, including
|
6
|
-
.\" without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
.\" distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
-
.\" permit persons to whom the Software is furnished to do so, subject to
|
9
|
-
.\" the following conditions:
|
10
|
-
.\"
|
11
|
-
.\" The above copyright notice and this permission notice shall be included
|
12
|
-
.\" in all copies or substantial portions of the Software.
|
13
|
-
.\"
|
14
|
-
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
|
15
|
-
.\" KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
16
|
-
.\" WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
-
.\" NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
-
.\" LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
-
.\" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
.\" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
|
-
.\"
|
22
|
-
.\" doc/man/sconsign.1 4629 2010/01/17 22:23:21 scons
|
23
|
-
.\"
|
24
|
-
.\" ES - Example Start - indents and turns off line fill
|
25
|
-
.de ES
|
26
|
-
.RS
|
27
|
-
.nf
|
28
|
-
..
|
29
|
-
.\" EE - Example End - ends indent and turns line fill back on
|
30
|
-
.de EE
|
31
|
-
.RE
|
32
|
-
.fi
|
33
|
-
..
|
34
|
-
.TH SCONSIGN 1 "January 2010"
|
35
|
-
.SH NAME
|
36
|
-
sconsign \- print SCons .sconsign file information
|
37
|
-
.SH SYNOPSIS
|
38
|
-
.B sconsign
|
39
|
-
[
|
40
|
-
.IR options ...
|
41
|
-
]
|
42
|
-
.IR file
|
43
|
-
[ ... ]
|
44
|
-
.SH DESCRIPTION
|
45
|
-
|
46
|
-
The
|
47
|
-
.B sconsign
|
48
|
-
command
|
49
|
-
displays the contents of one or more
|
50
|
-
.B .sconsign
|
51
|
-
files specified by the user.
|
52
|
-
|
53
|
-
By default,
|
54
|
-
.B sconsign
|
55
|
-
dumps the entire contents of the
|
56
|
-
specified file(s).
|
57
|
-
Each entry is printed in the following format:
|
58
|
-
|
59
|
-
file: signature timestamp length
|
60
|
-
implicit_dependency_1: signature timestamp length
|
61
|
-
implicit_dependency_2: signature timestamp length
|
62
|
-
action_signature [action string]
|
63
|
-
|
64
|
-
.B None
|
65
|
-
is printed
|
66
|
-
in place of any missing timestamp, bsig, or csig
|
67
|
-
values for
|
68
|
-
any entry
|
69
|
-
or any of its dependencies.
|
70
|
-
If the entry has no implicit dependencies,
|
71
|
-
or no build action,
|
72
|
-
the lines are simply omitted.
|
73
|
-
|
74
|
-
By default,
|
75
|
-
.B sconsign
|
76
|
-
assumes that any
|
77
|
-
.I file
|
78
|
-
arguments that end with a
|
79
|
-
.B .dbm
|
80
|
-
suffix contains
|
81
|
-
signature entries for
|
82
|
-
more than one directory
|
83
|
-
(that is,
|
84
|
-
was specified by the
|
85
|
-
.B SConsignFile ()
|
86
|
-
function).
|
87
|
-
Any
|
88
|
-
.I file
|
89
|
-
argument that does not end in
|
90
|
-
.B .dbm
|
91
|
-
is assumed to be a traditional
|
92
|
-
.B .sconsign
|
93
|
-
file containing the signature entries
|
94
|
-
for a single directory.
|
95
|
-
An explicit format
|
96
|
-
may be specified using the
|
97
|
-
.B -f
|
98
|
-
or
|
99
|
-
.B --file=
|
100
|
-
options.
|
101
|
-
|
102
|
-
.SH OPTIONS
|
103
|
-
|
104
|
-
Various options control what information is printed
|
105
|
-
and the format:
|
106
|
-
|
107
|
-
.TP
|
108
|
-
-a, --act, --action
|
109
|
-
Prints the build action information
|
110
|
-
for all entries or the specified entries.
|
111
|
-
|
112
|
-
.TP
|
113
|
-
-c, --csig
|
114
|
-
Prints the content signature (csig) information
|
115
|
-
for all entries or the specified entries.
|
116
|
-
|
117
|
-
.TP
|
118
|
-
-d DIRECTORY, --dir=DIRECTORY
|
119
|
-
When the signatures are being
|
120
|
-
read from a
|
121
|
-
.B .dbm
|
122
|
-
file, or the
|
123
|
-
.B -f dbm
|
124
|
-
or
|
125
|
-
.B --format=dbm
|
126
|
-
options are used,
|
127
|
-
prints information about
|
128
|
-
only the signatures
|
129
|
-
for entries in the specified
|
130
|
-
.IR DIRECTORY .
|
131
|
-
|
132
|
-
.TP
|
133
|
-
-e ENTRY, --entry=ENTRY
|
134
|
-
Prints information about only the specified
|
135
|
-
.IR ENTRY .
|
136
|
-
Multiple -e options may be used,
|
137
|
-
in which case information about each
|
138
|
-
.I ENTRY
|
139
|
-
is printed in the order in which the
|
140
|
-
options are specified on the command line.
|
141
|
-
|
142
|
-
.TP
|
143
|
-
-f FORMAT, --format=FORMAT
|
144
|
-
The file(s) to be printed
|
145
|
-
are in the specified
|
146
|
-
.IR FORMAT .
|
147
|
-
Legal values are
|
148
|
-
.B dbm
|
149
|
-
(the DBM format used
|
150
|
-
when the
|
151
|
-
.BR SConsignFile ()
|
152
|
-
function is used)
|
153
|
-
or
|
154
|
-
.B sconsign
|
155
|
-
(the default format
|
156
|
-
used for an individual
|
157
|
-
.B .sconsign
|
158
|
-
file in each directory).
|
159
|
-
|
160
|
-
.TP
|
161
|
-
-h, --help
|
162
|
-
Prints a help message and exits.
|
163
|
-
|
164
|
-
.TP
|
165
|
-
-i, --implicit
|
166
|
-
Prints the list of cached implicit dependencies
|
167
|
-
for all entries or the the specified entries.
|
168
|
-
|
169
|
-
.TP
|
170
|
-
--raw
|
171
|
-
Prints a pretty-printed representation
|
172
|
-
of the raw Python dictionary that holds
|
173
|
-
build information about individual entry
|
174
|
-
(both the entry itself or its implicit dependencies).
|
175
|
-
An entry's build action is still printed in its usual format.
|
176
|
-
|
177
|
-
.TP
|
178
|
-
-r, --readable
|
179
|
-
Prints timestamps in a human-readable string,
|
180
|
-
enclosed in single quotes.
|
181
|
-
|
182
|
-
.TP
|
183
|
-
-t, --timestamp
|
184
|
-
Prints the timestamp information
|
185
|
-
for all entries or the specified entries.
|
186
|
-
|
187
|
-
.TP
|
188
|
-
-v, --verbose
|
189
|
-
Prints labels identifying each field being printed.
|
190
|
-
|
191
|
-
.SH ENVIRONMENT
|
192
|
-
|
193
|
-
.IP SCONS_LIB_DIR
|
194
|
-
Specifies the directory that contains the SCons Python module directory
|
195
|
-
(e.g. /home/aroach/scons-src-0.01/src/engine).
|
196
|
-
on the command line.
|
197
|
-
|
198
|
-
.SH "SEE ALSO"
|
199
|
-
.BR scons ,
|
200
|
-
.B scons
|
201
|
-
User Manual,
|
202
|
-
.B scons
|
203
|
-
Design Document,
|
204
|
-
.B scons
|
205
|
-
source code.
|
206
|
-
|
207
|
-
.SH AUTHORS
|
208
|
-
Steven Knight <knight at baldmt dot com>
|
@@ -1,184 +0,0 @@
|
|
1
|
-
#! /usr/bin/env python
|
2
|
-
#
|
3
|
-
# SCons - a Software Constructor
|
4
|
-
#
|
5
|
-
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
|
6
|
-
#
|
7
|
-
# Permission is hereby granted, free of charge, to any person obtaining
|
8
|
-
# a copy of this software and associated documentation files (the
|
9
|
-
# "Software"), to deal in the Software without restriction, including
|
10
|
-
# without limitation the rights to use, copy, modify, merge, publish,
|
11
|
-
# distribute, sublicense, and/or sell copies of the Software, and to
|
12
|
-
# permit persons to whom the Software is furnished to do so, subject to
|
13
|
-
# the following conditions:
|
14
|
-
#
|
15
|
-
# The above copyright notice and this permission notice shall be included
|
16
|
-
# in all copies or substantial portions of the Software.
|
17
|
-
#
|
18
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
|
19
|
-
# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
20
|
-
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
21
|
-
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
22
|
-
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
23
|
-
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
24
|
-
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
25
|
-
#
|
26
|
-
|
27
|
-
__revision__ = "src/script/scons.py 4629 2010/01/17 22:23:21 scons"
|
28
|
-
|
29
|
-
__version__ = "1.2.0.d20100117"
|
30
|
-
|
31
|
-
__build__ = "r4629"
|
32
|
-
|
33
|
-
__buildsys__ = "scons-dev"
|
34
|
-
|
35
|
-
__date__ = "2010/01/17 22:23:21"
|
36
|
-
|
37
|
-
__developer__ = "scons"
|
38
|
-
|
39
|
-
import os
|
40
|
-
import os.path
|
41
|
-
import sys
|
42
|
-
|
43
|
-
##############################################################################
|
44
|
-
# BEGIN STANDARD SCons SCRIPT HEADER
|
45
|
-
#
|
46
|
-
# This is the cut-and-paste logic so that a self-contained script can
|
47
|
-
# interoperate correctly with different SCons versions and installation
|
48
|
-
# locations for the engine. If you modify anything in this section, you
|
49
|
-
# should also change other scripts that use this same header.
|
50
|
-
##############################################################################
|
51
|
-
|
52
|
-
# Strip the script directory from sys.path() so on case-insensitive
|
53
|
-
# (WIN32) systems Python doesn't think that the "scons" script is the
|
54
|
-
# "SCons" package. Replace it with our own library directories
|
55
|
-
# (version-specific first, in case they installed by hand there,
|
56
|
-
# followed by generic) so we pick up the right version of the build
|
57
|
-
# engine modules if they're in either directory.
|
58
|
-
|
59
|
-
|
60
|
-
# Check to see if the python version is > 3.0 which is currently unsupported
|
61
|
-
# If so exit with error message
|
62
|
-
try:
|
63
|
-
if sys.version_info >= (3,0,0):
|
64
|
-
msg = "scons: *** SCons version %s does not run under Python version %s.\n"
|
65
|
-
sys.stderr.write(msg % (__version__, sys.version.split()[0]))
|
66
|
-
sys.exit(1)
|
67
|
-
except AttributeError:
|
68
|
-
# Pre-1.6 Python has no sys.version_info
|
69
|
-
# No need to check version as we then know the version is < 3.0.0 and supported
|
70
|
-
pass
|
71
|
-
|
72
|
-
script_dir = sys.path[0]
|
73
|
-
|
74
|
-
if script_dir in sys.path:
|
75
|
-
sys.path.remove(script_dir)
|
76
|
-
|
77
|
-
libs = []
|
78
|
-
|
79
|
-
if os.environ.has_key("SCONS_LIB_DIR"):
|
80
|
-
libs.append(os.environ["SCONS_LIB_DIR"])
|
81
|
-
|
82
|
-
local_version = 'scons-local-' + __version__
|
83
|
-
local = 'scons-local'
|
84
|
-
if script_dir:
|
85
|
-
local_version = os.path.join(script_dir, local_version)
|
86
|
-
local = os.path.join(script_dir, local)
|
87
|
-
libs.append(os.path.abspath(local_version))
|
88
|
-
libs.append(os.path.abspath(local))
|
89
|
-
|
90
|
-
scons_version = 'scons-%s' % __version__
|
91
|
-
|
92
|
-
prefs = []
|
93
|
-
|
94
|
-
if sys.platform == 'win32':
|
95
|
-
# sys.prefix is (likely) C:\Python*;
|
96
|
-
# check only C:\Python*.
|
97
|
-
prefs.append(sys.prefix)
|
98
|
-
prefs.append(os.path.join(sys.prefix, 'Lib', 'site-packages'))
|
99
|
-
else:
|
100
|
-
# On other (POSIX) platforms, things are more complicated due to
|
101
|
-
# the variety of path names and library locations. Try to be smart
|
102
|
-
# about it.
|
103
|
-
if script_dir == 'bin':
|
104
|
-
# script_dir is `pwd`/bin;
|
105
|
-
# check `pwd`/lib/scons*.
|
106
|
-
prefs.append(os.getcwd())
|
107
|
-
else:
|
108
|
-
if script_dir == '.' or script_dir == '':
|
109
|
-
script_dir = os.getcwd()
|
110
|
-
head, tail = os.path.split(script_dir)
|
111
|
-
if tail == "bin":
|
112
|
-
# script_dir is /foo/bin;
|
113
|
-
# check /foo/lib/scons*.
|
114
|
-
prefs.append(head)
|
115
|
-
|
116
|
-
head, tail = os.path.split(sys.prefix)
|
117
|
-
if tail == "usr":
|
118
|
-
# sys.prefix is /foo/usr;
|
119
|
-
# check /foo/usr/lib/scons* first,
|
120
|
-
# then /foo/usr/local/lib/scons*.
|
121
|
-
prefs.append(sys.prefix)
|
122
|
-
prefs.append(os.path.join(sys.prefix, "local"))
|
123
|
-
elif tail == "local":
|
124
|
-
h, t = os.path.split(head)
|
125
|
-
if t == "usr":
|
126
|
-
# sys.prefix is /foo/usr/local;
|
127
|
-
# check /foo/usr/local/lib/scons* first,
|
128
|
-
# then /foo/usr/lib/scons*.
|
129
|
-
prefs.append(sys.prefix)
|
130
|
-
prefs.append(head)
|
131
|
-
else:
|
132
|
-
# sys.prefix is /foo/local;
|
133
|
-
# check only /foo/local/lib/scons*.
|
134
|
-
prefs.append(sys.prefix)
|
135
|
-
else:
|
136
|
-
# sys.prefix is /foo (ends in neither /usr or /local);
|
137
|
-
# check only /foo/lib/scons*.
|
138
|
-
prefs.append(sys.prefix)
|
139
|
-
|
140
|
-
temp = map(lambda x: os.path.join(x, 'lib'), prefs)
|
141
|
-
temp.extend(map(lambda x: os.path.join(x,
|
142
|
-
'lib',
|
143
|
-
'python' + sys.version[:3],
|
144
|
-
'site-packages'),
|
145
|
-
prefs))
|
146
|
-
prefs = temp
|
147
|
-
|
148
|
-
# Add the parent directory of the current python's library to the
|
149
|
-
# preferences. On SuSE-91/AMD64, for example, this is /usr/lib64,
|
150
|
-
# not /usr/lib.
|
151
|
-
try:
|
152
|
-
libpath = os.__file__
|
153
|
-
except AttributeError:
|
154
|
-
pass
|
155
|
-
else:
|
156
|
-
# Split /usr/libfoo/python*/os.py to /usr/libfoo/python*.
|
157
|
-
libpath, tail = os.path.split(libpath)
|
158
|
-
# Split /usr/libfoo/python* to /usr/libfoo
|
159
|
-
libpath, tail = os.path.split(libpath)
|
160
|
-
# Check /usr/libfoo/scons*.
|
161
|
-
prefs.append(libpath)
|
162
|
-
|
163
|
-
# Look first for 'scons-__version__' in all of our preference libs,
|
164
|
-
# then for 'scons'.
|
165
|
-
libs.extend(map(lambda x: os.path.join(x, scons_version), prefs))
|
166
|
-
libs.extend(map(lambda x: os.path.join(x, 'scons'), prefs))
|
167
|
-
|
168
|
-
sys.path = libs + sys.path
|
169
|
-
|
170
|
-
##############################################################################
|
171
|
-
# END STANDARD SCons SCRIPT HEADER
|
172
|
-
##############################################################################
|
173
|
-
|
174
|
-
if __name__ == "__main__":
|
175
|
-
import SCons.Script
|
176
|
-
# this does all the work, and calls sys.exit
|
177
|
-
# with the proper exit status when done.
|
178
|
-
SCons.Script.main()
|
179
|
-
|
180
|
-
# Local Variables:
|
181
|
-
# tab-width:4
|
182
|
-
# indent-tabs-mode:nil
|
183
|
-
# End:
|
184
|
-
# vim: set expandtab tabstop=4 shiftwidth=4:
|
@@ -1,1529 +0,0 @@
|
|
1
|
-
#!/usr/bin/env python
|
2
|
-
#
|
3
|
-
# scons-time - run SCons timings and collect statistics
|
4
|
-
#
|
5
|
-
# A script for running a configuration through SCons with a standard
|
6
|
-
# set of invocations to collect timing and memory statistics and to
|
7
|
-
# capture the results in a consistent set of output files for display
|
8
|
-
# and analysis.
|
9
|
-
#
|
10
|
-
|
11
|
-
#
|
12
|
-
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
|
13
|
-
#
|
14
|
-
# Permission is hereby granted, free of charge, to any person obtaining
|
15
|
-
# a copy of this software and associated documentation files (the
|
16
|
-
# "Software"), to deal in the Software without restriction, including
|
17
|
-
# without limitation the rights to use, copy, modify, merge, publish,
|
18
|
-
# distribute, sublicense, and/or sell copies of the Software, and to
|
19
|
-
# permit persons to whom the Software is furnished to do so, subject to
|
20
|
-
# the following conditions:
|
21
|
-
#
|
22
|
-
# The above copyright notice and this permission notice shall be included
|
23
|
-
# in all copies or substantial portions of the Software.
|
24
|
-
#
|
25
|
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
|
26
|
-
# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
27
|
-
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
28
|
-
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
29
|
-
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
30
|
-
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
31
|
-
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
32
|
-
#
|
33
|
-
|
34
|
-
from __future__ import nested_scopes
|
35
|
-
|
36
|
-
__revision__ = "src/script/scons-time.py 4629 2010/01/17 22:23:21 scons"
|
37
|
-
|
38
|
-
import getopt
|
39
|
-
import glob
|
40
|
-
import os
|
41
|
-
import os.path
|
42
|
-
import re
|
43
|
-
import shutil
|
44
|
-
import string
|
45
|
-
import sys
|
46
|
-
import tempfile
|
47
|
-
import time
|
48
|
-
|
49
|
-
try:
|
50
|
-
False
|
51
|
-
except NameError:
|
52
|
-
# Pre-2.2 Python has no False keyword.
|
53
|
-
import __builtin__
|
54
|
-
__builtin__.False = not 1
|
55
|
-
|
56
|
-
try:
|
57
|
-
True
|
58
|
-
except NameError:
|
59
|
-
# Pre-2.2 Python has no True keyword.
|
60
|
-
import __builtin__
|
61
|
-
__builtin__.True = not 0
|
62
|
-
|
63
|
-
def make_temp_file(**kw):
|
64
|
-
try:
|
65
|
-
result = tempfile.mktemp(**kw)
|
66
|
-
try:
|
67
|
-
result = os.path.realpath(result)
|
68
|
-
except AttributeError:
|
69
|
-
# Python 2.1 has no os.path.realpath() method.
|
70
|
-
pass
|
71
|
-
except TypeError:
|
72
|
-
try:
|
73
|
-
save_template = tempfile.template
|
74
|
-
prefix = kw['prefix']
|
75
|
-
del kw['prefix']
|
76
|
-
tempfile.template = prefix
|
77
|
-
result = tempfile.mktemp(**kw)
|
78
|
-
finally:
|
79
|
-
tempfile.template = save_template
|
80
|
-
return result
|
81
|
-
|
82
|
-
def HACK_for_exec(cmd, *args):
|
83
|
-
'''
|
84
|
-
For some reason, Python won't allow an exec() within a function
|
85
|
-
that also declares an internal function (including lambda functions).
|
86
|
-
This function is a hack that calls exec() in a function with no
|
87
|
-
internal functions.
|
88
|
-
'''
|
89
|
-
if not args: exec(cmd)
|
90
|
-
elif len(args) == 1: exec cmd in args[0]
|
91
|
-
else: exec cmd in args[0], args[1]
|
92
|
-
|
93
|
-
class Plotter:
|
94
|
-
def increment_size(self, largest):
|
95
|
-
"""
|
96
|
-
Return the size of each horizontal increment line for a specified
|
97
|
-
maximum value. This returns a value that will provide somewhere
|
98
|
-
between 5 and 9 horizontal lines on the graph, on some set of
|
99
|
-
boundaries that are multiples of 10/100/1000/etc.
|
100
|
-
"""
|
101
|
-
i = largest / 5
|
102
|
-
if not i:
|
103
|
-
return largest
|
104
|
-
multiplier = 1
|
105
|
-
while i >= 10:
|
106
|
-
i = i / 10
|
107
|
-
multiplier = multiplier * 10
|
108
|
-
return i * multiplier
|
109
|
-
|
110
|
-
def max_graph_value(self, largest):
|
111
|
-
# Round up to next integer.
|
112
|
-
largest = int(largest) + 1
|
113
|
-
increment = self.increment_size(largest)
|
114
|
-
return ((largest + increment - 1) / increment) * increment
|
115
|
-
|
116
|
-
class Line:
|
117
|
-
def __init__(self, points, type, title, label, comment, fmt="%s %s"):
|
118
|
-
self.points = points
|
119
|
-
self.type = type
|
120
|
-
self.title = title
|
121
|
-
self.label = label
|
122
|
-
self.comment = comment
|
123
|
-
self.fmt = fmt
|
124
|
-
|
125
|
-
def print_label(self, inx, x, y):
|
126
|
-
if self.label:
|
127
|
-
print 'set label %s "%s" at %s,%s right' % (inx, self.label, x, y)
|
128
|
-
|
129
|
-
def plot_string(self):
|
130
|
-
if self.title:
|
131
|
-
title_string = 'title "%s"' % self.title
|
132
|
-
else:
|
133
|
-
title_string = 'notitle'
|
134
|
-
return "'-' %s with lines lt %s" % (title_string, self.type)
|
135
|
-
|
136
|
-
def print_points(self, fmt=None):
|
137
|
-
if fmt is None:
|
138
|
-
fmt = self.fmt
|
139
|
-
if self.comment:
|
140
|
-
print '# %s' % self.comment
|
141
|
-
for x, y in self.points:
|
142
|
-
# If y is None, it usually represents some kind of break
|
143
|
-
# in the line's index number. We might want to represent
|
144
|
-
# this some way rather than just drawing the line straight
|
145
|
-
# between the two points on either side.
|
146
|
-
if not y is None:
|
147
|
-
print fmt % (x, y)
|
148
|
-
print 'e'
|
149
|
-
|
150
|
-
def get_x_values(self):
|
151
|
-
return [ p[0] for p in self.points ]
|
152
|
-
|
153
|
-
def get_y_values(self):
|
154
|
-
return [ p[1] for p in self.points ]
|
155
|
-
|
156
|
-
class Gnuplotter(Plotter):
|
157
|
-
|
158
|
-
def __init__(self, title, key_location):
|
159
|
-
self.lines = []
|
160
|
-
self.title = title
|
161
|
-
self.key_location = key_location
|
162
|
-
|
163
|
-
def line(self, points, type, title=None, label=None, comment=None, fmt='%s %s'):
|
164
|
-
if points:
|
165
|
-
line = Line(points, type, title, label, comment, fmt)
|
166
|
-
self.lines.append(line)
|
167
|
-
|
168
|
-
def plot_string(self, line):
|
169
|
-
return line.plot_string()
|
170
|
-
|
171
|
-
def vertical_bar(self, x, type, label, comment):
|
172
|
-
if self.get_min_x() <= x and x <= self.get_max_x():
|
173
|
-
points = [(x, 0), (x, self.max_graph_value(self.get_max_y()))]
|
174
|
-
self.line(points, type, label, comment)
|
175
|
-
|
176
|
-
def get_all_x_values(self):
|
177
|
-
result = []
|
178
|
-
for line in self.lines:
|
179
|
-
result.extend(line.get_x_values())
|
180
|
-
return filter(lambda r: not r is None, result)
|
181
|
-
|
182
|
-
def get_all_y_values(self):
|
183
|
-
result = []
|
184
|
-
for line in self.lines:
|
185
|
-
result.extend(line.get_y_values())
|
186
|
-
return filter(lambda r: not r is None, result)
|
187
|
-
|
188
|
-
def get_min_x(self):
|
189
|
-
try:
|
190
|
-
return self.min_x
|
191
|
-
except AttributeError:
|
192
|
-
try:
|
193
|
-
self.min_x = min(self.get_all_x_values())
|
194
|
-
except ValueError:
|
195
|
-
self.min_x = 0
|
196
|
-
return self.min_x
|
197
|
-
|
198
|
-
def get_max_x(self):
|
199
|
-
try:
|
200
|
-
return self.max_x
|
201
|
-
except AttributeError:
|
202
|
-
try:
|
203
|
-
self.max_x = max(self.get_all_x_values())
|
204
|
-
except ValueError:
|
205
|
-
self.max_x = 0
|
206
|
-
return self.max_x
|
207
|
-
|
208
|
-
def get_min_y(self):
|
209
|
-
try:
|
210
|
-
return self.min_y
|
211
|
-
except AttributeError:
|
212
|
-
try:
|
213
|
-
self.min_y = min(self.get_all_y_values())
|
214
|
-
except ValueError:
|
215
|
-
self.min_y = 0
|
216
|
-
return self.min_y
|
217
|
-
|
218
|
-
def get_max_y(self):
|
219
|
-
try:
|
220
|
-
return self.max_y
|
221
|
-
except AttributeError:
|
222
|
-
try:
|
223
|
-
self.max_y = max(self.get_all_y_values())
|
224
|
-
except ValueError:
|
225
|
-
self.max_y = 0
|
226
|
-
return self.max_y
|
227
|
-
|
228
|
-
def draw(self):
|
229
|
-
|
230
|
-
if not self.lines:
|
231
|
-
return
|
232
|
-
|
233
|
-
if self.title:
|
234
|
-
print 'set title "%s"' % self.title
|
235
|
-
print 'set key %s' % self.key_location
|
236
|
-
|
237
|
-
min_y = self.get_min_y()
|
238
|
-
max_y = self.max_graph_value(self.get_max_y())
|
239
|
-
range = max_y - min_y
|
240
|
-
incr = range / 10.0
|
241
|
-
start = min_y + (max_y / 2.0) + (2.0 * incr)
|
242
|
-
position = [ start - (i * incr) for i in xrange(5) ]
|
243
|
-
|
244
|
-
inx = 1
|
245
|
-
for line in self.lines:
|
246
|
-
line.print_label(inx, line.points[0][0]-1,
|
247
|
-
position[(inx-1) % len(position)])
|
248
|
-
inx += 1
|
249
|
-
|
250
|
-
plot_strings = [ self.plot_string(l) for l in self.lines ]
|
251
|
-
print 'plot ' + ', \\\n '.join(plot_strings)
|
252
|
-
|
253
|
-
for line in self.lines:
|
254
|
-
line.print_points()
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
def untar(fname):
|
259
|
-
import tarfile
|
260
|
-
tar = tarfile.open(name=fname, mode='r')
|
261
|
-
for tarinfo in tar:
|
262
|
-
tar.extract(tarinfo)
|
263
|
-
tar.close()
|
264
|
-
|
265
|
-
def unzip(fname):
|
266
|
-
import zipfile
|
267
|
-
zf = zipfile.ZipFile(fname, 'r')
|
268
|
-
for name in zf.namelist():
|
269
|
-
dir = os.path.dirname(name)
|
270
|
-
try:
|
271
|
-
os.makedirs(dir)
|
272
|
-
except:
|
273
|
-
pass
|
274
|
-
open(name, 'w').write(zf.read(name))
|
275
|
-
|
276
|
-
def read_tree(dir):
|
277
|
-
def read_files(arg, dirname, fnames):
|
278
|
-
for fn in fnames:
|
279
|
-
fn = os.path.join(dirname, fn)
|
280
|
-
if os.path.isfile(fn):
|
281
|
-
open(fn, 'rb').read()
|
282
|
-
os.path.walk('.', read_files, None)
|
283
|
-
|
284
|
-
def redirect_to_file(command, log):
|
285
|
-
return '%s > %s 2>&1' % (command, log)
|
286
|
-
|
287
|
-
def tee_to_file(command, log):
|
288
|
-
return '%s 2>&1 | tee %s' % (command, log)
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
class SConsTimer:
|
293
|
-
"""
|
294
|
-
Usage: scons-time SUBCOMMAND [ARGUMENTS]
|
295
|
-
Type "scons-time help SUBCOMMAND" for help on a specific subcommand.
|
296
|
-
|
297
|
-
Available subcommands:
|
298
|
-
func Extract test-run data for a function
|
299
|
-
help Provides help
|
300
|
-
mem Extract --debug=memory data from test runs
|
301
|
-
obj Extract --debug=count data from test runs
|
302
|
-
time Extract --debug=time data from test runs
|
303
|
-
run Runs a test configuration
|
304
|
-
"""
|
305
|
-
|
306
|
-
name = 'scons-time'
|
307
|
-
name_spaces = ' '*len(name)
|
308
|
-
|
309
|
-
def makedict(**kw):
|
310
|
-
return kw
|
311
|
-
|
312
|
-
default_settings = makedict(
|
313
|
-
aegis = 'aegis',
|
314
|
-
aegis_project = None,
|
315
|
-
chdir = None,
|
316
|
-
config_file = None,
|
317
|
-
initial_commands = [],
|
318
|
-
key_location = 'bottom left',
|
319
|
-
orig_cwd = os.getcwd(),
|
320
|
-
outdir = None,
|
321
|
-
prefix = '',
|
322
|
-
python = '"%s"' % sys.executable,
|
323
|
-
redirect = redirect_to_file,
|
324
|
-
scons = None,
|
325
|
-
scons_flags = '--debug=count --debug=memory --debug=time --debug=memoizer',
|
326
|
-
scons_lib_dir = None,
|
327
|
-
scons_wrapper = None,
|
328
|
-
startup_targets = '--help',
|
329
|
-
subdir = None,
|
330
|
-
subversion_url = None,
|
331
|
-
svn = 'svn',
|
332
|
-
svn_co_flag = '-q',
|
333
|
-
tar = 'tar',
|
334
|
-
targets = '',
|
335
|
-
targets0 = None,
|
336
|
-
targets1 = None,
|
337
|
-
targets2 = None,
|
338
|
-
title = None,
|
339
|
-
unzip = 'unzip',
|
340
|
-
verbose = False,
|
341
|
-
vertical_bars = [],
|
342
|
-
|
343
|
-
unpack_map = {
|
344
|
-
'.tar.gz' : (untar, '%(tar)s xzf %%s'),
|
345
|
-
'.tgz' : (untar, '%(tar)s xzf %%s'),
|
346
|
-
'.tar' : (untar, '%(tar)s xf %%s'),
|
347
|
-
'.zip' : (unzip, '%(unzip)s %%s'),
|
348
|
-
},
|
349
|
-
)
|
350
|
-
|
351
|
-
run_titles = [
|
352
|
-
'Startup',
|
353
|
-
'Full build',
|
354
|
-
'Up-to-date build',
|
355
|
-
]
|
356
|
-
|
357
|
-
run_commands = [
|
358
|
-
'%(python)s %(scons_wrapper)s %(scons_flags)s --profile=%(prof0)s %(targets0)s',
|
359
|
-
'%(python)s %(scons_wrapper)s %(scons_flags)s --profile=%(prof1)s %(targets1)s',
|
360
|
-
'%(python)s %(scons_wrapper)s %(scons_flags)s --profile=%(prof2)s %(targets2)s',
|
361
|
-
]
|
362
|
-
|
363
|
-
stages = [
|
364
|
-
'pre-read',
|
365
|
-
'post-read',
|
366
|
-
'pre-build',
|
367
|
-
'post-build',
|
368
|
-
]
|
369
|
-
|
370
|
-
stage_strings = {
|
371
|
-
'pre-read' : 'Memory before reading SConscript files:',
|
372
|
-
'post-read' : 'Memory after reading SConscript files:',
|
373
|
-
'pre-build' : 'Memory before building targets:',
|
374
|
-
'post-build' : 'Memory after building targets:',
|
375
|
-
}
|
376
|
-
|
377
|
-
memory_string_all = 'Memory '
|
378
|
-
|
379
|
-
default_stage = stages[-1]
|
380
|
-
|
381
|
-
time_strings = {
|
382
|
-
'total' : 'Total build time',
|
383
|
-
'SConscripts' : 'Total SConscript file execution time',
|
384
|
-
'SCons' : 'Total SCons execution time',
|
385
|
-
'commands' : 'Total command execution time',
|
386
|
-
}
|
387
|
-
|
388
|
-
time_string_all = 'Total .* time'
|
389
|
-
|
390
|
-
#
|
391
|
-
|
392
|
-
def __init__(self):
|
393
|
-
self.__dict__.update(self.default_settings)
|
394
|
-
|
395
|
-
# Functions for displaying and executing commands.
|
396
|
-
|
397
|
-
def subst(self, x, dictionary):
|
398
|
-
try:
|
399
|
-
return x % dictionary
|
400
|
-
except TypeError:
|
401
|
-
# x isn't a string (it's probably a Python function),
|
402
|
-
# so just return it.
|
403
|
-
return x
|
404
|
-
|
405
|
-
def subst_variables(self, command, dictionary):
|
406
|
-
"""
|
407
|
-
Substitutes (via the format operator) the values in the specified
|
408
|
-
dictionary into the specified command.
|
409
|
-
|
410
|
-
The command can be an (action, string) tuple. In all cases, we
|
411
|
-
perform substitution on strings and don't worry if something isn't
|
412
|
-
a string. (It's probably a Python function to be executed.)
|
413
|
-
"""
|
414
|
-
try:
|
415
|
-
command + ''
|
416
|
-
except TypeError:
|
417
|
-
action = command[0]
|
418
|
-
string = command[1]
|
419
|
-
args = command[2:]
|
420
|
-
else:
|
421
|
-
action = command
|
422
|
-
string = action
|
423
|
-
args = (())
|
424
|
-
action = self.subst(action, dictionary)
|
425
|
-
string = self.subst(string, dictionary)
|
426
|
-
return (action, string, args)
|
427
|
-
|
428
|
-
def _do_not_display(self, msg, *args):
|
429
|
-
pass
|
430
|
-
|
431
|
-
def display(self, msg, *args):
|
432
|
-
"""
|
433
|
-
Displays the specified message.
|
434
|
-
|
435
|
-
Each message is prepended with a standard prefix of our name
|
436
|
-
plus the time.
|
437
|
-
"""
|
438
|
-
if callable(msg):
|
439
|
-
msg = msg(*args)
|
440
|
-
else:
|
441
|
-
msg = msg % args
|
442
|
-
if msg is None:
|
443
|
-
return
|
444
|
-
fmt = '%s[%s]: %s\n'
|
445
|
-
sys.stdout.write(fmt % (self.name, time.strftime('%H:%M:%S'), msg))
|
446
|
-
|
447
|
-
def _do_not_execute(self, action, *args):
|
448
|
-
pass
|
449
|
-
|
450
|
-
def execute(self, action, *args):
|
451
|
-
"""
|
452
|
-
Executes the specified action.
|
453
|
-
|
454
|
-
The action is called if it's a callable Python function, and
|
455
|
-
otherwise passed to os.system().
|
456
|
-
"""
|
457
|
-
if callable(action):
|
458
|
-
action(*args)
|
459
|
-
else:
|
460
|
-
os.system(action % args)
|
461
|
-
|
462
|
-
def run_command_list(self, commands, dict):
|
463
|
-
"""
|
464
|
-
Executes a list of commands, substituting values from the
|
465
|
-
specified dictionary.
|
466
|
-
"""
|
467
|
-
commands = [ self.subst_variables(c, dict) for c in commands ]
|
468
|
-
for action, string, args in commands:
|
469
|
-
self.display(string, *args)
|
470
|
-
sys.stdout.flush()
|
471
|
-
status = self.execute(action, *args)
|
472
|
-
if status:
|
473
|
-
sys.exit(status)
|
474
|
-
|
475
|
-
def log_display(self, command, log):
|
476
|
-
command = self.subst(command, self.__dict__)
|
477
|
-
if log:
|
478
|
-
command = self.redirect(command, log)
|
479
|
-
return command
|
480
|
-
|
481
|
-
def log_execute(self, command, log):
|
482
|
-
command = self.subst(command, self.__dict__)
|
483
|
-
output = os.popen(command).read()
|
484
|
-
if self.verbose:
|
485
|
-
sys.stdout.write(output)
|
486
|
-
open(log, 'wb').write(output)
|
487
|
-
|
488
|
-
#
|
489
|
-
|
490
|
-
def archive_splitext(self, path):
|
491
|
-
"""
|
492
|
-
Splits an archive name into a filename base and extension.
|
493
|
-
|
494
|
-
This is like os.path.splitext() (which it calls) except that it
|
495
|
-
also looks for '.tar.gz' and treats it as an atomic extensions.
|
496
|
-
"""
|
497
|
-
if path.endswith('.tar.gz'):
|
498
|
-
return path[:-7], path[-7:]
|
499
|
-
else:
|
500
|
-
return os.path.splitext(path)
|
501
|
-
|
502
|
-
def args_to_files(self, args, tail=None):
|
503
|
-
"""
|
504
|
-
Takes a list of arguments, expands any glob patterns, and
|
505
|
-
returns the last "tail" files from the list.
|
506
|
-
"""
|
507
|
-
files = []
|
508
|
-
for a in args:
|
509
|
-
g = glob.glob(a)
|
510
|
-
g.sort()
|
511
|
-
files.extend(g)
|
512
|
-
|
513
|
-
if tail:
|
514
|
-
files = files[-tail:]
|
515
|
-
|
516
|
-
return files
|
517
|
-
|
518
|
-
def ascii_table(self, files, columns,
|
519
|
-
line_function, file_function=lambda x: x,
|
520
|
-
*args, **kw):
|
521
|
-
|
522
|
-
header_fmt = ' '.join(['%12s'] * len(columns))
|
523
|
-
line_fmt = header_fmt + ' %s'
|
524
|
-
|
525
|
-
print header_fmt % columns
|
526
|
-
|
527
|
-
for file in files:
|
528
|
-
t = line_function(file, *args, **kw)
|
529
|
-
if t is None:
|
530
|
-
t = []
|
531
|
-
diff = len(columns) - len(t)
|
532
|
-
if diff > 0:
|
533
|
-
t += [''] * diff
|
534
|
-
t.append(file_function(file))
|
535
|
-
print line_fmt % tuple(t)
|
536
|
-
|
537
|
-
def collect_results(self, files, function, *args, **kw):
|
538
|
-
results = {}
|
539
|
-
|
540
|
-
for file in files:
|
541
|
-
base = os.path.splitext(file)[0]
|
542
|
-
run, index = string.split(base, '-')[-2:]
|
543
|
-
|
544
|
-
run = int(run)
|
545
|
-
index = int(index)
|
546
|
-
|
547
|
-
value = function(file, *args, **kw)
|
548
|
-
|
549
|
-
try:
|
550
|
-
r = results[index]
|
551
|
-
except KeyError:
|
552
|
-
r = []
|
553
|
-
results[index] = r
|
554
|
-
r.append((run, value))
|
555
|
-
|
556
|
-
return results
|
557
|
-
|
558
|
-
def doc_to_help(self, obj):
|
559
|
-
"""
|
560
|
-
Translates an object's __doc__ string into help text.
|
561
|
-
|
562
|
-
This strips a consistent number of spaces from each line in the
|
563
|
-
help text, essentially "outdenting" the text to the left-most
|
564
|
-
column.
|
565
|
-
"""
|
566
|
-
doc = obj.__doc__
|
567
|
-
if doc is None:
|
568
|
-
return ''
|
569
|
-
return self.outdent(doc)
|
570
|
-
|
571
|
-
def find_next_run_number(self, dir, prefix):
|
572
|
-
"""
|
573
|
-
Returns the next run number in a directory for the specified prefix.
|
574
|
-
|
575
|
-
Examines the contents the specified directory for files with the
|
576
|
-
specified prefix, extracts the run numbers from each file name,
|
577
|
-
and returns the next run number after the largest it finds.
|
578
|
-
"""
|
579
|
-
x = re.compile(re.escape(prefix) + '-([0-9]+).*')
|
580
|
-
matches = map(lambda e, x=x: x.match(e), os.listdir(dir))
|
581
|
-
matches = filter(None, matches)
|
582
|
-
if not matches:
|
583
|
-
return 0
|
584
|
-
run_numbers = map(lambda m: int(m.group(1)), matches)
|
585
|
-
return int(max(run_numbers)) + 1
|
586
|
-
|
587
|
-
def gnuplot_results(self, results, fmt='%s %.3f'):
|
588
|
-
"""
|
589
|
-
Prints out a set of results in Gnuplot format.
|
590
|
-
"""
|
591
|
-
gp = Gnuplotter(self.title, self.key_location)
|
592
|
-
|
593
|
-
indices = results.keys()
|
594
|
-
indices.sort()
|
595
|
-
|
596
|
-
for i in indices:
|
597
|
-
try:
|
598
|
-
t = self.run_titles[i]
|
599
|
-
except IndexError:
|
600
|
-
t = '??? %s ???' % i
|
601
|
-
results[i].sort()
|
602
|
-
gp.line(results[i], i+1, t, None, t, fmt=fmt)
|
603
|
-
|
604
|
-
for bar_tuple in self.vertical_bars:
|
605
|
-
try:
|
606
|
-
x, type, label, comment = bar_tuple
|
607
|
-
except ValueError:
|
608
|
-
x, type, label = bar_tuple
|
609
|
-
comment = label
|
610
|
-
gp.vertical_bar(x, type, label, comment)
|
611
|
-
|
612
|
-
gp.draw()
|
613
|
-
|
614
|
-
def logfile_name(self, invocation):
|
615
|
-
"""
|
616
|
-
Returns the absolute path of a log file for the specificed
|
617
|
-
invocation number.
|
618
|
-
"""
|
619
|
-
name = self.prefix_run + '-%d.log' % invocation
|
620
|
-
return os.path.join(self.outdir, name)
|
621
|
-
|
622
|
-
def outdent(self, s):
|
623
|
-
"""
|
624
|
-
Strip as many spaces from each line as are found at the beginning
|
625
|
-
of the first line in the list.
|
626
|
-
"""
|
627
|
-
lines = s.split('\n')
|
628
|
-
if lines[0] == '':
|
629
|
-
lines = lines[1:]
|
630
|
-
spaces = re.match(' *', lines[0]).group(0)
|
631
|
-
def strip_initial_spaces(l, s=spaces):
|
632
|
-
if l.startswith(spaces):
|
633
|
-
l = l[len(spaces):]
|
634
|
-
return l
|
635
|
-
return '\n'.join([ strip_initial_spaces(l) for l in lines ]) + '\n'
|
636
|
-
|
637
|
-
def profile_name(self, invocation):
|
638
|
-
"""
|
639
|
-
Returns the absolute path of a profile file for the specified
|
640
|
-
invocation number.
|
641
|
-
"""
|
642
|
-
name = self.prefix_run + '-%d.prof' % invocation
|
643
|
-
return os.path.join(self.outdir, name)
|
644
|
-
|
645
|
-
def set_env(self, key, value):
|
646
|
-
os.environ[key] = value
|
647
|
-
|
648
|
-
#
|
649
|
-
|
650
|
-
def get_debug_times(self, file, time_string=None):
|
651
|
-
"""
|
652
|
-
Fetch times from the --debug=time strings in the specified file.
|
653
|
-
"""
|
654
|
-
if time_string is None:
|
655
|
-
search_string = self.time_string_all
|
656
|
-
else:
|
657
|
-
search_string = time_string
|
658
|
-
contents = open(file).read()
|
659
|
-
if not contents:
|
660
|
-
sys.stderr.write('file %s has no contents!\n' % repr(file))
|
661
|
-
return None
|
662
|
-
result = re.findall(r'%s: ([\d\.]*)' % search_string, contents)[-4:]
|
663
|
-
result = [ float(r) for r in result ]
|
664
|
-
if not time_string is None:
|
665
|
-
try:
|
666
|
-
result = result[0]
|
667
|
-
except IndexError:
|
668
|
-
sys.stderr.write('file %s has no results!\n' % repr(file))
|
669
|
-
return None
|
670
|
-
return result
|
671
|
-
|
672
|
-
def get_function_profile(self, file, function):
|
673
|
-
"""
|
674
|
-
Returns the file, line number, function name, and cumulative time.
|
675
|
-
"""
|
676
|
-
try:
|
677
|
-
import pstats
|
678
|
-
except ImportError, e:
|
679
|
-
sys.stderr.write('%s: func: %s\n' % (self.name, e))
|
680
|
-
sys.stderr.write('%s This version of Python is missing the profiler.\n' % self.name_spaces)
|
681
|
-
sys.stderr.write('%s Cannot use the "func" subcommand.\n' % self.name_spaces)
|
682
|
-
sys.exit(1)
|
683
|
-
statistics = pstats.Stats(file).stats
|
684
|
-
matches = [ e for e in statistics.items() if e[0][2] == function ]
|
685
|
-
r = matches[0]
|
686
|
-
return r[0][0], r[0][1], r[0][2], r[1][3]
|
687
|
-
|
688
|
-
def get_function_time(self, file, function):
|
689
|
-
"""
|
690
|
-
Returns just the cumulative time for the specified function.
|
691
|
-
"""
|
692
|
-
return self.get_function_profile(file, function)[3]
|
693
|
-
|
694
|
-
def get_memory(self, file, memory_string=None):
|
695
|
-
"""
|
696
|
-
Returns a list of integers of the amount of memory used. The
|
697
|
-
default behavior is to return all the stages.
|
698
|
-
"""
|
699
|
-
if memory_string is None:
|
700
|
-
search_string = self.memory_string_all
|
701
|
-
else:
|
702
|
-
search_string = memory_string
|
703
|
-
lines = open(file).readlines()
|
704
|
-
lines = [ l for l in lines if l.startswith(search_string) ][-4:]
|
705
|
-
result = [ int(l.split()[-1]) for l in lines[-4:] ]
|
706
|
-
if len(result) == 1:
|
707
|
-
result = result[0]
|
708
|
-
return result
|
709
|
-
|
710
|
-
def get_object_counts(self, file, object_name, index=None):
|
711
|
-
"""
|
712
|
-
Returns the counts of the specified object_name.
|
713
|
-
"""
|
714
|
-
object_string = ' ' + object_name + '\n'
|
715
|
-
lines = open(file).readlines()
|
716
|
-
line = [ l for l in lines if l.endswith(object_string) ][0]
|
717
|
-
result = [ int(field) for field in line.split()[:4] ]
|
718
|
-
if index is not None:
|
719
|
-
result = result[index]
|
720
|
-
return result
|
721
|
-
|
722
|
-
#
|
723
|
-
|
724
|
-
command_alias = {}
|
725
|
-
|
726
|
-
def execute_subcommand(self, argv):
|
727
|
-
"""
|
728
|
-
Executes the do_*() function for the specified subcommand (argv[0]).
|
729
|
-
"""
|
730
|
-
if not argv:
|
731
|
-
return
|
732
|
-
cmdName = self.command_alias.get(argv[0], argv[0])
|
733
|
-
try:
|
734
|
-
func = getattr(self, 'do_' + cmdName)
|
735
|
-
except AttributeError:
|
736
|
-
return self.default(argv)
|
737
|
-
try:
|
738
|
-
return func(argv)
|
739
|
-
except TypeError, e:
|
740
|
-
sys.stderr.write("%s %s: %s\n" % (self.name, cmdName, e))
|
741
|
-
import traceback
|
742
|
-
traceback.print_exc(file=sys.stderr)
|
743
|
-
sys.stderr.write("Try '%s help %s'\n" % (self.name, cmdName))
|
744
|
-
|
745
|
-
def default(self, argv):
|
746
|
-
"""
|
747
|
-
The default behavior for an unknown subcommand. Prints an
|
748
|
-
error message and exits.
|
749
|
-
"""
|
750
|
-
sys.stderr.write('%s: Unknown subcommand "%s".\n' % (self.name, argv[0]))
|
751
|
-
sys.stderr.write('Type "%s help" for usage.\n' % self.name)
|
752
|
-
sys.exit(1)
|
753
|
-
|
754
|
-
#
|
755
|
-
|
756
|
-
def do_help(self, argv):
|
757
|
-
"""
|
758
|
-
"""
|
759
|
-
if argv[1:]:
|
760
|
-
for arg in argv[1:]:
|
761
|
-
try:
|
762
|
-
func = getattr(self, 'do_' + arg)
|
763
|
-
except AttributeError:
|
764
|
-
sys.stderr.write('%s: No help for "%s"\n' % (self.name, arg))
|
765
|
-
else:
|
766
|
-
try:
|
767
|
-
help = getattr(self, 'help_' + arg)
|
768
|
-
except AttributeError:
|
769
|
-
sys.stdout.write(self.doc_to_help(func))
|
770
|
-
sys.stdout.flush()
|
771
|
-
else:
|
772
|
-
help()
|
773
|
-
else:
|
774
|
-
doc = self.doc_to_help(self.__class__)
|
775
|
-
if doc:
|
776
|
-
sys.stdout.write(doc)
|
777
|
-
sys.stdout.flush()
|
778
|
-
return None
|
779
|
-
|
780
|
-
#
|
781
|
-
|
782
|
-
def help_func(self):
|
783
|
-
help = """\
|
784
|
-
Usage: scons-time func [OPTIONS] FILE [...]
|
785
|
-
|
786
|
-
-C DIR, --chdir=DIR Change to DIR before looking for files
|
787
|
-
-f FILE, --file=FILE Read configuration from specified FILE
|
788
|
-
--fmt=FORMAT, --format=FORMAT Print data in specified FORMAT
|
789
|
-
--func=NAME, --function=NAME Report time for function NAME
|
790
|
-
-h, --help Print this help and exit
|
791
|
-
-p STRING, --prefix=STRING Use STRING as log file/profile prefix
|
792
|
-
-t NUMBER, --tail=NUMBER Only report the last NUMBER files
|
793
|
-
--title=TITLE Specify the output plot TITLE
|
794
|
-
"""
|
795
|
-
sys.stdout.write(self.outdent(help))
|
796
|
-
sys.stdout.flush()
|
797
|
-
|
798
|
-
def do_func(self, argv):
|
799
|
-
"""
|
800
|
-
"""
|
801
|
-
format = 'ascii'
|
802
|
-
function_name = '_main'
|
803
|
-
tail = None
|
804
|
-
|
805
|
-
short_opts = '?C:f:hp:t:'
|
806
|
-
|
807
|
-
long_opts = [
|
808
|
-
'chdir=',
|
809
|
-
'file=',
|
810
|
-
'fmt=',
|
811
|
-
'format=',
|
812
|
-
'func=',
|
813
|
-
'function=',
|
814
|
-
'help',
|
815
|
-
'prefix=',
|
816
|
-
'tail=',
|
817
|
-
'title=',
|
818
|
-
]
|
819
|
-
|
820
|
-
opts, args = getopt.getopt(argv[1:], short_opts, long_opts)
|
821
|
-
|
822
|
-
for o, a in opts:
|
823
|
-
if o in ('-C', '--chdir'):
|
824
|
-
self.chdir = a
|
825
|
-
elif o in ('-f', '--file'):
|
826
|
-
self.config_file = a
|
827
|
-
elif o in ('--fmt', '--format'):
|
828
|
-
format = a
|
829
|
-
elif o in ('--func', '--function'):
|
830
|
-
function_name = a
|
831
|
-
elif o in ('-?', '-h', '--help'):
|
832
|
-
self.do_help(['help', 'func'])
|
833
|
-
sys.exit(0)
|
834
|
-
elif o in ('--max',):
|
835
|
-
max_time = int(a)
|
836
|
-
elif o in ('-p', '--prefix'):
|
837
|
-
self.prefix = a
|
838
|
-
elif o in ('-t', '--tail'):
|
839
|
-
tail = int(a)
|
840
|
-
elif o in ('--title',):
|
841
|
-
self.title = a
|
842
|
-
|
843
|
-
if self.config_file:
|
844
|
-
exec open(self.config_file, 'rU').read() in self.__dict__
|
845
|
-
|
846
|
-
if self.chdir:
|
847
|
-
os.chdir(self.chdir)
|
848
|
-
|
849
|
-
if not args:
|
850
|
-
|
851
|
-
pattern = '%s*.prof' % self.prefix
|
852
|
-
args = self.args_to_files([pattern], tail)
|
853
|
-
|
854
|
-
if not args:
|
855
|
-
if self.chdir:
|
856
|
-
directory = self.chdir
|
857
|
-
else:
|
858
|
-
directory = os.getcwd()
|
859
|
-
|
860
|
-
sys.stderr.write('%s: func: No arguments specified.\n' % self.name)
|
861
|
-
sys.stderr.write('%s No %s*.prof files found in "%s".\n' % (self.name_spaces, self.prefix, directory))
|
862
|
-
sys.stderr.write('%s Type "%s help func" for help.\n' % (self.name_spaces, self.name))
|
863
|
-
sys.exit(1)
|
864
|
-
|
865
|
-
else:
|
866
|
-
|
867
|
-
args = self.args_to_files(args, tail)
|
868
|
-
|
869
|
-
cwd_ = os.getcwd() + os.sep
|
870
|
-
|
871
|
-
if format == 'ascii':
|
872
|
-
|
873
|
-
for file in args:
|
874
|
-
try:
|
875
|
-
f, line, func, time = \
|
876
|
-
self.get_function_profile(file, function_name)
|
877
|
-
except ValueError, e:
|
878
|
-
sys.stderr.write("%s: func: %s: %s\n" %
|
879
|
-
(self.name, file, e))
|
880
|
-
else:
|
881
|
-
if f.startswith(cwd_):
|
882
|
-
f = f[len(cwd_):]
|
883
|
-
print "%.3f %s:%d(%s)" % (time, f, line, func)
|
884
|
-
|
885
|
-
elif format == 'gnuplot':
|
886
|
-
|
887
|
-
results = self.collect_results(args, self.get_function_time,
|
888
|
-
function_name)
|
889
|
-
|
890
|
-
self.gnuplot_results(results)
|
891
|
-
|
892
|
-
else:
|
893
|
-
|
894
|
-
sys.stderr.write('%s: func: Unknown format "%s".\n' % (self.name, format))
|
895
|
-
sys.exit(1)
|
896
|
-
|
897
|
-
#
|
898
|
-
|
899
|
-
def help_mem(self):
|
900
|
-
help = """\
|
901
|
-
Usage: scons-time mem [OPTIONS] FILE [...]
|
902
|
-
|
903
|
-
-C DIR, --chdir=DIR Change to DIR before looking for files
|
904
|
-
-f FILE, --file=FILE Read configuration from specified FILE
|
905
|
-
--fmt=FORMAT, --format=FORMAT Print data in specified FORMAT
|
906
|
-
-h, --help Print this help and exit
|
907
|
-
-p STRING, --prefix=STRING Use STRING as log file/profile prefix
|
908
|
-
--stage=STAGE Plot memory at the specified stage:
|
909
|
-
pre-read, post-read, pre-build,
|
910
|
-
post-build (default: post-build)
|
911
|
-
-t NUMBER, --tail=NUMBER Only report the last NUMBER files
|
912
|
-
--title=TITLE Specify the output plot TITLE
|
913
|
-
"""
|
914
|
-
sys.stdout.write(self.outdent(help))
|
915
|
-
sys.stdout.flush()
|
916
|
-
|
917
|
-
def do_mem(self, argv):
|
918
|
-
|
919
|
-
format = 'ascii'
|
920
|
-
logfile_path = lambda x: x
|
921
|
-
stage = self.default_stage
|
922
|
-
tail = None
|
923
|
-
|
924
|
-
short_opts = '?C:f:hp:t:'
|
925
|
-
|
926
|
-
long_opts = [
|
927
|
-
'chdir=',
|
928
|
-
'file=',
|
929
|
-
'fmt=',
|
930
|
-
'format=',
|
931
|
-
'help',
|
932
|
-
'prefix=',
|
933
|
-
'stage=',
|
934
|
-
'tail=',
|
935
|
-
'title=',
|
936
|
-
]
|
937
|
-
|
938
|
-
opts, args = getopt.getopt(argv[1:], short_opts, long_opts)
|
939
|
-
|
940
|
-
for o, a in opts:
|
941
|
-
if o in ('-C', '--chdir'):
|
942
|
-
self.chdir = a
|
943
|
-
elif o in ('-f', '--file'):
|
944
|
-
self.config_file = a
|
945
|
-
elif o in ('--fmt', '--format'):
|
946
|
-
format = a
|
947
|
-
elif o in ('-?', '-h', '--help'):
|
948
|
-
self.do_help(['help', 'mem'])
|
949
|
-
sys.exit(0)
|
950
|
-
elif o in ('-p', '--prefix'):
|
951
|
-
self.prefix = a
|
952
|
-
elif o in ('--stage',):
|
953
|
-
if not a in self.stages:
|
954
|
-
sys.stderr.write('%s: mem: Unrecognized stage "%s".\n' % (self.name, a))
|
955
|
-
sys.exit(1)
|
956
|
-
stage = a
|
957
|
-
elif o in ('-t', '--tail'):
|
958
|
-
tail = int(a)
|
959
|
-
elif o in ('--title',):
|
960
|
-
self.title = a
|
961
|
-
|
962
|
-
if self.config_file:
|
963
|
-
HACK_for_exec(open(self.config_file, 'rU').read(), self.__dict__)
|
964
|
-
|
965
|
-
if self.chdir:
|
966
|
-
os.chdir(self.chdir)
|
967
|
-
logfile_path = lambda x, c=self.chdir: os.path.join(c, x)
|
968
|
-
|
969
|
-
if not args:
|
970
|
-
|
971
|
-
pattern = '%s*.log' % self.prefix
|
972
|
-
args = self.args_to_files([pattern], tail)
|
973
|
-
|
974
|
-
if not args:
|
975
|
-
if self.chdir:
|
976
|
-
directory = self.chdir
|
977
|
-
else:
|
978
|
-
directory = os.getcwd()
|
979
|
-
|
980
|
-
sys.stderr.write('%s: mem: No arguments specified.\n' % self.name)
|
981
|
-
sys.stderr.write('%s No %s*.log files found in "%s".\n' % (self.name_spaces, self.prefix, directory))
|
982
|
-
sys.stderr.write('%s Type "%s help mem" for help.\n' % (self.name_spaces, self.name))
|
983
|
-
sys.exit(1)
|
984
|
-
|
985
|
-
else:
|
986
|
-
|
987
|
-
args = self.args_to_files(args, tail)
|
988
|
-
|
989
|
-
cwd_ = os.getcwd() + os.sep
|
990
|
-
|
991
|
-
if format == 'ascii':
|
992
|
-
|
993
|
-
self.ascii_table(args, tuple(self.stages), self.get_memory, logfile_path)
|
994
|
-
|
995
|
-
elif format == 'gnuplot':
|
996
|
-
|
997
|
-
results = self.collect_results(args, self.get_memory,
|
998
|
-
self.stage_strings[stage])
|
999
|
-
|
1000
|
-
self.gnuplot_results(results)
|
1001
|
-
|
1002
|
-
else:
|
1003
|
-
|
1004
|
-
sys.stderr.write('%s: mem: Unknown format "%s".\n' % (self.name, format))
|
1005
|
-
sys.exit(1)
|
1006
|
-
|
1007
|
-
return 0
|
1008
|
-
|
1009
|
-
#
|
1010
|
-
|
1011
|
-
def help_obj(self):
|
1012
|
-
help = """\
|
1013
|
-
Usage: scons-time obj [OPTIONS] OBJECT FILE [...]
|
1014
|
-
|
1015
|
-
-C DIR, --chdir=DIR Change to DIR before looking for files
|
1016
|
-
-f FILE, --file=FILE Read configuration from specified FILE
|
1017
|
-
--fmt=FORMAT, --format=FORMAT Print data in specified FORMAT
|
1018
|
-
-h, --help Print this help and exit
|
1019
|
-
-p STRING, --prefix=STRING Use STRING as log file/profile prefix
|
1020
|
-
--stage=STAGE Plot memory at the specified stage:
|
1021
|
-
pre-read, post-read, pre-build,
|
1022
|
-
post-build (default: post-build)
|
1023
|
-
-t NUMBER, --tail=NUMBER Only report the last NUMBER files
|
1024
|
-
--title=TITLE Specify the output plot TITLE
|
1025
|
-
"""
|
1026
|
-
sys.stdout.write(self.outdent(help))
|
1027
|
-
sys.stdout.flush()
|
1028
|
-
|
1029
|
-
def do_obj(self, argv):
|
1030
|
-
|
1031
|
-
format = 'ascii'
|
1032
|
-
logfile_path = lambda x: x
|
1033
|
-
stage = self.default_stage
|
1034
|
-
tail = None
|
1035
|
-
|
1036
|
-
short_opts = '?C:f:hp:t:'
|
1037
|
-
|
1038
|
-
long_opts = [
|
1039
|
-
'chdir=',
|
1040
|
-
'file=',
|
1041
|
-
'fmt=',
|
1042
|
-
'format=',
|
1043
|
-
'help',
|
1044
|
-
'prefix=',
|
1045
|
-
'stage=',
|
1046
|
-
'tail=',
|
1047
|
-
'title=',
|
1048
|
-
]
|
1049
|
-
|
1050
|
-
opts, args = getopt.getopt(argv[1:], short_opts, long_opts)
|
1051
|
-
|
1052
|
-
for o, a in opts:
|
1053
|
-
if o in ('-C', '--chdir'):
|
1054
|
-
self.chdir = a
|
1055
|
-
elif o in ('-f', '--file'):
|
1056
|
-
self.config_file = a
|
1057
|
-
elif o in ('--fmt', '--format'):
|
1058
|
-
format = a
|
1059
|
-
elif o in ('-?', '-h', '--help'):
|
1060
|
-
self.do_help(['help', 'obj'])
|
1061
|
-
sys.exit(0)
|
1062
|
-
elif o in ('-p', '--prefix'):
|
1063
|
-
self.prefix = a
|
1064
|
-
elif o in ('--stage',):
|
1065
|
-
if not a in self.stages:
|
1066
|
-
sys.stderr.write('%s: obj: Unrecognized stage "%s".\n' % (self.name, a))
|
1067
|
-
sys.stderr.write('%s Type "%s help obj" for help.\n' % (self.name_spaces, self.name))
|
1068
|
-
sys.exit(1)
|
1069
|
-
stage = a
|
1070
|
-
elif o in ('-t', '--tail'):
|
1071
|
-
tail = int(a)
|
1072
|
-
elif o in ('--title',):
|
1073
|
-
self.title = a
|
1074
|
-
|
1075
|
-
if not args:
|
1076
|
-
sys.stderr.write('%s: obj: Must specify an object name.\n' % self.name)
|
1077
|
-
sys.stderr.write('%s Type "%s help obj" for help.\n' % (self.name_spaces, self.name))
|
1078
|
-
sys.exit(1)
|
1079
|
-
|
1080
|
-
object_name = args.pop(0)
|
1081
|
-
|
1082
|
-
if self.config_file:
|
1083
|
-
HACK_for_exec(open(self.config_file, 'rU').read(), self.__dict__)
|
1084
|
-
|
1085
|
-
if self.chdir:
|
1086
|
-
os.chdir(self.chdir)
|
1087
|
-
logfile_path = lambda x, c=self.chdir: os.path.join(c, x)
|
1088
|
-
|
1089
|
-
if not args:
|
1090
|
-
|
1091
|
-
pattern = '%s*.log' % self.prefix
|
1092
|
-
args = self.args_to_files([pattern], tail)
|
1093
|
-
|
1094
|
-
if not args:
|
1095
|
-
if self.chdir:
|
1096
|
-
directory = self.chdir
|
1097
|
-
else:
|
1098
|
-
directory = os.getcwd()
|
1099
|
-
|
1100
|
-
sys.stderr.write('%s: obj: No arguments specified.\n' % self.name)
|
1101
|
-
sys.stderr.write('%s No %s*.log files found in "%s".\n' % (self.name_spaces, self.prefix, directory))
|
1102
|
-
sys.stderr.write('%s Type "%s help obj" for help.\n' % (self.name_spaces, self.name))
|
1103
|
-
sys.exit(1)
|
1104
|
-
|
1105
|
-
else:
|
1106
|
-
|
1107
|
-
args = self.args_to_files(args, tail)
|
1108
|
-
|
1109
|
-
cwd_ = os.getcwd() + os.sep
|
1110
|
-
|
1111
|
-
if format == 'ascii':
|
1112
|
-
|
1113
|
-
self.ascii_table(args, tuple(self.stages), self.get_object_counts, logfile_path, object_name)
|
1114
|
-
|
1115
|
-
elif format == 'gnuplot':
|
1116
|
-
|
1117
|
-
stage_index = 0
|
1118
|
-
for s in self.stages:
|
1119
|
-
if stage == s:
|
1120
|
-
break
|
1121
|
-
stage_index = stage_index + 1
|
1122
|
-
|
1123
|
-
results = self.collect_results(args, self.get_object_counts,
|
1124
|
-
object_name, stage_index)
|
1125
|
-
|
1126
|
-
self.gnuplot_results(results)
|
1127
|
-
|
1128
|
-
else:
|
1129
|
-
|
1130
|
-
sys.stderr.write('%s: obj: Unknown format "%s".\n' % (self.name, format))
|
1131
|
-
sys.exit(1)
|
1132
|
-
|
1133
|
-
return 0
|
1134
|
-
|
1135
|
-
#
|
1136
|
-
|
1137
|
-
def help_run(self):
|
1138
|
-
help = """\
|
1139
|
-
Usage: scons-time run [OPTIONS] [FILE ...]
|
1140
|
-
|
1141
|
-
--aegis=PROJECT Use SCons from the Aegis PROJECT
|
1142
|
-
--chdir=DIR Name of unpacked directory for chdir
|
1143
|
-
-f FILE, --file=FILE Read configuration from specified FILE
|
1144
|
-
-h, --help Print this help and exit
|
1145
|
-
-n, --no-exec No execute, just print command lines
|
1146
|
-
--number=NUMBER Put output in files for run NUMBER
|
1147
|
-
--outdir=OUTDIR Put output files in OUTDIR
|
1148
|
-
-p STRING, --prefix=STRING Use STRING as log file/profile prefix
|
1149
|
-
--python=PYTHON Time using the specified PYTHON
|
1150
|
-
-q, --quiet Don't print command lines
|
1151
|
-
--scons=SCONS Time using the specified SCONS
|
1152
|
-
--svn=URL, --subversion=URL Use SCons from Subversion URL
|
1153
|
-
-v, --verbose Display output of commands
|
1154
|
-
"""
|
1155
|
-
sys.stdout.write(self.outdent(help))
|
1156
|
-
sys.stdout.flush()
|
1157
|
-
|
1158
|
-
def do_run(self, argv):
|
1159
|
-
"""
|
1160
|
-
"""
|
1161
|
-
run_number_list = [None]
|
1162
|
-
|
1163
|
-
short_opts = '?f:hnp:qs:v'
|
1164
|
-
|
1165
|
-
long_opts = [
|
1166
|
-
'aegis=',
|
1167
|
-
'file=',
|
1168
|
-
'help',
|
1169
|
-
'no-exec',
|
1170
|
-
'number=',
|
1171
|
-
'outdir=',
|
1172
|
-
'prefix=',
|
1173
|
-
'python=',
|
1174
|
-
'quiet',
|
1175
|
-
'scons=',
|
1176
|
-
'svn=',
|
1177
|
-
'subdir=',
|
1178
|
-
'subversion=',
|
1179
|
-
'verbose',
|
1180
|
-
]
|
1181
|
-
|
1182
|
-
opts, args = getopt.getopt(argv[1:], short_opts, long_opts)
|
1183
|
-
|
1184
|
-
for o, a in opts:
|
1185
|
-
if o in ('--aegis',):
|
1186
|
-
self.aegis_project = a
|
1187
|
-
elif o in ('-f', '--file'):
|
1188
|
-
self.config_file = a
|
1189
|
-
elif o in ('-?', '-h', '--help'):
|
1190
|
-
self.do_help(['help', 'run'])
|
1191
|
-
sys.exit(0)
|
1192
|
-
elif o in ('-n', '--no-exec'):
|
1193
|
-
self.execute = self._do_not_execute
|
1194
|
-
elif o in ('--number',):
|
1195
|
-
run_number_list = self.split_run_numbers(a)
|
1196
|
-
elif o in ('--outdir',):
|
1197
|
-
self.outdir = a
|
1198
|
-
elif o in ('-p', '--prefix'):
|
1199
|
-
self.prefix = a
|
1200
|
-
elif o in ('--python',):
|
1201
|
-
self.python = a
|
1202
|
-
elif o in ('-q', '--quiet'):
|
1203
|
-
self.display = self._do_not_display
|
1204
|
-
elif o in ('-s', '--subdir'):
|
1205
|
-
self.subdir = a
|
1206
|
-
elif o in ('--scons',):
|
1207
|
-
self.scons = a
|
1208
|
-
elif o in ('--svn', '--subversion'):
|
1209
|
-
self.subversion_url = a
|
1210
|
-
elif o in ('-v', '--verbose'):
|
1211
|
-
self.redirect = tee_to_file
|
1212
|
-
self.verbose = True
|
1213
|
-
self.svn_co_flag = ''
|
1214
|
-
|
1215
|
-
if not args and not self.config_file:
|
1216
|
-
sys.stderr.write('%s: run: No arguments or -f config file specified.\n' % self.name)
|
1217
|
-
sys.stderr.write('%s Type "%s help run" for help.\n' % (self.name_spaces, self.name))
|
1218
|
-
sys.exit(1)
|
1219
|
-
|
1220
|
-
if self.config_file:
|
1221
|
-
exec open(self.config_file, 'rU').read() in self.__dict__
|
1222
|
-
|
1223
|
-
if args:
|
1224
|
-
self.archive_list = args
|
1225
|
-
|
1226
|
-
archive_file_name = os.path.split(self.archive_list[0])[1]
|
1227
|
-
|
1228
|
-
if not self.subdir:
|
1229
|
-
self.subdir = self.archive_splitext(archive_file_name)[0]
|
1230
|
-
|
1231
|
-
if not self.prefix:
|
1232
|
-
self.prefix = self.archive_splitext(archive_file_name)[0]
|
1233
|
-
|
1234
|
-
prepare = None
|
1235
|
-
if self.subversion_url:
|
1236
|
-
prepare = self.prep_subversion_run
|
1237
|
-
elif self.aegis_project:
|
1238
|
-
prepare = self.prep_aegis_run
|
1239
|
-
|
1240
|
-
for run_number in run_number_list:
|
1241
|
-
self.individual_run(run_number, self.archive_list, prepare)
|
1242
|
-
|
1243
|
-
def split_run_numbers(self, s):
|
1244
|
-
result = []
|
1245
|
-
for n in s.split(','):
|
1246
|
-
try:
|
1247
|
-
x, y = n.split('-')
|
1248
|
-
except ValueError:
|
1249
|
-
result.append(int(n))
|
1250
|
-
else:
|
1251
|
-
result.extend(range(int(x), int(y)+1))
|
1252
|
-
return result
|
1253
|
-
|
1254
|
-
def scons_path(self, dir):
|
1255
|
-
return os.path.join(dir, 'src', 'script', 'scons.py')
|
1256
|
-
|
1257
|
-
def scons_lib_dir_path(self, dir):
|
1258
|
-
return os.path.join(dir, 'src', 'engine')
|
1259
|
-
|
1260
|
-
def prep_aegis_run(self, commands, removals):
|
1261
|
-
self.aegis_tmpdir = make_temp_file(prefix = self.name + '-aegis-')
|
1262
|
-
removals.append((shutil.rmtree, 'rm -rf %%s', self.aegis_tmpdir))
|
1263
|
-
|
1264
|
-
self.aegis_parent_project = os.path.splitext(self.aegis_project)[0]
|
1265
|
-
self.scons = self.scons_path(self.aegis_tmpdir)
|
1266
|
-
self.scons_lib_dir = self.scons_lib_dir_path(self.aegis_tmpdir)
|
1267
|
-
|
1268
|
-
commands.extend([
|
1269
|
-
'mkdir %(aegis_tmpdir)s',
|
1270
|
-
(lambda: os.chdir(self.aegis_tmpdir), 'cd %(aegis_tmpdir)s'),
|
1271
|
-
'%(aegis)s -cp -ind -p %(aegis_parent_project)s .',
|
1272
|
-
'%(aegis)s -cp -ind -p %(aegis_project)s -delta %(run_number)s .',
|
1273
|
-
])
|
1274
|
-
|
1275
|
-
def prep_subversion_run(self, commands, removals):
|
1276
|
-
self.svn_tmpdir = make_temp_file(prefix = self.name + '-svn-')
|
1277
|
-
removals.append((shutil.rmtree, 'rm -rf %%s', self.svn_tmpdir))
|
1278
|
-
|
1279
|
-
self.scons = self.scons_path(self.svn_tmpdir)
|
1280
|
-
self.scons_lib_dir = self.scons_lib_dir_path(self.svn_tmpdir)
|
1281
|
-
|
1282
|
-
commands.extend([
|
1283
|
-
'mkdir %(svn_tmpdir)s',
|
1284
|
-
'%(svn)s co %(svn_co_flag)s -r %(run_number)s %(subversion_url)s %(svn_tmpdir)s',
|
1285
|
-
])
|
1286
|
-
|
1287
|
-
def individual_run(self, run_number, archive_list, prepare=None):
|
1288
|
-
"""
|
1289
|
-
Performs an individual run of the default SCons invocations.
|
1290
|
-
"""
|
1291
|
-
|
1292
|
-
commands = []
|
1293
|
-
removals = []
|
1294
|
-
|
1295
|
-
if prepare:
|
1296
|
-
prepare(commands, removals)
|
1297
|
-
|
1298
|
-
save_scons = self.scons
|
1299
|
-
save_scons_wrapper = self.scons_wrapper
|
1300
|
-
save_scons_lib_dir = self.scons_lib_dir
|
1301
|
-
|
1302
|
-
if self.outdir is None:
|
1303
|
-
self.outdir = self.orig_cwd
|
1304
|
-
elif not os.path.isabs(self.outdir):
|
1305
|
-
self.outdir = os.path.join(self.orig_cwd, self.outdir)
|
1306
|
-
|
1307
|
-
if self.scons is None:
|
1308
|
-
self.scons = self.scons_path(self.orig_cwd)
|
1309
|
-
|
1310
|
-
if self.scons_lib_dir is None:
|
1311
|
-
self.scons_lib_dir = self.scons_lib_dir_path(self.orig_cwd)
|
1312
|
-
|
1313
|
-
if self.scons_wrapper is None:
|
1314
|
-
self.scons_wrapper = self.scons
|
1315
|
-
|
1316
|
-
if not run_number:
|
1317
|
-
run_number = self.find_next_run_number(self.outdir, self.prefix)
|
1318
|
-
|
1319
|
-
self.run_number = str(run_number)
|
1320
|
-
|
1321
|
-
self.prefix_run = self.prefix + '-%03d' % run_number
|
1322
|
-
|
1323
|
-
if self.targets0 is None:
|
1324
|
-
self.targets0 = self.startup_targets
|
1325
|
-
if self.targets1 is None:
|
1326
|
-
self.targets1 = self.targets
|
1327
|
-
if self.targets2 is None:
|
1328
|
-
self.targets2 = self.targets
|
1329
|
-
|
1330
|
-
self.tmpdir = make_temp_file(prefix = self.name + '-')
|
1331
|
-
|
1332
|
-
commands.extend([
|
1333
|
-
'mkdir %(tmpdir)s',
|
1334
|
-
|
1335
|
-
(os.chdir, 'cd %%s', self.tmpdir),
|
1336
|
-
])
|
1337
|
-
|
1338
|
-
for archive in archive_list:
|
1339
|
-
if not os.path.isabs(archive):
|
1340
|
-
archive = os.path.join(self.orig_cwd, archive)
|
1341
|
-
if os.path.isdir(archive):
|
1342
|
-
dest = os.path.split(archive)[1]
|
1343
|
-
commands.append((shutil.copytree, 'cp -r %%s %%s', archive, dest))
|
1344
|
-
else:
|
1345
|
-
suffix = self.archive_splitext(archive)[1]
|
1346
|
-
unpack_command = self.unpack_map.get(suffix)
|
1347
|
-
if not unpack_command:
|
1348
|
-
dest = os.path.split(archive)[1]
|
1349
|
-
commands.append((shutil.copyfile, 'cp %%s %%s', archive, dest))
|
1350
|
-
else:
|
1351
|
-
commands.append(unpack_command + (archive,))
|
1352
|
-
|
1353
|
-
commands.extend([
|
1354
|
-
(os.chdir, 'cd %%s', self.subdir),
|
1355
|
-
])
|
1356
|
-
|
1357
|
-
commands.extend(self.initial_commands)
|
1358
|
-
|
1359
|
-
commands.extend([
|
1360
|
-
(lambda: read_tree('.'),
|
1361
|
-
'find * -type f | xargs cat > /dev/null'),
|
1362
|
-
|
1363
|
-
(self.set_env, 'export %%s=%%s',
|
1364
|
-
'SCONS_LIB_DIR', self.scons_lib_dir),
|
1365
|
-
|
1366
|
-
'%(python)s %(scons_wrapper)s --version',
|
1367
|
-
])
|
1368
|
-
|
1369
|
-
index = 0
|
1370
|
-
for run_command in self.run_commands:
|
1371
|
-
setattr(self, 'prof%d' % index, self.profile_name(index))
|
1372
|
-
c = (
|
1373
|
-
self.log_execute,
|
1374
|
-
self.log_display,
|
1375
|
-
run_command,
|
1376
|
-
self.logfile_name(index),
|
1377
|
-
)
|
1378
|
-
commands.append(c)
|
1379
|
-
index = index + 1
|
1380
|
-
|
1381
|
-
commands.extend([
|
1382
|
-
(os.chdir, 'cd %%s', self.orig_cwd),
|
1383
|
-
])
|
1384
|
-
|
1385
|
-
if not os.environ.get('PRESERVE'):
|
1386
|
-
commands.extend(removals)
|
1387
|
-
|
1388
|
-
commands.append((shutil.rmtree, 'rm -rf %%s', self.tmpdir))
|
1389
|
-
|
1390
|
-
self.run_command_list(commands, self.__dict__)
|
1391
|
-
|
1392
|
-
self.scons = save_scons
|
1393
|
-
self.scons_lib_dir = save_scons_lib_dir
|
1394
|
-
self.scons_wrapper = save_scons_wrapper
|
1395
|
-
|
1396
|
-
#
|
1397
|
-
|
1398
|
-
def help_time(self):
|
1399
|
-
help = """\
|
1400
|
-
Usage: scons-time time [OPTIONS] FILE [...]
|
1401
|
-
|
1402
|
-
-C DIR, --chdir=DIR Change to DIR before looking for files
|
1403
|
-
-f FILE, --file=FILE Read configuration from specified FILE
|
1404
|
-
--fmt=FORMAT, --format=FORMAT Print data in specified FORMAT
|
1405
|
-
-h, --help Print this help and exit
|
1406
|
-
-p STRING, --prefix=STRING Use STRING as log file/profile prefix
|
1407
|
-
-t NUMBER, --tail=NUMBER Only report the last NUMBER files
|
1408
|
-
--which=TIMER Plot timings for TIMER: total,
|
1409
|
-
SConscripts, SCons, commands.
|
1410
|
-
"""
|
1411
|
-
sys.stdout.write(self.outdent(help))
|
1412
|
-
sys.stdout.flush()
|
1413
|
-
|
1414
|
-
def do_time(self, argv):
|
1415
|
-
|
1416
|
-
format = 'ascii'
|
1417
|
-
logfile_path = lambda x: x
|
1418
|
-
tail = None
|
1419
|
-
which = 'total'
|
1420
|
-
|
1421
|
-
short_opts = '?C:f:hp:t:'
|
1422
|
-
|
1423
|
-
long_opts = [
|
1424
|
-
'chdir=',
|
1425
|
-
'file=',
|
1426
|
-
'fmt=',
|
1427
|
-
'format=',
|
1428
|
-
'help',
|
1429
|
-
'prefix=',
|
1430
|
-
'tail=',
|
1431
|
-
'title=',
|
1432
|
-
'which=',
|
1433
|
-
]
|
1434
|
-
|
1435
|
-
opts, args = getopt.getopt(argv[1:], short_opts, long_opts)
|
1436
|
-
|
1437
|
-
for o, a in opts:
|
1438
|
-
if o in ('-C', '--chdir'):
|
1439
|
-
self.chdir = a
|
1440
|
-
elif o in ('-f', '--file'):
|
1441
|
-
self.config_file = a
|
1442
|
-
elif o in ('--fmt', '--format'):
|
1443
|
-
format = a
|
1444
|
-
elif o in ('-?', '-h', '--help'):
|
1445
|
-
self.do_help(['help', 'time'])
|
1446
|
-
sys.exit(0)
|
1447
|
-
elif o in ('-p', '--prefix'):
|
1448
|
-
self.prefix = a
|
1449
|
-
elif o in ('-t', '--tail'):
|
1450
|
-
tail = int(a)
|
1451
|
-
elif o in ('--title',):
|
1452
|
-
self.title = a
|
1453
|
-
elif o in ('--which',):
|
1454
|
-
if not a in self.time_strings.keys():
|
1455
|
-
sys.stderr.write('%s: time: Unrecognized timer "%s".\n' % (self.name, a))
|
1456
|
-
sys.stderr.write('%s Type "%s help time" for help.\n' % (self.name_spaces, self.name))
|
1457
|
-
sys.exit(1)
|
1458
|
-
which = a
|
1459
|
-
|
1460
|
-
if self.config_file:
|
1461
|
-
HACK_for_exec(open(self.config_file, 'rU').read(), self.__dict__)
|
1462
|
-
|
1463
|
-
if self.chdir:
|
1464
|
-
os.chdir(self.chdir)
|
1465
|
-
logfile_path = lambda x, c=self.chdir: os.path.join(c, x)
|
1466
|
-
|
1467
|
-
if not args:
|
1468
|
-
|
1469
|
-
pattern = '%s*.log' % self.prefix
|
1470
|
-
args = self.args_to_files([pattern], tail)
|
1471
|
-
|
1472
|
-
if not args:
|
1473
|
-
if self.chdir:
|
1474
|
-
directory = self.chdir
|
1475
|
-
else:
|
1476
|
-
directory = os.getcwd()
|
1477
|
-
|
1478
|
-
sys.stderr.write('%s: time: No arguments specified.\n' % self.name)
|
1479
|
-
sys.stderr.write('%s No %s*.log files found in "%s".\n' % (self.name_spaces, self.prefix, directory))
|
1480
|
-
sys.stderr.write('%s Type "%s help time" for help.\n' % (self.name_spaces, self.name))
|
1481
|
-
sys.exit(1)
|
1482
|
-
|
1483
|
-
else:
|
1484
|
-
|
1485
|
-
args = self.args_to_files(args, tail)
|
1486
|
-
|
1487
|
-
cwd_ = os.getcwd() + os.sep
|
1488
|
-
|
1489
|
-
if format == 'ascii':
|
1490
|
-
|
1491
|
-
columns = ("Total", "SConscripts", "SCons", "commands")
|
1492
|
-
self.ascii_table(args, columns, self.get_debug_times, logfile_path)
|
1493
|
-
|
1494
|
-
elif format == 'gnuplot':
|
1495
|
-
|
1496
|
-
results = self.collect_results(args, self.get_debug_times,
|
1497
|
-
self.time_strings[which])
|
1498
|
-
|
1499
|
-
self.gnuplot_results(results, fmt='%s %.6f')
|
1500
|
-
|
1501
|
-
else:
|
1502
|
-
|
1503
|
-
sys.stderr.write('%s: time: Unknown format "%s".\n' % (self.name, format))
|
1504
|
-
sys.exit(1)
|
1505
|
-
|
1506
|
-
if __name__ == '__main__':
|
1507
|
-
opts, args = getopt.getopt(sys.argv[1:], 'h?V', ['help', 'version'])
|
1508
|
-
|
1509
|
-
ST = SConsTimer()
|
1510
|
-
|
1511
|
-
for o, a in opts:
|
1512
|
-
if o in ('-?', '-h', '--help'):
|
1513
|
-
ST.do_help(['help'])
|
1514
|
-
sys.exit(0)
|
1515
|
-
elif o in ('-V', '--version'):
|
1516
|
-
sys.stdout.write('scons-time version\n')
|
1517
|
-
sys.exit(0)
|
1518
|
-
|
1519
|
-
if not args:
|
1520
|
-
sys.stderr.write('Type "%s help" for usage.\n' % ST.name)
|
1521
|
-
sys.exit(1)
|
1522
|
-
|
1523
|
-
ST.execute_subcommand(args)
|
1524
|
-
|
1525
|
-
# Local Variables:
|
1526
|
-
# tab-width:4
|
1527
|
-
# indent-tabs-mode:nil
|
1528
|
-
# End:
|
1529
|
-
# vim: set expandtab tabstop=4 shiftwidth=4:
|