libv8 3.11.8.17 → 3.16.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +1 -2
- data/Gemfile +1 -1
- data/Rakefile +6 -7
- data/lib/libv8/version.rb +1 -1
- data/vendor/v8/.gitignore +24 -3
- data/vendor/v8/AUTHORS +7 -0
- data/vendor/v8/ChangeLog +839 -0
- data/vendor/v8/DEPS +1 -1
- data/vendor/v8/Makefile.android +92 -0
- data/vendor/v8/OWNERS +11 -0
- data/vendor/v8/PRESUBMIT.py +71 -0
- data/vendor/v8/SConstruct +34 -39
- data/vendor/v8/build/android.gypi +56 -37
- data/vendor/v8/build/common.gypi +112 -30
- data/vendor/v8/build/gyp_v8 +1 -1
- data/vendor/v8/build/standalone.gypi +15 -11
- data/vendor/v8/include/v8-debug.h +9 -1
- data/vendor/v8/include/v8-preparser.h +4 -3
- data/vendor/v8/include/v8-profiler.h +25 -25
- data/vendor/v8/include/v8-testing.h +4 -3
- data/vendor/v8/include/v8.h +994 -540
- data/vendor/v8/preparser/preparser-process.cc +3 -3
- data/vendor/v8/samples/lineprocessor.cc +20 -27
- data/vendor/v8/samples/process.cc +18 -14
- data/vendor/v8/samples/shell.cc +16 -15
- data/vendor/v8/src/SConscript +15 -14
- data/vendor/v8/src/accessors.cc +169 -77
- data/vendor/v8/src/accessors.h +4 -0
- data/vendor/v8/src/allocation-inl.h +2 -2
- data/vendor/v8/src/allocation.h +7 -7
- data/vendor/v8/src/api.cc +810 -497
- data/vendor/v8/src/api.h +85 -60
- data/vendor/v8/src/arm/assembler-arm-inl.h +179 -22
- data/vendor/v8/src/arm/assembler-arm.cc +633 -264
- data/vendor/v8/src/arm/assembler-arm.h +264 -197
- data/vendor/v8/src/arm/builtins-arm.cc +117 -27
- data/vendor/v8/src/arm/code-stubs-arm.cc +1241 -700
- data/vendor/v8/src/arm/code-stubs-arm.h +35 -138
- data/vendor/v8/src/arm/codegen-arm.cc +285 -16
- data/vendor/v8/src/arm/codegen-arm.h +22 -0
- data/vendor/v8/src/arm/constants-arm.cc +5 -3
- data/vendor/v8/src/arm/constants-arm.h +24 -11
- data/vendor/v8/src/arm/debug-arm.cc +3 -3
- data/vendor/v8/src/arm/deoptimizer-arm.cc +382 -92
- data/vendor/v8/src/arm/disasm-arm.cc +61 -12
- data/vendor/v8/src/arm/frames-arm.h +0 -14
- data/vendor/v8/src/arm/full-codegen-arm.cc +332 -304
- data/vendor/v8/src/arm/ic-arm.cc +180 -259
- data/vendor/v8/src/arm/lithium-arm.cc +364 -316
- data/vendor/v8/src/arm/lithium-arm.h +512 -275
- data/vendor/v8/src/arm/lithium-codegen-arm.cc +1768 -809
- data/vendor/v8/src/arm/lithium-codegen-arm.h +97 -35
- data/vendor/v8/src/arm/lithium-gap-resolver-arm.cc +12 -5
- data/vendor/v8/src/arm/macro-assembler-arm.cc +439 -228
- data/vendor/v8/src/arm/macro-assembler-arm.h +116 -70
- data/vendor/v8/src/arm/regexp-macro-assembler-arm.cc +54 -44
- data/vendor/v8/src/arm/regexp-macro-assembler-arm.h +3 -10
- data/vendor/v8/src/arm/simulator-arm.cc +272 -238
- data/vendor/v8/src/arm/simulator-arm.h +38 -8
- data/vendor/v8/src/arm/stub-cache-arm.cc +522 -895
- data/vendor/v8/src/array.js +101 -70
- data/vendor/v8/src/assembler.cc +270 -19
- data/vendor/v8/src/assembler.h +110 -15
- data/vendor/v8/src/ast.cc +79 -69
- data/vendor/v8/src/ast.h +255 -301
- data/vendor/v8/src/atomicops.h +7 -1
- data/vendor/v8/src/atomicops_internals_tsan.h +335 -0
- data/vendor/v8/src/bootstrapper.cc +481 -418
- data/vendor/v8/src/bootstrapper.h +4 -4
- data/vendor/v8/src/builtins.cc +498 -311
- data/vendor/v8/src/builtins.h +75 -47
- data/vendor/v8/src/checks.cc +2 -1
- data/vendor/v8/src/checks.h +8 -0
- data/vendor/v8/src/code-stubs-hydrogen.cc +253 -0
- data/vendor/v8/src/code-stubs.cc +249 -84
- data/vendor/v8/src/code-stubs.h +501 -169
- data/vendor/v8/src/codegen.cc +36 -18
- data/vendor/v8/src/codegen.h +25 -3
- data/vendor/v8/src/collection.js +54 -17
- data/vendor/v8/src/compilation-cache.cc +24 -16
- data/vendor/v8/src/compilation-cache.h +15 -6
- data/vendor/v8/src/compiler.cc +497 -195
- data/vendor/v8/src/compiler.h +246 -38
- data/vendor/v8/src/contexts.cc +64 -24
- data/vendor/v8/src/contexts.h +60 -29
- data/vendor/v8/src/conversions-inl.h +24 -14
- data/vendor/v8/src/conversions.h +7 -4
- data/vendor/v8/src/counters.cc +21 -12
- data/vendor/v8/src/counters.h +44 -16
- data/vendor/v8/src/cpu-profiler.h +1 -1
- data/vendor/v8/src/d8-debug.cc +2 -2
- data/vendor/v8/src/d8-readline.cc +13 -2
- data/vendor/v8/src/d8.cc +681 -273
- data/vendor/v8/src/d8.gyp +4 -4
- data/vendor/v8/src/d8.h +38 -18
- data/vendor/v8/src/d8.js +0 -617
- data/vendor/v8/src/data-flow.h +55 -0
- data/vendor/v8/src/date.js +1 -42
- data/vendor/v8/src/dateparser-inl.h +5 -1
- data/vendor/v8/src/debug-agent.cc +10 -15
- data/vendor/v8/src/debug-debugger.js +147 -149
- data/vendor/v8/src/debug.cc +323 -164
- data/vendor/v8/src/debug.h +26 -14
- data/vendor/v8/src/deoptimizer.cc +765 -290
- data/vendor/v8/src/deoptimizer.h +130 -28
- data/vendor/v8/src/disassembler.cc +10 -4
- data/vendor/v8/src/elements-kind.cc +7 -2
- data/vendor/v8/src/elements-kind.h +19 -0
- data/vendor/v8/src/elements.cc +607 -285
- data/vendor/v8/src/elements.h +36 -13
- data/vendor/v8/src/execution.cc +52 -31
- data/vendor/v8/src/execution.h +4 -4
- data/vendor/v8/src/extensions/externalize-string-extension.cc +5 -4
- data/vendor/v8/src/extensions/gc-extension.cc +5 -1
- data/vendor/v8/src/extensions/statistics-extension.cc +153 -0
- data/vendor/v8/src/{inspector.h → extensions/statistics-extension.h} +12 -23
- data/vendor/v8/src/factory.cc +101 -134
- data/vendor/v8/src/factory.h +36 -31
- data/vendor/v8/src/flag-definitions.h +102 -25
- data/vendor/v8/src/flags.cc +9 -5
- data/vendor/v8/src/frames-inl.h +10 -0
- data/vendor/v8/src/frames.cc +116 -26
- data/vendor/v8/src/frames.h +96 -12
- data/vendor/v8/src/full-codegen.cc +219 -74
- data/vendor/v8/src/full-codegen.h +63 -21
- data/vendor/v8/src/func-name-inferrer.cc +8 -7
- data/vendor/v8/src/func-name-inferrer.h +5 -3
- data/vendor/v8/src/gdb-jit.cc +71 -57
- data/vendor/v8/src/global-handles.cc +230 -101
- data/vendor/v8/src/global-handles.h +26 -27
- data/vendor/v8/src/globals.h +17 -19
- data/vendor/v8/src/handles-inl.h +59 -12
- data/vendor/v8/src/handles.cc +180 -200
- data/vendor/v8/src/handles.h +80 -11
- data/vendor/v8/src/hashmap.h +60 -40
- data/vendor/v8/src/heap-inl.h +107 -45
- data/vendor/v8/src/heap-profiler.cc +38 -19
- data/vendor/v8/src/heap-profiler.h +24 -14
- data/vendor/v8/src/heap.cc +1123 -738
- data/vendor/v8/src/heap.h +385 -146
- data/vendor/v8/src/hydrogen-instructions.cc +700 -217
- data/vendor/v8/src/hydrogen-instructions.h +1158 -472
- data/vendor/v8/src/hydrogen.cc +3319 -1662
- data/vendor/v8/src/hydrogen.h +411 -170
- data/vendor/v8/src/ia32/assembler-ia32-inl.h +46 -16
- data/vendor/v8/src/ia32/assembler-ia32.cc +131 -61
- data/vendor/v8/src/ia32/assembler-ia32.h +115 -57
- data/vendor/v8/src/ia32/builtins-ia32.cc +99 -5
- data/vendor/v8/src/ia32/code-stubs-ia32.cc +787 -495
- data/vendor/v8/src/ia32/code-stubs-ia32.h +10 -100
- data/vendor/v8/src/ia32/codegen-ia32.cc +227 -23
- data/vendor/v8/src/ia32/codegen-ia32.h +14 -0
- data/vendor/v8/src/ia32/deoptimizer-ia32.cc +428 -87
- data/vendor/v8/src/ia32/disasm-ia32.cc +28 -1
- data/vendor/v8/src/ia32/frames-ia32.h +6 -16
- data/vendor/v8/src/ia32/full-codegen-ia32.cc +280 -272
- data/vendor/v8/src/ia32/ic-ia32.cc +150 -250
- data/vendor/v8/src/ia32/lithium-codegen-ia32.cc +1600 -517
- data/vendor/v8/src/ia32/lithium-codegen-ia32.h +90 -24
- data/vendor/v8/src/ia32/lithium-gap-resolver-ia32.cc +10 -6
- data/vendor/v8/src/ia32/lithium-gap-resolver-ia32.h +2 -2
- data/vendor/v8/src/ia32/lithium-ia32.cc +405 -302
- data/vendor/v8/src/ia32/lithium-ia32.h +526 -271
- data/vendor/v8/src/ia32/macro-assembler-ia32.cc +378 -119
- data/vendor/v8/src/ia32/macro-assembler-ia32.h +62 -28
- data/vendor/v8/src/ia32/regexp-macro-assembler-ia32.cc +43 -30
- data/vendor/v8/src/ia32/regexp-macro-assembler-ia32.h +2 -10
- data/vendor/v8/src/ia32/stub-cache-ia32.cc +492 -678
- data/vendor/v8/src/ic-inl.h +9 -4
- data/vendor/v8/src/ic.cc +836 -923
- data/vendor/v8/src/ic.h +228 -247
- data/vendor/v8/src/incremental-marking-inl.h +26 -30
- data/vendor/v8/src/incremental-marking.cc +276 -248
- data/vendor/v8/src/incremental-marking.h +29 -37
- data/vendor/v8/src/interface.cc +34 -25
- data/vendor/v8/src/interface.h +69 -25
- data/vendor/v8/src/interpreter-irregexp.cc +2 -2
- data/vendor/v8/src/isolate.cc +382 -76
- data/vendor/v8/src/isolate.h +109 -56
- data/vendor/v8/src/json-parser.h +217 -104
- data/vendor/v8/src/json-stringifier.h +745 -0
- data/vendor/v8/src/json.js +10 -132
- data/vendor/v8/src/jsregexp-inl.h +106 -0
- data/vendor/v8/src/jsregexp.cc +517 -285
- data/vendor/v8/src/jsregexp.h +145 -117
- data/vendor/v8/src/list-inl.h +35 -22
- data/vendor/v8/src/list.h +46 -19
- data/vendor/v8/src/lithium-allocator-inl.h +22 -2
- data/vendor/v8/src/lithium-allocator.cc +85 -70
- data/vendor/v8/src/lithium-allocator.h +21 -39
- data/vendor/v8/src/lithium.cc +259 -5
- data/vendor/v8/src/lithium.h +131 -32
- data/vendor/v8/src/liveedit-debugger.js +52 -3
- data/vendor/v8/src/liveedit.cc +393 -113
- data/vendor/v8/src/liveedit.h +7 -3
- data/vendor/v8/src/log-utils.cc +4 -2
- data/vendor/v8/src/log.cc +170 -140
- data/vendor/v8/src/log.h +62 -11
- data/vendor/v8/src/macro-assembler.h +17 -0
- data/vendor/v8/src/macros.py +2 -0
- data/vendor/v8/src/mark-compact-inl.h +3 -23
- data/vendor/v8/src/mark-compact.cc +801 -830
- data/vendor/v8/src/mark-compact.h +154 -47
- data/vendor/v8/src/marking-thread.cc +85 -0
- data/vendor/v8/src/{inspector.cc → marking-thread.h} +32 -24
- data/vendor/v8/src/math.js +12 -18
- data/vendor/v8/src/messages.cc +18 -8
- data/vendor/v8/src/messages.js +314 -261
- data/vendor/v8/src/mips/assembler-mips-inl.h +58 -6
- data/vendor/v8/src/mips/assembler-mips.cc +92 -75
- data/vendor/v8/src/mips/assembler-mips.h +54 -60
- data/vendor/v8/src/mips/builtins-mips.cc +116 -17
- data/vendor/v8/src/mips/code-stubs-mips.cc +919 -556
- data/vendor/v8/src/mips/code-stubs-mips.h +22 -131
- data/vendor/v8/src/mips/codegen-mips.cc +281 -6
- data/vendor/v8/src/mips/codegen-mips.h +22 -0
- data/vendor/v8/src/mips/constants-mips.cc +2 -0
- data/vendor/v8/src/mips/constants-mips.h +12 -2
- data/vendor/v8/src/mips/deoptimizer-mips.cc +286 -50
- data/vendor/v8/src/mips/disasm-mips.cc +13 -0
- data/vendor/v8/src/mips/full-codegen-mips.cc +297 -284
- data/vendor/v8/src/mips/ic-mips.cc +182 -263
- data/vendor/v8/src/mips/lithium-codegen-mips.cc +1208 -556
- data/vendor/v8/src/mips/lithium-codegen-mips.h +72 -19
- data/vendor/v8/src/mips/lithium-gap-resolver-mips.cc +9 -2
- data/vendor/v8/src/mips/lithium-mips.cc +290 -302
- data/vendor/v8/src/mips/lithium-mips.h +463 -266
- data/vendor/v8/src/mips/macro-assembler-mips.cc +208 -115
- data/vendor/v8/src/mips/macro-assembler-mips.h +67 -24
- data/vendor/v8/src/mips/regexp-macro-assembler-mips.cc +40 -25
- data/vendor/v8/src/mips/regexp-macro-assembler-mips.h +3 -9
- data/vendor/v8/src/mips/simulator-mips.cc +112 -40
- data/vendor/v8/src/mips/simulator-mips.h +5 -0
- data/vendor/v8/src/mips/stub-cache-mips.cc +502 -884
- data/vendor/v8/src/mirror-debugger.js +157 -30
- data/vendor/v8/src/mksnapshot.cc +88 -14
- data/vendor/v8/src/object-observe.js +235 -0
- data/vendor/v8/src/objects-debug.cc +178 -176
- data/vendor/v8/src/objects-inl.h +1333 -486
- data/vendor/v8/src/objects-printer.cc +125 -43
- data/vendor/v8/src/objects-visiting-inl.h +578 -6
- data/vendor/v8/src/objects-visiting.cc +2 -2
- data/vendor/v8/src/objects-visiting.h +172 -79
- data/vendor/v8/src/objects.cc +3533 -2885
- data/vendor/v8/src/objects.h +1352 -1131
- data/vendor/v8/src/optimizing-compiler-thread.cc +152 -0
- data/vendor/v8/src/optimizing-compiler-thread.h +111 -0
- data/vendor/v8/src/parser.cc +390 -500
- data/vendor/v8/src/parser.h +45 -33
- data/vendor/v8/src/platform-cygwin.cc +10 -21
- data/vendor/v8/src/platform-freebsd.cc +36 -41
- data/vendor/v8/src/platform-linux.cc +160 -124
- data/vendor/v8/src/platform-macos.cc +30 -27
- data/vendor/v8/src/platform-nullos.cc +17 -1
- data/vendor/v8/src/platform-openbsd.cc +19 -50
- data/vendor/v8/src/platform-posix.cc +14 -0
- data/vendor/v8/src/platform-solaris.cc +20 -53
- data/vendor/v8/src/platform-win32.cc +49 -26
- data/vendor/v8/src/platform.h +40 -1
- data/vendor/v8/src/preparser.cc +8 -5
- data/vendor/v8/src/preparser.h +2 -2
- data/vendor/v8/src/prettyprinter.cc +16 -0
- data/vendor/v8/src/prettyprinter.h +2 -0
- data/vendor/v8/src/profile-generator-inl.h +1 -0
- data/vendor/v8/src/profile-generator.cc +209 -147
- data/vendor/v8/src/profile-generator.h +15 -12
- data/vendor/v8/src/property-details.h +46 -31
- data/vendor/v8/src/property.cc +27 -46
- data/vendor/v8/src/property.h +163 -83
- data/vendor/v8/src/proxy.js +7 -2
- data/vendor/v8/src/regexp-macro-assembler-irregexp.cc +4 -13
- data/vendor/v8/src/regexp-macro-assembler-irregexp.h +1 -2
- data/vendor/v8/src/regexp-macro-assembler-tracer.cc +1 -11
- data/vendor/v8/src/regexp-macro-assembler-tracer.h +0 -1
- data/vendor/v8/src/regexp-macro-assembler.cc +31 -14
- data/vendor/v8/src/regexp-macro-assembler.h +14 -11
- data/vendor/v8/src/regexp-stack.cc +1 -0
- data/vendor/v8/src/regexp.js +9 -8
- data/vendor/v8/src/rewriter.cc +18 -7
- data/vendor/v8/src/runtime-profiler.cc +52 -43
- data/vendor/v8/src/runtime-profiler.h +0 -25
- data/vendor/v8/src/runtime.cc +2006 -2023
- data/vendor/v8/src/runtime.h +56 -49
- data/vendor/v8/src/safepoint-table.cc +12 -18
- data/vendor/v8/src/safepoint-table.h +11 -8
- data/vendor/v8/src/scanner.cc +1 -0
- data/vendor/v8/src/scanner.h +4 -10
- data/vendor/v8/src/scopeinfo.cc +35 -9
- data/vendor/v8/src/scopeinfo.h +64 -3
- data/vendor/v8/src/scopes.cc +251 -156
- data/vendor/v8/src/scopes.h +61 -27
- data/vendor/v8/src/serialize.cc +348 -396
- data/vendor/v8/src/serialize.h +125 -114
- data/vendor/v8/src/small-pointer-list.h +11 -11
- data/vendor/v8/src/{smart-array-pointer.h → smart-pointers.h} +64 -15
- data/vendor/v8/src/snapshot-common.cc +64 -15
- data/vendor/v8/src/snapshot-empty.cc +7 -1
- data/vendor/v8/src/snapshot.h +9 -2
- data/vendor/v8/src/spaces-inl.h +17 -0
- data/vendor/v8/src/spaces.cc +477 -183
- data/vendor/v8/src/spaces.h +238 -58
- data/vendor/v8/src/splay-tree-inl.h +8 -7
- data/vendor/v8/src/splay-tree.h +24 -10
- data/vendor/v8/src/store-buffer.cc +12 -5
- data/vendor/v8/src/store-buffer.h +2 -4
- data/vendor/v8/src/string-search.h +22 -6
- data/vendor/v8/src/string-stream.cc +11 -8
- data/vendor/v8/src/string.js +47 -15
- data/vendor/v8/src/stub-cache.cc +461 -224
- data/vendor/v8/src/stub-cache.h +164 -102
- data/vendor/v8/src/sweeper-thread.cc +105 -0
- data/vendor/v8/src/sweeper-thread.h +81 -0
- data/vendor/v8/src/token.h +1 -0
- data/vendor/v8/src/transitions-inl.h +220 -0
- data/vendor/v8/src/transitions.cc +160 -0
- data/vendor/v8/src/transitions.h +207 -0
- data/vendor/v8/src/type-info.cc +182 -181
- data/vendor/v8/src/type-info.h +31 -19
- data/vendor/v8/src/unicode-inl.h +62 -106
- data/vendor/v8/src/unicode.cc +57 -67
- data/vendor/v8/src/unicode.h +45 -91
- data/vendor/v8/src/uri.js +57 -29
- data/vendor/v8/src/utils.h +105 -5
- data/vendor/v8/src/v8-counters.cc +54 -11
- data/vendor/v8/src/v8-counters.h +134 -19
- data/vendor/v8/src/v8.cc +29 -29
- data/vendor/v8/src/v8.h +1 -0
- data/vendor/v8/src/v8conversions.cc +26 -22
- data/vendor/v8/src/v8globals.h +56 -43
- data/vendor/v8/src/v8natives.js +83 -30
- data/vendor/v8/src/v8threads.cc +42 -21
- data/vendor/v8/src/v8threads.h +4 -1
- data/vendor/v8/src/v8utils.cc +9 -93
- data/vendor/v8/src/v8utils.h +37 -33
- data/vendor/v8/src/variables.cc +6 -3
- data/vendor/v8/src/variables.h +6 -13
- data/vendor/v8/src/version.cc +2 -2
- data/vendor/v8/src/vm-state-inl.h +11 -0
- data/vendor/v8/src/x64/assembler-x64-inl.h +39 -8
- data/vendor/v8/src/x64/assembler-x64.cc +78 -64
- data/vendor/v8/src/x64/assembler-x64.h +38 -33
- data/vendor/v8/src/x64/builtins-x64.cc +105 -7
- data/vendor/v8/src/x64/code-stubs-x64.cc +790 -413
- data/vendor/v8/src/x64/code-stubs-x64.h +10 -106
- data/vendor/v8/src/x64/codegen-x64.cc +210 -8
- data/vendor/v8/src/x64/codegen-x64.h +20 -1
- data/vendor/v8/src/x64/deoptimizer-x64.cc +336 -75
- data/vendor/v8/src/x64/disasm-x64.cc +15 -0
- data/vendor/v8/src/x64/frames-x64.h +0 -14
- data/vendor/v8/src/x64/full-codegen-x64.cc +293 -270
- data/vendor/v8/src/x64/ic-x64.cc +153 -251
- data/vendor/v8/src/x64/lithium-codegen-x64.cc +1379 -531
- data/vendor/v8/src/x64/lithium-codegen-x64.h +67 -23
- data/vendor/v8/src/x64/lithium-gap-resolver-x64.cc +2 -2
- data/vendor/v8/src/x64/lithium-x64.cc +349 -289
- data/vendor/v8/src/x64/lithium-x64.h +460 -250
- data/vendor/v8/src/x64/macro-assembler-x64.cc +350 -177
- data/vendor/v8/src/x64/macro-assembler-x64.h +67 -49
- data/vendor/v8/src/x64/regexp-macro-assembler-x64.cc +46 -33
- data/vendor/v8/src/x64/regexp-macro-assembler-x64.h +2 -3
- data/vendor/v8/src/x64/stub-cache-x64.cc +484 -653
- data/vendor/v8/src/zone-inl.h +9 -27
- data/vendor/v8/src/zone.cc +5 -5
- data/vendor/v8/src/zone.h +53 -27
- data/vendor/v8/test/benchmarks/testcfg.py +5 -0
- data/vendor/v8/test/cctest/cctest.cc +4 -0
- data/vendor/v8/test/cctest/cctest.gyp +3 -1
- data/vendor/v8/test/cctest/cctest.h +57 -9
- data/vendor/v8/test/cctest/cctest.status +15 -15
- data/vendor/v8/test/cctest/test-accessors.cc +26 -0
- data/vendor/v8/test/cctest/test-alloc.cc +22 -30
- data/vendor/v8/test/cctest/test-api.cc +1943 -314
- data/vendor/v8/test/cctest/test-assembler-arm.cc +133 -13
- data/vendor/v8/test/cctest/test-assembler-ia32.cc +1 -1
- data/vendor/v8/test/cctest/test-assembler-mips.cc +12 -0
- data/vendor/v8/test/cctest/test-ast.cc +4 -2
- data/vendor/v8/test/cctest/test-compiler.cc +61 -29
- data/vendor/v8/test/cctest/test-dataflow.cc +2 -2
- data/vendor/v8/test/cctest/test-debug.cc +212 -33
- data/vendor/v8/test/cctest/test-decls.cc +257 -11
- data/vendor/v8/test/cctest/test-dictionary.cc +24 -10
- data/vendor/v8/test/cctest/test-disasm-arm.cc +118 -1
- data/vendor/v8/test/cctest/test-disasm-ia32.cc +3 -2
- data/vendor/v8/test/cctest/test-flags.cc +14 -1
- data/vendor/v8/test/cctest/test-func-name-inference.cc +7 -4
- data/vendor/v8/test/cctest/test-global-object.cc +51 -0
- data/vendor/v8/test/cctest/test-hashing.cc +32 -23
- data/vendor/v8/test/cctest/test-heap-profiler.cc +131 -77
- data/vendor/v8/test/cctest/test-heap.cc +1084 -143
- data/vendor/v8/test/cctest/test-list.cc +1 -1
- data/vendor/v8/test/cctest/test-liveedit.cc +3 -2
- data/vendor/v8/test/cctest/test-lockers.cc +12 -13
- data/vendor/v8/test/cctest/test-log.cc +10 -8
- data/vendor/v8/test/cctest/test-macro-assembler-x64.cc +2 -2
- data/vendor/v8/test/cctest/test-mark-compact.cc +44 -22
- data/vendor/v8/test/cctest/test-object-observe.cc +434 -0
- data/vendor/v8/test/cctest/test-parsing.cc +86 -39
- data/vendor/v8/test/cctest/test-platform-linux.cc +6 -0
- data/vendor/v8/test/cctest/test-platform-win32.cc +7 -0
- data/vendor/v8/test/cctest/test-random.cc +5 -4
- data/vendor/v8/test/cctest/test-regexp.cc +137 -101
- data/vendor/v8/test/cctest/test-serialize.cc +150 -230
- data/vendor/v8/test/cctest/test-sockets.cc +1 -1
- data/vendor/v8/test/cctest/test-spaces.cc +139 -0
- data/vendor/v8/test/cctest/test-strings.cc +736 -74
- data/vendor/v8/test/cctest/test-thread-termination.cc +10 -11
- data/vendor/v8/test/cctest/test-threads.cc +4 -4
- data/vendor/v8/test/cctest/test-utils.cc +16 -0
- data/vendor/v8/test/cctest/test-weakmaps.cc +7 -3
- data/vendor/v8/test/cctest/testcfg.py +64 -5
- data/vendor/v8/test/es5conform/testcfg.py +5 -0
- data/vendor/v8/test/message/message.status +1 -1
- data/vendor/v8/test/message/overwritten-builtins.out +3 -0
- data/vendor/v8/test/message/testcfg.py +89 -8
- data/vendor/v8/test/message/try-catch-finally-no-message.out +26 -26
- data/vendor/v8/test/mjsunit/accessor-map-sharing.js +18 -2
- data/vendor/v8/test/mjsunit/allocation-site-info.js +126 -0
- data/vendor/v8/test/mjsunit/array-bounds-check-removal.js +62 -1
- data/vendor/v8/test/mjsunit/array-iteration.js +1 -1
- data/vendor/v8/test/mjsunit/array-literal-transitions.js +2 -0
- data/vendor/v8/test/mjsunit/array-natives-elements.js +317 -0
- data/vendor/v8/test/mjsunit/array-reduce.js +8 -8
- data/vendor/v8/test/mjsunit/array-slice.js +12 -0
- data/vendor/v8/test/mjsunit/array-store-and-grow.js +4 -1
- data/vendor/v8/test/mjsunit/assert-opt-and-deopt.js +1 -1
- data/vendor/v8/test/mjsunit/bugs/bug-2337.js +53 -0
- data/vendor/v8/test/mjsunit/compare-known-objects-slow.js +69 -0
- data/vendor/v8/test/mjsunit/compiler/alloc-object-huge.js +3 -1
- data/vendor/v8/test/mjsunit/compiler/inline-accessors.js +368 -0
- data/vendor/v8/test/mjsunit/compiler/inline-arguments.js +87 -1
- data/vendor/v8/test/mjsunit/compiler/inline-closures.js +49 -0
- data/vendor/v8/test/mjsunit/compiler/inline-construct.js +55 -43
- data/vendor/v8/test/mjsunit/compiler/inline-literals.js +39 -0
- data/vendor/v8/test/mjsunit/compiler/multiply-add.js +69 -0
- data/vendor/v8/test/mjsunit/compiler/optimized-closures.js +57 -0
- data/vendor/v8/test/mjsunit/compiler/parallel-proto-change.js +44 -0
- data/vendor/v8/test/mjsunit/compiler/property-static.js +69 -0
- data/vendor/v8/test/mjsunit/compiler/proto-chain-constant.js +55 -0
- data/vendor/v8/test/mjsunit/compiler/proto-chain-load.js +44 -0
- data/vendor/v8/test/mjsunit/compiler/regress-gvn.js +3 -2
- data/vendor/v8/test/mjsunit/compiler/regress-or.js +6 -2
- data/vendor/v8/test/mjsunit/compiler/rotate.js +224 -0
- data/vendor/v8/test/mjsunit/compiler/uint32.js +173 -0
- data/vendor/v8/test/mjsunit/count-based-osr.js +2 -1
- data/vendor/v8/test/mjsunit/d8-os.js +3 -3
- data/vendor/v8/test/mjsunit/date-parse.js +3 -0
- data/vendor/v8/test/mjsunit/date.js +22 -0
- data/vendor/v8/test/mjsunit/debug-break-inline.js +1 -0
- data/vendor/v8/test/mjsunit/debug-evaluate-locals-optimized-double.js +22 -12
- data/vendor/v8/test/mjsunit/debug-evaluate-locals-optimized.js +21 -10
- data/vendor/v8/test/mjsunit/debug-liveedit-compile-error.js +60 -0
- data/vendor/v8/test/mjsunit/debug-liveedit-double-call.js +142 -0
- data/vendor/v8/test/mjsunit/debug-liveedit-literals.js +94 -0
- data/vendor/v8/test/mjsunit/debug-liveedit-restart-frame.js +153 -0
- data/vendor/v8/test/mjsunit/debug-multiple-breakpoints.js +1 -1
- data/vendor/v8/test/mjsunit/debug-script-breakpoints-closure.js +67 -0
- data/vendor/v8/test/mjsunit/debug-script-breakpoints-nested.js +82 -0
- data/vendor/v8/test/mjsunit/debug-script.js +4 -2
- data/vendor/v8/test/mjsunit/debug-set-variable-value.js +308 -0
- data/vendor/v8/test/mjsunit/debug-stepout-scope-part1.js +190 -0
- data/vendor/v8/test/mjsunit/debug-stepout-scope-part2.js +83 -0
- data/vendor/v8/test/mjsunit/debug-stepout-scope-part3.js +80 -0
- data/vendor/v8/test/mjsunit/debug-stepout-scope-part4.js +80 -0
- data/vendor/v8/test/mjsunit/debug-stepout-scope-part5.js +77 -0
- data/vendor/v8/test/mjsunit/debug-stepout-scope-part6.js +79 -0
- data/vendor/v8/test/mjsunit/debug-stepout-scope-part7.js +79 -0
- data/vendor/v8/test/mjsunit/{debug-stepout-scope.js → debug-stepout-scope-part8.js} +0 -189
- data/vendor/v8/test/mjsunit/delete-non-configurable.js +74 -0
- data/vendor/v8/test/mjsunit/deopt-minus-zero.js +56 -0
- data/vendor/v8/test/mjsunit/elements-kind.js +6 -4
- data/vendor/v8/test/mjsunit/elements-length-no-holey.js +33 -0
- data/vendor/v8/test/mjsunit/elements-transition-hoisting.js +46 -19
- data/vendor/v8/test/mjsunit/error-accessors.js +54 -0
- data/vendor/v8/test/mjsunit/error-constructors.js +1 -14
- data/vendor/v8/test/mjsunit/error-tostring.js +8 -0
- data/vendor/v8/test/mjsunit/eval-stack-trace.js +204 -0
- data/vendor/v8/test/mjsunit/external-array.js +364 -1
- data/vendor/v8/test/mjsunit/fast-array-length.js +37 -0
- data/vendor/v8/test/mjsunit/fast-non-keyed.js +113 -0
- data/vendor/v8/test/mjsunit/fast-prototype.js +117 -0
- data/vendor/v8/test/mjsunit/function-call.js +14 -18
- data/vendor/v8/test/mjsunit/fuzz-natives-part1.js +230 -0
- data/vendor/v8/test/mjsunit/fuzz-natives-part2.js +229 -0
- data/vendor/v8/test/mjsunit/fuzz-natives-part3.js +229 -0
- data/vendor/v8/test/mjsunit/{fuzz-natives.js → fuzz-natives-part4.js} +12 -2
- data/vendor/v8/test/mjsunit/generated-transition-stub.js +218 -0
- data/vendor/v8/test/mjsunit/greedy.js +1 -1
- data/vendor/v8/test/mjsunit/harmony/block-conflicts.js +2 -1
- data/vendor/v8/test/mjsunit/harmony/block-let-crankshaft.js +1 -1
- data/vendor/v8/test/mjsunit/harmony/collections.js +69 -11
- data/vendor/v8/test/mjsunit/harmony/debug-blockscopes.js +2 -2
- data/vendor/v8/test/mjsunit/harmony/module-linking.js +180 -3
- data/vendor/v8/test/mjsunit/harmony/module-parsing.js +31 -0
- data/vendor/v8/test/mjsunit/harmony/module-recompile.js +87 -0
- data/vendor/v8/test/mjsunit/harmony/module-resolution.js +15 -2
- data/vendor/v8/test/mjsunit/harmony/object-observe.js +1056 -0
- data/vendor/v8/test/mjsunit/harmony/proxies-json.js +178 -0
- data/vendor/v8/test/mjsunit/harmony/proxies.js +25 -10
- data/vendor/v8/test/mjsunit/json-parser-recursive.js +33 -0
- data/vendor/v8/test/mjsunit/json-stringify-recursive.js +52 -0
- data/vendor/v8/test/mjsunit/json.js +38 -2
- data/vendor/v8/test/mjsunit/json2.js +153 -0
- data/vendor/v8/test/mjsunit/limit-locals.js +5 -4
- data/vendor/v8/test/mjsunit/manual-parallel-recompile.js +79 -0
- data/vendor/v8/test/mjsunit/math-exp-precision.js +64 -0
- data/vendor/v8/test/mjsunit/math-floor-negative.js +59 -0
- data/vendor/v8/test/mjsunit/math-floor-of-div-minus-zero.js +41 -0
- data/vendor/v8/test/mjsunit/math-floor-of-div-nosudiv.js +288 -0
- data/vendor/v8/test/mjsunit/math-floor-of-div.js +81 -9
- data/vendor/v8/test/mjsunit/{math-floor.js → math-floor-part1.js} +1 -72
- data/vendor/v8/test/mjsunit/math-floor-part2.js +76 -0
- data/vendor/v8/test/mjsunit/math-floor-part3.js +78 -0
- data/vendor/v8/test/mjsunit/math-floor-part4.js +76 -0
- data/vendor/v8/test/mjsunit/mirror-object.js +43 -9
- data/vendor/v8/test/mjsunit/mjsunit.js +1 -1
- data/vendor/v8/test/mjsunit/mjsunit.status +52 -27
- data/vendor/v8/test/mjsunit/mul-exhaustive-part1.js +491 -0
- data/vendor/v8/test/mjsunit/mul-exhaustive-part10.js +470 -0
- data/vendor/v8/test/mjsunit/mul-exhaustive-part2.js +525 -0
- data/vendor/v8/test/mjsunit/mul-exhaustive-part3.js +532 -0
- data/vendor/v8/test/mjsunit/mul-exhaustive-part4.js +509 -0
- data/vendor/v8/test/mjsunit/mul-exhaustive-part5.js +505 -0
- data/vendor/v8/test/mjsunit/mul-exhaustive-part6.js +554 -0
- data/vendor/v8/test/mjsunit/mul-exhaustive-part7.js +497 -0
- data/vendor/v8/test/mjsunit/mul-exhaustive-part8.js +526 -0
- data/vendor/v8/test/mjsunit/mul-exhaustive-part9.js +533 -0
- data/vendor/v8/test/mjsunit/new-function.js +34 -0
- data/vendor/v8/test/mjsunit/numops-fuzz-part1.js +1172 -0
- data/vendor/v8/test/mjsunit/numops-fuzz-part2.js +1178 -0
- data/vendor/v8/test/mjsunit/numops-fuzz-part3.js +1178 -0
- data/vendor/v8/test/mjsunit/numops-fuzz-part4.js +1177 -0
- data/vendor/v8/test/mjsunit/object-define-property.js +107 -2
- data/vendor/v8/test/mjsunit/override-read-only-property.js +6 -4
- data/vendor/v8/test/mjsunit/packed-elements.js +2 -2
- data/vendor/v8/test/mjsunit/parse-int-float.js +4 -4
- data/vendor/v8/test/mjsunit/pixel-array-rounding.js +1 -1
- data/vendor/v8/test/mjsunit/readonly.js +228 -0
- data/vendor/v8/test/mjsunit/regexp-capture-3.js +16 -18
- data/vendor/v8/test/mjsunit/regexp-capture.js +2 -0
- data/vendor/v8/test/mjsunit/regexp-global.js +122 -0
- data/vendor/v8/test/mjsunit/regexp-results-cache.js +78 -0
- data/vendor/v8/test/mjsunit/regress/regress-1117.js +12 -3
- data/vendor/v8/test/mjsunit/regress/regress-1118.js +1 -1
- data/vendor/v8/test/mjsunit/regress/regress-115100.js +36 -0
- data/vendor/v8/test/mjsunit/regress/regress-1199637.js +1 -3
- data/vendor/v8/test/mjsunit/regress/regress-121407.js +1 -1
- data/vendor/v8/test/mjsunit/regress/regress-131923.js +30 -0
- data/vendor/v8/test/mjsunit/regress/regress-131994.js +70 -0
- data/vendor/v8/test/mjsunit/regress/regress-133211.js +35 -0
- data/vendor/v8/test/mjsunit/regress/regress-133211b.js +39 -0
- data/vendor/v8/test/mjsunit/regress/regress-136048.js +34 -0
- data/vendor/v8/test/mjsunit/regress/regress-137768.js +73 -0
- data/vendor/v8/test/mjsunit/regress/regress-143967.js +34 -0
- data/vendor/v8/test/mjsunit/regress/regress-145201.js +107 -0
- data/vendor/v8/test/mjsunit/regress/regress-147497.js +45 -0
- data/vendor/v8/test/mjsunit/regress/regress-148378.js +38 -0
- data/vendor/v8/test/mjsunit/regress/regress-1563.js +1 -1
- data/vendor/v8/test/mjsunit/regress/regress-1591.js +48 -0
- data/vendor/v8/test/mjsunit/regress/regress-164442.js +45 -0
- data/vendor/v8/test/mjsunit/regress/regress-165637.js +61 -0
- data/vendor/v8/test/mjsunit/regress/regress-166379.js +39 -0
- data/vendor/v8/test/mjsunit/regress/regress-166553.js +33 -0
- data/vendor/v8/test/mjsunit/regress/regress-1692.js +1 -1
- data/vendor/v8/test/mjsunit/regress/regress-171641.js +40 -0
- data/vendor/v8/test/mjsunit/regress/regress-1980.js +1 -1
- data/vendor/v8/test/mjsunit/regress/regress-2073.js +99 -0
- data/vendor/v8/test/mjsunit/regress/regress-2119.js +36 -0
- data/vendor/v8/test/mjsunit/regress/regress-2156.js +39 -0
- data/vendor/v8/test/mjsunit/regress/regress-2163.js +70 -0
- data/vendor/v8/test/mjsunit/regress/regress-2170.js +58 -0
- data/vendor/v8/test/mjsunit/regress/regress-2172.js +35 -0
- data/vendor/v8/test/mjsunit/regress/regress-2185-2.js +145 -0
- data/vendor/v8/test/mjsunit/regress/regress-2185.js +38 -0
- data/vendor/v8/test/mjsunit/regress/regress-2186.js +49 -0
- data/vendor/v8/test/mjsunit/regress/regress-2193.js +58 -0
- data/vendor/v8/test/mjsunit/regress/regress-2219.js +32 -0
- data/vendor/v8/test/mjsunit/regress/regress-2225.js +65 -0
- data/vendor/v8/test/mjsunit/regress/regress-2226.js +36 -0
- data/vendor/v8/test/mjsunit/regress/regress-2234.js +41 -0
- data/vendor/v8/test/mjsunit/regress/regress-2243.js +31 -0
- data/vendor/v8/test/mjsunit/regress/regress-2249.js +33 -0
- data/vendor/v8/test/mjsunit/regress/regress-2250.js +68 -0
- data/vendor/v8/test/mjsunit/regress/regress-2261.js +113 -0
- data/vendor/v8/test/mjsunit/regress/regress-2263.js +30 -0
- data/vendor/v8/test/mjsunit/regress/regress-2284.js +32 -0
- data/vendor/v8/test/mjsunit/regress/regress-2285.js +32 -0
- data/vendor/v8/test/mjsunit/regress/regress-2286.js +32 -0
- data/vendor/v8/test/mjsunit/regress/regress-2289.js +34 -0
- data/vendor/v8/test/mjsunit/regress/regress-2291.js +36 -0
- data/vendor/v8/test/mjsunit/regress/regress-2294.js +70 -0
- data/vendor/v8/test/mjsunit/regress/regress-2296.js +40 -0
- data/vendor/v8/test/mjsunit/regress/regress-2315.js +40 -0
- data/vendor/v8/test/mjsunit/regress/regress-2318.js +66 -0
- data/vendor/v8/test/mjsunit/regress/regress-2322.js +36 -0
- data/vendor/v8/test/mjsunit/regress/regress-2326.js +54 -0
- data/vendor/v8/test/mjsunit/regress/regress-2336.js +53 -0
- data/vendor/v8/test/mjsunit/regress/regress-2339.js +59 -0
- data/vendor/v8/test/mjsunit/regress/regress-2346.js +123 -0
- data/vendor/v8/test/mjsunit/regress/regress-2373.js +29 -0
- data/vendor/v8/test/mjsunit/regress/regress-2374.js +33 -0
- data/vendor/v8/test/mjsunit/regress/regress-2398.js +41 -0
- data/vendor/v8/test/mjsunit/regress/regress-2410.js +36 -0
- data/vendor/v8/test/mjsunit/regress/regress-2416.js +75 -0
- data/vendor/v8/test/mjsunit/regress/regress-2419.js +37 -0
- data/vendor/v8/test/mjsunit/regress/regress-2433.js +36 -0
- data/vendor/v8/test/mjsunit/regress/regress-2437.js +156 -0
- data/vendor/v8/test/mjsunit/regress/regress-2438.js +52 -0
- data/vendor/v8/test/mjsunit/regress/regress-2443.js +129 -0
- data/vendor/v8/test/mjsunit/regress/regress-2444.js +120 -0
- data/vendor/v8/test/mjsunit/regress/regress-2489.js +50 -0
- data/vendor/v8/test/mjsunit/regress/regress-2499.js +40 -0
- data/vendor/v8/test/mjsunit/regress/regress-334.js +1 -1
- data/vendor/v8/test/mjsunit/regress/regress-492.js +39 -1
- data/vendor/v8/test/mjsunit/regress/regress-builtin-array-op.js +38 -0
- data/vendor/v8/test/mjsunit/regress/regress-cnlt-elements.js +43 -0
- data/vendor/v8/test/mjsunit/regress/regress-cnlt-enum-indices.js +45 -0
- data/vendor/v8/test/mjsunit/regress/regress-cntl-descriptors-enum.js +46 -0
- data/vendor/v8/test/mjsunit/regress/regress-convert-enum.js +60 -0
- data/vendor/v8/test/mjsunit/regress/regress-convert-enum2.js +46 -0
- data/vendor/v8/test/mjsunit/regress/regress-convert-transition.js +40 -0
- data/vendor/v8/test/mjsunit/regress/regress-crbug-119926.js +3 -1
- data/vendor/v8/test/mjsunit/regress/regress-crbug-125148.js +90 -0
- data/vendor/v8/test/mjsunit/regress/regress-crbug-134055.js +63 -0
- data/vendor/v8/test/mjsunit/regress/regress-crbug-134609.js +59 -0
- data/vendor/v8/test/mjsunit/regress/regress-crbug-135008.js +45 -0
- data/vendor/v8/test/mjsunit/regress/regress-crbug-135066.js +55 -0
- data/vendor/v8/test/mjsunit/regress/regress-crbug-137689.js +47 -0
- data/vendor/v8/test/mjsunit/regress/regress-crbug-138887.js +48 -0
- data/vendor/v8/test/mjsunit/regress/regress-crbug-140083.js +44 -0
- data/vendor/v8/test/mjsunit/regress/regress-crbug-142087.js +38 -0
- data/vendor/v8/test/mjsunit/regress/regress-crbug-142218.js +44 -0
- data/vendor/v8/test/mjsunit/regress/regress-crbug-145961.js +39 -0
- data/vendor/v8/test/mjsunit/regress/regress-crbug-146910.js +33 -0
- data/vendor/v8/test/mjsunit/regress/regress-crbug-147475.js +48 -0
- data/vendor/v8/test/mjsunit/regress/regress-crbug-148376.js +35 -0
- data/vendor/v8/test/mjsunit/regress/regress-crbug-150545.js +53 -0
- data/vendor/v8/test/mjsunit/regress/regress-crbug-150729.js +39 -0
- data/vendor/v8/test/mjsunit/regress/regress-crbug-157019.js +54 -0
- data/vendor/v8/test/mjsunit/regress/regress-crbug-157520.js +38 -0
- data/vendor/v8/test/mjsunit/regress/regress-crbug-158185.js +39 -0
- data/vendor/v8/test/mjsunit/regress/regress-crbug-160010.js +35 -0
- data/vendor/v8/test/mjsunit/regress/regress-crbug-162085.js +71 -0
- data/vendor/v8/test/mjsunit/regress/regress-crbug-168545.js +34 -0
- data/vendor/v8/test/mjsunit/regress/regress-crbug-170856.js +33 -0
- data/vendor/v8/test/mjsunit/regress/regress-crbug-172345.js +34 -0
- data/vendor/v8/test/mjsunit/regress/regress-crbug-173974.js +36 -0
- data/vendor/v8/test/mjsunit/regress/regress-crbug-18639.js +9 -5
- data/vendor/v8/test/mjsunit/regress/regress-debug-code-recompilation.js +2 -1
- data/vendor/v8/test/mjsunit/regress/regress-deep-proto.js +45 -0
- data/vendor/v8/test/mjsunit/regress/regress-delete-empty-double.js +40 -0
- data/vendor/v8/test/mjsunit/regress/regress-iteration-order.js +42 -0
- data/vendor/v8/test/mjsunit/regress/regress-json-stringify-gc.js +41 -0
- data/vendor/v8/test/mjsunit/regress/regress-latin-1.js +78 -0
- data/vendor/v8/test/mjsunit/regress/regress-load-elements.js +49 -0
- data/vendor/v8/test/mjsunit/regress/regress-observe-empty-double-array.js +38 -0
- data/vendor/v8/test/mjsunit/regress/regress-undefined-store-keyed-fast-element.js +37 -0
- data/vendor/v8/test/mjsunit/shift-for-integer-div.js +59 -0
- data/vendor/v8/test/mjsunit/stack-traces-gc.js +119 -0
- data/vendor/v8/test/mjsunit/stack-traces-overflow.js +122 -0
- data/vendor/v8/test/mjsunit/stack-traces.js +39 -1
- data/vendor/v8/test/mjsunit/str-to-num.js +7 -2
- data/vendor/v8/test/mjsunit/strict-mode.js +36 -11
- data/vendor/v8/test/mjsunit/string-charcodeat.js +3 -0
- data/vendor/v8/test/mjsunit/string-natives.js +72 -0
- data/vendor/v8/test/mjsunit/string-split.js +17 -0
- data/vendor/v8/test/mjsunit/testcfg.py +76 -6
- data/vendor/v8/test/mjsunit/tools/tickprocessor.js +4 -1
- data/vendor/v8/test/mjsunit/try-finally-continue.js +72 -0
- data/vendor/v8/test/mjsunit/typed-array-slice.js +61 -0
- data/vendor/v8/test/mjsunit/unbox-double-arrays.js +2 -0
- data/vendor/v8/test/mjsunit/uri.js +12 -0
- data/vendor/v8/test/mjsunit/with-readonly.js +4 -2
- data/vendor/v8/test/mozilla/mozilla.status +19 -113
- data/vendor/v8/test/mozilla/testcfg.py +122 -3
- data/vendor/v8/test/preparser/preparser.status +5 -0
- data/vendor/v8/test/preparser/strict-identifiers.pyt +1 -1
- data/vendor/v8/test/preparser/testcfg.py +101 -5
- data/vendor/v8/test/sputnik/sputnik.status +1 -1
- data/vendor/v8/test/sputnik/testcfg.py +5 -0
- data/vendor/v8/test/test262/README +2 -2
- data/vendor/v8/test/test262/test262.status +13 -36
- data/vendor/v8/test/test262/testcfg.py +102 -8
- data/vendor/v8/tools/android-build.sh +0 -0
- data/vendor/v8/tools/android-ll-prof.sh +69 -0
- data/vendor/v8/tools/android-run.py +109 -0
- data/vendor/v8/tools/android-sync.sh +105 -0
- data/vendor/v8/tools/bash-completion.sh +0 -0
- data/vendor/v8/tools/check-static-initializers.sh +0 -0
- data/vendor/v8/tools/common-includes.sh +15 -22
- data/vendor/v8/tools/disasm.py +4 -4
- data/vendor/v8/tools/fuzz-harness.sh +0 -0
- data/vendor/v8/tools/gen-postmortem-metadata.py +6 -8
- data/vendor/v8/tools/grokdump.py +404 -129
- data/vendor/v8/tools/gyp/v8.gyp +105 -43
- data/vendor/v8/tools/linux-tick-processor +5 -5
- data/vendor/v8/tools/ll_prof.py +75 -15
- data/vendor/v8/tools/merge-to-branch.sh +2 -2
- data/vendor/v8/tools/plot-timer-events +70 -0
- data/vendor/v8/tools/plot-timer-events.js +510 -0
- data/vendor/v8/tools/presubmit.py +1 -0
- data/vendor/v8/tools/push-to-trunk.sh +14 -4
- data/vendor/v8/tools/run-llprof.sh +69 -0
- data/vendor/v8/tools/run-tests.py +372 -0
- data/vendor/v8/tools/run-valgrind.py +1 -1
- data/vendor/v8/tools/status-file-converter.py +39 -0
- data/vendor/v8/tools/test-server.py +224 -0
- data/vendor/v8/tools/test-wrapper-gypbuild.py +13 -16
- data/vendor/v8/tools/test.py +10 -19
- data/vendor/v8/tools/testrunner/README +174 -0
- data/vendor/v8/tools/testrunner/__init__.py +26 -0
- data/vendor/v8/tools/testrunner/local/__init__.py +26 -0
- data/vendor/v8/tools/testrunner/local/commands.py +153 -0
- data/vendor/v8/tools/testrunner/local/execution.py +182 -0
- data/vendor/v8/tools/testrunner/local/old_statusfile.py +460 -0
- data/vendor/v8/tools/testrunner/local/progress.py +238 -0
- data/vendor/v8/tools/testrunner/local/statusfile.py +145 -0
- data/vendor/v8/tools/testrunner/local/testsuite.py +187 -0
- data/vendor/v8/tools/testrunner/local/utils.py +108 -0
- data/vendor/v8/tools/testrunner/local/verbose.py +99 -0
- data/vendor/v8/tools/testrunner/network/__init__.py +26 -0
- data/vendor/v8/tools/testrunner/network/distro.py +90 -0
- data/vendor/v8/tools/testrunner/network/endpoint.py +124 -0
- data/vendor/v8/tools/testrunner/network/network_execution.py +253 -0
- data/vendor/v8/tools/testrunner/network/perfdata.py +120 -0
- data/vendor/v8/tools/testrunner/objects/__init__.py +26 -0
- data/vendor/v8/tools/testrunner/objects/context.py +50 -0
- data/vendor/v8/tools/testrunner/objects/output.py +60 -0
- data/vendor/v8/tools/testrunner/objects/peer.py +80 -0
- data/vendor/v8/tools/testrunner/objects/testcase.py +83 -0
- data/vendor/v8/tools/testrunner/objects/workpacket.py +90 -0
- data/vendor/v8/tools/testrunner/server/__init__.py +26 -0
- data/vendor/v8/tools/testrunner/server/compression.py +111 -0
- data/vendor/v8/tools/testrunner/server/constants.py +51 -0
- data/vendor/v8/tools/testrunner/server/daemon.py +147 -0
- data/vendor/v8/tools/testrunner/server/local_handler.py +119 -0
- data/vendor/v8/tools/testrunner/server/main.py +245 -0
- data/vendor/v8/tools/testrunner/server/presence_handler.py +120 -0
- data/vendor/v8/tools/testrunner/server/signatures.py +63 -0
- data/vendor/v8/tools/testrunner/server/status_handler.py +112 -0
- data/vendor/v8/tools/testrunner/server/work_handler.py +150 -0
- data/vendor/v8/tools/tick-processor.html +168 -0
- data/vendor/v8/tools/tickprocessor-driver.js +5 -3
- data/vendor/v8/tools/tickprocessor.js +58 -15
- metadata +534 -30
- data/patches/add-freebsd9-and-freebsd10-to-gyp-GetFlavor.patch +0 -11
- data/patches/do-not-imply-vfp3-and-armv7.patch +0 -44
- data/patches/fPIC-on-x64.patch +0 -14
- data/vendor/v8/src/liveobjectlist-inl.h +0 -126
- data/vendor/v8/src/liveobjectlist.cc +0 -2631
- data/vendor/v8/src/liveobjectlist.h +0 -319
- data/vendor/v8/test/mjsunit/mul-exhaustive.js +0 -4629
- data/vendor/v8/test/mjsunit/numops-fuzz.js +0 -4609
- data/vendor/v8/test/mjsunit/regress/regress-1969.js +0 -5045
@@ -85,6 +85,81 @@ void HValue::AssumeRepresentation(Representation r) {
|
|
85
85
|
}
|
86
86
|
|
87
87
|
|
88
|
+
void HValue::InferRepresentation(HInferRepresentation* h_infer) {
|
89
|
+
ASSERT(CheckFlag(kFlexibleRepresentation));
|
90
|
+
Representation new_rep = RepresentationFromInputs();
|
91
|
+
UpdateRepresentation(new_rep, h_infer, "inputs");
|
92
|
+
new_rep = RepresentationFromUses();
|
93
|
+
UpdateRepresentation(new_rep, h_infer, "uses");
|
94
|
+
}
|
95
|
+
|
96
|
+
|
97
|
+
Representation HValue::RepresentationFromUses() {
|
98
|
+
if (HasNoUses()) return Representation::None();
|
99
|
+
|
100
|
+
// Array of use counts for each representation.
|
101
|
+
int use_count[Representation::kNumRepresentations] = { 0 };
|
102
|
+
|
103
|
+
for (HUseIterator it(uses()); !it.Done(); it.Advance()) {
|
104
|
+
HValue* use = it.value();
|
105
|
+
Representation rep = use->observed_input_representation(it.index());
|
106
|
+
if (rep.IsNone()) continue;
|
107
|
+
if (FLAG_trace_representation) {
|
108
|
+
PrintF("#%d %s is used by #%d %s as %s%s\n",
|
109
|
+
id(), Mnemonic(), use->id(), use->Mnemonic(), rep.Mnemonic(),
|
110
|
+
(use->CheckFlag(kTruncatingToInt32) ? "-trunc" : ""));
|
111
|
+
}
|
112
|
+
use_count[rep.kind()] += use->LoopWeight();
|
113
|
+
}
|
114
|
+
if (IsPhi()) HPhi::cast(this)->AddIndirectUsesTo(&use_count[0]);
|
115
|
+
int tagged_count = use_count[Representation::kTagged];
|
116
|
+
int double_count = use_count[Representation::kDouble];
|
117
|
+
int int32_count = use_count[Representation::kInteger32];
|
118
|
+
|
119
|
+
if (tagged_count > 0) return Representation::Tagged();
|
120
|
+
if (double_count > 0) return Representation::Double();
|
121
|
+
if (int32_count > 0) return Representation::Integer32();
|
122
|
+
|
123
|
+
return Representation::None();
|
124
|
+
}
|
125
|
+
|
126
|
+
|
127
|
+
void HValue::UpdateRepresentation(Representation new_rep,
|
128
|
+
HInferRepresentation* h_infer,
|
129
|
+
const char* reason) {
|
130
|
+
Representation r = representation();
|
131
|
+
if (new_rep.is_more_general_than(r)) {
|
132
|
+
// When an HConstant is marked "not convertible to integer", then
|
133
|
+
// never try to represent it as an integer.
|
134
|
+
if (new_rep.IsInteger32() && !IsConvertibleToInteger()) {
|
135
|
+
new_rep = Representation::Tagged();
|
136
|
+
if (FLAG_trace_representation) {
|
137
|
+
PrintF("Changing #%d %s representation %s -> %s because it's NCTI"
|
138
|
+
" (%s want i)\n",
|
139
|
+
id(), Mnemonic(), r.Mnemonic(), new_rep.Mnemonic(), reason);
|
140
|
+
}
|
141
|
+
} else {
|
142
|
+
if (FLAG_trace_representation) {
|
143
|
+
PrintF("Changing #%d %s representation %s -> %s based on %s\n",
|
144
|
+
id(), Mnemonic(), r.Mnemonic(), new_rep.Mnemonic(), reason);
|
145
|
+
}
|
146
|
+
}
|
147
|
+
ChangeRepresentation(new_rep);
|
148
|
+
AddDependantsToWorklist(h_infer);
|
149
|
+
}
|
150
|
+
}
|
151
|
+
|
152
|
+
|
153
|
+
void HValue::AddDependantsToWorklist(HInferRepresentation* h_infer) {
|
154
|
+
for (HUseIterator it(uses()); !it.Done(); it.Advance()) {
|
155
|
+
h_infer->AddToWorklist(it.value());
|
156
|
+
}
|
157
|
+
for (int i = 0; i < OperandCount(); ++i) {
|
158
|
+
h_infer->AddToWorklist(OperandAt(i));
|
159
|
+
}
|
160
|
+
}
|
161
|
+
|
162
|
+
|
88
163
|
static int32_t ConvertAndSetOverflow(int64_t result, bool* overflow) {
|
89
164
|
if (result > kMaxInt) {
|
90
165
|
*overflow = true;
|
@@ -156,6 +231,20 @@ void Range::Union(Range* other) {
|
|
156
231
|
}
|
157
232
|
|
158
233
|
|
234
|
+
void Range::CombinedMax(Range* other) {
|
235
|
+
upper_ = Max(upper_, other->upper_);
|
236
|
+
lower_ = Max(lower_, other->lower_);
|
237
|
+
set_can_be_minus_zero(CanBeMinusZero() || other->CanBeMinusZero());
|
238
|
+
}
|
239
|
+
|
240
|
+
|
241
|
+
void Range::CombinedMin(Range* other) {
|
242
|
+
upper_ = Min(upper_, other->upper_);
|
243
|
+
lower_ = Min(lower_, other->lower_);
|
244
|
+
set_can_be_minus_zero(CanBeMinusZero() || other->CanBeMinusZero());
|
245
|
+
}
|
246
|
+
|
247
|
+
|
159
248
|
void Range::Sar(int32_t value) {
|
160
249
|
int32_t bits = value & 0x1F;
|
161
250
|
lower_ = lower_ >> bits;
|
@@ -253,6 +342,10 @@ const char* HType::ToString() {
|
|
253
342
|
|
254
343
|
|
255
344
|
HType HType::TypeFromValue(Handle<Object> value) {
|
345
|
+
// Handle dereferencing is safe here: an object's type as checked below
|
346
|
+
// never changes.
|
347
|
+
AllowHandleDereference allow_handle_deref;
|
348
|
+
|
256
349
|
HType result = HType::Tagged();
|
257
350
|
if (value->IsSmi()) {
|
258
351
|
result = HType::Smi();
|
@@ -271,6 +364,54 @@ HType HType::TypeFromValue(Handle<Object> value) {
|
|
271
364
|
}
|
272
365
|
|
273
366
|
|
367
|
+
bool HValue::Dominates(HValue* dominator, HValue* dominated) {
|
368
|
+
if (dominator->block() != dominated->block()) {
|
369
|
+
// If they are in different blocks we can use the dominance relation
|
370
|
+
// between the blocks.
|
371
|
+
return dominator->block()->Dominates(dominated->block());
|
372
|
+
} else {
|
373
|
+
// Otherwise we must see which instruction comes first, considering
|
374
|
+
// that phis always precede regular instructions.
|
375
|
+
if (dominator->IsInstruction()) {
|
376
|
+
if (dominated->IsInstruction()) {
|
377
|
+
for (HInstruction* next = HInstruction::cast(dominator)->next();
|
378
|
+
next != NULL;
|
379
|
+
next = next->next()) {
|
380
|
+
if (next == dominated) return true;
|
381
|
+
}
|
382
|
+
return false;
|
383
|
+
} else if (dominated->IsPhi()) {
|
384
|
+
return false;
|
385
|
+
} else {
|
386
|
+
UNREACHABLE();
|
387
|
+
}
|
388
|
+
} else if (dominator->IsPhi()) {
|
389
|
+
if (dominated->IsInstruction()) {
|
390
|
+
return true;
|
391
|
+
} else {
|
392
|
+
// We cannot compare which phi comes first.
|
393
|
+
UNREACHABLE();
|
394
|
+
}
|
395
|
+
} else {
|
396
|
+
UNREACHABLE();
|
397
|
+
}
|
398
|
+
return false;
|
399
|
+
}
|
400
|
+
}
|
401
|
+
|
402
|
+
|
403
|
+
bool HValue::TestDominanceUsingProcessedFlag(HValue* dominator,
|
404
|
+
HValue* dominated) {
|
405
|
+
if (dominator->block() != dominated->block()) {
|
406
|
+
return dominator->block()->Dominates(dominated->block());
|
407
|
+
} else {
|
408
|
+
// If both arguments are in the same block we check if "dominator" has
|
409
|
+
// already been processed or if it is a phi: if yes it dominates the other.
|
410
|
+
return dominator->CheckFlag(kIDefsProcessingDone) || dominator->IsPhi();
|
411
|
+
}
|
412
|
+
}
|
413
|
+
|
414
|
+
|
274
415
|
bool HValue::IsDefinedAfter(HBasicBlock* other) const {
|
275
416
|
return block()->block_id() > other->block_id();
|
276
417
|
}
|
@@ -287,6 +428,7 @@ HUseListNode* HUseListNode::tail() {
|
|
287
428
|
|
288
429
|
bool HValue::CheckUsesForFlag(Flag f) {
|
289
430
|
for (HUseIterator it(uses()); !it.Done(); it.Advance()) {
|
431
|
+
if (it.value()->IsSimulate()) continue;
|
290
432
|
if (!it.value()->CheckFlag(f)) return false;
|
291
433
|
}
|
292
434
|
return true;
|
@@ -336,7 +478,8 @@ HUseListNode* HValue::RemoveUse(HValue* value, int index) {
|
|
336
478
|
// Do not reuse use list nodes in debug mode, zap them.
|
337
479
|
if (current != NULL) {
|
338
480
|
HUseListNode* temp =
|
339
|
-
new
|
481
|
+
new(block()->zone())
|
482
|
+
HUseListNode(current->value(), current->index(), NULL);
|
340
483
|
current->Zap();
|
341
484
|
current = temp;
|
342
485
|
}
|
@@ -476,6 +619,11 @@ void HValue::PrintNameTo(StringStream* stream) {
|
|
476
619
|
}
|
477
620
|
|
478
621
|
|
622
|
+
bool HValue::HasMonomorphicJSObjectType() {
|
623
|
+
return !GetMonomorphicJSObjectMap().is_null();
|
624
|
+
}
|
625
|
+
|
626
|
+
|
479
627
|
bool HValue::UpdateInferredType() {
|
480
628
|
HType type = CalculateInferredType();
|
481
629
|
bool result = (!type.Equals(type_));
|
@@ -495,8 +643,8 @@ void HValue::RegisterUse(int index, HValue* new_value) {
|
|
495
643
|
|
496
644
|
if (new_value != NULL) {
|
497
645
|
if (removed == NULL) {
|
498
|
-
new_value->use_list_ =
|
499
|
-
|
646
|
+
new_value->use_list_ = new(new_value->block()->zone()) HUseListNode(
|
647
|
+
this, index, new_value->use_list_);
|
500
648
|
} else {
|
501
649
|
removed->set_tail(new_value->use_list_);
|
502
650
|
new_value->use_list_ = removed;
|
@@ -646,6 +794,11 @@ void HInstruction::Verify() {
|
|
646
794
|
#endif
|
647
795
|
|
648
796
|
|
797
|
+
void HDummyUse::PrintDataTo(StringStream* stream) {
|
798
|
+
value()->PrintNameTo(stream);
|
799
|
+
}
|
800
|
+
|
801
|
+
|
649
802
|
void HUnaryCall::PrintDataTo(StringStream* stream) {
|
650
803
|
value()->PrintNameTo(stream);
|
651
804
|
stream->Add(" ");
|
@@ -669,6 +822,28 @@ void HBoundsCheck::PrintDataTo(StringStream* stream) {
|
|
669
822
|
}
|
670
823
|
|
671
824
|
|
825
|
+
void HBoundsCheck::InferRepresentation(HInferRepresentation* h_infer) {
|
826
|
+
ASSERT(CheckFlag(kFlexibleRepresentation));
|
827
|
+
Representation r;
|
828
|
+
if (key_mode_ == DONT_ALLOW_SMI_KEY ||
|
829
|
+
!length()->representation().IsTagged()) {
|
830
|
+
r = Representation::Integer32();
|
831
|
+
} else if (index()->representation().IsTagged() ||
|
832
|
+
(index()->IsConstant() &&
|
833
|
+
HConstant::cast(index())->HasInteger32Value() &&
|
834
|
+
Smi::IsValid(HConstant::cast(index())->Integer32Value()))) {
|
835
|
+
// If the index is tagged, or a constant that holds a Smi, allow the length
|
836
|
+
// to be tagged, since it is usually already tagged from loading it out of
|
837
|
+
// the length field of a JSArray. This allows for direct comparison without
|
838
|
+
// untagging.
|
839
|
+
r = Representation::Tagged();
|
840
|
+
} else {
|
841
|
+
r = Representation::Integer32();
|
842
|
+
}
|
843
|
+
UpdateRepresentation(r, h_infer, "boundscheck");
|
844
|
+
}
|
845
|
+
|
846
|
+
|
672
847
|
void HCallConstantFunction::PrintDataTo(StringStream* stream) {
|
673
848
|
if (IsApplyFunction()) {
|
674
849
|
stream->Add("optimized apply ");
|
@@ -692,7 +867,7 @@ void HCallGlobal::PrintDataTo(StringStream* stream) {
|
|
692
867
|
|
693
868
|
|
694
869
|
void HCallKnownGlobal::PrintDataTo(StringStream* stream) {
|
695
|
-
stream->Add("o ", target()->shared()->DebugName());
|
870
|
+
stream->Add("%o ", target()->shared()->DebugName());
|
696
871
|
stream->Add("#%d", argument_count());
|
697
872
|
}
|
698
873
|
|
@@ -710,6 +885,13 @@ void HClassOfTestAndBranch::PrintDataTo(StringStream* stream) {
|
|
710
885
|
}
|
711
886
|
|
712
887
|
|
888
|
+
void HWrapReceiver::PrintDataTo(StringStream* stream) {
|
889
|
+
receiver()->PrintNameTo(stream);
|
890
|
+
stream->Add(" ");
|
891
|
+
function()->PrintNameTo(stream);
|
892
|
+
}
|
893
|
+
|
894
|
+
|
713
895
|
void HAccessArgumentsAt::PrintDataTo(StringStream* stream) {
|
714
896
|
arguments()->PrintNameTo(stream);
|
715
897
|
stream->Add("[");
|
@@ -749,6 +931,24 @@ void HReturn::PrintDataTo(StringStream* stream) {
|
|
749
931
|
}
|
750
932
|
|
751
933
|
|
934
|
+
Representation HBranch::observed_input_representation(int index) {
|
935
|
+
static const ToBooleanStub::Types tagged_types(
|
936
|
+
ToBooleanStub::UNDEFINED |
|
937
|
+
ToBooleanStub::NULL_TYPE |
|
938
|
+
ToBooleanStub::SPEC_OBJECT |
|
939
|
+
ToBooleanStub::STRING);
|
940
|
+
if (expected_input_types_.ContainsAnyOf(tagged_types)) {
|
941
|
+
return Representation::Tagged();
|
942
|
+
} else if (expected_input_types_.Contains(ToBooleanStub::HEAP_NUMBER)) {
|
943
|
+
return Representation::Double();
|
944
|
+
} else if (expected_input_types_.Contains(ToBooleanStub::SMI)) {
|
945
|
+
return Representation::Integer32();
|
946
|
+
} else {
|
947
|
+
return Representation::None();
|
948
|
+
}
|
949
|
+
}
|
950
|
+
|
951
|
+
|
752
952
|
void HCompareMap::PrintDataTo(StringStream* stream) {
|
753
953
|
value()->PrintNameTo(stream);
|
754
954
|
stream->Add(" (%p)", *map());
|
@@ -844,28 +1044,20 @@ void HLoadFieldByIndex::PrintDataTo(StringStream* stream) {
|
|
844
1044
|
}
|
845
1045
|
|
846
1046
|
|
847
|
-
HValue* HConstant::Canonicalize() {
|
848
|
-
return HasNoUses() ? NULL : this;
|
849
|
-
}
|
850
|
-
|
851
|
-
|
852
|
-
HValue* HTypeof::Canonicalize() {
|
853
|
-
return HasNoUses() ? NULL : this;
|
854
|
-
}
|
855
|
-
|
856
|
-
|
857
1047
|
HValue* HBitwise::Canonicalize() {
|
858
1048
|
if (!representation().IsInteger32()) return this;
|
859
1049
|
// If x is an int32, then x & -1 == x, x | 0 == x and x ^ 0 == x.
|
860
1050
|
int32_t nop_constant = (op() == Token::BIT_AND) ? -1 : 0;
|
861
1051
|
if (left()->IsConstant() &&
|
862
1052
|
HConstant::cast(left())->HasInteger32Value() &&
|
863
|
-
HConstant::cast(left())->Integer32Value() == nop_constant
|
1053
|
+
HConstant::cast(left())->Integer32Value() == nop_constant &&
|
1054
|
+
!right()->CheckFlag(kUint32)) {
|
864
1055
|
return right();
|
865
1056
|
}
|
866
1057
|
if (right()->IsConstant() &&
|
867
1058
|
HConstant::cast(right())->HasInteger32Value() &&
|
868
|
-
HConstant::cast(right())->Integer32Value() == nop_constant
|
1059
|
+
HConstant::cast(right())->Integer32Value() == nop_constant &&
|
1060
|
+
!left()->CheckFlag(kUint32)) {
|
869
1061
|
return left();
|
870
1062
|
}
|
871
1063
|
return this;
|
@@ -877,7 +1069,9 @@ HValue* HBitNot::Canonicalize() {
|
|
877
1069
|
if (value()->IsBitNot()) {
|
878
1070
|
HValue* result = HBitNot::cast(value())->value();
|
879
1071
|
ASSERT(result->representation().IsInteger32());
|
880
|
-
|
1072
|
+
if (!result->CheckFlag(kUint32)) {
|
1073
|
+
return result;
|
1074
|
+
}
|
881
1075
|
}
|
882
1076
|
return this;
|
883
1077
|
}
|
@@ -916,6 +1110,12 @@ void HTypeof::PrintDataTo(StringStream* stream) {
|
|
916
1110
|
}
|
917
1111
|
|
918
1112
|
|
1113
|
+
void HForceRepresentation::PrintDataTo(StringStream* stream) {
|
1114
|
+
stream->Add("%s ", representation().Mnemonic());
|
1115
|
+
value()->PrintNameTo(stream);
|
1116
|
+
}
|
1117
|
+
|
1118
|
+
|
919
1119
|
void HChange::PrintDataTo(StringStream* stream) {
|
920
1120
|
HUnaryOperation::PrintDataTo(stream);
|
921
1121
|
stream->Add(" %s to %s", from().Mnemonic(), to().Mnemonic());
|
@@ -928,8 +1128,10 @@ void HChange::PrintDataTo(StringStream* stream) {
|
|
928
1128
|
|
929
1129
|
void HJSArrayLength::PrintDataTo(StringStream* stream) {
|
930
1130
|
value()->PrintNameTo(stream);
|
931
|
-
|
932
|
-
|
1131
|
+
if (HasTypeCheck()) {
|
1132
|
+
stream->Add(" ");
|
1133
|
+
typecheck()->PrintNameTo(stream);
|
1134
|
+
}
|
933
1135
|
}
|
934
1136
|
|
935
1137
|
|
@@ -940,7 +1142,8 @@ HValue* HUnaryMathOperation::Canonicalize() {
|
|
940
1142
|
// introduced.
|
941
1143
|
if (value()->representation().IsInteger32()) return value();
|
942
1144
|
|
943
|
-
#
|
1145
|
+
#if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_IA32) || \
|
1146
|
+
defined(V8_TARGET_ARCH_X64)
|
944
1147
|
if (value()->IsDiv() && (value()->UseCount() == 1)) {
|
945
1148
|
// TODO(2038): Implement this optimization for non ARM architectures.
|
946
1149
|
HDiv* hdiv = HDiv::cast(value());
|
@@ -964,7 +1167,7 @@ HValue* HUnaryMathOperation::Canonicalize() {
|
|
964
1167
|
!HInstruction::cast(new_right)->IsLinked()) {
|
965
1168
|
HInstruction::cast(new_right)->InsertBefore(this);
|
966
1169
|
}
|
967
|
-
HMathFloorOfDiv* instr = new HMathFloorOfDiv(context(),
|
1170
|
+
HMathFloorOfDiv* instr = new(block()->zone()) HMathFloorOfDiv(context(),
|
968
1171
|
new_left,
|
969
1172
|
new_right);
|
970
1173
|
// Replace this HMathFloor instruction by the new HMathFloorOfDiv.
|
@@ -995,10 +1198,11 @@ HValue* HCheckInstanceType::Canonicalize() {
|
|
995
1198
|
value()->type().IsString()) {
|
996
1199
|
return NULL;
|
997
1200
|
}
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1201
|
+
|
1202
|
+
if (check_ == IS_SYMBOL && value()->IsConstant()) {
|
1203
|
+
// Dereferencing is safe here: a symbol cannot become a non-symbol.
|
1204
|
+
AllowHandleDereference allow_handle_deref;
|
1205
|
+
if (HConstant::cast(value())->handle()->IsSymbol()) return NULL;
|
1002
1206
|
}
|
1003
1207
|
return this;
|
1004
1208
|
}
|
@@ -1038,6 +1242,35 @@ void HCheckInstanceType::GetCheckMaskAndTag(uint8_t* mask, uint8_t* tag) {
|
|
1038
1242
|
}
|
1039
1243
|
|
1040
1244
|
|
1245
|
+
void HCheckMaps::SetSideEffectDominator(GVNFlag side_effect,
|
1246
|
+
HValue* dominator) {
|
1247
|
+
ASSERT(side_effect == kChangesMaps);
|
1248
|
+
// TODO(mstarzinger): For now we specialize on HStoreNamedField, but once
|
1249
|
+
// type information is rich enough we should generalize this to any HType
|
1250
|
+
// for which the map is known.
|
1251
|
+
if (HasNoUses() && dominator->IsStoreNamedField()) {
|
1252
|
+
HStoreNamedField* store = HStoreNamedField::cast(dominator);
|
1253
|
+
Handle<Map> map = store->transition();
|
1254
|
+
if (map.is_null() || store->object() != value()) return;
|
1255
|
+
for (int i = 0; i < map_set()->length(); i++) {
|
1256
|
+
if (map.is_identical_to(map_set()->at(i))) {
|
1257
|
+
DeleteAndReplaceWith(NULL);
|
1258
|
+
return;
|
1259
|
+
}
|
1260
|
+
}
|
1261
|
+
}
|
1262
|
+
}
|
1263
|
+
|
1264
|
+
|
1265
|
+
void HLoadElements::PrintDataTo(StringStream* stream) {
|
1266
|
+
value()->PrintNameTo(stream);
|
1267
|
+
if (HasTypeCheck()) {
|
1268
|
+
stream->Add(" ");
|
1269
|
+
typecheck()->PrintNameTo(stream);
|
1270
|
+
}
|
1271
|
+
}
|
1272
|
+
|
1273
|
+
|
1041
1274
|
void HCheckMaps::PrintDataTo(StringStream* stream) {
|
1042
1275
|
value()->PrintNameTo(stream);
|
1043
1276
|
stream->Add(" [%p", *map_set()->first());
|
@@ -1071,6 +1304,12 @@ void HCheckInstanceType::PrintDataTo(StringStream* stream) {
|
|
1071
1304
|
}
|
1072
1305
|
|
1073
1306
|
|
1307
|
+
void HCheckPrototypeMaps::PrintDataTo(StringStream* stream) {
|
1308
|
+
stream->Add("[receiver_prototype=%p,holder=%p]",
|
1309
|
+
*prototypes_.first(), *prototypes_.last());
|
1310
|
+
}
|
1311
|
+
|
1312
|
+
|
1074
1313
|
void HCallStub::PrintDataTo(StringStream* stream) {
|
1075
1314
|
stream->Add("%s ",
|
1076
1315
|
CodeStub::MajorName(major_key_, false));
|
@@ -1099,6 +1338,7 @@ Range* HChange::InferRange(Zone* zone) {
|
|
1099
1338
|
Range* input_range = value()->range();
|
1100
1339
|
if (from().IsInteger32() &&
|
1101
1340
|
to().IsTagged() &&
|
1341
|
+
!value()->CheckFlag(HInstruction::kUint32) &&
|
1102
1342
|
input_range != NULL && input_range->IsInSmiRange()) {
|
1103
1343
|
set_type(HType::Smi());
|
1104
1344
|
}
|
@@ -1221,6 +1461,11 @@ Range* HMod::InferRange(Zone* zone) {
|
|
1221
1461
|
if (a->CanBeMinusZero() || a->CanBeNegative()) {
|
1222
1462
|
result->set_can_be_minus_zero(true);
|
1223
1463
|
}
|
1464
|
+
|
1465
|
+
if (right()->range()->Includes(-1) && left()->range()->Includes(kMinInt)) {
|
1466
|
+
SetFlag(HValue::kCanOverflow);
|
1467
|
+
}
|
1468
|
+
|
1224
1469
|
if (!right()->range()->CanBeZero()) {
|
1225
1470
|
ClearFlag(HValue::kCanBeDivByZero);
|
1226
1471
|
}
|
@@ -1231,6 +1476,24 @@ Range* HMod::InferRange(Zone* zone) {
|
|
1231
1476
|
}
|
1232
1477
|
|
1233
1478
|
|
1479
|
+
Range* HMathMinMax::InferRange(Zone* zone) {
|
1480
|
+
if (representation().IsInteger32()) {
|
1481
|
+
Range* a = left()->range();
|
1482
|
+
Range* b = right()->range();
|
1483
|
+
Range* res = a->Copy(zone);
|
1484
|
+
if (operation_ == kMathMax) {
|
1485
|
+
res->CombinedMax(b);
|
1486
|
+
} else {
|
1487
|
+
ASSERT(operation_ == kMathMin);
|
1488
|
+
res->CombinedMin(b);
|
1489
|
+
}
|
1490
|
+
return res;
|
1491
|
+
} else {
|
1492
|
+
return HValue::InferRange(zone);
|
1493
|
+
}
|
1494
|
+
}
|
1495
|
+
|
1496
|
+
|
1234
1497
|
void HPhi::PrintTo(StringStream* stream) {
|
1235
1498
|
stream->Add("[");
|
1236
1499
|
for (int i = 0; i < OperandCount(); ++i) {
|
@@ -1251,7 +1514,7 @@ void HPhi::PrintTo(StringStream* stream) {
|
|
1251
1514
|
|
1252
1515
|
|
1253
1516
|
void HPhi::AddInput(HValue* value) {
|
1254
|
-
inputs_.Add(NULL);
|
1517
|
+
inputs_.Add(NULL, value->block()->zone());
|
1255
1518
|
SetOperandAt(OperandCount() - 1, value);
|
1256
1519
|
// Mark phis that may have 'arguments' directly or indirectly as an operand.
|
1257
1520
|
if (!CheckFlag(kIsArguments) && value->CheckFlag(kIsArguments)) {
|
@@ -1298,14 +1561,26 @@ void HPhi::InitRealUses(int phi_id) {
|
|
1298
1561
|
for (HUseIterator it(uses()); !it.Done(); it.Advance()) {
|
1299
1562
|
HValue* value = it.value();
|
1300
1563
|
if (!value->IsPhi()) {
|
1301
|
-
Representation rep = value->
|
1564
|
+
Representation rep = value->observed_input_representation(it.index());
|
1302
1565
|
non_phi_uses_[rep.kind()] += value->LoopWeight();
|
1566
|
+
if (FLAG_trace_representation) {
|
1567
|
+
PrintF("#%d Phi is used by real #%d %s as %s\n",
|
1568
|
+
id(), value->id(), value->Mnemonic(), rep.Mnemonic());
|
1569
|
+
}
|
1303
1570
|
}
|
1304
1571
|
}
|
1305
1572
|
}
|
1306
1573
|
|
1307
1574
|
|
1308
1575
|
void HPhi::AddNonPhiUsesFrom(HPhi* other) {
|
1576
|
+
if (FLAG_trace_representation) {
|
1577
|
+
PrintF("adding to #%d Phi uses of #%d Phi: i%d d%d t%d\n",
|
1578
|
+
id(), other->id(),
|
1579
|
+
other->non_phi_uses_[Representation::kInteger32],
|
1580
|
+
other->non_phi_uses_[Representation::kDouble],
|
1581
|
+
other->non_phi_uses_[Representation::kTagged]);
|
1582
|
+
}
|
1583
|
+
|
1309
1584
|
for (int i = 0; i < Representation::kNumRepresentations; i++) {
|
1310
1585
|
indirect_uses_[i] += other->non_phi_uses_[i];
|
1311
1586
|
}
|
@@ -1319,12 +1594,29 @@ void HPhi::AddIndirectUsesTo(int* dest) {
|
|
1319
1594
|
}
|
1320
1595
|
|
1321
1596
|
|
1597
|
+
void HSimulate::MergeInto(HSimulate* other) {
|
1598
|
+
for (int i = 0; i < values_.length(); ++i) {
|
1599
|
+
HValue* value = values_[i];
|
1600
|
+
if (HasAssignedIndexAt(i)) {
|
1601
|
+
other->AddAssignedValue(GetAssignedIndexAt(i), value);
|
1602
|
+
} else {
|
1603
|
+
if (other->pop_count_ > 0) {
|
1604
|
+
other->pop_count_--;
|
1605
|
+
} else {
|
1606
|
+
other->AddPushedValue(value);
|
1607
|
+
}
|
1608
|
+
}
|
1609
|
+
}
|
1610
|
+
other->pop_count_ += pop_count();
|
1611
|
+
}
|
1612
|
+
|
1613
|
+
|
1322
1614
|
void HSimulate::PrintDataTo(StringStream* stream) {
|
1323
|
-
stream->Add("id=%d", ast_id());
|
1615
|
+
stream->Add("id=%d", ast_id().ToInt());
|
1324
1616
|
if (pop_count_ > 0) stream->Add(" pop %d", pop_count_);
|
1325
1617
|
if (values_.length() > 0) {
|
1326
1618
|
if (pop_count_ > 0) stream->Add(" /");
|
1327
|
-
for (int i =
|
1619
|
+
for (int i = values_.length() - 1; i >= 0; --i) {
|
1328
1620
|
if (i > 0) stream->Add(",");
|
1329
1621
|
if (HasAssignedIndexAt(i)) {
|
1330
1622
|
stream->Add(" var[%d] = ", GetAssignedIndexAt(i));
|
@@ -1349,45 +1641,93 @@ void HDeoptimize::PrintDataTo(StringStream* stream) {
|
|
1349
1641
|
|
1350
1642
|
void HEnterInlined::PrintDataTo(StringStream* stream) {
|
1351
1643
|
SmartArrayPointer<char> name = function()->debug_name()->ToCString();
|
1352
|
-
stream->Add("%s, id=%d", *name, function()->id());
|
1644
|
+
stream->Add("%s, id=%d", *name, function()->id().ToInt());
|
1645
|
+
}
|
1646
|
+
|
1647
|
+
|
1648
|
+
static bool IsInteger32(double value) {
|
1649
|
+
double roundtrip_value = static_cast<double>(static_cast<int32_t>(value));
|
1650
|
+
return BitCast<int64_t>(roundtrip_value) == BitCast<int64_t>(value);
|
1353
1651
|
}
|
1354
1652
|
|
1355
1653
|
|
1356
1654
|
HConstant::HConstant(Handle<Object> handle, Representation r)
|
1357
1655
|
: handle_(handle),
|
1358
1656
|
has_int32_value_(false),
|
1359
|
-
has_double_value_(false)
|
1360
|
-
|
1361
|
-
|
1362
|
-
set_representation(r);
|
1657
|
+
has_double_value_(false) {
|
1658
|
+
// Dereferencing here is safe: the value of a number object does not change.
|
1659
|
+
AllowHandleDereference allow_handle_deref;
|
1363
1660
|
SetFlag(kUseGVN);
|
1364
1661
|
if (handle_->IsNumber()) {
|
1365
1662
|
double n = handle_->Number();
|
1366
|
-
|
1367
|
-
|
1368
|
-
if (has_int32_value_) int32_value_ = static_cast<int32_t>(n);
|
1663
|
+
has_int32_value_ = IsInteger32(n);
|
1664
|
+
int32_value_ = DoubleToInt32(n);
|
1369
1665
|
double_value_ = n;
|
1370
1666
|
has_double_value_ = true;
|
1371
1667
|
}
|
1668
|
+
if (r.IsNone()) {
|
1669
|
+
if (has_int32_value_) {
|
1670
|
+
r = Representation::Integer32();
|
1671
|
+
} else if (has_double_value_) {
|
1672
|
+
r = Representation::Double();
|
1673
|
+
} else {
|
1674
|
+
r = Representation::Tagged();
|
1675
|
+
}
|
1676
|
+
}
|
1677
|
+
set_representation(r);
|
1372
1678
|
}
|
1373
1679
|
|
1374
1680
|
|
1375
|
-
HConstant
|
1681
|
+
HConstant::HConstant(int32_t integer_value, Representation r)
|
1682
|
+
: has_int32_value_(true),
|
1683
|
+
has_double_value_(true),
|
1684
|
+
int32_value_(integer_value),
|
1685
|
+
double_value_(FastI2D(integer_value)) {
|
1686
|
+
set_representation(r);
|
1687
|
+
SetFlag(kUseGVN);
|
1688
|
+
}
|
1689
|
+
|
1690
|
+
|
1691
|
+
HConstant::HConstant(double double_value, Representation r)
|
1692
|
+
: has_int32_value_(IsInteger32(double_value)),
|
1693
|
+
has_double_value_(true),
|
1694
|
+
int32_value_(DoubleToInt32(double_value)),
|
1695
|
+
double_value_(double_value) {
|
1696
|
+
set_representation(r);
|
1697
|
+
SetFlag(kUseGVN);
|
1698
|
+
}
|
1699
|
+
|
1700
|
+
|
1701
|
+
HConstant* HConstant::CopyToRepresentation(Representation r, Zone* zone) const {
|
1376
1702
|
if (r.IsInteger32() && !has_int32_value_) return NULL;
|
1377
1703
|
if (r.IsDouble() && !has_double_value_) return NULL;
|
1378
|
-
|
1704
|
+
if (handle_.is_null()) {
|
1705
|
+
ASSERT(has_int32_value_ || has_double_value_);
|
1706
|
+
if (has_int32_value_) return new(zone) HConstant(int32_value_, r);
|
1707
|
+
return new(zone) HConstant(double_value_, r);
|
1708
|
+
}
|
1709
|
+
return new(zone) HConstant(handle_, r);
|
1379
1710
|
}
|
1380
1711
|
|
1381
1712
|
|
1382
|
-
HConstant* HConstant::CopyToTruncatedInt32() const {
|
1383
|
-
if (
|
1384
|
-
|
1385
|
-
|
1386
|
-
|
1713
|
+
HConstant* HConstant::CopyToTruncatedInt32(Zone* zone) const {
|
1714
|
+
if (has_int32_value_) {
|
1715
|
+
if (handle_.is_null()) {
|
1716
|
+
return new(zone) HConstant(int32_value_, Representation::Integer32());
|
1717
|
+
} else {
|
1718
|
+
// Re-use the existing Handle if possible.
|
1719
|
+
return new(zone) HConstant(handle_, Representation::Integer32());
|
1720
|
+
}
|
1721
|
+
} else if (has_double_value_) {
|
1722
|
+
return new(zone) HConstant(DoubleToInt32(double_value_),
|
1723
|
+
Representation::Integer32());
|
1724
|
+
} else {
|
1725
|
+
return NULL;
|
1726
|
+
}
|
1387
1727
|
}
|
1388
1728
|
|
1389
1729
|
|
1390
|
-
bool HConstant::ToBoolean()
|
1730
|
+
bool HConstant::ToBoolean() {
|
1391
1731
|
// Converts the constant's boolean value according to
|
1392
1732
|
// ECMAScript section 9.2 ToBoolean conversion.
|
1393
1733
|
if (HasInteger32Value()) return Integer32Value() != 0;
|
@@ -1395,17 +1735,27 @@ bool HConstant::ToBoolean() const {
|
|
1395
1735
|
double v = DoubleValue();
|
1396
1736
|
return v != 0 && !isnan(v);
|
1397
1737
|
}
|
1398
|
-
|
1399
|
-
|
1400
|
-
|
1401
|
-
if (
|
1402
|
-
if (
|
1403
|
-
|
1738
|
+
// Dereferencing is safe: singletons do not change and strings are
|
1739
|
+
// immutable.
|
1740
|
+
AllowHandleDereference allow_handle_deref;
|
1741
|
+
if (handle_->IsTrue()) return true;
|
1742
|
+
if (handle_->IsFalse()) return false;
|
1743
|
+
if (handle_->IsUndefined()) return false;
|
1744
|
+
if (handle_->IsNull()) return false;
|
1745
|
+
if (handle_->IsString() && String::cast(*handle_)->length() == 0) {
|
1746
|
+
return false;
|
1747
|
+
}
|
1404
1748
|
return true;
|
1405
1749
|
}
|
1406
1750
|
|
1407
1751
|
void HConstant::PrintDataTo(StringStream* stream) {
|
1408
|
-
|
1752
|
+
if (has_int32_value_) {
|
1753
|
+
stream->Add("%d ", int32_value_);
|
1754
|
+
} else if (has_double_value_) {
|
1755
|
+
stream->Add("%f ", FmtElm(double_value_));
|
1756
|
+
} else {
|
1757
|
+
handle()->ShortPrint(stream);
|
1758
|
+
}
|
1409
1759
|
}
|
1410
1760
|
|
1411
1761
|
|
@@ -1425,6 +1775,60 @@ void HBinaryOperation::PrintDataTo(StringStream* stream) {
|
|
1425
1775
|
}
|
1426
1776
|
|
1427
1777
|
|
1778
|
+
void HBinaryOperation::InferRepresentation(HInferRepresentation* h_infer) {
|
1779
|
+
ASSERT(CheckFlag(kFlexibleRepresentation));
|
1780
|
+
Representation new_rep = RepresentationFromInputs();
|
1781
|
+
UpdateRepresentation(new_rep, h_infer, "inputs");
|
1782
|
+
// When the operation has information about its own output type, don't look
|
1783
|
+
// at uses.
|
1784
|
+
if (!observed_output_representation_.IsNone()) return;
|
1785
|
+
new_rep = RepresentationFromUses();
|
1786
|
+
UpdateRepresentation(new_rep, h_infer, "uses");
|
1787
|
+
}
|
1788
|
+
|
1789
|
+
|
1790
|
+
Representation HBinaryOperation::RepresentationFromInputs() {
|
1791
|
+
// Determine the worst case of observed input representations and
|
1792
|
+
// the currently assumed output representation.
|
1793
|
+
Representation rep = representation();
|
1794
|
+
if (observed_output_representation_.is_more_general_than(rep)) {
|
1795
|
+
rep = observed_output_representation_;
|
1796
|
+
}
|
1797
|
+
for (int i = 1; i <= 2; ++i) {
|
1798
|
+
Representation input_rep = observed_input_representation(i);
|
1799
|
+
if (input_rep.is_more_general_than(rep)) rep = input_rep;
|
1800
|
+
}
|
1801
|
+
// If any of the actual input representation is more general than what we
|
1802
|
+
// have so far but not Tagged, use that representation instead.
|
1803
|
+
Representation left_rep = left()->representation();
|
1804
|
+
Representation right_rep = right()->representation();
|
1805
|
+
|
1806
|
+
if (left_rep.is_more_general_than(rep) &&
|
1807
|
+
left()->CheckFlag(kFlexibleRepresentation)) {
|
1808
|
+
rep = left_rep;
|
1809
|
+
}
|
1810
|
+
if (right_rep.is_more_general_than(rep) &&
|
1811
|
+
right()->CheckFlag(kFlexibleRepresentation)) {
|
1812
|
+
rep = right_rep;
|
1813
|
+
}
|
1814
|
+
return rep;
|
1815
|
+
}
|
1816
|
+
|
1817
|
+
|
1818
|
+
void HBinaryOperation::AssumeRepresentation(Representation r) {
|
1819
|
+
set_observed_input_representation(r, r);
|
1820
|
+
HValue::AssumeRepresentation(r);
|
1821
|
+
}
|
1822
|
+
|
1823
|
+
|
1824
|
+
void HMathMinMax::InferRepresentation(HInferRepresentation* h_infer) {
|
1825
|
+
ASSERT(CheckFlag(kFlexibleRepresentation));
|
1826
|
+
Representation new_rep = RepresentationFromInputs();
|
1827
|
+
UpdateRepresentation(new_rep, h_infer, "inputs");
|
1828
|
+
// Do not care about uses.
|
1829
|
+
}
|
1830
|
+
|
1831
|
+
|
1428
1832
|
Range* HBitwise::InferRange(Zone* zone) {
|
1429
1833
|
if (op() == Token::BIT_XOR) return HValue::InferRange(zone);
|
1430
1834
|
const int32_t kDefaultMask = static_cast<int32_t>(0xffffffff);
|
@@ -1501,7 +1905,7 @@ Range* HShl::InferRange(Zone* zone) {
|
|
1501
1905
|
}
|
1502
1906
|
|
1503
1907
|
|
1504
|
-
Range*
|
1908
|
+
Range* HLoadKeyed::InferRange(Zone* zone) {
|
1505
1909
|
switch (elements_kind()) {
|
1506
1910
|
case EXTERNAL_PIXEL_ELEMENTS:
|
1507
1911
|
return new(zone) Range(0, 255);
|
@@ -1556,9 +1960,19 @@ void HGoto::PrintDataTo(StringStream* stream) {
|
|
1556
1960
|
}
|
1557
1961
|
|
1558
1962
|
|
1559
|
-
void HCompareIDAndBranch::
|
1560
|
-
|
1561
|
-
|
1963
|
+
void HCompareIDAndBranch::InferRepresentation(HInferRepresentation* h_infer) {
|
1964
|
+
Representation rep = Representation::None();
|
1965
|
+
Representation left_rep = left()->representation();
|
1966
|
+
Representation right_rep = right()->representation();
|
1967
|
+
bool observed_integers =
|
1968
|
+
observed_input_representation(0).IsInteger32() &&
|
1969
|
+
observed_input_representation(1).IsInteger32();
|
1970
|
+
bool inputs_are_not_doubles =
|
1971
|
+
!left_rep.IsDouble() && !right_rep.IsDouble();
|
1972
|
+
if (observed_integers && inputs_are_not_doubles) {
|
1973
|
+
rep = Representation::Integer32();
|
1974
|
+
} else {
|
1975
|
+
rep = Representation::Double();
|
1562
1976
|
// According to the ES5 spec (11.9.3, 11.8.5), Equality comparisons (==, ===
|
1563
1977
|
// and !=) have special handling of undefined, e.g. undefined == undefined
|
1564
1978
|
// is 'true'. Relational comparisons have a different semantic, first
|
@@ -1575,9 +1989,8 @@ void HCompareIDAndBranch::SetInputRepresentation(Representation r) {
|
|
1575
1989
|
if (!Token::IsOrderedRelationalCompareOp(token_)) {
|
1576
1990
|
SetFlag(kDeoptimizeOnUndefined);
|
1577
1991
|
}
|
1578
|
-
} else {
|
1579
|
-
ASSERT(r.IsInteger32());
|
1580
1992
|
}
|
1993
|
+
ChangeRepresentation(rep);
|
1581
1994
|
}
|
1582
1995
|
|
1583
1996
|
|
@@ -1592,24 +2005,55 @@ void HLoadNamedField::PrintDataTo(StringStream* stream) {
|
|
1592
2005
|
}
|
1593
2006
|
|
1594
2007
|
|
2008
|
+
// Returns true if an instance of this map can never find a property with this
|
2009
|
+
// name in its prototype chain. This means all prototypes up to the top are
|
2010
|
+
// fast and don't have the name in them. It would be good if we could optimize
|
2011
|
+
// polymorphic loads where the property is sometimes found in the prototype
|
2012
|
+
// chain.
|
2013
|
+
static bool PrototypeChainCanNeverResolve(
|
2014
|
+
Handle<Map> map, Handle<String> name) {
|
2015
|
+
Isolate* isolate = map->GetIsolate();
|
2016
|
+
Object* current = map->prototype();
|
2017
|
+
while (current != isolate->heap()->null_value()) {
|
2018
|
+
if (current->IsJSGlobalProxy() ||
|
2019
|
+
current->IsGlobalObject() ||
|
2020
|
+
!current->IsJSObject() ||
|
2021
|
+
JSObject::cast(current)->map()->has_named_interceptor() ||
|
2022
|
+
JSObject::cast(current)->IsAccessCheckNeeded() ||
|
2023
|
+
!JSObject::cast(current)->HasFastProperties()) {
|
2024
|
+
return false;
|
2025
|
+
}
|
2026
|
+
|
2027
|
+
LookupResult lookup(isolate);
|
2028
|
+
Map* map = JSObject::cast(current)->map();
|
2029
|
+
map->LookupDescriptor(NULL, *name, &lookup);
|
2030
|
+
if (lookup.IsFound()) return false;
|
2031
|
+
if (!lookup.IsCacheable()) return false;
|
2032
|
+
current = JSObject::cast(current)->GetPrototype();
|
2033
|
+
}
|
2034
|
+
return true;
|
2035
|
+
}
|
2036
|
+
|
2037
|
+
|
1595
2038
|
HLoadNamedFieldPolymorphic::HLoadNamedFieldPolymorphic(HValue* context,
|
1596
2039
|
HValue* object,
|
1597
2040
|
SmallMapList* types,
|
1598
|
-
Handle<String> name
|
1599
|
-
|
2041
|
+
Handle<String> name,
|
2042
|
+
Zone* zone)
|
2043
|
+
: types_(Min(types->length(), kMaxLoadPolymorphism), zone),
|
1600
2044
|
name_(name),
|
1601
2045
|
need_generic_(false) {
|
1602
2046
|
SetOperandAt(0, context);
|
1603
2047
|
SetOperandAt(1, object);
|
1604
2048
|
set_representation(Representation::Tagged());
|
1605
2049
|
SetGVNFlag(kDependsOnMaps);
|
1606
|
-
|
2050
|
+
SmallMapList negative_lookups;
|
1607
2051
|
for (int i = 0;
|
1608
2052
|
i < types->length() && types_.length() < kMaxLoadPolymorphism;
|
1609
2053
|
++i) {
|
1610
2054
|
Handle<Map> map = types->at(i);
|
1611
2055
|
LookupResult lookup(map->GetIsolate());
|
1612
|
-
map->
|
2056
|
+
map->LookupDescriptor(NULL, *name, &lookup);
|
1613
2057
|
if (lookup.IsFound()) {
|
1614
2058
|
switch (lookup.type()) {
|
1615
2059
|
case FIELD: {
|
@@ -1619,28 +2063,45 @@ HLoadNamedFieldPolymorphic::HLoadNamedFieldPolymorphic(HValue* context,
|
|
1619
2063
|
} else {
|
1620
2064
|
SetGVNFlag(kDependsOnBackingStoreFields);
|
1621
2065
|
}
|
1622
|
-
types_.Add(types->at(i));
|
2066
|
+
types_.Add(types->at(i), zone);
|
1623
2067
|
break;
|
1624
2068
|
}
|
1625
2069
|
case CONSTANT_FUNCTION:
|
1626
|
-
types_.Add(types->at(i));
|
2070
|
+
types_.Add(types->at(i), zone);
|
1627
2071
|
break;
|
1628
|
-
case
|
1629
|
-
// We should just ignore these since they are not relevant to a load
|
1630
|
-
// operation. This means we will deopt if we actually see this map
|
1631
|
-
// from optimized code.
|
1632
|
-
map_transitions++;
|
2072
|
+
case CALLBACKS:
|
1633
2073
|
break;
|
1634
|
-
|
2074
|
+
case TRANSITION:
|
2075
|
+
case INTERCEPTOR:
|
2076
|
+
case NONEXISTENT:
|
2077
|
+
case NORMAL:
|
2078
|
+
case HANDLER:
|
2079
|
+
UNREACHABLE();
|
1635
2080
|
break;
|
1636
2081
|
}
|
2082
|
+
} else if (lookup.IsCacheable() &&
|
2083
|
+
// For dicts the lookup on the map will fail, but the object may
|
2084
|
+
// contain the property so we cannot generate a negative lookup
|
2085
|
+
// (which would just be a map check and return undefined).
|
2086
|
+
!map->is_dictionary_map() &&
|
2087
|
+
!map->has_named_interceptor() &&
|
2088
|
+
PrototypeChainCanNeverResolve(map, name)) {
|
2089
|
+
negative_lookups.Add(types->at(i), zone);
|
1637
2090
|
}
|
1638
2091
|
}
|
1639
2092
|
|
1640
|
-
|
1641
|
-
|
2093
|
+
bool need_generic =
|
2094
|
+
(types->length() != negative_lookups.length() + types_.length());
|
2095
|
+
if (!need_generic && FLAG_deoptimize_uncommon_cases) {
|
1642
2096
|
SetFlag(kUseGVN);
|
2097
|
+
for (int i = 0; i < negative_lookups.length(); i++) {
|
2098
|
+
types_.Add(negative_lookups.at(i), zone);
|
2099
|
+
}
|
1643
2100
|
} else {
|
2101
|
+
// We don't have an easy way to handle both a call (to the generic stub) and
|
2102
|
+
// a deopt in the same hydrogen instruction, so in this case we don't add
|
2103
|
+
// the negative lookups which can deopt - just let the generic stub handle
|
2104
|
+
// them.
|
1644
2105
|
SetAllSideEffects();
|
1645
2106
|
need_generic_ = true;
|
1646
2107
|
}
|
@@ -1680,36 +2141,64 @@ void HLoadNamedGeneric::PrintDataTo(StringStream* stream) {
|
|
1680
2141
|
}
|
1681
2142
|
|
1682
2143
|
|
1683
|
-
void
|
1684
|
-
|
2144
|
+
void HLoadKeyed::PrintDataTo(StringStream* stream) {
|
2145
|
+
if (!is_external()) {
|
2146
|
+
elements()->PrintNameTo(stream);
|
2147
|
+
} else {
|
2148
|
+
ASSERT(elements_kind() >= FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND &&
|
2149
|
+
elements_kind() <= LAST_EXTERNAL_ARRAY_ELEMENTS_KIND);
|
2150
|
+
elements()->PrintNameTo(stream);
|
2151
|
+
stream->Add(".");
|
2152
|
+
stream->Add(ElementsKindToString(elements_kind()));
|
2153
|
+
}
|
2154
|
+
|
1685
2155
|
stream->Add("[");
|
1686
2156
|
key()->PrintNameTo(stream);
|
1687
|
-
|
1688
|
-
|
2157
|
+
if (IsDehoisted()) {
|
2158
|
+
stream->Add(" + %d]", index_offset());
|
2159
|
+
} else {
|
2160
|
+
stream->Add("]");
|
2161
|
+
}
|
2162
|
+
|
2163
|
+
if (HasDependency()) {
|
2164
|
+
stream->Add(" ");
|
2165
|
+
dependency()->PrintNameTo(stream);
|
2166
|
+
}
|
2167
|
+
|
2168
|
+
if (RequiresHoleCheck()) {
|
1689
2169
|
stream->Add(" check_hole");
|
1690
2170
|
}
|
1691
2171
|
}
|
1692
2172
|
|
1693
2173
|
|
1694
|
-
bool
|
1695
|
-
if (
|
2174
|
+
bool HLoadKeyed::UsesMustHandleHole() const {
|
2175
|
+
if (IsFastPackedElementsKind(elements_kind())) {
|
2176
|
+
return false;
|
2177
|
+
}
|
2178
|
+
|
2179
|
+
if (hole_mode() == ALLOW_RETURN_HOLE) return true;
|
2180
|
+
|
2181
|
+
if (IsFastDoubleElementsKind(elements_kind())) {
|
1696
2182
|
return false;
|
1697
2183
|
}
|
1698
2184
|
|
1699
2185
|
for (HUseIterator it(uses()); !it.Done(); it.Advance()) {
|
1700
2186
|
HValue* use = it.value();
|
1701
|
-
if (!use->IsChange())
|
2187
|
+
if (!use->IsChange()) {
|
2188
|
+
return false;
|
2189
|
+
}
|
1702
2190
|
}
|
1703
2191
|
|
1704
|
-
return
|
2192
|
+
return true;
|
1705
2193
|
}
|
1706
2194
|
|
1707
2195
|
|
1708
|
-
|
1709
|
-
|
1710
|
-
|
1711
|
-
|
1712
|
-
|
2196
|
+
bool HLoadKeyed::RequiresHoleCheck() const {
|
2197
|
+
if (IsFastPackedElementsKind(elements_kind())) {
|
2198
|
+
return false;
|
2199
|
+
}
|
2200
|
+
|
2201
|
+
return !UsesMustHandleHole();
|
1713
2202
|
}
|
1714
2203
|
|
1715
2204
|
|
@@ -1725,25 +2214,26 @@ HValue* HLoadKeyedGeneric::Canonicalize() {
|
|
1725
2214
|
// Recognize generic keyed loads that use property name generated
|
1726
2215
|
// by for-in statement as a key and rewrite them into fast property load
|
1727
2216
|
// by index.
|
1728
|
-
if (key()->
|
1729
|
-
|
1730
|
-
if (key_load->
|
2217
|
+
if (key()->IsLoadKeyed()) {
|
2218
|
+
HLoadKeyed* key_load = HLoadKeyed::cast(key());
|
2219
|
+
if (key_load->elements()->IsForInCacheArray()) {
|
1731
2220
|
HForInCacheArray* names_cache =
|
1732
|
-
HForInCacheArray::cast(key_load->
|
2221
|
+
HForInCacheArray::cast(key_load->elements());
|
1733
2222
|
|
1734
2223
|
if (names_cache->enumerable() == object()) {
|
1735
2224
|
HForInCacheArray* index_cache =
|
1736
2225
|
names_cache->index_cache();
|
1737
2226
|
HCheckMapValue* map_check =
|
1738
2227
|
new(block()->zone()) HCheckMapValue(object(), names_cache->map());
|
1739
|
-
HInstruction* index = new(block()->zone())
|
2228
|
+
HInstruction* index = new(block()->zone()) HLoadKeyed(
|
1740
2229
|
index_cache,
|
1741
2230
|
key_load->key(),
|
1742
|
-
|
1743
|
-
|
1744
|
-
object(), index);
|
2231
|
+
key_load->key(),
|
2232
|
+
key_load->elements_kind());
|
1745
2233
|
map_check->InsertBefore(this);
|
1746
2234
|
index->InsertBefore(this);
|
2235
|
+
HLoadFieldByIndex* load = new(block()->zone()) HLoadFieldByIndex(
|
2236
|
+
object(), index);
|
1747
2237
|
load->InsertBefore(this);
|
1748
2238
|
return load;
|
1749
2239
|
}
|
@@ -1754,55 +2244,6 @@ HValue* HLoadKeyedGeneric::Canonicalize() {
|
|
1754
2244
|
}
|
1755
2245
|
|
1756
2246
|
|
1757
|
-
void HLoadKeyedSpecializedArrayElement::PrintDataTo(
|
1758
|
-
StringStream* stream) {
|
1759
|
-
external_pointer()->PrintNameTo(stream);
|
1760
|
-
stream->Add(".");
|
1761
|
-
switch (elements_kind()) {
|
1762
|
-
case EXTERNAL_BYTE_ELEMENTS:
|
1763
|
-
stream->Add("byte");
|
1764
|
-
break;
|
1765
|
-
case EXTERNAL_UNSIGNED_BYTE_ELEMENTS:
|
1766
|
-
stream->Add("u_byte");
|
1767
|
-
break;
|
1768
|
-
case EXTERNAL_SHORT_ELEMENTS:
|
1769
|
-
stream->Add("short");
|
1770
|
-
break;
|
1771
|
-
case EXTERNAL_UNSIGNED_SHORT_ELEMENTS:
|
1772
|
-
stream->Add("u_short");
|
1773
|
-
break;
|
1774
|
-
case EXTERNAL_INT_ELEMENTS:
|
1775
|
-
stream->Add("int");
|
1776
|
-
break;
|
1777
|
-
case EXTERNAL_UNSIGNED_INT_ELEMENTS:
|
1778
|
-
stream->Add("u_int");
|
1779
|
-
break;
|
1780
|
-
case EXTERNAL_FLOAT_ELEMENTS:
|
1781
|
-
stream->Add("float");
|
1782
|
-
break;
|
1783
|
-
case EXTERNAL_DOUBLE_ELEMENTS:
|
1784
|
-
stream->Add("double");
|
1785
|
-
break;
|
1786
|
-
case EXTERNAL_PIXEL_ELEMENTS:
|
1787
|
-
stream->Add("pixel");
|
1788
|
-
break;
|
1789
|
-
case FAST_ELEMENTS:
|
1790
|
-
case FAST_SMI_ELEMENTS:
|
1791
|
-
case FAST_DOUBLE_ELEMENTS:
|
1792
|
-
case FAST_HOLEY_ELEMENTS:
|
1793
|
-
case FAST_HOLEY_SMI_ELEMENTS:
|
1794
|
-
case FAST_HOLEY_DOUBLE_ELEMENTS:
|
1795
|
-
case DICTIONARY_ELEMENTS:
|
1796
|
-
case NON_STRICT_ARGUMENTS_ELEMENTS:
|
1797
|
-
UNREACHABLE();
|
1798
|
-
break;
|
1799
|
-
}
|
1800
|
-
stream->Add("[");
|
1801
|
-
key()->PrintNameTo(stream);
|
1802
|
-
stream->Add("]");
|
1803
|
-
}
|
1804
|
-
|
1805
|
-
|
1806
2247
|
void HStoreNamedGeneric::PrintDataTo(StringStream* stream) {
|
1807
2248
|
object()->PrintNameTo(stream);
|
1808
2249
|
stream->Add(".");
|
@@ -1829,20 +2270,25 @@ void HStoreNamedField::PrintDataTo(StringStream* stream) {
|
|
1829
2270
|
}
|
1830
2271
|
|
1831
2272
|
|
1832
|
-
void
|
1833
|
-
|
1834
|
-
|
1835
|
-
|
1836
|
-
|
1837
|
-
|
1838
|
-
|
1839
|
-
|
2273
|
+
void HStoreKeyed::PrintDataTo(StringStream* stream) {
|
2274
|
+
if (!is_external()) {
|
2275
|
+
elements()->PrintNameTo(stream);
|
2276
|
+
} else {
|
2277
|
+
elements()->PrintNameTo(stream);
|
2278
|
+
stream->Add(".");
|
2279
|
+
stream->Add(ElementsKindToString(elements_kind()));
|
2280
|
+
ASSERT(elements_kind() >= FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND &&
|
2281
|
+
elements_kind() <= LAST_EXTERNAL_ARRAY_ELEMENTS_KIND);
|
2282
|
+
}
|
1840
2283
|
|
1841
|
-
void HStoreKeyedFastDoubleElement::PrintDataTo(StringStream* stream) {
|
1842
|
-
elements()->PrintNameTo(stream);
|
1843
2284
|
stream->Add("[");
|
1844
2285
|
key()->PrintNameTo(stream);
|
1845
|
-
|
2286
|
+
if (IsDehoisted()) {
|
2287
|
+
stream->Add(" + %d] = ", index_offset());
|
2288
|
+
} else {
|
2289
|
+
stream->Add("] = ");
|
2290
|
+
}
|
2291
|
+
|
1846
2292
|
value()->PrintNameTo(stream);
|
1847
2293
|
}
|
1848
2294
|
|
@@ -1856,56 +2302,6 @@ void HStoreKeyedGeneric::PrintDataTo(StringStream* stream) {
|
|
1856
2302
|
}
|
1857
2303
|
|
1858
2304
|
|
1859
|
-
void HStoreKeyedSpecializedArrayElement::PrintDataTo(
|
1860
|
-
StringStream* stream) {
|
1861
|
-
external_pointer()->PrintNameTo(stream);
|
1862
|
-
stream->Add(".");
|
1863
|
-
switch (elements_kind()) {
|
1864
|
-
case EXTERNAL_BYTE_ELEMENTS:
|
1865
|
-
stream->Add("byte");
|
1866
|
-
break;
|
1867
|
-
case EXTERNAL_UNSIGNED_BYTE_ELEMENTS:
|
1868
|
-
stream->Add("u_byte");
|
1869
|
-
break;
|
1870
|
-
case EXTERNAL_SHORT_ELEMENTS:
|
1871
|
-
stream->Add("short");
|
1872
|
-
break;
|
1873
|
-
case EXTERNAL_UNSIGNED_SHORT_ELEMENTS:
|
1874
|
-
stream->Add("u_short");
|
1875
|
-
break;
|
1876
|
-
case EXTERNAL_INT_ELEMENTS:
|
1877
|
-
stream->Add("int");
|
1878
|
-
break;
|
1879
|
-
case EXTERNAL_UNSIGNED_INT_ELEMENTS:
|
1880
|
-
stream->Add("u_int");
|
1881
|
-
break;
|
1882
|
-
case EXTERNAL_FLOAT_ELEMENTS:
|
1883
|
-
stream->Add("float");
|
1884
|
-
break;
|
1885
|
-
case EXTERNAL_DOUBLE_ELEMENTS:
|
1886
|
-
stream->Add("double");
|
1887
|
-
break;
|
1888
|
-
case EXTERNAL_PIXEL_ELEMENTS:
|
1889
|
-
stream->Add("pixel");
|
1890
|
-
break;
|
1891
|
-
case FAST_SMI_ELEMENTS:
|
1892
|
-
case FAST_ELEMENTS:
|
1893
|
-
case FAST_DOUBLE_ELEMENTS:
|
1894
|
-
case FAST_HOLEY_SMI_ELEMENTS:
|
1895
|
-
case FAST_HOLEY_ELEMENTS:
|
1896
|
-
case FAST_HOLEY_DOUBLE_ELEMENTS:
|
1897
|
-
case DICTIONARY_ELEMENTS:
|
1898
|
-
case NON_STRICT_ARGUMENTS_ELEMENTS:
|
1899
|
-
UNREACHABLE();
|
1900
|
-
break;
|
1901
|
-
}
|
1902
|
-
stream->Add("[");
|
1903
|
-
key()->PrintNameTo(stream);
|
1904
|
-
stream->Add("] = ");
|
1905
|
-
value()->PrintNameTo(stream);
|
1906
|
-
}
|
1907
|
-
|
1908
|
-
|
1909
2305
|
void HTransitionElementsKind::PrintDataTo(StringStream* stream) {
|
1910
2306
|
object()->PrintNameTo(stream);
|
1911
2307
|
ElementsKind from_kind = original_map()->elements_kind();
|
@@ -1925,7 +2321,7 @@ void HLoadGlobalCell::PrintDataTo(StringStream* stream) {
|
|
1925
2321
|
}
|
1926
2322
|
|
1927
2323
|
|
1928
|
-
bool HLoadGlobalCell::RequiresHoleCheck() {
|
2324
|
+
bool HLoadGlobalCell::RequiresHoleCheck() const {
|
1929
2325
|
if (details_.IsDontDelete() && !details_.IsReadOnly()) return false;
|
1930
2326
|
for (HUseIterator it(uses()); !it.Done(); it.Advance()) {
|
1931
2327
|
HValue* use = it.value();
|
@@ -2007,6 +2403,10 @@ HType HPhi::CalculateInferredType() {
|
|
2007
2403
|
|
2008
2404
|
|
2009
2405
|
HType HConstant::CalculateInferredType() {
|
2406
|
+
if (has_int32_value_) {
|
2407
|
+
return Smi::IsValid(int32_value_) ? HType::Smi() : HType::HeapNumber();
|
2408
|
+
}
|
2409
|
+
if (has_double_value_) return HType::HeapNumber();
|
2010
2410
|
return HType::TypeFromValue(handle_);
|
2011
2411
|
}
|
2012
2412
|
|
@@ -2072,6 +2472,11 @@ HType HAllocateObject::CalculateInferredType() {
|
|
2072
2472
|
}
|
2073
2473
|
|
2074
2474
|
|
2475
|
+
HType HAllocate::CalculateInferredType() {
|
2476
|
+
return type_;
|
2477
|
+
}
|
2478
|
+
|
2479
|
+
|
2075
2480
|
HType HFastLiteral::CalculateInferredType() {
|
2076
2481
|
// TODO(mstarzinger): Be smarter, could also be JSArray here.
|
2077
2482
|
return HType::JSObject();
|
@@ -2154,6 +2559,13 @@ HValue* HDiv::EnsureAndPropagateNotMinusZero(BitVector* visited) {
|
|
2154
2559
|
}
|
2155
2560
|
|
2156
2561
|
|
2562
|
+
HValue* HMathFloorOfDiv::EnsureAndPropagateNotMinusZero(BitVector* visited) {
|
2563
|
+
visited->Add(id());
|
2564
|
+
SetFlag(kBailoutOnMinusZero);
|
2565
|
+
return NULL;
|
2566
|
+
}
|
2567
|
+
|
2568
|
+
|
2157
2569
|
HValue* HMul::EnsureAndPropagateNotMinusZero(BitVector* visited) {
|
2158
2570
|
visited->Add(id());
|
2159
2571
|
if (range() == NULL || range()->CanBeMinusZero()) {
|
@@ -2185,13 +2597,22 @@ HValue* HAdd::EnsureAndPropagateNotMinusZero(BitVector* visited) {
|
|
2185
2597
|
}
|
2186
2598
|
|
2187
2599
|
|
2188
|
-
bool
|
2189
|
-
// If value
|
2190
|
-
//
|
2191
|
-
|
2192
|
-
|
2600
|
+
bool HStoreKeyed::NeedsCanonicalization() {
|
2601
|
+
// If value is an integer or smi or comes from the result of a keyed load or
|
2602
|
+
// constant then it is either be a non-hole value or in the case of a constant
|
2603
|
+
// the hole is only being stored explicitly: no need for canonicalization.
|
2604
|
+
if (value()->IsLoadKeyed() || value()->IsConstant()) {
|
2193
2605
|
return false;
|
2194
2606
|
}
|
2607
|
+
|
2608
|
+
if (value()->IsChange()) {
|
2609
|
+
if (HChange::cast(value())->from().IsInteger32()) {
|
2610
|
+
return false;
|
2611
|
+
}
|
2612
|
+
if (HChange::cast(value())->value()->type().IsSmi()) {
|
2613
|
+
return false;
|
2614
|
+
}
|
2615
|
+
}
|
2195
2616
|
return true;
|
2196
2617
|
}
|
2197
2618
|
|
@@ -2371,7 +2792,41 @@ void HBitwise::PrintDataTo(StringStream* stream) {
|
|
2371
2792
|
}
|
2372
2793
|
|
2373
2794
|
|
2374
|
-
|
2795
|
+
void HPhi::InferRepresentation(HInferRepresentation* h_infer) {
|
2796
|
+
ASSERT(CheckFlag(kFlexibleRepresentation));
|
2797
|
+
// If there are non-Phi uses, and all of them have observed the same
|
2798
|
+
// representation, than that's what this Phi is going to use.
|
2799
|
+
Representation new_rep = RepresentationObservedByAllNonPhiUses();
|
2800
|
+
if (!new_rep.IsNone()) {
|
2801
|
+
UpdateRepresentation(new_rep, h_infer, "unanimous use observations");
|
2802
|
+
return;
|
2803
|
+
}
|
2804
|
+
new_rep = RepresentationFromInputs();
|
2805
|
+
UpdateRepresentation(new_rep, h_infer, "inputs");
|
2806
|
+
new_rep = RepresentationFromUses();
|
2807
|
+
UpdateRepresentation(new_rep, h_infer, "uses");
|
2808
|
+
new_rep = RepresentationFromUseRequirements();
|
2809
|
+
UpdateRepresentation(new_rep, h_infer, "use requirements");
|
2810
|
+
}
|
2811
|
+
|
2812
|
+
|
2813
|
+
Representation HPhi::RepresentationObservedByAllNonPhiUses() {
|
2814
|
+
int non_phi_use_count = 0;
|
2815
|
+
for (int i = Representation::kInteger32;
|
2816
|
+
i < Representation::kNumRepresentations; ++i) {
|
2817
|
+
non_phi_use_count += non_phi_uses_[i];
|
2818
|
+
}
|
2819
|
+
if (non_phi_use_count <= 1) return Representation::None();
|
2820
|
+
for (int i = 0; i < Representation::kNumRepresentations; ++i) {
|
2821
|
+
if (non_phi_uses_[i] == non_phi_use_count) {
|
2822
|
+
return Representation::FromKind(static_cast<Representation::Kind>(i));
|
2823
|
+
}
|
2824
|
+
}
|
2825
|
+
return Representation::None();
|
2826
|
+
}
|
2827
|
+
|
2828
|
+
|
2829
|
+
Representation HPhi::RepresentationFromInputs() {
|
2375
2830
|
bool double_occurred = false;
|
2376
2831
|
bool int32_occurred = false;
|
2377
2832
|
for (int i = 0; i < OperandCount(); ++i) {
|
@@ -2380,6 +2835,7 @@ Representation HPhi::InferredRepresentation() {
|
|
2380
2835
|
HPhi* hint_value = HUnknownOSRValue::cast(value)->incoming_value();
|
2381
2836
|
if (hint_value != NULL) {
|
2382
2837
|
Representation hint = hint_value->representation();
|
2838
|
+
if (hint.IsTagged()) return hint;
|
2383
2839
|
if (hint.IsDouble()) double_occurred = true;
|
2384
2840
|
if (hint.IsInteger32()) int32_occurred = true;
|
2385
2841
|
}
|
@@ -2398,7 +2854,9 @@ Representation HPhi::InferredRepresentation() {
|
|
2398
2854
|
return Representation::Tagged();
|
2399
2855
|
}
|
2400
2856
|
} else {
|
2401
|
-
|
2857
|
+
if (value->IsPhi() && !IsConvertibleToInteger()) {
|
2858
|
+
return Representation::Tagged();
|
2859
|
+
}
|
2402
2860
|
}
|
2403
2861
|
}
|
2404
2862
|
}
|
@@ -2411,6 +2869,37 @@ Representation HPhi::InferredRepresentation() {
|
|
2411
2869
|
}
|
2412
2870
|
|
2413
2871
|
|
2872
|
+
Representation HPhi::RepresentationFromUseRequirements() {
|
2873
|
+
Representation all_uses_require = Representation::None();
|
2874
|
+
bool all_uses_require_the_same = true;
|
2875
|
+
for (HUseIterator it(uses()); !it.Done(); it.Advance()) {
|
2876
|
+
// We check for observed_input_representation elsewhere.
|
2877
|
+
Representation use_rep =
|
2878
|
+
it.value()->RequiredInputRepresentation(it.index());
|
2879
|
+
// No useful info from this use -> look at the next one.
|
2880
|
+
if (use_rep.IsNone()) {
|
2881
|
+
continue;
|
2882
|
+
}
|
2883
|
+
if (use_rep.Equals(all_uses_require)) {
|
2884
|
+
continue;
|
2885
|
+
}
|
2886
|
+
// This use's representation contradicts what we've seen so far.
|
2887
|
+
if (!all_uses_require.IsNone()) {
|
2888
|
+
ASSERT(!use_rep.Equals(all_uses_require));
|
2889
|
+
all_uses_require_the_same = false;
|
2890
|
+
break;
|
2891
|
+
}
|
2892
|
+
// Otherwise, initialize observed representation.
|
2893
|
+
all_uses_require = use_rep;
|
2894
|
+
}
|
2895
|
+
if (all_uses_require_the_same) {
|
2896
|
+
return all_uses_require;
|
2897
|
+
}
|
2898
|
+
|
2899
|
+
return Representation::None();
|
2900
|
+
}
|
2901
|
+
|
2902
|
+
|
2414
2903
|
// Node-specific verification code is only included in debug mode.
|
2415
2904
|
#ifdef DEBUG
|
2416
2905
|
|
@@ -2449,12 +2938,6 @@ void HCheckFunction::Verify() {
|
|
2449
2938
|
ASSERT(HasNoUses());
|
2450
2939
|
}
|
2451
2940
|
|
2452
|
-
|
2453
|
-
void HCheckPrototypeMaps::Verify() {
|
2454
|
-
HInstruction::Verify();
|
2455
|
-
ASSERT(HasNoUses());
|
2456
|
-
}
|
2457
|
-
|
2458
2941
|
#endif
|
2459
2942
|
|
2460
2943
|
} } // namespace v8::internal
|