libv8 3.11.8.17 → 3.16.14.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -46,21 +46,25 @@ class SafepointGenerator;
|
|
46
46
|
class LCodeGen BASE_EMBEDDED {
|
47
47
|
public:
|
48
48
|
LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info)
|
49
|
-
:
|
49
|
+
: zone_(info->zone()),
|
50
|
+
chunk_(static_cast<LPlatformChunk*>(chunk)),
|
50
51
|
masm_(assembler),
|
51
52
|
info_(info),
|
52
53
|
current_block_(-1),
|
53
54
|
current_instruction_(-1),
|
54
55
|
instructions_(chunk->instructions()),
|
55
|
-
deoptimizations_(4),
|
56
|
-
jump_table_(4),
|
57
|
-
deoptimization_literals_(8),
|
56
|
+
deoptimizations_(4, info->zone()),
|
57
|
+
jump_table_(4, info->zone()),
|
58
|
+
deoptimization_literals_(8, info->zone()),
|
58
59
|
inlined_function_count_(0),
|
59
60
|
scope_(info->scope()),
|
60
61
|
status_(UNUSED),
|
61
|
-
|
62
|
+
translations_(info->zone()),
|
63
|
+
deferred_(8, info->zone()),
|
62
64
|
osr_pc_offset_(-1),
|
63
65
|
last_lazy_deopt_pc_(0),
|
66
|
+
frame_is_built_(false),
|
67
|
+
safepoints_(info->zone()),
|
64
68
|
resolver_(this),
|
65
69
|
expected_safepoint_kind_(Safepoint::kSimple) {
|
66
70
|
PopulateDeoptimizationLiteralsWithInlinedFunctions();
|
@@ -72,6 +76,16 @@ class LCodeGen BASE_EMBEDDED {
|
|
72
76
|
Isolate* isolate() const { return info_->isolate(); }
|
73
77
|
Factory* factory() const { return isolate()->factory(); }
|
74
78
|
Heap* heap() const { return isolate()->heap(); }
|
79
|
+
Zone* zone() const { return zone_; }
|
80
|
+
|
81
|
+
bool NeedsEagerFrame() const {
|
82
|
+
return GetStackSlotCount() > 0 ||
|
83
|
+
info()->is_non_deferred_calling() ||
|
84
|
+
!info()->IsStub();
|
85
|
+
}
|
86
|
+
bool NeedsDeferredFrame() const {
|
87
|
+
return !NeedsEagerFrame() && info()->is_deferred_calling();
|
88
|
+
}
|
75
89
|
|
76
90
|
// Support for converting LOperands to assembler types.
|
77
91
|
Register ToRegister(LOperand* op) const;
|
@@ -94,6 +108,7 @@ class LCodeGen BASE_EMBEDDED {
|
|
94
108
|
|
95
109
|
// Deferred code support.
|
96
110
|
void DoDeferredNumberTagD(LNumberTagD* instr);
|
111
|
+
void DoDeferredNumberTagU(LNumberTagU* instr);
|
97
112
|
void DoDeferredTaggedToI(LTaggedToI* instr);
|
98
113
|
void DoDeferredMathAbsTaggedHeapNumber(LUnaryMathOperation* instr);
|
99
114
|
void DoDeferredStackCheck(LStackCheck* instr);
|
@@ -101,18 +116,22 @@ class LCodeGen BASE_EMBEDDED {
|
|
101
116
|
void DoDeferredStringCharCodeAt(LStringCharCodeAt* instr);
|
102
117
|
void DoDeferredStringCharFromCode(LStringCharFromCode* instr);
|
103
118
|
void DoDeferredAllocateObject(LAllocateObject* instr);
|
119
|
+
void DoDeferredAllocate(LAllocate* instr);
|
104
120
|
void DoDeferredInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr,
|
105
121
|
Label* map_check);
|
106
122
|
|
107
123
|
void DoCheckMapCommon(Register reg, Handle<Map> map,
|
108
|
-
CompareMapMode mode,
|
124
|
+
CompareMapMode mode, LInstruction* instr);
|
109
125
|
|
110
126
|
// Parallel move support.
|
111
127
|
void DoParallelMove(LParallelMove* move);
|
112
128
|
void DoGap(LGap* instr);
|
113
129
|
|
114
130
|
// Emit frame translation commands for an environment.
|
115
|
-
void WriteTranslation(LEnvironment* environment,
|
131
|
+
void WriteTranslation(LEnvironment* environment,
|
132
|
+
Translation* translation,
|
133
|
+
int* arguments_index,
|
134
|
+
int* arguments_count);
|
116
135
|
|
117
136
|
// Declare methods that deal with the individual node types.
|
118
137
|
#define DECLARE_DO(type) void Do##type(L##type* node);
|
@@ -136,7 +155,7 @@ class LCodeGen BASE_EMBEDDED {
|
|
136
155
|
return info()->is_classic_mode() ? kNonStrictMode : kStrictMode;
|
137
156
|
}
|
138
157
|
|
139
|
-
|
158
|
+
LPlatformChunk* chunk() const { return chunk_; }
|
140
159
|
Scope* scope() const { return scope_; }
|
141
160
|
HGraph* graph() const { return chunk_->graph(); }
|
142
161
|
|
@@ -150,12 +169,12 @@ class LCodeGen BASE_EMBEDDED {
|
|
150
169
|
Register scratch);
|
151
170
|
|
152
171
|
int GetStackSlotCount() const { return chunk()->spill_slot_count(); }
|
153
|
-
int GetParameterCount() const { return
|
172
|
+
int GetParameterCount() const { return info()->num_parameters(); }
|
154
173
|
|
155
|
-
void Abort(const char*
|
174
|
+
void Abort(const char* reason);
|
156
175
|
void Comment(const char* format, ...);
|
157
176
|
|
158
|
-
void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code); }
|
177
|
+
void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); }
|
159
178
|
|
160
179
|
// Code generation passes. Returns true if code generation should
|
161
180
|
// continue.
|
@@ -219,7 +238,10 @@ class LCodeGen BASE_EMBEDDED {
|
|
219
238
|
|
220
239
|
void AddToTranslation(Translation* translation,
|
221
240
|
LOperand* op,
|
222
|
-
bool is_tagged
|
241
|
+
bool is_tagged,
|
242
|
+
bool is_uint32,
|
243
|
+
int arguments_index,
|
244
|
+
int arguments_count);
|
223
245
|
void PopulateDeoptimizationData(Handle<Code> code);
|
224
246
|
int DefineDeoptimizationLiteral(Handle<Object> literal);
|
225
247
|
|
@@ -261,11 +283,18 @@ class LCodeGen BASE_EMBEDDED {
|
|
261
283
|
static Condition TokenToCondition(Token::Value op, bool is_unsigned);
|
262
284
|
void EmitGoto(int block);
|
263
285
|
void EmitBranch(int left_block, int right_block, Condition cc);
|
264
|
-
void EmitNumberUntagD(
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
286
|
+
void EmitNumberUntagD(
|
287
|
+
Register input,
|
288
|
+
XMMRegister result,
|
289
|
+
bool deoptimize_on_undefined,
|
290
|
+
bool deoptimize_on_minus_zero,
|
291
|
+
LEnvironment* env,
|
292
|
+
NumberUntagDMode mode = NUMBER_CANDIDATE_IS_ANY_TAGGED);
|
293
|
+
|
294
|
+
|
295
|
+
void DeoptIfTaggedButNotSmi(LEnvironment* environment,
|
296
|
+
HValue* value,
|
297
|
+
LOperand* operand);
|
269
298
|
|
270
299
|
// Emits optimized code for typeof x == "y". Modifies input register.
|
271
300
|
// Returns the condition on which a final split to
|
@@ -296,7 +325,8 @@ class LCodeGen BASE_EMBEDDED {
|
|
296
325
|
void EmitLoadFieldOrConstantFunction(Register result,
|
297
326
|
Register object,
|
298
327
|
Handle<Map> type,
|
299
|
-
Handle<String> name
|
328
|
+
Handle<String> name,
|
329
|
+
LEnvironment* env);
|
300
330
|
|
301
331
|
// Emits code for pushing either a tagged constant, a (non-double)
|
302
332
|
// register, or a stack slot operand.
|
@@ -307,19 +337,31 @@ class LCodeGen BASE_EMBEDDED {
|
|
307
337
|
void EmitDeepCopy(Handle<JSObject> object,
|
308
338
|
Register result,
|
309
339
|
Register source,
|
310
|
-
int* offset
|
340
|
+
int* offset,
|
341
|
+
AllocationSiteMode mode);
|
311
342
|
|
312
343
|
struct JumpTableEntry {
|
313
|
-
|
344
|
+
inline JumpTableEntry(Address entry, bool frame, bool is_lazy)
|
314
345
|
: label(),
|
315
|
-
address(entry)
|
346
|
+
address(entry),
|
347
|
+
needs_frame(frame),
|
348
|
+
is_lazy_deopt(is_lazy) { }
|
316
349
|
Label label;
|
317
350
|
Address address;
|
351
|
+
bool needs_frame;
|
352
|
+
bool is_lazy_deopt;
|
318
353
|
};
|
319
354
|
|
320
355
|
void EnsureSpaceForLazyDeopt(int space_needed);
|
321
|
-
|
322
|
-
|
356
|
+
void DoLoadKeyedExternalArray(LLoadKeyed* instr);
|
357
|
+
void DoLoadKeyedFixedDoubleArray(LLoadKeyed* instr);
|
358
|
+
void DoLoadKeyedFixedArray(LLoadKeyed* instr);
|
359
|
+
void DoStoreKeyedExternalArray(LStoreKeyed* instr);
|
360
|
+
void DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr);
|
361
|
+
void DoStoreKeyedFixedArray(LStoreKeyed* instr);
|
362
|
+
|
363
|
+
Zone* zone_;
|
364
|
+
LPlatformChunk* const chunk_;
|
323
365
|
MacroAssembler* const masm_;
|
324
366
|
CompilationInfo* const info_;
|
325
367
|
|
@@ -336,6 +378,7 @@ class LCodeGen BASE_EMBEDDED {
|
|
336
378
|
ZoneList<LDeferredCode*> deferred_;
|
337
379
|
int osr_pc_offset_;
|
338
380
|
int last_lazy_deopt_pc_;
|
381
|
+
bool frame_is_built_;
|
339
382
|
|
340
383
|
// Builder that keeps track of safepoints in the code. The table
|
341
384
|
// itself is emitted at the end of the generated code.
|
@@ -350,6 +393,7 @@ class LCodeGen BASE_EMBEDDED {
|
|
350
393
|
public:
|
351
394
|
explicit PushSafepointRegistersScope(LCodeGen* codegen)
|
352
395
|
: codegen_(codegen) {
|
396
|
+
ASSERT(codegen_->info()->is_calling());
|
353
397
|
ASSERT(codegen_->expected_safepoint_kind_ == Safepoint::kSimple);
|
354
398
|
codegen_->masm_->PushSafepointRegisters();
|
355
399
|
codegen_->expected_safepoint_kind_ = Safepoint::kWithRegisters;
|
@@ -36,7 +36,7 @@ namespace v8 {
|
|
36
36
|
namespace internal {
|
37
37
|
|
38
38
|
LGapResolver::LGapResolver(LCodeGen* owner)
|
39
|
-
: cgen_(owner), moves_(32) {}
|
39
|
+
: cgen_(owner), moves_(32, owner->zone()) {}
|
40
40
|
|
41
41
|
|
42
42
|
void LGapResolver::Resolve(LParallelMove* parallel_move) {
|
@@ -74,7 +74,7 @@ void LGapResolver::BuildInitialMoveList(LParallelMove* parallel_move) {
|
|
74
74
|
const ZoneList<LMoveOperands>* moves = parallel_move->move_operands();
|
75
75
|
for (int i = 0; i < moves->length(); ++i) {
|
76
76
|
LMoveOperands move = moves->at(i);
|
77
|
-
if (!move.IsRedundant()) moves_.Add(move);
|
77
|
+
if (!move.IsRedundant()) moves_.Add(move, cgen_->zone());
|
78
78
|
}
|
79
79
|
Verify();
|
80
80
|
}
|
@@ -44,10 +44,10 @@ LITHIUM_CONCRETE_INSTRUCTION_LIST(DEFINE_COMPILE)
|
|
44
44
|
#undef DEFINE_COMPILE
|
45
45
|
|
46
46
|
LOsrEntry::LOsrEntry() {
|
47
|
-
for (int i = 0; i < Register::
|
47
|
+
for (int i = 0; i < Register::NumAllocatableRegisters(); ++i) {
|
48
48
|
register_spills_[i] = NULL;
|
49
49
|
}
|
50
|
-
for (int i = 0; i < DoubleRegister::
|
50
|
+
for (int i = 0; i < DoubleRegister::NumAllocatableRegisters(); ++i) {
|
51
51
|
double_register_spills_[i] = NULL;
|
52
52
|
}
|
53
53
|
}
|
@@ -114,7 +114,11 @@ void LInstruction::PrintDataTo(StringStream* stream) {
|
|
114
114
|
stream->Add("= ");
|
115
115
|
for (int i = 0; i < InputCount(); i++) {
|
116
116
|
if (i > 0) stream->Add(" ");
|
117
|
-
InputAt(i)
|
117
|
+
if (InputAt(i) == NULL) {
|
118
|
+
stream->Add("NULL");
|
119
|
+
} else {
|
120
|
+
InputAt(i)->PrintTo(stream);
|
121
|
+
}
|
118
122
|
}
|
119
123
|
}
|
120
124
|
|
@@ -179,6 +183,7 @@ const char* LArithmeticT::Mnemonic() const {
|
|
179
183
|
case Token::BIT_AND: return "bit-and-t";
|
180
184
|
case Token::BIT_OR: return "bit-or-t";
|
181
185
|
case Token::BIT_XOR: return "bit-xor-t";
|
186
|
+
case Token::ROR: return "ror-t";
|
182
187
|
case Token::SHL: return "sal-t";
|
183
188
|
case Token::SAR: return "sar-t";
|
184
189
|
case Token::SHR: return "shr-t";
|
@@ -196,22 +201,22 @@ void LGoto::PrintDataTo(StringStream* stream) {
|
|
196
201
|
|
197
202
|
void LBranch::PrintDataTo(StringStream* stream) {
|
198
203
|
stream->Add("B%d | B%d on ", true_block_id(), false_block_id());
|
199
|
-
|
204
|
+
value()->PrintTo(stream);
|
200
205
|
}
|
201
206
|
|
202
207
|
|
203
208
|
void LCmpIDAndBranch::PrintDataTo(StringStream* stream) {
|
204
209
|
stream->Add("if ");
|
205
|
-
|
210
|
+
left()->PrintTo(stream);
|
206
211
|
stream->Add(" %s ", Token::String(op()));
|
207
|
-
|
212
|
+
right()->PrintTo(stream);
|
208
213
|
stream->Add(" then B%d else B%d", true_block_id(), false_block_id());
|
209
214
|
}
|
210
215
|
|
211
216
|
|
212
217
|
void LIsNilAndBranch::PrintDataTo(StringStream* stream) {
|
213
218
|
stream->Add("if ");
|
214
|
-
|
219
|
+
value()->PrintTo(stream);
|
215
220
|
stream->Add(kind() == kStrictEquality ? " === " : " == ");
|
216
221
|
stream->Add(nil() == kNullValue ? "null" : "undefined");
|
217
222
|
stream->Add(" then B%d else B%d", true_block_id(), false_block_id());
|
@@ -220,57 +225,57 @@ void LIsNilAndBranch::PrintDataTo(StringStream* stream) {
|
|
220
225
|
|
221
226
|
void LIsObjectAndBranch::PrintDataTo(StringStream* stream) {
|
222
227
|
stream->Add("if is_object(");
|
223
|
-
|
228
|
+
value()->PrintTo(stream);
|
224
229
|
stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
|
225
230
|
}
|
226
231
|
|
227
232
|
|
228
233
|
void LIsStringAndBranch::PrintDataTo(StringStream* stream) {
|
229
234
|
stream->Add("if is_string(");
|
230
|
-
|
235
|
+
value()->PrintTo(stream);
|
231
236
|
stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
|
232
237
|
}
|
233
238
|
|
234
239
|
|
235
240
|
void LIsSmiAndBranch::PrintDataTo(StringStream* stream) {
|
236
241
|
stream->Add("if is_smi(");
|
237
|
-
|
242
|
+
value()->PrintTo(stream);
|
238
243
|
stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
|
239
244
|
}
|
240
245
|
|
241
246
|
|
242
247
|
void LIsUndetectableAndBranch::PrintDataTo(StringStream* stream) {
|
243
248
|
stream->Add("if is_undetectable(");
|
244
|
-
|
249
|
+
value()->PrintTo(stream);
|
245
250
|
stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
|
246
251
|
}
|
247
252
|
|
248
253
|
|
249
254
|
void LStringCompareAndBranch::PrintDataTo(StringStream* stream) {
|
250
255
|
stream->Add("if string_compare(");
|
251
|
-
|
252
|
-
|
256
|
+
left()->PrintTo(stream);
|
257
|
+
right()->PrintTo(stream);
|
253
258
|
stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
|
254
259
|
}
|
255
260
|
|
256
261
|
|
257
262
|
void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) {
|
258
263
|
stream->Add("if has_instance_type(");
|
259
|
-
|
264
|
+
value()->PrintTo(stream);
|
260
265
|
stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
|
261
266
|
}
|
262
267
|
|
263
268
|
|
264
269
|
void LHasCachedArrayIndexAndBranch::PrintDataTo(StringStream* stream) {
|
265
270
|
stream->Add("if has_cached_array_index(");
|
266
|
-
|
271
|
+
value()->PrintTo(stream);
|
267
272
|
stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
|
268
273
|
}
|
269
274
|
|
270
275
|
|
271
276
|
void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) {
|
272
277
|
stream->Add("if class_of_test(");
|
273
|
-
|
278
|
+
value()->PrintTo(stream);
|
274
279
|
stream->Add(", \"%o\") then B%d else B%d",
|
275
280
|
*hydrogen()->class_name(),
|
276
281
|
true_block_id(),
|
@@ -280,7 +285,7 @@ void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) {
|
|
280
285
|
|
281
286
|
void LTypeofIsAndBranch::PrintDataTo(StringStream* stream) {
|
282
287
|
stream->Add("if typeof ");
|
283
|
-
|
288
|
+
value()->PrintTo(stream);
|
284
289
|
stream->Add(" == \"%s\" then B%d else B%d",
|
285
290
|
*hydrogen()->type_literal()->ToCString(),
|
286
291
|
true_block_id(), false_block_id());
|
@@ -294,26 +299,31 @@ void LCallConstantFunction::PrintDataTo(StringStream* stream) {
|
|
294
299
|
|
295
300
|
void LUnaryMathOperation::PrintDataTo(StringStream* stream) {
|
296
301
|
stream->Add("/%s ", hydrogen()->OpName());
|
297
|
-
|
302
|
+
value()->PrintTo(stream);
|
303
|
+
}
|
304
|
+
|
305
|
+
|
306
|
+
void LMathExp::PrintDataTo(StringStream* stream) {
|
307
|
+
value()->PrintTo(stream);
|
298
308
|
}
|
299
309
|
|
300
310
|
|
301
311
|
void LLoadContextSlot::PrintDataTo(StringStream* stream) {
|
302
|
-
|
312
|
+
context()->PrintTo(stream);
|
303
313
|
stream->Add("[%d]", slot_index());
|
304
314
|
}
|
305
315
|
|
306
316
|
|
307
317
|
void LStoreContextSlot::PrintDataTo(StringStream* stream) {
|
308
|
-
|
318
|
+
context()->PrintTo(stream);
|
309
319
|
stream->Add("[%d] <- ", slot_index());
|
310
|
-
|
320
|
+
value()->PrintTo(stream);
|
311
321
|
}
|
312
322
|
|
313
323
|
|
314
324
|
void LInvokeFunction::PrintDataTo(StringStream* stream) {
|
315
325
|
stream->Add("= ");
|
316
|
-
|
326
|
+
function()->PrintTo(stream);
|
317
327
|
stream->Add(" #%d / ", arity());
|
318
328
|
}
|
319
329
|
|
@@ -342,7 +352,7 @@ void LCallKnownGlobal::PrintDataTo(StringStream* stream) {
|
|
342
352
|
|
343
353
|
void LCallNew::PrintDataTo(StringStream* stream) {
|
344
354
|
stream->Add("= ");
|
345
|
-
|
355
|
+
constructor()->PrintTo(stream);
|
346
356
|
stream->Add(" #%d / ", arity());
|
347
357
|
}
|
348
358
|
|
@@ -358,56 +368,20 @@ void LAccessArgumentsAt::PrintDataTo(StringStream* stream) {
|
|
358
368
|
}
|
359
369
|
|
360
370
|
|
361
|
-
int
|
371
|
+
int LPlatformChunk::GetNextSpillIndex(bool is_double) {
|
362
372
|
return spill_slot_count_++;
|
363
373
|
}
|
364
374
|
|
365
375
|
|
366
|
-
LOperand*
|
376
|
+
LOperand* LPlatformChunk::GetNextSpillSlot(bool is_double) {
|
367
377
|
// All stack slots are Double stack slots on x64.
|
368
378
|
// Alternatively, at some point, start using half-size
|
369
379
|
// stack slots for int32 values.
|
370
380
|
int index = GetNextSpillIndex(is_double);
|
371
381
|
if (is_double) {
|
372
|
-
return LDoubleStackSlot::Create(index);
|
382
|
+
return LDoubleStackSlot::Create(index, zone());
|
373
383
|
} else {
|
374
|
-
return LStackSlot::Create(index);
|
375
|
-
}
|
376
|
-
}
|
377
|
-
|
378
|
-
|
379
|
-
void LChunk::MarkEmptyBlocks() {
|
380
|
-
HPhase phase("L_Mark empty blocks", this);
|
381
|
-
for (int i = 0; i < graph()->blocks()->length(); ++i) {
|
382
|
-
HBasicBlock* block = graph()->blocks()->at(i);
|
383
|
-
int first = block->first_instruction_index();
|
384
|
-
int last = block->last_instruction_index();
|
385
|
-
LInstruction* first_instr = instructions()->at(first);
|
386
|
-
LInstruction* last_instr = instructions()->at(last);
|
387
|
-
|
388
|
-
LLabel* label = LLabel::cast(first_instr);
|
389
|
-
if (last_instr->IsGoto()) {
|
390
|
-
LGoto* goto_instr = LGoto::cast(last_instr);
|
391
|
-
if (label->IsRedundant() &&
|
392
|
-
!label->is_loop_header()) {
|
393
|
-
bool can_eliminate = true;
|
394
|
-
for (int i = first + 1; i < last && can_eliminate; ++i) {
|
395
|
-
LInstruction* cur = instructions()->at(i);
|
396
|
-
if (cur->IsGap()) {
|
397
|
-
LGap* gap = LGap::cast(cur);
|
398
|
-
if (!gap->IsRedundant()) {
|
399
|
-
can_eliminate = false;
|
400
|
-
}
|
401
|
-
} else {
|
402
|
-
can_eliminate = false;
|
403
|
-
}
|
404
|
-
}
|
405
|
-
|
406
|
-
if (can_eliminate) {
|
407
|
-
label->set_replacement(GetLabel(goto_instr->block_id()));
|
408
|
-
}
|
409
|
-
}
|
410
|
-
}
|
384
|
+
return LStackSlot::Create(index, zone());
|
411
385
|
}
|
412
386
|
}
|
413
387
|
|
@@ -430,20 +404,27 @@ void LStoreNamedGeneric::PrintDataTo(StringStream* stream) {
|
|
430
404
|
}
|
431
405
|
|
432
406
|
|
433
|
-
void
|
434
|
-
|
407
|
+
void LLoadKeyed::PrintDataTo(StringStream* stream) {
|
408
|
+
elements()->PrintTo(stream);
|
435
409
|
stream->Add("[");
|
436
410
|
key()->PrintTo(stream);
|
437
|
-
|
438
|
-
|
411
|
+
if (hydrogen()->IsDehoisted()) {
|
412
|
+
stream->Add(" + %d]", additional_index());
|
413
|
+
} else {
|
414
|
+
stream->Add("]");
|
415
|
+
}
|
439
416
|
}
|
440
417
|
|
441
418
|
|
442
|
-
void
|
419
|
+
void LStoreKeyed::PrintDataTo(StringStream* stream) {
|
443
420
|
elements()->PrintTo(stream);
|
444
421
|
stream->Add("[");
|
445
422
|
key()->PrintTo(stream);
|
446
|
-
|
423
|
+
if (hydrogen()->IsDehoisted()) {
|
424
|
+
stream->Add(" + %d] <-", additional_index());
|
425
|
+
} else {
|
426
|
+
stream->Add("] <- ");
|
427
|
+
}
|
447
428
|
value()->PrintTo(stream);
|
448
429
|
}
|
449
430
|
|
@@ -463,83 +444,9 @@ void LTransitionElementsKind::PrintDataTo(StringStream* stream) {
|
|
463
444
|
}
|
464
445
|
|
465
446
|
|
466
|
-
|
467
|
-
LInstructionGap* gap = new(graph_->zone()) LInstructionGap(block);
|
468
|
-
int index = -1;
|
469
|
-
if (instr->IsControl()) {
|
470
|
-
instructions_.Add(gap);
|
471
|
-
index = instructions_.length();
|
472
|
-
instructions_.Add(instr);
|
473
|
-
} else {
|
474
|
-
index = instructions_.length();
|
475
|
-
instructions_.Add(instr);
|
476
|
-
instructions_.Add(gap);
|
477
|
-
}
|
478
|
-
if (instr->HasPointerMap()) {
|
479
|
-
pointer_maps_.Add(instr->pointer_map());
|
480
|
-
instr->pointer_map()->set_lithium_position(index);
|
481
|
-
}
|
482
|
-
}
|
483
|
-
|
484
|
-
|
485
|
-
LConstantOperand* LChunk::DefineConstantOperand(HConstant* constant) {
|
486
|
-
return LConstantOperand::Create(constant->id());
|
487
|
-
}
|
488
|
-
|
489
|
-
|
490
|
-
int LChunk::GetParameterStackSlot(int index) const {
|
491
|
-
// The receiver is at index 0, the first parameter at index 1, so we
|
492
|
-
// shift all parameter indexes down by the number of parameters, and
|
493
|
-
// make sure they end up negative so they are distinguishable from
|
494
|
-
// spill slots.
|
495
|
-
int result = index - info()->scope()->num_parameters() - 1;
|
496
|
-
ASSERT(result < 0);
|
497
|
-
return result;
|
498
|
-
}
|
499
|
-
|
500
|
-
// A parameter relative to ebp in the arguments stub.
|
501
|
-
int LChunk::ParameterAt(int index) {
|
502
|
-
ASSERT(-1 <= index); // -1 is the receiver.
|
503
|
-
return (1 + info()->scope()->num_parameters() - index) *
|
504
|
-
kPointerSize;
|
505
|
-
}
|
506
|
-
|
507
|
-
|
508
|
-
LGap* LChunk::GetGapAt(int index) const {
|
509
|
-
return LGap::cast(instructions_[index]);
|
510
|
-
}
|
511
|
-
|
512
|
-
|
513
|
-
bool LChunk::IsGapAt(int index) const {
|
514
|
-
return instructions_[index]->IsGap();
|
515
|
-
}
|
516
|
-
|
517
|
-
|
518
|
-
int LChunk::NearestGapPos(int index) const {
|
519
|
-
while (!IsGapAt(index)) index--;
|
520
|
-
return index;
|
521
|
-
}
|
522
|
-
|
523
|
-
|
524
|
-
void LChunk::AddGapMove(int index, LOperand* from, LOperand* to) {
|
525
|
-
GetGapAt(index)->GetOrCreateParallelMove(LGap::START)->AddMove(from, to);
|
526
|
-
}
|
527
|
-
|
528
|
-
|
529
|
-
Handle<Object> LChunk::LookupLiteral(LConstantOperand* operand) const {
|
530
|
-
return HConstant::cast(graph_->LookupValue(operand->index()))->handle();
|
531
|
-
}
|
532
|
-
|
533
|
-
|
534
|
-
Representation LChunk::LookupLiteralRepresentation(
|
535
|
-
LConstantOperand* operand) const {
|
536
|
-
return graph_->LookupValue(operand->index())->representation();
|
537
|
-
}
|
538
|
-
|
539
|
-
|
540
|
-
LChunk* LChunkBuilder::Build() {
|
447
|
+
LPlatformChunk* LChunkBuilder::Build() {
|
541
448
|
ASSERT(is_unused());
|
542
|
-
chunk_ = new(zone())
|
449
|
+
chunk_ = new(zone()) LPlatformChunk(info(), graph());
|
543
450
|
HPhase phase("L_Building chunk", chunk_);
|
544
451
|
status_ = BUILDING;
|
545
452
|
const ZoneList<HBasicBlock*>* blocks = graph()->blocks();
|
@@ -554,17 +461,8 @@ LChunk* LChunkBuilder::Build() {
|
|
554
461
|
}
|
555
462
|
|
556
463
|
|
557
|
-
void
|
558
|
-
|
559
|
-
SmartArrayPointer<char> name(
|
560
|
-
info()->shared_info()->DebugName()->ToCString());
|
561
|
-
PrintF("Aborting LChunk building in @\"%s\": ", *name);
|
562
|
-
va_list arguments;
|
563
|
-
va_start(arguments, format);
|
564
|
-
OS::VPrint(format, arguments);
|
565
|
-
va_end(arguments);
|
566
|
-
PrintF("\n");
|
567
|
-
}
|
464
|
+
void LCodeGen::Abort(const char* reason) {
|
465
|
+
info()->set_bailout_reason(reason);
|
568
466
|
status_ = ABORTED;
|
569
467
|
}
|
570
468
|
|
@@ -725,6 +623,8 @@ LInstruction* LChunkBuilder::AssignEnvironment(LInstruction* instr) {
|
|
725
623
|
LInstruction* LChunkBuilder::MarkAsCall(LInstruction* instr,
|
726
624
|
HInstruction* hinstr,
|
727
625
|
CanDeoptimize can_deoptimize) {
|
626
|
+
info()->MarkAsNonDeferredCalling();
|
627
|
+
|
728
628
|
#ifdef DEBUG
|
729
629
|
instr->VerifyCall();
|
730
630
|
#endif
|
@@ -735,7 +635,7 @@ LInstruction* LChunkBuilder::MarkAsCall(LInstruction* instr,
|
|
735
635
|
ASSERT(hinstr->next()->IsSimulate());
|
736
636
|
HSimulate* sim = HSimulate::cast(hinstr->next());
|
737
637
|
ASSERT(instruction_pending_deoptimization_environment_ == NULL);
|
738
|
-
ASSERT(pending_deoptimization_ast_id_
|
638
|
+
ASSERT(pending_deoptimization_ast_id_.IsNone());
|
739
639
|
instruction_pending_deoptimization_environment_ = instr;
|
740
640
|
pending_deoptimization_ast_id_ = sim->ast_id();
|
741
641
|
}
|
@@ -757,7 +657,7 @@ LInstruction* LChunkBuilder::MarkAsCall(LInstruction* instr,
|
|
757
657
|
|
758
658
|
LInstruction* LChunkBuilder::AssignPointerMap(LInstruction* instr) {
|
759
659
|
ASSERT(!instr->HasPointerMap());
|
760
|
-
instr->set_pointer_map(new(zone()) LPointerMap(position_));
|
660
|
+
instr->set_pointer_map(new(zone()) LPointerMap(position_, zone()));
|
761
661
|
return instr;
|
762
662
|
}
|
763
663
|
|
@@ -790,6 +690,11 @@ LInstruction* LChunkBuilder::DoBlockEntry(HBlockEntry* instr) {
|
|
790
690
|
}
|
791
691
|
|
792
692
|
|
693
|
+
LInstruction* LChunkBuilder::DoDummyUse(HDummyUse* instr) {
|
694
|
+
return DefineAsRegister(new(zone()) LDummyUse(UseAny(instr->value())));
|
695
|
+
}
|
696
|
+
|
697
|
+
|
793
698
|
LInstruction* LChunkBuilder::DoSoftDeoptimize(HSoftDeoptimize* instr) {
|
794
699
|
return AssignEnvironment(new(zone()) LDeoptimize);
|
795
700
|
}
|
@@ -830,13 +735,16 @@ LInstruction* LChunkBuilder::DoShift(Token::Value op,
|
|
830
735
|
|
831
736
|
// Shift operations can only deoptimize if we do a logical shift by 0 and
|
832
737
|
// the result cannot be truncated to int32.
|
833
|
-
bool may_deopt = (op == Token::SHR && constant_value == 0);
|
834
738
|
bool does_deopt = false;
|
835
|
-
if (
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
739
|
+
if (op == Token::SHR && constant_value == 0) {
|
740
|
+
if (FLAG_opt_safe_uint32_operations) {
|
741
|
+
does_deopt = !instr->CheckFlag(HInstruction::kUint32);
|
742
|
+
} else {
|
743
|
+
for (HUseIterator it(instr->uses()); !it.Done(); it.Advance()) {
|
744
|
+
if (!it.value()->CheckFlag(HValue::kTruncatingToInt32)) {
|
745
|
+
does_deopt = true;
|
746
|
+
break;
|
747
|
+
}
|
840
748
|
}
|
841
749
|
}
|
842
750
|
}
|
@@ -969,8 +877,8 @@ LEnvironment* LChunkBuilder::CreateEnvironment(
|
|
969
877
|
|
970
878
|
LEnvironment* outer =
|
971
879
|
CreateEnvironment(hydrogen_env->outer(), argument_index_accumulator);
|
972
|
-
|
973
|
-
ASSERT(ast_id
|
880
|
+
BailoutId ast_id = hydrogen_env->ast_id();
|
881
|
+
ASSERT(!ast_id.IsNone() ||
|
974
882
|
hydrogen_env->frame_type() != JS_FUNCTION);
|
975
883
|
int value_count = hydrogen_env->length();
|
976
884
|
LEnvironment* result = new(zone()) LEnvironment(
|
@@ -980,7 +888,9 @@ LEnvironment* LChunkBuilder::CreateEnvironment(
|
|
980
888
|
hydrogen_env->parameter_count(),
|
981
889
|
argument_count_,
|
982
890
|
value_count,
|
983
|
-
outer
|
891
|
+
outer,
|
892
|
+
hydrogen_env->entry(),
|
893
|
+
zone());
|
984
894
|
int argument_index = *argument_index_accumulator;
|
985
895
|
for (int i = 0; i < value_count; ++i) {
|
986
896
|
if (hydrogen_env->is_special_index(i)) continue;
|
@@ -994,7 +904,9 @@ LEnvironment* LChunkBuilder::CreateEnvironment(
|
|
994
904
|
} else {
|
995
905
|
op = UseAny(value);
|
996
906
|
}
|
997
|
-
result->AddValue(op,
|
907
|
+
result->AddValue(op,
|
908
|
+
value->representation(),
|
909
|
+
value->CheckFlag(HInstruction::kUint32));
|
998
910
|
}
|
999
911
|
|
1000
912
|
if (hydrogen_env->frame_type() == JS_FUNCTION) {
|
@@ -1103,7 +1015,14 @@ LInstruction* LChunkBuilder::DoThisFunction(HThisFunction* instr) {
|
|
1103
1015
|
|
1104
1016
|
|
1105
1017
|
LInstruction* LChunkBuilder::DoContext(HContext* instr) {
|
1106
|
-
return
|
1018
|
+
// If there is a non-return use, the context must be allocated in a register.
|
1019
|
+
for (HUseIterator it(instr->uses()); !it.Done(); it.Advance()) {
|
1020
|
+
if (!it.value()->IsReturn()) {
|
1021
|
+
return DefineAsRegister(new(zone()) LContext);
|
1022
|
+
}
|
1023
|
+
}
|
1024
|
+
|
1025
|
+
return NULL;
|
1107
1026
|
}
|
1108
1027
|
|
1109
1028
|
|
@@ -1150,6 +1069,14 @@ LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) {
|
|
1150
1069
|
LOperand* input = UseFixedDouble(instr->value(), xmm1);
|
1151
1070
|
LUnaryMathOperation* result = new(zone()) LUnaryMathOperation(input);
|
1152
1071
|
return MarkAsCall(DefineFixedDouble(result, xmm1), instr);
|
1072
|
+
} else if (op == kMathExp) {
|
1073
|
+
ASSERT(instr->representation().IsDouble());
|
1074
|
+
ASSERT(instr->value()->representation().IsDouble());
|
1075
|
+
LOperand* value = UseTempRegister(instr->value());
|
1076
|
+
LOperand* temp1 = TempRegister();
|
1077
|
+
LOperand* temp2 = TempRegister();
|
1078
|
+
LMathExp* result = new(zone()) LMathExp(value, temp1, temp2);
|
1079
|
+
return DefineAsRegister(result);
|
1153
1080
|
} else {
|
1154
1081
|
LOperand* input = UseRegisterAtStart(instr->value());
|
1155
1082
|
LUnaryMathOperation* result = new(zone()) LUnaryMathOperation(input);
|
@@ -1221,6 +1148,11 @@ LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) {
|
|
1221
1148
|
}
|
1222
1149
|
|
1223
1150
|
|
1151
|
+
LInstruction* LChunkBuilder::DoRor(HRor* instr) {
|
1152
|
+
return DoShift(Token::ROR, instr);
|
1153
|
+
}
|
1154
|
+
|
1155
|
+
|
1224
1156
|
LInstruction* LChunkBuilder::DoShr(HShr* instr) {
|
1225
1157
|
return DoShift(Token::SHR, instr);
|
1226
1158
|
}
|
@@ -1271,6 +1203,13 @@ LInstruction* LChunkBuilder::DoDiv(HDiv* instr) {
|
|
1271
1203
|
if (instr->representation().IsDouble()) {
|
1272
1204
|
return DoArithmeticD(Token::DIV, instr);
|
1273
1205
|
} else if (instr->representation().IsInteger32()) {
|
1206
|
+
if (instr->HasPowerOf2Divisor()) {
|
1207
|
+
ASSERT(!instr->CheckFlag(HValue::kCanBeDivByZero));
|
1208
|
+
LOperand* value = UseRegisterAtStart(instr->left());
|
1209
|
+
LDivI* div =
|
1210
|
+
new(zone()) LDivI(value, UseOrConstant(instr->right()), NULL);
|
1211
|
+
return AssignEnvironment(DefineSameAsFirst(div));
|
1212
|
+
}
|
1274
1213
|
// The temporary operand is necessary to ensure that right is not allocated
|
1275
1214
|
// into rdx.
|
1276
1215
|
LOperand* temp = FixedTemp(rdx);
|
@@ -1285,12 +1224,74 @@ LInstruction* LChunkBuilder::DoDiv(HDiv* instr) {
|
|
1285
1224
|
}
|
1286
1225
|
|
1287
1226
|
|
1288
|
-
|
1289
|
-
|
1227
|
+
HValue* LChunkBuilder::SimplifiedDividendForMathFloorOfDiv(HValue* dividend) {
|
1228
|
+
// A value with an integer representation does not need to be transformed.
|
1229
|
+
if (dividend->representation().IsInteger32()) {
|
1230
|
+
return dividend;
|
1231
|
+
// A change from an integer32 can be replaced by the integer32 value.
|
1232
|
+
} else if (dividend->IsChange() &&
|
1233
|
+
HChange::cast(dividend)->from().IsInteger32()) {
|
1234
|
+
return HChange::cast(dividend)->value();
|
1235
|
+
}
|
1236
|
+
return NULL;
|
1237
|
+
}
|
1238
|
+
|
1239
|
+
|
1240
|
+
HValue* LChunkBuilder::SimplifiedDivisorForMathFloorOfDiv(HValue* divisor) {
|
1241
|
+
if (divisor->IsConstant() &&
|
1242
|
+
HConstant::cast(divisor)->HasInteger32Value()) {
|
1243
|
+
HConstant* constant_val = HConstant::cast(divisor);
|
1244
|
+
return constant_val->CopyToRepresentation(Representation::Integer32(),
|
1245
|
+
divisor->block()->zone());
|
1246
|
+
}
|
1247
|
+
// A value with an integer representation does not need to be transformed.
|
1248
|
+
if (divisor->representation().IsInteger32()) {
|
1249
|
+
return divisor;
|
1250
|
+
// A change from an integer32 can be replaced by the integer32 value.
|
1251
|
+
} else if (divisor->IsChange() &&
|
1252
|
+
HChange::cast(divisor)->from().IsInteger32()) {
|
1253
|
+
return HChange::cast(divisor)->value();
|
1254
|
+
}
|
1290
1255
|
return NULL;
|
1291
1256
|
}
|
1292
1257
|
|
1293
1258
|
|
1259
|
+
LInstruction* LChunkBuilder::DoMathFloorOfDiv(HMathFloorOfDiv* instr) {
|
1260
|
+
HValue* right = instr->right();
|
1261
|
+
if (!right->IsConstant()) {
|
1262
|
+
ASSERT(right->representation().IsInteger32());
|
1263
|
+
// The temporary operand is necessary to ensure that right is not allocated
|
1264
|
+
// into rdx.
|
1265
|
+
LOperand* temp = FixedTemp(rdx);
|
1266
|
+
LOperand* dividend = UseFixed(instr->left(), rax);
|
1267
|
+
LOperand* divisor = UseRegister(instr->right());
|
1268
|
+
LDivI* flooring_div = new(zone()) LDivI(dividend, divisor, temp);
|
1269
|
+
return AssignEnvironment(DefineFixed(flooring_div, rax));
|
1270
|
+
}
|
1271
|
+
|
1272
|
+
ASSERT(right->IsConstant() && HConstant::cast(right)->HasInteger32Value());
|
1273
|
+
LOperand* divisor = chunk_->DefineConstantOperand(HConstant::cast(right));
|
1274
|
+
int32_t divisor_si = HConstant::cast(right)->Integer32Value();
|
1275
|
+
if (divisor_si == 0) {
|
1276
|
+
LOperand* dividend = UseRegister(instr->left());
|
1277
|
+
return AssignEnvironment(DefineAsRegister(
|
1278
|
+
new(zone()) LMathFloorOfDiv(dividend, divisor, NULL)));
|
1279
|
+
} else if (IsPowerOf2(abs(divisor_si))) {
|
1280
|
+
LOperand* dividend = UseRegisterAtStart(instr->left());
|
1281
|
+
LInstruction* result = DefineAsRegister(
|
1282
|
+
new(zone()) LMathFloorOfDiv(dividend, divisor, NULL));
|
1283
|
+
return divisor_si < 0 ? AssignEnvironment(result) : result;
|
1284
|
+
} else {
|
1285
|
+
// use two r64
|
1286
|
+
LOperand* dividend = UseRegisterAtStart(instr->left());
|
1287
|
+
LOperand* temp = TempRegister();
|
1288
|
+
LInstruction* result = DefineAsRegister(
|
1289
|
+
new(zone()) LMathFloorOfDiv(dividend, divisor, temp));
|
1290
|
+
return divisor_si < 0 ? AssignEnvironment(result) : result;
|
1291
|
+
}
|
1292
|
+
}
|
1293
|
+
|
1294
|
+
|
1294
1295
|
LInstruction* LChunkBuilder::DoMod(HMod* instr) {
|
1295
1296
|
if (instr->representation().IsInteger32()) {
|
1296
1297
|
ASSERT(instr->left()->representation().IsInteger32());
|
@@ -1396,6 +1397,26 @@ LInstruction* LChunkBuilder::DoAdd(HAdd* instr) {
|
|
1396
1397
|
}
|
1397
1398
|
|
1398
1399
|
|
1400
|
+
LInstruction* LChunkBuilder::DoMathMinMax(HMathMinMax* instr) {
|
1401
|
+
LOperand* left = NULL;
|
1402
|
+
LOperand* right = NULL;
|
1403
|
+
if (instr->representation().IsInteger32()) {
|
1404
|
+
ASSERT(instr->left()->representation().IsInteger32());
|
1405
|
+
ASSERT(instr->right()->representation().IsInteger32());
|
1406
|
+
left = UseRegisterAtStart(instr->LeastConstantOperand());
|
1407
|
+
right = UseOrConstantAtStart(instr->MostConstantOperand());
|
1408
|
+
} else {
|
1409
|
+
ASSERT(instr->representation().IsDouble());
|
1410
|
+
ASSERT(instr->left()->representation().IsDouble());
|
1411
|
+
ASSERT(instr->right()->representation().IsDouble());
|
1412
|
+
left = UseRegisterAtStart(instr->left());
|
1413
|
+
right = UseRegisterAtStart(instr->right());
|
1414
|
+
}
|
1415
|
+
LMathMinMax* minmax = new(zone()) LMathMinMax(left, right);
|
1416
|
+
return DefineSameAsFirst(minmax);
|
1417
|
+
}
|
1418
|
+
|
1419
|
+
|
1399
1420
|
LInstruction* LChunkBuilder::DoPower(HPower* instr) {
|
1400
1421
|
ASSERT(instr->representation().IsDouble());
|
1401
1422
|
// We call a C function for double power. It can't trigger a GC.
|
@@ -1441,7 +1462,7 @@ LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) {
|
|
1441
1462
|
|
1442
1463
|
LInstruction* LChunkBuilder::DoCompareIDAndBranch(
|
1443
1464
|
HCompareIDAndBranch* instr) {
|
1444
|
-
Representation r = instr->
|
1465
|
+
Representation r = instr->representation();
|
1445
1466
|
if (r.IsInteger32()) {
|
1446
1467
|
ASSERT(instr->left()->representation().IsInteger32());
|
1447
1468
|
ASSERT(instr->right()->representation().IsInteger32());
|
@@ -1578,6 +1599,12 @@ LInstruction* LChunkBuilder::DoFixedArrayBaseLength(
|
|
1578
1599
|
}
|
1579
1600
|
|
1580
1601
|
|
1602
|
+
LInstruction* LChunkBuilder::DoMapEnumLength(HMapEnumLength* instr) {
|
1603
|
+
LOperand* map = UseRegisterAtStart(instr->value());
|
1604
|
+
return DefineAsRegister(new(zone()) LMapEnumLength(map));
|
1605
|
+
}
|
1606
|
+
|
1607
|
+
|
1581
1608
|
LInstruction* LChunkBuilder::DoElementsKind(HElementsKind* instr) {
|
1582
1609
|
LOperand* object = UseRegisterAtStart(instr->value());
|
1583
1610
|
return DefineAsRegister(new(zone()) LElementsKind(object));
|
@@ -1593,8 +1620,19 @@ LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) {
|
|
1593
1620
|
|
1594
1621
|
LInstruction* LChunkBuilder::DoDateField(HDateField* instr) {
|
1595
1622
|
LOperand* object = UseFixed(instr->value(), rax);
|
1596
|
-
LDateField* result = new LDateField(object, instr->index());
|
1597
|
-
return MarkAsCall(DefineFixed(result, rax), instr);
|
1623
|
+
LDateField* result = new(zone()) LDateField(object, instr->index());
|
1624
|
+
return MarkAsCall(DefineFixed(result, rax), instr, CAN_DEOPTIMIZE_EAGERLY);
|
1625
|
+
}
|
1626
|
+
|
1627
|
+
|
1628
|
+
LInstruction* LChunkBuilder::DoSeqStringSetChar(HSeqStringSetChar* instr) {
|
1629
|
+
LOperand* string = UseRegister(instr->string());
|
1630
|
+
LOperand* index = UseRegister(instr->index());
|
1631
|
+
ASSERT(rcx.is_byte_register());
|
1632
|
+
LOperand* value = UseFixed(instr->value(), rcx);
|
1633
|
+
LSeqStringSetChar* result =
|
1634
|
+
new(zone()) LSeqStringSetChar(instr->encoding(), string, index, value);
|
1635
|
+
return DefineSameAsFirst(result);
|
1598
1636
|
}
|
1599
1637
|
|
1600
1638
|
|
@@ -1634,26 +1672,30 @@ LInstruction* LChunkBuilder::DoForceRepresentation(HForceRepresentation* bad) {
|
|
1634
1672
|
LInstruction* LChunkBuilder::DoChange(HChange* instr) {
|
1635
1673
|
Representation from = instr->from();
|
1636
1674
|
Representation to = instr->to();
|
1675
|
+
// Only mark conversions that might need to allocate as calling rather than
|
1676
|
+
// all changes. This makes simple, non-allocating conversion not have to force
|
1677
|
+
// building a stack frame.
|
1637
1678
|
if (from.IsTagged()) {
|
1638
1679
|
if (to.IsDouble()) {
|
1680
|
+
info()->MarkAsDeferredCalling();
|
1639
1681
|
LOperand* value = UseRegister(instr->value());
|
1640
1682
|
LNumberUntagD* res = new(zone()) LNumberUntagD(value);
|
1641
1683
|
return AssignEnvironment(DefineAsRegister(res));
|
1642
1684
|
} else {
|
1643
1685
|
ASSERT(to.IsInteger32());
|
1644
1686
|
LOperand* value = UseRegister(instr->value());
|
1645
|
-
|
1646
|
-
|
1687
|
+
if (instr->value()->type().IsSmi()) {
|
1688
|
+
return DefineSameAsFirst(new(zone()) LSmiUntag(value, false));
|
1689
|
+
} else {
|
1647
1690
|
bool truncating = instr->CanTruncateToInt32();
|
1648
1691
|
LOperand* xmm_temp = truncating ? NULL : FixedTemp(xmm1);
|
1649
1692
|
LTaggedToI* res = new(zone()) LTaggedToI(value, xmm_temp);
|
1650
1693
|
return AssignEnvironment(DefineSameAsFirst(res));
|
1651
|
-
} else {
|
1652
|
-
return DefineSameAsFirst(new(zone()) LSmiUntag(value, needs_check));
|
1653
1694
|
}
|
1654
1695
|
}
|
1655
1696
|
} else if (from.IsDouble()) {
|
1656
1697
|
if (to.IsTagged()) {
|
1698
|
+
info()->MarkAsDeferredCalling();
|
1657
1699
|
LOperand* value = UseRegister(instr->value());
|
1658
1700
|
LOperand* temp = TempRegister();
|
1659
1701
|
|
@@ -1667,19 +1709,30 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
|
|
1667
1709
|
return AssignEnvironment(DefineAsRegister(new(zone()) LDoubleToI(value)));
|
1668
1710
|
}
|
1669
1711
|
} else if (from.IsInteger32()) {
|
1712
|
+
info()->MarkAsDeferredCalling();
|
1670
1713
|
if (to.IsTagged()) {
|
1671
1714
|
HValue* val = instr->value();
|
1672
1715
|
LOperand* value = UseRegister(val);
|
1673
|
-
if (val->
|
1716
|
+
if (val->CheckFlag(HInstruction::kUint32)) {
|
1717
|
+
LOperand* temp = FixedTemp(xmm1);
|
1718
|
+
LNumberTagU* result = new(zone()) LNumberTagU(value, temp);
|
1719
|
+
return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result)));
|
1720
|
+
} else if (val->HasRange() && val->range()->IsInSmiRange()) {
|
1674
1721
|
return DefineSameAsFirst(new(zone()) LSmiTag(value));
|
1675
1722
|
} else {
|
1676
1723
|
LNumberTagI* result = new(zone()) LNumberTagI(value);
|
1677
1724
|
return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result)));
|
1678
1725
|
}
|
1679
1726
|
} else {
|
1680
|
-
|
1681
|
-
|
1682
|
-
|
1727
|
+
if (instr->value()->CheckFlag(HInstruction::kUint32)) {
|
1728
|
+
LOperand* temp = FixedTemp(xmm1);
|
1729
|
+
return DefineAsRegister(
|
1730
|
+
new(zone()) LUint32ToDouble(UseRegister(instr->value()), temp));
|
1731
|
+
} else {
|
1732
|
+
ASSERT(to.IsDouble());
|
1733
|
+
LOperand* value = Use(instr->value());
|
1734
|
+
return DefineAsRegister(new(zone()) LInteger32ToDouble(value));
|
1735
|
+
}
|
1683
1736
|
}
|
1684
1737
|
}
|
1685
1738
|
UNREACHABLE();
|
@@ -1701,9 +1754,9 @@ LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) {
|
|
1701
1754
|
|
1702
1755
|
|
1703
1756
|
LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) {
|
1704
|
-
|
1757
|
+
LUnallocated* temp = TempRegister();
|
1705
1758
|
LCheckPrototypeMaps* result = new(zone()) LCheckPrototypeMaps(temp);
|
1706
|
-
return AssignEnvironment(result);
|
1759
|
+
return AssignEnvironment(Define(result, temp));
|
1707
1760
|
}
|
1708
1761
|
|
1709
1762
|
|
@@ -1731,8 +1784,7 @@ LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) {
|
|
1731
1784
|
Representation input_rep = value->representation();
|
1732
1785
|
LOperand* reg = UseRegister(value);
|
1733
1786
|
if (input_rep.IsDouble()) {
|
1734
|
-
return DefineAsRegister(new(zone()) LClampDToUint8(reg
|
1735
|
-
TempRegister()));
|
1787
|
+
return DefineAsRegister(new(zone()) LClampDToUint8(reg));
|
1736
1788
|
} else if (input_rep.IsInteger32()) {
|
1737
1789
|
return DefineSameAsFirst(new(zone()) LClampIToUint8(reg));
|
1738
1790
|
} else {
|
@@ -1740,7 +1792,6 @@ LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) {
|
|
1740
1792
|
// Register allocator doesn't (yet) support allocation of double
|
1741
1793
|
// temps. Reserve xmm1 explicitly.
|
1742
1794
|
LClampTToUint8* result = new(zone()) LClampTToUint8(reg,
|
1743
|
-
TempRegister(),
|
1744
1795
|
FixedTemp(xmm1));
|
1745
1796
|
return AssignEnvironment(DefineSameAsFirst(result));
|
1746
1797
|
}
|
@@ -1879,50 +1930,37 @@ LInstruction* LChunkBuilder::DoLoadExternalArrayPointer(
|
|
1879
1930
|
}
|
1880
1931
|
|
1881
1932
|
|
1882
|
-
LInstruction* LChunkBuilder::
|
1883
|
-
|
1884
|
-
|
1885
|
-
|
1886
|
-
|
1887
|
-
LOperand* key =
|
1888
|
-
|
1889
|
-
|
1890
|
-
|
1891
|
-
}
|
1892
|
-
|
1893
|
-
|
1894
|
-
LInstruction* LChunkBuilder::DoLoadKeyedFastDoubleElement(
|
1895
|
-
HLoadKeyedFastDoubleElement* instr) {
|
1896
|
-
ASSERT(instr->representation().IsDouble());
|
1897
|
-
ASSERT(instr->key()->representation().IsInteger32());
|
1898
|
-
LOperand* elements = UseRegisterAtStart(instr->elements());
|
1899
|
-
LOperand* key = UseRegisterOrConstantAtStart(instr->key());
|
1900
|
-
LLoadKeyedFastDoubleElement* result =
|
1901
|
-
new(zone()) LLoadKeyedFastDoubleElement(elements, key);
|
1902
|
-
return AssignEnvironment(DefineAsRegister(result));
|
1903
|
-
}
|
1933
|
+
LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
|
1934
|
+
ASSERT(instr->key()->representation().IsInteger32() ||
|
1935
|
+
instr->key()->representation().IsTagged());
|
1936
|
+
ElementsKind elements_kind = instr->elements_kind();
|
1937
|
+
bool clobbers_key = instr->key()->representation().IsTagged();
|
1938
|
+
LOperand* key = clobbers_key
|
1939
|
+
? UseTempRegister(instr->key())
|
1940
|
+
: UseRegisterOrConstantAtStart(instr->key());
|
1941
|
+
LLoadKeyed* result = NULL;
|
1904
1942
|
|
1943
|
+
if (!instr->is_external()) {
|
1944
|
+
LOperand* obj = UseRegisterAtStart(instr->elements());
|
1945
|
+
result = new(zone()) LLoadKeyed(obj, key);
|
1946
|
+
} else {
|
1947
|
+
ASSERT(
|
1948
|
+
(instr->representation().IsInteger32() &&
|
1949
|
+
(elements_kind != EXTERNAL_FLOAT_ELEMENTS) &&
|
1950
|
+
(elements_kind != EXTERNAL_DOUBLE_ELEMENTS)) ||
|
1951
|
+
(instr->representation().IsDouble() &&
|
1952
|
+
((elements_kind == EXTERNAL_FLOAT_ELEMENTS) ||
|
1953
|
+
(elements_kind == EXTERNAL_DOUBLE_ELEMENTS))));
|
1954
|
+
LOperand* external_pointer = UseRegister(instr->elements());
|
1955
|
+
result = new(zone()) LLoadKeyed(external_pointer, key);
|
1956
|
+
}
|
1905
1957
|
|
1906
|
-
|
1907
|
-
|
1908
|
-
|
1909
|
-
ASSERT(
|
1910
|
-
(instr->representation().IsInteger32() &&
|
1911
|
-
(elements_kind != EXTERNAL_FLOAT_ELEMENTS) &&
|
1912
|
-
(elements_kind != EXTERNAL_DOUBLE_ELEMENTS)) ||
|
1913
|
-
(instr->representation().IsDouble() &&
|
1914
|
-
((elements_kind == EXTERNAL_FLOAT_ELEMENTS) ||
|
1915
|
-
(elements_kind == EXTERNAL_DOUBLE_ELEMENTS))));
|
1916
|
-
ASSERT(instr->key()->representation().IsInteger32());
|
1917
|
-
LOperand* external_pointer = UseRegister(instr->external_pointer());
|
1918
|
-
LOperand* key = UseRegisterOrConstant(instr->key());
|
1919
|
-
LLoadKeyedSpecializedArrayElement* result =
|
1920
|
-
new(zone()) LLoadKeyedSpecializedArrayElement(external_pointer, key);
|
1921
|
-
LInstruction* load_instr = DefineAsRegister(result);
|
1958
|
+
DefineAsRegister(result);
|
1959
|
+
bool can_deoptimize = instr->RequiresHoleCheck() ||
|
1960
|
+
(elements_kind == EXTERNAL_UNSIGNED_INT_ELEMENTS);
|
1922
1961
|
// An unsigned int array load might overflow and cause a deopt, make sure it
|
1923
1962
|
// has an environment.
|
1924
|
-
return
|
1925
|
-
AssignEnvironment(load_instr) : load_instr;
|
1963
|
+
return can_deoptimize ? AssignEnvironment(result) : result;
|
1926
1964
|
}
|
1927
1965
|
|
1928
1966
|
|
@@ -1935,63 +1973,52 @@ LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
|
|
1935
1973
|
}
|
1936
1974
|
|
1937
1975
|
|
1938
|
-
LInstruction* LChunkBuilder::
|
1939
|
-
|
1940
|
-
bool
|
1941
|
-
|
1942
|
-
|
1943
|
-
|
1944
|
-
|
1945
|
-
|
1946
|
-
|
1947
|
-
|
1948
|
-
|
1949
|
-
|
1950
|
-
|
1951
|
-
|
1952
|
-
|
1953
|
-
|
1954
|
-
|
1955
|
-
|
1956
|
-
|
1957
|
-
|
1958
|
-
|
1959
|
-
|
1960
|
-
|
1961
|
-
|
1962
|
-
|
1963
|
-
LOperand* val = UseTempRegister(instr->value());
|
1964
|
-
LOperand* key = UseRegisterOrConstantAtStart(instr->key());
|
1965
|
-
|
1966
|
-
return new(zone()) LStoreKeyedFastDoubleElement(elements, key, val);
|
1967
|
-
}
|
1976
|
+
LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
|
1977
|
+
ElementsKind elements_kind = instr->elements_kind();
|
1978
|
+
bool clobbers_key = instr->key()->representation().IsTagged();
|
1979
|
+
|
1980
|
+
if (!instr->is_external()) {
|
1981
|
+
ASSERT(instr->elements()->representation().IsTagged());
|
1982
|
+
bool needs_write_barrier = instr->NeedsWriteBarrier();
|
1983
|
+
LOperand* object = NULL;
|
1984
|
+
LOperand* key = NULL;
|
1985
|
+
LOperand* val = NULL;
|
1986
|
+
|
1987
|
+
if (instr->value()->representation().IsDouble()) {
|
1988
|
+
object = UseRegisterAtStart(instr->elements());
|
1989
|
+
val = UseTempRegister(instr->value());
|
1990
|
+
key = clobbers_key ? UseTempRegister(instr->key())
|
1991
|
+
: UseRegisterOrConstantAtStart(instr->key());
|
1992
|
+
} else {
|
1993
|
+
ASSERT(instr->value()->representation().IsTagged());
|
1994
|
+
object = UseTempRegister(instr->elements());
|
1995
|
+
val = needs_write_barrier ? UseTempRegister(instr->value())
|
1996
|
+
: UseRegisterAtStart(instr->value());
|
1997
|
+
key = (clobbers_key || needs_write_barrier)
|
1998
|
+
? UseTempRegister(instr->key())
|
1999
|
+
: UseRegisterOrConstantAtStart(instr->key());
|
2000
|
+
}
|
1968
2001
|
|
2002
|
+
return new(zone()) LStoreKeyed(object, key, val);
|
2003
|
+
}
|
1969
2004
|
|
1970
|
-
LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement(
|
1971
|
-
HStoreKeyedSpecializedArrayElement* instr) {
|
1972
|
-
ElementsKind elements_kind = instr->elements_kind();
|
1973
2005
|
ASSERT(
|
1974
2006
|
(instr->value()->representation().IsInteger32() &&
|
1975
2007
|
(elements_kind != EXTERNAL_FLOAT_ELEMENTS) &&
|
1976
2008
|
(elements_kind != EXTERNAL_DOUBLE_ELEMENTS)) ||
|
1977
2009
|
(instr->value()->representation().IsDouble() &&
|
1978
2010
|
((elements_kind == EXTERNAL_FLOAT_ELEMENTS) ||
|
1979
|
-
|
1980
|
-
ASSERT(instr->
|
1981
|
-
ASSERT(instr->key()->representation().IsInteger32());
|
1982
|
-
|
1983
|
-
LOperand* external_pointer = UseRegister(instr->external_pointer());
|
2011
|
+
(elements_kind == EXTERNAL_DOUBLE_ELEMENTS))));
|
2012
|
+
ASSERT(instr->elements()->representation().IsExternal());
|
1984
2013
|
bool val_is_temp_register =
|
1985
2014
|
elements_kind == EXTERNAL_PIXEL_ELEMENTS ||
|
1986
2015
|
elements_kind == EXTERNAL_FLOAT_ELEMENTS;
|
1987
|
-
LOperand* val = val_is_temp_register
|
1988
|
-
? UseTempRegister(instr->value())
|
2016
|
+
LOperand* val = val_is_temp_register ? UseTempRegister(instr->value())
|
1989
2017
|
: UseRegister(instr->value());
|
1990
|
-
LOperand* key =
|
1991
|
-
|
1992
|
-
|
1993
|
-
|
1994
|
-
val);
|
2018
|
+
LOperand* key = clobbers_key ? UseTempRegister(instr->key())
|
2019
|
+
: UseRegisterOrConstantAtStart(instr->key());
|
2020
|
+
LOperand* external_pointer = UseRegister(instr->elements());
|
2021
|
+
return new(zone()) LStoreKeyed(external_pointer, key, val);
|
1995
2022
|
}
|
1996
2023
|
|
1997
2024
|
|
@@ -2012,15 +2039,18 @@ LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
|
|
2012
2039
|
|
2013
2040
|
LInstruction* LChunkBuilder::DoTransitionElementsKind(
|
2014
2041
|
HTransitionElementsKind* instr) {
|
2015
|
-
|
2016
|
-
|
2017
|
-
if (IsSimpleMapChangeTransition(from_kind, to_kind)) {
|
2042
|
+
LOperand* object = UseRegister(instr->object());
|
2043
|
+
if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) {
|
2018
2044
|
LOperand* object = UseRegister(instr->object());
|
2019
2045
|
LOperand* new_map_reg = TempRegister();
|
2020
2046
|
LOperand* temp_reg = TempRegister();
|
2021
2047
|
LTransitionElementsKind* result =
|
2022
2048
|
new(zone()) LTransitionElementsKind(object, new_map_reg, temp_reg);
|
2023
|
-
return
|
2049
|
+
return result;
|
2050
|
+
} else if (FLAG_compiled_transitions) {
|
2051
|
+
LTransitionElementsKind* result =
|
2052
|
+
new(zone()) LTransitionElementsKind(object, NULL, NULL);
|
2053
|
+
return AssignPointerMap(result);
|
2024
2054
|
} else {
|
2025
2055
|
LOperand* object = UseFixed(instr->object(), rax);
|
2026
2056
|
LOperand* fixed_object_reg = FixedTemp(rdx);
|
@@ -2029,11 +2059,21 @@ LInstruction* LChunkBuilder::DoTransitionElementsKind(
|
|
2029
2059
|
new(zone()) LTransitionElementsKind(object,
|
2030
2060
|
new_map_reg,
|
2031
2061
|
fixed_object_reg);
|
2032
|
-
return MarkAsCall(
|
2062
|
+
return MarkAsCall(result, instr);
|
2033
2063
|
}
|
2034
2064
|
}
|
2035
2065
|
|
2036
2066
|
|
2067
|
+
LInstruction* LChunkBuilder::DoTrapAllocationMemento(
|
2068
|
+
HTrapAllocationMemento* instr) {
|
2069
|
+
LOperand* object = UseRegister(instr->object());
|
2070
|
+
LOperand* temp = TempRegister();
|
2071
|
+
LTrapAllocationMemento* result =
|
2072
|
+
new(zone()) LTrapAllocationMemento(object, temp);
|
2073
|
+
return AssignEnvironment(result);
|
2074
|
+
}
|
2075
|
+
|
2076
|
+
|
2037
2077
|
LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
|
2038
2078
|
bool needs_write_barrier = instr->NeedsWriteBarrier();
|
2039
2079
|
bool needs_write_barrier_for_map = !instr->transition().is_null() &&
|
@@ -2102,7 +2142,17 @@ LInstruction* LChunkBuilder::DoStringLength(HStringLength* instr) {
|
|
2102
2142
|
|
2103
2143
|
|
2104
2144
|
LInstruction* LChunkBuilder::DoAllocateObject(HAllocateObject* instr) {
|
2105
|
-
|
2145
|
+
info()->MarkAsDeferredCalling();
|
2146
|
+
LAllocateObject* result = new(zone()) LAllocateObject(TempRegister());
|
2147
|
+
return AssignPointerMap(DefineAsRegister(result));
|
2148
|
+
}
|
2149
|
+
|
2150
|
+
|
2151
|
+
LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) {
|
2152
|
+
info()->MarkAsDeferredCalling();
|
2153
|
+
LOperand* size = UseTempRegister(instr->size());
|
2154
|
+
LOperand* temp = TempRegister();
|
2155
|
+
LAllocate* result = new(zone()) LAllocate(size, temp);
|
2106
2156
|
return AssignPointerMap(DefineAsRegister(result));
|
2107
2157
|
}
|
2108
2158
|
|
@@ -2141,6 +2191,7 @@ LInstruction* LChunkBuilder::DoDeleteProperty(HDeleteProperty* instr) {
|
|
2141
2191
|
|
2142
2192
|
|
2143
2193
|
LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) {
|
2194
|
+
ASSERT(argument_count_ == 0);
|
2144
2195
|
allocator_->MarkAsOsrEntry();
|
2145
2196
|
current_block_->last_environment()->set_ast_id(instr->ast_id());
|
2146
2197
|
return AssignEnvironment(new(zone()) LOsrEntry);
|
@@ -2148,8 +2199,17 @@ LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) {
|
|
2148
2199
|
|
2149
2200
|
|
2150
2201
|
LInstruction* LChunkBuilder::DoParameter(HParameter* instr) {
|
2151
|
-
|
2152
|
-
|
2202
|
+
LParameter* result = new(zone()) LParameter;
|
2203
|
+
if (instr->kind() == HParameter::STACK_PARAMETER) {
|
2204
|
+
int spill_index = chunk()->GetParameterStackSlot(instr->index());
|
2205
|
+
return DefineAsSpilled(result, spill_index);
|
2206
|
+
} else {
|
2207
|
+
ASSERT(info()->IsStub());
|
2208
|
+
CodeStubInterfaceDescriptor* descriptor =
|
2209
|
+
info()->code_stub()->GetInterfaceDescriptor(info()->isolate());
|
2210
|
+
Register reg = descriptor->register_params_[instr->index()];
|
2211
|
+
return DefineFixed(result, reg);
|
2212
|
+
}
|
2153
2213
|
}
|
2154
2214
|
|
2155
2215
|
|
@@ -2179,12 +2239,10 @@ LInstruction* LChunkBuilder::DoArgumentsObject(HArgumentsObject* instr) {
|
|
2179
2239
|
|
2180
2240
|
|
2181
2241
|
LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) {
|
2182
|
-
LOperand*
|
2242
|
+
LOperand* args = UseRegister(instr->arguments());
|
2183
2243
|
LOperand* length = UseTempRegister(instr->length());
|
2184
2244
|
LOperand* index = Use(instr->index());
|
2185
|
-
LAccessArgumentsAt
|
2186
|
-
new(zone()) LAccessArgumentsAt(arguments, length, index);
|
2187
|
-
return AssignEnvironment(DefineAsRegister(result));
|
2245
|
+
return DefineAsRegister(new(zone()) LAccessArgumentsAt(args, length, index));
|
2188
2246
|
}
|
2189
2247
|
|
2190
2248
|
|
@@ -2219,7 +2277,7 @@ LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) {
|
|
2219
2277
|
env->set_ast_id(instr->ast_id());
|
2220
2278
|
|
2221
2279
|
env->Drop(instr->pop_count());
|
2222
|
-
for (int i =
|
2280
|
+
for (int i = instr->values()->length() - 1; i >= 0; --i) {
|
2223
2281
|
HValue* value = instr->values()->at(i);
|
2224
2282
|
if (instr->HasAssignedIndexAt(i)) {
|
2225
2283
|
env->Bind(instr->GetAssignedIndexAt(i), value);
|
@@ -2238,7 +2296,7 @@ LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) {
|
|
2238
2296
|
instruction_pending_deoptimization_environment_->
|
2239
2297
|
SetDeferredLazyDeoptimizationEnvironment(result->environment());
|
2240
2298
|
instruction_pending_deoptimization_environment_ = NULL;
|
2241
|
-
pending_deoptimization_ast_id_ =
|
2299
|
+
pending_deoptimization_ast_id_ = BailoutId::None();
|
2242
2300
|
return result;
|
2243
2301
|
}
|
2244
2302
|
|
@@ -2247,6 +2305,7 @@ LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) {
|
|
2247
2305
|
|
2248
2306
|
|
2249
2307
|
LInstruction* LChunkBuilder::DoStackCheck(HStackCheck* instr) {
|
2308
|
+
info()->MarkAsDeferredCalling();
|
2250
2309
|
if (instr->is_function_entry()) {
|
2251
2310
|
return MarkAsCall(new(zone()) LStackCheck, instr);
|
2252
2311
|
} else {
|
@@ -2263,11 +2322,12 @@ LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) {
|
|
2263
2322
|
instr->arguments_count(),
|
2264
2323
|
instr->function(),
|
2265
2324
|
undefined,
|
2266
|
-
instr->
|
2267
|
-
instr->
|
2325
|
+
instr->inlining_kind(),
|
2326
|
+
instr->undefined_receiver());
|
2268
2327
|
if (instr->arguments_var() != NULL) {
|
2269
2328
|
inner->Bind(instr->arguments_var(), graph()->GetArgumentsObject());
|
2270
2329
|
}
|
2330
|
+
inner->set_entry(instr);
|
2271
2331
|
current_block_->UpdateEnvironment(inner);
|
2272
2332
|
chunk_->AddInlinedClosure(instr->closure());
|
2273
2333
|
return NULL;
|
@@ -2279,7 +2339,7 @@ LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
|
|
2279
2339
|
|
2280
2340
|
HEnvironment* env = current_block_->last_environment();
|
2281
2341
|
|
2282
|
-
if (
|
2342
|
+
if (env->entry()->arguments_pushed()) {
|
2283
2343
|
int argument_count = env->arguments_environment()->parameter_count();
|
2284
2344
|
pop = new(zone()) LDrop(argument_count);
|
2285
2345
|
argument_count_ -= argument_count;
|