summaryrefslogtreecommitdiff
path: root/deps/v8/test
diff options
context:
space:
mode:
authorMyles Borins <mylesborins@google.com>2017-08-01 11:36:44 -0500
committerMyles Borins <mylesborins@google.com>2017-08-01 15:23:15 -0500
commit0a66b223e149a841669bfad5598e4254589730cb (patch)
tree5ec050f7f78aafbf5b1e0e50d639fb843141e162 /deps/v8/test
parent1782b3836ba58ef0da6b687f2bb970c0bd8199ad (diff)
downloadnode-new-0a66b223e149a841669bfad5598e4254589730cb.tar.gz
deps: update V8 to 6.0.286.52
PR-URL: https://github.com/nodejs/node/pull/14004 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'deps/v8/test')
-rw-r--r--deps/v8/test/BUILD.gn19
-rw-r--r--deps/v8/test/benchmarks/testcfg.py2
-rw-r--r--deps/v8/test/bot_default.gyp1
-rw-r--r--deps/v8/test/bot_default.isolate2
-rw-r--r--deps/v8/test/cctest/BUILD.gn6
-rw-r--r--deps/v8/test/cctest/OWNERS7
-rw-r--r--deps/v8/test/cctest/asmjs/OWNERS11
-rw-r--r--deps/v8/test/cctest/asmjs/test-asm-typer.cc2089
-rw-r--r--deps/v8/test/cctest/cctest.cc32
-rw-r--r--deps/v8/test/cctest/cctest.gyp5
-rw-r--r--deps/v8/test/cctest/cctest.h1
-rw-r--r--deps/v8/test/cctest/cctest.status56
-rw-r--r--deps/v8/test/cctest/compiler/call-tester.h194
-rw-r--r--deps/v8/test/cctest/compiler/test-js-context-specialization.cc20
-rw-r--r--deps/v8/test/cctest/compiler/test-run-machops.cc78
-rw-r--r--deps/v8/test/cctest/heap/test-array-buffer-tracker.cc8
-rw-r--r--deps/v8/test/cctest/heap/test-compaction.cc8
-rw-r--r--deps/v8/test/cctest/heap/test-concurrent-marking.cc5
-rw-r--r--deps/v8/test/cctest/heap/test-heap.cc380
-rw-r--r--deps/v8/test/cctest/heap/test-mark-compact.cc14
-rw-r--r--deps/v8/test/cctest/heap/test-page-promotion.cc4
-rw-r--r--deps/v8/test/cctest/heap/test-spaces.cc23
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode-expectations-printer.cc2
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/ArrayLiterals.golden40
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/ArrayLiteralsWide.golden4
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/AssignmentsInBinaryExpression.golden50
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/BasicBlockToBoolean.golden6
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/BasicLoops.golden108
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/BreakableBlocks.golden20
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/CallAndSpread.golden32
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/CallGlobal.golden8
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/CallLookupSlot.golden10
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/CallNew.golden12
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/CallRuntime.golden4
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden18
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden217
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/CompareNil.golden2
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/CompoundExpressions.golden24
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/Conditional.golden2
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/ConstVariable.golden12
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/ConstVariableContextSlot.golden8
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/ContextParameters.golden8
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/ContextVariables.golden16
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/CountOperators.golden68
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/CreateArguments.golden4
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/CreateRestParameter.golden34
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/DeclareGlobals.golden6
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/Delete.golden16
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/DoExpression.golden2
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/Eval.golden4
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/ForAwaitOf.golden2156
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/ForIn.golden42
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/ForOf.golden412
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/ForOfLoop.golden1860
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/FunctionLiterals.golden10
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/GenerateTestUndetectable.golden16
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/Generators.golden674
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/GlobalCompoundExpressions.golden12
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/GlobalCountOperators.golden28
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/GlobalDelete.golden4
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/IfConditions.golden544
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/JumpsRequiringConstantWideOperands.golden8
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/LetVariable.golden15
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/LetVariableContextSlot.golden8
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/LoadGlobal.golden264
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/LogicalExpressions.golden8
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/LookupSlot.golden26
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/LookupSlotInEval.golden4
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/LookupSlotWideInEval.golden4
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/Modules.golden969
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/NewAndSpread.golden131
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/ObjectLiterals.golden88
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/ObjectLiteralsWide.golden2
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/OuterContextVariables.golden2
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/PrimitiveExpressions.golden44
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/PropertyCall.golden286
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/PropertyLoads.golden528
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/PropertyStores.golden1048
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/RegExpLiterals.golden10
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/RegExpLiteralsWide.golden2
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/RemoveRedundantLdar.golden10
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/StandardForLoop.golden1070
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/StoreGlobal.golden524
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/SuperCallAndSpread.golden16
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/Switch.golden34
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/TopLevelObjectLiterals.golden6
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/TryCatch.golden46
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/TryFinally.golden87
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/Typeof.golden2
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/UnaryOperators.golden18
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/WideRegisters.golden16
-rw-r--r--deps/v8/test/cctest/interpreter/bytecode_expectations/WithStatement.golden10
-rw-r--r--deps/v8/test/cctest/interpreter/source-position-matcher.cc4
-rw-r--r--deps/v8/test/cctest/interpreter/test-bytecode-generator.cc102
-rw-r--r--deps/v8/test/cctest/interpreter/test-interpreter.cc92
-rw-r--r--deps/v8/test/cctest/parsing/test-preparser.cc187
-rw-r--r--deps/v8/test/cctest/parsing/test-scanner-streams.cc46
-rw-r--r--deps/v8/test/cctest/parsing/test-scanner.cc2
-rw-r--r--deps/v8/test/cctest/scope-test-helper.h69
-rw-r--r--deps/v8/test/cctest/test-accessor-assembler.cc8
-rw-r--r--deps/v8/test/cctest/test-accessors.cc2
-rw-r--r--deps/v8/test/cctest/test-api-interceptors.cc4
-rw-r--r--deps/v8/test/cctest/test-api.cc481
-rw-r--r--deps/v8/test/cctest/test-assembler-arm.cc113
-rw-r--r--deps/v8/test/cctest/test-assembler-arm64.cc91
-rw-r--r--deps/v8/test/cctest/test-assembler-mips.cc74
-rw-r--r--deps/v8/test/cctest/test-assembler-mips64.cc1039
-rw-r--r--deps/v8/test/cctest/test-ast.cc2
-rw-r--r--deps/v8/test/cctest/test-code-stub-assembler.cc112
-rw-r--r--deps/v8/test/cctest/test-code-stubs-mips64.cc8
-rw-r--r--deps/v8/test/cctest/test-compiler.cc8
-rw-r--r--deps/v8/test/cctest/test-cpu-profiler.cc14
-rw-r--r--deps/v8/test/cctest/test-date.cc4
-rw-r--r--deps/v8/test/cctest/test-debug.cc37
-rw-r--r--deps/v8/test/cctest/test-deoptimization.cc10
-rw-r--r--deps/v8/test/cctest/test-dictionary.cc12
-rw-r--r--deps/v8/test/cctest/test-disasm-arm.cc61
-rw-r--r--deps/v8/test/cctest/test-disasm-ia32.cc36
-rw-r--r--deps/v8/test/cctest/test-disasm-mips64.cc45
-rw-r--r--deps/v8/test/cctest/test-disasm-x64.cc4
-rw-r--r--deps/v8/test/cctest/test-feedback-vector.cc27
-rw-r--r--deps/v8/test/cctest/test-field-type-tracking.cc40
-rw-r--r--deps/v8/test/cctest/test-flags.cc2
-rw-r--r--deps/v8/test/cctest/test-heap-profiler.cc12
-rw-r--r--deps/v8/test/cctest/test-identity-map.cc54
-rw-r--r--deps/v8/test/cctest/test-macro-assembler-arm.cc121
-rw-r--r--deps/v8/test/cctest/test-macro-assembler-mips64.cc62
-rw-r--r--deps/v8/test/cctest/test-mementos.cc5
-rw-r--r--deps/v8/test/cctest/test-modules.cc45
-rw-r--r--deps/v8/test/cctest/test-parsing.cc295
-rw-r--r--deps/v8/test/cctest/test-serialize.cc49
-rw-r--r--deps/v8/test/cctest/test-strings.cc3
-rw-r--r--deps/v8/test/cctest/test-symbols.cc2
-rw-r--r--deps/v8/test/cctest/test-types.cc5
-rw-r--r--deps/v8/test/cctest/test-unboxed-doubles.cc8
-rw-r--r--deps/v8/test/cctest/test-weakmaps.cc10
-rw-r--r--deps/v8/test/cctest/test-weaksets.cc8
-rw-r--r--deps/v8/test/cctest/wasm/test-run-wasm-64.cc12
-rw-r--r--deps/v8/test/cctest/wasm/test-run-wasm-asmjs.cc3
-rw-r--r--deps/v8/test/cctest/wasm/test-run-wasm-interpreter.cc21
-rw-r--r--deps/v8/test/cctest/wasm/test-run-wasm-js.cc2
-rw-r--r--deps/v8/test/cctest/wasm/test-run-wasm-module.cc65
-rw-r--r--deps/v8/test/cctest/wasm/test-run-wasm-relocation.cc1
-rw-r--r--deps/v8/test/cctest/wasm/test-run-wasm-simd.cc486
-rw-r--r--deps/v8/test/cctest/wasm/test-run-wasm.cc116
-rw-r--r--deps/v8/test/cctest/wasm/test-wasm-breakpoints.cc150
-rw-r--r--deps/v8/test/cctest/wasm/test-wasm-interpreter-entry.cc2
-rw-r--r--deps/v8/test/cctest/wasm/test-wasm-stack.cc2
-rw-r--r--deps/v8/test/cctest/wasm/test-wasm-trap-position.cc2
-rw-r--r--deps/v8/test/cctest/wasm/wasm-run-utils.h77
-rw-r--r--deps/v8/test/common/wasm/wasm-macro-gen.h587
-rw-r--r--deps/v8/test/common/wasm/wasm-module-runner.cc14
-rw-r--r--deps/v8/test/common/wasm/wasm-module-runner.h2
-rw-r--r--deps/v8/test/debugger/debug/debug-compile-optimized.js2
-rw-r--r--deps/v8/test/debugger/debug/debug-evaluate-nested-let.js2
-rw-r--r--deps/v8/test/debugger/debug/debug-optimize.js2
-rw-r--r--deps/v8/test/debugger/debug/debug-scopes.js4
-rw-r--r--deps/v8/test/debugger/debug/debug-stepin-accessor.js3
-rw-r--r--deps/v8/test/debugger/debug/debug-stepin-property-function-call.js2
-rw-r--r--deps/v8/test/debugger/debug/es6/debug-blockscopes.js2
-rw-r--r--deps/v8/test/debugger/debug/harmony/modules-debug-scopes1.js4
-rw-r--r--deps/v8/test/debugger/debug/regress/regress-crbug-465298.js2
-rw-r--r--deps/v8/test/debugger/debug/regress/regress-crbug-517592.js2
-rw-r--r--deps/v8/test/debugger/debug/regress/regress-crbug-633999.js2
-rw-r--r--deps/v8/test/debugger/debugger.status13
-rw-r--r--deps/v8/test/default.gyp1
-rw-r--r--deps/v8/test/default.isolate2
-rw-r--r--deps/v8/test/fuzzer/fuzzer.gyp34
-rw-r--r--deps/v8/test/fuzzer/parser.cc48
-rw-r--r--deps/v8/test/fuzzer/testcfg.py3
-rw-r--r--deps/v8/test/fuzzer/wasm-call.cc249
-rw-r--r--deps/v8/test/fuzzer/wasm-code.cc174
-rw-r--r--deps/v8/test/fuzzer/wasm-compile.cc180
-rw-r--r--deps/v8/test/fuzzer/wasm-data-section.cc6
-rw-r--r--deps/v8/test/fuzzer/wasm-function-sigs-section.cc7
-rw-r--r--deps/v8/test/fuzzer/wasm-fuzzer-common.cc194
-rw-r--r--deps/v8/test/fuzzer/wasm-fuzzer-common.h40
-rw-r--r--deps/v8/test/fuzzer/wasm-globals-section.cc6
-rw-r--r--deps/v8/test/fuzzer/wasm-imports-section.cc6
-rw-r--r--deps/v8/test/fuzzer/wasm-memory-section.cc6
-rw-r--r--deps/v8/test/fuzzer/wasm-names-section.cc6
-rw-r--r--deps/v8/test/fuzzer/wasm-section-fuzzers.cc63
-rw-r--r--deps/v8/test/fuzzer/wasm-section-fuzzers.h16
-rw-r--r--deps/v8/test/fuzzer/wasm-types-section.cc6
-rw-r--r--deps/v8/test/fuzzer/wasm.tar.gz.sha11
-rw-r--r--deps/v8/test/fuzzer/wasm/foo0
-rw-r--r--deps/v8/test/fuzzer/wasm_asmjs.tar.gz.sha11
-rw-r--r--deps/v8/test/fuzzer/wasm_asmjs/foo0
-rw-r--r--deps/v8/test/fuzzer/wasm_asmjs_corpus.tar.gz.sha11
-rw-r--r--deps/v8/test/fuzzer/wasm_corpus.tar.gz.sha11
-rw-r--r--deps/v8/test/inspector/BUILD.gn4
-rw-r--r--deps/v8/test/inspector/console/destroy-context-during-log-expected.txt1
-rw-r--r--deps/v8/test/inspector/console/destroy-context-during-log.js10
-rw-r--r--deps/v8/test/inspector/console/let-const-with-api-expected.txt3
-rw-r--r--deps/v8/test/inspector/console/let-const-with-api.js2
-rw-r--r--deps/v8/test/inspector/cpu-profiler/console-profile-end-parameterless-crash-expected.txt2
-rw-r--r--deps/v8/test/inspector/cpu-profiler/console-profile-end-parameterless-crash.js4
-rw-r--r--deps/v8/test/inspector/cpu-profiler/console-profile-expected.txt2
-rw-r--r--deps/v8/test/inspector/cpu-profiler/console-profile.js4
-rw-r--r--deps/v8/test/inspector/cpu-profiler/coverage.js4
-rw-r--r--deps/v8/test/inspector/cpu-profiler/enable-disable-expected.txt2
-rw-r--r--deps/v8/test/inspector/cpu-profiler/enable-disable.js28
-rw-r--r--deps/v8/test/inspector/cpu-profiler/record-cpu-profile-expected.txt2
-rw-r--r--deps/v8/test/inspector/cpu-profiler/record-cpu-profile.js28
-rw-r--r--deps/v8/test/inspector/cpu-profiler/stop-without-preceeding-start-expected.txt2
-rw-r--r--deps/v8/test/inspector/cpu-profiler/stop-without-preceeding-start.js18
-rw-r--r--deps/v8/test/inspector/debugger/access-obsolete-frame-expected.txt3
-rw-r--r--deps/v8/test/inspector/debugger/access-obsolete-frame.js4
-rw-r--r--deps/v8/test/inspector/debugger/asm-js-breakpoint-before-exec.js4
-rw-r--r--deps/v8/test/inspector/debugger/asm-js-breakpoint-during-exec.js4
-rw-r--r--deps/v8/test/inspector/debugger/asm-js-stack-expected.txt1
-rw-r--r--deps/v8/test/inspector/debugger/asm-js-stack.js4
-rw-r--r--deps/v8/test/inspector/debugger/async-console-count-doesnt-crash.js4
-rw-r--r--deps/v8/test/inspector/debugger/async-for-await-of-promise-stack-expected.txt53
-rw-r--r--deps/v8/test/inspector/debugger/async-for-await-of-promise-stack.js22
-rw-r--r--deps/v8/test/inspector/debugger/async-instrumentation-expected.txt4
-rw-r--r--deps/v8/test/inspector/debugger/async-instrumentation.js10
-rw-r--r--deps/v8/test/inspector/debugger/async-promise-late-then-expected.txt6
-rw-r--r--deps/v8/test/inspector/debugger/async-promise-late-then.js10
-rw-r--r--deps/v8/test/inspector/debugger/async-set-timeout.js10
-rw-r--r--deps/v8/test/inspector/debugger/async-stack-await-expected.txt15
-rw-r--r--deps/v8/test/inspector/debugger/async-stack-await.js10
-rw-r--r--deps/v8/test/inspector/debugger/async-stack-created-frame-expected.txt57
-rw-r--r--deps/v8/test/inspector/debugger/async-stack-created-frame.js11
-rw-r--r--deps/v8/test/inspector/debugger/async-stack-for-promise-expected.txt129
-rw-r--r--deps/v8/test/inspector/debugger/async-stack-for-promise.js10
-rw-r--r--deps/v8/test/inspector/debugger/async-stacks-limit-expected.txt140
-rw-r--r--deps/v8/test/inspector/debugger/async-stacks-limit.js164
-rw-r--r--deps/v8/test/inspector/debugger/break-on-exception-expected.txt2
-rw-r--r--deps/v8/test/inspector/debugger/break-on-exception.js4
-rw-r--r--deps/v8/test/inspector/debugger/call-frame-function-location-expected.txt1
-rw-r--r--deps/v8/test/inspector/debugger/call-frame-function-location.js4
-rw-r--r--deps/v8/test/inspector/debugger/caught-exception-from-framework-inside-async.js8
-rw-r--r--deps/v8/test/inspector/debugger/caught-uncaught-exceptions.js4
-rw-r--r--deps/v8/test/inspector/debugger/collect-obsolete-async-tasks-expected.txt37
-rw-r--r--deps/v8/test/inspector/debugger/collect-obsolete-async-tasks.js35
-rw-r--r--deps/v8/test/inspector/debugger/collect-old-async-call-chains-expected.txt211
-rw-r--r--deps/v8/test/inspector/debugger/collect-old-async-call-chains.js171
-rw-r--r--deps/v8/test/inspector/debugger/command-line-api-with-bound-function-expected.txt2
-rw-r--r--deps/v8/test/inspector/debugger/command-line-api-with-bound-function.js4
-rw-r--r--deps/v8/test/inspector/debugger/continue-to-location-expected.txt2
-rw-r--r--deps/v8/test/inspector/debugger/continue-to-location-target-call-frames-expected.txt81
-rw-r--r--deps/v8/test/inspector/debugger/continue-to-location-target-call-frames.js139
-rw-r--r--deps/v8/test/inspector/debugger/continue-to-location.js4
-rw-r--r--deps/v8/test/inspector/debugger/destory-in-break-program-expected.txt1
-rw-r--r--deps/v8/test/inspector/debugger/destory-in-break-program.js13
-rw-r--r--deps/v8/test/inspector/debugger/doesnt-step-into-injected-script.js6
-rw-r--r--deps/v8/test/inspector/debugger/es6-module-script-parsed.js12
-rw-r--r--deps/v8/test/inspector/debugger/es6-module-set-script-source.js8
-rw-r--r--deps/v8/test/inspector/debugger/eval-scopes-expected.txt3
-rw-r--r--deps/v8/test/inspector/debugger/eval-scopes.js4
-rw-r--r--deps/v8/test/inspector/debugger/framework-break-expected.txt4
-rw-r--r--deps/v8/test/inspector/debugger/framework-break.js18
-rw-r--r--deps/v8/test/inspector/debugger/framework-nested-scheduled-break-expected.txt18
-rw-r--r--deps/v8/test/inspector/debugger/framework-nested-scheduled-break.js20
-rw-r--r--deps/v8/test/inspector/debugger/framework-precise-ranges.js10
-rw-r--r--deps/v8/test/inspector/debugger/framework-stepping-expected.txt6
-rw-r--r--deps/v8/test/inspector/debugger/framework-stepping.js18
-rw-r--r--deps/v8/test/inspector/debugger/get-possible-breakpoints-array-literal-expected.txt1
-rw-r--r--deps/v8/test/inspector/debugger/get-possible-breakpoints-array-literal.js4
-rw-r--r--deps/v8/test/inspector/debugger/get-possible-breakpoints-lazy-error-expected.txt26
-rw-r--r--deps/v8/test/inspector/debugger/get-possible-breakpoints-lazy-error.js28
-rw-r--r--deps/v8/test/inspector/debugger/get-possible-breakpoints-master-expected.txt12
-rw-r--r--deps/v8/test/inspector/debugger/get-possible-breakpoints-master.js4
-rw-r--r--deps/v8/test/inspector/debugger/get-possible-breakpoints-restrict-to-function.js8
-rw-r--r--deps/v8/test/inspector/debugger/get-possible-breakpoints.js4
-rw-r--r--deps/v8/test/inspector/debugger/inspector-break-api-expected.txt2
-rw-r--r--deps/v8/test/inspector/debugger/inspector-break-api.js18
-rw-r--r--deps/v8/test/inspector/debugger/max-async-call-chain-depth-expected.txt91
-rw-r--r--deps/v8/test/inspector/debugger/max-async-call-chain-depth.js162
-rw-r--r--deps/v8/test/inspector/debugger/object-preview-internal-properties.js2
-rw-r--r--deps/v8/test/inspector/debugger/pause-expected.txt3
-rw-r--r--deps/v8/test/inspector/debugger/pause-on-oom.js4
-rw-r--r--deps/v8/test/inspector/debugger/pause.js128
-rw-r--r--deps/v8/test/inspector/debugger/promise-chain-when-limit-hit-expected.txt235
-rw-r--r--deps/v8/test/inspector/debugger/promise-chain-when-limit-hit.js54
-rw-r--r--deps/v8/test/inspector/debugger/protocol-string-to-double-locale-expected.txt8
-rw-r--r--deps/v8/test/inspector/debugger/protocol-string-to-double-locale.js24
-rw-r--r--deps/v8/test/inspector/debugger/restore-breakpoint.js2
-rw-r--r--deps/v8/test/inspector/debugger/return-break-locations.js4
-rw-r--r--deps/v8/test/inspector/debugger/schedule-step-into-async-set-timeout.js8
-rw-r--r--deps/v8/test/inspector/debugger/schedule-step-into-async.js10
-rw-r--r--deps/v8/test/inspector/debugger/scope-skip-variables-with-empty-name-expected.txt3
-rw-r--r--deps/v8/test/inspector/debugger/scope-skip-variables-with-empty-name.js4
-rw-r--r--deps/v8/test/inspector/debugger/script-end-location.js4
-rw-r--r--deps/v8/test/inspector/debugger/script-on-after-compile.js2
-rw-r--r--deps/v8/test/inspector/debugger/script-parsed-for-runtime-evaluate.js6
-rw-r--r--deps/v8/test/inspector/debugger/script-parsed-hash-expected.txt3
-rw-r--r--deps/v8/test/inspector/debugger/script-parsed-hash.js2
-rw-r--r--deps/v8/test/inspector/debugger/script-with-negative-offset-expected.txt19
-rw-r--r--deps/v8/test/inspector/debugger/script-with-negative-offset.js31
-rw-r--r--deps/v8/test/inspector/debugger/set-async-call-stack-depth-expected.txt37
-rw-r--r--deps/v8/test/inspector/debugger/set-async-call-stack-depth.js79
-rw-r--r--deps/v8/test/inspector/debugger/set-blackbox-patterns-expected.txt1
-rw-r--r--deps/v8/test/inspector/debugger/set-blackbox-patterns.js10
-rw-r--r--deps/v8/test/inspector/debugger/set-breakpoint-before-enabling-expected.txt1
-rw-r--r--deps/v8/test/inspector/debugger/set-breakpoint-before-enabling.js2
-rw-r--r--deps/v8/test/inspector/debugger/set-script-source-exception.js4
-rw-r--r--deps/v8/test/inspector/debugger/set-script-source-expected.txt2
-rw-r--r--deps/v8/test/inspector/debugger/set-script-source.js4
-rw-r--r--deps/v8/test/inspector/debugger/side-effect-free-debug-evaluate-expected.txt1
-rw-r--r--deps/v8/test/inspector/debugger/side-effect-free-debug-evaluate.js3
-rw-r--r--deps/v8/test/inspector/debugger/step-into-expected.txt45
-rw-r--r--deps/v8/test/inspector/debugger/step-into-nested-arrow.js8
-rw-r--r--deps/v8/test/inspector/debugger/step-into-next-script.js16
-rw-r--r--deps/v8/test/inspector/debugger/step-into.js8
-rw-r--r--deps/v8/test/inspector/debugger/step-out-async-await.js8
-rw-r--r--deps/v8/test/inspector/debugger/step-over-another-context-group.js40
-rw-r--r--deps/v8/test/inspector/debugger/step-over-caught-exception-expected.txt3
-rw-r--r--deps/v8/test/inspector/debugger/step-over-caught-exception.js4
-rw-r--r--deps/v8/test/inspector/debugger/step-snapshot-expected.txt35
-rw-r--r--deps/v8/test/inspector/debugger/step-snapshot.js31
-rw-r--r--deps/v8/test/inspector/debugger/stepping-after-get-possible-breakpoints-expected.txt1
-rw-r--r--deps/v8/test/inspector/debugger/stepping-after-get-possible-breakpoints.js4
-rw-r--r--deps/v8/test/inspector/debugger/stepping-and-break-program-api-expected.txt6
-rw-r--r--deps/v8/test/inspector/debugger/stepping-and-break-program-api.js10
-rw-r--r--deps/v8/test/inspector/debugger/stepping-ignores-injected-script-expected.txt1
-rw-r--r--deps/v8/test/inspector/debugger/stepping-ignores-injected-script.js6
-rw-r--r--deps/v8/test/inspector/debugger/stepping-tail-call.js8
-rw-r--r--deps/v8/test/inspector/debugger/stepping-with-blackboxed-ranges-expected.txt2
-rw-r--r--deps/v8/test/inspector/debugger/stepping-with-blackboxed-ranges.js8
-rw-r--r--deps/v8/test/inspector/debugger/stepping-with-exposed-injected-script-expected.txt1
-rw-r--r--deps/v8/test/inspector/debugger/stepping-with-exposed-injected-script.js6
-rw-r--r--deps/v8/test/inspector/debugger/stepping-with-natives-and-frameworks.js8
-rw-r--r--deps/v8/test/inspector/debugger/suspended-generator-scopes-expected.txt2
-rw-r--r--deps/v8/test/inspector/debugger/suspended-generator-scopes.js4
-rw-r--r--deps/v8/test/inspector/debugger/update-call-frame-scopes-expected.txt2
-rw-r--r--deps/v8/test/inspector/debugger/update-call-frame-scopes.js4
-rw-r--r--deps/v8/test/inspector/debugger/wasm-get-breakable-locations-expected.txt1
-rw-r--r--deps/v8/test/inspector/debugger/wasm-get-breakable-locations.js2
-rw-r--r--deps/v8/test/inspector/debugger/wasm-imports-expected.txt1
-rw-r--r--deps/v8/test/inspector/debugger/wasm-imports.js8
-rw-r--r--deps/v8/test/inspector/debugger/wasm-scripts-expected.txt1
-rw-r--r--deps/v8/test/inspector/debugger/wasm-scripts.js7
-rw-r--r--deps/v8/test/inspector/debugger/wasm-source-expected.txt1
-rw-r--r--deps/v8/test/inspector/debugger/wasm-source.js6
-rw-r--r--deps/v8/test/inspector/debugger/wasm-stack-expected.txt1
-rw-r--r--deps/v8/test/inspector/debugger/wasm-stack.js4
-rw-r--r--deps/v8/test/inspector/debugger/wasm-stepping-expected.txt295
-rw-r--r--deps/v8/test/inspector/debugger/wasm-stepping.js49
-rw-r--r--deps/v8/test/inspector/heap-profiler/take-heap-snapshot-on-pause.js6
-rw-r--r--deps/v8/test/inspector/inspector-impl.cc341
-rw-r--r--deps/v8/test/inspector/inspector-impl.h92
-rw-r--r--deps/v8/test/inspector/inspector-test.cc814
-rw-r--r--deps/v8/test/inspector/inspector.gyp10
-rw-r--r--deps/v8/test/inspector/inspector.status6
-rw-r--r--deps/v8/test/inspector/isolate-data.cc95
-rw-r--r--deps/v8/test/inspector/isolate-data.h67
-rw-r--r--deps/v8/test/inspector/json-parse-expected.txt1
-rw-r--r--deps/v8/test/inspector/json-parse.js6
-rw-r--r--deps/v8/test/inspector/protocol-test.js485
-rw-r--r--deps/v8/test/inspector/runtime/await-promise.js4
-rw-r--r--deps/v8/test/inspector/runtime/call-function-on-async-expected.txt6
-rw-r--r--deps/v8/test/inspector/runtime/call-function-on-async.js2
-rw-r--r--deps/v8/test/inspector/runtime/clear-of-command-line-api-expected.txt2
-rw-r--r--deps/v8/test/inspector/runtime/clear-of-command-line-api.js4
-rw-r--r--deps/v8/test/inspector/runtime/client-console-api-message-expected.txt8
-rw-r--r--deps/v8/test/inspector/runtime/client-console-api-message.js28
-rw-r--r--deps/v8/test/inspector/runtime/command-line-api.js8
-rw-r--r--deps/v8/test/inspector/runtime/compile-script-expected.txt3
-rw-r--r--deps/v8/test/inspector/runtime/compile-script.js2
-rw-r--r--deps/v8/test/inspector/runtime/console-api-repeated-in-console-expected.txt1
-rw-r--r--deps/v8/test/inspector/runtime/console-api-repeated-in-console.js2
-rw-r--r--deps/v8/test/inspector/runtime/console-assert.js4
-rw-r--r--deps/v8/test/inspector/runtime/console-deprecated-methods-expected.txt1
-rw-r--r--deps/v8/test/inspector/runtime/console-deprecated-methods.js2
-rw-r--r--deps/v8/test/inspector/runtime/console-line-and-column-expected.txt3
-rw-r--r--deps/v8/test/inspector/runtime/console-line-and-column.js2
-rw-r--r--deps/v8/test/inspector/runtime/console-log-doesnt-run-microtasks-expected.txt1
-rw-r--r--deps/v8/test/inspector/runtime/console-log-doesnt-run-microtasks.js4
-rw-r--r--deps/v8/test/inspector/runtime/console-memory.js2
-rw-r--r--deps/v8/test/inspector/runtime/console-messages-limits.js4
-rw-r--r--deps/v8/test/inspector/runtime/console-methods.js4
-rw-r--r--deps/v8/test/inspector/runtime/console-spec-expected.txt30
-rw-r--r--deps/v8/test/inspector/runtime/console-spec.js60
-rw-r--r--deps/v8/test/inspector/runtime/console-time-end-format.js2
-rw-r--r--deps/v8/test/inspector/runtime/console-timestamp-expected.txt2
-rw-r--r--deps/v8/test/inspector/runtime/console-timestamp.js2
-rw-r--r--deps/v8/test/inspector/runtime/create-context.js57
-rw-r--r--deps/v8/test/inspector/runtime/es6-module-expected.txt4
-rw-r--r--deps/v8/test/inspector/runtime/es6-module.js16
-rw-r--r--deps/v8/test/inspector/runtime/evaluate-async-expected.txt4
-rw-r--r--deps/v8/test/inspector/runtime/evaluate-async-with-wrap-error.js4
-rw-r--r--deps/v8/test/inspector/runtime/evaluate-async.js4
-rw-r--r--deps/v8/test/inspector/runtime/evaluate-empty-stack.js4
-rw-r--r--deps/v8/test/inspector/runtime/evaluate-with-context-id-equal-zero-expected.txt1
-rw-r--r--deps/v8/test/inspector/runtime/evaluate-with-context-id-equal-zero.js2
-rw-r--r--deps/v8/test/inspector/runtime/evaluate-with-generate-preview.js8
-rw-r--r--deps/v8/test/inspector/runtime/exception-thrown-expected.txt4
-rw-r--r--deps/v8/test/inspector/runtime/exception-thrown.js4
-rw-r--r--deps/v8/test/inspector/runtime/get-properties-on-proxy-expected.txt2
-rw-r--r--deps/v8/test/inspector/runtime/get-properties-on-proxy.js4
-rw-r--r--deps/v8/test/inspector/runtime/get-properties-preview-expected.txt2
-rw-r--r--deps/v8/test/inspector/runtime/get-properties-preview.js4
-rw-r--r--deps/v8/test/inspector/runtime/get-properties.js2
-rw-r--r--deps/v8/test/inspector/runtime/internal-properties-entries.js2
-rw-r--r--deps/v8/test/inspector/runtime/internal-properties.js4
-rw-r--r--deps/v8/test/inspector/runtime/length-or-size-description.js4
-rw-r--r--deps/v8/test/inspector/runtime/property-on-console-proto-expected.txt1
-rw-r--r--deps/v8/test/inspector/runtime/property-on-console-proto.js4
-rw-r--r--deps/v8/test/inspector/runtime/protocol-works-with-different-locale-expected.txt1
-rw-r--r--deps/v8/test/inspector/runtime/protocol-works-with-different-locale.js2
-rw-r--r--deps/v8/test/inspector/runtime/run-script-async-expected.txt6
-rw-r--r--deps/v8/test/inspector/runtime/run-script-async.js2
-rw-r--r--deps/v8/test/inspector/runtime/runtime-evaluate-with-dirty-context.js4
-rw-r--r--deps/v8/test/inspector/runtime/runtime-restore.js12
-rw-r--r--deps/v8/test/inspector/runtime/set-or-map-entries.js6
-rw-r--r--deps/v8/test/inspector/task-runner.cc175
-rw-r--r--deps/v8/test/inspector/task-runner.h89
-rw-r--r--deps/v8/test/inspector/testcfg.py3
-rw-r--r--deps/v8/test/intl/date-format/date-format-to-parts.js2
-rw-r--r--deps/v8/test/intl/general/case-mapping.js2
-rw-r--r--deps/v8/test/js-perf-test/BytecodeHandlers/compare.js157
-rw-r--r--deps/v8/test/js-perf-test/BytecodeHandlers/run.js29
-rw-r--r--deps/v8/test/js-perf-test/ForLoops/for_loop.js42
-rw-r--r--deps/v8/test/js-perf-test/ForLoops/run.js25
-rw-r--r--deps/v8/test/js-perf-test/JSTests.json86
-rw-r--r--deps/v8/test/js-perf-test/Modules/basic-export.js7
-rw-r--r--deps/v8/test/js-perf-test/Modules/basic-import.js8
-rw-r--r--deps/v8/test/js-perf-test/Modules/basic-namespace.js8
-rw-r--r--deps/v8/test/js-perf-test/Modules/run.js63
-rw-r--r--deps/v8/test/js-perf-test/Modules/value.js6
-rw-r--r--deps/v8/test/js-perf-test/PropertyQueries/property-queries.js3
-rw-r--r--deps/v8/test/js-perf-test/RestParameters/rest.js66
-rw-r--r--deps/v8/test/js-perf-test/SixSpeed.json126
-rw-r--r--deps/v8/test/js-perf-test/SixSpeed/classes/babel.js51
-rw-r--r--deps/v8/test/js-perf-test/SixSpeed/classes/es5.js20
-rw-r--r--deps/v8/test/js-perf-test/SixSpeed/classes/es6.js21
-rw-r--r--deps/v8/test/js-perf-test/SixSpeed/map_set_add/es5.js21
-rw-r--r--deps/v8/test/js-perf-test/SixSpeed/map_set_add/es6.js22
-rw-r--r--deps/v8/test/js-perf-test/SixSpeed/map_set_lookup/es5.js32
-rw-r--r--deps/v8/test/js-perf-test/SixSpeed/map_set_lookup/es6.js30
-rw-r--r--deps/v8/test/js-perf-test/SixSpeed/map_set_object/es5.js24
-rw-r--r--deps/v8/test/js-perf-test/SixSpeed/map_set_object/es6.js22
-rw-r--r--deps/v8/test/js-perf-test/SixSpeed/map_string/es5.js26
-rw-r--r--deps/v8/test/js-perf-test/SixSpeed/map_string/es6.js26
-rw-r--r--deps/v8/test/js-perf-test/SixSpeed/super/babel.js135
-rw-r--r--deps/v8/test/js-perf-test/SixSpeed/super/es5.js34
-rw-r--r--deps/v8/test/js-perf-test/SixSpeed/super/es6.js34
-rw-r--r--deps/v8/test/message/arrow-invalid-rest-2.out6
-rw-r--r--deps/v8/test/message/arrow-invalid-rest.out6
-rw-r--r--deps/v8/test/message/asm-assignment-undeclared.js2
-rw-r--r--deps/v8/test/message/asm-function-mismatch-def.js2
-rw-r--r--deps/v8/test/message/asm-function-mismatch-use.js2
-rw-r--r--deps/v8/test/message/asm-function-redefined.js2
-rw-r--r--deps/v8/test/message/asm-function-undefined.js2
-rw-r--r--deps/v8/test/message/asm-function-variable-collision.js2
-rw-r--r--deps/v8/test/message/asm-import-wrong-annotation.js11
-rw-r--r--deps/v8/test/message/asm-import-wrong-annotation.out5
-rw-r--r--deps/v8/test/message/asm-import-wrong-object.js11
-rw-r--r--deps/v8/test/message/asm-import-wrong-object.out5
-rw-r--r--deps/v8/test/message/asm-linking-bogus-heap.js15
-rw-r--r--deps/v8/test/message/asm-linking-bogus-heap.out5
-rw-r--r--deps/v8/test/message/asm-linking-bogus-stdlib.js15
-rw-r--r--deps/v8/test/message/asm-linking-bogus-stdlib.out5
-rw-r--r--deps/v8/test/message/asm-linking-missing-heap.js15
-rw-r--r--deps/v8/test/message/asm-linking-missing-heap.out5
-rw-r--r--deps/v8/test/message/asm-missing-parameter-annotation.js2
-rw-r--r--deps/v8/test/message/asm-missing-return-annotation.js2
-rw-r--r--deps/v8/test/message/asm-table-mismatch-def.js2
-rw-r--r--deps/v8/test/message/asm-table-mismatch-use.js2
-rw-r--r--deps/v8/test/message/asm-table-redefined.js2
-rw-r--r--deps/v8/test/message/asm-table-undefined.js2
-rw-r--r--deps/v8/test/message/asm-table-variable-collision.js2
-rw-r--r--deps/v8/test/message/async-arrow-invalid-rest-2.js8
-rw-r--r--deps/v8/test/message/async-arrow-invalid-rest-2.out4
-rw-r--r--deps/v8/test/message/async-arrow-invalid-rest.js8
-rw-r--r--deps/v8/test/message/async-arrow-invalid-rest.out4
-rw-r--r--deps/v8/test/message/async-arrow-param-after-rest.js7
-rw-r--r--deps/v8/test/message/async-arrow-param-after-rest.out5
-rw-r--r--deps/v8/test/message/class-spread-property.js5
-rw-r--r--deps/v8/test/message/class-spread-property.out4
-rw-r--r--deps/v8/test/message/console.js25
-rw-r--r--deps/v8/test/message/console.out15
-rw-r--r--deps/v8/test/message/function-param-after-rest.js7
-rw-r--r--deps/v8/test/message/function-param-after-rest.out5
-rw-r--r--deps/v8/test/message/testcfg.py1
-rw-r--r--deps/v8/test/mjsunit/allocation-site-info.js12
-rw-r--r--deps/v8/test/mjsunit/arguments.js81
-rw-r--r--deps/v8/test/mjsunit/array-constructor-feedback.js11
-rw-r--r--deps/v8/test/mjsunit/array-feedback.js2
-rw-r--r--deps/v8/test/mjsunit/array-literal-feedback.js2
-rw-r--r--deps/v8/test/mjsunit/array-literal-transitions.js2
-rw-r--r--deps/v8/test/mjsunit/array-push5.js2
-rw-r--r--deps/v8/test/mjsunit/array-shift4.js2
-rw-r--r--deps/v8/test/mjsunit/array-slice.js35
-rw-r--r--deps/v8/test/mjsunit/array-store-and-grow.js2
-rw-r--r--deps/v8/test/mjsunit/asm/asm-memory.js55
-rw-r--r--deps/v8/test/mjsunit/asm/asm-stdlib.js46
-rw-r--r--deps/v8/test/mjsunit/asm/asm-validation.js18
-rw-r--r--deps/v8/test/mjsunit/asm/call-annotation.js179
-rw-r--r--deps/v8/test/mjsunit/asm/call-stdlib.js85
-rw-r--r--deps/v8/test/mjsunit/asm/global-imports.js74
-rw-r--r--deps/v8/test/mjsunit/asm/immutable.js48
-rw-r--r--deps/v8/test/mjsunit/asm/int32-mul.js4
-rw-r--r--deps/v8/test/mjsunit/asm/regress-718745.js13
-rw-r--r--deps/v8/test/mjsunit/asm/return-types.js123
-rw-r--r--deps/v8/test/mjsunit/basic-promise.js10
-rw-r--r--deps/v8/test/mjsunit/compiler/array-constructor.js89
-rw-r--r--deps/v8/test/mjsunit/compiler/constructor-inlining-no-harmony-restrict-constructor-return.js12
-rw-r--r--deps/v8/test/mjsunit/compiler/constructor-inlining.js128
-rw-r--r--deps/v8/test/mjsunit/compiler/deopt-inlined-from-call.js2
-rw-r--r--deps/v8/test/mjsunit/compiler/deopt-numberoroddball-binop.js2
-rw-r--r--deps/v8/test/mjsunit/compiler/deopt-string-outofbounds.js2
-rw-r--r--deps/v8/test/mjsunit/compiler/escape-analysis-16.js18
-rw-r--r--deps/v8/test/mjsunit/compiler/escape-analysis-phi-type-2.js41
-rw-r--r--deps/v8/test/mjsunit/compiler/escape-analysis-phi-type.js24
-rw-r--r--deps/v8/test/mjsunit/compiler/escape-analysis-representation.js2
-rw-r--r--deps/v8/test/mjsunit/compiler/increment-typefeedback.js2
-rw-r--r--deps/v8/test/mjsunit/compiler/inline-accessors.js2
-rw-r--r--deps/v8/test/mjsunit/compiler/inline-arguments.js2
-rw-r--r--deps/v8/test/mjsunit/compiler/inlined-array-pop-opt.js2
-rw-r--r--deps/v8/test/mjsunit/compiler/inlined-call.js2
-rw-r--r--deps/v8/test/mjsunit/compiler/instanceof.js12
-rw-r--r--deps/v8/test/mjsunit/compiler/integral32-add-sub.js2
-rw-r--r--deps/v8/test/mjsunit/compiler/manual-concurrent-recompile.js2
-rw-r--r--deps/v8/test/mjsunit/compiler/object-getprototypeof.js15
-rw-r--r--deps/v8/test/mjsunit/compiler/opt-next-call-turbo.js2
-rw-r--r--deps/v8/test/mjsunit/compiler/opt-next-call.js2
-rw-r--r--deps/v8/test/mjsunit/compiler/optimized-float32array-length.js2
-rw-r--r--deps/v8/test/mjsunit/compiler/optimized-float64array-length.js2
-rw-r--r--deps/v8/test/mjsunit/compiler/optimized-int32array-length.js2
-rw-r--r--deps/v8/test/mjsunit/compiler/optimized-uint32array-length.js2
-rw-r--r--deps/v8/test/mjsunit/compiler/reflect-getprototypeof.js15
-rw-r--r--deps/v8/test/mjsunit/compiler/regress-5320.js2
-rw-r--r--deps/v8/test/mjsunit/compiler/regress-715204.js13
-rw-r--r--deps/v8/test/mjsunit/compiler/regress-715651.js38
-rw-r--r--deps/v8/test/mjsunit/compiler/regress-compare-negate.js2
-rw-r--r--deps/v8/test/mjsunit/compiler/regress-string-to-number-add.js2
-rw-r--r--deps/v8/test/mjsunit/compiler/turbo-number-feedback.js2
-rw-r--r--deps/v8/test/mjsunit/compiler/uint8-clamped-array.js2
-rw-r--r--deps/v8/test/mjsunit/const-field-tracking.js2
-rw-r--r--deps/v8/test/mjsunit/constant-folding-2.js2
-rw-r--r--deps/v8/test/mjsunit/deopt-minus-zero.js2
-rw-r--r--deps/v8/test/mjsunit/deopt-recursive-eager-once.js2
-rw-r--r--deps/v8/test/mjsunit/deopt-recursive-lazy-once.js2
-rw-r--r--deps/v8/test/mjsunit/deopt-recursive-soft-once.js2
-rw-r--r--deps/v8/test/mjsunit/deopt-unlinked.js2
-rw-r--r--deps/v8/test/mjsunit/deopt-with-fp-regs.js2
-rw-r--r--deps/v8/test/mjsunit/deserialize-optimize-inner.js3
-rw-r--r--deps/v8/test/mjsunit/dictionary-properties.js2
-rw-r--r--deps/v8/test/mjsunit/div-mul-minus-one.js2
-rw-r--r--deps/v8/test/mjsunit/element-read-only.js47
-rw-r--r--deps/v8/test/mjsunit/elements-transition-hoisting.js2
-rw-r--r--deps/v8/test/mjsunit/ensure-growing-store-learns.js6
-rw-r--r--deps/v8/test/mjsunit/es6/array-iterator-turbo.js40
-rw-r--r--deps/v8/test/mjsunit/es6/block-let-crankshaft-sloppy.js2
-rw-r--r--deps/v8/test/mjsunit/es6/block-let-crankshaft.js2
-rw-r--r--deps/v8/test/mjsunit/es6/block-scoping-sloppy.js2
-rw-r--r--deps/v8/test/mjsunit/es6/block-scoping.js2
-rw-r--r--deps/v8/test/mjsunit/es6/destructuring-assignment.js90
-rw-r--r--deps/v8/test/mjsunit/es6/regress/regress-6322.js6
-rw-r--r--deps/v8/test/mjsunit/es6/rest-params-lazy-parsing.js2
-rw-r--r--deps/v8/test/mjsunit/es6/string-replace.js6
-rw-r--r--deps/v8/test/mjsunit/es6/string-split.js5
-rw-r--r--deps/v8/test/mjsunit/es6/typedarray-construct-by-array-like-prototype-element-added.js32
-rw-r--r--deps/v8/test/mjsunit/es6/typedarray-construct-by-array-like.js195
-rw-r--r--deps/v8/test/mjsunit/es6/typedarray-construct-offset-not-smi.js35
-rw-r--r--deps/v8/test/mjsunit/es6/typedarray-copywithin.js4
-rw-r--r--deps/v8/test/mjsunit/es6/typedarray-every.js5
-rw-r--r--deps/v8/test/mjsunit/es6/typedarray-fill.js14
-rw-r--r--deps/v8/test/mjsunit/es6/typedarray-find.js15
-rw-r--r--deps/v8/test/mjsunit/es6/typedarray-findindex.js13
-rw-r--r--deps/v8/test/mjsunit/es6/typedarray-foreach.js5
-rw-r--r--deps/v8/test/mjsunit/es6/typedarray-indexing.js20
-rw-r--r--deps/v8/test/mjsunit/es6/typedarray-iteration.js17
-rw-r--r--deps/v8/test/mjsunit/es6/typedarray-map.js49
-rw-r--r--deps/v8/test/mjsunit/es6/typedarray-reduce.js16
-rw-r--r--deps/v8/test/mjsunit/es6/typedarray-reverse.js9
-rw-r--r--deps/v8/test/mjsunit/es6/typedarray-slice.js14
-rw-r--r--deps/v8/test/mjsunit/es6/typedarray-sort.js7
-rw-r--r--deps/v8/test/mjsunit/es6/typedarray-tostring.js9
-rw-r--r--deps/v8/test/mjsunit/es6/typedarray.js25
-rw-r--r--deps/v8/test/mjsunit/es8/constructor-returning-primitive.js318
-rw-r--r--deps/v8/test/mjsunit/field-type-tracking.js2
-rw-r--r--deps/v8/test/mjsunit/fixed-context-shapes-when-recompiling.js2
-rw-r--r--deps/v8/test/mjsunit/function-arguments-duplicate.js4
-rw-r--r--deps/v8/test/mjsunit/getters-on-elements.js35
-rw-r--r--deps/v8/test/mjsunit/global-accessors.js2
-rw-r--r--deps/v8/test/mjsunit/harmony/async-generators-basic.js70
-rw-r--r--deps/v8/test/mjsunit/harmony/atomics.js39
-rw-r--r--deps/v8/test/mjsunit/harmony/do-expressions.js2
-rw-r--r--deps/v8/test/mjsunit/harmony/global-accessors-strict.js54
-rw-r--r--deps/v8/test/mjsunit/harmony/regexp-dotall.js6
-rw-r--r--deps/v8/test/mjsunit/harmony/regexp-named-captures.js14
-rw-r--r--deps/v8/test/mjsunit/harmony/regexp-property-binary.js22
-rw-r--r--deps/v8/test/mjsunit/indexed-accessors.js2
-rw-r--r--deps/v8/test/mjsunit/keyed-load-hole-to-undefined.js2
-rw-r--r--deps/v8/test/mjsunit/keyed-load-with-string-key.js2
-rw-r--r--deps/v8/test/mjsunit/keyed-load-with-symbol-key.js2
-rw-r--r--deps/v8/test/mjsunit/keyed-store-generic.js22
-rw-r--r--deps/v8/test/mjsunit/math-floor-of-div-minus-zero.js2
-rw-r--r--deps/v8/test/mjsunit/math-imul.js2
-rw-r--r--deps/v8/test/mjsunit/messages.js42
-rw-r--r--deps/v8/test/mjsunit/mjsunit.js49
-rw-r--r--deps/v8/test/mjsunit/mjsunit.status53
-rw-r--r--deps/v8/test/mjsunit/modules-turbo1.js2
-rw-r--r--deps/v8/test/mjsunit/never-optimize.js2
-rw-r--r--deps/v8/test/mjsunit/object-keys.js34
-rw-r--r--deps/v8/test/mjsunit/object-literal.js1399
-rw-r--r--deps/v8/test/mjsunit/object-seal.js2
-rw-r--r--deps/v8/test/mjsunit/osr-elements-kind.js2
-rw-r--r--deps/v8/test/mjsunit/parse-tasks.js55
-rw-r--r--deps/v8/test/mjsunit/polymorph-arrays.js2
-rw-r--r--deps/v8/test/mjsunit/proto-elements-add-during-foreach.js2
-rw-r--r--deps/v8/test/mjsunit/regexp.js5
-rw-r--r--deps/v8/test/mjsunit/regress/regress-105.js4
-rw-r--r--deps/v8/test/mjsunit/regress/regress-1119.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-115452.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-1240.js4
-rw-r--r--deps/v8/test/mjsunit/regress/regress-1493017.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-2132.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-2250.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-2315.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-2339.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-2451.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-252797.js3
-rw-r--r--deps/v8/test/mjsunit/regress/regress-2618.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-3176.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-330046.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-3408144.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-347914.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-353004.js16
-rw-r--r--deps/v8/test/mjsunit/regress/regress-3650-3.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-3709.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-385565.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-410912.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-4380.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-4665.js10
-rw-r--r--deps/v8/test/mjsunit/regress/regress-475705.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-4825.js16
-rw-r--r--deps/v8/test/mjsunit/regress/regress-5404.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-5790.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-5802.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-5902.js1
-rw-r--r--deps/v8/test/mjsunit/regress/regress-618608.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-6248.js24
-rw-r--r--deps/v8/test/mjsunit/regress/regress-6280.js22
-rw-r--r--deps/v8/test/mjsunit/regress/regress-6288.js13
-rw-r--r--deps/v8/test/mjsunit/regress/regress-6298.js16
-rw-r--r--deps/v8/test/mjsunit/regress/regress-6337.js5
-rw-r--r--deps/v8/test/mjsunit/regress/regress-641091.js15
-rw-r--r--deps/v8/test/mjsunit/regress/regress-645680.js16
-rw-r--r--deps/v8/test/mjsunit/regress/regress-707066.js25
-rw-r--r--deps/v8/test/mjsunit/regress/regress-709782.js14
-rw-r--r--deps/v8/test/mjsunit/regress/regress-711165.js9
-rw-r--r--deps/v8/test/mjsunit/regress/regress-716044.js25
-rw-r--r--deps/v8/test/mjsunit/regress/regress-718285.js46
-rw-r--r--deps/v8/test/mjsunit/regress/regress-718891.js68
-rw-r--r--deps/v8/test/mjsunit/regress/regress-719380.js7
-rw-r--r--deps/v8/test/mjsunit/regress/regress-722978.js15
-rw-r--r--deps/v8/test/mjsunit/regress/regress-725858.js11
-rw-r--r--deps/v8/test/mjsunit/regress/regress-727218.js12
-rw-r--r--deps/v8/test/mjsunit/regress/regress-conditional-position.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-157019.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-157520.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-244461.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-504787.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-506443.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-513507.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-554831.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-587068.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-594183.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-651403-global.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-707580.js10
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-711166.js22
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-712802.js12
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-714696.js10
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-714872.js8
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-714971.js19
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-714981.js32
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-715151.js15
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-715404.js11
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-715455.js25
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-715862.js17
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-716520.js21
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-716804.js13
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-716912.js23
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-718779.js21
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-719479.js24
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-721835.js31
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-723132.js16
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-723455.js18
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-736451.js13
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-736575.js14
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-738763.js25
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-740803.js19
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-747979.js32
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-748539.js22
-rw-r--r--deps/v8/test/mjsunit/regress/regress-embedded-cons-string.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-map-invalidation-2.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-param-local-type.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-r4998.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-store-uncacheable.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-v8-5697.js2
-rw-r--r--deps/v8/test/mjsunit/regress/wasm/regress-712569.js20
-rw-r--r--deps/v8/test/mjsunit/regress/wasm/regression-02256.js2
-rw-r--r--deps/v8/test/mjsunit/regress/wasm/regression-02256b.js2
-rw-r--r--deps/v8/test/mjsunit/regress/wasm/regression-647649.js5
-rw-r--r--deps/v8/test/mjsunit/regress/wasm/regression-699485.js2
-rw-r--r--deps/v8/test/mjsunit/regress/wasm/regression-710844.js23
-rw-r--r--deps/v8/test/mjsunit/regress/wasm/regression-711203.js30
-rw-r--r--deps/v8/test/mjsunit/regress/wasm/regression-715216-a.js12
-rw-r--r--deps/v8/test/mjsunit/regress/wasm/regression-715216-b.js13
-rw-r--r--deps/v8/test/mjsunit/regress/wasm/regression-717056.js16
-rw-r--r--deps/v8/test/mjsunit/regress/wasm/regression-719175.js16
-rw-r--r--deps/v8/test/mjsunit/regress/wasm/regression-722445.js16
-rw-r--r--deps/v8/test/mjsunit/regress/wasm/regression-731351.js23
-rw-r--r--deps/v8/test/mjsunit/regress/wasm/regression-734108.js16
-rw-r--r--deps/v8/test/mjsunit/regress/wasm/regression-737069.js35
-rw-r--r--deps/v8/test/mjsunit/setters-on-elements.js6
-rw-r--r--deps/v8/test/mjsunit/shared-function-tier-up-turbo.js2
-rw-r--r--deps/v8/test/mjsunit/shift-for-integer-div.js2
-rw-r--r--deps/v8/test/mjsunit/shifts.js2
-rw-r--r--deps/v8/test/mjsunit/sin-cos.js2
-rw-r--r--deps/v8/test/mjsunit/skipping-inner-functions.js37
-rw-r--r--deps/v8/test/mjsunit/smi-mul-const.js2
-rw-r--r--deps/v8/test/mjsunit/smi-mul.js2
-rw-r--r--deps/v8/test/mjsunit/stack-traces.js2
-rw-r--r--deps/v8/test/mjsunit/string-case.js5
-rw-r--r--deps/v8/test/mjsunit/strong-rooted-literals.js2
-rw-r--r--deps/v8/test/mjsunit/type-profile/regress-707223.js8
-rw-r--r--deps/v8/test/mjsunit/unary-minus-deopt.js2
-rw-r--r--deps/v8/test/mjsunit/wasm/asm-wasm-expr.js10
-rw-r--r--deps/v8/test/mjsunit/wasm/asm-wasm.js4
-rw-r--r--deps/v8/test/mjsunit/wasm/async-compile.js91
-rw-r--r--deps/v8/test/mjsunit/wasm/compilation-limits.js6
-rw-r--r--deps/v8/test/mjsunit/wasm/gc-buffer.js2
-rw-r--r--deps/v8/test/mjsunit/wasm/gc-stress.js2
-rw-r--r--deps/v8/test/mjsunit/wasm/huge-memory.js76
-rw-r--r--deps/v8/test/mjsunit/wasm/indirect-tables.js31
-rw-r--r--deps/v8/test/mjsunit/wasm/instantiate-module-basic.js2
-rw-r--r--deps/v8/test/mjsunit/wasm/instantiate-run-basic.js20
-rw-r--r--deps/v8/test/mjsunit/wasm/js-api.js2
-rw-r--r--deps/v8/test/mjsunit/wasm/wasm-api-overloading.js53
-rw-r--r--deps/v8/test/mkgrokdump/BUILD.gn27
-rw-r--r--deps/v8/test/mkgrokdump/DEPS3
-rw-r--r--deps/v8/test/mkgrokdump/README3
-rw-r--r--deps/v8/test/mkgrokdump/mkgrokdump.cc133
-rw-r--r--deps/v8/test/mkgrokdump/mkgrokdump.gyp46
-rw-r--r--deps/v8/test/mkgrokdump/mkgrokdump.isolate17
-rw-r--r--deps/v8/test/mkgrokdump/mkgrokdump.status10
-rw-r--r--deps/v8/test/mkgrokdump/testcfg.py49
-rw-r--r--deps/v8/test/mozilla/mozilla.status16
-rw-r--r--deps/v8/test/test262/local-tests/test/language/module-code/comment-single-line-html-close-comment-before-function.js16
-rw-r--r--deps/v8/test/test262/local-tests/test/language/module-code/comment-single-line-html-close-comment-newline-before-function.js15
-rw-r--r--deps/v8/test/test262/test262.status112
-rw-r--r--deps/v8/test/unittests/BUILD.gn36
-rw-r--r--deps/v8/test/unittests/asmjs/asm-scanner-unittest.cc23
-rw-r--r--deps/v8/test/unittests/asmjs/asm-types-unittest.cc (renamed from deps/v8/test/unittests/wasm/asm-types-unittest.cc)30
-rw-r--r--deps/v8/test/unittests/asmjs/switch-logic-unittest.cc (renamed from deps/v8/test/unittests/wasm/switch-logic-unittest.cc)0
-rw-r--r--deps/v8/test/unittests/base/bits-unittest.cc22
-rw-r--r--deps/v8/test/unittests/base/iterator-unittest.cc2
-rw-r--r--deps/v8/test/unittests/base/logging-unittest.cc15
-rw-r--r--deps/v8/test/unittests/base/platform/platform-unittest.cc103
-rw-r--r--deps/v8/test/unittests/char-predicates-unittest.cc5
-rw-r--r--deps/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-job-unittest.cc6
-rw-r--r--deps/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-unittest.cc6
-rw-r--r--deps/v8/test/unittests/compiler-dispatcher/optimizing-compile-dispatcher-unittest.cc2
-rw-r--r--deps/v8/test/unittests/compiler/bytecode-analysis-unittest.cc42
-rw-r--r--deps/v8/test/unittests/compiler/int64-lowering-unittest.cc6
-rw-r--r--deps/v8/test/unittests/compiler/js-intrinsic-lowering-unittest.cc17
-rw-r--r--deps/v8/test/unittests/compiler/mips/OWNERS7
-rw-r--r--deps/v8/test/unittests/compiler/mips64/OWNERS7
-rw-r--r--deps/v8/test/unittests/compiler/node-test-utils.cc20
-rw-r--r--deps/v8/test/unittests/compiler/node-test-utils.h2
-rw-r--r--deps/v8/test/unittests/heap/concurrent-marking-deque-unittest.cc57
-rw-r--r--deps/v8/test/unittests/heap/item-parallel-job-unittest.cc211
-rw-r--r--deps/v8/test/unittests/heap/spaces-unittest.cc6
-rw-r--r--deps/v8/test/unittests/heap/workstealing-marking-deque-unittest.cc33
-rw-r--r--deps/v8/test/unittests/interpreter/bytecode-array-builder-unittest.cc166
-rw-r--r--deps/v8/test/unittests/interpreter/bytecode-array-writer-unittest.cc11
-rw-r--r--deps/v8/test/unittests/interpreter/bytecode-node-unittest.cc (renamed from deps/v8/test/unittests/interpreter/bytecode-pipeline-unittest.cc)40
-rw-r--r--deps/v8/test/unittests/interpreter/bytecode-register-optimizer-unittest.cc5
-rw-r--r--deps/v8/test/unittests/interpreter/bytecode-source-info-unittest.cc52
-rw-r--r--deps/v8/test/unittests/object-unittest.cc60
-rw-r--r--deps/v8/test/unittests/parser/preparser-unittest.cc41
-rw-r--r--deps/v8/test/unittests/test-helpers.cc (renamed from deps/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-helper.cc)2
-rw-r--r--deps/v8/test/unittests/test-helpers.h (renamed from deps/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-helper.h)6
-rw-r--r--deps/v8/test/unittests/unittests.gyp42
-rw-r--r--deps/v8/test/unittests/value-serializer-unittest.cc71
-rw-r--r--deps/v8/test/unittests/wasm/control-transfer-unittest.cc213
-rw-r--r--deps/v8/test/unittests/wasm/decoder-unittest.cc2
-rw-r--r--deps/v8/test/unittests/wasm/function-body-decoder-unittest.cc21
-rw-r--r--deps/v8/test/unittests/wasm/loop-assignment-analysis-unittest.cc10
-rw-r--r--deps/v8/test/unittests/wasm/module-decoder-unittest.cc70
-rw-r--r--deps/v8/test/unittests/wasm/streaming-decoder-unittest.cc498
-rw-r--r--deps/v8/test/unittests/wasm/wasm-macro-gen-unittest.cc2
-rw-r--r--deps/v8/test/wasm-spec-tests/OWNERS4
-rw-r--r--deps/v8/test/wasm-spec-tests/testcfg.py35
-rw-r--r--deps/v8/test/wasm-spec-tests/tests.tar.gz.sha11
-rw-r--r--deps/v8/test/wasm-spec-tests/wasm-spec-tests.gyp26
-rw-r--r--deps/v8/test/wasm-spec-tests/wasm-spec-tests.isolate15
-rw-r--r--deps/v8/test/wasm-spec-tests/wasm-spec-tests.status37
-rw-r--r--deps/v8/test/webkit/webkit.status6
795 files changed, 24339 insertions, 12038 deletions
diff --git a/deps/v8/test/BUILD.gn b/deps/v8/test/BUILD.gn
index 519c1d3a0e..936a6f6afc 100644
--- a/deps/v8/test/BUILD.gn
+++ b/deps/v8/test/BUILD.gn
@@ -11,6 +11,7 @@ group("gn_all") {
deps = [
":default_tests",
"inspector:inspector-test",
+ "mkgrokdump:mkgrokdump",
]
if (host_os != "mac" || !is_android) {
@@ -48,8 +49,10 @@ group("default_tests") {
":intl_run",
":message_run",
":mjsunit_run",
+ ":mkgrokdump_run",
":preparser_run",
":unittests_run",
+ ":wasm_spec_tests_run",
]
}
}
@@ -164,6 +167,14 @@ v8_isolate_run("mjsunit") {
isolate = "mjsunit/mjsunit.isolate"
}
+v8_isolate_run("mkgrokdump") {
+ deps = [
+ "mkgrokdump:mkgrokdump",
+ ]
+
+ isolate = "mkgrokdump/mkgrokdump.isolate"
+}
+
v8_isolate_run("mozilla") {
deps = [
"..:d8_run",
@@ -188,6 +199,14 @@ v8_isolate_run("unittests") {
isolate = "unittests/unittests.isolate"
}
+v8_isolate_run("wasm_spec_tests") {
+ deps = [
+ "..:d8_run",
+ ]
+
+ isolate = "wasm-spec-tests/wasm-spec-tests.isolate"
+}
+
v8_isolate_run("webkit") {
deps = [
"..:d8_run",
diff --git a/deps/v8/test/benchmarks/testcfg.py b/deps/v8/test/benchmarks/testcfg.py
index f96071b1b0..cdbb0adc8f 100644
--- a/deps/v8/test/benchmarks/testcfg.py
+++ b/deps/v8/test/benchmarks/testcfg.py
@@ -35,7 +35,7 @@ from testrunner.objects import testcase
class BenchmarksVariantGenerator(testsuite.VariantGenerator):
- # Both --nocrankshaft and --stressopt are very slow. Add TF but without
+ # Both --noopt and --stressopt are very slow. Add TF but without
# always opt to match the way the benchmarks are run for performance
# testing.
def FilterVariantsByTest(self, testcase):
diff --git a/deps/v8/test/bot_default.gyp b/deps/v8/test/bot_default.gyp
index 88538004d9..13c77e2d03 100644
--- a/deps/v8/test/bot_default.gyp
+++ b/deps/v8/test/bot_default.gyp
@@ -18,6 +18,7 @@
'mjsunit/mjsunit.gyp:mjsunit_run',
'preparser/preparser.gyp:preparser_run',
'unittests/unittests.gyp:unittests_run',
+ 'wasm-spec-tests/wasm-spec-tests.gyp:wasm_spec_tests_run',
'webkit/webkit.gyp:webkit_run',
],
'includes': [
diff --git a/deps/v8/test/bot_default.isolate b/deps/v8/test/bot_default.isolate
index 59420cb056..c4db291cc0 100644
--- a/deps/v8/test/bot_default.isolate
+++ b/deps/v8/test/bot_default.isolate
@@ -15,8 +15,10 @@
'intl/intl.isolate',
'message/message.isolate',
'mjsunit/mjsunit.isolate',
+ 'mkgrokdump/mkgrokdump.isolate',
'preparser/preparser.isolate',
'unittests/unittests.isolate',
+ 'wasm-spec-tests/wasm-spec-tests.isolate',
'webkit/webkit.isolate',
],
}
diff --git a/deps/v8/test/cctest/BUILD.gn b/deps/v8/test/cctest/BUILD.gn
index 4034f42949..d5365df606 100644
--- a/deps/v8/test/cctest/BUILD.gn
+++ b/deps/v8/test/cctest/BUILD.gn
@@ -12,7 +12,7 @@ v8_executable("cctest") {
### gcmole(all) ###
"../common/wasm/test-signatures.h",
- "asmjs/test-asm-typer.cc",
+ "../common/wasm/wasm-macro-gen.h",
"ast-types-fuzz.h",
"cctest.cc",
"cctest.h",
@@ -338,7 +338,7 @@ v8_executable("cctest") {
"../..:v8_libbase",
"../..:v8_libplatform",
"../..:wasm_module_runner",
- "//build/config/sanitizers:deps",
+ "//build/config:exe_and_shlib_deps",
"//build/win:default_exe_manifest",
]
@@ -437,7 +437,7 @@ v8_executable("generate-bytecode-expectations") {
"../..:v8",
"../..:v8_libbase",
"../..:v8_libplatform",
- "//build/config/sanitizers:deps",
+ "//build/config:exe_and_shlib_deps",
"//build/win:default_exe_manifest",
]
}
diff --git a/deps/v8/test/cctest/OWNERS b/deps/v8/test/cctest/OWNERS
index 06141ef626..92ab93045f 100644
--- a/deps/v8/test/cctest/OWNERS
+++ b/deps/v8/test/cctest/OWNERS
@@ -1,9 +1,6 @@
-per-file *-mips*=paul.lind@imgtec.com
-per-file *-mips*=gergely.kis@imgtec.com
-per-file *-mips*=akos.palfi@imgtec.com
-per-file *-mips*=balazs.kilvady@imgtec.com
-per-file *-mips*=dusan.milosavljevic@imgtec.com
per-file *-mips*=ivica.bogosavljevic@imgtec.com
+per-file *-mips*=Miran.Karic@imgtec.com
+per-file *-mips*=dusan.simicic@imgtec.com
per-file *-ppc*=dstence@us.ibm.com
per-file *-ppc*=joransiu@ca.ibm.com
per-file *-ppc*=jyan@ca.ibm.com
diff --git a/deps/v8/test/cctest/asmjs/OWNERS b/deps/v8/test/cctest/asmjs/OWNERS
deleted file mode 100644
index 509581c8db..0000000000
--- a/deps/v8/test/cctest/asmjs/OWNERS
+++ /dev/null
@@ -1,11 +0,0 @@
-# Keep in sync with src/asmjs/OWNERS.
-
-set noparent
-
-ahaas@chromium.org
-bradnelson@chromium.org
-clemensh@chromium.org
-jpp@chromium.org
-mtrofin@chromium.org
-rossberg@chromium.org
-titzer@chromium.org
diff --git a/deps/v8/test/cctest/asmjs/test-asm-typer.cc b/deps/v8/test/cctest/asmjs/test-asm-typer.cc
deleted file mode 100644
index a1737165b1..0000000000
--- a/deps/v8/test/cctest/asmjs/test-asm-typer.cc
+++ /dev/null
@@ -1,2089 +0,0 @@
-// Copyright 2016 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <cstring>
-#include <functional>
-#include <iostream>
-#include <memory>
-
-#include "src/asmjs/asm-typer.h"
-#include "src/asmjs/asm-types.h"
-#include "src/ast/ast-value-factory.h"
-#include "src/ast/ast.h"
-#include "src/ast/scopes.h"
-#include "src/base/platform/platform.h"
-#include "src/compiler.h"
-#include "src/objects-inl.h"
-#include "src/parsing/parse-info.h"
-#include "src/parsing/parser.h"
-#include "src/v8.h"
-#include "test/cctest/cctest.h"
-
-using namespace v8::internal;
-namespace iw = v8::internal::wasm;
-
-namespace v8 {
-namespace internal {
-namespace wasm {
-
-namespace {
-enum ValidationType {
- ValidateModule,
- ValidateGlobals,
- ValidateFunctionTables,
- ValidateExport,
- ValidateFunction,
- ValidateStatement,
- ValidateExpression,
-};
-} // namespace
-
-class AsmTyperHarnessBuilder {
- public:
- AsmTyperHarnessBuilder(const char* source, ValidationType type)
- : source_(source),
- validation_type_(type),
- handles_(),
- isolate_(CcTest::i_isolate()),
- factory_(isolate_->factory()),
- source_code_(
- factory_->NewStringFromUtf8(CStrVector(source)).ToHandleChecked()),
- script_(factory_->NewScript(source_code_)),
- info_(script_),
- ast_value_factory_(info_.zone(), isolate_->ast_string_constants(),
- isolate_->heap()->HashSeed()) {
- info_.set_allow_lazy_parsing(false);
- info_.set_toplevel(true);
- info_.set_ast_value_factory(&ast_value_factory_);
- info_.set_ast_value_factory_owned(false);
- Parser parser(&info_);
-
- if (!Compiler::ParseAndAnalyze(&info_, isolate_)) {
- std::cerr << "Failed to parse:\n" << source_ << "\n";
- CHECK(false);
- }
-
- outer_scope_ = info_.script_scope();
- module_ = info_.scope()
- ->declarations()
- ->AtForTest(0)
- ->AsFunctionDeclaration()
- ->fun();
- typer_.reset(new AsmTyper(isolate_, zone(), script_, module_));
-
- if (validation_type_ == ValidateStatement ||
- validation_type_ == ValidateExpression) {
- fun_scope_.reset(new AsmTyper::FunctionScope(typer_.get()));
-
- for (Declaration* decl : *module_->scope()->declarations()) {
- if (FunctionDeclaration* fun_decl = decl->AsFunctionDeclaration()) {
- fun_decl_ = fun_decl;
- break;
- }
- }
- CHECK_NOT_NULL(fun_decl_);
- }
- }
-
- struct VariableName {
- VariableName(const char* name, VariableMode mode)
- : name_(name), mode_(mode) {}
- VariableName(const VariableName&) = default;
- VariableName& operator=(const VariableName&) = default;
-
- const char* name_;
- const VariableMode mode_;
- };
-
- AsmTyperHarnessBuilder* WithLocal(VariableName var_name, AsmType* type) {
- CHECK(validation_type_ == ValidateStatement ||
- validation_type_ == ValidateExpression);
- auto* var = DeclareVariable(var_name);
- if (var->IsUnallocated()) {
- var->AllocateTo(VariableLocation::LOCAL, -1);
- }
- auto* var_info = new (zone()) AsmTyper::VariableInfo(type);
- var_info->set_mutability(AsmTyper::VariableInfo::kLocal);
- CHECK(typer_->AddLocal(var, var_info));
- return this;
- }
-
- AsmTyperHarnessBuilder* WithGlobal(VariableName var_name, AsmType* type) {
- auto* var = DeclareVariable(var_name);
- if (var->IsUnallocated()) {
- var->AllocateTo(VariableLocation::MODULE, -1);
- }
- if (type != nullptr) {
- auto* var_info = new (zone()) AsmTyper::VariableInfo(type);
- var_info->set_mutability(AsmTyper::VariableInfo::kMutableGlobal);
- CHECK(typer_->AddGlobal(var, var_info));
- }
- return this;
- }
-
- AsmTyperHarnessBuilder* WithGlobal(
- VariableName var_name, std::function<AsmType*(Zone*)> type_creator) {
- return WithGlobal(var_name, type_creator(zone()));
- }
-
- AsmTyperHarnessBuilder* WithUndefinedGlobal(
- VariableName var_name, std::function<AsmType*(Zone*)> type_creator) {
- auto* type = type_creator(zone());
- CHECK(type->AsFunctionType() != nullptr ||
- type->AsFunctionTableType() != nullptr);
- WithGlobal(var_name, type);
- auto* var_info = typer_->Lookup(DeclareVariable(var_name));
- CHECK(var_info);
- MessageLocation location;
- var_info->SetFirstForwardUse(location);
- return this;
- }
-
- AsmTyperHarnessBuilder* WithImport(VariableName var_name,
- AsmTyper::StandardMember standard_member) {
- auto* var = DeclareVariable(var_name);
- if (var->IsUnallocated()) {
- var->AllocateTo(VariableLocation::LOCAL, -1);
- }
- AsmTyper::VariableInfo* var_info = nullptr;
- auto* stdlib_map = &typer_->stdlib_math_types_;
- switch (standard_member) {
- case AsmTyper::kHeap:
- case AsmTyper::kStdlib:
- case AsmTyper::kModule:
- case AsmTyper::kNone:
- CHECK(false);
- case AsmTyper::kFFI:
- stdlib_map = nullptr;
- var_info =
- new (zone()) AsmTyper::VariableInfo(AsmType::FFIType(zone()));
- var_info->set_mutability(AsmTyper::VariableInfo::kImmutableGlobal);
- break;
- case AsmTyper::kInfinity:
- case AsmTyper::kNaN:
- stdlib_map = &typer_->stdlib_types_;
- default:
- break;
- }
-
- if (var_info == nullptr) {
- for (auto iter : *stdlib_map) {
- if (iter.second->standard_member() == standard_member) {
- var_info = iter.second;
- break;
- }
- }
-
- CHECK(var_info != nullptr);
- var_info = var_info->Clone(zone());
- }
-
- CHECK(typer_->AddGlobal(var, var_info));
- return this;
- }
-
- AsmTyperHarnessBuilder* WithReturnType(AsmType* type) {
- CHECK(type->IsReturnType());
- CHECK(typer_->return_type_ == AsmType::None());
- typer_->return_type_ = type;
- return this;
- }
-
- AsmTyperHarnessBuilder* WithStdlib(VariableName var_name) {
- auto* var = DeclareVariable(var_name);
- auto* var_info =
- AsmTyper::VariableInfo::ForSpecialSymbol(zone(), AsmTyper::kStdlib);
- CHECK(typer_->AddGlobal(var, var_info));
- return this;
- }
-
- AsmTyperHarnessBuilder* WithHeap(VariableName var_name) {
- auto* var = DeclareVariable(var_name);
- auto* var_info =
- AsmTyper::VariableInfo::ForSpecialSymbol(zone(), AsmTyper::kHeap);
- CHECK(typer_->AddGlobal(var, var_info));
- return this;
- }
-
- AsmTyperHarnessBuilder* WithFFI(VariableName var_name) {
- auto* var = DeclareVariable(var_name);
- auto* var_info =
- AsmTyper::VariableInfo::ForSpecialSymbol(zone(), AsmTyper::kFFI);
- CHECK(typer_->AddGlobal(var, var_info));
- return this;
- }
-
- bool Succeeds() {
- CHECK(validation_type_ == ValidateModule ||
- validation_type_ == ValidateGlobals ||
- validation_type_ == ValidateFunctionTables ||
- validation_type_ == ValidateExport ||
- validation_type_ == ValidateFunction ||
- validation_type_ == ValidateStatement);
-
- if (validation_type_ == ValidateStatement) {
- CHECK(typer_->return_type_ != AsmType::None());
- if (ValidateAllStatements(fun_decl_)) {
- return true;
- }
- } else if (typer_->Validate()) {
- return true;
- }
-
- std::unique_ptr<char[]> msg = i::MessageHandler::GetLocalizedMessage(
- isolate_, typer_->error_message());
- std::cerr << "Asm validation failed: " << msg.get() << "\n";
- return false;
- }
-
- bool SucceedsWithExactType(AsmType* type) {
- CHECK(validation_type_ == ValidateExpression);
- auto* validated_as = ValidateExpressionStatment(fun_decl_);
- if (validated_as == AsmType::None()) {
- std::unique_ptr<char[]> msg = i::MessageHandler::GetLocalizedMessage(
- isolate_, typer_->error_message());
- std::cerr << "Validation failure: " << msg.get() << "\n";
- return false;
- } else if (validated_as != type) {
- std::cerr << "Validation succeeded with wrong type "
- << validated_as->Name() << " (vs. " << type->Name() << ").\n";
- return false;
- }
-
- return true;
- }
-
- bool FailsWithMessage(const char* error_message) {
- CHECK(validation_type_ == ValidateModule ||
- validation_type_ == ValidateGlobals ||
- validation_type_ == ValidateFunctionTables ||
- validation_type_ == ValidateExport ||
- validation_type_ == ValidateFunction ||
- validation_type_ == ValidateStatement ||
- validation_type_ == ValidateExpression);
-
- bool success;
- if (validation_type_ == ValidateStatement) {
- CHECK(typer_->return_type_ != AsmType::None());
- success = ValidateAllStatements(fun_decl_);
- } else if (validation_type_ == ValidateExpression) {
- success = ValidateExpressionStatment(fun_decl_) != AsmType::None();
- } else {
- success = typer_->Validate();
- }
-
- if (success) {
- std::cerr << "Asm validation succeeded\n";
- return false;
- }
-
- std::unique_ptr<char[]> msg = i::MessageHandler::GetLocalizedMessage(
- isolate_, typer_->error_message());
- if (std::strstr(msg.get(), error_message) == nullptr) {
- std::cerr << "Asm validation failed with the wrong error message:\n"
- "Expected to contain '"
- << error_message << "'\n"
- " Actually is '"
- << msg.get() << "'\n";
- return false;
- }
-
- return true;
- }
-
- private:
- Variable* DeclareVariable(VariableName var_name) {
- auto* name_ast_string = ast_value_factory_.GetOneByteString(var_name.name_);
- ast_value_factory_.Internalize(isolate_);
- return var_name.mode_ == DYNAMIC_GLOBAL
- ? outer_scope_->DeclareDynamicGlobal(name_ast_string,
- NORMAL_VARIABLE)
- : module_->scope()->DeclareLocal(name_ast_string, VAR,
- kCreatedInitialized,
- NORMAL_VARIABLE);
- }
-
- bool ValidateAllStatements(FunctionDeclaration* fun_decl) {
- AsmTyper::FlattenedStatements iter(zone(), fun_decl->fun()->body());
- while (auto* curr = iter.Next()) {
- if (typer_->ValidateStatement(curr) == AsmType::None()) {
- return false;
- }
- }
- return true;
- }
-
- AsmType* ValidateExpressionStatment(FunctionDeclaration* fun_decl) {
- AsmTyper::FlattenedStatements iter(zone(), fun_decl->fun()->body());
- AsmType* ret = AsmType::None();
- bool last_was_expression_statement = false;
- while (auto* curr = iter.Next()) {
- if (auto* expr_stmt = curr->AsExpressionStatement()) {
- last_was_expression_statement = true;
- if ((ret = typer_->ValidateExpression(expr_stmt->expression())) ==
- AsmType::None()) {
- break;
- }
- } else {
- ret = AsmType::None();
- last_was_expression_statement = true;
- if (typer_->ValidateStatement(curr) == AsmType::None()) {
- break;
- }
- }
- }
- CHECK(last_was_expression_statement || ret == AsmType::None());
- return ret;
- }
-
- Zone* zone() { return info_.zone(); }
-
- std::string source_;
- ValidationType validation_type_;
- HandleAndZoneScope handles_;
- Isolate* isolate_;
- Factory* factory_;
- Handle<String> source_code_;
- Handle<Script> script_;
- ParseInfo info_;
- AstValueFactory ast_value_factory_;
-
- DeclarationScope* outer_scope_;
- FunctionLiteral* module_;
- FunctionDeclaration* fun_decl_;
- std::unique_ptr<AsmTyper> typer_;
- std::unique_ptr<AsmTyper::FunctionScope> fun_scope_;
-};
-
-} // namespace wasm
-} // namespace internal
-} // namespace v8
-
-namespace {
-
-struct ValidationInput {
- ValidationInput(const std::string& source, iw::ValidationType type)
- : source_(source), type_(type) {}
-
- const std::string source_;
- const iw::ValidationType type_;
-};
-
-std::unique_ptr<iw::AsmTyperHarnessBuilder> ValidationOf(
- ValidationInput input) {
- return std::unique_ptr<iw::AsmTyperHarnessBuilder>(
- new iw::AsmTyperHarnessBuilder(input.source_.c_str(), input.type_));
-}
-
-ValidationInput Module(const char* source) {
- return ValidationInput(source, iw::ValidateModule);
-}
-
-std::string WrapInFunction(const char* source, bool needs_use_asm) {
- if (needs_use_asm) {
- return std::string(
- "function foo() {\n"
- " 'use asm';\n"
- " ") +
- source +
- "\n"
- "}";
- }
-
- return std::string(
- "function bar() {\n"
- " ") +
- source +
- "\n"
- "}\n"
- "return {b: bar};\n";
-}
-
-ValidationInput Globals(const char* source) {
- static const bool kNeedsUseAsm = true;
- return ValidationInput(WrapInFunction(source, kNeedsUseAsm),
- iw::ValidateGlobals);
-}
-
-ValidationInput FunctionTables(const char* source) {
- static const bool kNeedsUseAsm = true;
- return ValidationInput(WrapInFunction(source, kNeedsUseAsm),
- iw::ValidateFunctionTables);
-}
-
-ValidationInput Export(const char* source) {
- static const bool kNeedsUseAsm = true;
- return ValidationInput(WrapInFunction(source, kNeedsUseAsm),
- iw::ValidateExport);
-}
-
-ValidationInput Function(const char* source) {
- static const bool kNeedsUseAsm = true;
- return ValidationInput(WrapInFunction(source, kNeedsUseAsm),
- iw::ValidateFunction);
-}
-
-ValidationInput Statement(const char* source) {
- static const bool kDoesNotNeedUseAsm = false;
- static const bool kNeedsUseAsm = true;
- return ValidationInput(
- WrapInFunction(WrapInFunction(source, kDoesNotNeedUseAsm).c_str(),
- kNeedsUseAsm),
- iw::ValidateStatement);
-}
-
-ValidationInput Expression(const char* source) {
- static const bool kDoesNotNeedUseAsm = false;
- static const bool kNeedsUseAsm = true;
- return ValidationInput(
- WrapInFunction(WrapInFunction(source, kDoesNotNeedUseAsm).c_str(),
- kNeedsUseAsm),
- iw::ValidateExpression);
-}
-
-iw::AsmTyperHarnessBuilder::VariableName Var(const char* name) {
- return iw::AsmTyperHarnessBuilder::VariableName(name, VAR);
-}
-
-iw::AsmTyperHarnessBuilder::VariableName DynamicGlobal(const char* name) {
- return iw::AsmTyperHarnessBuilder::VariableName(name, DYNAMIC_GLOBAL);
-}
-
-TEST(MissingUseAsmDirective) {
- v8::V8::Initialize();
-
- // We can't test the empty input ("") because the AsmTyperHarnessBuilder will
- // CHECK if there's no function in the top-level scope.
- const char* kTests[] = {"function module(){}",
- "function module(){ use_asm; }",
- "function module(){ \"use asm \"; }",
- "function module(){ \" use asm \"; }",
- "function module(){ \"use Asm\"; }"};
-
- for (size_t ii = 0; ii < arraysize(kTests); ++ii) {
- const char* module = kTests[ii];
- if (!ValidationOf(Module(module))
- ->FailsWithMessage("Missing \"use asm\"")) {
- std::cerr << "Test:\n" << module;
- CHECK(false);
- }
- }
-}
-
-TEST(InvalidModuleSignature) {
- v8::V8::Initialize();
-
- const struct {
- const char* module;
- const char* error_message;
- } kTests[] = {
- {"function eval(){ \"use asm\"; }",
- "Invalid asm.js identifier in module name"},
- {"function arguments(){ \"use asm\"; }",
- "Invalid asm.js identifier in module name"},
- {"function module(eval){ \"use asm\"; }",
- "Invalid asm.js identifier in module parameter"},
- {"function module(arguments){ \"use asm\"; }",
- "Invalid asm.js identifier in module parameter"},
- {"function module(stdlib, eval){ \"use asm\"; }",
- "Invalid asm.js identifier in module parameter"},
- {"function module(stdlib, arguments){ \"use asm\"; }",
- "Invalid asm.js identifier in module parameter"},
- {"function module(stdlib, foreign, eval){ \"use asm\"; }",
- "Invalid asm.js identifier in module parameter"},
- {"function module(stdlib, foreign, arguments){ \"use asm\"; }",
- "Invalid asm.js identifier in module parameter"},
- {"function module(stdlib, foreign, heap, eval){ \"use asm\"; }",
- "asm.js modules may not have more than three parameters"},
- {"function module(stdlib, foreign, heap, arguments){ \"use asm\"; }",
- "asm.js modules may not have more than three parameters"},
- {"function module(module){ \"use asm\"; }",
- "Redeclared identifier in module parameter"},
- {"function module(stdlib, module){ \"use asm\"; }",
- "Redeclared identifier in module parameter"},
- {"function module(stdlib, stdlib){ \"use asm\"; }",
- "Redeclared identifier in module parameter"},
- {"function module(stdlib, foreign, module){ \"use asm\"; }",
- "Redeclared identifier in module parameter"},
- {"function module(stdlib, foreign, stdlib){ \"use asm\"; }",
- "Redeclared identifier in module parameter"},
- {"function module(stdlib, foreign, foreign){ \"use asm\"; }",
- "Redeclared identifier in module parameter"},
- };
-
- for (size_t ii = 0; ii < arraysize(kTests); ++ii) {
- const auto* test = kTests + ii;
- if (!ValidationOf(Module(test->module))
- ->FailsWithMessage(test->error_message)) {
- std::cerr << "Test:\n" << test->module;
- CHECK(false);
- }
- }
-}
-
-TEST(ErrorsInGlobalVariableDefinition) {
- const struct {
- const char* decl;
- const char* error_message;
- } kTests[] = {
- {"var v;", "Global variable missing initializer"},
- {"var v = uninitialized;", "Undeclared identifier in global"},
- {"var v = 'use asm';", "type annotation - forbidden literal"},
- {"var v = 4294967296;", " - forbidden literal"},
- {"var v = not_fround;", "initialize a global must be a const"},
- {"var v = not_fround(1);", "expected call fround(literal)"},
- {"var v = __fround__(1.0);", "expected call fround(literal)"},
- {"var v = fround(1.0, 1.0);", "expected call fround(literal)"},
- {"var v = fround(not_fround);", "literal argument for call to fround"},
- {"var v = i?0:1;", "Invalid global variable initializer"},
- {"var v = stdlib.nan", "Invalid import"},
- {"var v = stdlib.Math.nan", "Invalid import"},
- {"var v = stdlib.Mathh.E", "Invalid import"},
- {"var v = stdlib.Math", "Invalid import"},
- {"var v = Stdlib.Math.E", "Invalid import"},
- {"var v = stdlib.Math.E[0]", "Invalid import"},
- {"var v = stdlibb.NaN", "Invalid import"},
- {"var v = ffi.NaN[0]", "Invalid import"},
- {"var v = heap.NaN[0]", "Invalid import"},
- {"var v = ffi.foo * 2.0;", "unrecognized annotation"},
- {"var v = ffi.foo|1;", "unrecognized annotation"},
- {"var v = ffi()|0;", "must import member"},
- {"var v = +ffi();", "must import member"},
- {"var v = ffi().a|0;", "object lookup failed"},
- {"var v = +ffi().a;", "object lookup failed"},
- {"var v = sstdlib.a|0;", "object lookup failed"},
- {"var v = +sstdlib.a;", "object lookup failed"},
- {"var v = stdlib.NaN|0;", "object is not the ffi"},
- {"var v = +stdlib.NaN;", "object is not the ffi"},
- {"var v = new f()", "Invalid type after new"},
- {"var v = new stdli.Uint8Array(heap)", "Unknown stdlib member in heap"},
- {"var v = new stdlib.dd(heap)", "Unknown stdlib member in heap"},
- {"var v = new stdlib.Math.fround(heap)", "Type is not a heap view type"},
- {"var v = new stdlib.Uint8Array(a, b)", "Invalid number of arguments"},
- {"var v = new stdlib.Uint8Array(heap())", "should be the module's heap"},
- {"var v = new stdlib.Uint8Array(heap_)", "instead of heap parameter"},
- {"var v = new stdlib.Uint8Array(ffi)", "should be the module's heap"},
- {"var eval = 0;", "in global variable"},
- {"var eval = 0.0;", "in global variable"},
- {"var eval = fround(0.0);", "in global variable"},
- {"var eval = +ffi.a;", "in global variable"},
- {"var eval = ffi.a|0;", "in global variable"},
- {"var eval = ffi.a;", "in global variable"},
- {"var eval = new stdlib.Uint8Array(heap);", "in global variable"},
- {"var arguments = 0;", "in global variable"},
- {"var arguments = 0.0;", "in global variable"},
- {"var arguments = fround(0.0);", "in global variable"},
- {"var arguments = +ffi.a;", "in global variable"},
- {"var arguments = ffi.a|0;", "in global variable"},
- {"var arguments = ffi.a;", "in global variable"},
- {"var arguments = new stdlib.Uint8Array(heap);", "in global variable"},
- {"var a = 0, a = 0.0;", "Redefined global variable"},
- {"var a = 0; var a = 0;", "Redefined global variable"},
- {"var a = 0, b = 0; var a = 0;", "Redefined global variable"},
- {"var a = 0, b = 0; var b = 0, a = 0.0;", "Redefined global variable"},
- {"var a = stdlib.Int8Array", "Heap view types can not be aliased"},
- };
-
- for (size_t ii = 0; ii < arraysize(kTests); ++ii) {
- const auto* test = kTests + ii;
- if (!ValidationOf(Globals(test->decl))
- ->WithStdlib(DynamicGlobal("stdlib"))
- ->WithFFI(DynamicGlobal("ffi"))
- ->WithHeap(DynamicGlobal("heap"))
- ->WithGlobal(DynamicGlobal("not_fround"), iw::AsmType::Int())
- ->WithImport(DynamicGlobal("fround"), iw::AsmTyper::kMathFround)
- ->FailsWithMessage(test->error_message)) {
- std::cerr << "Test:\n" << test->decl;
- CHECK(false);
- }
- }
-}
-
-TEST(ErrorsInFunctionTableDefinition) {
- const struct {
- const char* tables;
- const char* error_message;
- } kTests[] = {
- {"var a = [a, a, a];", "Invalid length for function pointer table"},
- {"var a = [d2s0()];", "must be a function name"},
- {"var a = [d2s44];", "Undefined identifier in function pointer"},
- {"var a = [fround];", "not be a member of the standard library"},
- {"var a = [imul];", "not be a member of the standard library"},
- {"var a = [ffi_import];", "must be an asm.js function"},
- {"var a = [dI];", "must be an asm.js function"},
- {"var a = [d2s0, d2s1, d2s0, f2s0];", "mismatch in function pointer"},
- {"var eval = [d2s0, d2s1];", "asm.js identifier in function table name"},
- {"var arguments = [d2s0, d2s1];", "asm.js identifier in function table"},
- {"var foo = [d2s0, d2s1];",
- "Identifier redefined as function pointer table"},
- {"var I = [d2s0, d2s1];",
- "Identifier redefined as function pointer table"},
- {"var d2s = [d2f0, d2f1];", "redefined as function pointer table"},
- {"var d2s_t = [d2s0];", "Function table size mismatch"},
- {"var d2s_t = [d2f0, d2f1];", "initializer does not match previous"},
- };
-
- auto d2s = [](Zone* zone) -> iw::AsmType* {
- auto* ret = iw::AsmType::Function(zone, iw::AsmType::Signed());
- ret->AsFunctionType()->AddArgument(iw::AsmType::Double());
- return ret;
- };
-
- auto d2s_tbl = [](Zone* zone) -> iw::AsmType* {
- auto* d2s = iw::AsmType::Function(zone, iw::AsmType::Signed());
- d2s->AsFunctionType()->AddArgument(iw::AsmType::Double());
-
- auto* ret = iw::AsmType::FunctionTableType(zone, 2, d2s);
- return ret;
- };
-
- auto f2s = [](Zone* zone) -> iw::AsmType* {
- auto* ret = iw::AsmType::Function(zone, iw::AsmType::Signed());
- ret->AsFunctionType()->AddArgument(iw::AsmType::Float());
- return ret;
- };
-
- auto d2f = [](Zone* zone) -> iw::AsmType* {
- auto* ret = iw::AsmType::Function(zone, iw::AsmType::Float());
- ret->AsFunctionType()->AddArgument(iw::AsmType::Double());
- return ret;
- };
-
- for (size_t ii = 0; ii < arraysize(kTests); ++ii) {
- const auto* test = kTests + ii;
- if (!ValidationOf(FunctionTables(test->tables))
- ->WithImport(DynamicGlobal("ffi_import"), iw::AsmTyper::kFFI)
- ->WithImport(DynamicGlobal("imul"), iw::AsmTyper::kMathImul)
- ->WithImport(DynamicGlobal("E"), iw::AsmTyper::kMathE)
- ->WithImport(DynamicGlobal("fround"), iw::AsmTyper::kMathFround)
- ->WithImport(DynamicGlobal("floor"), iw::AsmTyper::kMathFround)
- ->WithGlobal(DynamicGlobal("d2s0"), d2s)
- ->WithGlobal(DynamicGlobal("d2s1"), d2s)
- ->WithGlobal(DynamicGlobal("f2s0"), f2s)
- ->WithGlobal(DynamicGlobal("f2s1"), f2s)
- ->WithGlobal(DynamicGlobal("d2f0"), d2f)
- ->WithGlobal(DynamicGlobal("d2f1"), d2f)
- ->WithGlobal(DynamicGlobal("dI"), iw::AsmType::Int())
- ->WithGlobal(Var("I"), iw::AsmType::Int())
- ->WithUndefinedGlobal(Var("d2s"), d2s)
- ->WithUndefinedGlobal(Var("d2s_t"), d2s_tbl)
- ->FailsWithMessage(test->error_message)) {
- std::cerr << "Test:\n" << test->tables;
- CHECK(false);
- }
- }
-}
-
-TEST(ErrorsInModuleExport) {
- const struct {
- const char* module_export;
- const char* error_message;
- } kTests[] = {
- {"", "Missing asm.js module export"},
- {"return;", "Unrecognized expression in asm.js module export expression"},
- {"return f;", "Undefined identifier in asm.js module export"},
- {"return f();", "Unrecognized expression in asm.js module export"},
- {"return d2s_tbl;", "cannot export function tables"},
- {"return min;", "cannot export standard library functions"},
- {"return ffi;", "cannot export foreign functions"},
- {"return I;", "is not an asm.js function"},
- {"return {'a': d2s_tbl}", "cannot export function tables"},
- {"return {'a': min}", "cannot export standard library functions"},
- {"return {'a': ffi}", "cannot export foreign functions"},
- {"return {'a': f()}", "must be an asm.js function name"},
- {"return {'a': f}", "Undefined identifier in asm.js module export"},
- {"function v() { a(); } return {b: d2s}",
- "Invalid call of existing global function"},
- {"function v() {} return {b: v, 'a': d2s_tbl}",
- "cannot export function tables"},
- {"function v() {} return {b: v, 'a': min}",
- "cannot export standard library"},
- {"function v() {} return {b: v, 'a': ffi}",
- "cannot export foreign functions"},
- {"function v() {} return {b: v, 'a': f()}",
- "must be an asm.js function name"},
- {"function v() {} return {b: v, 'a': f}",
- "Undefined identifier in asm.js module"},
- };
-
- auto d2s_tbl = [](Zone* zone) -> iw::AsmType* {
- auto* d2s = iw::AsmType::Function(zone, iw::AsmType::Signed());
- d2s->AsFunctionType()->AddArgument(iw::AsmType::Double());
-
- auto* ret = iw::AsmType::FunctionTableType(zone, 2, d2s);
- return ret;
- };
-
- for (size_t ii = 0; ii < arraysize(kTests); ++ii) {
- const auto* test = kTests + ii;
- if (!ValidationOf(Export(test->module_export))
- ->WithGlobal(DynamicGlobal("d2s_tbl"), d2s_tbl)
- ->WithImport(DynamicGlobal("min"), iw::AsmTyper::kMathMin)
- ->WithImport(DynamicGlobal("ffi"), iw::AsmTyper::kFFI)
- ->WithGlobal(DynamicGlobal("I"), iw::AsmType::Int())
- ->FailsWithMessage(test->error_message)) {
- std::cerr << "Test:\n" << test->module_export;
- CHECK(false);
- }
- }
-}
-
-TEST(ErrorsInFunction) {
- auto d2s = [](Zone* zone) -> iw::AsmType* {
- auto* ret = iw::AsmType::Function(zone, iw::AsmType::Signed());
- ret->AsFunctionType()->AddArgument(iw::AsmType::Double());
- return ret;
- };
-
- const struct {
- const char* function;
- const char* error_message;
- } kTests[] = {
- {"function f(eval) {"
- " eval = eval|0;"
- "}\n",
- "Invalid asm.js identifier in parameter name"},
- {"function f(arguments) {"
- " arguments = arguments|0;"
- "}\n",
- "Invalid asm.js identifier in parameter name"},
- // The following error should actually be a "redeclared local," but the
- // AST "hides" the first parameter from us, so the parameter type checking
- // will fail because the validator will think that the a = a|0 is
- // annotating the second parameter.
- {"function f(a, a) {\n"
- " a = a|0;\n"
- " a = +a;\n"
- "}\n",
- "Incorrect parameter type annotations"},
- {"function f(b, a) {\n"
- " if (0) return;\n"
- " b = +b;\n"
- " a = a|0;\n"
- "}\n",
- "Incorrect parameter type annotations"},
- {"function f(b, a) {\n"
- " f();\n"
- " b = +b;\n"
- " a = a|0;\n"
- "}\n",
- "Incorrect parameter type annotations"},
- {"function f(b, a) {\n"
- " f.a = 0;\n"
- " b = +b;\n"
- " a = a|0;\n"
- "}\n",
- "Incorrect parameter type annotations"},
- {"function f(b, a) {\n"
- " a = a|0;\n"
- " b = +b;\n"
- "}\n",
- "Incorrect parameter type annotations"},
- {"function f(b, a) {\n"
- " b = +b;\n"
- " a = a|0;\n"
- " var eval = 0;\n"
- "}\n",
- "Invalid asm.js identifier in local variable"},
- {"function f(b, a) {\n"
- " b = +b;\n"
- " a = a|0;\n"
- " var b = 0;\n"
- "}\n",
- "Redeclared local"},
- {"function f(b, a) {\n"
- " b = +b;\n"
- " a = a|0;\n"
- " var c = 0, c = 1.0;\n"
- "}\n",
- "Redeclared local"},
- {"function f(b, a) {\n"
- " b = +b;\n"
- " a = a|0;\n"
- " var c = 0; var c = 1.0;\n"
- "}\n",
- "Redeclared local"},
- {"function f(b, a) {\n"
- " b = +b;\n"
- " a = a|0;\n"
- " f();\n"
- " var c = 0;\n"
- "}\n",
- "Local variable missing initializer in asm.js module"},
- {"function f(a) {\n"
- " a = a|0;\n"
- " var x = a;\n"
- "}\n",
- "variable declaration initializer must be const"},
- {"function f() {\n"
- " var x = 1+i;\n"
- "}\n",
- "should be a literal, const, or fround(literal"},
- {"function f() {\n"
- " var x = a;\n"
- "}\n",
- "Undeclared identifier in variable declaration initializer"},
- {"function f() {\n"
- " function ff() {}\n"
- "}\n",
- "Functions may only define inner variables"},
- {"function f() {\n"
- " return a+1;\n"
- "}\n",
- "Invalid return type annotation"},
- {"function f() {\n"
- " return ~~x;\n"
- "}\n",
- "Invalid return type annotation"},
- {"function f() {\n"
- " return d();\n"
- "}\n",
- "Invalid function call in return statement"},
- {"function f() {\n"
- " return 'use asm';\n"
- "}\n",
- "Invalid literal in return statement"},
- {"function f() {\n"
- " return 2147483648;\n"
- "}\n",
- "Invalid literal in return statement"},
- {"function f(a) {\n"
- " a = a|0;\n"
- " return a;\n"
- "}\n",
- "in return statement is not const"},
- {"function f() {\n"
- " return a;\n"
- "}\n",
- "Undeclared identifier in return statement"},
- {"function f() {\n"
- " var i = 0;\n"
- " return i?0:1;\n"
- "}\n",
- "Type mismatch in return statement"},
- {"function f() {\n"
- " return stdlib.Math.E;"
- "}\n",
- "Invalid return type expression"},
- {"function f() {\n"
- " return E[0];"
- "}\n",
- "Invalid return type expression"},
- {"function I() {}\n", "Identifier redefined as function"},
- {"function foo() {}\n", "Identifier redefined as function"},
- {"function d2s() {}\n", "Identifier redefined (function name)"},
- {"function d2s(x) {\n"
- " x = x|0;\n"
- " return -1;\n"
- "}\n",
- "Identifier redefined (function name)"},
- {"function d2s(x) {\n"
- " x = +x;\n"
- " return -1.0;\n"
- "}\n",
- "Identifier redefined (function name)"},
- };
-
- for (size_t ii = 0; ii < arraysize(kTests); ++ii) {
- const auto* test = kTests + ii;
- if (!ValidationOf(Function(test->function))
- ->WithGlobal(Var("I"), iw::AsmType::Int())
- ->WithGlobal(Var("d2s"), d2s)
- ->FailsWithMessage(test->error_message)) {
- std::cerr << "Test:\n" << test->function;
- CHECK(false);
- }
- }
-}
-
-TEST(ErrorsInStatement) {
- const struct {
- const char* statement;
- const char* error_message;
- } kTests[] = {
- {"if (fround(1));", "If condition must be type int"},
- {"return;", "Type mismatch in return statement"},
- {"return +1.0;", "Type mismatch in return statement"},
- {"return +d()", "Type mismatch in return statement"},
- {"while (fround(1));", "While condition must be type int"},
- {"do {} while (fround(1));", "Do {} While condition must be type int"},
- {"for (;fround(1););", "For condition must be type int"},
- {"switch(flocal){ case 0: return 0; }", "Switch tag must be signed"},
- {"switch(slocal){ default: case 0: return 0; }",
- "Switch default must appear last"},
- {"switch(slocal){ case 1: case 1: return 0; }", "Duplicated case label"},
- {"switch(slocal){ case 1: case 0: break; case 1: return 0; }",
- "Duplicated case label"},
- {"switch(slocal){ case 1.0: return 0; }",
- "Case label must be a 32-bit signed integer"},
- {"switch(slocal){ case 1.0: return 0; }",
- "Case label must be a 32-bit signed integer"},
- {"switch(slocal){ case -100000: case 2147483647: return 0; }",
- "Out-of-bounds case"},
- {"switch(slocal){ case 2147483648: return 0; }",
- "Case label must be a 32-bit signed"},
- };
-
- for (size_t ii = 0; ii < arraysize(kTests); ++ii) {
- const auto* test = kTests + ii;
- if (!ValidationOf(Statement(test->statement))
- ->WithReturnType(iw::AsmType::Signed())
- ->WithImport(DynamicGlobal("fround"), iw::AsmTyper::kMathFround)
- ->WithLocal(DynamicGlobal("flocal"), iw::AsmType::Float())
- ->WithLocal(DynamicGlobal("slocal"), iw::AsmType::Signed())
- ->WithGlobal(DynamicGlobal("d"), nullptr)
- ->FailsWithMessage(test->error_message)) {
- std::cerr << "Test:\n" << test->statement;
- CHECK(false);
- }
- }
-}
-
-TEST(ErrorsInExpression) {
- auto d2d = [](Zone* zone) -> iw::AsmType* {
- auto* ret = iw::AsmType::Function(zone, iw::AsmType::Double());
- ret->AsFunctionType()->AddArgument(iw::AsmType::Double());
- return ret;
- };
-
- auto d2s_tbl = [](Zone* zone) -> iw::AsmType* {
- auto* d2s = iw::AsmType::Function(zone, iw::AsmType::Signed());
- d2s->AsFunctionType()->AddArgument(iw::AsmType::Double());
-
- auto* ret = iw::AsmType::FunctionTableType(zone, 2, d2s);
- return ret;
- };
-
- const struct {
- const char* expression;
- const char* error_message;
- } kTests[] = {
- {"noy_a_function();", "Unanotated call to a function must be a call to"},
- {"a = 0;", "Undeclared identifier"},
- // we can't verify the module's name being referenced here because
- // expression validation does not invoke ValidateModule, which sets up the
- // module information in the AsmTyper.
- {"stdlib", "accessed by ordinary expressions"},
- {"ffi", "accessed by ordinary expressions"},
- {"heap", "accessed by ordinary expressions"},
- {"d2d", "accessed by ordinary expression"},
- {"fround", "accessed by ordinary expression"},
- {"d2s_tbl", "accessed by ordinary expression"},
- {"ilocal = +1.0", "Type mismatch in assignment"},
- {"!dlocal", "Invalid type for !"},
- {"2 * dlocal", "Invalid types for intish *"},
- {"dlocal * 2", "Invalid types for intish *"},
- {"1048577 * ilocal", "Invalid operands for *"},
- {"1048577 / ilocal", "Invalid operands for /"},
- {"1048577 % dlocal", "Invalid operands for %"},
- {"1048577 * dlocal", "Invalid operands for *"},
- {"1048577 / dlocal", "Invalid operands for /"},
- {"1048577 % ilocal", "Invalid operands for %"},
- {"ilocal * dlocal", "Invalid operands for *"},
- {"ilocal / dlocal", "Invalid operands for /"},
- {"ilocal % dlocal", "Invalid operands for %"},
- {"1048577 + dlocal", "Invalid operands for additive expression"},
- {"1048577 - dlocal", "Invalid operands for additive expression"},
- {"ilocal + dlocal", "Invalid operands for additive expression"},
- {"ilocal - dlocal", "Invalid operands for additive expression"},
- {"1048577 << dlocal", "Invalid operands for <<"},
- {"1048577 >> dlocal", "Invalid operands for >>"},
- {"1048577 >>> dlocal", "Invalid operands for >>"},
- {"ilocal << dlocal", "Invalid operands for <<"},
- {"ilocal >> dlocal", "Invalid operands for >>"},
- {"ilocal >>> dlocal", "Invalid operands for >>>"},
- {"1048577 < dlocal", "Invalid operands for <"},
- {"ilocal < dlocal", "Invalid operands for <"},
- {"1048577 > dlocal", "Invalid operands for >"},
- {"ilocal > dlocal", "Invalid operands for >"},
- {"1048577 <= dlocal", "Invalid operands for <="},
- {"ilocal <= dlocal", "Invalid operands for <="},
- {"1048577 >= dlocal", "Invalid operands for >="},
- {"ilocal >= dlocal", "Invalid operands for >="},
- {"1048577 == dlocal", "Invalid operands for =="},
- {"ilocal == dlocal", "Invalid operands for =="},
- /* NOTE: the parser converts a == b to !(a == b). */
- {"1048577 != dlocal", "Invalid operands for =="},
- {"ilocal != dlocal", "Invalid operands for =="},
- {"dlocal & dlocal", "Invalid operands for &"},
- {"1048577 & dlocal", "Invalid operands for &"},
- {"ilocal & dlocal", "Invalid operands for &"},
- {"dlocal | dlocal2", "Invalid operands for |"},
- {"1048577 | dlocal", "Invalid operands for |"},
- {"ilocal | dlocal", "Invalid operands for |"},
- {"dlocal ^ dlocal2", "Invalid operands for ^"},
- {"1048577 ^ dlocal", "Invalid operands for ^"},
- {"ilocal ^ dlocal", "Invalid operands for ^"},
- {"dlocal ? 0 : 1", "Ternary operation condition should be int"},
- {"ilocal ? dlocal : 1", "Type mismatch for ternary operation result"},
- {"ilocal ? 1 : dlocal", "Type mismatch for ternary operation result"},
- {"eval(10)|0", "Invalid asm.js identifier in (forward) function"},
- {"arguments(10)|0", "Invalid asm.js identifier in (forward) function"},
- {"not_a_function(10)|0", "Calling something that's not a function"},
- {"fround(FFI())", "Foreign functions can't return float"},
- {"FFI(fround(0))|0", "Function invocation does not match function type"},
- {"FFI(2147483648)|0", "Function invocation does not match function type"},
- {"d2d(2.0)|0", "Function invocation does not match function type"},
- {"+d2d(2)", "Function invocation does not match function type"},
- {"eval[ilocal & 3]()|0", "Invalid asm.js identifier in (forward)"},
- {"arguments[ilocal & 3]()|0", "Invalid asm.js identifier in (forward)"},
- {"not_a_function[ilocal & 3]()|0", "Identifier does not name a function"},
- {"d2s_tbl[ilocal & 3](0.0)|0", "Function table size does not match"},
- {"+d2s_tbl[ilocal & 1](0.0)", "does not match previous signature"},
- {"d2s_tbl[ilocal & 1](0)|0", "does not match previous signature"},
- {"a.b()|0", "Indirect call index must be in the expr & mask form"},
- {"HEAP32[0][0] = 0", "Invalid heap access"},
- {"heap32[0] = 0", "Undeclared identifier in heap access"},
- {"not_a_function[0] = 0", "Identifier does not represent a heap view"},
- {"HEAP32[0.0] = 0", "Heap access index must be int"},
- {"HEAP32[-1] = 0", "Heap access index must be a 32-bit unsigned integer"},
- {"HEAP32[ilocal >> 1] = 0", "Invalid heap access index"},
- // *VIOLATION* the following is invalid, but because of desugaring it is
- // accepted.
- // {"HEAP32[0 >> 1] = 0", "Invalid heap access index"},
- {"HEAP8[fround(0.0)] = 0", "Invalid heap access index for byte array"},
- {"HEAP8[iish] = 0", "Invalid heap access index for byte array"},
- };
-
- for (size_t ii = 0; ii < arraysize(kTests); ++ii) {
- const auto* test = kTests + ii;
- if (!ValidationOf(Expression(test->expression))
- ->WithStdlib(DynamicGlobal("stdlib"))
- ->WithFFI(DynamicGlobal("ffi"))
- ->WithHeap(DynamicGlobal("heap"))
- ->WithLocal(DynamicGlobal("iish"), iw::AsmType::Intish())
- ->WithLocal(DynamicGlobal("ilocal"), iw::AsmType::Int())
- ->WithLocal(DynamicGlobal("dlocal"), iw::AsmType::Double())
- ->WithLocal(DynamicGlobal("dlocal2"), iw::AsmType::Double())
- ->WithLocal(DynamicGlobal("not_a_function"), iw::AsmType::Int())
- ->WithImport(DynamicGlobal("fround"), iw::AsmTyper::kMathFround)
- ->WithImport(DynamicGlobal("FFI"), iw::AsmTyper::kFFI)
- ->WithGlobal(DynamicGlobal("d2d"), d2d)
- ->WithGlobal(DynamicGlobal("d2s_tbl"), d2s_tbl)
- ->WithGlobal(DynamicGlobal("HEAP32"), iw::AsmType::Int32Array())
- ->WithGlobal(DynamicGlobal("HEAP8"), iw::AsmType::Int8Array())
- ->WithGlobal(DynamicGlobal("a"), nullptr)
- ->FailsWithMessage(test->error_message)) {
- std::cerr << "Test:\n" << test->expression;
- CHECK(false);
- }
- }
-}
-
-TEST(ValidateNumericLiteral) {
- const struct {
- const char* expression;
- iw::AsmType* expected_type;
- } kTests[] = {
- {"0", iw::AsmType::FixNum()},
- {"-1", iw::AsmType::Signed()},
- {"2147483648", iw::AsmType::Unsigned()},
- {"0.0", iw::AsmType::Double()},
- };
-
- for (size_t ii = 0; ii < arraysize(kTests); ++ii) {
- const auto* test = kTests + ii;
- if (!ValidationOf(Expression(test->expression))
- ->SucceedsWithExactType(test->expected_type)) {
- std::cerr << "Test:\n" << test->expression;
- CHECK(false);
- }
- }
-}
-
-TEST(ValidateIdentifier) {
- const struct {
- const char* expression;
- iw::AsmType* expected_type;
- } kTests[] = {{"afixnum", iw::AsmType::FixNum()},
- {"adouble", iw::AsmType::Double()},
- {"afloat", iw::AsmType::Float()},
- {"anextern", iw::AsmType::Extern()},
- {"avoid", iw::AsmType::Void()}};
-
- for (size_t ii = 0; ii < arraysize(kTests); ++ii) {
- const auto* test = kTests + ii;
- if (!ValidationOf(Expression(test->expression))
- ->WithLocal(DynamicGlobal(test->expression), test->expected_type)
- ->WithGlobal(DynamicGlobal(test->expression),
- iw::AsmType::Floatish())
- ->SucceedsWithExactType(test->expected_type)) {
- std::cerr << "Test (local identifiers):\n" << test->expression;
- CHECK(false);
- }
- }
-
- for (size_t ii = 0; ii < arraysize(kTests); ++ii) {
- const auto* test = kTests + ii;
- if (!ValidationOf(Expression(test->expression))
- ->WithGlobal(DynamicGlobal(test->expression), test->expected_type)
- ->SucceedsWithExactType(test->expected_type)) {
- std::cerr << "Test (global identifiers):\n" << test->expression;
- CHECK(false);
- }
- }
-}
-
-TEST(ValidateCallExpression) {
- auto v2f = [](Zone* zone) -> iw::AsmType* {
- auto* ret = iw::AsmType::Function(zone, iw::AsmType::Float());
- return ret;
- };
-
- const struct {
- const char* expression;
- } kTests[] = {
- {"a_float_function()"},
- {"fround(0)"},
- {"slocal"},
- {"ulocal"},
- {"dqlocal"},
- {"fishlocal"},
- };
-
- char full_test[200];
- static const size_t kFullTestSize = arraysize(full_test);
- for (size_t ii = 0; ii < arraysize(kTests); ++ii) {
- const auto* test = kTests + ii;
- CHECK(v8::base::OS::SNPrintF(full_test, kFullTestSize, "fround(%s)",
- test->expression) <
- static_cast<int>(kFullTestSize));
- if (!ValidationOf(Expression(full_test))
- ->WithImport(DynamicGlobal("fround"), iw::AsmTyper::kMathFround)
- ->WithGlobal(DynamicGlobal("a_float_function"), v2f)
- ->WithLocal(DynamicGlobal("slocal"), iw::AsmType::Signed())
- ->WithLocal(DynamicGlobal("ulocal"), iw::AsmType::Unsigned())
- ->WithLocal(DynamicGlobal("dqlocal"), iw::AsmType::DoubleQ())
- ->WithLocal(DynamicGlobal("fishlocal"), iw::AsmType::Floatish())
- ->SucceedsWithExactType(iw::AsmType::Float())) {
- std::cerr << "Test:\n" << full_test;
- CHECK(false);
- }
- }
-
- const struct {
- const char* expression;
- const char* error_message;
- } kFailureTests[] = {
- {"vlocal", "Invalid argument type to fround"},
- {"ilocal", "Invalid argument type to fround"},
- {"a_double_function()", "Function invocation does not match"},
- };
-
- auto v2d = [](Zone* zone) -> iw::AsmType* {
- auto* ret = iw::AsmType::Function(zone, iw::AsmType::Double());
- return ret;
- };
-
- for (size_t ii = 0; ii < arraysize(kFailureTests); ++ii) {
- const auto* test = kFailureTests + ii;
- CHECK(v8::base::OS::SNPrintF(full_test, kFullTestSize, "fround(%s)",
- test->expression) <
- static_cast<int>(kFullTestSize));
- if (!ValidationOf(Expression(full_test))
- ->WithImport(DynamicGlobal("fround"), iw::AsmTyper::kMathFround)
- ->WithLocal(DynamicGlobal("ilocal"), iw::AsmType::Int())
- ->WithLocal(DynamicGlobal("vlocal"), iw::AsmType::Void())
- ->WithGlobal(DynamicGlobal("a_double_function"), v2d)
- ->FailsWithMessage(test->error_message)) {
- std::cerr << "Test:\n" << full_test;
- CHECK(false);
- }
- }
-}
-
-TEST(ValidateMemberExpression) {
- const struct {
- const char* expression;
- iw::AsmType* load_type;
- } kTests[] = {
- {"I8[i]", iw::AsmType::Intish()}, // Legacy: no shift for 8-bit view.
- {"I8[iish >> 0]", iw::AsmType::Intish()},
- {"I8[0]", iw::AsmType::Intish()},
- {"I8[2147483648]", iw::AsmType::Intish()},
- {"U8[iish >> 0]", iw::AsmType::Intish()},
- {"U8[i]", iw::AsmType::Intish()}, // Legacy: no shift for 8-bit view.
- {"U8[0]", iw::AsmType::Intish()},
- {"U8[2147483648]", iw::AsmType::Intish()},
- {"I16[iish >> 1]", iw::AsmType::Intish()},
- {"I16[0]", iw::AsmType::Intish()},
- {"I16[1073741824]", iw::AsmType::Intish()},
- {"U16[iish >> 1]", iw::AsmType::Intish()},
- {"U16[0]", iw::AsmType::Intish()},
- {"U16[1073741824]", iw::AsmType::Intish()},
- {"I32[iish >> 2]", iw::AsmType::Intish()},
- {"I32[0]", iw::AsmType::Intish()},
- {"I32[536870912]", iw::AsmType::Intish()},
- {"U32[iish >> 2]", iw::AsmType::Intish()},
- {"U32[0]", iw::AsmType::Intish()},
- {"U32[536870912]", iw::AsmType::Intish()},
- {"F32[iish >> 2]", iw::AsmType::FloatQ()},
- {"F32[0]", iw::AsmType::FloatQ()},
- {"F32[536870912]", iw::AsmType::FloatQ()},
- {"F64[iish >> 3]", iw::AsmType::DoubleQ()},
- {"F64[0]", iw::AsmType::DoubleQ()},
- {"F64[268435456]", iw::AsmType::DoubleQ()},
- };
-
- for (size_t ii = 0; ii < arraysize(kTests); ++ii) {
- const auto* test = kTests + ii;
- if (!ValidationOf(Expression(test->expression))
- ->WithGlobal(DynamicGlobal("I8"), iw::AsmType::Int8Array())
- ->WithGlobal(DynamicGlobal("U8"), iw::AsmType::Uint8Array())
- ->WithGlobal(DynamicGlobal("I16"), iw::AsmType::Int16Array())
- ->WithGlobal(DynamicGlobal("U16"), iw::AsmType::Uint16Array())
- ->WithGlobal(DynamicGlobal("I32"), iw::AsmType::Int32Array())
- ->WithGlobal(DynamicGlobal("U32"), iw::AsmType::Uint32Array())
- ->WithGlobal(DynamicGlobal("F32"), iw::AsmType::Float32Array())
- ->WithGlobal(DynamicGlobal("F64"), iw::AsmType::Float64Array())
- ->WithLocal(DynamicGlobal("iish"), iw::AsmType::Intish())
- ->WithLocal(DynamicGlobal("i"), iw::AsmType::Int())
- ->SucceedsWithExactType(test->load_type)) {
- std::cerr << "Test:\n" << test->expression;
- CHECK(false);
- }
- }
-}
-
-TEST(ValidateAssignmentExpression) {
- const struct {
- const char* expression;
- iw::AsmType* load_type;
- } kTests[] = {
- // -----------------------------------------------------------------------
- // Array assignments.
- // Storing signed to int heap view.
- {"I8[1024] = -1024", iw::AsmType::Signed()},
- {"I8[1024 >> 0] = -1024", iw::AsmType::Signed()},
- {"I8[0] = -1024", iw::AsmType::Signed()},
- {"I8[2147483648] = -1024", iw::AsmType::Signed()},
- {"U8[1024 >> 0] = -1024", iw::AsmType::Signed()},
- {"U8[0] = -1024", iw::AsmType::Signed()},
- {"U8[2147483648] = -1024", iw::AsmType::Signed()},
- {"I16[1024 >> 1] = -1024", iw::AsmType::Signed()},
- {"I16[0] = -1024", iw::AsmType::Signed()},
- {"I16[1073741824] = -1024", iw::AsmType::Signed()}, // not pre-shifted.
- {"U16[1024 >> 1] = -1024", iw::AsmType::Signed()},
- {"U16[0] = -1024", iw::AsmType::Signed()},
- {"U16[1073741824] = -1024", iw::AsmType::Signed()}, // not pre-shifted.
- {"I32[1024 >> 2] = -1024", iw::AsmType::Signed()},
- {"I32[0] = -1024", iw::AsmType::Signed()},
- {"I32[536870912] = -1024", iw::AsmType::Signed()}, // not pre-shifted.
- {"U32[1024 >> 2] = -1024", iw::AsmType::Signed()},
- {"U32[0] = -1024", iw::AsmType::Signed()},
- {"U32[536870912] = -1024", iw::AsmType::Signed()}, // not pre-shifted.
- // Sroting fixnum to int heap view.
- {"I8[1024] = 1024", iw::AsmType::FixNum()},
- {"I8[1024 >> 0] = 1024", iw::AsmType::FixNum()},
- {"I8[0] = 1024", iw::AsmType::FixNum()},
- {"I8[2147483648] = 1024", iw::AsmType::FixNum()},
- {"U8[1024 >> 0] = 1024", iw::AsmType::FixNum()},
- {"U8[0] = 1024", iw::AsmType::FixNum()},
- {"U8[2147483648] = 1024", iw::AsmType::FixNum()},
- {"I16[1024 >> 1] = 1024", iw::AsmType::FixNum()},
- {"I16[0] = 1024", iw::AsmType::FixNum()},
- {"I16[1073741824] = 1024", iw::AsmType::FixNum()}, // not pre-shifted.
- {"U16[1024 >> 1] = 1024", iw::AsmType::FixNum()},
- {"U16[0] = 1024", iw::AsmType::FixNum()},
- {"U16[1073741824] = 1024", iw::AsmType::FixNum()}, // not pre-shifted.
- {"I32[1024 >> 2] = 1024", iw::AsmType::FixNum()},
- {"I32[0] = 1024", iw::AsmType::FixNum()},
- {"I32[536870912] = 1024", iw::AsmType::FixNum()}, // not pre-shifted.
- {"U32[1024 >> 2] = 1024", iw::AsmType::FixNum()},
- {"U32[0] = 1024", iw::AsmType::FixNum()},
- {"U32[536870912] = 1024", iw::AsmType::FixNum()}, // not pre-shifted.
- // Storing int to int heap view.
- {"I8[ilocal] = ilocal", iw::AsmType::Int()},
- {"I8[ilocal >> 0] = ilocal", iw::AsmType::Int()},
- {"I8[0] = ilocal", iw::AsmType::Int()},
- {"I8[2147483648] = ilocal", iw::AsmType::Int()},
- {"U8[ilocal >> 0] = ilocal", iw::AsmType::Int()},
- {"U8[0] = ilocal", iw::AsmType::Int()},
- {"U8[2147483648] = ilocal", iw::AsmType::Int()},
- {"I16[ilocal >> 1] = ilocal", iw::AsmType::Int()},
- {"I16[0] = ilocal", iw::AsmType::Int()},
- {"I16[1073741824] = ilocal", iw::AsmType::Int()}, // not pre-shifted.
- {"U16[ilocal >> 1] = ilocal", iw::AsmType::Int()},
- {"U16[0] = ilocal", iw::AsmType::Int()},
- {"U16[1073741824] = ilocal", iw::AsmType::Int()}, // not pre-shifted.
- {"I32[ilocal >> 2] = ilocal", iw::AsmType::Int()},
- {"I32[0] = ilocal", iw::AsmType::Int()},
- {"I32[536870912] = ilocal", iw::AsmType::Int()}, // not pre-shifted.
- {"U32[ilocal >> 2] = ilocal", iw::AsmType::Int()},
- {"U32[0] = ilocal", iw::AsmType::Int()},
- {"U32[536870912] = ilocal", iw::AsmType::Int()}, // not pre-shifted.
- // Storing intish to int heap view.
- {"I8[ilocal] = iish", iw::AsmType::Intish()},
- {"I8[iish >> 0] = iish", iw::AsmType::Intish()},
- {"I8[0] = iish", iw::AsmType::Intish()},
- {"I8[2147483648] = iish", iw::AsmType::Intish()},
- {"U8[iish >> 0] = iish", iw::AsmType::Intish()},
- {"U8[0] = iish", iw::AsmType::Intish()},
- {"U8[2147483648] = iish", iw::AsmType::Intish()},
- {"I16[iish >> 1] = iish", iw::AsmType::Intish()},
- {"I16[0] = iish", iw::AsmType::Intish()},
- {"I16[1073741824] = iish", iw::AsmType::Intish()}, // not pre-shifted.
- {"U16[iish >> 1] = iish", iw::AsmType::Intish()},
- {"U16[0] = iish", iw::AsmType::Intish()},
- {"U16[1073741824] = iish", iw::AsmType::Intish()}, // not pre-shifted.
- {"I32[iish >> 2] = iish", iw::AsmType::Intish()},
- {"I32[0] = iish", iw::AsmType::Intish()},
- {"I32[536870912] = iish", iw::AsmType::Intish()}, // not pre-shifted.
- {"U32[iish >> 2] = iish", iw::AsmType::Intish()},
- {"U32[0] = iish", iw::AsmType::Intish()},
- {"U32[536870912] = iish", iw::AsmType::Intish()}, // not pre-shifted.
- // Storing floatish to f32 heap view.
- {"F32[iish >> 2] = fish", iw::AsmType::Floatish()},
- {"F32[0] = fish", iw::AsmType::Floatish()},
- {"F32[536870912] = fish ", iw::AsmType::Floatish()}, // not pre-shifted.
- // Storing double? to f32 heap view.
- {"F32[iish >> 2] = dq", iw::AsmType::DoubleQ()},
- {"F32[0] = dq", iw::AsmType::DoubleQ()},
- {"F32[536870912] = dq", iw::AsmType::DoubleQ()}, // not pre-shifted.
- // Storing float? to f64 heap view.
- {"F64[iish >> 3] = fq", iw::AsmType::FloatQ()},
- {"F64[0] = fq", iw::AsmType::FloatQ()},
- {"F64[268435456] = fq", iw::AsmType::FloatQ()}, // not pre-shifted.
- // Storing double? to f64 heap view.
- {"F64[iish >> 3] = dq", iw::AsmType::DoubleQ()},
- {"F64[0] = dq", iw::AsmType::DoubleQ()},
- {"F64[268435456] = dq", iw::AsmType::DoubleQ()}, // not pre-shifted.
- // -----------------------------------------------------------------------
- // Scalar assignments.
- {"ilocal = 1024", iw::AsmType::FixNum()},
- {"ilocal = -1024", iw::AsmType::Signed()},
- {"ilocal = 2147483648", iw::AsmType::Unsigned()},
- {"ilocal = iglobal", iw::AsmType::Int()},
- {"iglobal = 1024", iw::AsmType::FixNum()},
- {"iglobal = -1024", iw::AsmType::Signed()},
- {"iglobal = 2147483648", iw::AsmType::Unsigned()},
- {"iglobal = ilocal", iw::AsmType::Int()},
- {"dlocal = 0.0", iw::AsmType::Double()},
- {"dlocal = +make_double()", iw::AsmType::Double()},
- {"dglobal = 0.0", iw::AsmType::Double()},
- {"dglobal = +make_double()", iw::AsmType::Double()},
- {"flocal = fround(0)", iw::AsmType::Float()},
- {"flocal = fround(make_float())", iw::AsmType::Float()},
- {"fglobal = fround(0)", iw::AsmType::Float()},
- {"fglobal = fround(make_float())", iw::AsmType::Float()},
- };
-
- for (size_t ii = 0; ii < arraysize(kTests); ++ii) {
- const auto* test = kTests + ii;
- if (!ValidationOf(Expression(test->expression))
- ->WithImport(DynamicGlobal("fround"), iw::AsmTyper::kMathFround)
- ->WithLocal(DynamicGlobal("fq"), iw::AsmType::FloatQ())
- ->WithLocal(DynamicGlobal("dq"), iw::AsmType::DoubleQ())
- ->WithLocal(DynamicGlobal("fish"), iw::AsmType::Floatish())
- ->WithLocal(DynamicGlobal("iish"), iw::AsmType::Intish())
- ->WithGlobal(DynamicGlobal("iglobal"), iw::AsmType::Int())
- ->WithGlobal(DynamicGlobal("dglobal"), iw::AsmType::Double())
- ->WithGlobal(DynamicGlobal("fglobal"), iw::AsmType::Float())
- ->WithLocal(DynamicGlobal("ilocal"), iw::AsmType::Int())
- ->WithLocal(DynamicGlobal("dlocal"), iw::AsmType::Double())
- ->WithLocal(DynamicGlobal("flocal"), iw::AsmType::Float())
- ->WithGlobal(DynamicGlobal("I8"), iw::AsmType::Int8Array())
- ->WithGlobal(DynamicGlobal("U8"), iw::AsmType::Uint8Array())
- ->WithGlobal(DynamicGlobal("I16"), iw::AsmType::Int16Array())
- ->WithGlobal(DynamicGlobal("U16"), iw::AsmType::Uint16Array())
- ->WithGlobal(DynamicGlobal("I32"), iw::AsmType::Int32Array())
- ->WithGlobal(DynamicGlobal("U32"), iw::AsmType::Uint32Array())
- ->WithGlobal(DynamicGlobal("F32"), iw::AsmType::Float32Array())
- ->WithGlobal(DynamicGlobal("F64"), iw::AsmType::Float64Array())
- ->WithGlobal(DynamicGlobal("make_float"), nullptr)
- ->WithGlobal(DynamicGlobal("make_double"), nullptr)
- ->SucceedsWithExactType(test->load_type)) {
- std::cerr << "Test:\n" << test->expression;
- CHECK(false);
- }
- }
-}
-
-TEST(ValidateUnaryExpression) {
- auto v2d = [](Zone* zone) -> iw::AsmType* {
- auto* ret = iw::AsmType::Function(zone, iw::AsmType::Double());
- return ret;
- };
-
- const struct {
- const char* expression;
- iw::AsmType* load_type;
- } kTests[] = {
- {"-2147483648", iw::AsmType::Signed()},
- {"-1024", iw::AsmType::Signed()},
- {"-1", iw::AsmType::Signed()},
- {"-2147483648.0", iw::AsmType::Double()},
- {"+make_double()", iw::AsmType::Double()},
- {"+dbl()", iw::AsmType::Double()},
- {"make_double() * 1.0", iw::AsmType::Double()}, // Violation.
- {"~~fq", iw::AsmType::Signed()},
- {"~~dglobal", iw::AsmType::Signed()},
- {"+slocal", iw::AsmType::Double()},
- {"slocal * 1.0", iw::AsmType::Double()}, // Violation.
- {"+ulocal", iw::AsmType::Double()},
- {"ulocal * 1.0", iw::AsmType::Double()}, // Violation.
- {"+dq", iw::AsmType::Double()},
- {"dq * 1.0", iw::AsmType::Double()}, // Violation.
- {"+fq", iw::AsmType::Double()},
- {"fq * 1.0", iw::AsmType::Double()}, // Violation.
- {"-ilocal", iw::AsmType::Intish()},
- {"ilocal * -1", iw::AsmType::Intish()}, // Violation.
- {"-dq", iw::AsmType::Double()},
- {"dq * -1", iw::AsmType::Double()}, // Violation.
- {"-fq", iw::AsmType::Floatish()},
- {"fq * -1", iw::AsmType::Floatish()}, // Violation.
- {"~iish", iw::AsmType::Signed()},
- {"iish ^ -1", iw::AsmType::Signed()}, // Violation, but OK.
- {"!ilocal", iw::AsmType::Int()},
- };
-
- for (size_t ii = 0; ii < arraysize(kTests); ++ii) {
- const auto* test = kTests + ii;
- if (!ValidationOf(Expression(test->expression))
- ->WithLocal(DynamicGlobal("fq"), iw::AsmType::FloatQ())
- ->WithLocal(DynamicGlobal("dq"), iw::AsmType::DoubleQ())
- ->WithLocal(DynamicGlobal("iish"), iw::AsmType::Intish())
- ->WithLocal(DynamicGlobal("slocal"), iw::AsmType::Signed())
- ->WithLocal(DynamicGlobal("ulocal"), iw::AsmType::Unsigned())
- ->WithLocal(DynamicGlobal("ilocal"), iw::AsmType::Int())
- ->WithGlobal(DynamicGlobal("dglobal"), iw::AsmType::Double())
- ->WithGlobal(DynamicGlobal("make_double"), nullptr)
- ->WithGlobal(DynamicGlobal("dbl"), v2d)
- ->SucceedsWithExactType(test->load_type)) {
- std::cerr << "Test:\n" << test->expression;
- CHECK(false);
- }
- }
-}
-
-TEST(ValidateMultiplicativeExpression) {
- const struct {
- const char* expression;
- iw::AsmType* load_type;
- } kTests[] = {
- {"dq * dq", iw::AsmType::Double()},
- {"fq * fq", iw::AsmType::Floatish()},
- {"slocal / slocal", iw::AsmType::Intish()},
- {"ulocal / ulocal", iw::AsmType::Intish()},
- {"dq / dq", iw::AsmType::Double()},
- {"fq / fq", iw::AsmType::Floatish()},
- {"slocal % slocal", iw::AsmType::Intish()},
- {"ulocal % ulocal", iw::AsmType::Intish()},
- {"dq % dq", iw::AsmType::Double()},
- {"-1048575 * ilocal", iw::AsmType::Intish()},
- {"ilocal * -1048575", iw::AsmType::Intish()},
- {"1048575 * ilocal", iw::AsmType::Intish()},
- {"ilocal * 1048575", iw::AsmType::Intish()},
- };
-
- for (size_t ii = 0; ii < arraysize(kTests); ++ii) {
- const auto* test = kTests + ii;
- if (!ValidationOf(Expression(test->expression))
- ->WithLocal(DynamicGlobal("fq"), iw::AsmType::FloatQ())
- ->WithLocal(DynamicGlobal("dq"), iw::AsmType::DoubleQ())
- ->WithLocal(DynamicGlobal("slocal"), iw::AsmType::Signed())
- ->WithLocal(DynamicGlobal("ulocal"), iw::AsmType::Unsigned())
- ->WithLocal(DynamicGlobal("ilocal"), iw::AsmType::Int())
- ->WithGlobal(DynamicGlobal("dglobal"), iw::AsmType::Double())
- ->SucceedsWithExactType(test->load_type)) {
- std::cerr << "Test:\n" << test->expression;
- CHECK(false);
- }
- }
-}
-
-TEST(ValidateAdditiveExpression) {
- const struct {
- const char* expression;
- iw::AsmType* load_type;
- } kTests[] = {
- {"dlocal + dlocal", iw::AsmType::Double()},
- {"fq + fq", iw::AsmType::Floatish()},
- {"dq - dq", iw::AsmType::Double()},
- {"fq - fq", iw::AsmType::Floatish()},
- {"ilocal + 1", iw::AsmType::Intish()},
- {"ilocal - 1", iw::AsmType::Intish()},
- {"slocal + ilocal + 1", iw::AsmType::Intish()},
- {"slocal - ilocal + 1", iw::AsmType::Intish()},
- {"ulocal + ilocal + 1", iw::AsmType::Intish()},
- {"ulocal - ilocal + 1", iw::AsmType::Intish()},
- {"ulocal + slocal + ilocal + 1", iw::AsmType::Intish()},
- {"ulocal + slocal - ilocal + 1", iw::AsmType::Intish()},
- {"ulocal - slocal + ilocal + 1", iw::AsmType::Intish()},
- {"ulocal - slocal - ilocal + 1", iw::AsmType::Intish()},
- {"1 + 1", iw::AsmType::FixNum()}, // Violation: intish.
- };
-
- for (size_t ii = 0; ii < arraysize(kTests); ++ii) {
- const auto* test = kTests + ii;
- if (!ValidationOf(Expression(test->expression))
- ->WithLocal(DynamicGlobal("fq"), iw::AsmType::FloatQ())
- ->WithLocal(DynamicGlobal("dq"), iw::AsmType::DoubleQ())
- ->WithLocal(DynamicGlobal("iish"), iw::AsmType::Intish())
- ->WithLocal(DynamicGlobal("dlocal"), iw::AsmType::Double())
- ->WithLocal(DynamicGlobal("slocal"), iw::AsmType::Signed())
- ->WithLocal(DynamicGlobal("ulocal"), iw::AsmType::Unsigned())
- ->WithLocal(DynamicGlobal("ilocal"), iw::AsmType::Int())
- ->SucceedsWithExactType(test->load_type)) {
- std::cerr << "Test:\n" << test->expression;
- CHECK(false);
- }
- }
-}
-
-TEST(ValidateShiftExpression) {
- const struct {
- const char* expression;
- iw::AsmType* load_type;
- } kTests[] = {
- {"iish << iish", iw::AsmType::Signed()},
- {"iish >> iish", iw::AsmType::Signed()},
- {"iish >>> iish", iw::AsmType::Unsigned()},
- {"1 << 0", iw::AsmType::FixNum()}, // Violation: signed.
- {"1 >> 0", iw::AsmType::FixNum()}, // Violation: signed.
- {"4294967295 >>> 0", iw::AsmType::Unsigned()},
- {"-1 >>> 0", iw::AsmType::Unsigned()},
- {"2147483647 >>> 0", iw::AsmType::FixNum()}, // Violation: unsigned.
- };
-
- for (size_t ii = 0; ii < arraysize(kTests); ++ii) {
- const auto* test = kTests + ii;
- if (!ValidationOf(Expression(test->expression))
- ->WithLocal(DynamicGlobal("iish"), iw::AsmType::Intish())
- ->SucceedsWithExactType(test->load_type)) {
- std::cerr << "Test:\n" << test->expression;
- CHECK(false);
- }
- }
-}
-
-TEST(ValidateComparisonExpression) {
- const struct {
- const char* expression;
- iw::AsmType* load_type;
- } kTests[] = {
- // -----------------------------------------------------------------------
- // Non const <op> Non const
- {"s0 == s1", iw::AsmType::Int()},
- {"u0 == u1", iw::AsmType::Int()},
- {"f0 == f1", iw::AsmType::Int()},
- {"d0 == d1", iw::AsmType::Int()},
- {"s0 != s1", iw::AsmType::Int()},
- {"u0 != u1", iw::AsmType::Int()},
- {"f0 != f1", iw::AsmType::Int()},
- {"d0 != d1", iw::AsmType::Int()},
- {"s0 < s1", iw::AsmType::Int()},
- {"u0 < u1", iw::AsmType::Int()},
- {"f0 < f1", iw::AsmType::Int()},
- {"d0 < d1", iw::AsmType::Int()},
- {"s0 <= s1", iw::AsmType::Int()},
- {"u0 <= u1", iw::AsmType::Int()},
- {"f0 <= f1", iw::AsmType::Int()},
- {"d0 <= d1", iw::AsmType::Int()},
- {"s0 > s1", iw::AsmType::Int()},
- {"u0 > u1", iw::AsmType::Int()},
- {"f0 > f1", iw::AsmType::Int()},
- {"d0 > d1", iw::AsmType::Int()},
- {"s0 >= s1", iw::AsmType::Int()},
- {"u0 >= u1", iw::AsmType::Int()},
- {"f0 >= f1", iw::AsmType::Int()},
- {"d0 >= d1", iw::AsmType::Int()},
- // -----------------------------------------------------------------------
- // Non const <op> Const
- {"s0 == -1025", iw::AsmType::Int()},
- {"u0 == 123456789", iw::AsmType::Int()},
- {"f0 == fround(123456.78)", iw::AsmType::Int()},
- {"d0 == 9876543.201", iw::AsmType::Int()},
- {"s0 != -1025", iw::AsmType::Int()},
- {"u0 != 123456789", iw::AsmType::Int()},
- {"f0 != fround(123456.78)", iw::AsmType::Int()},
- {"d0 != 9876543.201", iw::AsmType::Int()},
- {"s0 < -1025", iw::AsmType::Int()},
- {"u0 < 123456789", iw::AsmType::Int()},
- {"f0 < fround(123456.78)", iw::AsmType::Int()},
- {"d0 < 9876543.201", iw::AsmType::Int()},
- {"s0 <= -1025", iw::AsmType::Int()},
- {"u0 <= 123456789", iw::AsmType::Int()},
- {"f0 <= fround(123456.78)", iw::AsmType::Int()},
- {"d0 <= 9876543.201", iw::AsmType::Int()},
- {"s0 > -1025", iw::AsmType::Int()},
- {"u0 > 123456789", iw::AsmType::Int()},
- {"f0 > fround(123456.78)", iw::AsmType::Int()},
- {"d0 > 9876543.201", iw::AsmType::Int()},
- {"s0 >= -1025", iw::AsmType::Int()},
- {"u0 >= 123456789", iw::AsmType::Int()},
- {"f0 >= fround(123456.78)", iw::AsmType::Int()},
- {"d0 >= 9876543.201", iw::AsmType::Int()},
- // -----------------------------------------------------------------------
- // Const <op> Non const
- {"-1025 == s0", iw::AsmType::Int()},
- {"123456789 == u0", iw::AsmType::Int()},
- {"fround(123456.78) == f0", iw::AsmType::Int()},
- {"9876543.201 == d0", iw::AsmType::Int()},
- {"-1025 != s0", iw::AsmType::Int()},
- {"123456789 != u0", iw::AsmType::Int()},
- {"fround(123456.78) != f0", iw::AsmType::Int()},
- {"9876543.201 != d0", iw::AsmType::Int()},
- {"-1025 < s0", iw::AsmType::Int()},
- {"123456789 < u0", iw::AsmType::Int()},
- {"fround(123456.78) < f0", iw::AsmType::Int()},
- {"9876543.201 < d0", iw::AsmType::Int()},
- {"-1025 <= s0", iw::AsmType::Int()},
- {"123456789 <= u0", iw::AsmType::Int()},
- {"fround(123456.78) <= f0", iw::AsmType::Int()},
- {"9876543.201 <= d0", iw::AsmType::Int()},
- {"-1025 > s0", iw::AsmType::Int()},
- {"123456789 > u0", iw::AsmType::Int()},
- {"fround(123456.78) > f0", iw::AsmType::Int()},
- {"9876543.201 > d0", iw::AsmType::Int()},
- {"-1025 >= s0", iw::AsmType::Int()},
- {"123456789 >= u0", iw::AsmType::Int()},
- {"fround(123456.78) >= f0", iw::AsmType::Int()},
- {"9876543.201 >= d0", iw::AsmType::Int()},
- // TODO(jpp): maybe add Const <op> Const.
- };
-
- for (size_t ii = 0; ii < arraysize(kTests); ++ii) {
- const auto* test = kTests + ii;
- if (!ValidationOf(Expression(test->expression))
- ->WithImport(DynamicGlobal("fround"), iw::AsmTyper::kMathFround)
- ->WithLocal(DynamicGlobal("u0"), iw::AsmType::Unsigned())
- ->WithLocal(DynamicGlobal("u1"), iw::AsmType::Unsigned())
- ->WithLocal(DynamicGlobal("s0"), iw::AsmType::Signed())
- ->WithLocal(DynamicGlobal("s1"), iw::AsmType::Signed())
- ->WithLocal(DynamicGlobal("f0"), iw::AsmType::Float())
- ->WithLocal(DynamicGlobal("f1"), iw::AsmType::Float())
- ->WithLocal(DynamicGlobal("d0"), iw::AsmType::Double())
- ->WithLocal(DynamicGlobal("d1"), iw::AsmType::Double())
- ->SucceedsWithExactType(test->load_type)) {
- std::cerr << "Test:\n" << test->expression;
- CHECK(false);
- }
- }
-}
-
-TEST(ValidateBitwiseExpression) {
- auto v2s = [](Zone* zone) -> iw::AsmType* {
- auto* ret = iw::AsmType::Function(zone, iw::AsmType::Signed());
- return ret;
- };
-
- const struct {
- const char* expression;
- iw::AsmType* load_type;
- } kTests[] = {
- {"iish0 & iish1", iw::AsmType::Signed()},
- {"iish0 | iish1", iw::AsmType::Signed()},
- {"iish0 ^ iish1", iw::AsmType::Signed()},
- {"iish0 & -1", iw::AsmType::Signed()},
- {"iish0 | -1", iw::AsmType::Signed()},
- {"iish0 ^ -1", iw::AsmType::Signed()},
- {"2147483648 & iish1", iw::AsmType::Signed()},
- {"2147483648 | iish1", iw::AsmType::Signed()},
- {"2147483648 ^ iish1", iw::AsmType::Signed()},
- {"2147483648 & 0", iw::AsmType::FixNum()}, // Violation: signed.
- {"2147483648 | 0", iw::AsmType::Signed()},
- {"2147483648 ^ 0", iw::AsmType::Signed()},
- {"2134651 & 123", iw::AsmType::FixNum()}, // Violation: signed.
- {"2134651 | 123", iw::AsmType::FixNum()}, // Violation: signed.
- {"2134651 ^ 123", iw::AsmType::FixNum()}, // Violation: signed.
- {"make_signed()|0", iw::AsmType::Signed()},
- {"signed()|0", iw::AsmType::Signed()},
- };
-
- for (size_t ii = 0; ii < arraysize(kTests); ++ii) {
- const auto* test = kTests + ii;
- if (!ValidationOf(Expression(test->expression))
- ->WithLocal(DynamicGlobal("iish1"), iw::AsmType::Intish())
- ->WithLocal(DynamicGlobal("iish0"), iw::AsmType::Intish())
- ->WithGlobal(DynamicGlobal("signed"), v2s)
- ->WithGlobal(DynamicGlobal("make_signed"), nullptr)
- ->SucceedsWithExactType(test->load_type)) {
- std::cerr << "Test:\n" << test->expression;
- CHECK(false);
- }
- }
-}
-
-TEST(ValidateConditionalExpression) {
- const struct {
- const char* expression;
- iw::AsmType* load_type;
- } kTests[] = {
- {"i0 ? i0 : i1", iw::AsmType::Int()},
- {"i0 ? f0 : f1", iw::AsmType::Float()},
- {"i0 ? d0 : d1", iw::AsmType::Double()},
- {"0 ? -1 : 2147483648", iw::AsmType::Int()},
- };
-
- for (size_t ii = 0; ii < arraysize(kTests); ++ii) {
- const auto* test = kTests + ii;
- if (!ValidationOf(Expression(test->expression))
- ->WithLocal(DynamicGlobal("i0"), iw::AsmType::Int())
- ->WithLocal(DynamicGlobal("i1"), iw::AsmType::Int())
- ->WithLocal(DynamicGlobal("f0"), iw::AsmType::Float())
- ->WithLocal(DynamicGlobal("f1"), iw::AsmType::Float())
- ->WithLocal(DynamicGlobal("d0"), iw::AsmType::Double())
- ->WithLocal(DynamicGlobal("d1"), iw::AsmType::Double())
- ->SucceedsWithExactType(test->load_type)) {
- std::cerr << "Test:\n" << test->expression;
- CHECK(false);
- }
- }
-}
-
-TEST(ValidateCall) {
- auto v2f = [](Zone* zone) -> iw::AsmType* {
- auto* ret = iw::AsmType::Function(zone, iw::AsmType::Float());
- return ret;
- };
-
- // ifd2_ is a helper function that returns a lambda for creating a function
- // type that accepts an int, a float, and a double. ret_type_factory is a
- // pointer to an AsmType*() function, and (*ret_type_factory)() returns the
- // desired return type. For example,
- //
- // ifd2_(&iw::AsmType::Float)
- //
- // returns an AsmType representing an asm.js function with the following
- // signature:
- //
- // float(int, float, double)
- auto ifd2_ = [](iw::AsmType* (
- *ret_type_factory)()) -> std::function<iw::AsmType*(Zone*)> {
- return [ret_type_factory](Zone* zone) -> iw::AsmType* {
- auto* ret = iw::AsmType::Function(zone, (*ret_type_factory)());
- ret->AsFunctionType()->AddArgument(iw::AsmType::Int());
- ret->AsFunctionType()->AddArgument(iw::AsmType::Float());
- ret->AsFunctionType()->AddArgument(iw::AsmType::Double());
- return ret;
- };
- };
- auto ifd2f = ifd2_(&iw::AsmType::Float);
- auto ifd2d = ifd2_(&iw::AsmType::Double);
- auto ifd2i = ifd2_(&iw::AsmType::Signed);
-
- // Just like ifd2_, but this one returns a type representing a function table.
- auto tbl_ifd2_ = [](size_t tbl_size, iw::AsmType* (*ret_type_factory)())
- -> std::function<iw::AsmType*(Zone*)> {
- return [tbl_size, ret_type_factory](Zone* zone) -> iw::AsmType* {
- auto* signature = iw::AsmType::Function(zone, (*ret_type_factory)());
- signature->AsFunctionType()->AddArgument(iw::AsmType::Int());
- signature->AsFunctionType()->AddArgument(iw::AsmType::Float());
- signature->AsFunctionType()->AddArgument(iw::AsmType::Double());
-
- auto* ret = iw::AsmType::FunctionTableType(zone, tbl_size, signature);
- return ret;
- };
- };
- auto ifd2f_tbl = tbl_ifd2_(32, &iw::AsmType::Float);
- auto ifd2d_tbl = tbl_ifd2_(64, &iw::AsmType::Double);
- auto ifd2i_tbl = tbl_ifd2_(4096, &iw::AsmType::Signed);
-
- const struct {
- const char* expression;
- iw::AsmType* load_type;
- } kTests[] = {
- // -----------------------------------------------------------------------
- // Functions.
- {"fround(v2f())", iw::AsmType::Float()},
- {"fround(fish)", iw::AsmType::Float()},
- {"fround(dq)", iw::AsmType::Float()},
- {"fround(s)", iw::AsmType::Float()},
- {"fround(u)", iw::AsmType::Float()},
- {"ffi()|0", iw::AsmType::Signed()},
- {"ffi(1.0)|0", iw::AsmType::Signed()},
- {"ffi(1.0, 2.0)|0", iw::AsmType::Signed()},
- {"ffi(1.0, 2.0, 3)|0", iw::AsmType::Signed()},
- {"ffi(1.0, 2.0, 3, 4)|0", iw::AsmType::Signed()},
- {"+ffi()", iw::AsmType::Double()},
- {"+ffi(1.0)", iw::AsmType::Double()},
- {"+ffi(1.0, 2.0)", iw::AsmType::Double()},
- {"+ffi(1.0, 2.0, 3)", iw::AsmType::Double()},
- {"+ffi(1.0, 2.0, 3, 4)", iw::AsmType::Double()},
- {"fround(ifd2f(1, fround(1), 1.0))", iw::AsmType::Float()},
- {"+ifd2d(1, fround(1), 1.0)", iw::AsmType::Double()},
- {"ifd2i(1, fround(1), 1.0)|0", iw::AsmType::Signed()},
- // -----------------------------------------------------------------------
- // Function tables.
- {"fround(ifd2f_tbl[iish & 31](1, fround(1), 1.0))", iw::AsmType::Float()},
- {"+ifd2d_tbl[iish & 63](1, fround(1), 1.0)", iw::AsmType::Double()},
- {"ifd2i_tbl[iish & 4095](1, fround(1), 1.0)|0", iw::AsmType::Signed()},
- };
-
- for (size_t ii = 0; ii < arraysize(kTests); ++ii) {
- const auto* test = kTests + ii;
- if (!ValidationOf(Expression(test->expression))
- ->WithImport(DynamicGlobal("fround"), iw::AsmTyper::kMathFround)
- ->WithImport(DynamicGlobal("ffi"), iw::AsmTyper::kFFI)
- ->WithLocal(DynamicGlobal("fish"), iw::AsmType::Floatish())
- ->WithLocal(DynamicGlobal("dq"), iw::AsmType::DoubleQ())
- ->WithLocal(DynamicGlobal("s"), iw::AsmType::Signed())
- ->WithLocal(DynamicGlobal("u"), iw::AsmType::Unsigned())
- ->WithLocal(DynamicGlobal("iish"), iw::AsmType::Intish())
- ->WithGlobal(DynamicGlobal("v2f"), v2f)
- ->WithGlobal(DynamicGlobal("ifd2f"), nullptr)
- ->WithGlobal(DynamicGlobal("ifd2d"), nullptr)
- ->WithGlobal(DynamicGlobal("ifd2i"), nullptr)
- ->WithGlobal(DynamicGlobal("ifd2f_tbl"), ifd2f_tbl)
- ->WithGlobal(DynamicGlobal("ifd2d_tbl"), ifd2d_tbl)
- ->WithGlobal(DynamicGlobal("ifd2i_tbl"), ifd2i_tbl)
- ->SucceedsWithExactType(test->load_type)) {
- std::cerr << "Test:\n" << test->expression;
- CHECK(false);
- }
- }
-}
-
-TEST(CannotReferenceModuleName) {
- v8::V8::Initialize();
-
- const struct {
- const char* module;
- const char* error_message;
- } kTests[] = {
- {"function asm() {\n"
- " 'use asm';\n"
- " function f() { asm; }\n"
- "}",
- "accessed by ordinary expressions"},
- {"function asm() { 'use asm'; return asm; }", "Module cannot export"},
- };
-
- for (size_t ii = 0; ii < arraysize(kTests); ++ii) {
- const auto* test = kTests + ii;
- if (!ValidationOf(Module(test->module))
- ->FailsWithMessage(test->error_message)) {
- std::cerr << "Test:\n" << test->module;
- CHECK(false);
- }
- }
-}
-
-TEST(InvalidSourceLayout) {
- const char* kTests[] = {
- "function asm() {\n"
- " 'use asm';\n"
- " function f() {}\n"
- " var v = 0;\n"
- " var v_v = [f];\n"
- " return f;\n"
- "}",
- "function asm() {\n"
- " 'use asm';\n"
- " function f() {}\n"
- " var v_v = [f];\n"
- " var v = 0;\n"
- " return f;\n"
- "}",
- "function asm() {\n"
- " 'use asm';\n"
- " function f() {}\n"
- " var v_v = [f];\n"
- " return f;\n"
- " var v = 0;\n"
- "}",
- "function asm() {\n"
- " 'use asm';\n"
- " var v = 0;\n"
- " var v_v = [f];\n"
- " function f() {}\n"
- " return f;\n"
- "}",
- "function asm() {\n"
- " 'use asm';\n"
- " var v = 0;\n"
- " var v_v = [f];\n"
- " return f;\n"
- " function f() {}\n"
- "}",
- "function asm() {\n"
- " 'use asm';\n"
- " var v = 0;\n"
- " function f() {}\n"
- " return f;\n"
- " var v_v = [f];\n"
- "}",
- "function asm() {\n"
- " 'use asm';\n"
- " var v = 0;\n"
- " function f() {}\n"
- " var v1 = 0;\n"
- " var v_v = [f];\n"
- " return f;\n"
- "}",
- "function asm() {\n"
- " 'use asm';\n"
- " var v = 0;\n"
- " function f() {}\n"
- " var v_v = [f];\n"
- " var v1 = 0;\n"
- " return f;\n"
- "}",
- "function asm() {\n"
- " 'use asm';\n"
- " var v = 0;\n"
- " function f() {}\n"
- " var v_v = [f];\n"
- " return f;\n"
- " var v1 = 0;\n"
- "}",
- "function asm() {\n"
- " function f() {}\n"
- " 'use asm';\n"
- " var v_v = [f];\n"
- " return f;\n"
- "}",
- "function asm() {\n"
- " 'use asm';\n"
- " return f;\n"
- " var v = 0;\n"
- " function f() {}\n"
- " var v_v = [f];\n"
- "}",
- "function asm() {\n"
- " 'use asm';\n"
- " return f;\n"
- " function f() {}\n"
- "}",
- "function __f_59() {\n"
- " 'use asm';\n"
- " function __f_110() {\n"
- " return 71;\n"
- " }\n"
- " function __f_21() {\n"
- " var __v_38 = 0;\n"
- " return __v_23[__v_38&0]() | 0;\n"
- " }\n"
- " return {__f_21:__f_21};\n"
- " var __v_23 = [__f_110];\n"
- "}",
- };
-
- for (size_t ii = 0; ii < arraysize(kTests); ++ii) {
- if (!ValidationOf(Module(kTests[ii]))
- ->FailsWithMessage("Invalid asm.js source code layout")) {
- std::cerr << "Test:\n" << kTests[ii];
- CHECK(false);
- }
- }
-}
-
-// This issue was triggered because of the "lenient" 8-bit heap access code
-// path. The canonical heap access index validation fails because __34 is not an
-// intish. Then, during the "lenient" code path for accessing elements in 8-bit
-// heap views, the __34 node in the indexing expression would be re-tagged, thus
-// causing the assertion failure.
-TEST(B63099) {
- const char* kTests[] = {
- "function __f_109(stdlib, __v_36, buffer) {\n"
- " 'use asm';\n"
- " var __v_34 = new stdlib.Uint8Array(buffer);\n"
- " function __f_22() {__v_34[__v_34>>0]|0 + 1 | 0;\n"
- " }\n"
- "}",
- "function __f_109(stdlib, __v_36, buffer) {\n"
- " 'use asm';\n"
- " var __v_34 = new stdlib.Int8Array(buffer);\n"
- " function __f_22() {__v_34[__v_34>>0]|0 + 1 | 0;\n"
- " }\n"
- "}",
- };
-
- for (size_t ii = 0; ii < arraysize(kTests); ++ii) {
- if (!ValidationOf(Module(kTests[ii]))
- ->FailsWithMessage("Invalid heap access index")) {
- std::cerr << "Test:\n" << kTests[ii];
- CHECK(false);
- }
- }
-}
-
-// This issue was triggered because assignments to immutable symbols (e.g., the
-// module's name, or any of the asm.js' module parameters) was not being
-// handled.
-TEST(B640194) {
- const char* kTests[] = {
- "function asm() {\n"
- " 'use asm';\n"
- " function f() {\n"
- " asm = 0;\n"
- " }\n"
- " return f;\n"
- "}",
- "function asm(stdlib) {\n"
- " 'use asm';\n"
- " function f() {\n"
- " stdlib = 0;\n"
- " }\n"
- " return f;\n"
- "}",
- "function asm(stdlib, foreign) {\n"
- " 'use asm';\n"
- " function f() {\n"
- " foreign = 0;\n"
- " }\n"
- " return f;\n"
- "}",
- "function asm(stdlib, foreign, heap) {\n"
- " 'use asm';\n"
- " function f() {\n"
- " heap = 0;\n"
- " }\n"
- " return f;\n"
- "}",
- "function asm(stdlib, foreign, heap) {\n"
- " 'use asm';\n"
- " var f = stdlib.Math.fround;\n"
- " function f() {\n"
- " f = 0;\n"
- " }\n"
- " return f;\n"
- "}",
- "function asm(stdlib, foreign, heap) {\n"
- " 'use asm';\n"
- " var E = stdlib.Math.E;\n"
- " function f() {\n"
- " E = 0;\n"
- " }\n"
- " return f;\n"
- "}",
- };
- for (size_t ii = 0; ii < arraysize(kTests); ++ii) {
- if (!ValidationOf(Module(kTests[ii]))
- ->FailsWithMessage("Can't assign to immutable symbol")) {
- std::cerr << "Test:\n" << kTests[ii];
- CHECK(false);
- }
- }
-}
-
-TEST(B660813) {
- const char* kTests[] = {
- "function asm() {\n"
- " 'use asm';\n"
- " const i = 0xffffffff;\n"
- " function f() {\n"
- " return i;\n"
- " }\n"
- "}",
- "function asm() {\n"
- " 'use asm';\n"
- " const i = -(-2147483648);\n"
- " function f() {\n"
- " return i;\n"
- " }\n"
- "}",
- };
- for (size_t ii = 0; ii < arraysize(kTests); ++ii) {
- if (!ValidationOf(Module(kTests[ii]))
- ->FailsWithMessage(
- "Constant in return must be signed, float, or double.")) {
- std::cerr << "Test:\n" << kTests[ii];
- CHECK(false);
- }
- }
-}
-
-} // namespace
diff --git a/deps/v8/test/cctest/cctest.cc b/deps/v8/test/cctest/cctest.cc
index f94d9bc858..68bcd653bd 100644
--- a/deps/v8/test/cctest/cctest.cc
+++ b/deps/v8/test/cctest/cctest.cc
@@ -43,8 +43,8 @@
#endif
#endif
-enum InitializationState {kUnset, kUnintialized, kInitialized};
-static InitializationState initialization_state_ = kUnset;
+enum InitializationState { kUnset, kUninitialized, kInitialized };
+static InitializationState initialization_state_ = kUnset;
static bool disable_automatic_dispose_ = false;
CcTest* CcTest::last_ = NULL;
@@ -83,10 +83,10 @@ CcTest::CcTest(TestFunction* callback, const char* file, const char* name,
void CcTest::Run() {
if (!initialize_) {
CHECK(initialization_state_ != kInitialized);
- initialization_state_ = kUnintialized;
+ initialization_state_ = kUninitialized;
CHECK(CcTest::isolate_ == NULL);
} else {
- CHECK(initialization_state_ != kUnintialized);
+ CHECK(initialization_state_ != kUninitialized);
initialization_state_ = kInitialized;
if (isolate_ == NULL) {
v8::Isolate::CreateParams create_params;
@@ -113,6 +113,10 @@ void CcTest::CollectGarbage(i::AllocationSpace space) {
heap()->CollectGarbage(space, i::GarbageCollectionReason::kTesting);
}
+void CcTest::CollectAllGarbage() {
+ CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+}
+
void CcTest::CollectAllGarbage(int flags) {
heap()->CollectAllGarbage(flags, i::GarbageCollectionReason::kTesting);
}
@@ -157,7 +161,7 @@ v8::Local<v8::Context> CcTest::NewContext(CcTestExtensionFlags extensions,
void CcTest::DisableAutomaticDispose() {
- CHECK_EQ(kUnintialized, initialization_state_);
+ CHECK_EQ(kUninitialized, initialization_state_);
disable_automatic_dispose_ = true;
}
@@ -210,20 +214,6 @@ static void PrintTestList(CcTest* current) {
}
-class CcTestArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
- virtual void* Allocate(size_t length) {
- void* data = AllocateUninitialized(length == 0 ? 1 : length);
- return data == NULL ? data : memset(data, 0, length);
- }
- virtual void* AllocateUninitialized(size_t length) {
- return malloc(length == 0 ? 1 : length);
- }
- virtual void Free(void* data, size_t length) { free(data); }
- // TODO(dslomov): Remove when v8:2823 is fixed.
- virtual void Free(void* data) { UNREACHABLE(); }
-};
-
-
static void SuggestTestHarness(int tests) {
if (tests == 0) return;
printf("Running multiple tests in sequence is deprecated and may cause "
@@ -273,8 +263,8 @@ int main(int argc, char* argv[]) {
v8::V8::RegisterDefaultSignalHandler();
}
- CcTestArrayBufferAllocator array_buffer_allocator;
- CcTest::set_array_buffer_allocator(&array_buffer_allocator);
+ CcTest::set_array_buffer_allocator(
+ v8::ArrayBuffer::Allocator::NewDefaultAllocator());
i::PrintExtension print_extension;
v8::RegisterExtension(&print_extension);
diff --git a/deps/v8/test/cctest/cctest.gyp b/deps/v8/test/cctest/cctest.gyp
index 55581ea404..cf30741769 100644
--- a/deps/v8/test/cctest/cctest.gyp
+++ b/deps/v8/test/cctest/cctest.gyp
@@ -32,7 +32,6 @@
'v8_code': 1,
'generated_file': '<(SHARED_INTERMEDIATE_DIR)/resources.cc',
'cctest_sources': [ ### gcmole(all) ###
- 'asmjs/test-asm-typer.cc',
'ast-types-fuzz.h',
'compiler/c-signature.h',
'compiler/call-tester.h',
@@ -337,6 +336,7 @@
],
'sources': [
'../common/wasm/test-signatures.h',
+ '../common/wasm/wasm-macro-gen.h',
'../common/wasm/wasm-module-runner.cc',
'../common/wasm/wasm-module-runner.h',
'<@(cctest_sources)',
@@ -444,6 +444,9 @@
}, {
'dependencies': ['../../src/v8.gyp:v8'],
}],
+ ['v8_use_snapshot=="true"', {
+ 'dependencies': ['../../src/v8.gyp:v8_builtins_generators'],
+ }],
],
},
{
diff --git a/deps/v8/test/cctest/cctest.h b/deps/v8/test/cctest/cctest.h
index 7ff55446b1..8ef5d23418 100644
--- a/deps/v8/test/cctest/cctest.h
+++ b/deps/v8/test/cctest/cctest.h
@@ -126,6 +126,7 @@ class CcTest {
static i::Heap* heap();
static void CollectGarbage(i::AllocationSpace space);
+ static void CollectAllGarbage();
static void CollectAllGarbage(int flags);
static void CollectAllAvailableGarbage();
diff --git a/deps/v8/test/cctest/cctest.status b/deps/v8/test/cctest/cctest.status
index 60cc1a444c..b2a21a33a3 100644
--- a/deps/v8/test/cctest/cctest.status
+++ b/deps/v8/test/cctest/cctest.status
@@ -81,9 +81,13 @@
'test-cpu-profiler/SampleWhenFrameIsNotSetup': [SKIP],
# BUG(v8:5193): Flaky.
+ 'test-cpu-profiler/CollectDeoptEvents': [SKIP],
'test-cpu-profiler/FunctionApplySample': [SKIP],
'test-cpu-profiler/JsNative1JsNative2JsSample': [SKIP],
'test-cpu-profiler/JsNativeJsRuntimeJsSample': [SKIP],
+ 'test-cpu-profiler/JsNativeJsRuntimeJsSampleMultiple': [SKIP],
+ 'test-cpu-profiler/JsNativeJsSample': [SKIP],
+ 'test-sampler/LibSamplerCollectSample': [SKIP],
# BUG(2340). Preprocessing stack traces is disabled at the moment.
'test-heap/PreprocessStackTrace': [FAIL],
@@ -140,14 +144,14 @@
' test-api/LoadICFastApi_DirectCall_GCMoveStubWithProfiler': [SKIP],
}], # 'arch == arm64'
-['arch == arm64 and simulator_run == True', {
+['arch == arm64 and simulator_run', {
# Pass but take too long with the simulator.
'test-api/ExternalArrays': [PASS, TIMEOUT],
'test-api/Threading*': [PASS, SKIP],
-}], # 'arch == arm64 and simulator_run == True'
+}], # 'arch == arm64 and simulator_run'
-['arch == arm64 and mode == debug and simulator_run == True', {
+['arch == arm64 and mode == debug and simulator_run', {
# Pass but take too long with the simulator in debug mode.
'test-api/ExternalDoubleArray': [SKIP],
@@ -159,7 +163,7 @@
# BUG(v8:5193): Flaky crash.
'test-sampler/LibSamplerCollectSample': [SKIP],
-}], # 'arch == arm64 and mode == debug and simulator_run == True'
+}], # 'arch == arm64 and mode == debug and simulator_run'
##############################################################################
['asan == True', {
@@ -243,6 +247,17 @@
}], # 'system == windows'
##############################################################################
+['system == windows and arch == x64 and mode == debug', {
+ # BUG(v8:6328).
+ 'test-serialize/PartialSerializerCustomContext': [SKIP],
+ 'test-serialize/PartialSerializerObject': [SKIP],
+ 'test-serialize/StartupSerializerOnce': [SKIP],
+ 'test-serialize/StartupSerializerOnceRunScript': [SKIP],
+ 'test-serialize/StartupSerializerTwiceRunScript': [SKIP],
+ 'test-serialize/StartupSerializerTwice': [SKIP],
+}], # 'system == windows and arch == x64 and mode == debug'
+
+##############################################################################
['system == macos', {
# BUG(v8:5193) Flaky failures.
'test-cpu-profiler/JsNativeJsSample': [SKIP],
@@ -250,6 +265,13 @@
}], # 'system == macos'
##############################################################################
+['arch == arm and simulator_run', {
+
+ # Pass but take too long with the simulator.
+ 'test-api/Threading*': [PASS, SKIP],
+}], # 'arch == arm and simulator_run'
+
+##############################################################################
['arch == arm', {
'test-cpu-profiler/CollectDeoptEvents': [PASS, FAIL],
@@ -291,6 +313,9 @@
'test-parsing/TooManyArguments': [SKIP],
'test-api/Threading5': [SKIP],
'test-api/Threading6': [SKIP],
+
+ # BUG(v8:5193): Flaky timeout.
+ 'test-cpu-profiler/JsNativeJsRuntimeJsSampleMultiple': [SKIP],
}], # 'arch == mips'
##############################################################################
@@ -311,6 +336,16 @@
}], # 'arch == mips64el or arch == mips64'
##############################################################################
+['arch == mips or arch == mipsel or arch == mips64 or arch == mips64el', {
+ # For now skip WASM SIMD tests that fail when MSA instr. extension is not
+ # available (currently simd-scalar-lowering mechanism doesn't work properly
+ # for all SIMD operations)
+ 'test-run-wasm-simd/RunWasmCompiled_S32x4Select': [SKIP],
+ 'test-run-wasm-simd/RunWasmCompiled_F32x4RecipSqrtApprox': [SKIP],
+ 'test-run-wasm-simd/RunWasmCompiled_F32x4RecipApprox': [SKIP],
+}], # 'arch == mips or arch == mipsel or arch == mips64 or arch == mips64el'
+
+##############################################################################
['arch == x87', {
'test-run-machops/RunFloat64InsertLowWord32': [SKIP],
'test-run-native-calls/MixedParams_0': [SKIP],
@@ -360,17 +395,19 @@
'test-run-wasm-module/Run_WasmModule_Return114' : [SKIP],
'test-run-wasm-module/Run_WasmModule_CallAdd' : [SKIP],
'test-run-wasm-module/Run_WasmModule_CallMain_recursive' : [SKIP],
+ # TODO(ppc): Implement load/store reverse byte instructions
+ 'test-run-wasm-simd/RunWasmCompiled_SimdLoadStoreLoad': [SKIP],
}], # 'system == aix or (arch == ppc64 and byteorder == big)'
##############################################################################
-['arch == ppc and simulator_run == True or arch == ppc64 and simulator_run == True', {
+['arch == ppc and simulator_run or arch == ppc64 and simulator_run', {
# Pass but take too long with the simulator.
'test-api/Threading*': [PASS, SLOW],
'test-api/ExternalArrays': [PASS, SLOW],
-}], # 'arch == ppc64 and simulator_run == True'
+}], # 'arch == ppc64 and simulator_run'
##############################################################################
['variant == turbofan_opt', {
@@ -385,6 +422,13 @@
}], # variant == turbofan
##############################################################################
+['variant == noturbofan and no_snap', {
+ # Too slow for old pipeline and nosnap.
+ 'test-lockers/SeparateIsolatesLocksNonexclusive': [SKIP],
+ 'test-lockers/ExtensionsRegistration': [SKIP],
+}], # variant == noturbofan and no_snap
+
+##############################################################################
['variant == wasm_traps', {
'test-accessors/*': [SKIP],
'test-api-interceptors/*': [SKIP],
diff --git a/deps/v8/test/cctest/compiler/call-tester.h b/deps/v8/test/cctest/compiler/call-tester.h
index 77d2ce1e95..06fb1b5202 100644
--- a/deps/v8/test/cctest/compiler/call-tester.h
+++ b/deps/v8/test/cctest/compiler/call-tester.h
@@ -5,6 +5,7 @@
#ifndef V8_CCTEST_COMPILER_CALL_TESTER_H_
#define V8_CCTEST_COMPILER_CALL_TESTER_H_
+#include "src/handles.h"
#include "src/simulator.h"
#include "test/cctest/compiler/c-signature.h"
@@ -127,45 +128,11 @@ class CallHelper {
}
virtual ~CallHelper() {}
- R Call() {
- typedef R V8_CDECL FType();
- CSignature::VerifyParams(csig_);
- return DoCall(FUNCTION_CAST<FType*>(Generate()));
- }
-
- template <typename P1>
- R Call(P1 p1) {
- typedef R V8_CDECL FType(P1);
- CSignature::VerifyParams<P1>(csig_);
- return DoCall(FUNCTION_CAST<FType*>(Generate()), p1);
- }
-
- template <typename P1, typename P2>
- R Call(P1 p1, P2 p2) {
- typedef R V8_CDECL FType(P1, P2);
- CSignature::VerifyParams<P1, P2>(csig_);
- return DoCall(FUNCTION_CAST<FType*>(Generate()), p1, p2);
- }
-
- template <typename P1, typename P2, typename P3>
- R Call(P1 p1, P2 p2, P3 p3) {
- typedef R V8_CDECL FType(P1, P2, P3);
- CSignature::VerifyParams<P1, P2, P3>(csig_);
- return DoCall(FUNCTION_CAST<FType*>(Generate()), p1, p2, p3);
- }
-
- template <typename P1, typename P2, typename P3, typename P4>
- R Call(P1 p1, P2 p2, P3 p3, P4 p4) {
- typedef R V8_CDECL FType(P1, P2, P3, P4);
- CSignature::VerifyParams<P1, P2, P3, P4>(csig_);
- return DoCall(FUNCTION_CAST<FType*>(Generate()), p1, p2, p3, p4);
- }
-
- template <typename P1, typename P2, typename P3, typename P4, typename P5>
- R Call(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) {
- typedef R V8_CDECL FType(P1, P2, P3, P4, P5);
- CSignature::VerifyParams<P1, P2, P3, P4, P5>(csig_);
- return DoCall(FUNCTION_CAST<FType*>(Generate()), p1, p2, p3, p4, p5);
+ template <typename... Params>
+ R Call(Params... args) {
+ using FType = R(V8_CDECL*)(Params...);
+ CSignature::VerifyParams<Params...>(csig_);
+ return DoCall(FUNCTION_CAST<FType>(Generate()), args...);
}
protected:
@@ -180,47 +147,11 @@ class CallHelper {
return static_cast<uintptr_t>(simulator->CallInt64(f, args));
}
- template <typename F>
- R DoCall(F* f) {
- Simulator::CallArgument args[] = {Simulator::CallArgument::End()};
- return CastReturnValue<R>(CallSimulator(FUNCTION_ADDR(f), args));
- }
- template <typename F, typename P1>
- R DoCall(F* f, P1 p1) {
- Simulator::CallArgument args[] = {Simulator::CallArgument(p1),
- Simulator::CallArgument::End()};
- return CastReturnValue<R>(CallSimulator(FUNCTION_ADDR(f), args));
- }
- template <typename F, typename P1, typename P2>
- R DoCall(F* f, P1 p1, P2 p2) {
- Simulator::CallArgument args[] = {Simulator::CallArgument(p1),
- Simulator::CallArgument(p2),
- Simulator::CallArgument::End()};
- return CastReturnValue<R>(CallSimulator(FUNCTION_ADDR(f), args));
- }
- template <typename F, typename P1, typename P2, typename P3>
- R DoCall(F* f, P1 p1, P2 p2, P3 p3) {
- Simulator::CallArgument args[] = {
- Simulator::CallArgument(p1), Simulator::CallArgument(p2),
- Simulator::CallArgument(p3), Simulator::CallArgument::End()};
- return CastReturnValue<R>(CallSimulator(FUNCTION_ADDR(f), args));
- }
- template <typename F, typename P1, typename P2, typename P3, typename P4>
- R DoCall(F* f, P1 p1, P2 p2, P3 p3, P4 p4) {
- Simulator::CallArgument args[] = {
- Simulator::CallArgument(p1), Simulator::CallArgument(p2),
- Simulator::CallArgument(p3), Simulator::CallArgument(p4),
- Simulator::CallArgument::End()};
- return CastReturnValue<R>(CallSimulator(FUNCTION_ADDR(f), args));
- }
- template <typename F, typename P1, typename P2, typename P3, typename P4,
- typename P5>
- R DoCall(F* f, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) {
- Simulator::CallArgument args[] = {
- Simulator::CallArgument(p1), Simulator::CallArgument(p2),
- Simulator::CallArgument(p3), Simulator::CallArgument(p4),
- Simulator::CallArgument(p5), Simulator::CallArgument::End()};
- return CastReturnValue<R>(CallSimulator(FUNCTION_ADDR(f), args));
+ template <typename F, typename... Params>
+ R DoCall(F* f, Params... args) {
+ Simulator::CallArgument args_arr[] = {Simulator::CallArgument(args)...,
+ Simulator::CallArgument::End()};
+ return CastReturnValue<R>(CallSimulator(FUNCTION_ADDR(f), args_arr));
}
#elif USE_SIMULATOR && \
(V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC64 || V8_TARGET_ARCH_S390X)
@@ -230,42 +161,10 @@ class CallHelper {
return static_cast<uintptr_t>(simulator->Call(f, 5, p1, p2, p3, p4, p5));
}
-
- template <typename F>
- R DoCall(F* f) {
- return CastReturnValue<R>(CallSimulator(FUNCTION_ADDR(f)));
- }
- template <typename F, typename P1>
- R DoCall(F* f, P1 p1) {
- return CastReturnValue<R>(
- CallSimulator(FUNCTION_ADDR(f), ParameterTraits<P1>::Cast(p1)));
- }
- template <typename F, typename P1, typename P2>
- R DoCall(F* f, P1 p1, P2 p2) {
- return CastReturnValue<R>(CallSimulator(FUNCTION_ADDR(f),
- ParameterTraits<P1>::Cast(p1),
- ParameterTraits<P2>::Cast(p2)));
- }
- template <typename F, typename P1, typename P2, typename P3>
- R DoCall(F* f, P1 p1, P2 p2, P3 p3) {
- return CastReturnValue<R>(CallSimulator(
- FUNCTION_ADDR(f), ParameterTraits<P1>::Cast(p1),
- ParameterTraits<P2>::Cast(p2), ParameterTraits<P3>::Cast(p3)));
- }
- template <typename F, typename P1, typename P2, typename P3, typename P4>
- R DoCall(F* f, P1 p1, P2 p2, P3 p3, P4 p4) {
- return CastReturnValue<R>(CallSimulator(
- FUNCTION_ADDR(f), ParameterTraits<P1>::Cast(p1),
- ParameterTraits<P2>::Cast(p2), ParameterTraits<P3>::Cast(p3),
- ParameterTraits<P4>::Cast(p4)));
- }
- template <typename F, typename P1, typename P2, typename P3, typename P4,
- typename P5>
- R DoCall(F* f, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) {
+ template <typename F, typename... Params>
+ R DoCall(F* f, Params... args) {
return CastReturnValue<R>(CallSimulator(
- FUNCTION_ADDR(f), ParameterTraits<P1>::Cast(p1),
- ParameterTraits<P2>::Cast(p2), ParameterTraits<P3>::Cast(p3),
- ParameterTraits<P4>::Cast(p4), ParameterTraits<P5>::Cast(p5)));
+ FUNCTION_ADDR(f), ParameterTraits<Params>::Cast(args)...));
}
#elif USE_SIMULATOR && (V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS || \
V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_S390)
@@ -274,67 +173,16 @@ class CallHelper {
Simulator* simulator = Simulator::current(isolate_);
return static_cast<uintptr_t>(simulator->Call(f, 5, p1, p2, p3, p4, p5));
}
- template <typename F>
- R DoCall(F* f) {
- return CastReturnValue<R>(CallSimulator(FUNCTION_ADDR(f)));
- }
- template <typename F, typename P1>
- R DoCall(F* f, P1 p1) {
- return CastReturnValue<R>(
- CallSimulator(FUNCTION_ADDR(f), ParameterTraits<P1>::Cast(p1)));
- }
- template <typename F, typename P1, typename P2>
- R DoCall(F* f, P1 p1, P2 p2) {
- return CastReturnValue<R>(CallSimulator(FUNCTION_ADDR(f),
- ParameterTraits<P1>::Cast(p1),
- ParameterTraits<P2>::Cast(p2)));
- }
- template <typename F, typename P1, typename P2, typename P3>
- R DoCall(F* f, P1 p1, P2 p2, P3 p3) {
- return CastReturnValue<R>(CallSimulator(
- FUNCTION_ADDR(f), ParameterTraits<P1>::Cast(p1),
- ParameterTraits<P2>::Cast(p2), ParameterTraits<P3>::Cast(p3)));
- }
- template <typename F, typename P1, typename P2, typename P3, typename P4>
- R DoCall(F* f, P1 p1, P2 p2, P3 p3, P4 p4) {
- return CastReturnValue<R>(CallSimulator(
- FUNCTION_ADDR(f), ParameterTraits<P1>::Cast(p1),
- ParameterTraits<P2>::Cast(p2), ParameterTraits<P3>::Cast(p3),
- ParameterTraits<P4>::Cast(p4)));
- }
- template <typename F, typename P1, typename P2, typename P3, typename P4,
- typename P5>
- R DoCall(F* f, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) {
+
+ template <typename F, typename... Params>
+ R DoCall(F* f, Params... args) {
return CastReturnValue<R>(CallSimulator(
- FUNCTION_ADDR(f), ParameterTraits<P1>::Cast(p1),
- ParameterTraits<P2>::Cast(p2), ParameterTraits<P3>::Cast(p3),
- ParameterTraits<P4>::Cast(p4), ParameterTraits<P5>::Cast(p5)));
+ FUNCTION_ADDR(f), ParameterTraits<Params>::Cast(args)...));
}
#else
- template <typename F>
- R DoCall(F* f) {
- return f();
- }
- template <typename F, typename P1>
- R DoCall(F* f, P1 p1) {
- return f(p1);
- }
- template <typename F, typename P1, typename P2>
- R DoCall(F* f, P1 p1, P2 p2) {
- return f(p1, p2);
- }
- template <typename F, typename P1, typename P2, typename P3>
- R DoCall(F* f, P1 p1, P2 p2, P3 p3) {
- return f(p1, p2, p3);
- }
- template <typename F, typename P1, typename P2, typename P3, typename P4>
- R DoCall(F* f, P1 p1, P2 p2, P3 p3, P4 p4) {
- return f(p1, p2, p3, p4);
- }
- template <typename F, typename P1, typename P2, typename P3, typename P4,
- typename P5>
- R DoCall(F* f, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) {
- return f(p1, p2, p3, p4, p5);
+ template <typename F, typename... Params>
+ R DoCall(F* f, Params... args) {
+ return f(args...);
}
#endif
diff --git a/deps/v8/test/cctest/compiler/test-js-context-specialization.cc b/deps/v8/test/cctest/compiler/test-js-context-specialization.cc
index 01cd82c9df..ba4f7638f2 100644
--- a/deps/v8/test/cctest/compiler/test-js-context-specialization.cc
+++ b/deps/v8/test/cctest/compiler/test-js-context-specialization.cc
@@ -21,7 +21,7 @@ namespace compiler {
class ContextSpecializationTester : public HandleAndZoneScope {
public:
- explicit ContextSpecializationTester(MaybeHandle<Context> context)
+ explicit ContextSpecializationTester(Maybe<OuterContext> context)
: graph_(new (main_zone()) Graph(main_zone())),
common_(main_zone()),
javascript_(main_zone()),
@@ -103,7 +103,7 @@ void ContextSpecializationTester::CheckContextInputAndDepthChanges(
static const int slot_index = Context::NATIVE_CONTEXT_INDEX;
TEST(ReduceJSLoadContext0) {
- ContextSpecializationTester t((MaybeHandle<Context>()));
+ ContextSpecializationTester t(Nothing<OuterContext>());
Node* start = t.graph()->NewNode(t.common()->Start(0));
t.graph()->SetStart(start);
@@ -174,7 +174,7 @@ TEST(ReduceJSLoadContext1) {
//
// context2 <-- context1 <-- context0 (= Parameter(0))
- ContextSpecializationTester t((MaybeHandle<Context>()));
+ ContextSpecializationTester t(Nothing<OuterContext>());
Node* start = t.graph()->NewNode(t.common()->Start(0));
t.graph()->SetStart(start);
@@ -239,12 +239,12 @@ TEST(ReduceJSLoadContext1) {
TEST(ReduceJSLoadContext2) {
// The graph's context chain ends in a constant context (context_object1),
- // which has has another outer context (context_object0).
+ // which has another outer context (context_object0).
//
// context2 <-- context1 <-- context0 (= HeapConstant(context_object1))
// context_object1 <~~ context_object0
- ContextSpecializationTester t((MaybeHandle<Context>()));
+ ContextSpecializationTester t(Nothing<OuterContext>());
Node* start = t.graph()->NewNode(t.common()->Start(0));
t.graph()->SetStart(start);
@@ -335,7 +335,7 @@ TEST(ReduceJSLoadContext3) {
context_object0->set(slot_index, *slot_value0);
context_object1->set(slot_index, *slot_value1);
- ContextSpecializationTester t(context_object1);
+ ContextSpecializationTester t(Just(OuterContext(context_object1, 0)));
Node* start = t.graph()->NewNode(t.common()->Start(2));
t.graph()->SetStart(start);
@@ -399,7 +399,7 @@ TEST(ReduceJSLoadContext3) {
}
TEST(ReduceJSStoreContext0) {
- ContextSpecializationTester t((MaybeHandle<Context>()));
+ ContextSpecializationTester t(Nothing<OuterContext>());
Node* start = t.graph()->NewNode(t.common()->Start(0));
t.graph()->SetStart(start);
@@ -461,7 +461,7 @@ TEST(ReduceJSStoreContext0) {
}
TEST(ReduceJSStoreContext1) {
- ContextSpecializationTester t((MaybeHandle<Context>()));
+ ContextSpecializationTester t(Nothing<OuterContext>());
Node* start = t.graph()->NewNode(t.common()->Start(0));
t.graph()->SetStart(start);
@@ -505,7 +505,7 @@ TEST(ReduceJSStoreContext1) {
}
TEST(ReduceJSStoreContext2) {
- ContextSpecializationTester t((MaybeHandle<Context>()));
+ ContextSpecializationTester t(Nothing<OuterContext>());
Node* start = t.graph()->NewNode(t.common()->Start(0));
t.graph()->SetStart(start);
@@ -570,7 +570,7 @@ TEST(ReduceJSStoreContext3) {
context_object0->set(slot_index, *slot_value0);
context_object1->set(slot_index, *slot_value1);
- ContextSpecializationTester t(context_object1);
+ ContextSpecializationTester t(Just(OuterContext(context_object1, 0)));
Node* start = t.graph()->NewNode(t.common()->Start(2));
t.graph()->SetStart(start);
diff --git a/deps/v8/test/cctest/compiler/test-run-machops.cc b/deps/v8/test/cctest/compiler/test-run-machops.cc
index b5eeb8717e..c694d8aa1d 100644
--- a/deps/v8/test/cctest/compiler/test-run-machops.cc
+++ b/deps/v8/test/cctest/compiler/test-run-machops.cc
@@ -6163,6 +6163,11 @@ int32_t foo8(int32_t a, int32_t b, int32_t c, int32_t d, int32_t e, int32_t f,
return a + b + c + d + e + f + g + h;
}
+int32_t foo9(int32_t a, int32_t b, int32_t c, int32_t d, int32_t e, int32_t f,
+ int32_t g, int32_t h, int32_t i) {
+ return a + b + c + d + e + f + g + h + i;
+}
+
} // namespace
@@ -6221,6 +6226,30 @@ TEST(RunCallCFunction8) {
CHECK_EQ(x * 8, m.Call(x));
}
}
+
+TEST(RunCallCFunction9) {
+ auto* foo9_ptr = &foo9;
+ RawMachineAssemblerTester<int32_t> m(MachineType::Int32());
+ Node* function = m.LoadFromPointer(&foo9_ptr, MachineType::Pointer());
+ Node* param = m.Parameter(0);
+ m.Return(m.CallCFunction9(
+ MachineType::Int32(), MachineType::Int32(), MachineType::Int32(),
+ MachineType::Int32(), MachineType::Int32(), MachineType::Int32(),
+ MachineType::Int32(), MachineType::Int32(), MachineType::Int32(),
+ MachineType::Int32(), function, param,
+ m.Int32Add(param, m.Int32Constant(1)),
+ m.Int32Add(param, m.Int32Constant(2)),
+ m.Int32Add(param, m.Int32Constant(3)),
+ m.Int32Add(param, m.Int32Constant(4)),
+ m.Int32Add(param, m.Int32Constant(5)),
+ m.Int32Add(param, m.Int32Constant(6)),
+ m.Int32Add(param, m.Int32Constant(7)),
+ m.Int32Add(param, m.Int32Constant(8))));
+ FOR_INT32_INPUTS(i) {
+ int32_t const x = *i;
+ CHECK_EQ(x * 9 + 36, m.Call(x));
+ }
+}
#endif // USE_SIMULATOR
#if V8_TARGET_ARCH_64_BIT
@@ -6710,6 +6739,34 @@ TEST(ParentFramePointer) {
CHECK_EQ(1, r.Call(1));
}
+#if V8_HOST_ARCH_MIPS || V8_HOST_ARCH_MIPS64
+
+TEST(StackSlotAlignment) {
+ RawMachineAssemblerTester<int32_t> r;
+ RawMachineLabel tlabel;
+ RawMachineLabel flabel;
+ RawMachineLabel merge;
+
+ int alignments[] = {4, 8, 16};
+ int alignment_count = arraysize(alignments);
+
+ Node* alignment_counter = r.Int32Constant(0);
+ for (int i = 0; i < alignment_count; i++) {
+ for (int j = 0; j < 5; j++) {
+ Node* stack_slot =
+ r.StackSlot(MachineRepresentation::kWord32, alignments[i]);
+ alignment_counter = r.Int32Add(
+ alignment_counter,
+ r.Word32And(stack_slot, r.Int32Constant(alignments[i] - 1)));
+ }
+ }
+
+ r.Return(alignment_counter);
+ CHECK_EQ(0, r.Call());
+}
+
+#endif // V8_HOST_ARCH_MIPS || V8_HOST_ARCH_MIPS64
+
#if V8_TARGET_ARCH_64_BIT
TEST(Regression5923) {
@@ -6778,6 +6835,27 @@ TEST(Regression6028) {
CHECK_EQ(1, m.Call());
}
+TEST(Regression5951_32bit) {
+ BufferedRawMachineAssemblerTester<int32_t> m(MachineType::Int32());
+ m.Return(m.Word32And(m.Word32Shr(m.Parameter(0), m.Int32Constant(0)),
+ m.Int32Constant(0xffffffff)));
+ int32_t input = 1234;
+ CHECK_EQ(input, m.Call(input));
+}
+
+TEST(Regression738952) {
+ RawMachineAssemblerTester<int32_t> m;
+
+ int32_t sentinel = 1234;
+ // The index can be any value where the lower bits are 0 and the upper bits
+ // are not 0;
+ int64_t index = 3224;
+ index <<= 32;
+ double d = static_cast<double>(index);
+ m.Return(m.Load(MachineType::Int32(), m.PointerConstant(&sentinel),
+ m.TruncateFloat64ToWord32(m.Float64Constant(d))));
+ CHECK_EQ(sentinel, m.Call());
+}
} // namespace compiler
} // namespace internal
} // namespace v8
diff --git a/deps/v8/test/cctest/heap/test-array-buffer-tracker.cc b/deps/v8/test/cctest/heap/test-array-buffer-tracker.cc
index 11bc4c0727..04cc881b25 100644
--- a/deps/v8/test/cctest/heap/test-array-buffer-tracker.cc
+++ b/deps/v8/test/cctest/heap/test-array-buffer-tracker.cc
@@ -132,7 +132,7 @@ TEST(ArrayBuffer_Compaction) {
heap::ForceEvacuationCandidate(page_before_gc);
CHECK(IsTracked(*buf1));
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
Page* page_after_gc = Page::FromAddress(buf1->address());
CHECK(IsTracked(*buf1));
@@ -310,6 +310,12 @@ UNINITIALIZED_TEST(ArrayBuffer_SemiSpaceCopyMultipleTasks) {
v8::Context::New(isolate)->Enter();
Heap* heap = i_isolate->heap();
+ // Ensure heap is in a clean state.
+ heap->CollectAllGarbage(Heap::kFinalizeIncrementalMarkingMask,
+ GarbageCollectionReason::kTesting);
+ heap->CollectAllGarbage(Heap::kFinalizeIncrementalMarkingMask,
+ GarbageCollectionReason::kTesting);
+
Local<v8::ArrayBuffer> ab1 = v8::ArrayBuffer::New(isolate, 100);
Handle<JSArrayBuffer> buf1 = v8::Utils::OpenHandle(*ab1);
heap::FillCurrentPage(heap->new_space());
diff --git a/deps/v8/test/cctest/heap/test-compaction.cc b/deps/v8/test/cctest/heap/test-compaction.cc
index b7780fa409..64e7a09255 100644
--- a/deps/v8/test/cctest/heap/test-compaction.cc
+++ b/deps/v8/test/cctest/heap/test-compaction.cc
@@ -68,7 +68,7 @@ HEAP_TEST(CompactionFullAbortedPage) {
CheckAllObjectsOnPage(compaction_page_handles, to_be_aborted_page);
heap->set_force_oom(true);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
heap->mark_compact_collector()->EnsureSweepingCompleted();
// Check that all handles still point to the same page, i.e., compaction
@@ -128,7 +128,7 @@ HEAP_TEST(CompactionPartiallyAbortedPage) {
Page::FromAddress(page_to_fill_handles.front()->address());
heap->set_force_oom(true);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
heap->mark_compact_collector()->EnsureSweepingCompleted();
bool migration_aborted = false;
@@ -210,7 +210,7 @@ HEAP_TEST(CompactionPartiallyAbortedPageIntraAbortedPointers) {
Page::FromAddress(page_to_fill_handles.front()->address());
heap->set_force_oom(true);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
heap->mark_compact_collector()->EnsureSweepingCompleted();
// The following check makes sure that we compacted "some" objects, while
@@ -303,7 +303,7 @@ HEAP_TEST(CompactionPartiallyAbortedPageWithStoreBufferEntries) {
Page::FromAddress(page_to_fill_handles.front()->address());
heap->set_force_oom(true);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
heap->mark_compact_collector()->EnsureSweepingCompleted();
// The following check makes sure that we compacted "some" objects, while
diff --git a/deps/v8/test/cctest/heap/test-concurrent-marking.cc b/deps/v8/test/cctest/heap/test-concurrent-marking.cc
index ce52018e29..03ee6c4b8c 100644
--- a/deps/v8/test/cctest/heap/test-concurrent-marking.cc
+++ b/deps/v8/test/cctest/heap/test-concurrent-marking.cc
@@ -18,8 +18,9 @@ TEST(ConcurrentMarking) {
if (!i::FLAG_concurrent_marking) return;
CcTest::InitializeVM();
Heap* heap = CcTest::heap();
- ConcurrentMarking* concurrent_marking = new ConcurrentMarking(heap);
- concurrent_marking->AddRoot(heap->undefined_value());
+ ConcurrentMarkingDeque deque(heap);
+ deque.Push(heap->undefined_value());
+ ConcurrentMarking* concurrent_marking = new ConcurrentMarking(heap, &deque);
concurrent_marking->StartTask();
concurrent_marking->WaitForTaskToComplete();
delete concurrent_marking;
diff --git a/deps/v8/test/cctest/heap/test-heap.cc b/deps/v8/test/cctest/heap/test-heap.cc
index 6446adba6a..fc2b68e809 100644
--- a/deps/v8/test/cctest/heap/test-heap.cc
+++ b/deps/v8/test/cctest/heap/test-heap.cc
@@ -529,6 +529,129 @@ TEST(WeakGlobalHandlesScavenge) {
GlobalHandles::Destroy(h2.location());
}
+TEST(WeakGlobalUnmodifiedApiHandlesScavenge) {
+ CcTest::InitializeVM();
+ Isolate* isolate = CcTest::i_isolate();
+ LocalContext context;
+ Factory* factory = isolate->factory();
+ GlobalHandles* global_handles = isolate->global_handles();
+
+ WeakPointerCleared = false;
+
+ Handle<Object> h1;
+ Handle<Object> h2;
+
+ {
+ HandleScope scope(isolate);
+
+ // Create an Api object that is unmodified.
+ auto function = FunctionTemplate::New(context->GetIsolate())
+ ->GetFunction(context.local())
+ .ToLocalChecked();
+ auto i = function->NewInstance(context.local()).ToLocalChecked();
+ Handle<Object> u = factory->NewNumber(1.12344);
+
+ h1 = global_handles->Create(*u);
+ h2 = global_handles->Create(*(reinterpret_cast<internal::Object**>(*i)));
+ }
+
+ std::pair<Handle<Object>*, int> handle_and_id(&h2, 1234);
+ GlobalHandles::MakeWeak(
+ h2.location(), reinterpret_cast<void*>(&handle_and_id),
+ &TestWeakGlobalHandleCallback, v8::WeakCallbackType::kParameter);
+
+ CcTest::CollectGarbage(NEW_SPACE);
+
+ CHECK((*h1)->IsHeapNumber());
+ CHECK(WeakPointerCleared);
+ CHECK(!global_handles->IsNearDeath(h1.location()));
+
+ GlobalHandles::Destroy(h1.location());
+}
+
+TEST(WeakGlobalApiHandleModifiedMapScavenge) {
+ CcTest::InitializeVM();
+ Isolate* isolate = CcTest::i_isolate();
+ LocalContext context;
+ GlobalHandles* global_handles = isolate->global_handles();
+
+ WeakPointerCleared = false;
+
+ Handle<Object> h1;
+
+ {
+ HandleScope scope(isolate);
+
+ // Create an API object which does not have the same map as constructor.
+ auto function_template = FunctionTemplate::New(context->GetIsolate());
+ auto instance_t = function_template->InstanceTemplate();
+ instance_t->Set(v8::String::NewFromUtf8(context->GetIsolate(), "a",
+ NewStringType::kNormal)
+ .ToLocalChecked(),
+ v8::Number::New(context->GetIsolate(), 10));
+ auto function =
+ function_template->GetFunction(context.local()).ToLocalChecked();
+ auto i = function->NewInstance(context.local()).ToLocalChecked();
+
+ h1 = global_handles->Create(*(reinterpret_cast<internal::Object**>(*i)));
+ }
+
+ std::pair<Handle<Object>*, int> handle_and_id(&h1, 1234);
+ GlobalHandles::MakeWeak(
+ h1.location(), reinterpret_cast<void*>(&handle_and_id),
+ &TestWeakGlobalHandleCallback, v8::WeakCallbackType::kParameter);
+
+ CcTest::CollectGarbage(NEW_SPACE);
+
+ CHECK(!WeakPointerCleared);
+ CHECK(!global_handles->IsNearDeath(h1.location()));
+
+ GlobalHandles::Destroy(h1.location());
+}
+
+TEST(WeakGlobalApiHandleWithElementsScavenge) {
+ CcTest::InitializeVM();
+ Isolate* isolate = CcTest::i_isolate();
+ LocalContext context;
+ GlobalHandles* global_handles = isolate->global_handles();
+
+ WeakPointerCleared = false;
+
+ Handle<Object> h1;
+
+ {
+ HandleScope scope(isolate);
+
+ // Create an API object which has elements.
+ auto function_template = FunctionTemplate::New(context->GetIsolate());
+ auto instance_t = function_template->InstanceTemplate();
+ instance_t->Set(v8::String::NewFromUtf8(context->GetIsolate(), "1",
+ NewStringType::kNormal)
+ .ToLocalChecked(),
+ v8::Number::New(context->GetIsolate(), 10));
+ instance_t->Set(v8::String::NewFromUtf8(context->GetIsolate(), "2",
+ NewStringType::kNormal)
+ .ToLocalChecked(),
+ v8::Number::New(context->GetIsolate(), 10));
+ auto function =
+ function_template->GetFunction(context.local()).ToLocalChecked();
+ auto i = function->NewInstance(context.local()).ToLocalChecked();
+
+ h1 = global_handles->Create(*(reinterpret_cast<internal::Object**>(*i)));
+ }
+
+ std::pair<Handle<Object>*, int> handle_and_id(&h1, 1234);
+ GlobalHandles::MakeWeak(
+ h1.location(), reinterpret_cast<void*>(&handle_and_id),
+ &TestWeakGlobalHandleCallback, v8::WeakCallbackType::kParameter);
+
+ CcTest::CollectGarbage(NEW_SPACE);
+
+ CHECK(!WeakPointerCleared);
+ CHECK(!global_handles->IsNearDeath(h1.location()));
+
+ GlobalHandles::Destroy(h1.location());
+}
TEST(WeakGlobalHandlesMark) {
CcTest::InitializeVM();
@@ -565,7 +688,7 @@ TEST(WeakGlobalHandlesMark) {
CHECK(!GlobalHandles::IsNearDeath(h2.location()));
// Incremental marking potentially marked handles before they turned weak.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK((*h1)->IsString());
@@ -653,7 +776,7 @@ TEST(BytecodeArray) {
// evacuation candidate.
Page* evac_page = Page::FromAddress(constant_pool->address());
heap::ForceEvacuationCandidate(evac_page);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
// BytecodeArray should survive.
CHECK_EQ(array->length(), kRawBytesSize);
@@ -1184,12 +1307,12 @@ TEST(TestCodeFlushingPreAged) {
CHECK(function->shared()->is_compiled());
// The code has been run so will survive at least one GC.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK(function->shared()->is_compiled());
// The code was only run once, so it should be pre-aged and collected on the
// next GC.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK(!function->shared()->is_compiled() || function->IsOptimized() ||
function->IsInterpreted());
@@ -1200,14 +1323,14 @@ TEST(TestCodeFlushingPreAged) {
}
// The code will survive at least two GC now that it is young again.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
+ CcTest::CollectAllGarbage();
CHECK(function->shared()->is_compiled());
// Simulate several GCs that use full marking.
const int kAgingThreshold = 6;
for (int i = 0; i < kAgingThreshold; i++) {
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
}
// foo should no longer be in the compilation cache
@@ -1253,15 +1376,15 @@ TEST(TestCodeFlushingIncremental) {
CHECK(function->shared()->is_compiled());
// The code will survive at least two GCs.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
+ CcTest::CollectAllGarbage();
CHECK(function->shared()->is_compiled());
// Simulate several GCs that use incremental marking.
const int kAgingThreshold = 6;
for (int i = 0; i < kAgingThreshold; i++) {
heap::SimulateIncrementalMarking(CcTest::heap());
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
}
CHECK(!function->shared()->is_compiled() || function->IsOptimized() ||
function->IsInterpreted());
@@ -1279,7 +1402,7 @@ TEST(TestCodeFlushingIncremental) {
heap::SimulateIncrementalMarking(CcTest::heap());
if (!function->next_function_link()->IsUndefined(CcTest::i_isolate()))
break;
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
}
// Force optimization while incremental marking is active and while
@@ -1289,7 +1412,7 @@ TEST(TestCodeFlushingIncremental) {
}
// Simulate one final GC to make sure the candidate queue is sane.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK(function->shared()->is_compiled() || !function->IsOptimized());
CHECK(function->is_compiled() || !function->IsOptimized());
}
@@ -1319,7 +1442,7 @@ TEST(TestCodeFlushingIncrementalScavenge) {
Handle<String> bar_name = factory->InternalizeUtf8String("bar");
// Perfrom one initial GC to enable code flushing.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
// This compile will add the code to the compilation cache.
{ v8::HandleScope scope(CcTest::isolate());
@@ -1359,7 +1482,7 @@ TEST(TestCodeFlushingIncrementalScavenge) {
CcTest::CollectGarbage(NEW_SPACE);
// Simulate one final GC to make sure the candidate queue is sane.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK(!function->shared()->is_compiled() || function->IsOptimized() ||
function->IsInterpreted());
CHECK(!function->is_compiled() || function->IsOptimized() ||
@@ -1399,8 +1522,8 @@ TEST(TestCodeFlushingIncrementalAbort) {
CHECK(function->shared()->is_compiled());
// The code will survive at least two GCs.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
+ CcTest::CollectAllGarbage();
CHECK(function->shared()->is_compiled());
// Bump the code age so that flushing is triggered.
@@ -1429,7 +1552,7 @@ TEST(TestCodeFlushingIncrementalAbort) {
}
// Simulate one final GC to make sure the candidate queue is sane.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK(function->shared()->is_compiled() || !function->IsOptimized());
CHECK(function->is_compiled() || !function->IsOptimized());
}
@@ -1515,7 +1638,7 @@ TEST(CompilationCacheCachingBehavior) {
// (Unless --optimize-for-size, in which case it might get collected
// immediately.)
if (!FLAG_optimize_for_size) {
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
pair = compilation_cache->LookupScript(source, Handle<Object>(), 0, 0,
v8::ScriptOriginOptions(true, false),
native_context, language_mode);
@@ -1531,7 +1654,7 @@ TEST(CompilationCacheCachingBehavior) {
}
}
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
// Ensure code aging cleared the entry from the cache.
pair = compilation_cache->LookupScript(source, Handle<Object>(), 0, 0,
v8::ScriptOriginOptions(true, false),
@@ -1595,7 +1718,7 @@ TEST(TestInternalWeakLists) {
Isolate* isolate = CcTest::i_isolate();
HandleScope scope(isolate);
v8::Local<v8::Context> ctx[kNumTestContexts];
- if (!isolate->use_crankshaft()) return;
+ if (!isolate->use_optimizer()) return;
CHECK_EQ(0, CountNativeContexts());
@@ -1606,7 +1729,7 @@ TEST(TestInternalWeakLists) {
// Collect garbage that might have been created by one of the
// installed extensions.
isolate->compilation_cache()->Clear();
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(i + 1, CountNativeContexts());
@@ -1638,7 +1761,7 @@ TEST(TestInternalWeakLists) {
// Mark compact handles the weak references.
isolate->compilation_cache()->Clear();
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(4, CountOptimizedUserFunctions(ctx[i]));
// Get rid of f3 and f5 in the same way.
@@ -1647,14 +1770,14 @@ TEST(TestInternalWeakLists) {
CcTest::CollectGarbage(NEW_SPACE);
CHECK_EQ(4, CountOptimizedUserFunctions(ctx[i]));
}
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(3, CountOptimizedUserFunctions(ctx[i]));
CompileRun("f5=null");
for (int j = 0; j < 10; j++) {
CcTest::CollectGarbage(NEW_SPACE);
CHECK_EQ(3, CountOptimizedUserFunctions(ctx[i]));
}
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(2, CountOptimizedUserFunctions(ctx[i]));
ctx[i]->Exit();
@@ -1662,7 +1785,7 @@ TEST(TestInternalWeakLists) {
// Force compilation cache cleanup.
CcTest::heap()->NotifyContextDisposed(true);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
// Dispose the native contexts one by one.
for (int i = 0; i < kNumTestContexts; i++) {
@@ -1678,7 +1801,7 @@ TEST(TestInternalWeakLists) {
}
// Mark compact handles the weak references.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(kNumTestContexts - i - 1, CountNativeContexts());
}
@@ -1694,8 +1817,7 @@ static int CountNativeContextsWithGC(Isolate* isolate, int n) {
Handle<Object> object(heap->native_contexts_list(), isolate);
while (!object->IsUndefined(isolate)) {
count++;
- if (count == n)
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ if (count == n) CcTest::CollectAllGarbage();
object =
Handle<Object>(Context::cast(*object)->next_context_link(), isolate);
}
@@ -1738,7 +1860,7 @@ TEST(TestInternalWeakListsTraverseWithGC) {
Isolate* isolate = CcTest::i_isolate();
HandleScope scope(isolate);
v8::Local<v8::Context> ctx[kNumTestContexts];
- if (!isolate->use_crankshaft()) return;
+ if (!isolate->use_optimizer()) return;
CHECK_EQ(0, CountNativeContexts());
@@ -1810,11 +1932,11 @@ TEST(TestSizeOfRegExpCode) {
int initial_size = static_cast<int>(CcTest::heap()->SizeOfObjects());
CompileRun("'foo'.match(reg_exp_source);");
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
int size_with_regexp = static_cast<int>(CcTest::heap()->SizeOfObjects());
CompileRun("'foo'.match(half_size_reg_exp);");
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
int size_with_optimized_regexp =
static_cast<int>(CcTest::heap()->SizeOfObjects());
@@ -1861,7 +1983,7 @@ HEAP_TEST(TestSizeOfObjects) {
// The heap size should go back to initial size after a full GC, even
// though sweeping didn't finish yet.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
// Normally sweeping would not be complete here, but no guarantees.
CHECK_EQ(initial_size, static_cast<int>(heap->SizeOfObjects()));
// Waiting for sweeper threads should not change heap size.
@@ -2107,8 +2229,7 @@ TEST(GrowAndShrinkNewSpace) {
}
// Make sure we're in a consistent state to start out.
- CcTest::CollectGarbage(NEW_SPACE);
- CcTest::CollectGarbage(NEW_SPACE);
+ CcTest::CollectAllGarbage();
// Explicitly growing should double the space capacity.
size_t old_capacity, new_capacity;
@@ -2387,7 +2508,7 @@ TEST(InstanceOfStubWriteBarrier) {
#endif
CcTest::InitializeVM();
- if (!CcTest::i_isolate()->use_crankshaft()) return;
+ if (!CcTest::i_isolate()->use_optimizer()) return;
if (i::FLAG_force_marking_deque_overflows) return;
v8::HandleScope outer_scope(CcTest::isolate());
v8::Local<v8::Context> ctx = CcTest::isolate()->GetCurrentContext();
@@ -2456,7 +2577,7 @@ TEST(ResetSharedFunctionInfoCountersDuringIncrementalMarking) {
#endif
CcTest::InitializeVM();
- if (!CcTest::i_isolate()->use_crankshaft()) return;
+ if (!CcTest::i_isolate()->use_optimizer()) return;
v8::HandleScope outer_scope(CcTest::isolate());
v8::Local<v8::Context> ctx = CcTest::isolate()->GetCurrentContext();
@@ -2485,7 +2606,7 @@ TEST(ResetSharedFunctionInfoCountersDuringIncrementalMarking) {
// The following calls will increment CcTest::heap()->global_ic_age().
CcTest::isolate()->ContextDisposedNotification();
heap::SimulateIncrementalMarking(CcTest::heap());
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(CcTest::heap()->global_ic_age(), f->shared()->ic_age());
CHECK_EQ(0, f->shared()->opt_count());
@@ -2501,7 +2622,7 @@ TEST(ResetSharedFunctionInfoCountersDuringMarkSweep) {
#endif
CcTest::InitializeVM();
- if (!CcTest::i_isolate()->use_crankshaft()) return;
+ if (!CcTest::i_isolate()->use_optimizer()) return;
v8::HandleScope outer_scope(CcTest::isolate());
v8::Local<v8::Context> ctx = CcTest::isolate()->GetCurrentContext();
@@ -2527,7 +2648,7 @@ TEST(ResetSharedFunctionInfoCountersDuringMarkSweep) {
// The following two calls will increment CcTest::heap()->global_ic_age().
CcTest::isolate()->ContextDisposedNotification();
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(CcTest::heap()->global_ic_age(), f->shared()->ic_age());
CHECK_EQ(0, f->shared()->opt_count());
@@ -2619,7 +2740,7 @@ TEST(IdleNotificationFinishMarking) {
TEST(OptimizedAllocationAlwaysInNewSpace) {
i::FLAG_allow_natives_syntax = true;
CcTest::InitializeVM();
- if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
+ if (!CcTest::i_isolate()->use_optimizer() || i::FLAG_always_opt) return;
if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
v8::HandleScope scope(CcTest::isolate());
v8::Local<v8::Context> ctx = CcTest::isolate()->GetCurrentContext();
@@ -2654,7 +2775,7 @@ TEST(OptimizedPretenuringAllocationFolding) {
i::FLAG_allow_natives_syntax = true;
i::FLAG_expose_gc = true;
CcTest::InitializeVM();
- if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
+ if (!CcTest::i_isolate()->use_optimizer() || i::FLAG_always_opt) return;
if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
v8::HandleScope scope(CcTest::isolate());
v8::Local<v8::Context> ctx = CcTest::isolate()->GetCurrentContext();
@@ -2705,7 +2826,7 @@ TEST(OptimizedPretenuringObjectArrayLiterals) {
i::FLAG_allow_natives_syntax = true;
i::FLAG_expose_gc = true;
CcTest::InitializeVM();
- if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
+ if (!CcTest::i_isolate()->use_optimizer() || i::FLAG_always_opt) return;
if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
v8::HandleScope scope(CcTest::isolate());
@@ -2745,7 +2866,7 @@ TEST(OptimizedPretenuringMixedInObjectProperties) {
i::FLAG_allow_natives_syntax = true;
i::FLAG_expose_gc = true;
CcTest::InitializeVM();
- if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
+ if (!CcTest::i_isolate()->use_optimizer() || i::FLAG_always_opt) return;
if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
v8::HandleScope scope(CcTest::isolate());
@@ -2803,7 +2924,7 @@ TEST(OptimizedPretenuringDoubleArrayProperties) {
i::FLAG_allow_natives_syntax = true;
i::FLAG_expose_gc = true;
CcTest::InitializeVM();
- if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
+ if (!CcTest::i_isolate()->use_optimizer() || i::FLAG_always_opt) return;
if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
v8::HandleScope scope(CcTest::isolate());
@@ -2843,7 +2964,7 @@ TEST(OptimizedPretenuringdoubleArrayLiterals) {
i::FLAG_allow_natives_syntax = true;
i::FLAG_expose_gc = true;
CcTest::InitializeVM();
- if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
+ if (!CcTest::i_isolate()->use_optimizer() || i::FLAG_always_opt) return;
if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
v8::HandleScope scope(CcTest::isolate());
@@ -2883,7 +3004,7 @@ TEST(OptimizedPretenuringNestedMixedArrayLiterals) {
i::FLAG_allow_natives_syntax = true;
i::FLAG_expose_gc = true;
CcTest::InitializeVM();
- if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
+ if (!CcTest::i_isolate()->use_optimizer() || i::FLAG_always_opt) return;
if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
v8::HandleScope scope(CcTest::isolate());
v8::Local<v8::Context> ctx = CcTest::isolate()->GetCurrentContext();
@@ -2933,7 +3054,7 @@ TEST(OptimizedPretenuringNestedObjectLiterals) {
i::FLAG_allow_natives_syntax = true;
i::FLAG_expose_gc = true;
CcTest::InitializeVM();
- if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
+ if (!CcTest::i_isolate()->use_optimizer() || i::FLAG_always_opt) return;
if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
v8::HandleScope scope(CcTest::isolate());
v8::Local<v8::Context> ctx = CcTest::isolate()->GetCurrentContext();
@@ -2984,7 +3105,7 @@ TEST(OptimizedPretenuringNestedDoubleLiterals) {
i::FLAG_allow_natives_syntax = true;
i::FLAG_expose_gc = true;
CcTest::InitializeVM();
- if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
+ if (!CcTest::i_isolate()->use_optimizer() || i::FLAG_always_opt) return;
if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
v8::HandleScope scope(CcTest::isolate());
v8::Local<v8::Context> ctx = CcTest::isolate()->GetCurrentContext();
@@ -3035,7 +3156,7 @@ TEST(OptimizedPretenuringNestedDoubleLiterals) {
TEST(OptimizedAllocationArrayLiterals) {
i::FLAG_allow_natives_syntax = true;
CcTest::InitializeVM();
- if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
+ if (!CcTest::i_isolate()->use_optimizer() || i::FLAG_always_opt) return;
if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
v8::HandleScope scope(CcTest::isolate());
v8::Local<v8::Context> ctx = CcTest::isolate()->GetCurrentContext();
@@ -3100,7 +3221,7 @@ TEST(Regress1465) {
CHECK_EQ(transitions_count, transitions_before);
heap::SimulateIncrementalMarking(CcTest::heap());
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
// Count number of live transitions after marking. Note that one transition
// is left, because 'o' still holds an instance of one transition target.
@@ -3284,7 +3405,7 @@ TEST(Regress2143a) {
CcTest::heap()->AgeInlineCaches();
// Explicitly request GC to perform final marking step and sweeping.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
Handle<JSReceiver> root = v8::Utils::OpenHandle(*v8::Local<v8::Object>::Cast(
CcTest::global()
@@ -3327,7 +3448,7 @@ TEST(Regress2143b) {
CcTest::heap()->AgeInlineCaches();
// Explicitly request GC to perform final marking step and sweeping.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
Handle<JSReceiver> root = v8::Utils::OpenHandle(*v8::Local<v8::Object>::Cast(
CcTest::global()
@@ -3344,7 +3465,7 @@ TEST(ReleaseOverReservedPages) {
if (FLAG_never_compact) return;
i::FLAG_trace_gc = true;
// The optimizer can allocate stuff, messing up the test.
- i::FLAG_crankshaft = false;
+ i::FLAG_opt = false;
i::FLAG_always_opt = false;
// Parallel compaction increases fragmentation, depending on how existing
// memory is distributed. Since this is non-deterministic because of
@@ -3378,14 +3499,14 @@ TEST(ReleaseOverReservedPages) {
// Triggering one GC will cause a lot of garbage to be discovered but
// even spread across all allocated pages.
- CcTest::CollectAllGarbage(Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_GE(overall_page_count, old_space->CountTotalPages());
// Triggering subsequent GCs should cause at least half of the pages
// to be released to the OS after at most two cycles.
- CcTest::CollectAllGarbage(Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_GE(overall_page_count, old_space->CountTotalPages());
- CcTest::CollectAllGarbage(Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_GE(overall_page_count, old_space->CountTotalPages() * 2);
// Triggering a last-resort GC should cause all pages to be released to the
@@ -3481,7 +3602,7 @@ TEST(IncrementalMarkingPreservesMonomorphicCallIC) {
CHECK(feedback_vector->Get(feedback_helper.slot(slot2))->IsWeakCell());
heap::SimulateIncrementalMarking(CcTest::heap());
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK(!WeakCell::cast(feedback_vector->Get(feedback_helper.slot(slot1)))
->cleared());
@@ -3538,7 +3659,7 @@ TEST(IncrementalMarkingPreservesMonomorphicConstructor) {
CHECK(vector->Get(FeedbackSlot(0))->IsWeakCell());
heap::SimulateIncrementalMarking(CcTest::heap());
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK(vector->Get(FeedbackSlot(0))->IsWeakCell());
}
@@ -3560,7 +3681,7 @@ TEST(IncrementalMarkingPreservesMonomorphicIC) {
CheckVectorIC(f, 0, MONOMORPHIC);
heap::SimulateIncrementalMarking(CcTest::heap());
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CheckVectorIC(f, 0, MONOMORPHIC);
}
@@ -3598,7 +3719,7 @@ TEST(IncrementalMarkingPreservesPolymorphicIC) {
// Fire context dispose notification.
heap::SimulateIncrementalMarking(CcTest::heap());
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CheckVectorIC(f, 0, POLYMORPHIC);
}
@@ -3637,7 +3758,7 @@ TEST(ContextDisposeDoesntClearPolymorphicIC) {
// Fire context dispose notification.
CcTest::isolate()->ContextDisposedNotification();
heap::SimulateIncrementalMarking(CcTest::heap());
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CheckVectorIC(f, 0, POLYMORPHIC);
}
@@ -3769,7 +3890,7 @@ TEST(Regress159140) {
HandleScope scope(isolate);
// Perform one initial GC to enable code flushing.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
// Prepare several closures that are all eligible for code flushing
// because all reachable ones are not optimized. Make sure that the
@@ -3813,7 +3934,7 @@ TEST(Regress159140) {
// finish the GC to complete code flushing.
heap::SimulateIncrementalMarking(heap);
CompileRun("%OptimizeFunctionOnNextCall(g); g(3);");
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
// Unoptimized code is missing and the deoptimizer will go ballistic.
CompileRun("g('bozo');");
@@ -3829,7 +3950,7 @@ TEST(Regress165495) {
HandleScope scope(isolate);
// Perform one initial GC to enable code flushing.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
// Prepare an optimized closure that the optimized code map will get
// populated. Then age the unoptimized code to trigger code flushing
@@ -3859,7 +3980,7 @@ TEST(Regress165495) {
// Simulate incremental marking so that unoptimized code is flushed
// even though it still is cached in the optimized code map.
heap::SimulateIncrementalMarking(heap);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
// Make a new closure that will get code installed from the code map.
// Unoptimized code is missing and the deoptimizer will go ballistic.
@@ -3881,7 +4002,7 @@ TEST(Regress169209) {
HandleScope scope(isolate);
// Perform one initial GC to enable code flushing.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
// Prepare a shared function info eligible for code flushing for which
// the unoptimized code will be replaced during optimization.
@@ -3939,14 +4060,14 @@ TEST(Regress169209) {
"g(false);");
// Finish garbage collection cycle.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK(shared1->code()->gc_metadata() == NULL);
}
TEST(Regress169928) {
i::FLAG_allow_natives_syntax = true;
- i::FLAG_crankshaft = false;
+ i::FLAG_opt = false;
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
LocalContext env;
@@ -4068,8 +4189,8 @@ TEST(Regress513507) {
heap->set_allocation_timeout(5);
FLAG_gc_interval = 1000;
for (int i = 0; i < 10; ++i) {
- BailoutId id = BailoutId(i);
- SharedFunctionInfo::AddToOptimizedCodeMap(shared, context, code, id);
+ BailoutId id = BailoutId(i + 1);
+ Context::AddToOSROptimizedCodeCache(context, shared, code, id);
}
}
#endif // DEBUG
@@ -4081,12 +4202,12 @@ TEST(Regress513496) {
HandleScope scope(isolate);
// Perfrom one initial GC to enable code flushing.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
// Prepare an optimized closure with containing an inlined function. Then age
// the inlined unoptimized code to trigger code flushing but make sure the
// outer optimized code is kept in the optimized code map.
- Handle<SharedFunctionInfo> shared;
+ Handle<SharedFunctionInfo> optimized_code;
{
LocalContext context;
HandleScope inner_scope(isolate);
@@ -4114,18 +4235,19 @@ TEST(Regress513496) {
->Get(context.local(), v8_str("f"))
.ToLocalChecked())));
CHECK(f->is_compiled());
- shared = inner_scope.CloseAndEscape(handle(f->shared(), isolate));
+
+ // Lookup the optimized code and keep it alive.
+ Code* result = f->feedback_vector()->optimized_code();
+ Handle<Code> optimized_code(result, isolate);
+ optimized_code = inner_scope.CloseAndEscape(handle(result, isolate));
+
CompileRun("f = null");
}
- // Lookup the optimized code and keep it alive.
- Code* result = shared->SearchOptimizedCodeMap(
- isolate->context()->native_context(), BailoutId::None());
- Handle<Code> optimized_code(result, isolate);
// Finish a full GC cycle so that the unoptimized code of 'g' is flushed even
// though the optimized code for 'f' is reachable via the optimized code map.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
// Make a new closure that will get code installed from the code map.
// Unoptimized code is missing and the deoptimizer will go ballistic.
@@ -4169,7 +4291,7 @@ TEST(LargeObjectSlotRecording) {
}
// Move the evaucation candidate object.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
// Verify that the pointers in the large object got updated.
for (int i = 0; i < size; i += kStep) {
@@ -4178,10 +4300,9 @@ TEST(LargeObjectSlotRecording) {
}
}
-
-class DummyVisitor : public ObjectVisitor {
+class DummyVisitor : public RootVisitor {
public:
- void VisitPointers(Object** start, Object** end) override {}
+ void VisitRootPointers(Root root, Object** start, Object** end) override {}
};
@@ -4269,14 +4390,14 @@ static int AllocationSitesCount(Heap* heap) {
TEST(EnsureAllocationSiteDependentCodesProcessed) {
- if (i::FLAG_always_opt || !i::FLAG_crankshaft) return;
+ if (i::FLAG_always_opt || !i::FLAG_opt) return;
i::FLAG_allow_natives_syntax = true;
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
v8::internal::Heap* heap = CcTest::heap();
GlobalHandles* global_handles = isolate->global_handles();
- if (!isolate->use_crankshaft()) return;
+ if (!isolate->use_optimizer()) return;
// The allocation site at the head of the list is ours.
Handle<AllocationSite> site;
@@ -4329,7 +4450,7 @@ TEST(EnsureAllocationSiteDependentCodesProcessed) {
// Now make sure that a gc should get rid of the function, even though we
// still have the allocation site alive.
for (int i = 0; i < 4; i++) {
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
}
// The site still exists because of our global handle, but the code is no
@@ -4340,13 +4461,13 @@ TEST(EnsureAllocationSiteDependentCodesProcessed) {
TEST(CellsInOptimizedCodeAreWeak) {
- if (i::FLAG_always_opt || !i::FLAG_crankshaft) return;
+ if (i::FLAG_always_opt || !i::FLAG_opt) return;
i::FLAG_allow_natives_syntax = true;
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
v8::internal::Heap* heap = CcTest::heap();
- if (!isolate->use_crankshaft()) return;
+ if (!isolate->use_optimizer()) return;
HandleScope outer_scope(heap->isolate());
Handle<Code> code;
{
@@ -4376,7 +4497,7 @@ TEST(CellsInOptimizedCodeAreWeak) {
// Now make sure that a gc should get rid of the function
for (int i = 0; i < 4; i++) {
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
}
CHECK(code->marked_for_deoptimization());
@@ -4384,13 +4505,13 @@ TEST(CellsInOptimizedCodeAreWeak) {
TEST(ObjectsInOptimizedCodeAreWeak) {
- if (i::FLAG_always_opt || !i::FLAG_crankshaft) return;
+ if (i::FLAG_always_opt || !i::FLAG_opt) return;
i::FLAG_allow_natives_syntax = true;
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
v8::internal::Heap* heap = CcTest::heap();
- if (!isolate->use_crankshaft()) return;
+ if (!isolate->use_optimizer()) return;
HandleScope outer_scope(heap->isolate());
Handle<Code> code;
{
@@ -4418,20 +4539,20 @@ TEST(ObjectsInOptimizedCodeAreWeak) {
// Now make sure that a gc should get rid of the function
for (int i = 0; i < 4; i++) {
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
}
CHECK(code->marked_for_deoptimization());
}
TEST(NewSpaceObjectsInOptimizedCode) {
- if (i::FLAG_always_opt || !i::FLAG_crankshaft || i::FLAG_turbo) return;
+ if (i::FLAG_always_opt || !i::FLAG_opt || i::FLAG_turbo) return;
i::FLAG_allow_natives_syntax = true;
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
v8::internal::Heap* heap = CcTest::heap();
- if (!isolate->use_crankshaft()) return;
+ if (!isolate->use_optimizer()) return;
HandleScope outer_scope(heap->isolate());
Handle<Code> code;
{
@@ -4479,14 +4600,14 @@ TEST(NewSpaceObjectsInOptimizedCode) {
// Now make sure that a gc should get rid of the function
for (int i = 0; i < 4; i++) {
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
}
CHECK(code->marked_for_deoptimization());
}
TEST(NoWeakHashTableLeakWithIncrementalMarking) {
- if (i::FLAG_always_opt || !i::FLAG_crankshaft) return;
+ if (i::FLAG_always_opt || !i::FLAG_opt) return;
if (!i::FLAG_incremental_marking) return;
i::FLAG_allow_natives_syntax = true;
i::FLAG_compilation_cache = false;
@@ -4501,9 +4622,9 @@ TEST(NoWeakHashTableLeakWithIncrementalMarking) {
// Get a clean slate regarding optimized functions on the heap.
i::Deoptimizer::DeoptimizeAll(isolate);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
- if (!isolate->use_crankshaft()) return;
+ if (!isolate->use_optimizer()) return;
HandleScope outer_scope(heap->isolate());
for (int i = 0; i < 3; i++) {
heap::SimulateIncrementalMarking(heap);
@@ -4571,7 +4692,7 @@ TEST(NextCodeLinkIsWeak) {
Isolate* isolate = CcTest::i_isolate();
v8::internal::Heap* heap = CcTest::heap();
- if (!isolate->use_crankshaft()) return;
+ if (!isolate->use_optimizer()) return;
HandleScope outer_scope(heap->isolate());
Handle<Code> code;
CcTest::CollectAllAvailableGarbage();
@@ -4617,7 +4738,7 @@ TEST(NextCodeLinkIsWeak2) {
Isolate* isolate = CcTest::i_isolate();
v8::internal::Heap* heap = CcTest::heap();
- if (!isolate->use_crankshaft()) return;
+ if (!isolate->use_optimizer()) return;
HandleScope outer_scope(heap->isolate());
CcTest::CollectAllAvailableGarbage();
Handle<Context> context(Context::cast(heap->native_contexts_list()), isolate);
@@ -4682,7 +4803,7 @@ TEST(WeakFunctionInConstructor) {
}
weak_ic_cleared = false;
garbage.SetWeak(&garbage, &ClearWeakIC, v8::WeakCallbackType::kParameter);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK(weak_ic_cleared);
// We've determined the constructor in createObj has had it's weak cell
@@ -4694,7 +4815,7 @@ TEST(WeakFunctionInConstructor) {
Object* slot_value = feedback_vector->Get(FeedbackSlot(0));
CHECK(slot_value->IsWeakCell());
if (WeakCell::cast(slot_value)->cleared()) break;
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
}
Object* slot_value = feedback_vector->Get(FeedbackSlot(0));
@@ -4724,7 +4845,7 @@ void CheckWeakness(const char* source) {
}
weak_ic_cleared = false;
garbage.SetWeak(&garbage, &ClearWeakIC, v8::WeakCallbackType::kParameter);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK(weak_ic_cleared);
}
@@ -4931,7 +5052,7 @@ TEST(MonomorphicStaysMonomorphicAfterGC) {
v8::HandleScope scope(CcTest::isolate());
CompileRun("(testIC())");
}
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CheckIC(loadIC, Code::LOAD_IC, 0, MONOMORPHIC);
{
v8::HandleScope scope(CcTest::isolate());
@@ -4966,7 +5087,7 @@ TEST(PolymorphicStaysPolymorphicAfterGC) {
v8::HandleScope scope(CcTest::isolate());
CompileRun("(testIC())");
}
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CheckIC(loadIC, Code::LOAD_IC, 0, POLYMORPHIC);
{
v8::HandleScope scope(CcTest::isolate());
@@ -5040,8 +5161,8 @@ TEST(WeakCellsWithIncrementalMarking) {
}
// Call collect all twice to make sure that we also cleared
// weak cells that were allocated on black pages.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
+ CcTest::CollectAllGarbage();
CHECK_EQ(*survivor, weak_cells[0]->value());
for (int i = 1; i < N; i++) {
CHECK(weak_cells[i]->cleared());
@@ -5088,7 +5209,7 @@ TEST(AddInstructionChangesNewSpacePromotion) {
heap->DisableInlineAllocation();
heap->set_allocation_timeout(1);
g->Call(env.local(), global, 1, args1).ToLocalChecked();
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
}
@@ -5421,14 +5542,14 @@ TEST(Regress3877) {
"a.x = new cls();"
"cls.prototype = null;");
for (int i = 0; i < 4; i++) {
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
}
// The map of a.x keeps prototype alive
CHECK(!weak_prototype->cleared());
// Change the map of a.x and make the previous map garbage collectable.
CompileRun("a.x.__proto__ = {};");
for (int i = 0; i < 4; i++) {
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
}
CHECK(weak_prototype->cleared());
}
@@ -5873,7 +5994,7 @@ TEST(ScriptIterator) {
Heap* heap = CcTest::heap();
LocalContext context;
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
int script_count = 0;
{
@@ -5899,8 +6020,8 @@ TEST(SharedFunctionInfoIterator) {
Heap* heap = CcTest::heap();
LocalContext context;
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
+ CcTest::CollectAllGarbage();
int sfi_count = 0;
{
@@ -6157,7 +6278,7 @@ TEST(Regress615489) {
v8::HandleScope scope(CcTest::isolate());
Heap* heap = CcTest::heap();
Isolate* isolate = heap->isolate();
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
i::MarkCompactCollector* collector = heap->mark_compact_collector();
i::IncrementalMarking* marking = heap->incremental_marking();
@@ -6185,7 +6306,7 @@ TEST(Regress615489) {
}
CHECK(marking->IsComplete());
intptr_t size_before = heap->SizeOfObjects();
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
intptr_t size_after = heap->SizeOfObjects();
// Live size does not increase after garbage collection.
CHECK_LE(size_after, size_before);
@@ -6258,7 +6379,7 @@ TEST(LeftTrimFixedArrayInBlackArea) {
v8::HandleScope scope(CcTest::isolate());
Heap* heap = CcTest::heap();
Isolate* isolate = heap->isolate();
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
i::MarkCompactCollector* collector = heap->mark_compact_collector();
i::IncrementalMarking* marking = heap->incremental_marking();
@@ -6297,7 +6418,7 @@ TEST(ContinuousLeftTrimFixedArrayInBlackArea) {
v8::HandleScope scope(CcTest::isolate());
Heap* heap = CcTest::heap();
Isolate* isolate = heap->isolate();
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
i::MarkCompactCollector* collector = heap->mark_compact_collector();
i::IncrementalMarking* marking = heap->incremental_marking();
@@ -6363,7 +6484,7 @@ TEST(ContinuousRightTrimFixedArrayInBlackArea) {
v8::HandleScope scope(CcTest::isolate());
Heap* heap = CcTest::heap();
Isolate* isolate = heap->isolate();
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
i::MarkCompactCollector* collector = heap->mark_compact_collector();
i::IncrementalMarking* marking = heap->incremental_marking();
@@ -6451,7 +6572,7 @@ TEST(UncommitUnusedLargeObjectMemory) {
array->Shrink(1);
CHECK(array->Size() < size_before);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK(chunk->CommittedPhysicalMemory() < committed_memory_before);
size_t shrinked_size =
RoundUp((array->address() - chunk->address()) + array->Size(),
@@ -6532,7 +6653,7 @@ HEAP_TEST(Regress670675) {
Heap* heap = CcTest::heap();
Isolate* isolate = heap->isolate();
i::MarkCompactCollector* collector = heap->mark_compact_collector();
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
if (collector->sweeping_in_progress()) {
collector->EnsureSweepingCompleted();
@@ -6609,26 +6730,5 @@ HEAP_TEST(Regress5831) {
CHECK(chunk->NeverEvacuate());
}
-UNINITIALIZED_TEST(ReinitializeStringHashSeed) {
- // Enable rehashing and create an isolate and context.
- i::FLAG_rehash_snapshot = true;
- for (int i = 1; i < 3; i++) {
- i::FLAG_hash_seed = 1337 * i;
- v8::Isolate::CreateParams create_params;
- create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
- v8::Isolate* isolate = v8::Isolate::New(create_params);
- {
- v8::Isolate::Scope isolate_scope(isolate);
- CHECK_EQ(1337 * i,
- reinterpret_cast<i::Isolate*>(isolate)->heap()->HashSeed());
- v8::HandleScope handle_scope(isolate);
- v8::Local<v8::Context> context = v8::Context::New(isolate);
- CHECK(!context.IsEmpty());
- v8::Context::Scope context_scope(context);
- }
- isolate->Dispose();
- }
-}
-
} // namespace internal
} // namespace v8
diff --git a/deps/v8/test/cctest/heap/test-mark-compact.cc b/deps/v8/test/cctest/heap/test-mark-compact.cc
index f77586e878..36c5ce9e11 100644
--- a/deps/v8/test/cctest/heap/test-mark-compact.cc
+++ b/deps/v8/test/cctest/heap/test-mark-compact.cc
@@ -43,6 +43,7 @@
#include "src/global-handles.h"
#include "src/heap/mark-compact-inl.h"
#include "src/heap/mark-compact.h"
+#include "src/heap/sequential-marking-deque.h"
#include "src/objects-inl.h"
#include "test/cctest/cctest.h"
#include "test/cctest/heap/heap-tester.h"
@@ -51,10 +52,9 @@
using namespace v8::internal;
using v8::Just;
-
-TEST(MarkingDeque) {
+TEST(SequentialMarkingDeque) {
CcTest::InitializeVM();
- MarkingDeque s(CcTest::i_isolate()->heap());
+ SequentialMarkingDeque s(CcTest::i_isolate()->heap());
s.SetUp();
s.StartUsing();
Address original_address = reinterpret_cast<Address>(&s);
@@ -90,8 +90,8 @@ TEST(Promotion) {
// Array should be in the new space.
CHECK(heap->InSpace(*array, NEW_SPACE));
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
+ CcTest::CollectAllGarbage();
CHECK(heap->InSpace(*array, OLD_SPACE));
}
}
@@ -115,8 +115,8 @@ HEAP_TEST(NoPromotion) {
heap->set_force_oom(true);
// Array should be in the new space.
CHECK(heap->InSpace(*array, NEW_SPACE));
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
+ CcTest::CollectAllGarbage();
CHECK(heap->InSpace(*array, NEW_SPACE));
}
}
diff --git a/deps/v8/test/cctest/heap/test-page-promotion.cc b/deps/v8/test/cctest/heap/test-page-promotion.cc
index 17096bc7ca..beab159b8c 100644
--- a/deps/v8/test/cctest/heap/test-page-promotion.cc
+++ b/deps/v8/test/cctest/heap/test-page-promotion.cc
@@ -21,6 +21,10 @@ namespace {
v8::Isolate* NewIsolateForPagePromotion(int min_semi_space_size = 8,
int max_semi_space_size = 8) {
+ // Parallel evacuation messes with fragmentation in a way that objects that
+ // should be copied in semi space are promoted to old space because of
+ // fragmentation.
+ i::FLAG_parallel_compaction = false;
i::FLAG_page_promotion = true;
i::FLAG_page_promotion_threshold = 0; // %
i::FLAG_min_semi_space_size = min_semi_space_size;
diff --git a/deps/v8/test/cctest/heap/test-spaces.cc b/deps/v8/test/cctest/heap/test-spaces.cc
index 63f9627048..0d625ca408 100644
--- a/deps/v8/test/cctest/heap/test-spaces.cc
+++ b/deps/v8/test/cctest/heap/test-spaces.cc
@@ -156,8 +156,7 @@ static void VerifyMemoryChunk(Isolate* isolate,
size_t second_commit_area_size,
Executability executable) {
MemoryAllocator* memory_allocator = new MemoryAllocator(isolate);
- CHECK(memory_allocator->SetUp(heap->MaxReserved(), heap->MaxExecutableSize(),
- 0));
+ CHECK(memory_allocator->SetUp(heap->MaxReserved(), 0));
{
TestMemoryAllocatorScope test_allocator_scope(isolate, memory_allocator);
TestCodeRangeScope test_code_range_scope(isolate, code_range);
@@ -208,8 +207,7 @@ TEST(Regress3540) {
Isolate* isolate = CcTest::i_isolate();
Heap* heap = isolate->heap();
MemoryAllocator* memory_allocator = new MemoryAllocator(isolate);
- CHECK(memory_allocator->SetUp(heap->MaxReserved(), heap->MaxExecutableSize(),
- 0));
+ CHECK(memory_allocator->SetUp(heap->MaxReserved(), 0));
TestMemoryAllocatorScope test_allocator_scope(isolate, memory_allocator);
CodeRange* code_range = new CodeRange(isolate);
size_t code_range_size =
@@ -309,8 +307,7 @@ TEST(MemoryAllocator) {
MemoryAllocator* memory_allocator = new MemoryAllocator(isolate);
CHECK(memory_allocator != nullptr);
- CHECK(memory_allocator->SetUp(heap->MaxReserved(), heap->MaxExecutableSize(),
- 0));
+ CHECK(memory_allocator->SetUp(heap->MaxReserved(), 0));
TestMemoryAllocatorScope test_scope(isolate, memory_allocator);
{
@@ -357,8 +354,7 @@ TEST(NewSpace) {
Isolate* isolate = CcTest::i_isolate();
Heap* heap = isolate->heap();
MemoryAllocator* memory_allocator = new MemoryAllocator(isolate);
- CHECK(memory_allocator->SetUp(heap->MaxReserved(), heap->MaxExecutableSize(),
- 0));
+ CHECK(memory_allocator->SetUp(heap->MaxReserved(), 0));
TestMemoryAllocatorScope test_scope(isolate, memory_allocator);
NewSpace new_space(heap);
@@ -383,8 +379,7 @@ TEST(OldSpace) {
Isolate* isolate = CcTest::i_isolate();
Heap* heap = isolate->heap();
MemoryAllocator* memory_allocator = new MemoryAllocator(isolate);
- CHECK(memory_allocator->SetUp(heap->MaxReserved(), heap->MaxExecutableSize(),
- 0));
+ CHECK(memory_allocator->SetUp(heap->MaxReserved(), 0));
TestMemoryAllocatorScope test_scope(isolate, memory_allocator);
OldSpace* s = new OldSpace(heap, OLD_SPACE, NOT_EXECUTABLE);
@@ -476,7 +471,7 @@ TEST(SizeOfInitialHeap) {
page_count[i] = heap->paged_space(i)->CountTotalPages();
// Check that the initial heap is also below the limit.
- CHECK_LT(heap->paged_space(i)->CommittedMemory(), kMaxInitialSizePerSpace);
+ CHECK_LE(heap->paged_space(i)->CommittedMemory(), kMaxInitialSizePerSpace);
}
// Executing the empty script gets by with the same number of pages, i.e.,
@@ -637,6 +632,12 @@ UNINITIALIZED_TEST(InlineAllocationObserverCadence) {
Isolate* i_isolate = reinterpret_cast<Isolate*>(isolate);
+ // Clear out any pre-existing garbage to make the test consistent
+ // across snapshot/no-snapshot builds.
+ i_isolate->heap()->CollectAllGarbage(
+ i::Heap::kFinalizeIncrementalMarkingMask,
+ i::GarbageCollectionReason::kTesting);
+
NewSpace* new_space = i_isolate->heap()->new_space();
Observer observer1(512);
diff --git a/deps/v8/test/cctest/interpreter/bytecode-expectations-printer.cc b/deps/v8/test/cctest/interpreter/bytecode-expectations-printer.cc
index 2a1731f75a..318372bb5b 100644
--- a/deps/v8/test/cctest/interpreter/bytecode-expectations-printer.cc
+++ b/deps/v8/test/cctest/interpreter/bytecode-expectations-printer.cc
@@ -308,7 +308,7 @@ void BytecodeExpectationsPrinter::PrintBytecodeSequence(
<< "\nbytecodes: [\n";
SourcePositionTableIterator source_iterator(
- bytecode_array->source_position_table());
+ bytecode_array->SourcePositionTable());
BytecodeArrayIterator bytecode_iterator(bytecode_array);
for (; !bytecode_iterator.done(); bytecode_iterator.Advance()) {
stream << kIndent;
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/ArrayLiterals.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/ArrayLiterals.golden
index 5bb33d4709..7ffbb970d5 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/ArrayLiterals.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/ArrayLiterals.golden
@@ -14,11 +14,11 @@ parameter count: 1
bytecode array length: 6
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 34 S> */ B(CreateArrayLiteral), U8(0), U8(2), U8(9),
+ /* 34 S> */ B(CreateArrayLiteral), U8(0), U8(3), U8(17),
/* 51 S> */ B(Return),
]
constant pool: [
- CONSTANT_ELEMENTS_PAIR_TYPE,
+ TUPLE2_TYPE,
]
handlers: [
]
@@ -34,22 +34,22 @@ bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
- /* 45 S> */ B(CreateArrayLiteral), U8(0), U8(3), U8(9),
+ /* 45 S> */ B(CreateArrayLiteral), U8(0), U8(4), U8(17),
B(Star), R(2),
B(LdaZero),
B(Star), R(1),
B(Ldar), R(0),
- /* 54 E> */ B(StaKeyedPropertySloppy), R(2), R(1), U8(4),
+ /* 54 E> */ B(StaKeyedPropertySloppy), R(2), R(1), U8(5),
B(LdaSmi), I8(1),
B(Star), R(1),
B(Ldar), R(0),
- /* 59 E> */ B(AddSmi), I8(1), U8(2),
- B(StaKeyedPropertySloppy), R(2), R(1), U8(4),
+ /* 59 E> */ B(AddSmi), I8(1), U8(3),
+ B(StaKeyedPropertySloppy), R(2), R(1), U8(5),
B(Ldar), R(2),
/* 66 S> */ B(Return),
]
constant pool: [
- CONSTANT_ELEMENTS_PAIR_TYPE,
+ TUPLE2_TYPE,
]
handlers: [
]
@@ -63,11 +63,11 @@ parameter count: 1
bytecode array length: 6
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 34 S> */ B(CreateArrayLiteral), U8(0), U8(4), U8(0),
+ /* 34 S> */ B(CreateArrayLiteral), U8(0), U8(5), U8(0),
/* 62 S> */ B(Return),
]
constant pool: [
- CONSTANT_ELEMENTS_PAIR_TYPE,
+ TUPLE2_TYPE,
]
handlers: [
]
@@ -83,36 +83,36 @@ bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
- /* 45 S> */ B(CreateArrayLiteral), U8(0), U8(9), U8(0),
+ /* 45 S> */ B(CreateArrayLiteral), U8(0), U8(10), U8(0),
B(Star), R(2),
B(LdaZero),
B(Star), R(1),
- B(CreateArrayLiteral), U8(1), U8(2), U8(9),
+ B(CreateArrayLiteral), U8(1), U8(3), U8(17),
B(Star), R(4),
B(LdaZero),
B(Star), R(3),
B(Ldar), R(0),
- /* 56 E> */ B(StaKeyedPropertySloppy), R(4), R(3), U8(3),
+ /* 56 E> */ B(StaKeyedPropertySloppy), R(4), R(3), U8(4),
B(Ldar), R(4),
- B(StaKeyedPropertySloppy), R(2), R(1), U8(10),
+ B(StaKeyedPropertySloppy), R(2), R(1), U8(11),
B(LdaSmi), I8(1),
B(Star), R(1),
- B(CreateArrayLiteral), U8(2), U8(6), U8(9),
+ B(CreateArrayLiteral), U8(2), U8(7), U8(17),
B(Star), R(4),
B(LdaZero),
B(Star), R(3),
B(Ldar), R(0),
- /* 68 E> */ B(AddSmi), I8(2), U8(5),
- B(StaKeyedPropertySloppy), R(4), R(3), U8(7),
+ /* 68 E> */ B(AddSmi), I8(2), U8(6),
+ B(StaKeyedPropertySloppy), R(4), R(3), U8(8),
B(Ldar), R(4),
- B(StaKeyedPropertySloppy), R(2), R(1), U8(10),
+ B(StaKeyedPropertySloppy), R(2), R(1), U8(11),
B(Ldar), R(2),
/* 77 S> */ B(Return),
]
constant pool: [
- CONSTANT_ELEMENTS_PAIR_TYPE,
- CONSTANT_ELEMENTS_PAIR_TYPE,
- CONSTANT_ELEMENTS_PAIR_TYPE,
+ TUPLE2_TYPE,
+ TUPLE2_TYPE,
+ TUPLE2_TYPE,
]
handlers: [
]
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/ArrayLiteralsWide.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/ArrayLiteralsWide.golden
index 6755fb80a0..0d6065ce3e 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/ArrayLiteralsWide.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/ArrayLiteralsWide.golden
@@ -783,7 +783,7 @@ bytecodes: [
B(Star), R(0),
/* 2591 S> */ B(LdaConstant), U8(255),
B(Star), R(0),
- /* 2601 S> */ B(Wide), B(CreateArrayLiteral), U16(256), U16(2), U8(9),
+ /* 2601 S> */ B(Wide), B(CreateArrayLiteral), U16(256), U16(3), U8(17),
/* 2619 S> */ B(Return),
]
constant pool: [
@@ -1043,7 +1043,7 @@ constant pool: [
HEAP_NUMBER_TYPE [1.23],
HEAP_NUMBER_TYPE [1.23],
HEAP_NUMBER_TYPE [1.23],
- CONSTANT_ELEMENTS_PAIR_TYPE,
+ TUPLE2_TYPE,
]
handlers: [
]
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/AssignmentsInBinaryExpression.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/AssignmentsInBinaryExpression.golden
index e729ec44e3..bee7514ea5 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/AssignmentsInBinaryExpression.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/AssignmentsInBinaryExpression.golden
@@ -74,11 +74,11 @@ bytecodes: [
/* 46 S> */ B(LdaSmi), I8(100),
B(Mov), R(0), R(1),
B(Star), R(0),
- /* 52 E> */ B(Add), R(1), U8(2),
+ /* 52 E> */ B(Add), R(1), U8(3),
B(Star), R(1),
B(LdaSmi), I8(101),
B(Star), R(0),
- /* 64 E> */ B(Add), R(1), U8(3),
+ /* 64 E> */ B(Add), R(1), U8(4),
B(Star), R(0),
/* 77 S> */ B(Nop),
/* 87 S> */ B(Return),
@@ -104,13 +104,13 @@ bytecodes: [
B(Star), R(0),
/* 46 S> */ B(LdaSmi), I8(56),
B(Star), R(0),
- /* 59 E> */ B(Sub), R(0), U8(2),
+ /* 59 E> */ B(Sub), R(0), U8(3),
B(Star), R(1),
B(LdaSmi), I8(57),
B(Star), R(0),
- /* 63 E> */ B(Add), R(1), U8(3),
+ /* 63 E> */ B(Add), R(1), U8(4),
B(Star), R(0),
- /* 75 S> */ B(Inc), U8(4),
+ /* 75 S> */ B(Inc), U8(5),
B(Star), R(0),
/* 80 S> */ B(Nop),
/* 90 S> */ B(Return),
@@ -136,15 +136,15 @@ bytecodes: [
/* 76 S> */ B(LdaSmi), I8(1),
B(Mov), R(0), R(2),
B(Star), R(0),
- /* 56 E> */ B(Add), R(2), U8(2),
+ /* 56 E> */ B(Add), R(2), U8(3),
B(Star), R(2),
B(LdaSmi), I8(2),
B(Star), R(0),
- /* 66 E> */ B(Add), R(2), U8(3),
+ /* 66 E> */ B(Add), R(2), U8(4),
B(Star), R(2),
B(LdaSmi), I8(3),
B(Star), R(0),
- /* 76 E> */ B(Add), R(2), U8(4),
+ /* 76 E> */ B(Add), R(2), U8(5),
B(Star), R(1),
/* 87 S> */ B(Nop),
/* 97 S> */ B(Return),
@@ -170,15 +170,15 @@ bytecodes: [
/* 76 S> */ B(LdaSmi), I8(1),
B(Mov), R(0), R(1),
B(Star), R(0),
- /* 56 E> */ B(Add), R(1), U8(2),
+ /* 56 E> */ B(Add), R(1), U8(3),
B(Star), R(1),
B(LdaSmi), I8(2),
B(Star), R(0),
- /* 66 E> */ B(Add), R(1), U8(3),
+ /* 66 E> */ B(Add), R(1), U8(4),
B(Star), R(1),
B(LdaSmi), I8(3),
B(Star), R(0),
- /* 76 E> */ B(Add), R(1), U8(4),
+ /* 76 E> */ B(Add), R(1), U8(5),
B(Star), R(0),
/* 87 S> */ B(Nop),
/* 97 S> */ B(Return),
@@ -205,30 +205,30 @@ bytecodes: [
/* 54 S> */ B(LdaSmi), I8(1),
B(Mov), R(0), R(2),
B(Star), R(0),
- /* 63 E> */ B(Add), R(2), U8(2),
+ /* 63 E> */ B(Add), R(2), U8(3),
B(Star), R(2),
B(Ldar), R(0),
- /* 78 E> */ B(AddSmi), I8(1), U8(3),
+ /* 78 E> */ B(AddSmi), I8(1), U8(4),
B(Star), R(3),
B(LdaSmi), I8(2),
B(Star), R(1),
- /* 83 E> */ B(Mul), R(3), U8(4),
- /* 73 E> */ B(Add), R(2), U8(5),
+ /* 83 E> */ B(Mul), R(3), U8(5),
+ /* 73 E> */ B(Add), R(2), U8(6),
B(Star), R(2),
B(LdaSmi), I8(3),
B(Star), R(1),
- /* 93 E> */ B(Add), R(2), U8(6),
+ /* 93 E> */ B(Add), R(2), U8(7),
B(Star), R(2),
B(LdaSmi), I8(4),
B(Star), R(0),
- /* 103 E> */ B(Add), R(2), U8(7),
+ /* 103 E> */ B(Add), R(2), U8(8),
B(Star), R(2),
B(LdaSmi), I8(5),
B(Star), R(1),
- /* 113 E> */ B(Add), R(2), U8(8),
+ /* 113 E> */ B(Add), R(2), U8(9),
B(Star), R(2),
B(Ldar), R(1),
- /* 123 E> */ B(Add), R(2), U8(9),
+ /* 123 E> */ B(Add), R(2), U8(10),
/* 128 S> */ B(Return),
]
constant pool: [
@@ -251,20 +251,20 @@ bytecodes: [
/* 46 S> */ B(LdaSmi), I8(1),
B(Star), R(1),
B(Ldar), R(0),
- /* 55 E> */ B(Add), R(1), U8(2),
+ /* 55 E> */ B(Add), R(1), U8(3),
B(Star), R(1),
B(Ldar), R(0),
- B(ToNumber), R(2), U8(3),
+ B(ToNumber), R(2), U8(4),
B(Ldar), R(2),
- B(Inc), U8(3),
+ B(Inc), U8(4),
B(Star), R(0),
B(Ldar), R(2),
- /* 59 E> */ B(Add), R(1), U8(4),
+ /* 59 E> */ B(Add), R(1), U8(5),
B(Star), R(1),
B(Ldar), R(0),
- B(Inc), U8(5),
+ B(Inc), U8(6),
B(Star), R(0),
- /* 67 E> */ B(Add), R(1), U8(6),
+ /* 67 E> */ B(Add), R(1), U8(7),
/* 76 S> */ B(Return),
]
constant pool: [
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/BasicBlockToBoolean.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/BasicBlockToBoolean.golden
index acb9c36ce3..e86b7909f9 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/BasicBlockToBoolean.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/BasicBlockToBoolean.golden
@@ -18,7 +18,7 @@ bytecodes: [
B(Star), R(0),
/* 45 S> */ B(JumpIfToBooleanTrue), U8(8),
B(LdaZero),
- /* 56 E> */ B(TestLessThan), R(0), U8(2),
+ /* 56 E> */ B(TestLessThan), R(0), U8(3),
B(JumpIfFalse), U8(5),
/* 63 S> */ B(LdaSmi), I8(1),
/* 75 S> */ B(Return),
@@ -43,7 +43,7 @@ bytecodes: [
B(Star), R(0),
/* 45 S> */ B(JumpIfToBooleanFalse), U8(11),
B(LdaZero),
- /* 56 E> */ B(TestLessThan), R(0), U8(2),
+ /* 56 E> */ B(TestLessThan), R(0), U8(3),
B(JumpIfFalse), U8(5),
/* 63 S> */ B(LdaSmi), I8(1),
/* 75 S> */ B(Return),
@@ -68,7 +68,7 @@ bytecodes: [
B(Star), R(0),
/* 45 S> */ B(JumpIfToBooleanTrue), U8(8),
B(LdaZero),
- /* 57 E> */ B(TestLessThan), R(0), U8(2),
+ /* 57 E> */ B(TestLessThan), R(0), U8(3),
B(JumpIfFalse), U8(6),
B(LdaSmi), I8(2),
B(Jump), U8(4),
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/BasicLoops.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/BasicLoops.golden
index 75514d3ec7..0f24178a2d 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/BasicLoops.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/BasicLoops.golden
@@ -71,21 +71,21 @@ bytecodes: [
/* 53 S> */ B(LdaSmi), I8(1),
B(Star), R(1),
/* 65 S> */ B(LdaSmi), I8(10),
- /* 65 E> */ B(TestLessThan), R(0), U8(2),
+ /* 65 E> */ B(TestLessThan), R(0), U8(3),
B(JumpIfFalse), U8(38),
/* 56 E> */ B(StackCheck),
/* 75 S> */ B(Ldar), R(1),
- /* 81 E> */ B(MulSmi), I8(12), U8(3),
+ /* 81 E> */ B(MulSmi), I8(12), U8(4),
B(Star), R(1),
/* 89 S> */ B(Ldar), R(0),
- /* 95 E> */ B(AddSmi), I8(1), U8(4),
+ /* 95 E> */ B(AddSmi), I8(1), U8(5),
B(Star), R(0),
/* 102 S> */ B(LdaSmi), I8(3),
- /* 108 E> */ B(TestEqual), R(0), U8(5),
+ /* 108 E> */ B(TestEqual), R(0), U8(6),
B(JumpIfFalse), U8(4),
/* 114 S> */ B(Jump), U8(11),
/* 126 S> */ B(LdaSmi), I8(4),
- /* 132 E> */ B(TestEqual), R(0), U8(6),
+ /* 132 E> */ B(TestEqual), R(0), U8(7),
B(JumpIfFalse), U8(4),
/* 138 S> */ B(Jump), U8(5),
B(JumpLoop), U8(40), I8(0),
@@ -119,27 +119,27 @@ bytecodes: [
B(Star), R(0),
/* 45 E> */ B(StackCheck),
/* 62 S> */ B(LdaZero),
- /* 68 E> */ B(TestLessThan), R(0), U8(2),
+ /* 68 E> */ B(TestLessThan), R(0), U8(3),
B(JumpIfFalse), U8(4),
/* 73 S> */ B(Jump), U8(45),
/* 85 S> */ B(LdaSmi), I8(3),
- /* 91 E> */ B(TestEqual), R(0), U8(3),
+ /* 91 E> */ B(TestEqual), R(0), U8(4),
B(JumpIfFalse), U8(4),
/* 97 S> */ B(Jump), U8(39),
/* 106 S> */ B(LdaSmi), I8(4),
- /* 112 E> */ B(TestEqual), R(0), U8(4),
+ /* 112 E> */ B(TestEqual), R(0), U8(5),
B(JumpIfFalse), U8(4),
/* 118 S> */ B(Jump), U8(30),
/* 127 S> */ B(LdaSmi), I8(10),
- /* 133 E> */ B(TestEqual), R(0), U8(5),
+ /* 133 E> */ B(TestEqual), R(0), U8(6),
B(JumpIfFalse), U8(4),
/* 140 S> */ B(Jump), U8(18),
/* 152 S> */ B(LdaSmi), I8(5),
- /* 158 E> */ B(TestEqual), R(0), U8(6),
+ /* 158 E> */ B(TestEqual), R(0), U8(7),
B(JumpIfFalse), U8(4),
/* 164 S> */ B(Jump), U8(12),
/* 173 S> */ B(Ldar), R(0),
- /* 179 E> */ B(AddSmi), I8(1), U8(7),
+ /* 179 E> */ B(AddSmi), I8(1), U8(8),
B(Star), R(0),
B(JumpLoop), U8(52), I8(0),
/* 186 S> */ B(Ldar), R(0),
@@ -172,19 +172,19 @@ bytecodes: [
B(Star), R(0),
/* 45 E> */ B(StackCheck),
/* 71 S> */ B(LdaSmi), I8(3),
- /* 71 E> */ B(TestLessThan), R(0), U8(2),
+ /* 71 E> */ B(TestLessThan), R(0), U8(3),
B(JumpIfFalse), U8(22),
/* 62 E> */ B(StackCheck),
/* 82 S> */ B(LdaSmi), I8(2),
- /* 88 E> */ B(TestEqual), R(0), U8(3),
+ /* 88 E> */ B(TestEqual), R(0), U8(4),
B(JumpIfFalse), U8(4),
/* 94 S> */ B(Jump), U8(12),
/* 105 S> */ B(Ldar), R(0),
- /* 111 E> */ B(AddSmi), I8(1), U8(4),
+ /* 111 E> */ B(AddSmi), I8(1), U8(5),
B(Star), R(0),
B(JumpLoop), U8(24), I8(1),
/* 122 S> */ B(Ldar), R(0),
- /* 128 E> */ B(AddSmi), I8(1), U8(5),
+ /* 128 E> */ B(AddSmi), I8(1), U8(6),
B(Star), R(0),
/* 135 S> */ B(Jump), U8(2),
/* 144 S> */ B(Ldar), R(0),
@@ -218,10 +218,10 @@ bytecodes: [
B(JumpIfToBooleanFalse), U8(20),
/* 57 E> */ B(StackCheck),
/* 71 S> */ B(Ldar), R(1),
- /* 77 E> */ B(MulSmi), I8(12), U8(2),
+ /* 77 E> */ B(MulSmi), I8(12), U8(3),
B(Star), R(1),
/* 85 S> */ B(Ldar), R(0),
- /* 91 E> */ B(SubSmi), I8(1), U8(3),
+ /* 91 E> */ B(SubSmi), I8(1), U8(4),
B(Star), R(0),
B(JumpLoop), U8(19), I8(0),
/* 98 S> */ B(Ldar), R(1),
@@ -254,21 +254,21 @@ bytecodes: [
B(Star), R(1),
/* 56 E> */ B(StackCheck),
/* 63 S> */ B(Ldar), R(1),
- /* 69 E> */ B(MulSmi), I8(10), U8(2),
+ /* 69 E> */ B(MulSmi), I8(10), U8(3),
B(Star), R(1),
/* 77 S> */ B(LdaSmi), I8(5),
- /* 83 E> */ B(TestEqual), R(0), U8(3),
+ /* 83 E> */ B(TestEqual), R(0), U8(4),
B(JumpIfFalse), U8(4),
/* 89 S> */ B(Jump), U8(28),
/* 98 S> */ B(LdaSmi), I8(6),
- /* 104 E> */ B(TestEqual), R(0), U8(4),
+ /* 104 E> */ B(TestEqual), R(0), U8(5),
B(JumpIfFalse), U8(4),
/* 110 S> */ B(Jump), U8(9),
/* 122 S> */ B(Ldar), R(0),
- /* 128 E> */ B(AddSmi), I8(1), U8(5),
+ /* 128 E> */ B(AddSmi), I8(1), U8(6),
B(Star), R(0),
/* 144 S> */ B(LdaSmi), I8(10),
- /* 144 E> */ B(TestLessThan), R(0), U8(6),
+ /* 144 E> */ B(TestLessThan), R(0), U8(7),
B(JumpIfFalse), U8(5),
B(JumpLoop), U8(40), I8(0),
/* 151 S> */ B(Ldar), R(1),
@@ -300,10 +300,10 @@ bytecodes: [
B(Star), R(1),
/* 57 E> */ B(StackCheck),
/* 64 S> */ B(Ldar), R(1),
- /* 70 E> */ B(MulSmi), I8(12), U8(2),
+ /* 70 E> */ B(MulSmi), I8(12), U8(3),
B(Star), R(1),
/* 78 S> */ B(Ldar), R(0),
- /* 84 E> */ B(SubSmi), I8(1), U8(3),
+ /* 84 E> */ B(SubSmi), I8(1), U8(4),
B(Star), R(0),
/* 98 S> */ B(JumpIfToBooleanFalse), U8(5),
B(JumpLoop), U8(17), I8(0),
@@ -337,17 +337,17 @@ bytecodes: [
B(Star), R(1),
/* 56 E> */ B(StackCheck),
/* 63 S> */ B(Nop),
- /* 69 E> */ B(MulSmi), I8(10), U8(2),
+ /* 69 E> */ B(MulSmi), I8(10), U8(3),
B(Star), R(1),
/* 77 S> */ B(LdaSmi), I8(5),
- /* 83 E> */ B(TestEqual), R(0), U8(3),
+ /* 83 E> */ B(TestEqual), R(0), U8(4),
B(JumpIfFalse), U8(4),
/* 89 S> */ B(Jump), U8(18),
/* 98 S> */ B(Ldar), R(0),
- /* 104 E> */ B(AddSmi), I8(1), U8(4),
+ /* 104 E> */ B(AddSmi), I8(1), U8(5),
B(Star), R(0),
/* 111 S> */ B(LdaSmi), I8(6),
- /* 117 E> */ B(TestEqual), R(0), U8(5),
+ /* 117 E> */ B(TestEqual), R(0), U8(6),
B(JumpIfFalse), U8(4),
/* 123 S> */ B(Jump), U8(2),
/* 150 S> */ B(Ldar), R(1),
@@ -380,17 +380,17 @@ bytecodes: [
B(Star), R(1),
/* 56 E> */ B(StackCheck),
/* 63 S> */ B(Ldar), R(1),
- /* 69 E> */ B(MulSmi), I8(10), U8(2),
+ /* 69 E> */ B(MulSmi), I8(10), U8(3),
B(Star), R(1),
/* 77 S> */ B(LdaSmi), I8(5),
- /* 83 E> */ B(TestEqual), R(0), U8(3),
+ /* 83 E> */ B(TestEqual), R(0), U8(4),
B(JumpIfFalse), U8(4),
/* 89 S> */ B(Jump), U8(21),
/* 98 S> */ B(Ldar), R(0),
- /* 104 E> */ B(AddSmi), I8(1), U8(4),
+ /* 104 E> */ B(AddSmi), I8(1), U8(5),
B(Star), R(0),
/* 111 S> */ B(LdaSmi), I8(6),
- /* 117 E> */ B(TestEqual), R(0), U8(5),
+ /* 117 E> */ B(TestEqual), R(0), U8(6),
B(JumpIfFalse), U8(4),
/* 123 S> */ B(Jump), U8(2),
B(JumpLoop), U8(33), I8(0),
@@ -420,15 +420,15 @@ bytecodes: [
B(Star), R(0),
/* 45 E> */ B(StackCheck),
/* 58 S> */ B(LdaSmi), I8(1),
- /* 64 E> */ B(TestEqual), R(0), U8(2),
+ /* 64 E> */ B(TestEqual), R(0), U8(3),
B(JumpIfFalse), U8(4),
/* 70 S> */ B(Jump), U8(21),
/* 79 S> */ B(LdaSmi), I8(2),
- /* 85 E> */ B(TestEqual), R(0), U8(3),
+ /* 85 E> */ B(TestEqual), R(0), U8(4),
B(JumpIfFalse), U8(4),
/* 91 S> */ B(Jump), U8(9),
/* 103 S> */ B(Ldar), R(0),
- /* 109 E> */ B(AddSmi), I8(1), U8(4),
+ /* 109 E> */ B(AddSmi), I8(1), U8(5),
B(Star), R(0),
B(JumpLoop), U8(26), I8(0),
B(LdaUndefined),
@@ -456,15 +456,15 @@ bytecodes: [
B(Star), R(0),
/* 34 E> */ B(StackCheck),
/* 56 S> */ B(LdaSmi), I8(1),
- /* 62 E> */ B(TestEqual), R(0), U8(2),
+ /* 62 E> */ B(TestEqual), R(0), U8(3),
B(JumpIfFalse), U8(4),
/* 68 S> */ B(Jump), U8(21),
/* 77 S> */ B(LdaSmi), I8(2),
- /* 83 E> */ B(TestEqual), R(0), U8(3),
+ /* 83 E> */ B(TestEqual), R(0), U8(4),
B(JumpIfFalse), U8(4),
/* 89 S> */ B(Jump), U8(9),
/* 101 S> */ B(Ldar), R(0),
- /* 107 E> */ B(AddSmi), I8(1), U8(4),
+ /* 107 E> */ B(AddSmi), I8(1), U8(5),
B(Star), R(0),
B(JumpLoop), U8(26), I8(0),
B(LdaUndefined),
@@ -492,15 +492,15 @@ bytecodes: [
B(Star), R(0),
/* 45 E> */ B(StackCheck),
/* 68 S> */ B(LdaSmi), I8(1),
- /* 74 E> */ B(TestEqual), R(0), U8(3),
+ /* 74 E> */ B(TestEqual), R(0), U8(4),
B(JumpIfFalse), U8(4),
/* 80 S> */ B(Jump), U8(21),
/* 89 S> */ B(LdaSmi), I8(2),
- /* 95 E> */ B(TestEqual), R(0), U8(4),
+ /* 95 E> */ B(TestEqual), R(0), U8(5),
B(JumpIfFalse), U8(4),
/* 101 S> */ B(Jump), U8(2),
/* 55 S> */ B(Ldar), R(0),
- /* 59 E> */ B(AddSmi), I8(1), U8(2),
+ /* 59 E> */ B(AddSmi), I8(1), U8(3),
B(Star), R(0),
B(JumpLoop), U8(26), I8(0),
B(LdaUndefined),
@@ -527,15 +527,15 @@ bytecodes: [
B(Star), R(0),
/* 34 E> */ B(StackCheck),
/* 66 S> */ B(LdaSmi), I8(1),
- /* 72 E> */ B(TestEqual), R(0), U8(3),
+ /* 72 E> */ B(TestEqual), R(0), U8(4),
B(JumpIfFalse), U8(4),
/* 78 S> */ B(Jump), U8(21),
/* 87 S> */ B(LdaSmi), I8(2),
- /* 93 E> */ B(TestEqual), R(0), U8(4),
+ /* 93 E> */ B(TestEqual), R(0), U8(5),
B(JumpIfFalse), U8(4),
/* 99 S> */ B(Jump), U8(2),
/* 53 S> */ B(Ldar), R(0),
- /* 57 E> */ B(AddSmi), I8(1), U8(2),
+ /* 57 E> */ B(AddSmi), I8(1), U8(3),
B(Star), R(0),
B(JumpLoop), U8(26), I8(0),
B(LdaUndefined),
@@ -564,15 +564,15 @@ bytecodes: [
/* 58 S> */ B(LdaZero),
B(Star), R(1),
/* 63 S> */ B(LdaSmi), I8(100),
- /* 63 E> */ B(TestLessThan), R(1), U8(2),
+ /* 63 E> */ B(TestLessThan), R(1), U8(3),
B(JumpIfFalse), U8(22),
/* 45 E> */ B(StackCheck),
/* 85 S> */ B(Ldar), R(0),
- /* 91 E> */ B(AddSmi), I8(1), U8(4),
+ /* 91 E> */ B(AddSmi), I8(1), U8(5),
B(Star), R(0),
/* 98 S> */ B(Jump), U8(2),
/* 72 S> */ B(Ldar), R(1),
- /* 76 E> */ B(AddSmi), I8(1), U8(3),
+ /* 76 E> */ B(AddSmi), I8(1), U8(4),
B(Star), R(1),
B(JumpLoop), U8(24), I8(0),
B(LdaUndefined),
@@ -604,10 +604,10 @@ bytecodes: [
B(JumpIfToBooleanFalse), U8(19),
/* 45 E> */ B(StackCheck),
/* 74 S> */ B(Ldar), R(0),
- /* 80 E> */ B(MulSmi), I8(12), U8(3),
+ /* 80 E> */ B(MulSmi), I8(12), U8(4),
B(Star), R(0),
/* 67 S> */ B(Ldar), R(1),
- B(Dec), U8(2),
+ B(Dec), U8(3),
B(Star), R(1),
B(JumpLoop), U8(18), I8(0),
/* 88 S> */ B(Ldar), R(0),
@@ -663,14 +663,14 @@ bytecodes: [
B(Star), R(1),
/* 45 E> */ B(StackCheck),
/* 76 S> */ B(Ldar), R(0),
- /* 82 E> */ B(AddSmi), I8(1), U8(3),
+ /* 82 E> */ B(AddSmi), I8(1), U8(4),
B(Star), R(0),
/* 89 S> */ B(LdaSmi), I8(20),
- /* 95 E> */ B(TestEqual), R(0), U8(4),
+ /* 95 E> */ B(TestEqual), R(0), U8(5),
B(JumpIfFalse), U8(4),
/* 102 S> */ B(Jump), U8(11),
/* 69 S> */ B(Ldar), R(1),
- B(Inc), U8(2),
+ B(Inc), U8(3),
B(Star), R(1),
B(JumpLoop), U8(23), I8(0),
/* 112 S> */ B(Ldar), R(0),
@@ -708,7 +708,7 @@ bytecodes: [
B(PushContext), R(3),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(4),
- B(CreateClosure), U8(1), U8(2), U8(2),
+ B(CreateClosure), U8(1), U8(3), U8(2),
B(Star), R(0),
/* 73 S> */ B(LdaSmi), I8(1),
/* 73 E> */ B(StaCurrentContextSlot), U8(4),
@@ -719,7 +719,7 @@ bytecodes: [
B(PopContext), R(3),
B(Jump), U8(10),
/* 126 S> */ B(LdaCurrentContextSlot), U8(4),
- B(Inc), U8(3),
+ B(Inc), U8(4),
/* 127 E> */ B(StaCurrentContextSlot), U8(4),
B(PopContext), R(3),
B(JumpLoop), U8(45), I8(0),
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/BreakableBlocks.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/BreakableBlocks.golden
index 4794f7f459..11073635cb 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/BreakableBlocks.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/BreakableBlocks.golden
@@ -23,7 +23,7 @@ bytecodes: [
/* 42 S> */ B(LdaZero),
B(Star), R(0),
/* 56 S> */ B(Nop),
- /* 62 E> */ B(AddSmi), I8(1), U8(2),
+ /* 62 E> */ B(AddSmi), I8(1), U8(3),
B(Star), R(0),
/* 69 S> */ B(Jump), U8(2),
/* 97 S> */ B(Ldar), R(0),
@@ -57,31 +57,31 @@ bytecodes: [
/* 71 S> */ B(LdaZero),
B(Star), R(1),
/* 76 S> */ B(LdaSmi), I8(10),
- /* 76 E> */ B(TestLessThan), R(1), U8(2),
+ /* 76 E> */ B(TestLessThan), R(1), U8(3),
B(JumpIfFalse), U8(54),
/* 58 E> */ B(StackCheck),
/* 106 S> */ B(LdaZero),
B(Star), R(2),
/* 111 S> */ B(LdaSmi), I8(3),
- /* 111 E> */ B(TestLessThan), R(2), U8(4),
+ /* 111 E> */ B(TestLessThan), R(2), U8(5),
B(JumpIfFalse), U8(34),
/* 93 E> */ B(StackCheck),
/* 129 S> */ B(Ldar), R(0),
- B(Inc), U8(6),
+ B(Inc), U8(7),
B(Star), R(0),
/* 142 S> */ B(Ldar), R(2),
- /* 148 E> */ B(Add), R(1), U8(7),
+ /* 148 E> */ B(Add), R(1), U8(8),
B(Star), R(3),
B(LdaSmi), I8(12),
- /* 152 E> */ B(TestEqual), R(3), U8(8),
+ /* 152 E> */ B(TestEqual), R(3), U8(9),
B(JumpIfFalse), U8(4),
/* 161 S> */ B(Jump), U8(20),
/* 118 S> */ B(Ldar), R(2),
- B(Inc), U8(5),
+ B(Inc), U8(6),
B(Star), R(2),
B(JumpLoop), U8(36), I8(1),
/* 84 S> */ B(Ldar), R(1),
- B(Inc), U8(3),
+ B(Inc), U8(4),
B(Star), R(1),
B(JumpLoop), U8(56), I8(0),
/* 188 S> */ B(Ldar), R(0),
@@ -110,7 +110,7 @@ bytecodes: [
B(PushContext), R(2),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(4),
- B(CreateClosure), U8(1), U8(2), U8(2),
+ B(CreateClosure), U8(1), U8(3), U8(2),
B(Star), R(0),
/* 53 S> */ B(LdaSmi), I8(10),
/* 53 E> */ B(StaCurrentContextSlot), U8(4),
@@ -157,7 +157,7 @@ bytecodes: [
B(PushContext), R(3),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(4),
- B(CreateClosure), U8(1), U8(2), U8(2),
+ B(CreateClosure), U8(1), U8(3), U8(2),
B(Star), R(0),
/* 76 S> */ B(LdaSmi), I8(2),
/* 76 E> */ B(StaCurrentContextSlot), U8(4),
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/CallAndSpread.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/CallAndSpread.golden
index c2acbec102..519d4a3e41 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/CallAndSpread.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/CallAndSpread.golden
@@ -14,11 +14,11 @@ parameter count: 1
bytecode array length: 24
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 34 S> */ B(LdaGlobal), U8(0), U8(4),
+ /* 34 S> */ B(LdaGlobal), U8(0), U8(5),
B(Star), R(1),
- /* 38 E> */ B(LdaNamedProperty), R(1), U8(1), U8(6),
+ /* 38 E> */ B(LdaNamedProperty), R(1), U8(1), U8(7),
B(Star), R(0),
- B(CreateArrayLiteral), U8(2), U8(8), U8(9),
+ B(CreateArrayLiteral), U8(2), U8(9), U8(17),
B(Star), R(2),
/* 39 E> */ B(CallWithSpread), R(0), R(1), U8(2),
B(LdaUndefined),
@@ -27,7 +27,7 @@ bytecodes: [
constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE ["Math"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["max"],
- CONSTANT_ELEMENTS_PAIR_TYPE,
+ TUPLE2_TYPE,
]
handlers: [
]
@@ -41,13 +41,13 @@ parameter count: 1
bytecode array length: 27
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 34 S> */ B(LdaGlobal), U8(0), U8(4),
+ /* 34 S> */ B(LdaGlobal), U8(0), U8(5),
B(Star), R(1),
- /* 38 E> */ B(LdaNamedProperty), R(1), U8(1), U8(6),
+ /* 38 E> */ B(LdaNamedProperty), R(1), U8(1), U8(7),
B(Star), R(0),
B(LdaZero),
B(Star), R(2),
- B(CreateArrayLiteral), U8(2), U8(8), U8(9),
+ B(CreateArrayLiteral), U8(2), U8(9), U8(17),
B(Star), R(3),
/* 39 E> */ B(CallWithSpread), R(0), R(1), U8(3),
B(LdaUndefined),
@@ -56,7 +56,7 @@ bytecodes: [
constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE ["Math"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["max"],
- CONSTANT_ELEMENTS_PAIR_TYPE,
+ TUPLE2_TYPE,
]
handlers: [
]
@@ -72,21 +72,21 @@ bytecodes: [
/* 30 E> */ B(StackCheck),
/* 34 S> */ B(LdaUndefined),
B(Star), R(1),
- /* 34 E> */ B(LdaGlobal), U8(0), U8(2),
+ /* 34 E> */ B(LdaGlobal), U8(0), U8(3),
B(Star), R(0),
- B(LdaNamedProperty), R(0), U8(1), U8(4),
+ B(LdaNamedProperty), R(0), U8(1), U8(5),
B(Star), R(2),
B(LdaUndefined),
B(Star), R(4),
- B(CreateArrayLiteral), U8(2), U8(6), U8(9),
+ B(CreateArrayLiteral), U8(2), U8(7), U8(17),
B(Star), R(5),
B(LdaUndefined),
B(Star), R(6),
- B(CreateArrayLiteral), U8(3), U8(7), U8(9),
+ B(CreateArrayLiteral), U8(3), U8(8), U8(17),
B(Star), R(7),
B(CallJSRuntime), U8(%spread_iterable), R(6), U8(2),
B(Star), R(6),
- B(CreateArrayLiteral), U8(4), U8(8), U8(9),
+ B(CreateArrayLiteral), U8(4), U8(9), U8(17),
B(Star), R(7),
B(CallJSRuntime), U8(%spread_arguments), R(4), U8(4),
B(Star), R(4),
@@ -98,9 +98,9 @@ bytecodes: [
constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE ["Math"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["max"],
- CONSTANT_ELEMENTS_PAIR_TYPE,
- CONSTANT_ELEMENTS_PAIR_TYPE,
- CONSTANT_ELEMENTS_PAIR_TYPE,
+ TUPLE2_TYPE,
+ TUPLE2_TYPE,
+ TUPLE2_TYPE,
]
handlers: [
]
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/CallGlobal.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/CallGlobal.golden
index c9c96e7a1f..fa0a905e6f 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/CallGlobal.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/CallGlobal.golden
@@ -17,9 +17,9 @@ parameter count: 1
bytecode array length: 10
bytecodes: [
/* 27 E> */ B(StackCheck),
- /* 32 S> */ B(LdaGlobal), U8(0), U8(4),
+ /* 32 S> */ B(LdaGlobal), U8(0), U8(5),
B(Star), R(0),
- /* 39 E> */ B(CallUndefinedReceiver0), R(0), U8(2),
+ /* 39 E> */ B(CallUndefinedReceiver0), R(0), U8(3),
/* 44 S> */ B(Return),
]
constant pool: [
@@ -39,7 +39,7 @@ parameter count: 1
bytecode array length: 24
bytecodes: [
/* 34 E> */ B(StackCheck),
- /* 39 S> */ B(LdaGlobal), U8(0), U8(4),
+ /* 39 S> */ B(LdaGlobal), U8(0), U8(5),
B(Star), R(0),
B(LdaSmi), I8(1),
B(Star), R(1),
@@ -47,7 +47,7 @@ bytecodes: [
B(Star), R(2),
B(LdaSmi), I8(3),
B(Star), R(3),
- /* 46 E> */ B(CallUndefinedReceiver), R(0), R(1), U8(3), U8(2),
+ /* 46 E> */ B(CallUndefinedReceiver), R(0), R(1), U8(3), U8(3),
/* 58 S> */ B(Return),
]
constant pool: [
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/CallLookupSlot.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/CallLookupSlot.golden
index 33681df144..3f188e1703 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/CallLookupSlot.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/CallLookupSlot.golden
@@ -22,9 +22,9 @@ bytecodes: [
B(Ldar), R(new_target),
B(StaCurrentContextSlot), U8(5),
/* 30 E> */ B(StackCheck),
- /* 34 S> */ B(CreateClosure), U8(0), U8(2), U8(2),
+ /* 34 S> */ B(CreateClosure), U8(0), U8(3), U8(2),
/* 36 E> */ B(StaLookupSlotSloppy), U8(1),
- /* 52 S> */ B(LdaLookupGlobalSlot), U8(2), U8(5), U8(1),
+ /* 52 S> */ B(LdaLookupGlobalSlot), U8(2), U8(6), U8(1),
B(Star), R(1),
B(LdaConstant), U8(3),
B(Star), R(2),
@@ -39,10 +39,10 @@ bytecodes: [
B(Mov), R(closure), R(5),
B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(3), U8(6),
B(Star), R(1),
- /* 52 E> */ B(CallUndefinedReceiver1), R(1), R(2), U8(3),
- /* 62 S> */ B(LdaLookupGlobalSlot), U8(1), U8(9), U8(1),
+ /* 52 E> */ B(CallUndefinedReceiver1), R(1), R(2), U8(4),
+ /* 62 S> */ B(LdaLookupGlobalSlot), U8(1), U8(10), U8(1),
B(Star), R(1),
- /* 69 E> */ B(CallUndefinedReceiver0), R(1), U8(7),
+ /* 69 E> */ B(CallUndefinedReceiver0), R(1), U8(8),
/* 74 S> */ B(Return),
]
constant pool: [
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/CallNew.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/CallNew.golden
index bd3067686d..988efb4554 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/CallNew.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/CallNew.golden
@@ -17,9 +17,9 @@ parameter count: 1
bytecode array length: 12
bytecodes: [
/* 45 E> */ B(StackCheck),
- /* 50 S> */ B(LdaGlobal), U8(0), U8(4),
+ /* 50 S> */ B(LdaGlobal), U8(0), U8(5),
B(Star), R(0),
- /* 57 E> */ B(Construct), R(0), R(0), U8(0), U8(2),
+ /* 57 E> */ B(Construct), R(0), R(0), U8(0), U8(3),
/* 68 S> */ B(Return),
]
constant pool: [
@@ -39,12 +39,12 @@ parameter count: 1
bytecode array length: 18
bytecodes: [
/* 58 E> */ B(StackCheck),
- /* 63 S> */ B(LdaGlobal), U8(0), U8(4),
+ /* 63 S> */ B(LdaGlobal), U8(0), U8(5),
B(Star), R(0),
B(LdaSmi), I8(3),
B(Star), R(1),
B(Ldar), R(0),
- /* 70 E> */ B(Construct), R(0), R(1), U8(1), U8(2),
+ /* 70 E> */ B(Construct), R(0), R(1), U8(1), U8(3),
/* 82 S> */ B(Return),
]
constant pool: [
@@ -69,7 +69,7 @@ parameter count: 1
bytecode array length: 26
bytecodes: [
/* 100 E> */ B(StackCheck),
- /* 105 S> */ B(LdaGlobal), U8(0), U8(4),
+ /* 105 S> */ B(LdaGlobal), U8(0), U8(5),
B(Star), R(0),
B(LdaSmi), I8(3),
B(Star), R(1),
@@ -78,7 +78,7 @@ bytecodes: [
B(LdaSmi), I8(5),
B(Star), R(3),
B(Ldar), R(0),
- /* 112 E> */ B(Construct), R(0), R(1), U8(3), U8(2),
+ /* 112 E> */ B(Construct), R(0), R(1), U8(3), U8(3),
/* 130 S> */ B(Return),
]
constant pool: [
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/CallRuntime.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/CallRuntime.golden
index 45f504ede1..3741fd6a23 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/CallRuntime.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/CallRuntime.golden
@@ -77,13 +77,13 @@ bytecodes: [
/* 10 E> */ B(StackCheck),
/* 15 S> */ B(LdaUndefined),
B(Star), R(0),
- B(CreateArrayLiteral), U8(0), U8(2), U8(9),
+ B(CreateArrayLiteral), U8(0), U8(3), U8(17),
B(Star), R(1),
B(CallJSRuntime), U8(%spread_iterable), R(0), U8(2),
/* 44 S> */ B(Return),
]
constant pool: [
- CONSTANT_ELEMENTS_PAIR_TYPE,
+ TUPLE2_TYPE,
]
handlers: [
]
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden
index 6c57aaf3cd..49996b8fc3 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden
@@ -27,15 +27,15 @@ bytecodes: [
B(Mov), R(closure), R(0),
/* 99 E> */ B(StackCheck),
/* 104 S> */ B(LdaConstant), U8(0),
- /* 111 E> */ B(LdaKeyedProperty), R(closure), U8(4),
+ /* 111 E> */ B(LdaKeyedProperty), R(closure), U8(5),
B(Star), R(4),
B(LdaConstant), U8(1),
B(Star), R(5),
B(Mov), R(this), R(3),
B(CallRuntime), U16(Runtime::kLoadFromSuper), R(3), U8(3),
B(Star), R(1),
- /* 117 E> */ B(CallAnyReceiver), R(1), R(this), U8(1), U8(2),
- /* 126 E> */ B(AddSmi), I8(1), U8(8),
+ /* 117 E> */ B(CallAnyReceiver), R(1), R(this), U8(1), U8(3),
+ /* 126 E> */ B(AddSmi), I8(1), U8(9),
/* 131 S> */ B(Return),
]
constant pool: [
@@ -67,7 +67,7 @@ bytecodes: [
B(Mov), R(closure), R(0),
/* 125 E> */ B(StackCheck),
/* 130 S> */ B(LdaConstant), U8(0),
- /* 130 E> */ B(LdaKeyedProperty), R(closure), U8(2),
+ /* 130 E> */ B(LdaKeyedProperty), R(closure), U8(3),
B(Star), R(2),
B(LdaConstant), U8(1),
B(Star), R(3),
@@ -76,7 +76,7 @@ bytecodes: [
B(Mov), R(this), R(1),
/* 138 E> */ B(CallRuntime), U16(Runtime::kStoreToSuper_Strict), R(1), U8(4),
/* 143 S> */ B(LdaConstant), U8(0),
- /* 150 E> */ B(LdaKeyedProperty), R(closure), U8(4),
+ /* 150 E> */ B(LdaKeyedProperty), R(closure), U8(5),
B(Star), R(2),
B(LdaConstant), U8(1),
B(Star), R(3),
@@ -117,7 +117,7 @@ bytecodes: [
B(LdaSmi), I8(1),
B(Star), R(3),
B(Ldar), R(0),
- /* 118 E> */ B(Construct), R(2), R(3), U8(1), U8(2),
+ /* 118 E> */ B(Construct), R(2), R(3), U8(1), U8(3),
B(Star), R(2),
B(Ldar), R(this),
B(JumpIfNotHole), U8(4),
@@ -129,7 +129,7 @@ bytecodes: [
B(CallRuntime), U16(Runtime::kThrowSuperNotCalled), R(0), U8(0),
B(Star), R(2),
B(LdaSmi), I8(2),
- /* 136 E> */ B(StaNamedPropertyStrict), R(2), U8(0), U8(4),
+ /* 136 E> */ B(StaNamedPropertyStrict), R(2), U8(0), U8(5),
B(Ldar), R(this),
B(JumpIfNotHole), U8(7),
B(CallRuntime), U16(Runtime::kThrowSuperNotCalled), R(0), U8(0),
@@ -165,7 +165,7 @@ bytecodes: [
/* 117 S> */ B(Ldar), R(1),
B(GetSuperConstructor), R(2),
B(Ldar), R(0),
- /* 117 E> */ B(Construct), R(2), R(0), U8(0), U8(2),
+ /* 117 E> */ B(Construct), R(2), R(0), U8(0), U8(3),
B(Star), R(2),
B(Ldar), R(this),
B(JumpIfNotHole), U8(4),
@@ -177,7 +177,7 @@ bytecodes: [
B(CallRuntime), U16(Runtime::kThrowSuperNotCalled), R(0), U8(0),
B(Star), R(2),
B(LdaSmi), I8(2),
- /* 134 E> */ B(StaNamedPropertyStrict), R(2), U8(0), U8(4),
+ /* 134 E> */ B(StaNamedPropertyStrict), R(2), U8(0), U8(5),
B(Ldar), R(this),
B(JumpIfNotHole), U8(7),
B(CallRuntime), U16(Runtime::kThrowSuperNotCalled), R(0), U8(0),
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden
index b95d6cb4df..ba739ca212 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden
@@ -12,39 +12,34 @@ snippet: "
speak() { console.log(this.name + ' is speaking.'); }
}
"
-frame size: 9
+frame size: 8
parameter count: 1
-bytecode array length: 75
+bytecode array length: 67
bytecodes: [
- B(LdaTheHole),
- B(Star), R(2),
/* 30 E> */ B(StackCheck),
+ B(CreateClosure), U8(0), U8(3), U8(2),
+ B(Star), R(2),
B(LdaTheHole),
- B(Star), R(0),
- /* 34 S> */ B(CreateClosure), U8(0), U8(2), U8(2),
B(Star), R(3),
- B(LdaTheHole),
- B(Star), R(4),
B(LdaSmi), I8(34),
- B(Star), R(6),
+ B(Star), R(5),
B(Wide), B(LdaSmi), I16(148),
- B(Star), R(7),
- B(Mov), R(3), R(5),
- B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4),
- B(Star), R(4),
+ B(Star), R(6),
+ B(Mov), R(2), R(4),
+ B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
+ B(Star), R(3),
B(LdaConstant), U8(1),
+ B(Star), R(5),
+ B(CreateClosure), U8(2), U8(4), U8(2),
B(Star), R(6),
- B(CreateClosure), U8(2), U8(3), U8(2),
- B(Star), R(7),
B(LdaSmi), I8(2),
- B(Star), R(8),
- B(Ldar), R(7),
- B(StaDataPropertyInLiteral), R(4), R(6), U8(1), U8(4),
- B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(3), U8(1),
- B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1),
+ B(Star), R(7),
+ B(Ldar), R(6),
+ B(StaDataPropertyInLiteral), R(3), R(5), U8(1), U8(5),
+ B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(2), U8(1),
+ B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1),
B(Star), R(0),
B(Star), R(1),
- B(Star), R(2),
B(LdaUndefined),
/* 149 S> */ B(Return),
]
@@ -63,39 +58,34 @@ snippet: "
speak() { console.log(this.name + ' is speaking.'); }
}
"
-frame size: 9
+frame size: 8
parameter count: 1
-bytecode array length: 75
+bytecode array length: 67
bytecodes: [
- B(LdaTheHole),
- B(Star), R(2),
/* 30 E> */ B(StackCheck),
+ B(CreateClosure), U8(0), U8(3), U8(2),
+ B(Star), R(2),
B(LdaTheHole),
- B(Star), R(0),
- /* 34 S> */ B(CreateClosure), U8(0), U8(2), U8(2),
B(Star), R(3),
- B(LdaTheHole),
- B(Star), R(4),
B(LdaSmi), I8(34),
- B(Star), R(6),
+ B(Star), R(5),
B(Wide), B(LdaSmi), I16(148),
- B(Star), R(7),
- B(Mov), R(3), R(5),
- B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4),
- B(Star), R(4),
+ B(Star), R(6),
+ B(Mov), R(2), R(4),
+ B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
+ B(Star), R(3),
B(LdaConstant), U8(1),
+ B(Star), R(5),
+ B(CreateClosure), U8(2), U8(4), U8(2),
B(Star), R(6),
- B(CreateClosure), U8(2), U8(3), U8(2),
- B(Star), R(7),
B(LdaSmi), I8(2),
- B(Star), R(8),
- B(Ldar), R(7),
- B(StaDataPropertyInLiteral), R(4), R(6), U8(1), U8(4),
- B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(3), U8(1),
- B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1),
+ B(Star), R(7),
+ B(Ldar), R(6),
+ B(StaDataPropertyInLiteral), R(3), R(5), U8(1), U8(5),
+ B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(2), U8(1),
+ B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1),
B(Star), R(0),
B(Star), R(1),
- B(Star), R(2),
B(LdaUndefined),
/* 149 S> */ B(Return),
]
@@ -116,55 +106,49 @@ snippet: "
static [n1]() { return n1; }
}
"
-frame size: 10
+frame size: 9
parameter count: 1
-bytecode array length: 116
+bytecode array length: 106
bytecodes: [
B(CreateFunctionContext), U8(2),
- B(PushContext), R(3),
- B(LdaTheHole),
- B(Star), R(2),
+ B(PushContext), R(2),
/* 30 E> */ B(StackCheck),
/* 43 S> */ B(LdaConstant), U8(0),
/* 43 E> */ B(StaCurrentContextSlot), U8(4),
/* 57 S> */ B(LdaConstant), U8(1),
/* 57 E> */ B(StaCurrentContextSlot), U8(5),
+ B(CreateClosure), U8(2), U8(3), U8(2),
+ B(Star), R(3),
B(LdaTheHole),
- B(Star), R(0),
- /* 62 S> */ B(CreateClosure), U8(2), U8(2), U8(2),
B(Star), R(4),
- B(LdaTheHole),
- B(Star), R(5),
B(LdaSmi), I8(62),
- B(Star), R(7),
+ B(Star), R(6),
B(Wide), B(LdaSmi), I16(128),
- B(Star), R(8),
- B(Mov), R(4), R(6),
- B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(4),
- B(Star), R(5),
+ B(Star), R(7),
+ B(Mov), R(3), R(5),
+ B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4),
+ B(Star), R(4),
B(LdaImmutableCurrentContextSlot), U8(4),
- /* 75 E> */ B(ToName), R(7),
- B(CreateClosure), U8(3), U8(3), U8(2),
- B(Star), R(8),
+ /* 75 E> */ B(ToName), R(6),
+ B(CreateClosure), U8(3), U8(4), U8(2),
+ B(Star), R(7),
B(LdaSmi), I8(2),
- B(Star), R(9),
- B(Ldar), R(8),
- B(StaDataPropertyInLiteral), R(5), R(7), U8(3), U8(5),
+ B(Star), R(8),
+ B(Ldar), R(7),
+ B(StaDataPropertyInLiteral), R(4), R(6), U8(3), U8(6),
B(LdaImmutableCurrentContextSlot), U8(5),
- /* 106 E> */ B(ToName), R(7),
+ /* 106 E> */ B(ToName), R(6),
B(LdaConstant), U8(4),
- B(TestEqualStrictNoFeedback), R(7),
- B(Mov), R(4), R(6),
+ B(TestEqualStrictNoFeedback), R(6),
+ B(Mov), R(3), R(5),
B(JumpIfFalse), U8(7),
B(CallRuntime), U16(Runtime::kThrowStaticPrototypeError), R(0), U8(0),
- B(CreateClosure), U8(5), U8(4), U8(2),
- B(Star), R(8),
- B(StaDataPropertyInLiteral), R(6), R(7), U8(3), U8(7),
- B(CallRuntime), U16(Runtime::kInstallClassNameAccessorWithCheck), R(4), U8(1),
- B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1),
+ B(CreateClosure), U8(5), U8(5), U8(2),
+ B(StaDataPropertyInLiteral), R(5), R(6), U8(3), U8(8),
+ B(CallRuntime), U16(Runtime::kInstallClassNameAccessorWithCheck), R(3), U8(1),
+ B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1),
B(Star), R(0),
B(Star), R(1),
- B(Star), R(2),
B(LdaUndefined),
/* 129 S> */ B(Return),
]
@@ -185,37 +169,32 @@ snippet: "
class C { constructor() { count++; }}
return new C();
"
-frame size: 9
+frame size: 8
parameter count: 1
-bytecode array length: 64
+bytecode array length: 56
bytecodes: [
B(CreateFunctionContext), U8(1),
- B(PushContext), R(3),
- B(LdaTheHole),
- B(Star), R(2),
+ B(PushContext), R(2),
/* 30 E> */ B(StackCheck),
/* 46 S> */ B(LdaZero),
/* 46 E> */ B(StaCurrentContextSlot), U8(4),
+ B(CreateClosure), U8(0), U8(3), U8(2),
+ B(Star), R(3),
B(LdaTheHole),
- B(Star), R(0),
- /* 49 S> */ B(CreateClosure), U8(0), U8(2), U8(2),
B(Star), R(4),
- B(LdaTheHole),
- B(Star), R(5),
B(LdaSmi), I8(49),
- B(Star), R(7),
+ B(Star), R(6),
B(LdaSmi), I8(86),
- B(Star), R(8),
- B(Mov), R(4), R(6),
- B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(4),
- B(Star), R(5),
- B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(4), U8(1),
- B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1),
+ B(Star), R(7),
+ B(Mov), R(3), R(5),
+ B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4),
+ B(Star), R(4),
+ B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(3), U8(1),
+ B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1),
B(Star), R(0),
B(Star), R(1),
- B(Star), R(2),
/* 87 S> */ B(Nop),
- /* 94 E> */ B(Construct), R(2), R(0), U8(0), U8(3),
+ /* 94 E> */ B(Construct), R(1), R(0), U8(0), U8(4),
/* 103 S> */ B(Return),
]
constant pool: [
@@ -229,51 +208,45 @@ snippet: "
(class {})
class E { static name () {}}
"
-frame size: 10
+frame size: 8
parameter count: 1
-bytecode array length: 102
+bytecode array length: 92
bytecodes: [
- B(LdaTheHole),
- B(Star), R(3),
/* 30 E> */ B(StackCheck),
- /* 35 S> */ B(CreateClosure), U8(0), U8(2), U8(2),
- B(Star), R(4),
+ /* 34 S> */ B(CreateClosure), U8(0), U8(3), U8(2),
+ B(Star), R(2),
B(LdaTheHole),
- B(Star), R(5),
+ B(Star), R(3),
B(LdaSmi), I8(35),
- B(Star), R(7),
- B(LdaSmi), I8(43),
- B(Star), R(8),
- B(Mov), R(4), R(6),
- B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(4),
B(Star), R(5),
- B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1),
- B(Star), R(1),
- B(LdaTheHole),
- B(Star), R(0),
- /* 45 S> */ B(CreateClosure), U8(1), U8(3), U8(2),
- B(Star), R(4),
+ B(LdaSmi), I8(43),
+ B(Star), R(6),
+ B(Mov), R(2), R(4),
+ B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1),
+ B(CreateClosure), U8(1), U8(4), U8(2),
+ B(Star), R(2),
B(LdaTheHole),
- B(Star), R(5),
+ B(Star), R(3),
B(LdaSmi), I8(45),
- B(Star), R(7),
- B(LdaSmi), I8(73),
- B(Star), R(8),
- B(Mov), R(4), R(6),
- B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(4),
B(Star), R(5),
+ B(LdaSmi), I8(73),
+ B(Star), R(6),
+ B(Mov), R(2), R(4),
+ B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
+ B(Star), R(3),
B(LdaConstant), U8(2),
- B(Star), R(7),
- B(CreateClosure), U8(3), U8(4), U8(2),
- B(Star), R(8),
+ B(Star), R(5),
+ B(CreateClosure), U8(3), U8(5), U8(2),
+ B(Star), R(6),
B(LdaSmi), I8(2),
- B(Star), R(9),
- B(Ldar), R(8),
- B(StaDataPropertyInLiteral), R(6), R(7), U8(1), U8(5),
- B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1),
+ B(Star), R(7),
+ B(Ldar), R(6),
+ B(StaDataPropertyInLiteral), R(4), R(5), U8(1), U8(6),
+ B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1),
B(Star), R(0),
- B(Star), R(2),
- B(Star), R(3),
+ B(Star), R(1),
B(LdaUndefined),
/* 74 S> */ B(Return),
]
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/CompareNil.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/CompareNil.golden
index 466820c5ab..82c42d0290 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/CompareNil.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/CompareNil.golden
@@ -276,7 +276,7 @@ bytecodes: [
B(JumpIfUndefined), U8(12),
/* 64 E> */ B(StackCheck),
/* 92 S> */ B(Ldar), R(1),
- B(Inc), U8(5),
+ B(Inc), U8(6),
B(Star), R(1),
B(JumpLoop), U8(11), I8(0),
B(LdaUndefined),
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/CompoundExpressions.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/CompoundExpressions.golden
index 485dad5e10..3546d96f5c 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/CompoundExpressions.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/CompoundExpressions.golden
@@ -16,7 +16,7 @@ bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
- /* 45 S> */ B(AddSmi), I8(2), U8(2),
+ /* 45 S> */ B(AddSmi), I8(2), U8(3),
B(Star), R(0),
B(LdaUndefined),
/* 53 S> */ B(Return),
@@ -37,7 +37,7 @@ bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
- /* 45 S> */ B(DivSmi), I8(2), U8(2),
+ /* 45 S> */ B(DivSmi), I8(2), U8(3),
B(Star), R(0),
B(LdaUndefined),
/* 53 S> */ B(Return),
@@ -56,11 +56,11 @@ parameter count: 1
bytecode array length: 22
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(1),
+ /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(1),
B(Mov), R(1), R(0),
- /* 54 S> */ B(LdaNamedProperty), R(0), U8(1), U8(3),
- B(MulSmi), I8(2), U8(5),
- /* 61 E> */ B(StaNamedPropertySloppy), R(0), U8(1), U8(6),
+ /* 54 S> */ B(LdaNamedProperty), R(1), U8(1), U8(4),
+ B(MulSmi), I8(2), U8(6),
+ /* 61 E> */ B(StaNamedPropertySloppy), R(1), U8(1), U8(7),
B(LdaUndefined),
/* 67 S> */ B(Return),
]
@@ -80,13 +80,13 @@ parameter count: 1
bytecode array length: 25
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(1),
+ /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(1),
B(Mov), R(1), R(0),
/* 52 S> */ B(LdaSmi), I8(1),
B(Star), R(2),
- B(LdaKeyedProperty), R(0), U8(3),
- B(BitwiseXorSmi), I8(2), U8(5),
- /* 57 E> */ B(StaKeyedPropertySloppy), R(0), R(2), U8(6),
+ B(LdaKeyedProperty), R(1), U8(4),
+ B(BitwiseXorSmi), I8(2), U8(6),
+ /* 57 E> */ B(StaKeyedPropertySloppy), R(1), R(2), U8(7),
B(LdaUndefined),
/* 63 S> */ B(Return),
]
@@ -109,9 +109,9 @@ bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(1),
/* 42 E> */ B(StaCurrentContextSlot), U8(4),
- /* 45 S> */ B(CreateClosure), U8(0), U8(2), U8(2),
+ /* 45 S> */ B(CreateClosure), U8(0), U8(3), U8(2),
/* 75 S> */ B(LdaCurrentContextSlot), U8(4),
- B(BitwiseOrSmi), I8(24), U8(3),
+ B(BitwiseOrSmi), I8(24), U8(4),
/* 77 E> */ B(StaCurrentContextSlot), U8(4),
B(LdaUndefined),
/* 84 S> */ B(Return),
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/Conditional.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/Conditional.golden
index db44e2bd87..42af60e152 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/Conditional.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/Conditional.golden
@@ -51,7 +51,7 @@ bytecodes: [
/* 34 S> */ B(LdaZero),
B(Star), R(0),
B(LdaSmi), I8(1),
- /* 43 E> */ B(TestLessThan), R(0), U8(2),
+ /* 43 E> */ B(TestLessThan), R(0), U8(3),
B(JumpIfFalse), U8(6),
B(LdaSmi), I8(2),
B(Jump), U8(4),
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/ConstVariable.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/ConstVariable.golden
index 6ba2ad4d94..77f8da1fa5 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/ConstVariable.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/ConstVariable.golden
@@ -11,10 +11,8 @@ snippet: "
"
frame size: 1
parameter count: 1
-bytecode array length: 10
+bytecode array length: 7
bytecodes: [
- B(LdaTheHole),
- B(Star), R(0),
/* 30 E> */ B(StackCheck),
/* 44 S> */ B(LdaSmi), I8(10),
B(Star), R(0),
@@ -32,10 +30,8 @@ snippet: "
"
frame size: 1
parameter count: 1
-bytecode array length: 10
+bytecode array length: 7
bytecodes: [
- B(LdaTheHole),
- B(Star), R(0),
/* 30 E> */ B(StackCheck),
/* 44 S> */ B(LdaSmi), I8(10),
B(Star), R(0),
@@ -82,10 +78,8 @@ snippet: "
"
frame size: 1
parameter count: 1
-bytecode array length: 17
+bytecode array length: 14
bytecodes: [
- B(LdaTheHole),
- B(Star), R(0),
/* 30 E> */ B(StackCheck),
/* 44 S> */ B(LdaSmi), I8(10),
B(Star), R(0),
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/ConstVariableContextSlot.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/ConstVariableContextSlot.golden
index c92627b183..68562f6539 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/ConstVariableContextSlot.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/ConstVariableContextSlot.golden
@@ -17,7 +17,7 @@ bytecodes: [
B(PushContext), R(1),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(4),
- B(CreateClosure), U8(0), U8(2), U8(2),
+ B(CreateClosure), U8(0), U8(3), U8(2),
B(Star), R(0),
/* 30 E> */ B(StackCheck),
/* 44 S> */ B(LdaSmi), I8(10),
@@ -43,7 +43,7 @@ bytecodes: [
B(PushContext), R(1),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(4),
- B(CreateClosure), U8(0), U8(2), U8(2),
+ B(CreateClosure), U8(0), U8(3), U8(2),
B(Star), R(0),
/* 30 E> */ B(StackCheck),
/* 44 S> */ B(LdaSmi), I8(10),
@@ -69,7 +69,7 @@ bytecodes: [
B(PushContext), R(1),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(4),
- B(CreateClosure), U8(0), U8(2), U8(2),
+ B(CreateClosure), U8(0), U8(3), U8(2),
B(Star), R(0),
/* 30 E> */ B(StackCheck),
/* 47 S> */ B(LdaSmi), I8(20),
@@ -103,7 +103,7 @@ bytecodes: [
B(PushContext), R(1),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(4),
- B(CreateClosure), U8(0), U8(2), U8(2),
+ B(CreateClosure), U8(0), U8(3), U8(2),
B(Star), R(0),
/* 30 E> */ B(StackCheck),
/* 44 S> */ B(LdaSmi), I8(10),
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/ContextParameters.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/ContextParameters.golden
index 63e48fd10a..452e470a46 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/ContextParameters.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/ContextParameters.golden
@@ -20,7 +20,7 @@ bytecodes: [
B(Ldar), R(arg0),
B(StaCurrentContextSlot), U8(4),
/* 10 E> */ B(StackCheck),
- /* 19 S> */ B(CreateClosure), U8(0), U8(2), U8(2),
+ /* 19 S> */ B(CreateClosure), U8(0), U8(3), U8(2),
/* 52 S> */ B(Return),
]
constant pool: [
@@ -43,7 +43,7 @@ bytecodes: [
B(Ldar), R(arg0),
B(StaCurrentContextSlot), U8(4),
/* 10 E> */ B(StackCheck),
- /* 27 S> */ B(CreateClosure), U8(0), U8(2), U8(2),
+ /* 27 S> */ B(CreateClosure), U8(0), U8(3), U8(2),
B(Star), R(0),
/* 53 S> */ B(LdaCurrentContextSlot), U8(4),
/* 66 S> */ B(Return),
@@ -70,7 +70,7 @@ bytecodes: [
B(Ldar), R(arg2),
B(StaCurrentContextSlot), U8(4),
/* 10 E> */ B(StackCheck),
- /* 29 S> */ B(CreateClosure), U8(0), U8(2), U8(2),
+ /* 29 S> */ B(CreateClosure), U8(0), U8(3), U8(2),
/* 61 S> */ B(Return),
]
constant pool: [
@@ -93,7 +93,7 @@ bytecodes: [
/* 10 E> */ B(StackCheck),
/* 26 S> */ B(Ldar), R(this),
/* 26 E> */ B(StaCurrentContextSlot), U8(4),
- /* 32 S> */ B(CreateClosure), U8(0), U8(2), U8(2),
+ /* 32 S> */ B(CreateClosure), U8(0), U8(3), U8(2),
/* 65 S> */ B(Return),
]
constant pool: [
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/ContextVariables.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/ContextVariables.golden
index c763cca3e9..f674459590 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/ContextVariables.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/ContextVariables.golden
@@ -16,7 +16,7 @@ bytecodes: [
B(CreateFunctionContext), U8(1),
B(PushContext), R(0),
/* 30 E> */ B(StackCheck),
- /* 41 S> */ B(CreateClosure), U8(0), U8(2), U8(2),
+ /* 41 S> */ B(CreateClosure), U8(0), U8(3), U8(2),
/* 71 S> */ B(Return),
]
constant pool: [
@@ -38,7 +38,7 @@ bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(1),
/* 42 E> */ B(StaCurrentContextSlot), U8(4),
- /* 45 S> */ B(CreateClosure), U8(0), U8(2), U8(2),
+ /* 45 S> */ B(CreateClosure), U8(0), U8(3), U8(2),
/* 75 S> */ B(Return),
]
constant pool: [
@@ -62,7 +62,7 @@ bytecodes: [
/* 42 E> */ B(StaCurrentContextSlot), U8(4),
/* 53 S> */ B(LdaSmi), I8(2),
/* 53 E> */ B(StaCurrentContextSlot), U8(5),
- /* 56 S> */ B(CreateClosure), U8(0), U8(2), U8(2),
+ /* 56 S> */ B(CreateClosure), U8(0), U8(3), U8(2),
/* 92 S> */ B(Return),
]
constant pool: [
@@ -82,9 +82,9 @@ bytecodes: [
B(CreateFunctionContext), U8(1),
B(PushContext), R(0),
/* 30 E> */ B(StackCheck),
- /* 41 S> */ B(CreateClosure), U8(0), U8(4), U8(2),
+ /* 41 S> */ B(CreateClosure), U8(0), U8(5), U8(2),
B(Star), R(1),
- /* 64 E> */ B(CallUndefinedReceiver0), R(1), U8(2),
+ /* 64 E> */ B(CallUndefinedReceiver0), R(1), U8(3),
/* 68 S> */ B(LdaCurrentContextSlot), U8(4),
/* 78 S> */ B(Return),
]
@@ -118,7 +118,7 @@ bytecodes: [
B(StaCurrentContextSlot), U8(4),
/* 69 S> */ B(LdaSmi), I8(2),
/* 69 E> */ B(StaCurrentContextSlot), U8(4),
- /* 72 S> */ B(CreateClosure), U8(1), U8(2), U8(2),
+ /* 72 S> */ B(CreateClosure), U8(1), U8(3), U8(2),
B(PopContext), R(0),
/* 104 S> */ B(Return),
]
@@ -899,9 +899,9 @@ bytecodes: [
/* 3421 E> */ B(StaCurrentContextSlot), U8(254),
/* 3435 S> */ B(LdaZero),
/* 3435 E> */ B(StaCurrentContextSlot), U8(255),
- /* 3438 S> */ B(LdaGlobal), U8(0), U8(4),
+ /* 3438 S> */ B(LdaGlobal), U8(0), U8(5),
B(Star), R(1),
- /* 3438 E> */ B(CallUndefinedReceiver0), R(1), U8(2),
+ /* 3438 E> */ B(CallUndefinedReceiver0), R(1), U8(3),
/* 3454 S> */ B(LdaSmi), I8(100),
/* 3454 E> */ B(Wide), B(StaCurrentContextSlot), U16(256),
/* 3459 S> */ B(Wide), B(LdaCurrentContextSlot), U16(256),
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/CountOperators.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/CountOperators.golden
index 5a2146243c..6173d3fc36 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/CountOperators.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/CountOperators.golden
@@ -16,7 +16,7 @@ bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
- /* 45 S> */ B(Inc), U8(2),
+ /* 45 S> */ B(Inc), U8(3),
B(Star), R(0),
/* 57 S> */ B(Return),
]
@@ -36,9 +36,9 @@ bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
- /* 45 S> */ B(ToNumber), R(1), U8(2),
+ /* 45 S> */ B(ToNumber), R(1), U8(3),
B(Ldar), R(1),
- B(Inc), U8(2),
+ B(Inc), U8(3),
B(Star), R(0),
B(Ldar), R(1),
/* 57 S> */ B(Return),
@@ -59,7 +59,7 @@ bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
- /* 45 S> */ B(Dec), U8(2),
+ /* 45 S> */ B(Dec), U8(3),
B(Star), R(0),
/* 57 S> */ B(Return),
]
@@ -79,9 +79,9 @@ bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
- /* 45 S> */ B(ToNumber), R(1), U8(2),
+ /* 45 S> */ B(ToNumber), R(1), U8(3),
B(Ldar), R(1),
- B(Dec), U8(2),
+ B(Dec), U8(3),
B(Star), R(0),
B(Ldar), R(1),
/* 57 S> */ B(Return),
@@ -100,13 +100,13 @@ parameter count: 1
bytecode array length: 27
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(1),
+ /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(1),
B(Mov), R(1), R(0),
- /* 54 S> */ B(LdaNamedProperty), R(0), U8(1), U8(3),
- B(ToNumber), R(2), U8(7),
+ /* 54 S> */ B(LdaNamedProperty), R(1), U8(1), U8(4),
+ B(ToNumber), R(2), U8(8),
B(Ldar), R(2),
- B(Inc), U8(7),
- /* 66 E> */ B(StaNamedPropertySloppy), R(0), U8(1), U8(5),
+ B(Inc), U8(8),
+ /* 66 E> */ B(StaNamedPropertySloppy), R(1), U8(1), U8(6),
B(Ldar), R(2),
/* 70 S> */ B(Return),
]
@@ -126,11 +126,11 @@ parameter count: 1
bytecode array length: 20
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(1),
+ /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(1),
B(Mov), R(1), R(0),
- /* 54 S> */ B(LdaNamedProperty), R(0), U8(1), U8(3),
- B(Dec), U8(7),
- /* 65 E> */ B(StaNamedPropertySloppy), R(0), U8(1), U8(5),
+ /* 54 S> */ B(LdaNamedProperty), R(1), U8(1), U8(4),
+ B(Dec), U8(8),
+ /* 65 E> */ B(StaNamedPropertySloppy), R(1), U8(1), U8(6),
/* 70 S> */ B(Return),
]
constant pool: [
@@ -151,14 +151,14 @@ bytecodes: [
/* 30 E> */ B(StackCheck),
/* 45 S> */ B(LdaConstant), U8(0),
B(Star), R(0),
- /* 60 S> */ B(CreateObjectLiteral), U8(1), U8(2), U8(1), R(2),
+ /* 60 S> */ B(CreateObjectLiteral), U8(1), U8(3), U8(1), R(2),
B(Mov), R(2), R(1),
/* 72 S> */ B(Ldar), R(0),
- /* 81 E> */ B(LdaKeyedProperty), R(1), U8(3),
- B(ToNumber), R(4), U8(7),
+ /* 81 E> */ B(LdaKeyedProperty), R(2), U8(4),
+ B(ToNumber), R(4), U8(8),
B(Ldar), R(4),
- B(Dec), U8(7),
- /* 86 E> */ B(StaKeyedPropertySloppy), R(1), R(0), U8(5),
+ B(Dec), U8(8),
+ /* 86 E> */ B(StaKeyedPropertySloppy), R(2), R(0), U8(6),
B(Ldar), R(4),
/* 90 S> */ B(Return),
]
@@ -180,12 +180,12 @@ bytecodes: [
/* 30 E> */ B(StackCheck),
/* 45 S> */ B(LdaConstant), U8(0),
B(Star), R(0),
- /* 60 S> */ B(CreateObjectLiteral), U8(1), U8(2), U8(1), R(2),
+ /* 60 S> */ B(CreateObjectLiteral), U8(1), U8(3), U8(1), R(2),
B(Mov), R(2), R(1),
/* 72 S> */ B(Ldar), R(0),
- /* 83 E> */ B(LdaKeyedProperty), R(1), U8(3),
- B(Inc), U8(7),
- /* 87 E> */ B(StaKeyedPropertySloppy), R(1), R(0), U8(5),
+ /* 83 E> */ B(LdaKeyedProperty), R(2), U8(4),
+ B(Inc), U8(8),
+ /* 87 E> */ B(StaKeyedPropertySloppy), R(2), R(0), U8(6),
/* 90 S> */ B(Return),
]
constant pool: [
@@ -208,10 +208,10 @@ bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(1),
/* 42 E> */ B(StaCurrentContextSlot), U8(4),
- /* 53 S> */ B(CreateClosure), U8(0), U8(2), U8(2),
+ /* 53 S> */ B(CreateClosure), U8(0), U8(3), U8(2),
B(Star), R(0),
/* 78 S> */ B(LdaCurrentContextSlot), U8(4),
- B(Inc), U8(3),
+ B(Inc), U8(4),
/* 87 E> */ B(StaCurrentContextSlot), U8(4),
/* 90 S> */ B(Return),
]
@@ -234,12 +234,12 @@ bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(1),
/* 42 E> */ B(StaCurrentContextSlot), U8(4),
- /* 53 S> */ B(CreateClosure), U8(0), U8(2), U8(2),
+ /* 53 S> */ B(CreateClosure), U8(0), U8(3), U8(2),
B(Star), R(0),
/* 78 S> */ B(LdaCurrentContextSlot), U8(4),
- B(ToNumber), R(2), U8(3),
+ B(ToNumber), R(2), U8(4),
B(Ldar), R(2),
- B(Dec), U8(3),
+ B(Dec), U8(4),
/* 86 E> */ B(StaCurrentContextSlot), U8(4),
B(Ldar), R(2),
/* 90 S> */ B(Return),
@@ -261,19 +261,19 @@ bytecodes: [
/* 30 E> */ B(StackCheck),
/* 44 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
- /* 55 S> */ B(CreateArrayLiteral), U8(0), U8(2), U8(9),
+ /* 55 S> */ B(CreateArrayLiteral), U8(0), U8(3), U8(17),
B(Star), R(1),
/* 63 S> */ B(Ldar), R(0),
- B(ToNumber), R(3), U8(3),
+ B(ToNumber), R(3), U8(4),
B(Ldar), R(3),
- B(Inc), U8(3),
+ B(Inc), U8(4),
B(Star), R(0),
B(LdaSmi), I8(2),
- /* 79 E> */ B(StaKeyedPropertySloppy), R(1), R(3), U8(4),
+ /* 79 E> */ B(StaKeyedPropertySloppy), R(1), R(3), U8(5),
/* 84 S> */ B(Return),
]
constant pool: [
- CONSTANT_ELEMENTS_PAIR_TYPE,
+ TUPLE2_TYPE,
]
handlers: [
]
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/CreateArguments.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/CreateArguments.golden
index cc073cfd66..53b25e5e84 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/CreateArguments.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/CreateArguments.golden
@@ -39,7 +39,7 @@ bytecodes: [
B(Star), R(0),
/* 10 E> */ B(StackCheck),
/* 15 S> */ B(LdaZero),
- /* 31 E> */ B(LdaKeyedProperty), R(0), U8(2),
+ /* 31 E> */ B(LdaKeyedProperty), R(0), U8(3),
/* 36 S> */ B(Return),
]
constant pool: [
@@ -84,7 +84,7 @@ bytecodes: [
B(Star), R(0),
/* 10 E> */ B(StackCheck),
/* 16 S> */ B(LdaZero),
- /* 32 E> */ B(LdaKeyedProperty), R(0), U8(2),
+ /* 32 E> */ B(LdaKeyedProperty), R(0), U8(3),
/* 37 S> */ B(Return),
]
constant pool: [
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/CreateRestParameter.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/CreateRestParameter.golden
index fa824bb49c..6e010af912 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/CreateRestParameter.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/CreateRestParameter.golden
@@ -13,15 +13,13 @@ snippet: "
"
frame size: 2
parameter count: 1
-bytecode array length: 13
+bytecode array length: 8
bytecodes: [
B(CreateRestParameter),
B(Star), R(0),
- B(LdaTheHole),
- B(Star), R(1),
/* 10 E> */ B(StackCheck),
- B(Mov), R(0), R(1),
- /* 26 S> */ B(Ldar), R(1),
+ B(Star), R(1),
+ /* 26 S> */ B(Nop),
/* 43 S> */ B(Return),
]
constant pool: [
@@ -36,14 +34,10 @@ snippet: "
"
frame size: 3
parameter count: 2
-bytecode array length: 19
+bytecode array length: 13
bytecodes: [
B(CreateRestParameter),
B(Star), R(0),
- B(LdaTheHole),
- B(Star), R(1),
- B(LdaTheHole),
- B(Star), R(2),
/* 10 E> */ B(StackCheck),
B(Mov), R(arg0), R(1),
B(Mov), R(0), R(2),
@@ -62,19 +56,15 @@ snippet: "
"
frame size: 3
parameter count: 2
-bytecode array length: 21
+bytecode array length: 15
bytecodes: [
B(CreateRestParameter),
B(Star), R(0),
- B(LdaTheHole),
- B(Star), R(1),
- B(LdaTheHole),
- B(Star), R(2),
/* 10 E> */ B(StackCheck),
B(Mov), R(arg0), R(1),
B(Mov), R(0), R(2),
/* 29 S> */ B(LdaZero),
- /* 44 E> */ B(LdaKeyedProperty), R(2), U8(2),
+ /* 44 E> */ B(LdaKeyedProperty), R(2), U8(3),
/* 49 S> */ B(Return),
]
constant pool: [
@@ -89,25 +79,21 @@ snippet: "
"
frame size: 5
parameter count: 2
-bytecode array length: 33
+bytecode array length: 27
bytecodes: [
B(CreateUnmappedArguments),
B(Star), R(3),
B(CreateRestParameter),
B(Star), R(0),
- B(LdaTheHole),
- B(Star), R(1),
- B(LdaTheHole),
- B(Star), R(2),
/* 10 E> */ B(StackCheck),
B(Mov), R(arg0), R(1),
B(Mov), R(0), R(2),
/* 29 S> */ B(LdaZero),
- /* 44 E> */ B(LdaKeyedProperty), R(2), U8(2),
+ /* 44 E> */ B(LdaKeyedProperty), R(2), U8(3),
B(Star), R(4),
B(LdaZero),
- /* 59 E> */ B(LdaKeyedProperty), R(3), U8(4),
- /* 48 E> */ B(Add), R(4), U8(6),
+ /* 59 E> */ B(LdaKeyedProperty), R(3), U8(5),
+ /* 48 E> */ B(Add), R(4), U8(7),
/* 64 S> */ B(Return),
]
constant pool: [
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/DeclareGlobals.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/DeclareGlobals.golden
index bf7a371605..dafe4f64aa 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/DeclareGlobals.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/DeclareGlobals.golden
@@ -86,7 +86,7 @@ bytecodes: [
B(Star), R(3),
B(CallRuntime), U16(Runtime::kInitializeVarGlobal), R(1), U8(3),
/* 11 S> */ B(LdaSmi), I8(2),
- /* 12 E> */ B(StaGlobalSloppy), U8(1), U8(4),
+ /* 12 E> */ B(StaGlobalSloppy), U8(1), U8(5),
B(Star), R(0),
/* 15 S> */ B(Return),
]
@@ -113,9 +113,9 @@ bytecodes: [
B(Mov), R(closure), R(3),
B(CallRuntime), U16(Runtime::kDeclareGlobalsForInterpreter), R(1), U8(3),
/* 0 E> */ B(StackCheck),
- /* 16 S> */ B(LdaGlobal), U8(1), U8(2),
+ /* 16 S> */ B(LdaGlobal), U8(1), U8(3),
B(Star), R(1),
- /* 16 E> */ B(CallUndefinedReceiver0), R(1), U8(5),
+ /* 16 E> */ B(CallUndefinedReceiver0), R(1), U8(6),
B(Star), R(0),
/* 20 S> */ B(Return),
]
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/Delete.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/Delete.golden
index 08b3f47e13..7519af381c 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/Delete.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/Delete.golden
@@ -14,10 +14,10 @@ parameter count: 1
bytecode array length: 14
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(1),
+ /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(1),
B(Mov), R(1), R(0),
/* 56 S> */ B(LdaConstant), U8(1),
- B(DeletePropertySloppy), R(0),
+ B(DeletePropertySloppy), R(1),
/* 75 S> */ B(Return),
]
constant pool: [
@@ -36,10 +36,10 @@ parameter count: 1
bytecode array length: 14
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 56 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(1),
+ /* 56 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(1),
B(Mov), R(1), R(0),
/* 70 S> */ B(LdaConstant), U8(1),
- B(DeletePropertyStrict), R(0),
+ B(DeletePropertyStrict), R(1),
/* 89 S> */ B(Return),
]
constant pool: [
@@ -58,10 +58,10 @@ parameter count: 1
bytecode array length: 14
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(1),
+ /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(1),
B(Mov), R(1), R(0),
/* 56 S> */ B(LdaSmi), I8(2),
- B(DeletePropertySloppy), R(0),
+ B(DeletePropertySloppy), R(1),
/* 76 S> */ B(Return),
]
constant pool: [
@@ -103,10 +103,10 @@ bytecodes: [
B(CreateFunctionContext), U8(1),
B(PushContext), R(0),
/* 30 E> */ B(StackCheck),
- /* 56 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(1),
+ /* 56 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(1),
B(Ldar), R(1),
/* 56 E> */ B(StaCurrentContextSlot), U8(4),
- /* 64 S> */ B(CreateClosure), U8(1), U8(3), U8(2),
+ /* 64 S> */ B(CreateClosure), U8(1), U8(4), U8(2),
/* 93 S> */ B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(1),
B(LdaSmi), I8(1),
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/DoExpression.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/DoExpression.golden
index 412c5ccbe6..331d7eb488 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/DoExpression.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/DoExpression.golden
@@ -58,7 +58,7 @@ bytecodes: [
/* 34 E> */ B(StackCheck),
/* 56 S> */ B(LdaSmi), I8(10),
B(Star), R(0),
- /* 69 S> */ B(Inc), U8(2),
+ /* 69 S> */ B(Inc), U8(3),
B(Star), R(0),
B(Star), R(1),
/* 74 S> */ B(Jump), U8(2),
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/Eval.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/Eval.golden
index 4ef1c7654c..d77537933c 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/Eval.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/Eval.golden
@@ -22,7 +22,7 @@ bytecodes: [
B(Ldar), R(new_target),
B(StaCurrentContextSlot), U8(5),
/* 30 E> */ B(StackCheck),
- /* 34 S> */ B(LdaLookupGlobalSlot), U8(0), U8(4), U8(1),
+ /* 34 S> */ B(LdaLookupGlobalSlot), U8(0), U8(5), U8(1),
B(Star), R(1),
B(LdaConstant), U8(1),
B(Star), R(2),
@@ -37,7 +37,7 @@ bytecodes: [
B(Mov), R(closure), R(5),
B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(3), U8(6),
B(Star), R(1),
- /* 41 E> */ B(CallUndefinedReceiver1), R(1), R(2), U8(2),
+ /* 41 E> */ B(CallUndefinedReceiver1), R(1), R(2), U8(3),
/* 53 S> */ B(Return),
]
constant pool: [
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/ForAwaitOf.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/ForAwaitOf.golden
index 895c6ff7f7..0ebdd7ea95 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/ForAwaitOf.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/ForAwaitOf.golden
@@ -14,451 +14,412 @@ snippet: "
}
f();
"
-frame size: 19
+frame size: 17
parameter count: 1
-bytecode array length: 1027
+bytecode array length: 946
bytecodes: [
B(Ldar), R(new_target),
- B(JumpIfUndefined), U8(39),
- B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
- B(PushContext), R(4),
+ B(JumpIfUndefined), U8(25),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
+ B(PushContext), R(1),
B(ResumeGenerator), R(new_target),
- B(Star), R(3),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(3),
- B(JumpIfTrue), U8(132),
- B(LdaSmi), I8(1),
- B(TestEqualStrictNoFeedback), R(3),
- B(JumpIfTrueConstant), U8(12),
- B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(3),
- B(JumpIfTrueConstant), U8(14),
+ B(Star), R(0),
+ B(SwitchOnSmiNoFeedback), U8(0), U8(3), I8(0),
B(LdaSmi), I8(79),
- B(Star), R(5),
- B(CallRuntime), U16(Runtime::kAbort), R(5), U8(1),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
B(LdaSmi), I8(-2),
- B(Star), R(3),
- B(CreateFunctionContext), U8(13),
- B(PushContext), R(0),
- B(Ldar), R(this),
+ B(Star), R(0),
+ B(CreateFunctionContext), U8(12),
+ B(PushContext), R(2),
+ B(Mov), R(closure), R(3),
+ B(Mov), R(this), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
B(StaCurrentContextSlot), U8(4),
/* 16 E> */ B(StackCheck),
- B(LdaImmutableCurrentContextSlot), U8(4),
- B(Star), R(6),
- B(Mov), R(closure), R(5),
- B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(5), U8(2),
- B(StaCurrentContextSlot), U8(5),
B(LdaUndefined),
- B(Star), R(5),
- B(CallJSRuntime), U8(%async_function_promise_create), R(5), U8(1),
- B(StaCurrentContextSlot), U8(11),
- B(Mov), R(context), R(7),
- B(Mov), R(context), R(8),
+ B(Star), R(3),
+ B(CallJSRuntime), U8(%async_function_promise_create), R(3), U8(1),
+ B(StaCurrentContextSlot), U8(10),
+ B(Mov), R(context), R(5),
+ B(Mov), R(context), R(6),
B(Ldar), R(closure),
- B(CreateBlockContext), U8(0),
- B(PushContext), R(1),
+ B(CreateBlockContext), U8(3),
+ B(PushContext), R(7),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(4),
B(LdaZero),
- B(StaContextSlot), R(1), U8(9), U8(0),
+ B(StaContextSlot), R(7), U8(8), U8(0),
+ B(Mov), R(context), R(10),
B(Mov), R(context), R(11),
- B(Mov), R(context), R(12),
- /* 43 S> */ B(CreateArrayLiteral), U8(1), U8(2), U8(9),
- B(Star), R(13),
- B(LdaNamedProperty), R(13), U8(2), U8(7),
+ /* 43 S> */ B(CreateArrayLiteral), U8(4), U8(3), U8(17),
+ B(Star), R(12),
+ B(LdaNamedProperty), R(12), U8(5), U8(8),
B(JumpIfUndefined), U8(17),
B(JumpIfNull), U8(15),
- B(Star), R(14),
- B(CallProperty0), R(14), R(13), U8(9),
+ B(Star), R(13),
+ B(CallProperty0), R(13), R(12), U8(10),
B(JumpIfJSReceiver), U8(23),
B(CallRuntime), U16(Runtime::kThrowSymbolAsyncIteratorInvalid), R(0), U8(0),
- B(LdaNamedProperty), R(13), U8(3), U8(3),
- B(Star), R(14),
- B(CallProperty0), R(14), R(13), U8(5),
- B(Star), R(14),
- B(InvokeIntrinsic), U8(Runtime::k_CreateAsyncFromSyncIterator), R(14), U8(1),
- /* 43 E> */ B(StaContextSlot), R(1), U8(7), U8(0),
+ B(LdaNamedProperty), R(12), U8(6), U8(4),
+ B(Star), R(13),
+ B(CallProperty0), R(13), R(12), U8(6),
+ B(Star), R(13),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateAsyncFromSyncIterator), R(13), U8(1),
+ /* 43 E> */ B(StaContextSlot), R(7), U8(6), U8(0),
+ B(Ldar), R(0),
+ B(SwitchOnSmiNoFeedback), U8(7), U8(1), I8(0),
B(LdaSmi), I8(-2),
- B(TestEqualStrictNoFeedback), R(3),
- B(JumpIfTrue), U8(16),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(3),
- B(JumpIfTrue), U8(75),
+ B(TestEqualStrictNoFeedback), R(0),
+ B(JumpIfTrue), U8(11),
B(LdaSmi), I8(79),
- B(Star), R(13),
- B(CallRuntime), U16(Runtime::kAbort), R(13), U8(1),
- /* 40 S> */ B(LdaContextSlot), R(1), U8(7), U8(0),
+ B(Star), R(12),
+ B(CallRuntime), U16(Runtime::kAbort), R(12), U8(1),
+ /* 40 S> */ B(LdaImmutableContextSlot), R(7), U8(4), U8(0),
+ B(Star), R(12),
+ /* 40 S> */ B(LdaContextSlot), R(7), U8(6), U8(0),
B(Star), R(14),
- B(LdaNamedProperty), R(14), U8(4), U8(13),
+ B(LdaNamedProperty), R(14), U8(8), U8(14),
B(Star), R(13),
- /* 40 E> */ B(CallProperty0), R(13), R(14), U8(11),
- B(StaContextSlot), R(1), U8(10), U8(0),
+ /* 40 E> */ B(CallProperty0), R(13), R(14), U8(12),
+ B(StaContextSlot), R(7), U8(9), U8(0),
/* 40 S> */ B(LdaUndefined),
B(Star), R(13),
- B(LdaImmutableContextSlot), R(1), U8(5), U8(0),
+ B(LdaImmutableContextSlot), R(7), U8(4), U8(0),
B(Star), R(14),
- B(LdaContextSlot), R(1), U8(10), U8(0),
+ B(LdaContextSlot), R(7), U8(9), U8(0),
B(Star), R(15),
- B(LdaContextSlot), R(1), U8(11), U8(0),
+ B(LdaContextSlot), R(7), U8(10), U8(0),
B(Star), R(16),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(13), U8(4),
- B(LdaContextSlot), R(1), U8(11), U8(0),
+ B(LdaContextSlot), R(7), U8(10), U8(0),
B(Star), R(13),
- B(LdaImmutableContextSlot), R(1), U8(5), U8(0),
- B(Star), R(14),
B(LdaZero),
- B(SuspendGenerator), R(14), U8(2),
+ B(SuspendGenerator), R(12), U8(2),
B(Ldar), R(13),
/* 57 S> */ B(Return),
B(LdaSmi), I8(-2),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(14), U8(1),
- B(Star), R(15),
- B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(14), U8(1),
- B(Star), R(16),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(12), U8(1),
+ B(Star), R(13),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(12), U8(1),
+ B(Star), R(14),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(16),
- B(JumpIfTrue), U8(30),
+ B(TestEqualStrictNoFeedback), R(14),
+ B(JumpIfTrue), U8(28),
B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(16),
- B(JumpIfTrue), U8(21),
- B(Jump), U8(2),
+ B(TestEqualStrictNoFeedback), R(14),
+ B(JumpIfTrue), U8(19),
B(LdaTrue),
- B(Star), R(18),
- B(Mov), R(15), R(17),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(17), U8(2),
- B(Star), R(10),
- B(LdaZero),
+ B(Star), R(16),
+ B(Mov), R(13), R(15),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(15), U8(2),
B(Star), R(9),
+ B(LdaZero),
+ B(Star), R(8),
B(Jump), U8(155),
- B(Ldar), R(15),
+ B(Ldar), R(13),
B(ReThrow),
- B(Ldar), R(15),
- /* 40 E> */ B(StaContextSlot), R(1), U8(8), U8(0),
- B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(15), U8(1),
+ B(Ldar), R(13),
+ /* 40 E> */ B(StaContextSlot), R(7), U8(7), U8(0),
+ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(13), U8(1),
B(ToBooleanLogicalNot),
B(JumpIfFalse), U8(13),
- B(LdaContextSlot), R(1), U8(8), U8(0),
- B(Star), R(13),
- B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(13), U8(1),
- B(LdaContextSlot), R(1), U8(8), U8(0),
- B(Star), R(13),
- B(LdaNamedProperty), R(13), U8(5), U8(15),
+ B(LdaContextSlot), R(7), U8(7), U8(0),
+ B(Star), R(12),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
+ B(LdaContextSlot), R(7), U8(7), U8(0),
+ B(Star), R(12),
+ B(LdaNamedProperty), R(12), U8(9), U8(16),
B(JumpIfToBooleanTrue), U8(56),
- B(LdaContextSlot), R(1), U8(8), U8(0),
- B(Star), R(13),
- B(LdaNamedProperty), R(13), U8(6), U8(17),
- B(StaContextSlot), R(1), U8(12), U8(0),
+ B(LdaContextSlot), R(7), U8(7), U8(0),
+ B(Star), R(12),
+ B(LdaNamedProperty), R(12), U8(10), U8(18),
+ B(StaContextSlot), R(7), U8(11), U8(0),
B(LdaSmi), I8(2),
- B(StaContextSlot), R(1), U8(9), U8(0),
- B(LdaContextSlot), R(1), U8(12), U8(0),
- B(StaContextSlot), R(1), U8(6), U8(0),
+ B(StaContextSlot), R(7), U8(8), U8(0),
+ B(LdaContextSlot), R(7), U8(11), U8(0),
+ B(StaContextSlot), R(7), U8(5), U8(0),
/* 23 E> */ B(StackCheck),
B(Ldar), R(closure),
- B(CreateBlockContext), U8(7),
- B(PushContext), R(2),
+ B(CreateBlockContext), U8(11),
+ B(PushContext), R(12),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(4),
- B(LdaContextSlot), R(1), U8(6), U8(0),
+ B(LdaContextSlot), R(7), U8(5), U8(0),
B(StaCurrentContextSlot), U8(4),
- B(PopContext), R(2),
+ B(PopContext), R(12),
B(LdaZero),
- B(StaContextSlot), R(1), U8(9), U8(0),
- B(JumpLoop), U8(222), I8(0),
+ B(StaContextSlot), R(7), U8(8), U8(0),
+ B(JumpLoop), U8(219), I8(0),
B(Jump), U8(48),
- B(Star), R(13),
- B(Ldar), R(closure),
- B(CreateCatchContext), R(13), U8(8), U8(9),
B(Star), R(12),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(12), U8(12), U8(13),
+ B(Star), R(11),
B(LdaTheHole),
B(SetPendingMessage),
- B(Ldar), R(12),
- B(PushContext), R(2),
- B(LdaContextSlot), R(1), U8(9), U8(0),
+ B(Ldar), R(11),
+ B(PushContext), R(12),
+ B(LdaContextSlot), R(7), U8(8), U8(0),
B(Star), R(13),
B(LdaSmi), I8(2),
- B(TestEqualStrict), R(13), U8(19),
+ B(TestEqualStrict), R(13), U8(20),
B(JumpIfFalse), U8(8),
B(LdaSmi), I8(1),
- B(StaContextSlot), R(1), U8(9), U8(0),
+ B(StaContextSlot), R(7), U8(8), U8(0),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(13),
B(CallRuntime), U16(Runtime::kReThrow), R(13), U8(1),
- B(PopContext), R(2),
+ B(PopContext), R(12),
B(LdaSmi), I8(-1),
- B(Star), R(9),
+ B(Star), R(8),
B(Jump), U8(8),
- B(Star), R(10),
- B(LdaSmi), I8(1),
B(Star), R(9),
+ B(LdaSmi), I8(1),
+ B(Star), R(8),
B(LdaTheHole),
B(SetPendingMessage),
+ B(Star), R(10),
+ B(LdaContextSlot), R(7), U8(8), U8(0),
B(Star), R(11),
- B(LdaContextSlot), R(1), U8(9), U8(0),
- B(Star), R(12),
B(LdaZero),
- B(TestEqualStrict), R(12), U8(20),
- B(JumpIfTrueConstant), U8(16),
- B(LdaContextSlot), R(1), U8(7), U8(0),
- B(Star), R(12),
- B(LdaNamedProperty), R(12), U8(10), U8(21),
- B(StaContextSlot), R(1), U8(13), U8(0),
- B(LdaContextSlot), R(1), U8(13), U8(0),
+ B(TestEqualStrict), R(11), U8(21),
+ B(JumpIfTrueConstant), U8(18),
+ B(LdaContextSlot), R(7), U8(6), U8(0),
+ B(Star), R(11),
+ B(LdaNamedProperty), R(11), U8(14), U8(22),
+ B(StaContextSlot), R(7), U8(12), U8(0),
+ B(LdaContextSlot), R(7), U8(12), U8(0),
B(TestUndetectable),
B(JumpIfFalse), U8(4),
- B(JumpConstant), U8(15),
- B(LdaContextSlot), R(1), U8(9), U8(0),
- B(Star), R(12),
+ B(JumpConstant), U8(17),
+ B(LdaContextSlot), R(7), U8(8), U8(0),
+ B(Star), R(11),
B(LdaSmi), I8(1),
- B(TestEqualStrict), R(12), U8(24),
- B(JumpIfFalse), U8(179),
- B(LdaContextSlot), R(1), U8(13), U8(0),
+ B(TestEqualStrict), R(11), U8(25),
+ B(JumpIfFalse), U8(175),
+ B(LdaContextSlot), R(7), U8(12), U8(0),
B(TestTypeOf), U8(5),
B(JumpIfFalse), U8(4),
B(Jump), U8(18),
- B(Wide), B(LdaSmi), I16(132),
+ B(Wide), B(LdaSmi), I16(130),
+ B(Star), R(11),
+ B(LdaConstant), U8(15),
B(Star), R(12),
- B(LdaConstant), U8(11),
- B(Star), R(13),
- B(CallRuntime), U16(Runtime::kNewTypeError), R(12), U8(2),
+ B(CallRuntime), U16(Runtime::kNewTypeError), R(11), U8(2),
B(Throw),
- B(Mov), R(context), R(12),
- B(LdaContextSlot), R(1), U8(13), U8(0),
+ B(Mov), R(context), R(11),
+ B(LdaImmutableContextSlot), R(7), U8(4), U8(0),
+ B(Star), R(12),
+ B(LdaContextSlot), R(7), U8(12), U8(0),
B(Star), R(13),
- B(LdaContextSlot), R(1), U8(7), U8(0),
+ B(LdaContextSlot), R(7), U8(6), U8(0),
B(Star), R(14),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(13), U8(2),
- B(StaContextSlot), R(1), U8(14), U8(0),
+ B(StaContextSlot), R(7), U8(13), U8(0),
B(LdaUndefined),
B(Star), R(13),
- B(LdaImmutableContextSlot), R(1), U8(5), U8(0),
+ B(LdaImmutableContextSlot), R(7), U8(4), U8(0),
B(Star), R(14),
- B(LdaContextSlot), R(1), U8(14), U8(0),
+ B(LdaContextSlot), R(7), U8(13), U8(0),
B(Star), R(15),
- B(LdaContextSlot), R(1), U8(11), U8(0),
+ B(LdaContextSlot), R(7), U8(10), U8(0),
B(Star), R(16),
B(CallJSRuntime), U8(%async_function_await_caught), R(13), U8(4),
- B(LdaContextSlot), R(1), U8(11), U8(0),
+ B(LdaContextSlot), R(7), U8(10), U8(0),
B(Star), R(13),
- B(LdaImmutableContextSlot), R(1), U8(5), U8(0),
- B(Star), R(14),
B(LdaSmi), I8(1),
- B(SuspendGenerator), R(14), U8(2),
+ B(SuspendGenerator), R(12), U8(2),
B(Ldar), R(13),
/* 57 S> */ B(Return),
B(LdaSmi), I8(-2),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(14), U8(1),
- B(Star), R(15),
- B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(14), U8(1),
- B(Star), R(16),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(12), U8(1),
+ B(Star), R(13),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(12), U8(1),
+ B(Star), R(14),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(16),
- B(JumpIfTrue), U8(38),
+ B(TestEqualStrictNoFeedback), R(14),
+ B(JumpIfTrue), U8(36),
B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(16),
- B(JumpIfTrue), U8(29),
- B(Jump), U8(2),
+ B(TestEqualStrictNoFeedback), R(14),
+ B(JumpIfTrue), U8(27),
B(LdaTrue),
- B(Star), R(18),
- B(Mov), R(15), R(17),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(17), U8(2),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(Star), R(6),
+ B(Star), R(16),
+ B(Mov), R(13), R(15),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(15), U8(2),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(Star), R(4),
B(LdaZero),
- B(Star), R(5),
- B(JumpConstant), U8(18),
- B(Ldar), R(15),
+ B(Star), R(3),
+ B(JumpConstant), U8(22),
+ B(Ldar), R(13),
B(ReThrow),
- B(Ldar), R(15),
+ B(Ldar), R(13),
B(Jump), U8(20),
- B(Star), R(13),
- B(Ldar), R(closure),
- B(CreateCatchContext), R(13), U8(8), U8(13),
B(Star), R(12),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(12), U8(12), U8(16),
+ B(Star), R(11),
B(LdaTheHole),
B(SetPendingMessage),
- B(Ldar), R(12),
- B(PushContext), R(2),
- B(PopContext), R(2),
- B(Jump), U8(158),
- B(LdaContextSlot), R(1), U8(13), U8(0),
+ B(Ldar), R(11),
+ B(PushContext), R(12),
+ B(PopContext), R(12),
+ B(Jump), U8(153),
+ B(LdaImmutableContextSlot), R(7), U8(4), U8(0),
+ B(Star), R(11),
+ B(LdaContextSlot), R(7), U8(12), U8(0),
B(Star), R(12),
- B(LdaContextSlot), R(1), U8(7), U8(0),
+ B(LdaContextSlot), R(7), U8(6), U8(0),
B(Star), R(13),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(2),
- B(StaContextSlot), R(1), U8(16), U8(0),
+ B(StaContextSlot), R(7), U8(15), U8(0),
B(LdaUndefined),
B(Star), R(12),
- B(LdaImmutableContextSlot), R(1), U8(5), U8(0),
+ B(LdaImmutableContextSlot), R(7), U8(4), U8(0),
B(Star), R(13),
- B(LdaContextSlot), R(1), U8(16), U8(0),
+ B(LdaContextSlot), R(7), U8(15), U8(0),
B(Star), R(14),
- B(LdaContextSlot), R(1), U8(11), U8(0),
+ B(LdaContextSlot), R(7), U8(10), U8(0),
B(Star), R(15),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(12), U8(4),
- B(LdaContextSlot), R(1), U8(11), U8(0),
+ B(LdaContextSlot), R(7), U8(10), U8(0),
B(Star), R(12),
- B(LdaImmutableContextSlot), R(1), U8(5), U8(0),
- B(Star), R(13),
B(LdaSmi), I8(2),
- B(SuspendGenerator), R(13), U8(2),
+ B(SuspendGenerator), R(11), U8(2),
B(Ldar), R(12),
/* 57 S> */ B(Return),
B(LdaSmi), I8(-2),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(13), U8(1),
- B(Star), R(14),
- B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(13), U8(1),
- B(Star), R(15),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(11), U8(1),
+ B(Star), R(12),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(11), U8(1),
+ B(Star), R(13),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(15),
- B(JumpIfTrue), U8(39),
+ B(TestEqualStrictNoFeedback), R(13),
+ B(JumpIfTrue), U8(36),
B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(15),
- B(JumpIfTrue), U8(30),
- B(Jump), U8(2),
+ B(TestEqualStrictNoFeedback), R(13),
+ B(JumpIfTrue), U8(27),
B(LdaTrue),
- B(Star), R(17),
- B(Mov), R(14), R(16),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(16), U8(2),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(Star), R(6),
- B(LdaSmi), I8(1),
- B(Star), R(5),
- B(Jump), U8(168),
- B(Ldar), R(14),
+ B(Star), R(15),
+ B(Mov), R(12), R(14),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(14), U8(2),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
+ B(Jump), U8(160),
+ B(Ldar), R(12),
B(ReThrow),
- B(Ldar), R(14),
- B(StaContextSlot), R(1), U8(15), U8(0),
- B(LdaContextSlot), R(1), U8(15), U8(0),
- B(Star), R(12),
- B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(12), U8(1),
+ B(Ldar), R(12),
+ B(StaContextSlot), R(7), U8(14), U8(0),
+ B(LdaContextSlot), R(7), U8(14), U8(0),
+ B(Star), R(11),
+ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(11), U8(1),
B(JumpIfToBooleanFalse), U8(4),
B(Jump), U8(13),
- B(LdaContextSlot), R(1), U8(15), U8(0),
- B(Star), R(12),
- B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
- B(Ldar), R(11),
+ B(LdaContextSlot), R(7), U8(14), U8(0),
+ B(Star), R(11),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
+ B(Ldar), R(10),
B(SetPendingMessage),
+ B(Ldar), R(8),
+ B(SwitchOnSmiNoFeedback), U8(19), U8(2), I8(0),
+ B(Jump), U8(25),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(9),
- B(JumpIfTrue), U8(10),
- B(LdaSmi), I8(1),
- B(TestEqualStrictNoFeedback), R(9),
- B(JumpIfTrue), U8(21),
- B(Jump), U8(26),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(LdaSmi), I8(2),
- B(Star), R(5),
- B(Mov), R(10), R(6),
- B(Jump), U8(101),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(Ldar), R(10),
+ B(Star), R(3),
+ B(Mov), R(9), R(4),
+ B(Jump), U8(99),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(Ldar), R(9),
B(ReThrow),
- B(PopContext), R(1),
+ B(PopContext), R(7),
B(LdaUndefined),
- B(Star), R(9),
- B(LdaCurrentContextSlot), U8(11),
- B(Star), R(10),
+ B(Star), R(7),
+ B(LdaCurrentContextSlot), U8(10),
+ B(Star), R(8),
B(LdaUndefined),
- B(Star), R(11),
- B(CallJSRuntime), U8(%promise_resolve), R(9), U8(3),
- B(LdaCurrentContextSlot), U8(11),
- B(Star), R(6),
- B(LdaSmi), I8(3),
- B(Star), R(5),
- B(Jump), U8(68),
- B(Jump), U8(54),
B(Star), R(9),
+ B(CallJSRuntime), U8(%promise_resolve), R(7), U8(3),
+ B(LdaCurrentContextSlot), U8(10),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
+ B(Jump), U8(67),
+ B(Jump), U8(53),
+ B(Star), R(7),
B(Ldar), R(closure),
- B(CreateCatchContext), R(9), U8(8), U8(17),
- B(Star), R(8),
+ B(CreateCatchContext), R(7), U8(12), U8(21),
+ B(Star), R(6),
B(LdaTheHole),
B(SetPendingMessage),
- B(Ldar), R(8),
- B(PushContext), R(1),
+ B(Ldar), R(6),
+ B(PushContext), R(7),
B(LdaUndefined),
+ B(Star), R(8),
+ B(LdaContextSlot), R(7), U8(10), U8(0),
B(Star), R(9),
- B(LdaContextSlot), R(1), U8(11), U8(0),
- B(Star), R(10),
B(LdaImmutableCurrentContextSlot), U8(4),
- B(Star), R(11),
+ B(Star), R(10),
B(LdaFalse),
- B(Star), R(12),
- B(CallJSRuntime), U8(%promise_internal_reject), R(9), U8(4),
- B(LdaContextSlot), R(1), U8(11), U8(0),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(Star), R(6),
- B(LdaSmi), I8(4),
- B(Star), R(5),
+ B(Star), R(11),
+ B(CallJSRuntime), U8(%promise_internal_reject), R(8), U8(4),
+ B(LdaContextSlot), R(7), U8(10), U8(0),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
B(Jump), U8(14),
B(LdaSmi), I8(-1),
- B(Star), R(5),
+ B(Star), R(3),
B(Jump), U8(8),
- B(Star), R(6),
- B(LdaSmi), I8(5),
- B(Star), R(5),
+ B(Star), R(4),
+ B(LdaSmi), I8(1),
+ B(Star), R(3),
B(LdaTheHole),
B(SetPendingMessage),
- B(Star), R(7),
+ B(Star), R(5),
B(LdaUndefined),
- B(Star), R(8),
- B(LdaCurrentContextSlot), U8(11),
- B(Star), R(9),
- B(CallJSRuntime), U8(%async_function_promise_release), R(8), U8(2),
- B(Ldar), R(7),
+ B(Star), R(6),
+ B(LdaCurrentContextSlot), U8(10),
+ B(Star), R(7),
+ B(CallJSRuntime), U8(%async_function_promise_release), R(6), U8(2),
+ B(Ldar), R(5),
B(SetPendingMessage),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(5),
- B(JumpIfTrue), U8(34),
- B(LdaSmi), I8(1),
- B(TestEqualStrictNoFeedback), R(5),
- B(JumpIfTrue), U8(31),
- B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(5),
- B(JumpIfTrue), U8(28),
- B(LdaSmi), I8(3),
- B(TestEqualStrictNoFeedback), R(5),
- B(JumpIfTrue), U8(25),
- B(LdaSmi), I8(4),
- B(TestEqualStrictNoFeedback), R(5),
- B(JumpIfTrue), U8(22),
- B(LdaSmi), I8(5),
- B(TestEqualStrictNoFeedback), R(5),
- B(JumpIfTrue), U8(19),
- B(Jump), U8(20),
- B(Ldar), R(6),
- /* 57 S> */ B(Return),
- B(Ldar), R(6),
- /* 57 S> */ B(Return),
- B(Ldar), R(6),
- /* 57 S> */ B(Return),
- B(Ldar), R(6),
- /* 57 S> */ B(Return),
- B(Ldar), R(6),
+ B(Ldar), R(3),
+ B(SwitchOnSmiNoFeedback), U8(23), U8(2), I8(0),
+ B(Jump), U8(8),
+ B(Ldar), R(4),
/* 57 S> */ B(Return),
- B(Ldar), R(6),
+ B(Ldar), R(4),
B(ReThrow),
B(LdaUndefined),
/* 57 S> */ B(Return),
]
constant pool: [
+ Smi [116],
+ Smi [544],
+ Smi [688],
FIXED_ARRAY_TYPE,
- CONSTANT_ELEMENTS_PAIR_TYPE,
+ TUPLE2_TYPE,
SYMBOL_TYPE,
SYMBOL_TYPE,
+ Smi [83],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
@@ -467,20 +428,22 @@ constant pool: [
FIXED_ARRAY_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
- Smi [557],
FIXED_ARRAY_TYPE,
- Smi [699],
- Smi [348],
- Smi [371],
+ Smi [339],
+ Smi [362],
+ Smi [6],
+ Smi [22],
FIXED_ARRAY_TYPE,
- Smi [317],
+ Smi [304],
+ Smi [6],
+ Smi [9],
]
handlers: [
- [80, 940, 946],
- [83, 886, 888],
- [100, 423, 429],
- [103, 375, 377],
- [516, 642, 644],
+ [60, 900, 906],
+ [63, 847, 849],
+ [80, 400, 406],
+ [83, 352, 354],
+ [493, 615, 617],
]
---
@@ -490,480 +453,435 @@ snippet: "
}
f();
"
-frame size: 19
+frame size: 17
parameter count: 1
-bytecode array length: 1085
+bytecode array length: 992
bytecodes: [
B(Ldar), R(new_target),
- B(JumpIfUndefined), U8(39),
- B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
- B(PushContext), R(4),
+ B(JumpIfUndefined), U8(25),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
+ B(PushContext), R(1),
B(ResumeGenerator), R(new_target),
- B(Star), R(3),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(3),
- B(JumpIfTrue), U8(132),
- B(LdaSmi), I8(1),
- B(TestEqualStrictNoFeedback), R(3),
- B(JumpIfTrueConstant), U8(12),
- B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(3),
- B(JumpIfTrueConstant), U8(14),
+ B(Star), R(0),
+ B(SwitchOnSmiNoFeedback), U8(0), U8(3), I8(0),
B(LdaSmi), I8(79),
- B(Star), R(5),
- B(CallRuntime), U16(Runtime::kAbort), R(5), U8(1),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
B(LdaSmi), I8(-2),
- B(Star), R(3),
- B(CreateFunctionContext), U8(13),
- B(PushContext), R(0),
- B(Ldar), R(this),
+ B(Star), R(0),
+ B(CreateFunctionContext), U8(12),
+ B(PushContext), R(2),
+ B(Mov), R(closure), R(3),
+ B(Mov), R(this), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
B(StaCurrentContextSlot), U8(4),
/* 16 E> */ B(StackCheck),
- B(LdaImmutableCurrentContextSlot), U8(4),
- B(Star), R(6),
- B(Mov), R(closure), R(5),
- B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(5), U8(2),
- B(StaCurrentContextSlot), U8(5),
B(LdaUndefined),
- B(Star), R(5),
- B(CallJSRuntime), U8(%async_function_promise_create), R(5), U8(1),
- B(StaCurrentContextSlot), U8(11),
- B(Mov), R(context), R(7),
- B(Mov), R(context), R(8),
+ B(Star), R(3),
+ B(CallJSRuntime), U8(%async_function_promise_create), R(3), U8(1),
+ B(StaCurrentContextSlot), U8(10),
+ B(Mov), R(context), R(5),
+ B(Mov), R(context), R(6),
B(Ldar), R(closure),
- B(CreateBlockContext), U8(0),
- B(PushContext), R(1),
+ B(CreateBlockContext), U8(3),
+ B(PushContext), R(7),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(4),
B(LdaZero),
- B(StaContextSlot), R(1), U8(9), U8(0),
+ B(StaContextSlot), R(7), U8(8), U8(0),
+ B(Mov), R(context), R(10),
B(Mov), R(context), R(11),
- B(Mov), R(context), R(12),
- /* 43 S> */ B(CreateArrayLiteral), U8(1), U8(2), U8(9),
- B(Star), R(13),
- B(LdaNamedProperty), R(13), U8(2), U8(7),
+ /* 43 S> */ B(CreateArrayLiteral), U8(4), U8(3), U8(17),
+ B(Star), R(12),
+ B(LdaNamedProperty), R(12), U8(5), U8(8),
B(JumpIfUndefined), U8(17),
B(JumpIfNull), U8(15),
- B(Star), R(14),
- B(CallProperty0), R(14), R(13), U8(9),
+ B(Star), R(13),
+ B(CallProperty0), R(13), R(12), U8(10),
B(JumpIfJSReceiver), U8(23),
B(CallRuntime), U16(Runtime::kThrowSymbolAsyncIteratorInvalid), R(0), U8(0),
- B(LdaNamedProperty), R(13), U8(3), U8(3),
- B(Star), R(14),
- B(CallProperty0), R(14), R(13), U8(5),
- B(Star), R(14),
- B(InvokeIntrinsic), U8(Runtime::k_CreateAsyncFromSyncIterator), R(14), U8(1),
- /* 43 E> */ B(StaContextSlot), R(1), U8(7), U8(0),
+ B(LdaNamedProperty), R(12), U8(6), U8(4),
+ B(Star), R(13),
+ B(CallProperty0), R(13), R(12), U8(6),
+ B(Star), R(13),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateAsyncFromSyncIterator), R(13), U8(1),
+ /* 43 E> */ B(StaContextSlot), R(7), U8(6), U8(0),
+ B(Ldar), R(0),
+ B(SwitchOnSmiNoFeedback), U8(7), U8(1), I8(0),
B(LdaSmi), I8(-2),
- B(TestEqualStrictNoFeedback), R(3),
- B(JumpIfTrue), U8(16),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(3),
- B(JumpIfTrue), U8(75),
+ B(TestEqualStrictNoFeedback), R(0),
+ B(JumpIfTrue), U8(11),
B(LdaSmi), I8(79),
- B(Star), R(13),
- B(CallRuntime), U16(Runtime::kAbort), R(13), U8(1),
- /* 40 S> */ B(LdaContextSlot), R(1), U8(7), U8(0),
+ B(Star), R(12),
+ B(CallRuntime), U16(Runtime::kAbort), R(12), U8(1),
+ /* 40 S> */ B(LdaImmutableContextSlot), R(7), U8(4), U8(0),
+ B(Star), R(12),
+ /* 40 S> */ B(LdaContextSlot), R(7), U8(6), U8(0),
B(Star), R(14),
- B(LdaNamedProperty), R(14), U8(4), U8(13),
+ B(LdaNamedProperty), R(14), U8(8), U8(14),
B(Star), R(13),
- /* 40 E> */ B(CallProperty0), R(13), R(14), U8(11),
- B(StaContextSlot), R(1), U8(10), U8(0),
+ /* 40 E> */ B(CallProperty0), R(13), R(14), U8(12),
+ B(StaContextSlot), R(7), U8(9), U8(0),
/* 40 S> */ B(LdaUndefined),
B(Star), R(13),
- B(LdaImmutableContextSlot), R(1), U8(5), U8(0),
+ B(LdaImmutableContextSlot), R(7), U8(4), U8(0),
B(Star), R(14),
- B(LdaContextSlot), R(1), U8(10), U8(0),
+ B(LdaContextSlot), R(7), U8(9), U8(0),
B(Star), R(15),
- B(LdaContextSlot), R(1), U8(11), U8(0),
+ B(LdaContextSlot), R(7), U8(10), U8(0),
B(Star), R(16),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(13), U8(4),
- B(LdaContextSlot), R(1), U8(11), U8(0),
+ B(LdaContextSlot), R(7), U8(10), U8(0),
B(Star), R(13),
- B(LdaImmutableContextSlot), R(1), U8(5), U8(0),
- B(Star), R(14),
B(LdaZero),
- B(SuspendGenerator), R(14), U8(2),
+ B(SuspendGenerator), R(12), U8(2),
B(Ldar), R(13),
/* 68 S> */ B(Return),
B(LdaSmi), I8(-2),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(14), U8(1),
- B(Star), R(15),
- B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(14), U8(1),
- B(Star), R(16),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(12), U8(1),
+ B(Star), R(13),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(12), U8(1),
+ B(Star), R(14),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(16),
- B(JumpIfTrue), U8(30),
+ B(TestEqualStrictNoFeedback), R(14),
+ B(JumpIfTrue), U8(28),
B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(16),
- B(JumpIfTrue), U8(21),
- B(Jump), U8(2),
+ B(TestEqualStrictNoFeedback), R(14),
+ B(JumpIfTrue), U8(19),
B(LdaTrue),
- B(Star), R(18),
- B(Mov), R(15), R(17),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(17), U8(2),
- B(Star), R(10),
- B(LdaZero),
+ B(Star), R(16),
+ B(Mov), R(13), R(15),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(15), U8(2),
B(Star), R(9),
+ B(LdaZero),
+ B(Star), R(8),
B(Jump), U8(167),
- B(Ldar), R(15),
+ B(Ldar), R(13),
B(ReThrow),
- B(Ldar), R(15),
- /* 40 E> */ B(StaContextSlot), R(1), U8(8), U8(0),
- B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(15), U8(1),
+ B(Ldar), R(13),
+ /* 40 E> */ B(StaContextSlot), R(7), U8(7), U8(0),
+ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(13), U8(1),
B(ToBooleanLogicalNot),
B(JumpIfFalse), U8(13),
- B(LdaContextSlot), R(1), U8(8), U8(0),
- B(Star), R(13),
- B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(13), U8(1),
- B(LdaContextSlot), R(1), U8(8), U8(0),
- B(Star), R(13),
- B(LdaNamedProperty), R(13), U8(5), U8(15),
+ B(LdaContextSlot), R(7), U8(7), U8(0),
+ B(Star), R(12),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
+ B(LdaContextSlot), R(7), U8(7), U8(0),
+ B(Star), R(12),
+ B(LdaNamedProperty), R(12), U8(9), U8(16),
B(JumpIfToBooleanTrue), U8(68),
- B(LdaContextSlot), R(1), U8(8), U8(0),
- B(Star), R(13),
- B(LdaNamedProperty), R(13), U8(6), U8(17),
- B(StaContextSlot), R(1), U8(12), U8(0),
+ B(LdaContextSlot), R(7), U8(7), U8(0),
+ B(Star), R(12),
+ B(LdaNamedProperty), R(12), U8(10), U8(18),
+ B(StaContextSlot), R(7), U8(11), U8(0),
B(LdaSmi), I8(2),
- B(StaContextSlot), R(1), U8(9), U8(0),
- B(LdaContextSlot), R(1), U8(12), U8(0),
- B(StaContextSlot), R(1), U8(6), U8(0),
+ B(StaContextSlot), R(7), U8(8), U8(0),
+ B(LdaContextSlot), R(7), U8(11), U8(0),
+ B(StaContextSlot), R(7), U8(5), U8(0),
/* 23 E> */ B(StackCheck),
B(Ldar), R(closure),
- B(CreateBlockContext), U8(7),
- B(PushContext), R(2),
+ B(CreateBlockContext), U8(11),
+ B(PushContext), R(12),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(4),
- B(LdaContextSlot), R(1), U8(6), U8(0),
+ B(LdaContextSlot), R(7), U8(5), U8(0),
B(StaCurrentContextSlot), U8(4),
/* 56 S> */ B(LdaImmutableCurrentContextSlot), U8(4),
- B(PopContext), R(2),
- B(PopContext), R(2),
- B(PopContext), R(2),
- B(PopContext), R(2),
- B(PopContext), R(2),
- B(PopContext), R(2),
- B(Star), R(10),
- B(LdaSmi), I8(1),
+ B(PopContext), R(12),
+ B(PopContext), R(12),
+ B(PopContext), R(12),
+ B(PopContext), R(12),
+ B(PopContext), R(12),
+ B(PopContext), R(12),
B(Star), R(9),
+ B(LdaSmi), I8(1),
+ B(Star), R(8),
B(Jump), U8(62),
B(Jump), U8(48),
- B(Star), R(13),
- B(Ldar), R(closure),
- B(CreateCatchContext), R(13), U8(8), U8(9),
B(Star), R(12),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(12), U8(12), U8(13),
+ B(Star), R(11),
B(LdaTheHole),
B(SetPendingMessage),
- B(Ldar), R(12),
- B(PushContext), R(2),
- B(LdaContextSlot), R(1), U8(9), U8(0),
+ B(Ldar), R(11),
+ B(PushContext), R(12),
+ B(LdaContextSlot), R(7), U8(8), U8(0),
B(Star), R(13),
B(LdaSmi), I8(2),
- B(TestEqualStrict), R(13), U8(19),
+ B(TestEqualStrict), R(13), U8(20),
B(JumpIfFalse), U8(8),
B(LdaSmi), I8(1),
- B(StaContextSlot), R(1), U8(9), U8(0),
+ B(StaContextSlot), R(7), U8(8), U8(0),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(13),
B(CallRuntime), U16(Runtime::kReThrow), R(13), U8(1),
- B(PopContext), R(2),
+ B(PopContext), R(12),
B(LdaSmi), I8(-1),
- B(Star), R(9),
+ B(Star), R(8),
B(Jump), U8(8),
- B(Star), R(10),
- B(LdaSmi), I8(2),
B(Star), R(9),
+ B(LdaSmi), I8(2),
+ B(Star), R(8),
B(LdaTheHole),
B(SetPendingMessage),
+ B(Star), R(10),
+ B(LdaContextSlot), R(7), U8(8), U8(0),
B(Star), R(11),
- B(LdaContextSlot), R(1), U8(9), U8(0),
- B(Star), R(12),
B(LdaZero),
- B(TestEqualStrict), R(12), U8(20),
- B(JumpIfTrueConstant), U8(16),
- B(LdaContextSlot), R(1), U8(7), U8(0),
- B(Star), R(12),
- B(LdaNamedProperty), R(12), U8(10), U8(21),
- B(StaContextSlot), R(1), U8(13), U8(0),
- B(LdaContextSlot), R(1), U8(13), U8(0),
+ B(TestEqualStrict), R(11), U8(21),
+ B(JumpIfTrueConstant), U8(18),
+ B(LdaContextSlot), R(7), U8(6), U8(0),
+ B(Star), R(11),
+ B(LdaNamedProperty), R(11), U8(14), U8(22),
+ B(StaContextSlot), R(7), U8(12), U8(0),
+ B(LdaContextSlot), R(7), U8(12), U8(0),
B(TestUndetectable),
B(JumpIfFalse), U8(4),
- B(JumpConstant), U8(15),
- B(LdaContextSlot), R(1), U8(9), U8(0),
- B(Star), R(12),
+ B(JumpConstant), U8(17),
+ B(LdaContextSlot), R(7), U8(8), U8(0),
+ B(Star), R(11),
B(LdaSmi), I8(1),
- B(TestEqualStrict), R(12), U8(24),
- B(JumpIfFalse), U8(179),
- B(LdaContextSlot), R(1), U8(13), U8(0),
+ B(TestEqualStrict), R(11), U8(25),
+ B(JumpIfFalse), U8(175),
+ B(LdaContextSlot), R(7), U8(12), U8(0),
B(TestTypeOf), U8(5),
B(JumpIfFalse), U8(4),
B(Jump), U8(18),
- B(Wide), B(LdaSmi), I16(132),
+ B(Wide), B(LdaSmi), I16(130),
+ B(Star), R(11),
+ B(LdaConstant), U8(15),
B(Star), R(12),
- B(LdaConstant), U8(11),
- B(Star), R(13),
- B(CallRuntime), U16(Runtime::kNewTypeError), R(12), U8(2),
+ B(CallRuntime), U16(Runtime::kNewTypeError), R(11), U8(2),
B(Throw),
- B(Mov), R(context), R(12),
- B(LdaContextSlot), R(1), U8(13), U8(0),
+ B(Mov), R(context), R(11),
+ B(LdaImmutableContextSlot), R(7), U8(4), U8(0),
+ B(Star), R(12),
+ B(LdaContextSlot), R(7), U8(12), U8(0),
B(Star), R(13),
- B(LdaContextSlot), R(1), U8(7), U8(0),
+ B(LdaContextSlot), R(7), U8(6), U8(0),
B(Star), R(14),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(13), U8(2),
- B(StaContextSlot), R(1), U8(14), U8(0),
+ B(StaContextSlot), R(7), U8(13), U8(0),
B(LdaUndefined),
B(Star), R(13),
- B(LdaImmutableContextSlot), R(1), U8(5), U8(0),
+ B(LdaImmutableContextSlot), R(7), U8(4), U8(0),
B(Star), R(14),
- B(LdaContextSlot), R(1), U8(14), U8(0),
+ B(LdaContextSlot), R(7), U8(13), U8(0),
B(Star), R(15),
- B(LdaContextSlot), R(1), U8(11), U8(0),
+ B(LdaContextSlot), R(7), U8(10), U8(0),
B(Star), R(16),
B(CallJSRuntime), U8(%async_function_await_caught), R(13), U8(4),
- B(LdaContextSlot), R(1), U8(11), U8(0),
+ B(LdaContextSlot), R(7), U8(10), U8(0),
B(Star), R(13),
- B(LdaImmutableContextSlot), R(1), U8(5), U8(0),
- B(Star), R(14),
B(LdaSmi), I8(1),
- B(SuspendGenerator), R(14), U8(2),
+ B(SuspendGenerator), R(12), U8(2),
B(Ldar), R(13),
/* 68 S> */ B(Return),
B(LdaSmi), I8(-2),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(14), U8(1),
- B(Star), R(15),
- B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(14), U8(1),
- B(Star), R(16),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(12), U8(1),
+ B(Star), R(13),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(12), U8(1),
+ B(Star), R(14),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(16),
- B(JumpIfTrue), U8(38),
+ B(TestEqualStrictNoFeedback), R(14),
+ B(JumpIfTrue), U8(36),
B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(16),
- B(JumpIfTrue), U8(29),
- B(Jump), U8(2),
+ B(TestEqualStrictNoFeedback), R(14),
+ B(JumpIfTrue), U8(27),
B(LdaTrue),
- B(Star), R(18),
- B(Mov), R(15), R(17),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(17), U8(2),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(Star), R(6),
+ B(Star), R(16),
+ B(Mov), R(13), R(15),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(15), U8(2),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(Star), R(4),
B(LdaZero),
- B(Star), R(5),
- B(JumpConstant), U8(18),
- B(Ldar), R(15),
+ B(Star), R(3),
+ B(JumpConstant), U8(23),
+ B(Ldar), R(13),
B(ReThrow),
- B(Ldar), R(15),
+ B(Ldar), R(13),
B(Jump), U8(20),
- B(Star), R(13),
- B(Ldar), R(closure),
- B(CreateCatchContext), R(13), U8(8), U8(13),
B(Star), R(12),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(12), U8(12), U8(16),
+ B(Star), R(11),
B(LdaTheHole),
B(SetPendingMessage),
- B(Ldar), R(12),
- B(PushContext), R(2),
- B(PopContext), R(2),
- B(Jump), U8(158),
- B(LdaContextSlot), R(1), U8(13), U8(0),
+ B(Ldar), R(11),
+ B(PushContext), R(12),
+ B(PopContext), R(12),
+ B(Jump), U8(153),
+ B(LdaImmutableContextSlot), R(7), U8(4), U8(0),
+ B(Star), R(11),
+ B(LdaContextSlot), R(7), U8(12), U8(0),
B(Star), R(12),
- B(LdaContextSlot), R(1), U8(7), U8(0),
+ B(LdaContextSlot), R(7), U8(6), U8(0),
B(Star), R(13),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(2),
- B(StaContextSlot), R(1), U8(16), U8(0),
+ B(StaContextSlot), R(7), U8(15), U8(0),
B(LdaUndefined),
B(Star), R(12),
- B(LdaImmutableContextSlot), R(1), U8(5), U8(0),
+ B(LdaImmutableContextSlot), R(7), U8(4), U8(0),
B(Star), R(13),
- B(LdaContextSlot), R(1), U8(16), U8(0),
+ B(LdaContextSlot), R(7), U8(15), U8(0),
B(Star), R(14),
- B(LdaContextSlot), R(1), U8(11), U8(0),
+ B(LdaContextSlot), R(7), U8(10), U8(0),
B(Star), R(15),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(12), U8(4),
- B(LdaContextSlot), R(1), U8(11), U8(0),
+ B(LdaContextSlot), R(7), U8(10), U8(0),
B(Star), R(12),
- B(LdaImmutableContextSlot), R(1), U8(5), U8(0),
- B(Star), R(13),
B(LdaSmi), I8(2),
- B(SuspendGenerator), R(13), U8(2),
+ B(SuspendGenerator), R(11), U8(2),
B(Ldar), R(12),
/* 68 S> */ B(Return),
B(LdaSmi), I8(-2),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(13), U8(1),
- B(Star), R(14),
- B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(13), U8(1),
- B(Star), R(15),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(11), U8(1),
+ B(Star), R(12),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(11), U8(1),
+ B(Star), R(13),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(15),
- B(JumpIfTrue), U8(39),
+ B(TestEqualStrictNoFeedback), R(13),
+ B(JumpIfTrue), U8(36),
B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(15),
- B(JumpIfTrue), U8(30),
- B(Jump), U8(2),
+ B(TestEqualStrictNoFeedback), R(13),
+ B(JumpIfTrue), U8(27),
B(LdaTrue),
- B(Star), R(17),
- B(Mov), R(14), R(16),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(16), U8(2),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(Star), R(6),
- B(LdaSmi), I8(1),
- B(Star), R(5),
- B(Jump), U8(191),
- B(Ldar), R(14),
+ B(Star), R(15),
+ B(Mov), R(12), R(14),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(14), U8(2),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
+ B(Jump), U8(177),
+ B(Ldar), R(12),
B(ReThrow),
- B(Ldar), R(14),
- B(StaContextSlot), R(1), U8(15), U8(0),
- B(LdaContextSlot), R(1), U8(15), U8(0),
- B(Star), R(12),
- B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(12), U8(1),
+ B(Ldar), R(12),
+ B(StaContextSlot), R(7), U8(14), U8(0),
+ B(LdaContextSlot), R(7), U8(14), U8(0),
+ B(Star), R(11),
+ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(11), U8(1),
B(JumpIfToBooleanFalse), U8(4),
B(Jump), U8(13),
- B(LdaContextSlot), R(1), U8(15), U8(0),
- B(Star), R(12),
- B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
- B(Ldar), R(11),
+ B(LdaContextSlot), R(7), U8(14), U8(0),
+ B(Star), R(11),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
+ B(Ldar), R(10),
B(SetPendingMessage),
+ B(Ldar), R(8),
+ B(SwitchOnSmiNoFeedback), U8(19), U8(3), I8(0),
+ B(Jump), U8(42),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(9),
- B(JumpIfTrue), U8(16),
+ B(Star), R(3),
+ B(Mov), R(9), R(4),
+ B(Jump), U8(116),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
B(LdaSmi), I8(1),
- B(TestEqualStrictNoFeedback), R(9),
- B(JumpIfTrue), U8(27),
- B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(9),
- B(JumpIfTrue), U8(38),
- B(Jump), U8(43),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(LdaSmi), I8(2),
- B(Star), R(5),
- B(Mov), R(10), R(6),
- B(Jump), U8(118),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(LdaSmi), I8(3),
- B(Star), R(5),
- B(Mov), R(10), R(6),
- B(Jump), U8(101),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(Ldar), R(10),
+ B(Star), R(3),
+ B(Mov), R(9), R(4),
+ B(Jump), U8(99),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(Ldar), R(9),
B(ReThrow),
- B(PopContext), R(1),
+ B(PopContext), R(7),
B(LdaUndefined),
- B(Star), R(9),
- B(LdaCurrentContextSlot), U8(11),
- B(Star), R(10),
+ B(Star), R(7),
+ B(LdaCurrentContextSlot), U8(10),
+ B(Star), R(8),
B(LdaUndefined),
- B(Star), R(11),
- B(CallJSRuntime), U8(%promise_resolve), R(9), U8(3),
- B(LdaCurrentContextSlot), U8(11),
- B(Star), R(6),
- B(LdaSmi), I8(4),
- B(Star), R(5),
- B(Jump), U8(68),
- B(Jump), U8(54),
B(Star), R(9),
+ B(CallJSRuntime), U8(%promise_resolve), R(7), U8(3),
+ B(LdaCurrentContextSlot), U8(10),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
+ B(Jump), U8(67),
+ B(Jump), U8(53),
+ B(Star), R(7),
B(Ldar), R(closure),
- B(CreateCatchContext), R(9), U8(8), U8(17),
- B(Star), R(8),
+ B(CreateCatchContext), R(7), U8(12), U8(22),
+ B(Star), R(6),
B(LdaTheHole),
B(SetPendingMessage),
- B(Ldar), R(8),
- B(PushContext), R(1),
+ B(Ldar), R(6),
+ B(PushContext), R(7),
B(LdaUndefined),
+ B(Star), R(8),
+ B(LdaContextSlot), R(7), U8(10), U8(0),
B(Star), R(9),
- B(LdaContextSlot), R(1), U8(11), U8(0),
- B(Star), R(10),
B(LdaImmutableCurrentContextSlot), U8(4),
- B(Star), R(11),
+ B(Star), R(10),
B(LdaFalse),
- B(Star), R(12),
- B(CallJSRuntime), U8(%promise_internal_reject), R(9), U8(4),
- B(LdaContextSlot), R(1), U8(11), U8(0),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(Star), R(6),
- B(LdaSmi), I8(5),
- B(Star), R(5),
+ B(Star), R(11),
+ B(CallJSRuntime), U8(%promise_internal_reject), R(8), U8(4),
+ B(LdaContextSlot), R(7), U8(10), U8(0),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
B(Jump), U8(14),
B(LdaSmi), I8(-1),
- B(Star), R(5),
+ B(Star), R(3),
B(Jump), U8(8),
- B(Star), R(6),
- B(LdaSmi), I8(6),
- B(Star), R(5),
+ B(Star), R(4),
+ B(LdaSmi), I8(2),
+ B(Star), R(3),
B(LdaTheHole),
B(SetPendingMessage),
- B(Star), R(7),
+ B(Star), R(5),
B(LdaUndefined),
- B(Star), R(8),
- B(LdaCurrentContextSlot), U8(11),
- B(Star), R(9),
- B(CallJSRuntime), U8(%async_function_promise_release), R(8), U8(2),
- B(Ldar), R(7),
+ B(Star), R(6),
+ B(LdaCurrentContextSlot), U8(10),
+ B(Star), R(7),
+ B(CallJSRuntime), U8(%async_function_promise_release), R(6), U8(2),
+ B(Ldar), R(5),
B(SetPendingMessage),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(5),
- B(JumpIfTrue), U8(40),
- B(LdaSmi), I8(1),
- B(TestEqualStrictNoFeedback), R(5),
- B(JumpIfTrue), U8(37),
- B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(5),
- B(JumpIfTrue), U8(34),
- B(LdaSmi), I8(3),
- B(TestEqualStrictNoFeedback), R(5),
- B(JumpIfTrue), U8(31),
- B(LdaSmi), I8(4),
- B(TestEqualStrictNoFeedback), R(5),
- B(JumpIfTrue), U8(42),
- B(LdaSmi), I8(5),
- B(TestEqualStrictNoFeedback), R(5),
- B(JumpIfTrue), U8(39),
- B(LdaSmi), I8(6),
- B(TestEqualStrictNoFeedback), R(5),
- B(JumpIfTrue), U8(36),
- B(Jump), U8(37),
- B(Ldar), R(6),
- /* 68 S> */ B(Return),
- B(Ldar), R(6),
+ B(Ldar), R(3),
+ B(SwitchOnSmiNoFeedback), U8(24), U8(3), I8(0),
+ B(Jump), U8(25),
+ B(Ldar), R(4),
/* 68 S> */ B(Return),
- B(Ldar), R(6),
- /* 68 S> */ B(Return),
- B(LdaCurrentContextSlot), U8(11),
- B(Star), R(9),
+ B(LdaCurrentContextSlot), U8(10),
+ B(Star), R(7),
B(LdaUndefined),
- B(Star), R(8),
- B(Mov), R(6), R(10),
- B(CallJSRuntime), U8(%promise_resolve), R(8), U8(3),
- B(Ldar), R(9),
- /* 68 S> */ B(Return),
- B(Ldar), R(6),
- /* 68 S> */ B(Return),
- B(Ldar), R(6),
+ B(Star), R(6),
+ B(Mov), R(4), R(8),
+ B(CallJSRuntime), U8(%promise_resolve), R(6), U8(3),
+ B(Ldar), R(7),
/* 68 S> */ B(Return),
- B(Ldar), R(6),
+ B(Ldar), R(4),
B(ReThrow),
B(LdaUndefined),
/* 68 S> */ B(Return),
]
constant pool: [
+ Smi [116],
+ Smi [556],
+ Smi [700],
FIXED_ARRAY_TYPE,
- CONSTANT_ELEMENTS_PAIR_TYPE,
+ TUPLE2_TYPE,
SYMBOL_TYPE,
SYMBOL_TYPE,
+ Smi [83],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
@@ -972,20 +890,24 @@ constant pool: [
FIXED_ARRAY_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
- Smi [569],
FIXED_ARRAY_TYPE,
- Smi [711],
- Smi [348],
- Smi [371],
+ Smi [339],
+ Smi [362],
+ Smi [6],
+ Smi [22],
+ Smi [39],
FIXED_ARRAY_TYPE,
- Smi [340],
+ Smi [321],
+ Smi [6],
+ Smi [9],
+ Smi [26],
]
handlers: [
- [80, 975, 981],
- [83, 921, 923],
- [100, 435, 441],
- [103, 387, 389],
- [528, 654, 656],
+ [60, 929, 935],
+ [63, 876, 878],
+ [80, 412, 418],
+ [83, 364, 366],
+ [505, 627, 629],
]
---
@@ -998,467 +920,428 @@ snippet: "
}
f();
"
-frame size: 19
+frame size: 17
parameter count: 1
-bytecode array length: 1064
+bytecode array length: 980
bytecodes: [
B(Ldar), R(new_target),
- B(JumpIfUndefined), U8(39),
- B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
- B(PushContext), R(4),
+ B(JumpIfUndefined), U8(25),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
+ B(PushContext), R(1),
B(ResumeGenerator), R(new_target),
- B(Star), R(3),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(3),
- B(JumpIfTrue), U8(132),
- B(LdaSmi), I8(1),
- B(TestEqualStrictNoFeedback), R(3),
- B(JumpIfTrueConstant), U8(12),
- B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(3),
- B(JumpIfTrueConstant), U8(14),
+ B(Star), R(0),
+ B(SwitchOnSmiNoFeedback), U8(0), U8(3), I8(0),
B(LdaSmi), I8(79),
- B(Star), R(5),
- B(CallRuntime), U16(Runtime::kAbort), R(5), U8(1),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
B(LdaSmi), I8(-2),
- B(Star), R(3),
- B(CreateFunctionContext), U8(13),
- B(PushContext), R(0),
- B(Ldar), R(this),
+ B(Star), R(0),
+ B(CreateFunctionContext), U8(12),
+ B(PushContext), R(2),
+ B(Mov), R(closure), R(3),
+ B(Mov), R(this), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
B(StaCurrentContextSlot), U8(4),
/* 16 E> */ B(StackCheck),
- B(LdaImmutableCurrentContextSlot), U8(4),
- B(Star), R(6),
- B(Mov), R(closure), R(5),
- B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(5), U8(2),
- B(StaCurrentContextSlot), U8(5),
B(LdaUndefined),
- B(Star), R(5),
- B(CallJSRuntime), U8(%async_function_promise_create), R(5), U8(1),
- B(StaCurrentContextSlot), U8(11),
- B(Mov), R(context), R(7),
- B(Mov), R(context), R(8),
+ B(Star), R(3),
+ B(CallJSRuntime), U8(%async_function_promise_create), R(3), U8(1),
+ B(StaCurrentContextSlot), U8(10),
+ B(Mov), R(context), R(5),
+ B(Mov), R(context), R(6),
B(Ldar), R(closure),
- B(CreateBlockContext), U8(0),
- B(PushContext), R(1),
+ B(CreateBlockContext), U8(3),
+ B(PushContext), R(7),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(4),
B(LdaZero),
- B(StaContextSlot), R(1), U8(9), U8(0),
+ B(StaContextSlot), R(7), U8(8), U8(0),
+ B(Mov), R(context), R(10),
B(Mov), R(context), R(11),
- B(Mov), R(context), R(12),
- /* 43 S> */ B(CreateArrayLiteral), U8(1), U8(2), U8(9),
- B(Star), R(13),
- B(LdaNamedProperty), R(13), U8(2), U8(7),
+ /* 43 S> */ B(CreateArrayLiteral), U8(4), U8(3), U8(17),
+ B(Star), R(12),
+ B(LdaNamedProperty), R(12), U8(5), U8(8),
B(JumpIfUndefined), U8(17),
B(JumpIfNull), U8(15),
- B(Star), R(14),
- B(CallProperty0), R(14), R(13), U8(9),
+ B(Star), R(13),
+ B(CallProperty0), R(13), R(12), U8(10),
B(JumpIfJSReceiver), U8(23),
B(CallRuntime), U16(Runtime::kThrowSymbolAsyncIteratorInvalid), R(0), U8(0),
- B(LdaNamedProperty), R(13), U8(3), U8(3),
- B(Star), R(14),
- B(CallProperty0), R(14), R(13), U8(5),
- B(Star), R(14),
- B(InvokeIntrinsic), U8(Runtime::k_CreateAsyncFromSyncIterator), R(14), U8(1),
- /* 43 E> */ B(StaContextSlot), R(1), U8(7), U8(0),
+ B(LdaNamedProperty), R(12), U8(6), U8(4),
+ B(Star), R(13),
+ B(CallProperty0), R(13), R(12), U8(6),
+ B(Star), R(13),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateAsyncFromSyncIterator), R(13), U8(1),
+ /* 43 E> */ B(StaContextSlot), R(7), U8(6), U8(0),
+ B(Ldar), R(0),
+ B(SwitchOnSmiNoFeedback), U8(7), U8(1), I8(0),
B(LdaSmi), I8(-2),
- B(TestEqualStrictNoFeedback), R(3),
- B(JumpIfTrue), U8(16),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(3),
- B(JumpIfTrue), U8(75),
+ B(TestEqualStrictNoFeedback), R(0),
+ B(JumpIfTrue), U8(11),
B(LdaSmi), I8(79),
- B(Star), R(13),
- B(CallRuntime), U16(Runtime::kAbort), R(13), U8(1),
- /* 40 S> */ B(LdaContextSlot), R(1), U8(7), U8(0),
+ B(Star), R(12),
+ B(CallRuntime), U16(Runtime::kAbort), R(12), U8(1),
+ /* 40 S> */ B(LdaImmutableContextSlot), R(7), U8(4), U8(0),
+ B(Star), R(12),
+ /* 40 S> */ B(LdaContextSlot), R(7), U8(6), U8(0),
B(Star), R(14),
- B(LdaNamedProperty), R(14), U8(4), U8(13),
+ B(LdaNamedProperty), R(14), U8(8), U8(14),
B(Star), R(13),
- /* 40 E> */ B(CallProperty0), R(13), R(14), U8(11),
- B(StaContextSlot), R(1), U8(10), U8(0),
+ /* 40 E> */ B(CallProperty0), R(13), R(14), U8(12),
+ B(StaContextSlot), R(7), U8(9), U8(0),
/* 40 S> */ B(LdaUndefined),
B(Star), R(13),
- B(LdaImmutableContextSlot), R(1), U8(5), U8(0),
+ B(LdaImmutableContextSlot), R(7), U8(4), U8(0),
B(Star), R(14),
- B(LdaContextSlot), R(1), U8(10), U8(0),
+ B(LdaContextSlot), R(7), U8(9), U8(0),
B(Star), R(15),
- B(LdaContextSlot), R(1), U8(11), U8(0),
+ B(LdaContextSlot), R(7), U8(10), U8(0),
B(Star), R(16),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(13), U8(4),
- B(LdaContextSlot), R(1), U8(11), U8(0),
+ B(LdaContextSlot), R(7), U8(10), U8(0),
B(Star), R(13),
- B(LdaImmutableContextSlot), R(1), U8(5), U8(0),
- B(Star), R(14),
B(LdaZero),
- B(SuspendGenerator), R(14), U8(2),
+ B(SuspendGenerator), R(12), U8(2),
B(Ldar), R(13),
/* 114 S> */ B(Return),
B(LdaSmi), I8(-2),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(14), U8(1),
- B(Star), R(15),
- B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(14), U8(1),
- B(Star), R(16),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(12), U8(1),
+ B(Star), R(13),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(12), U8(1),
+ B(Star), R(14),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(16),
- B(JumpIfTrue), U8(30),
+ B(TestEqualStrictNoFeedback), R(14),
+ B(JumpIfTrue), U8(28),
B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(16),
- B(JumpIfTrue), U8(21),
- B(Jump), U8(2),
+ B(TestEqualStrictNoFeedback), R(14),
+ B(JumpIfTrue), U8(19),
B(LdaTrue),
- B(Star), R(18),
- B(Mov), R(15), R(17),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(17), U8(2),
- B(Star), R(10),
- B(LdaZero),
+ B(Star), R(16),
+ B(Mov), R(13), R(15),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(15), U8(2),
B(Star), R(9),
- B(Jump), U8(192),
- B(Ldar), R(15),
+ B(LdaZero),
+ B(Star), R(8),
+ B(Jump), U8(189),
+ B(Ldar), R(13),
B(ReThrow),
- B(Ldar), R(15),
- /* 40 E> */ B(StaContextSlot), R(1), U8(8), U8(0),
- B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(15), U8(1),
+ B(Ldar), R(13),
+ /* 40 E> */ B(StaContextSlot), R(7), U8(7), U8(0),
+ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(13), U8(1),
B(ToBooleanLogicalNot),
B(JumpIfFalse), U8(13),
- B(LdaContextSlot), R(1), U8(8), U8(0),
- B(Star), R(13),
- B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(13), U8(1),
- B(LdaContextSlot), R(1), U8(8), U8(0),
- B(Star), R(13),
- B(LdaNamedProperty), R(13), U8(5), U8(15),
- B(JumpIfToBooleanTrue), U8(93),
- B(LdaContextSlot), R(1), U8(8), U8(0),
- B(Star), R(13),
- B(LdaNamedProperty), R(13), U8(6), U8(17),
- B(StaContextSlot), R(1), U8(12), U8(0),
+ B(LdaContextSlot), R(7), U8(7), U8(0),
+ B(Star), R(12),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
+ B(LdaContextSlot), R(7), U8(7), U8(0),
+ B(Star), R(12),
+ B(LdaNamedProperty), R(12), U8(9), U8(16),
+ B(JumpIfToBooleanTrue), U8(90),
+ B(LdaContextSlot), R(7), U8(7), U8(0),
+ B(Star), R(12),
+ B(LdaNamedProperty), R(12), U8(10), U8(18),
+ B(StaContextSlot), R(7), U8(11), U8(0),
B(LdaSmi), I8(2),
- B(StaContextSlot), R(1), U8(9), U8(0),
- B(LdaContextSlot), R(1), U8(12), U8(0),
- B(StaContextSlot), R(1), U8(6), U8(0),
+ B(StaContextSlot), R(7), U8(8), U8(0),
+ B(LdaContextSlot), R(7), U8(11), U8(0),
+ B(StaContextSlot), R(7), U8(5), U8(0),
/* 23 E> */ B(StackCheck),
B(Ldar), R(closure),
- B(CreateBlockContext), U8(7),
- B(PushContext), R(2),
+ B(CreateBlockContext), U8(11),
+ B(PushContext), R(12),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(4),
- B(LdaContextSlot), R(1), U8(6), U8(0),
+ B(LdaContextSlot), R(7), U8(5), U8(0),
B(StaCurrentContextSlot), U8(4),
/* 63 S> */ B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(13),
B(LdaSmi), I8(10),
- /* 69 E> */ B(TestEqual), R(13), U8(19),
+ /* 69 E> */ B(TestEqual), R(13), U8(20),
B(JumpIfFalse), U8(8),
- /* 76 S> */ B(PopContext), R(2),
- B(PopContext), R(2),
+ /* 76 S> */ B(PopContext), R(12),
+ B(PopContext), R(12),
B(Jump), U8(26),
/* 90 S> */ B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(13),
B(LdaSmi), I8(20),
- /* 96 E> */ B(TestEqual), R(13), U8(20),
+ /* 96 E> */ B(TestEqual), R(13), U8(21),
B(JumpIfFalse), U8(8),
- /* 103 S> */ B(PopContext), R(2),
- B(PopContext), R(2),
- B(Jump), U8(15),
- B(PopContext), R(2),
+ /* 103 S> */ B(PopContext), R(12),
+ B(PopContext), R(12),
+ B(Jump), U8(12),
+ B(PopContext), R(12),
B(LdaZero),
- B(StaContextSlot), R(1), U8(9), U8(0),
- B(Wide), B(JumpLoop), U16(257), I16(0),
+ B(StaContextSlot), R(7), U8(8), U8(0),
+ B(JumpLoop), U8(253), I8(0),
B(Jump), U8(48),
- B(Star), R(13),
- B(Ldar), R(closure),
- B(CreateCatchContext), R(13), U8(8), U8(9),
B(Star), R(12),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(12), U8(12), U8(13),
+ B(Star), R(11),
B(LdaTheHole),
B(SetPendingMessage),
- B(Ldar), R(12),
- B(PushContext), R(2),
- B(LdaContextSlot), R(1), U8(9), U8(0),
+ B(Ldar), R(11),
+ B(PushContext), R(12),
+ B(LdaContextSlot), R(7), U8(8), U8(0),
B(Star), R(13),
B(LdaSmi), I8(2),
- B(TestEqualStrict), R(13), U8(21),
+ B(TestEqualStrict), R(13), U8(22),
B(JumpIfFalse), U8(8),
B(LdaSmi), I8(1),
- B(StaContextSlot), R(1), U8(9), U8(0),
+ B(StaContextSlot), R(7), U8(8), U8(0),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(13),
B(CallRuntime), U16(Runtime::kReThrow), R(13), U8(1),
- B(PopContext), R(2),
+ B(PopContext), R(12),
B(LdaSmi), I8(-1),
- B(Star), R(9),
+ B(Star), R(8),
B(Jump), U8(8),
- B(Star), R(10),
- B(LdaSmi), I8(1),
B(Star), R(9),
+ B(LdaSmi), I8(1),
+ B(Star), R(8),
B(LdaTheHole),
B(SetPendingMessage),
+ B(Star), R(10),
+ B(LdaContextSlot), R(7), U8(8), U8(0),
B(Star), R(11),
- B(LdaContextSlot), R(1), U8(9), U8(0),
- B(Star), R(12),
B(LdaZero),
- B(TestEqualStrict), R(12), U8(22),
- B(JumpIfTrueConstant), U8(16),
- B(LdaContextSlot), R(1), U8(7), U8(0),
- B(Star), R(12),
- B(LdaNamedProperty), R(12), U8(10), U8(23),
- B(StaContextSlot), R(1), U8(13), U8(0),
- B(LdaContextSlot), R(1), U8(13), U8(0),
+ B(TestEqualStrict), R(11), U8(23),
+ B(JumpIfTrueConstant), U8(18),
+ B(LdaContextSlot), R(7), U8(6), U8(0),
+ B(Star), R(11),
+ B(LdaNamedProperty), R(11), U8(14), U8(24),
+ B(StaContextSlot), R(7), U8(12), U8(0),
+ B(LdaContextSlot), R(7), U8(12), U8(0),
B(TestUndetectable),
B(JumpIfFalse), U8(4),
- B(JumpConstant), U8(15),
- B(LdaContextSlot), R(1), U8(9), U8(0),
- B(Star), R(12),
+ B(JumpConstant), U8(17),
+ B(LdaContextSlot), R(7), U8(8), U8(0),
+ B(Star), R(11),
B(LdaSmi), I8(1),
- B(TestEqualStrict), R(12), U8(26),
- B(JumpIfFalse), U8(179),
- B(LdaContextSlot), R(1), U8(13), U8(0),
+ B(TestEqualStrict), R(11), U8(27),
+ B(JumpIfFalse), U8(175),
+ B(LdaContextSlot), R(7), U8(12), U8(0),
B(TestTypeOf), U8(5),
B(JumpIfFalse), U8(4),
B(Jump), U8(18),
- B(Wide), B(LdaSmi), I16(132),
+ B(Wide), B(LdaSmi), I16(130),
+ B(Star), R(11),
+ B(LdaConstant), U8(15),
B(Star), R(12),
- B(LdaConstant), U8(11),
- B(Star), R(13),
- B(CallRuntime), U16(Runtime::kNewTypeError), R(12), U8(2),
+ B(CallRuntime), U16(Runtime::kNewTypeError), R(11), U8(2),
B(Throw),
- B(Mov), R(context), R(12),
- B(LdaContextSlot), R(1), U8(13), U8(0),
+ B(Mov), R(context), R(11),
+ B(LdaImmutableContextSlot), R(7), U8(4), U8(0),
+ B(Star), R(12),
+ B(LdaContextSlot), R(7), U8(12), U8(0),
B(Star), R(13),
- B(LdaContextSlot), R(1), U8(7), U8(0),
+ B(LdaContextSlot), R(7), U8(6), U8(0),
B(Star), R(14),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(13), U8(2),
- B(StaContextSlot), R(1), U8(14), U8(0),
+ B(StaContextSlot), R(7), U8(13), U8(0),
B(LdaUndefined),
B(Star), R(13),
- B(LdaImmutableContextSlot), R(1), U8(5), U8(0),
+ B(LdaImmutableContextSlot), R(7), U8(4), U8(0),
B(Star), R(14),
- B(LdaContextSlot), R(1), U8(14), U8(0),
+ B(LdaContextSlot), R(7), U8(13), U8(0),
B(Star), R(15),
- B(LdaContextSlot), R(1), U8(11), U8(0),
+ B(LdaContextSlot), R(7), U8(10), U8(0),
B(Star), R(16),
B(CallJSRuntime), U8(%async_function_await_caught), R(13), U8(4),
- B(LdaContextSlot), R(1), U8(11), U8(0),
+ B(LdaContextSlot), R(7), U8(10), U8(0),
B(Star), R(13),
- B(LdaImmutableContextSlot), R(1), U8(5), U8(0),
- B(Star), R(14),
B(LdaSmi), I8(1),
- B(SuspendGenerator), R(14), U8(2),
+ B(SuspendGenerator), R(12), U8(2),
B(Ldar), R(13),
/* 114 S> */ B(Return),
B(LdaSmi), I8(-2),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(14), U8(1),
- B(Star), R(15),
- B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(14), U8(1),
- B(Star), R(16),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(12), U8(1),
+ B(Star), R(13),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(12), U8(1),
+ B(Star), R(14),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(16),
- B(JumpIfTrue), U8(38),
+ B(TestEqualStrictNoFeedback), R(14),
+ B(JumpIfTrue), U8(36),
B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(16),
- B(JumpIfTrue), U8(29),
- B(Jump), U8(2),
+ B(TestEqualStrictNoFeedback), R(14),
+ B(JumpIfTrue), U8(27),
B(LdaTrue),
- B(Star), R(18),
- B(Mov), R(15), R(17),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(17), U8(2),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(Star), R(6),
+ B(Star), R(16),
+ B(Mov), R(13), R(15),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(15), U8(2),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(Star), R(4),
B(LdaZero),
- B(Star), R(5),
- B(JumpConstant), U8(18),
- B(Ldar), R(15),
+ B(Star), R(3),
+ B(JumpConstant), U8(22),
+ B(Ldar), R(13),
B(ReThrow),
- B(Ldar), R(15),
+ B(Ldar), R(13),
B(Jump), U8(20),
- B(Star), R(13),
- B(Ldar), R(closure),
- B(CreateCatchContext), R(13), U8(8), U8(13),
B(Star), R(12),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(12), U8(12), U8(16),
+ B(Star), R(11),
B(LdaTheHole),
B(SetPendingMessage),
- B(Ldar), R(12),
- B(PushContext), R(2),
- B(PopContext), R(2),
- B(Jump), U8(158),
- B(LdaContextSlot), R(1), U8(13), U8(0),
+ B(Ldar), R(11),
+ B(PushContext), R(12),
+ B(PopContext), R(12),
+ B(Jump), U8(153),
+ B(LdaImmutableContextSlot), R(7), U8(4), U8(0),
+ B(Star), R(11),
+ B(LdaContextSlot), R(7), U8(12), U8(0),
B(Star), R(12),
- B(LdaContextSlot), R(1), U8(7), U8(0),
+ B(LdaContextSlot), R(7), U8(6), U8(0),
B(Star), R(13),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(2),
- B(StaContextSlot), R(1), U8(16), U8(0),
+ B(StaContextSlot), R(7), U8(15), U8(0),
B(LdaUndefined),
B(Star), R(12),
- B(LdaImmutableContextSlot), R(1), U8(5), U8(0),
+ B(LdaImmutableContextSlot), R(7), U8(4), U8(0),
B(Star), R(13),
- B(LdaContextSlot), R(1), U8(16), U8(0),
+ B(LdaContextSlot), R(7), U8(15), U8(0),
B(Star), R(14),
- B(LdaContextSlot), R(1), U8(11), U8(0),
+ B(LdaContextSlot), R(7), U8(10), U8(0),
B(Star), R(15),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(12), U8(4),
- B(LdaContextSlot), R(1), U8(11), U8(0),
+ B(LdaContextSlot), R(7), U8(10), U8(0),
B(Star), R(12),
- B(LdaImmutableContextSlot), R(1), U8(5), U8(0),
- B(Star), R(13),
B(LdaSmi), I8(2),
- B(SuspendGenerator), R(13), U8(2),
+ B(SuspendGenerator), R(11), U8(2),
B(Ldar), R(12),
/* 114 S> */ B(Return),
B(LdaSmi), I8(-2),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(13), U8(1),
- B(Star), R(14),
- B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(13), U8(1),
- B(Star), R(15),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(11), U8(1),
+ B(Star), R(12),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(11), U8(1),
+ B(Star), R(13),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(15),
- B(JumpIfTrue), U8(39),
+ B(TestEqualStrictNoFeedback), R(13),
+ B(JumpIfTrue), U8(36),
B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(15),
- B(JumpIfTrue), U8(30),
- B(Jump), U8(2),
+ B(TestEqualStrictNoFeedback), R(13),
+ B(JumpIfTrue), U8(27),
B(LdaTrue),
- B(Star), R(17),
- B(Mov), R(14), R(16),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(16), U8(2),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(Star), R(6),
- B(LdaSmi), I8(1),
- B(Star), R(5),
- B(Jump), U8(168),
- B(Ldar), R(14),
+ B(Star), R(15),
+ B(Mov), R(12), R(14),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(14), U8(2),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
+ B(Jump), U8(160),
+ B(Ldar), R(12),
B(ReThrow),
- B(Ldar), R(14),
- B(StaContextSlot), R(1), U8(15), U8(0),
- B(LdaContextSlot), R(1), U8(15), U8(0),
- B(Star), R(12),
- B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(12), U8(1),
+ B(Ldar), R(12),
+ B(StaContextSlot), R(7), U8(14), U8(0),
+ B(LdaContextSlot), R(7), U8(14), U8(0),
+ B(Star), R(11),
+ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(11), U8(1),
B(JumpIfToBooleanFalse), U8(4),
B(Jump), U8(13),
- B(LdaContextSlot), R(1), U8(15), U8(0),
- B(Star), R(12),
- B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
- B(Ldar), R(11),
+ B(LdaContextSlot), R(7), U8(14), U8(0),
+ B(Star), R(11),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
+ B(Ldar), R(10),
B(SetPendingMessage),
+ B(Ldar), R(8),
+ B(SwitchOnSmiNoFeedback), U8(19), U8(2), I8(0),
+ B(Jump), U8(25),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(9),
- B(JumpIfTrue), U8(10),
- B(LdaSmi), I8(1),
- B(TestEqualStrictNoFeedback), R(9),
- B(JumpIfTrue), U8(21),
- B(Jump), U8(26),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(LdaSmi), I8(2),
- B(Star), R(5),
- B(Mov), R(10), R(6),
- B(Jump), U8(101),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(Ldar), R(10),
+ B(Star), R(3),
+ B(Mov), R(9), R(4),
+ B(Jump), U8(99),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(Ldar), R(9),
B(ReThrow),
- B(PopContext), R(1),
+ B(PopContext), R(7),
B(LdaUndefined),
- B(Star), R(9),
- B(LdaCurrentContextSlot), U8(11),
- B(Star), R(10),
+ B(Star), R(7),
+ B(LdaCurrentContextSlot), U8(10),
+ B(Star), R(8),
B(LdaUndefined),
- B(Star), R(11),
- B(CallJSRuntime), U8(%promise_resolve), R(9), U8(3),
- B(LdaCurrentContextSlot), U8(11),
- B(Star), R(6),
- B(LdaSmi), I8(3),
- B(Star), R(5),
- B(Jump), U8(68),
- B(Jump), U8(54),
B(Star), R(9),
+ B(CallJSRuntime), U8(%promise_resolve), R(7), U8(3),
+ B(LdaCurrentContextSlot), U8(10),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
+ B(Jump), U8(67),
+ B(Jump), U8(53),
+ B(Star), R(7),
B(Ldar), R(closure),
- B(CreateCatchContext), R(9), U8(8), U8(17),
- B(Star), R(8),
+ B(CreateCatchContext), R(7), U8(12), U8(21),
+ B(Star), R(6),
B(LdaTheHole),
B(SetPendingMessage),
- B(Ldar), R(8),
- B(PushContext), R(1),
+ B(Ldar), R(6),
+ B(PushContext), R(7),
B(LdaUndefined),
+ B(Star), R(8),
+ B(LdaContextSlot), R(7), U8(10), U8(0),
B(Star), R(9),
- B(LdaContextSlot), R(1), U8(11), U8(0),
- B(Star), R(10),
B(LdaImmutableCurrentContextSlot), U8(4),
- B(Star), R(11),
+ B(Star), R(10),
B(LdaFalse),
- B(Star), R(12),
- B(CallJSRuntime), U8(%promise_internal_reject), R(9), U8(4),
- B(LdaContextSlot), R(1), U8(11), U8(0),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(Star), R(6),
- B(LdaSmi), I8(4),
- B(Star), R(5),
+ B(Star), R(11),
+ B(CallJSRuntime), U8(%promise_internal_reject), R(8), U8(4),
+ B(LdaContextSlot), R(7), U8(10), U8(0),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
B(Jump), U8(14),
B(LdaSmi), I8(-1),
- B(Star), R(5),
+ B(Star), R(3),
B(Jump), U8(8),
- B(Star), R(6),
- B(LdaSmi), I8(5),
- B(Star), R(5),
+ B(Star), R(4),
+ B(LdaSmi), I8(1),
+ B(Star), R(3),
B(LdaTheHole),
B(SetPendingMessage),
- B(Star), R(7),
+ B(Star), R(5),
B(LdaUndefined),
- B(Star), R(8),
- B(LdaCurrentContextSlot), U8(11),
- B(Star), R(9),
- B(CallJSRuntime), U8(%async_function_promise_release), R(8), U8(2),
- B(Ldar), R(7),
+ B(Star), R(6),
+ B(LdaCurrentContextSlot), U8(10),
+ B(Star), R(7),
+ B(CallJSRuntime), U8(%async_function_promise_release), R(6), U8(2),
+ B(Ldar), R(5),
B(SetPendingMessage),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(5),
- B(JumpIfTrue), U8(34),
- B(LdaSmi), I8(1),
- B(TestEqualStrictNoFeedback), R(5),
- B(JumpIfTrue), U8(31),
- B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(5),
- B(JumpIfTrue), U8(28),
- B(LdaSmi), I8(3),
- B(TestEqualStrictNoFeedback), R(5),
- B(JumpIfTrue), U8(25),
- B(LdaSmi), I8(4),
- B(TestEqualStrictNoFeedback), R(5),
- B(JumpIfTrue), U8(22),
- B(LdaSmi), I8(5),
- B(TestEqualStrictNoFeedback), R(5),
- B(JumpIfTrue), U8(19),
- B(Jump), U8(20),
- B(Ldar), R(6),
- /* 114 S> */ B(Return),
- B(Ldar), R(6),
- /* 114 S> */ B(Return),
- B(Ldar), R(6),
- /* 114 S> */ B(Return),
- B(Ldar), R(6),
- /* 114 S> */ B(Return),
- B(Ldar), R(6),
+ B(Ldar), R(3),
+ B(SwitchOnSmiNoFeedback), U8(23), U8(2), I8(0),
+ B(Jump), U8(8),
+ B(Ldar), R(4),
/* 114 S> */ B(Return),
- B(Ldar), R(6),
+ B(Ldar), R(4),
B(ReThrow),
B(LdaUndefined),
/* 114 S> */ B(Return),
]
constant pool: [
+ Smi [116],
+ Smi [578],
+ Smi [722],
FIXED_ARRAY_TYPE,
- CONSTANT_ELEMENTS_PAIR_TYPE,
+ TUPLE2_TYPE,
SYMBOL_TYPE,
SYMBOL_TYPE,
+ Smi [83],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
@@ -1467,20 +1350,22 @@ constant pool: [
FIXED_ARRAY_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
- Smi [594],
FIXED_ARRAY_TYPE,
- Smi [736],
- Smi [348],
- Smi [371],
+ Smi [339],
+ Smi [362],
+ Smi [6],
+ Smi [22],
FIXED_ARRAY_TYPE,
- Smi [317],
+ Smi [304],
+ Smi [6],
+ Smi [9],
]
handlers: [
- [80, 977, 983],
- [83, 923, 925],
- [100, 460, 466],
- [103, 412, 414],
- [553, 679, 681],
+ [60, 934, 940],
+ [63, 881, 883],
+ [80, 434, 440],
+ [83, 386, 388],
+ [527, 649, 651],
]
---
@@ -1491,276 +1376,242 @@ snippet: "
}
f();
"
-frame size: 14
+frame size: 11
parameter count: 1
-bytecode array length: 579
+bytecode array length: 508
bytecodes: [
- B(Ldar), R(new_target),
- B(JumpIfUndefined), U8(22),
- B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
- B(PushContext), R(3),
- B(ResumeGenerator), R(new_target),
- B(Star), R(2),
- B(LdaSmi), I8(79),
- B(Star), R(4),
- B(CallRuntime), U16(Runtime::kAbort), R(4), U8(1),
- B(LdaSmi), I8(-2),
- B(Star), R(2),
- B(CreateFunctionContext), U8(10),
+ B(CreateFunctionContext), U8(9),
B(PushContext), R(0),
- B(Ldar), R(this),
- B(StaCurrentContextSlot), U8(4),
/* 16 E> */ B(StackCheck),
- B(LdaImmutableCurrentContextSlot), U8(4),
- B(Star), R(5),
- B(Mov), R(closure), R(4),
- B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(4), U8(2),
- B(StaCurrentContextSlot), U8(5),
B(LdaUndefined),
- B(Star), R(4),
- B(CallJSRuntime), U8(%async_function_promise_create), R(4), U8(1),
- B(StaCurrentContextSlot), U8(13),
- B(Mov), R(context), R(6),
- B(Mov), R(context), R(7),
- /* 31 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(8),
- B(Ldar), R(8),
- /* 31 E> */ B(StaCurrentContextSlot), U8(6),
+ B(Star), R(1),
+ B(CallJSRuntime), U8(%async_function_promise_create), R(1), U8(1),
+ B(StaCurrentContextSlot), U8(12),
+ B(Mov), R(context), R(3),
+ B(Mov), R(context), R(4),
+ /* 31 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(5),
+ B(Ldar), R(5),
+ /* 31 E> */ B(StaCurrentContextSlot), U8(5),
B(LdaZero),
- B(StaCurrentContextSlot), U8(9),
- B(Mov), R(context), R(10),
- B(Mov), R(context), R(11),
- /* 68 S> */ B(CreateArrayLiteral), U8(1), U8(3), U8(9),
- B(Star), R(12),
- B(LdaNamedProperty), R(12), U8(2), U8(4),
- B(Star), R(13),
- B(CallProperty0), R(13), R(12), U8(6),
+ B(StaCurrentContextSlot), U8(8),
+ B(Mov), R(context), R(7),
+ B(Mov), R(context), R(8),
+ /* 68 S> */ B(CreateArrayLiteral), U8(1), U8(4), U8(17),
+ B(Star), R(9),
+ B(LdaNamedProperty), R(9), U8(2), U8(5),
+ B(Star), R(10),
+ B(CallProperty0), R(10), R(9), U8(7),
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
- /* 68 E> */ B(StaCurrentContextSlot), U8(7),
- /* 65 S> */ B(LdaCurrentContextSlot), U8(7),
- B(Star), R(13),
- B(LdaNamedProperty), R(13), U8(3), U8(10),
- B(Star), R(12),
- /* 65 E> */ B(CallProperty0), R(12), R(13), U8(8),
- /* 65 E> */ B(StaCurrentContextSlot), U8(8),
- B(Star), R(12),
- B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(12), U8(1),
+ /* 68 E> */ B(StaCurrentContextSlot), U8(6),
+ /* 65 S> */ B(LdaCurrentContextSlot), U8(6),
+ B(Star), R(10),
+ B(LdaNamedProperty), R(10), U8(3), U8(11),
+ B(Star), R(9),
+ /* 65 E> */ B(CallProperty0), R(9), R(10), U8(9),
+ /* 65 E> */ B(StaCurrentContextSlot), U8(7),
+ B(Star), R(9),
+ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(9), U8(1),
B(ToBooleanLogicalNot),
B(JumpIfFalse), U8(11),
- B(LdaCurrentContextSlot), U8(8),
- B(Star), R(12),
- B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
- B(LdaCurrentContextSlot), U8(8),
- B(Star), R(12),
- B(LdaNamedProperty), R(12), U8(4), U8(12),
+ B(LdaCurrentContextSlot), U8(7),
+ B(Star), R(9),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(9), U8(1),
+ B(LdaCurrentContextSlot), U8(7),
+ B(Star), R(9),
+ B(LdaNamedProperty), R(9), U8(4), U8(13),
B(JumpIfToBooleanTrue), U8(42),
- B(LdaImmutableCurrentContextSlot), U8(6),
- B(Star), R(12),
- B(LdaCurrentContextSlot), U8(8),
- B(Star), R(13),
- /* 58 E> */ B(LdaNamedProperty), R(13), U8(5), U8(14),
- B(StaCurrentContextSlot), U8(10),
- B(LdaSmi), I8(2),
+ B(LdaImmutableCurrentContextSlot), U8(5),
+ B(Star), R(9),
+ B(LdaCurrentContextSlot), U8(7),
+ B(Star), R(10),
+ /* 58 E> */ B(LdaNamedProperty), R(10), U8(5), U8(15),
B(StaCurrentContextSlot), U8(9),
- B(LdaCurrentContextSlot), U8(10),
- B(StaNamedPropertySloppy), R(12), U8(6), U8(16),
+ B(LdaSmi), I8(2),
+ B(StaCurrentContextSlot), U8(8),
+ B(LdaCurrentContextSlot), U8(9),
+ B(StaNamedPropertySloppy), R(9), U8(6), U8(17),
/* 53 E> */ B(StackCheck),
- /* 79 S> */ B(LdaImmutableCurrentContextSlot), U8(6),
- B(Star), R(12),
- /* 87 E> */ B(LdaNamedProperty), R(12), U8(6), U8(18),
+ /* 79 S> */ B(LdaImmutableCurrentContextSlot), U8(5),
B(Star), R(9),
+ /* 87 E> */ B(LdaNamedProperty), R(9), U8(6), U8(19),
+ B(Star), R(6),
B(LdaZero),
- B(Star), R(8),
+ B(Star), R(5),
B(Jump), U8(62),
B(Jump), U8(48),
- B(Star), R(12),
+ B(Star), R(9),
B(Ldar), R(closure),
- B(CreateCatchContext), R(12), U8(7), U8(8),
- B(Star), R(11),
+ B(CreateCatchContext), R(9), U8(7), U8(8),
+ B(Star), R(8),
B(LdaTheHole),
B(SetPendingMessage),
- B(Ldar), R(11),
- B(PushContext), R(1),
- B(LdaContextSlot), R(1), U8(9), U8(0),
- B(Star), R(12),
+ B(Ldar), R(8),
+ B(PushContext), R(9),
+ B(LdaContextSlot), R(9), U8(8), U8(0),
+ B(Star), R(10),
B(LdaSmi), I8(2),
- B(TestEqualStrict), R(12), U8(20),
+ B(TestEqualStrict), R(10), U8(21),
B(JumpIfFalse), U8(8),
B(LdaSmi), I8(1),
- B(StaContextSlot), R(1), U8(9), U8(0),
+ B(StaContextSlot), R(9), U8(8), U8(0),
B(LdaImmutableCurrentContextSlot), U8(4),
- B(Star), R(12),
- B(CallRuntime), U16(Runtime::kReThrow), R(12), U8(1),
- B(PopContext), R(1),
+ B(Star), R(10),
+ B(CallRuntime), U16(Runtime::kReThrow), R(10), U8(1),
+ B(PopContext), R(9),
B(LdaSmi), I8(-1),
- B(Star), R(8),
+ B(Star), R(5),
B(Jump), U8(8),
- B(Star), R(9),
+ B(Star), R(6),
B(LdaSmi), I8(1),
- B(Star), R(8),
+ B(Star), R(5),
B(LdaTheHole),
B(SetPendingMessage),
- B(Star), R(10),
- B(LdaCurrentContextSlot), U8(9),
- B(Star), R(11),
+ B(Star), R(7),
+ B(LdaCurrentContextSlot), U8(8),
+ B(Star), R(8),
B(LdaZero),
- B(TestEqualStrict), R(11), U8(21),
+ B(TestEqualStrict), R(8), U8(22),
B(JumpIfTrue), U8(126),
- B(LdaCurrentContextSlot), U8(7),
- B(Star), R(11),
- B(LdaNamedProperty), R(11), U8(9), U8(22),
- B(StaCurrentContextSlot), U8(11),
- B(LdaCurrentContextSlot), U8(11),
+ B(LdaCurrentContextSlot), U8(6),
+ B(Star), R(8),
+ B(LdaNamedProperty), R(8), U8(9), U8(23),
+ B(StaCurrentContextSlot), U8(10),
+ B(LdaCurrentContextSlot), U8(10),
B(TestUndetectable),
B(JumpIfFalse), U8(4),
B(Jump), U8(109),
- B(LdaCurrentContextSlot), U8(9),
- B(Star), R(11),
+ B(LdaCurrentContextSlot), U8(8),
+ B(Star), R(8),
B(LdaSmi), I8(1),
- B(TestEqualStrict), R(11), U8(25),
+ B(TestEqualStrict), R(8), U8(26),
B(JumpIfFalse), U8(63),
- B(LdaCurrentContextSlot), U8(11),
+ B(LdaCurrentContextSlot), U8(10),
B(TestTypeOf), U8(5),
B(JumpIfFalse), U8(4),
B(Jump), U8(18),
- B(Wide), B(LdaSmi), I16(132),
- B(Star), R(11),
+ B(Wide), B(LdaSmi), I16(130),
+ B(Star), R(8),
B(LdaConstant), U8(10),
- B(Star), R(12),
- B(CallRuntime), U16(Runtime::kNewTypeError), R(11), U8(2),
+ B(Star), R(9),
+ B(CallRuntime), U16(Runtime::kNewTypeError), R(8), U8(2),
B(Throw),
- B(Mov), R(context), R(11),
- B(LdaCurrentContextSlot), U8(11),
- B(Star), R(12),
- B(LdaCurrentContextSlot), U8(7),
- B(Star), R(13),
- B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(2),
+ B(Mov), R(context), R(8),
+ B(LdaCurrentContextSlot), U8(10),
+ B(Star), R(9),
+ B(LdaCurrentContextSlot), U8(6),
+ B(Star), R(10),
+ B(InvokeIntrinsic), U8(Runtime::k_Call), R(9), U8(2),
B(Jump), U8(20),
- B(Star), R(12),
+ B(Star), R(9),
B(Ldar), R(closure),
- B(CreateCatchContext), R(12), U8(7), U8(11),
- B(Star), R(11),
+ B(CreateCatchContext), R(9), U8(7), U8(11),
+ B(Star), R(8),
B(LdaTheHole),
B(SetPendingMessage),
- B(Ldar), R(11),
- B(PushContext), R(1),
- B(PopContext), R(1),
+ B(Ldar), R(8),
+ B(PushContext), R(9),
+ B(PopContext), R(9),
B(Jump), U8(37),
+ B(LdaCurrentContextSlot), U8(10),
+ B(Star), R(8),
+ B(LdaCurrentContextSlot), U8(6),
+ B(Star), R(9),
+ B(InvokeIntrinsic), U8(Runtime::k_Call), R(8), U8(2),
+ B(StaCurrentContextSlot), U8(11),
B(LdaCurrentContextSlot), U8(11),
- B(Star), R(11),
- B(LdaCurrentContextSlot), U8(7),
- B(Star), R(12),
- B(InvokeIntrinsic), U8(Runtime::k_Call), R(11), U8(2),
- B(StaCurrentContextSlot), U8(12),
- B(LdaCurrentContextSlot), U8(12),
- B(Star), R(11),
- B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(11), U8(1),
+ B(Star), R(8),
+ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(8), U8(1),
B(JumpIfToBooleanFalse), U8(4),
B(Jump), U8(11),
- B(LdaCurrentContextSlot), U8(12),
- B(Star), R(11),
- B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
- B(Ldar), R(10),
+ B(LdaCurrentContextSlot), U8(11),
+ B(Star), R(8),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(8), U8(1),
+ B(Ldar), R(7),
B(SetPendingMessage),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(8),
- B(JumpIfTrue), U8(10),
- B(LdaSmi), I8(1),
- B(TestEqualStrictNoFeedback), R(8),
- B(JumpIfTrue), U8(12),
+ B(Ldar), R(5),
+ B(SwitchOnSmiNoFeedback), U8(12), U8(2), I8(0),
B(Jump), U8(13),
B(LdaZero),
- B(Star), R(4),
- B(Mov), R(9), R(5),
+ B(Star), R(1),
+ B(Mov), R(6), R(2),
B(Jump), U8(95),
- B(Ldar), R(9),
+ B(Ldar), R(6),
B(ReThrow),
B(LdaUndefined),
- B(Star), R(8),
- B(LdaCurrentContextSlot), U8(13),
- B(Star), R(9),
- B(LdaUndefined),
- B(Star), R(10),
- B(CallJSRuntime), U8(%promise_resolve), R(8), U8(3),
- B(LdaCurrentContextSlot), U8(13),
B(Star), R(5),
+ B(LdaCurrentContextSlot), U8(12),
+ B(Star), R(6),
+ B(LdaUndefined),
+ B(Star), R(7),
+ B(CallJSRuntime), U8(%promise_resolve), R(5), U8(3),
+ B(LdaCurrentContextSlot), U8(12),
+ B(Star), R(2),
B(LdaSmi), I8(1),
- B(Star), R(4),
+ B(Star), R(1),
B(Jump), U8(68),
B(Jump), U8(54),
- B(Star), R(8),
+ B(Star), R(5),
B(Ldar), R(closure),
- B(CreateCatchContext), R(8), U8(7), U8(12),
- B(Star), R(7),
+ B(CreateCatchContext), R(5), U8(7), U8(14),
+ B(Star), R(4),
B(LdaTheHole),
B(SetPendingMessage),
- B(Ldar), R(7),
- B(PushContext), R(1),
+ B(Ldar), R(4),
+ B(PushContext), R(5),
B(LdaUndefined),
- B(Star), R(8),
- B(LdaContextSlot), R(1), U8(13), U8(0),
- B(Star), R(9),
+ B(Star), R(6),
+ B(LdaContextSlot), R(5), U8(12), U8(0),
+ B(Star), R(7),
B(LdaImmutableCurrentContextSlot), U8(4),
- B(Star), R(10),
+ B(Star), R(8),
B(LdaFalse),
- B(Star), R(11),
- B(CallJSRuntime), U8(%promise_internal_reject), R(8), U8(4),
- B(LdaContextSlot), R(1), U8(13), U8(0),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(Star), R(5),
- B(LdaSmi), I8(2),
- B(Star), R(4),
+ B(Star), R(9),
+ B(CallJSRuntime), U8(%promise_internal_reject), R(6), U8(4),
+ B(LdaContextSlot), R(5), U8(12), U8(0),
+ B(PopContext), R(5),
+ B(PopContext), R(5),
+ B(Star), R(2),
+ B(LdaSmi), I8(1),
+ B(Star), R(1),
B(Jump), U8(14),
B(LdaSmi), I8(-1),
- B(Star), R(4),
+ B(Star), R(1),
B(Jump), U8(8),
- B(Star), R(5),
- B(LdaSmi), I8(3),
- B(Star), R(4),
+ B(Star), R(2),
+ B(LdaSmi), I8(2),
+ B(Star), R(1),
B(LdaTheHole),
B(SetPendingMessage),
- B(Star), R(6),
+ B(Star), R(3),
B(LdaUndefined),
- B(Star), R(7),
- B(LdaCurrentContextSlot), U8(13),
- B(Star), R(8),
- B(CallJSRuntime), U8(%async_function_promise_release), R(7), U8(2),
- B(Ldar), R(6),
+ B(Star), R(4),
+ B(LdaCurrentContextSlot), U8(12),
+ B(Star), R(5),
+ B(CallJSRuntime), U8(%async_function_promise_release), R(4), U8(2),
+ B(Ldar), R(3),
B(SetPendingMessage),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(4),
- B(JumpIfTrue), U8(22),
- B(LdaSmi), I8(1),
- B(TestEqualStrictNoFeedback), R(4),
- B(JumpIfTrue), U8(33),
- B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(4),
- B(JumpIfTrue), U8(30),
- B(LdaSmi), I8(3),
- B(TestEqualStrictNoFeedback), R(4),
- B(JumpIfTrue), U8(27),
- B(Jump), U8(28),
- B(LdaCurrentContextSlot), U8(13),
- B(Star), R(8),
+ B(Ldar), R(1),
+ B(SwitchOnSmiNoFeedback), U8(15), U8(3), I8(0),
+ B(Jump), U8(25),
+ B(LdaCurrentContextSlot), U8(12),
+ B(Star), R(5),
B(LdaUndefined),
- B(Star), R(7),
- B(Mov), R(5), R(9),
- B(CallJSRuntime), U8(%promise_resolve), R(7), U8(3),
- B(Ldar), R(8),
- /* 96 S> */ B(Return),
+ B(Star), R(4),
+ B(Mov), R(2), R(6),
+ B(CallJSRuntime), U8(%promise_resolve), R(4), U8(3),
B(Ldar), R(5),
/* 96 S> */ B(Return),
- B(Ldar), R(5),
+ B(Ldar), R(2),
/* 96 S> */ B(Return),
- B(Ldar), R(5),
+ B(Ldar), R(2),
B(ReThrow),
B(LdaUndefined),
/* 96 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
- CONSTANT_ELEMENTS_PAIR_TYPE,
+ TUPLE2_TYPE,
SYMBOL_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
@@ -1771,13 +1622,18 @@ constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
FIXED_ARRAY_TYPE,
+ Smi [6],
+ Smi [14],
FIXED_ARRAY_TYPE,
+ Smi [6],
+ Smi [23],
+ Smi [26],
]
handlers: [
- [63, 496, 502],
- [66, 442, 444],
- [81, 241, 247],
- [84, 193, 195],
- [322, 334, 336],
+ [17, 445, 451],
+ [20, 391, 393],
+ [35, 195, 201],
+ [38, 147, 149],
+ [276, 288, 290],
]
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/ForIn.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/ForIn.golden
index 4acc95246e..21a9c5c471 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/ForIn.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/ForIn.golden
@@ -76,7 +76,7 @@ bytecodes: [
B(Star), R(7),
/* 63 S> */ B(ForInContinue), R(7), R(6),
B(JumpIfFalse), U8(23),
- B(ForInNext), R(3), R(7), R(4), U8(2),
+ B(ForInNext), R(3), R(7), R(4), U8(3),
B(JumpIfUndefined), U8(9),
B(Star), R(1),
/* 54 E> */ B(StackCheck),
@@ -107,7 +107,7 @@ bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaZero),
B(Star), R(0),
- /* 59 S> */ B(CreateArrayLiteral), U8(0), U8(2), U8(9),
+ /* 59 S> */ B(CreateArrayLiteral), U8(0), U8(3), U8(17),
B(JumpIfUndefined), U8(46),
B(JumpIfNull), U8(44),
B(ToObject), R(3),
@@ -116,13 +116,13 @@ bytecodes: [
B(Star), R(7),
/* 54 S> */ B(ForInContinue), R(7), R(6),
B(JumpIfFalse), U8(31),
- B(ForInNext), R(3), R(7), R(4), U8(4),
+ B(ForInNext), R(3), R(7), R(4), U8(5),
B(JumpIfUndefined), U8(17),
B(Star), R(1),
/* 45 E> */ B(StackCheck),
B(Star), R(2),
/* 70 S> */ B(Ldar), R(1),
- /* 75 E> */ B(Add), R(0), U8(3),
+ /* 75 E> */ B(Add), R(0), U8(4),
B(Mov), R(0), R(8),
B(Star), R(0),
/* 72 E> */ B(ForInStep), R(7),
@@ -132,7 +132,7 @@ bytecodes: [
/* 80 S> */ B(Return),
]
constant pool: [
- CONSTANT_ELEMENTS_PAIR_TYPE,
+ TUPLE2_TYPE,
]
handlers: [
]
@@ -150,9 +150,9 @@ parameter count: 1
bytecode array length: 87
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(1),
+ /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(1),
B(Mov), R(1), R(0),
- /* 77 S> */ B(CreateArrayLiteral), U8(1), U8(3), U8(9),
+ /* 77 S> */ B(CreateArrayLiteral), U8(1), U8(4), U8(17),
B(JumpIfUndefined), U8(72),
B(JumpIfNull), U8(70),
B(ToObject), R(1),
@@ -161,24 +161,24 @@ bytecodes: [
B(Star), R(5),
/* 68 S> */ B(ForInContinue), R(5), R(4),
B(JumpIfFalse), U8(57),
- B(ForInNext), R(1), R(5), R(2), U8(14),
+ B(ForInNext), R(1), R(5), R(2), U8(15),
B(JumpIfUndefined), U8(43),
B(Star), R(6),
B(Ldar), R(6),
- /* 67 E> */ B(StaNamedPropertySloppy), R(0), U8(2), U8(12),
+ /* 67 E> */ B(StaNamedPropertySloppy), R(0), U8(2), U8(13),
/* 62 E> */ B(StackCheck),
/* 95 S> */ B(Nop),
- /* 100 E> */ B(LdaNamedProperty), R(0), U8(2), U8(6),
+ /* 100 E> */ B(LdaNamedProperty), R(0), U8(2), U8(7),
B(Star), R(6),
B(LdaSmi), I8(10),
- /* 106 E> */ B(TestEqual), R(6), U8(8),
+ /* 106 E> */ B(TestEqual), R(6), U8(9),
B(JumpIfFalse), U8(4),
/* 113 S> */ B(Jump), U8(18),
/* 125 S> */ B(Nop),
- /* 130 E> */ B(LdaNamedProperty), R(0), U8(2), U8(9),
+ /* 130 E> */ B(LdaNamedProperty), R(0), U8(2), U8(10),
B(Star), R(6),
B(LdaSmi), I8(20),
- /* 136 E> */ B(TestEqual), R(6), U8(11),
+ /* 136 E> */ B(TestEqual), R(6), U8(12),
B(JumpIfFalse), U8(4),
/* 143 S> */ B(Jump), U8(9),
B(ForInStep), R(5),
@@ -189,7 +189,7 @@ bytecodes: [
]
constant pool: [
FIXED_ARRAY_TYPE,
- CONSTANT_ELEMENTS_PAIR_TYPE,
+ TUPLE2_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"],
]
handlers: [
@@ -205,9 +205,9 @@ parameter count: 1
bytecode array length: 62
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 42 S> */ B(CreateArrayLiteral), U8(0), U8(2), U8(9),
+ /* 42 S> */ B(CreateArrayLiteral), U8(0), U8(3), U8(17),
B(Star), R(0),
- /* 72 S> */ B(CreateArrayLiteral), U8(1), U8(3), U8(9),
+ /* 72 S> */ B(CreateArrayLiteral), U8(1), U8(4), U8(17),
B(JumpIfUndefined), U8(49),
B(JumpIfNull), U8(47),
B(ToObject), R(1),
@@ -216,16 +216,16 @@ bytecodes: [
B(Star), R(5),
/* 65 S> */ B(ForInContinue), R(5), R(4),
B(JumpIfFalse), U8(34),
- B(ForInNext), R(1), R(5), R(2), U8(10),
+ B(ForInNext), R(1), R(5), R(2), U8(11),
B(JumpIfUndefined), U8(20),
B(Star), R(6),
B(LdaZero),
B(Star), R(8),
B(Ldar), R(6),
- /* 64 E> */ B(StaKeyedPropertySloppy), R(0), R(8), U8(8),
+ /* 64 E> */ B(StaKeyedPropertySloppy), R(0), R(8), U8(9),
/* 59 E> */ B(StackCheck),
/* 83 S> */ B(LdaSmi), I8(3),
- /* 91 E> */ B(LdaKeyedProperty), R(0), U8(6),
+ /* 91 E> */ B(LdaKeyedProperty), R(0), U8(7),
/* 98 S> */ B(Return),
B(ForInStep), R(5),
B(Star), R(5),
@@ -234,8 +234,8 @@ bytecodes: [
/* 98 S> */ B(Return),
]
constant pool: [
- CONSTANT_ELEMENTS_PAIR_TYPE,
- CONSTANT_ELEMENTS_PAIR_TYPE,
+ TUPLE2_TYPE,
+ TUPLE2_TYPE,
]
handlers: [
]
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/ForOf.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/ForOf.golden
index 99f48b8b9b..6f592ba4d6 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/ForOf.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/ForOf.golden
@@ -9,34 +9,34 @@ wrap: yes
snippet: "
for (var p of [0, 1, 2]) {}
"
-frame size: 15
+frame size: 14
parameter count: 1
-bytecode array length: 262
+bytecode array length: 260
bytecodes: [
/* 30 E> */ B(StackCheck),
B(LdaZero),
B(Star), R(4),
+ B(Mov), R(context), R(10),
B(Mov), R(context), R(11),
- B(Mov), R(context), R(12),
- /* 48 S> */ B(CreateArrayLiteral), U8(0), U8(2), U8(9),
+ /* 48 S> */ B(CreateArrayLiteral), U8(0), U8(3), U8(17),
+ B(Star), R(12),
+ B(LdaNamedProperty), R(12), U8(1), U8(4),
B(Star), R(13),
- B(LdaNamedProperty), R(13), U8(1), U8(3),
- B(Star), R(14),
- B(CallProperty0), R(14), R(13), U8(5),
+ B(CallProperty0), R(13), R(12), U8(6),
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
B(Star), R(2),
- /* 45 S> */ B(LdaNamedProperty), R(2), U8(2), U8(9),
- B(Star), R(13),
- /* 45 E> */ B(CallProperty0), R(13), R(2), U8(7),
+ /* 45 S> */ B(LdaNamedProperty), R(2), U8(2), U8(10),
+ B(Star), R(12),
+ /* 45 E> */ B(CallProperty0), R(12), R(2), U8(8),
B(Star), R(3),
/* 45 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(3), U8(1),
B(ToBooleanLogicalNot),
B(JumpIfFalse), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(3), U8(1),
- B(LdaNamedProperty), R(3), U8(3), U8(11),
+ B(LdaNamedProperty), R(3), U8(3), U8(12),
B(JumpIfToBooleanTrue), U8(25),
- B(LdaNamedProperty), R(3), U8(4), U8(13),
+ B(LdaNamedProperty), R(3), U8(4), U8(14),
B(Star), R(5),
B(LdaSmi), I8(2),
B(Star), R(4),
@@ -47,86 +47,85 @@ bytecodes: [
B(Star), R(4),
B(JumpLoop), U8(50), I8(0),
B(Jump), U8(36),
- B(Star), R(13),
- B(Ldar), R(closure),
- B(CreateCatchContext), R(13), U8(5), U8(6),
B(Star), R(12),
- B(PushContext), R(8),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(12), U8(5), U8(6),
+ B(PushContext), R(12),
+ B(Star), R(11),
B(LdaSmi), I8(2),
- B(TestEqualStrict), R(4), U8(15),
+ B(TestEqualStrict), R(4), U8(16),
B(JumpIfFalse), U8(6),
B(LdaSmi), I8(1),
B(Star), R(4),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(13),
B(CallRuntime), U16(Runtime::kReThrow), R(13), U8(1),
- B(PopContext), R(8),
+ B(PopContext), R(12),
B(LdaSmi), I8(-1),
- B(Star), R(9),
+ B(Star), R(8),
B(Jump), U8(7),
- B(Star), R(10),
- B(LdaZero),
B(Star), R(9),
+ B(LdaZero),
+ B(Star), R(8),
B(LdaTheHole),
B(SetPendingMessage),
- B(Star), R(11),
+ B(Star), R(10),
B(LdaZero),
- B(TestEqualStrict), R(4), U8(16),
+ B(TestEqualStrict), R(4), U8(17),
B(JumpIfTrue), U8(104),
- B(LdaNamedProperty), R(2), U8(7), U8(17),
+ B(LdaNamedProperty), R(2), U8(7), U8(18),
B(Star), R(6),
B(TestUndetectable),
B(JumpIfFalse), U8(4),
B(Jump), U8(93),
B(LdaSmi), I8(1),
- B(TestEqualStrict), R(4), U8(20),
+ B(TestEqualStrict), R(4), U8(21),
B(JumpIfFalse), U8(61),
B(Ldar), R(6),
B(TestTypeOf), U8(5),
B(JumpIfFalse), U8(4),
B(Jump), U8(18),
- B(Wide), B(LdaSmi), I16(132),
- B(Star), R(12),
+ B(Wide), B(LdaSmi), I16(130),
+ B(Star), R(11),
B(LdaConstant), U8(8),
- B(Star), R(13),
- B(CallRuntime), U16(Runtime::kNewTypeError), R(12), U8(2),
+ B(Star), R(12),
+ B(CallRuntime), U16(Runtime::kNewTypeError), R(11), U8(2),
B(Throw),
- B(Mov), R(context), R(12),
- B(Mov), R(6), R(13),
- B(Mov), R(2), R(14),
- B(InvokeIntrinsic), U8(Runtime::k_Call), R(13), U8(2),
+ B(Mov), R(context), R(11),
+ B(Mov), R(6), R(12),
+ B(Mov), R(2), R(13),
+ B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(2),
B(Jump), U8(20),
- B(Star), R(13),
- B(Ldar), R(closure),
- B(CreateCatchContext), R(13), U8(5), U8(9),
B(Star), R(12),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(12), U8(5), U8(9),
+ B(Star), R(11),
B(LdaTheHole),
B(SetPendingMessage),
- B(Ldar), R(12),
- B(PushContext), R(8),
- B(PopContext), R(8),
+ B(Ldar), R(11),
+ B(PushContext), R(12),
+ B(PopContext), R(12),
B(Jump), U8(27),
- B(Mov), R(6), R(12),
- B(Mov), R(2), R(13),
- B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(2),
+ B(Mov), R(6), R(11),
+ B(Mov), R(2), R(12),
+ B(InvokeIntrinsic), U8(Runtime::k_Call), R(11), U8(2),
B(Star), R(7),
B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(7), U8(1),
B(JumpIfToBooleanFalse), U8(4),
B(Jump), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(7), U8(1),
- B(Ldar), R(11),
+ B(Ldar), R(10),
B(SetPendingMessage),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(9),
- B(JumpIfTrue), U8(4),
- B(Jump), U8(5),
- B(Ldar), R(10),
+ B(TestEqualStrictNoFeedback), R(8),
+ B(JumpIfFalse), U8(5),
+ B(Ldar), R(9),
B(ReThrow),
B(LdaUndefined),
/* 62 S> */ B(Return),
]
constant pool: [
- CONSTANT_ELEMENTS_PAIR_TYPE,
+ TUPLE2_TYPE,
SYMBOL_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
@@ -148,35 +147,35 @@ snippet: "
var x = 'potatoes';
for (var p of x) { return p; }
"
-frame size: 16
+frame size: 15
parameter count: 1
-bytecode array length: 275
+bytecode array length: 270
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaConstant), U8(0),
B(Star), R(0),
B(LdaZero),
B(Star), R(5),
+ B(Mov), R(context), R(11),
B(Mov), R(context), R(12),
- B(Mov), R(context), R(13),
- /* 68 S> */ B(LdaNamedProperty), R(0), U8(1), U8(2),
- B(Star), R(15),
- B(CallProperty0), R(15), R(0), U8(4),
- B(Mov), R(0), R(14),
+ /* 68 S> */ B(LdaNamedProperty), R(0), U8(1), U8(3),
+ B(Star), R(14),
+ B(CallProperty0), R(14), R(0), U8(5),
+ B(Mov), R(0), R(13),
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
B(Star), R(3),
- /* 65 S> */ B(LdaNamedProperty), R(3), U8(2), U8(8),
- B(Star), R(14),
- /* 65 E> */ B(CallProperty0), R(14), R(3), U8(6),
+ /* 65 S> */ B(LdaNamedProperty), R(3), U8(2), U8(9),
+ B(Star), R(13),
+ /* 65 E> */ B(CallProperty0), R(13), R(3), U8(7),
B(Star), R(4),
/* 65 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(4), U8(1),
B(ToBooleanLogicalNot),
B(JumpIfFalse), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(4), U8(1),
- B(LdaNamedProperty), R(4), U8(3), U8(10),
+ B(LdaNamedProperty), R(4), U8(3), U8(11),
B(JumpIfToBooleanTrue), U8(27),
- B(LdaNamedProperty), R(4), U8(4), U8(12),
+ B(LdaNamedProperty), R(4), U8(4), U8(13),
B(Star), R(6),
B(LdaSmi), I8(2),
B(Star), R(5),
@@ -184,89 +183,85 @@ bytecodes: [
/* 54 E> */ B(StackCheck),
B(Mov), R(1), R(2),
/* 73 S> */ B(LdaZero),
- B(Star), R(10),
- B(Mov), R(1), R(11),
+ B(Star), R(9),
+ B(Mov), R(1), R(10),
B(Jump), U8(50),
B(Jump), U8(36),
- B(Star), R(14),
- B(Ldar), R(closure),
- B(CreateCatchContext), R(14), U8(5), U8(6),
B(Star), R(13),
- B(PushContext), R(9),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(13), U8(5), U8(6),
+ B(PushContext), R(13),
+ B(Star), R(12),
B(LdaSmi), I8(2),
- B(TestEqualStrict), R(5), U8(14),
+ B(TestEqualStrict), R(5), U8(15),
B(JumpIfFalse), U8(6),
B(LdaSmi), I8(1),
B(Star), R(5),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(14),
B(CallRuntime), U16(Runtime::kReThrow), R(14), U8(1),
- B(PopContext), R(9),
+ B(PopContext), R(13),
B(LdaSmi), I8(-1),
- B(Star), R(10),
+ B(Star), R(9),
B(Jump), U8(8),
- B(Star), R(11),
- B(LdaSmi), I8(1),
B(Star), R(10),
+ B(LdaSmi), I8(1),
+ B(Star), R(9),
B(LdaTheHole),
B(SetPendingMessage),
- B(Star), R(12),
+ B(Star), R(11),
B(LdaZero),
- B(TestEqualStrict), R(5), U8(15),
+ B(TestEqualStrict), R(5), U8(16),
B(JumpIfTrue), U8(104),
- B(LdaNamedProperty), R(3), U8(7), U8(16),
+ B(LdaNamedProperty), R(3), U8(7), U8(17),
B(Star), R(7),
B(TestUndetectable),
B(JumpIfFalse), U8(4),
B(Jump), U8(93),
B(LdaSmi), I8(1),
- B(TestEqualStrict), R(5), U8(19),
+ B(TestEqualStrict), R(5), U8(20),
B(JumpIfFalse), U8(61),
B(Ldar), R(7),
B(TestTypeOf), U8(5),
B(JumpIfFalse), U8(4),
B(Jump), U8(18),
- B(Wide), B(LdaSmi), I16(132),
- B(Star), R(13),
+ B(Wide), B(LdaSmi), I16(130),
+ B(Star), R(12),
B(LdaConstant), U8(8),
- B(Star), R(14),
- B(CallRuntime), U16(Runtime::kNewTypeError), R(13), U8(2),
+ B(Star), R(13),
+ B(CallRuntime), U16(Runtime::kNewTypeError), R(12), U8(2),
B(Throw),
- B(Mov), R(context), R(13),
- B(Mov), R(7), R(14),
- B(Mov), R(3), R(15),
- B(InvokeIntrinsic), U8(Runtime::k_Call), R(14), U8(2),
+ B(Mov), R(context), R(12),
+ B(Mov), R(7), R(13),
+ B(Mov), R(3), R(14),
+ B(InvokeIntrinsic), U8(Runtime::k_Call), R(13), U8(2),
B(Jump), U8(20),
- B(Star), R(14),
- B(Ldar), R(closure),
- B(CreateCatchContext), R(14), U8(5), U8(9),
B(Star), R(13),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(13), U8(5), U8(9),
+ B(Star), R(12),
B(LdaTheHole),
B(SetPendingMessage),
- B(Ldar), R(13),
- B(PushContext), R(9),
- B(PopContext), R(9),
+ B(Ldar), R(12),
+ B(PushContext), R(13),
+ B(PopContext), R(13),
B(Jump), U8(27),
- B(Mov), R(7), R(13),
- B(Mov), R(3), R(14),
- B(InvokeIntrinsic), U8(Runtime::k_Call), R(13), U8(2),
+ B(Mov), R(7), R(12),
+ B(Mov), R(3), R(13),
+ B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(2),
B(Star), R(8),
B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(8), U8(1),
B(JumpIfToBooleanFalse), U8(4),
B(Jump), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(8), U8(1),
- B(Ldar), R(12),
+ B(Ldar), R(11),
B(SetPendingMessage),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(10),
- B(JumpIfTrue), U8(10),
- B(LdaSmi), I8(1),
- B(TestEqualStrictNoFeedback), R(10),
- B(JumpIfTrue), U8(7),
+ B(Ldar), R(9),
+ B(SwitchOnSmiNoFeedback), U8(10), U8(2), I8(0),
B(Jump), U8(8),
- B(Ldar), R(11),
+ B(Ldar), R(10),
/* 85 S> */ B(Return),
- B(Ldar), R(11),
+ B(Ldar), R(10),
B(ReThrow),
B(LdaUndefined),
/* 85 S> */ B(Return),
@@ -282,6 +277,8 @@ constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
FIXED_ARRAY_TYPE,
+ Smi [6],
+ Smi [9],
]
handlers: [
[11, 127, 133],
@@ -296,34 +293,34 @@ snippet: "
if (x == 20) break;
}
"
-frame size: 15
+frame size: 14
parameter count: 1
-bytecode array length: 280
+bytecode array length: 278
bytecodes: [
/* 30 E> */ B(StackCheck),
B(LdaZero),
B(Star), R(4),
+ B(Mov), R(context), R(10),
B(Mov), R(context), R(11),
- B(Mov), R(context), R(12),
- /* 48 S> */ B(CreateArrayLiteral), U8(0), U8(2), U8(9),
+ /* 48 S> */ B(CreateArrayLiteral), U8(0), U8(3), U8(17),
+ B(Star), R(12),
+ B(LdaNamedProperty), R(12), U8(1), U8(4),
B(Star), R(13),
- B(LdaNamedProperty), R(13), U8(1), U8(3),
- B(Star), R(14),
- B(CallProperty0), R(14), R(13), U8(5),
+ B(CallProperty0), R(13), R(12), U8(6),
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
B(Star), R(2),
- /* 45 S> */ B(LdaNamedProperty), R(2), U8(2), U8(9),
- B(Star), R(13),
- /* 45 E> */ B(CallProperty0), R(13), R(2), U8(7),
+ /* 45 S> */ B(LdaNamedProperty), R(2), U8(2), U8(10),
+ B(Star), R(12),
+ /* 45 E> */ B(CallProperty0), R(12), R(2), U8(8),
B(Star), R(3),
/* 45 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(3), U8(1),
B(ToBooleanLogicalNot),
B(JumpIfFalse), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(3), U8(1),
- B(LdaNamedProperty), R(3), U8(3), U8(11),
+ B(LdaNamedProperty), R(3), U8(3), U8(12),
B(JumpIfToBooleanTrue), U8(43),
- B(LdaNamedProperty), R(3), U8(4), U8(13),
+ B(LdaNamedProperty), R(3), U8(4), U8(14),
B(Star), R(5),
B(LdaSmi), I8(2),
B(Star), R(4),
@@ -331,97 +328,96 @@ bytecodes: [
/* 34 E> */ B(StackCheck),
B(Mov), R(0), R(1),
/* 66 S> */ B(LdaSmi), I8(10),
- /* 72 E> */ B(TestEqual), R(1), U8(15),
+ /* 72 E> */ B(TestEqual), R(1), U8(16),
B(JumpIfFalse), U8(4),
/* 79 S> */ B(Jump), U8(14),
/* 91 S> */ B(LdaSmi), I8(20),
- /* 97 E> */ B(TestEqual), R(1), U8(16),
+ /* 97 E> */ B(TestEqual), R(1), U8(17),
B(JumpIfFalse), U8(4),
/* 104 S> */ B(Jump), U8(8),
B(LdaZero),
B(Star), R(4),
B(JumpLoop), U8(68), I8(0),
B(Jump), U8(36),
- B(Star), R(13),
- B(Ldar), R(closure),
- B(CreateCatchContext), R(13), U8(5), U8(6),
B(Star), R(12),
- B(PushContext), R(8),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(12), U8(5), U8(6),
+ B(PushContext), R(12),
+ B(Star), R(11),
B(LdaSmi), I8(2),
- B(TestEqualStrict), R(4), U8(17),
+ B(TestEqualStrict), R(4), U8(18),
B(JumpIfFalse), U8(6),
B(LdaSmi), I8(1),
B(Star), R(4),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(13),
B(CallRuntime), U16(Runtime::kReThrow), R(13), U8(1),
- B(PopContext), R(8),
+ B(PopContext), R(12),
B(LdaSmi), I8(-1),
- B(Star), R(9),
+ B(Star), R(8),
B(Jump), U8(7),
- B(Star), R(10),
- B(LdaZero),
B(Star), R(9),
+ B(LdaZero),
+ B(Star), R(8),
B(LdaTheHole),
B(SetPendingMessage),
- B(Star), R(11),
+ B(Star), R(10),
B(LdaZero),
- B(TestEqualStrict), R(4), U8(18),
+ B(TestEqualStrict), R(4), U8(19),
B(JumpIfTrue), U8(104),
- B(LdaNamedProperty), R(2), U8(7), U8(19),
+ B(LdaNamedProperty), R(2), U8(7), U8(20),
B(Star), R(6),
B(TestUndetectable),
B(JumpIfFalse), U8(4),
B(Jump), U8(93),
B(LdaSmi), I8(1),
- B(TestEqualStrict), R(4), U8(22),
+ B(TestEqualStrict), R(4), U8(23),
B(JumpIfFalse), U8(61),
B(Ldar), R(6),
B(TestTypeOf), U8(5),
B(JumpIfFalse), U8(4),
B(Jump), U8(18),
- B(Wide), B(LdaSmi), I16(132),
- B(Star), R(12),
+ B(Wide), B(LdaSmi), I16(130),
+ B(Star), R(11),
B(LdaConstant), U8(8),
- B(Star), R(13),
- B(CallRuntime), U16(Runtime::kNewTypeError), R(12), U8(2),
+ B(Star), R(12),
+ B(CallRuntime), U16(Runtime::kNewTypeError), R(11), U8(2),
B(Throw),
- B(Mov), R(context), R(12),
- B(Mov), R(6), R(13),
- B(Mov), R(2), R(14),
- B(InvokeIntrinsic), U8(Runtime::k_Call), R(13), U8(2),
+ B(Mov), R(context), R(11),
+ B(Mov), R(6), R(12),
+ B(Mov), R(2), R(13),
+ B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(2),
B(Jump), U8(20),
- B(Star), R(13),
- B(Ldar), R(closure),
- B(CreateCatchContext), R(13), U8(5), U8(9),
B(Star), R(12),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(12), U8(5), U8(9),
+ B(Star), R(11),
B(LdaTheHole),
B(SetPendingMessage),
- B(Ldar), R(12),
- B(PushContext), R(8),
- B(PopContext), R(8),
+ B(Ldar), R(11),
+ B(PushContext), R(12),
+ B(PopContext), R(12),
B(Jump), U8(27),
- B(Mov), R(6), R(12),
- B(Mov), R(2), R(13),
- B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(2),
+ B(Mov), R(6), R(11),
+ B(Mov), R(2), R(12),
+ B(InvokeIntrinsic), U8(Runtime::k_Call), R(11), U8(2),
B(Star), R(7),
B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(7), U8(1),
B(JumpIfToBooleanFalse), U8(4),
B(Jump), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(7), U8(1),
- B(Ldar), R(11),
+ B(Ldar), R(10),
B(SetPendingMessage),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(9),
- B(JumpIfTrue), U8(4),
- B(Jump), U8(5),
- B(Ldar), R(10),
+ B(TestEqualStrictNoFeedback), R(8),
+ B(JumpIfFalse), U8(5),
+ B(Ldar), R(9),
B(ReThrow),
B(LdaUndefined),
/* 113 S> */ B(Return),
]
constant pool: [
- CONSTANT_ELEMENTS_PAIR_TYPE,
+ TUPLE2_TYPE,
SYMBOL_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
@@ -443,135 +439,131 @@ snippet: "
var x = { 'a': 1, 'b': 2 };
for (x['a'] of [1,2,3]) { return x['a']; }
"
-frame size: 14
+frame size: 13
parameter count: 1
-bytecode array length: 286
+bytecode array length: 281
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(8),
- B(Mov), R(8), R(0),
+ /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(7),
+ B(Mov), R(7), R(0),
B(LdaZero),
B(Star), R(3),
+ B(Mov), R(context), R(9),
B(Mov), R(context), R(10),
- B(Mov), R(context), R(11),
- /* 77 S> */ B(CreateArrayLiteral), U8(1), U8(3), U8(9),
+ /* 77 S> */ B(CreateArrayLiteral), U8(1), U8(4), U8(17),
+ B(Star), R(11),
+ B(LdaNamedProperty), R(11), U8(2), U8(5),
B(Star), R(12),
- B(LdaNamedProperty), R(12), U8(2), U8(4),
- B(Star), R(13),
- B(CallProperty0), R(13), R(12), U8(6),
+ B(CallProperty0), R(12), R(11), U8(7),
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
B(Star), R(1),
- /* 74 S> */ B(LdaNamedProperty), R(1), U8(3), U8(10),
- B(Star), R(12),
- /* 74 E> */ B(CallProperty0), R(12), R(1), U8(8),
+ /* 74 S> */ B(LdaNamedProperty), R(1), U8(3), U8(11),
+ B(Star), R(11),
+ /* 74 E> */ B(CallProperty0), R(11), R(1), U8(9),
B(Star), R(2),
/* 74 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(2), U8(1),
B(ToBooleanLogicalNot),
B(JumpIfFalse), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(2), U8(1),
- B(LdaNamedProperty), R(2), U8(4), U8(12),
+ B(LdaNamedProperty), R(2), U8(4), U8(13),
B(JumpIfToBooleanTrue), U8(31),
- /* 67 E> */ B(LdaNamedProperty), R(2), U8(5), U8(14),
+ /* 67 E> */ B(LdaNamedProperty), R(2), U8(5), U8(15),
B(Star), R(4),
B(LdaSmi), I8(2),
B(Star), R(3),
B(Ldar), R(4),
- B(StaNamedPropertySloppy), R(0), U8(6), U8(16),
+ B(StaNamedPropertySloppy), R(0), U8(6), U8(17),
/* 62 E> */ B(StackCheck),
/* 88 S> */ B(Nop),
- /* 96 E> */ B(LdaNamedProperty), R(0), U8(6), U8(18),
- B(Star), R(9),
- B(LdaZero),
+ /* 96 E> */ B(LdaNamedProperty), R(0), U8(6), U8(19),
B(Star), R(8),
+ B(LdaZero),
+ B(Star), R(7),
B(Jump), U8(50),
B(Jump), U8(36),
- B(Star), R(12),
- B(Ldar), R(closure),
- B(CreateCatchContext), R(12), U8(7), U8(8),
B(Star), R(11),
- B(PushContext), R(7),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(11), U8(7), U8(8),
+ B(PushContext), R(11),
+ B(Star), R(10),
B(LdaSmi), I8(2),
- B(TestEqualStrict), R(3), U8(20),
+ B(TestEqualStrict), R(3), U8(21),
B(JumpIfFalse), U8(6),
B(LdaSmi), I8(1),
B(Star), R(3),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(12),
B(CallRuntime), U16(Runtime::kReThrow), R(12), U8(1),
- B(PopContext), R(7),
+ B(PopContext), R(11),
B(LdaSmi), I8(-1),
- B(Star), R(8),
+ B(Star), R(7),
B(Jump), U8(8),
- B(Star), R(9),
- B(LdaSmi), I8(1),
B(Star), R(8),
+ B(LdaSmi), I8(1),
+ B(Star), R(7),
B(LdaTheHole),
B(SetPendingMessage),
- B(Star), R(10),
+ B(Star), R(9),
B(LdaZero),
- B(TestEqualStrict), R(3), U8(21),
+ B(TestEqualStrict), R(3), U8(22),
B(JumpIfTrue), U8(104),
- B(LdaNamedProperty), R(1), U8(9), U8(22),
+ B(LdaNamedProperty), R(1), U8(9), U8(23),
B(Star), R(5),
B(TestUndetectable),
B(JumpIfFalse), U8(4),
B(Jump), U8(93),
B(LdaSmi), I8(1),
- B(TestEqualStrict), R(3), U8(25),
+ B(TestEqualStrict), R(3), U8(26),
B(JumpIfFalse), U8(61),
B(Ldar), R(5),
B(TestTypeOf), U8(5),
B(JumpIfFalse), U8(4),
B(Jump), U8(18),
- B(Wide), B(LdaSmi), I16(132),
- B(Star), R(11),
+ B(Wide), B(LdaSmi), I16(130),
+ B(Star), R(10),
B(LdaConstant), U8(10),
- B(Star), R(12),
- B(CallRuntime), U16(Runtime::kNewTypeError), R(11), U8(2),
+ B(Star), R(11),
+ B(CallRuntime), U16(Runtime::kNewTypeError), R(10), U8(2),
B(Throw),
- B(Mov), R(context), R(11),
- B(Mov), R(5), R(12),
- B(Mov), R(1), R(13),
- B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(2),
+ B(Mov), R(context), R(10),
+ B(Mov), R(5), R(11),
+ B(Mov), R(1), R(12),
+ B(InvokeIntrinsic), U8(Runtime::k_Call), R(11), U8(2),
B(Jump), U8(20),
- B(Star), R(12),
- B(Ldar), R(closure),
- B(CreateCatchContext), R(12), U8(7), U8(11),
B(Star), R(11),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(11), U8(7), U8(11),
+ B(Star), R(10),
B(LdaTheHole),
B(SetPendingMessage),
- B(Ldar), R(11),
- B(PushContext), R(7),
- B(PopContext), R(7),
+ B(Ldar), R(10),
+ B(PushContext), R(11),
+ B(PopContext), R(11),
B(Jump), U8(27),
- B(Mov), R(5), R(11),
- B(Mov), R(1), R(12),
- B(InvokeIntrinsic), U8(Runtime::k_Call), R(11), U8(2),
+ B(Mov), R(5), R(10),
+ B(Mov), R(1), R(11),
+ B(InvokeIntrinsic), U8(Runtime::k_Call), R(10), U8(2),
B(Star), R(6),
B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(6), U8(1),
B(JumpIfToBooleanFalse), U8(4),
B(Jump), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
- B(Ldar), R(10),
+ B(Ldar), R(9),
B(SetPendingMessage),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(8),
- B(JumpIfTrue), U8(10),
- B(LdaSmi), I8(1),
- B(TestEqualStrictNoFeedback), R(8),
- B(JumpIfTrue), U8(7),
+ B(Ldar), R(7),
+ B(SwitchOnSmiNoFeedback), U8(12), U8(2), I8(0),
B(Jump), U8(8),
- B(Ldar), R(9),
+ B(Ldar), R(8),
/* 105 S> */ B(Return),
- B(Ldar), R(9),
+ B(Ldar), R(8),
B(ReThrow),
B(LdaUndefined),
/* 105 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
- CONSTANT_ELEMENTS_PAIR_TYPE,
+ TUPLE2_TYPE,
SYMBOL_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
@@ -582,6 +574,8 @@ constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
FIXED_ARRAY_TYPE,
+ Smi [6],
+ Smi [9],
]
handlers: [
[15, 138, 144],
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/ForOfLoop.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/ForOfLoop.golden
new file mode 100644
index 0000000000..0b57c48309
--- /dev/null
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/ForOfLoop.golden
@@ -0,0 +1,1860 @@
+#
+# Autogenerated by generate-bytecode-expectations.
+#
+
+---
+wrap: no
+test function name: f
+
+---
+snippet: "
+ function f(arr) {
+ for (let x of arr) { let y = x; }
+ }
+ f([1, 2, 3]);
+"
+frame size: 16
+parameter count: 2
+bytecode array length: 260
+bytecodes: [
+ /* 10 E> */ B(StackCheck),
+ B(LdaZero),
+ B(Star), R(6),
+ B(Mov), R(context), R(12),
+ B(Mov), R(context), R(13),
+ /* 34 S> */ B(LdaNamedProperty), R(arg0), U8(0), U8(3),
+ B(Star), R(15),
+ B(CallProperty0), R(15), R(arg0), U8(5),
+ B(Mov), R(arg0), R(14),
+ B(JumpIfJSReceiver), U8(7),
+ B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
+ B(Star), R(4),
+ /* 31 S> */ B(LdaNamedProperty), R(4), U8(1), U8(9),
+ B(Star), R(14),
+ /* 31 E> */ B(CallProperty0), R(14), R(4), U8(7),
+ B(Star), R(5),
+ /* 31 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(5), U8(1),
+ B(ToBooleanLogicalNot),
+ B(JumpIfFalse), U8(7),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
+ B(LdaNamedProperty), R(5), U8(2), U8(11),
+ B(JumpIfToBooleanTrue), U8(28),
+ B(LdaNamedProperty), R(5), U8(3), U8(13),
+ B(Star), R(7),
+ B(LdaSmi), I8(2),
+ B(Star), R(6),
+ B(Mov), R(7), R(3),
+ /* 20 E> */ B(StackCheck),
+ B(Mov), R(3), R(1),
+ /* 49 S> */ B(Mov), R(1), R(0),
+ B(LdaZero),
+ B(Star), R(6),
+ B(JumpLoop), U8(53), I8(0),
+ B(Jump), U8(36),
+ B(Star), R(14),
+ B(Ldar), R(closure),
+ /* 49 E> */ B(CreateCatchContext), R(14), U8(4), U8(5),
+ B(PushContext), R(14),
+ B(Star), R(13),
+ B(LdaSmi), I8(2),
+ B(TestEqualStrict), R(6), U8(15),
+ B(JumpIfFalse), U8(6),
+ B(LdaSmi), I8(1),
+ B(Star), R(6),
+ B(LdaImmutableCurrentContextSlot), U8(4),
+ B(Star), R(15),
+ B(CallRuntime), U16(Runtime::kReThrow), R(15), U8(1),
+ B(PopContext), R(14),
+ B(LdaSmi), I8(-1),
+ B(Star), R(10),
+ B(Jump), U8(7),
+ B(Star), R(11),
+ B(LdaZero),
+ B(Star), R(10),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Star), R(12),
+ B(LdaZero),
+ B(TestEqualStrict), R(6), U8(16),
+ B(JumpIfTrue), U8(104),
+ B(LdaNamedProperty), R(4), U8(6), U8(17),
+ B(Star), R(8),
+ B(TestUndetectable),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(93),
+ B(LdaSmi), I8(1),
+ B(TestEqualStrict), R(6), U8(20),
+ B(JumpIfFalse), U8(61),
+ B(Ldar), R(8),
+ B(TestTypeOf), U8(5),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(18),
+ B(Wide), B(LdaSmi), I16(130),
+ B(Star), R(13),
+ B(LdaConstant), U8(7),
+ B(Star), R(14),
+ B(CallRuntime), U16(Runtime::kNewTypeError), R(13), U8(2),
+ B(Throw),
+ B(Mov), R(context), R(13),
+ B(Mov), R(8), R(14),
+ B(Mov), R(4), R(15),
+ B(InvokeIntrinsic), U8(Runtime::k_Call), R(14), U8(2),
+ B(Jump), U8(20),
+ B(Star), R(14),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(14), U8(4), U8(8),
+ B(Star), R(13),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Ldar), R(13),
+ B(PushContext), R(14),
+ B(PopContext), R(14),
+ B(Jump), U8(27),
+ B(Mov), R(8), R(13),
+ B(Mov), R(4), R(14),
+ B(InvokeIntrinsic), U8(Runtime::k_Call), R(13), U8(2),
+ B(Star), R(9),
+ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(9), U8(1),
+ B(JumpIfToBooleanFalse), U8(4),
+ B(Jump), U8(7),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(9), U8(1),
+ B(Ldar), R(12),
+ B(SetPendingMessage),
+ B(LdaZero),
+ B(TestEqualStrictNoFeedback), R(10),
+ B(JumpIfFalse), U8(5),
+ B(Ldar), R(11),
+ B(ReThrow),
+ B(LdaUndefined),
+ /* 54 S> */ B(Return),
+]
+constant pool: [
+ SYMBOL_TYPE,
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
+ FIXED_ARRAY_TYPE,
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
+ FIXED_ARRAY_TYPE,
+]
+handlers: [
+ [7, 124, 130],
+ [10, 88, 90],
+ [190, 200, 202],
+]
+
+---
+snippet: "
+ function f(arr) {
+ for (let x of arr) { eval('1'); }
+ }
+ f([1, 2, 3]);
+"
+frame size: 22
+parameter count: 2
+bytecode array length: 345
+bytecodes: [
+ B(CreateFunctionContext), U8(4),
+ B(PushContext), R(7),
+ B(Ldar), R(this),
+ B(StaCurrentContextSlot), U8(5),
+ B(Ldar), R(arg0),
+ B(StaCurrentContextSlot), U8(4),
+ B(CreateMappedArguments),
+ B(StaCurrentContextSlot), U8(7),
+ B(Ldar), R(new_target),
+ B(StaCurrentContextSlot), U8(6),
+ /* 10 E> */ B(StackCheck),
+ B(Ldar), R(closure),
+ B(CreateBlockContext), U8(0),
+ B(PushContext), R(8),
+ B(LdaTheHole),
+ B(StaCurrentContextSlot), U8(4),
+ B(LdaZero),
+ B(Star), R(3),
+ B(Mov), R(context), R(11),
+ B(Mov), R(context), R(12),
+ /* 34 S> */ B(LdaContextSlot), R(8), U8(4), U8(0),
+ B(Star), R(13),
+ B(LdaNamedProperty), R(13), U8(1), U8(3),
+ B(Star), R(14),
+ B(CallProperty0), R(14), R(13), U8(5),
+ B(JumpIfJSReceiver), U8(7),
+ B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
+ B(Star), R(1),
+ /* 31 S> */ B(LdaNamedProperty), R(1), U8(2), U8(9),
+ B(Star), R(13),
+ /* 31 E> */ B(CallProperty0), R(13), R(1), U8(7),
+ B(Star), R(2),
+ /* 31 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(2), U8(1),
+ B(ToBooleanLogicalNot),
+ B(JumpIfFalse), U8(7),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(2), U8(1),
+ B(LdaNamedProperty), R(2), U8(3), U8(11),
+ B(JumpIfToBooleanTrue), U8(78),
+ B(LdaNamedProperty), R(2), U8(4), U8(13),
+ B(Star), R(4),
+ B(LdaSmi), I8(2),
+ B(Star), R(3),
+ B(Mov), R(4), R(0),
+ /* 20 E> */ B(StackCheck),
+ B(Ldar), R(closure),
+ B(CreateBlockContext), U8(5),
+ B(PushContext), R(13),
+ B(LdaTheHole),
+ B(StaCurrentContextSlot), U8(4),
+ B(Ldar), R(4),
+ B(StaCurrentContextSlot), U8(4),
+ /* 41 S> */ B(LdaLookupGlobalSlot), U8(6), U8(17), U8(1),
+ B(Star), R(14),
+ B(LdaConstant), U8(7),
+ B(Star), R(15),
+ B(LdaZero),
+ B(Star), R(19),
+ B(LdaSmi), I8(37),
+ B(Star), R(20),
+ B(LdaSmi), I8(41),
+ B(Star), R(21),
+ B(Mov), R(14), R(16),
+ B(Mov), R(15), R(17),
+ B(Mov), R(closure), R(18),
+ B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(16), U8(6),
+ B(Star), R(14),
+ /* 41 E> */ B(CallUndefinedReceiver1), R(14), R(15), U8(15),
+ B(PopContext), R(13),
+ B(LdaZero),
+ B(Star), R(3),
+ B(JumpLoop), U8(103), I8(0),
+ B(Jump), U8(36),
+ B(Star), R(13),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(13), U8(8), U8(9),
+ B(PushContext), R(13),
+ B(Star), R(12),
+ B(LdaSmi), I8(2),
+ B(TestEqualStrict), R(3), U8(19),
+ B(JumpIfFalse), U8(6),
+ B(LdaSmi), I8(1),
+ B(Star), R(3),
+ B(LdaImmutableCurrentContextSlot), U8(4),
+ B(Star), R(14),
+ B(CallRuntime), U16(Runtime::kReThrow), R(14), U8(1),
+ B(PopContext), R(13),
+ B(LdaSmi), I8(-1),
+ B(Star), R(9),
+ B(Jump), U8(7),
+ B(Star), R(10),
+ B(LdaZero),
+ B(Star), R(9),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Star), R(11),
+ B(LdaZero),
+ B(TestEqualStrict), R(3), U8(20),
+ B(JumpIfTrue), U8(104),
+ B(LdaNamedProperty), R(1), U8(10), U8(21),
+ B(Star), R(5),
+ B(TestUndetectable),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(93),
+ B(LdaSmi), I8(1),
+ B(TestEqualStrict), R(3), U8(24),
+ B(JumpIfFalse), U8(61),
+ B(Ldar), R(5),
+ B(TestTypeOf), U8(5),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(18),
+ B(Wide), B(LdaSmi), I16(130),
+ B(Star), R(12),
+ B(LdaConstant), U8(11),
+ B(Star), R(13),
+ B(CallRuntime), U16(Runtime::kNewTypeError), R(12), U8(2),
+ B(Throw),
+ B(Mov), R(context), R(12),
+ B(Mov), R(5), R(13),
+ B(Mov), R(1), R(14),
+ B(InvokeIntrinsic), U8(Runtime::k_Call), R(13), U8(2),
+ B(Jump), U8(20),
+ B(Star), R(13),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(13), U8(8), U8(12),
+ B(Star), R(12),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Ldar), R(12),
+ B(PushContext), R(13),
+ B(PopContext), R(13),
+ B(Jump), U8(27),
+ B(Mov), R(5), R(12),
+ B(Mov), R(1), R(13),
+ B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(2),
+ B(Star), R(6),
+ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(6), U8(1),
+ B(JumpIfToBooleanFalse), U8(4),
+ B(Jump), U8(7),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
+ B(Ldar), R(11),
+ B(SetPendingMessage),
+ B(LdaZero),
+ B(TestEqualStrictNoFeedback), R(9),
+ B(JumpIfFalse), U8(7),
+ B(PopContext), R(7),
+ B(Ldar), R(10),
+ B(ReThrow),
+ B(PopContext), R(8),
+ B(LdaUndefined),
+ /* 54 S> */ B(Return),
+]
+constant pool: [
+ FIXED_ARRAY_TYPE,
+ SYMBOL_TYPE,
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
+ FIXED_ARRAY_TYPE,
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["eval"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["1"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
+ FIXED_ARRAY_TYPE,
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
+ FIXED_ARRAY_TYPE,
+]
+handlers: [
+ [35, 205, 211],
+ [38, 169, 171],
+ [271, 281, 283],
+]
+
+---
+snippet: "
+ function f(arr) {
+ for (let x of arr) { (function() { return x; })(); }
+ }
+ f([1, 2, 3]);
+"
+frame size: 14
+parameter count: 2
+bytecode array length: 278
+bytecodes: [
+ /* 10 E> */ B(StackCheck),
+ B(LdaZero),
+ B(Star), R(4),
+ B(Mov), R(context), R(10),
+ B(Mov), R(context), R(11),
+ /* 34 S> */ B(LdaNamedProperty), R(arg0), U8(0), U8(3),
+ B(Star), R(13),
+ B(CallProperty0), R(13), R(arg0), U8(5),
+ B(Mov), R(arg0), R(12),
+ B(JumpIfJSReceiver), U8(7),
+ B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
+ B(Star), R(2),
+ /* 31 S> */ B(LdaNamedProperty), R(2), U8(1), U8(9),
+ B(Star), R(12),
+ /* 31 E> */ B(CallProperty0), R(12), R(2), U8(7),
+ B(Star), R(3),
+ /* 31 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(3), U8(1),
+ B(ToBooleanLogicalNot),
+ B(JumpIfFalse), U8(7),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(3), U8(1),
+ B(LdaNamedProperty), R(3), U8(2), U8(11),
+ B(JumpIfToBooleanTrue), U8(46),
+ B(LdaNamedProperty), R(3), U8(3), U8(13),
+ B(Star), R(5),
+ B(LdaSmi), I8(2),
+ B(Star), R(4),
+ B(Mov), R(5), R(1),
+ /* 20 E> */ B(StackCheck),
+ B(Ldar), R(closure),
+ B(CreateBlockContext), U8(4),
+ B(PushContext), R(12),
+ B(LdaTheHole),
+ B(StaCurrentContextSlot), U8(4),
+ B(Ldar), R(5),
+ B(StaCurrentContextSlot), U8(4),
+ /* 41 S> */ B(CreateClosure), U8(5), U8(17), U8(2),
+ B(Star), R(13),
+ /* 67 E> */ B(CallUndefinedReceiver0), R(13), U8(15),
+ B(PopContext), R(12),
+ B(LdaZero),
+ B(Star), R(4),
+ B(JumpLoop), U8(71), I8(0),
+ B(Jump), U8(36),
+ B(Star), R(12),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(12), U8(6), U8(7),
+ B(PushContext), R(12),
+ B(Star), R(11),
+ B(LdaSmi), I8(2),
+ B(TestEqualStrict), R(4), U8(18),
+ B(JumpIfFalse), U8(6),
+ B(LdaSmi), I8(1),
+ B(Star), R(4),
+ B(LdaImmutableCurrentContextSlot), U8(4),
+ B(Star), R(13),
+ B(CallRuntime), U16(Runtime::kReThrow), R(13), U8(1),
+ B(PopContext), R(12),
+ B(LdaSmi), I8(-1),
+ B(Star), R(8),
+ B(Jump), U8(7),
+ B(Star), R(9),
+ B(LdaZero),
+ B(Star), R(8),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Star), R(10),
+ B(LdaZero),
+ B(TestEqualStrict), R(4), U8(19),
+ B(JumpIfTrue), U8(104),
+ B(LdaNamedProperty), R(2), U8(8), U8(20),
+ B(Star), R(6),
+ B(TestUndetectable),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(93),
+ B(LdaSmi), I8(1),
+ B(TestEqualStrict), R(4), U8(23),
+ B(JumpIfFalse), U8(61),
+ B(Ldar), R(6),
+ B(TestTypeOf), U8(5),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(18),
+ B(Wide), B(LdaSmi), I16(130),
+ B(Star), R(11),
+ B(LdaConstant), U8(9),
+ B(Star), R(12),
+ B(CallRuntime), U16(Runtime::kNewTypeError), R(11), U8(2),
+ B(Throw),
+ B(Mov), R(context), R(11),
+ B(Mov), R(6), R(12),
+ B(Mov), R(2), R(13),
+ B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(2),
+ B(Jump), U8(20),
+ B(Star), R(12),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(12), U8(6), U8(10),
+ B(Star), R(11),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Ldar), R(11),
+ B(PushContext), R(12),
+ B(PopContext), R(12),
+ B(Jump), U8(27),
+ B(Mov), R(6), R(11),
+ B(Mov), R(2), R(12),
+ B(InvokeIntrinsic), U8(Runtime::k_Call), R(11), U8(2),
+ B(Star), R(7),
+ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(7), U8(1),
+ B(JumpIfToBooleanFalse), U8(4),
+ B(Jump), U8(7),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(7), U8(1),
+ B(Ldar), R(10),
+ B(SetPendingMessage),
+ B(LdaZero),
+ B(TestEqualStrictNoFeedback), R(8),
+ B(JumpIfFalse), U8(5),
+ B(Ldar), R(9),
+ B(ReThrow),
+ B(LdaUndefined),
+ /* 73 S> */ B(Return),
+]
+constant pool: [
+ SYMBOL_TYPE,
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
+ FIXED_ARRAY_TYPE,
+ SHARED_FUNCTION_INFO_TYPE,
+ ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
+ FIXED_ARRAY_TYPE,
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
+ FIXED_ARRAY_TYPE,
+]
+handlers: [
+ [7, 142, 148],
+ [10, 106, 108],
+ [208, 218, 220],
+]
+
+---
+snippet: "
+ function f(arr) {
+ for (let { x, y } of arr) { let z = x + y; }
+ }
+ f([{ x: 0, y: 3 }, { x: 1, y: 9 }, { x: -12, y: 17 }]);
+"
+frame size: 19
+parameter count: 2
+bytecode array length: 298
+bytecodes: [
+ /* 10 E> */ B(StackCheck),
+ B(LdaZero),
+ B(Star), R(9),
+ B(Mov), R(context), R(15),
+ B(Mov), R(context), R(16),
+ /* 41 S> */ B(LdaNamedProperty), R(arg0), U8(0), U8(3),
+ B(Star), R(18),
+ B(CallProperty0), R(18), R(arg0), U8(5),
+ B(Mov), R(arg0), R(17),
+ B(JumpIfJSReceiver), U8(7),
+ B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
+ B(Star), R(7),
+ /* 38 S> */ B(LdaNamedProperty), R(7), U8(1), U8(9),
+ B(Star), R(17),
+ /* 38 E> */ B(CallProperty0), R(17), R(7), U8(7),
+ B(Star), R(8),
+ /* 38 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(8), U8(1),
+ B(ToBooleanLogicalNot),
+ B(JumpIfFalse), U8(7),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(8), U8(1),
+ B(LdaNamedProperty), R(8), U8(2), U8(11),
+ B(JumpIfToBooleanTrue), U8(66),
+ B(LdaNamedProperty), R(8), U8(3), U8(13),
+ B(Star), R(10),
+ B(LdaSmi), I8(2),
+ B(Star), R(9),
+ B(Mov), R(10), R(5),
+ /* 20 E> */ B(StackCheck),
+ B(Mov), R(5), R(6),
+ B(Ldar), R(5),
+ B(JumpIfUndefined), U8(6),
+ B(Ldar), R(6),
+ B(JumpIfNotNull), U8(16),
+ B(LdaSmi), I8(61),
+ B(Star), R(17),
+ B(LdaConstant), U8(4),
+ B(Star), R(18),
+ B(CallRuntime), U16(Runtime::kNewTypeError), R(17), U8(2),
+ B(Throw),
+ /* 31 S> */ B(LdaNamedProperty), R(6), U8(5), U8(17),
+ B(Star), R(1),
+ /* 34 S> */ B(LdaNamedProperty), R(6), U8(6), U8(19),
+ B(Star), R(2),
+ /* 58 S> */ B(Ldar), R(2),
+ /* 58 E> */ B(Add), R(1), U8(21),
+ B(Star), R(0),
+ B(LdaZero),
+ B(Star), R(9),
+ B(JumpLoop), U8(91), I8(0),
+ B(Jump), U8(36),
+ B(Star), R(17),
+ B(Ldar), R(closure),
+ /* 58 E> */ B(CreateCatchContext), R(17), U8(7), U8(8),
+ B(PushContext), R(17),
+ B(Star), R(16),
+ B(LdaSmi), I8(2),
+ B(TestEqualStrict), R(9), U8(22),
+ B(JumpIfFalse), U8(6),
+ B(LdaSmi), I8(1),
+ B(Star), R(9),
+ B(LdaImmutableCurrentContextSlot), U8(4),
+ B(Star), R(18),
+ B(CallRuntime), U16(Runtime::kReThrow), R(18), U8(1),
+ B(PopContext), R(17),
+ B(LdaSmi), I8(-1),
+ B(Star), R(13),
+ B(Jump), U8(7),
+ B(Star), R(14),
+ B(LdaZero),
+ B(Star), R(13),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Star), R(15),
+ B(LdaZero),
+ B(TestEqualStrict), R(9), U8(23),
+ B(JumpIfTrue), U8(104),
+ B(LdaNamedProperty), R(7), U8(9), U8(24),
+ B(Star), R(11),
+ B(TestUndetectable),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(93),
+ B(LdaSmi), I8(1),
+ B(TestEqualStrict), R(9), U8(27),
+ B(JumpIfFalse), U8(61),
+ B(Ldar), R(11),
+ B(TestTypeOf), U8(5),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(18),
+ B(Wide), B(LdaSmi), I16(130),
+ B(Star), R(16),
+ B(LdaConstant), U8(4),
+ B(Star), R(17),
+ B(CallRuntime), U16(Runtime::kNewTypeError), R(16), U8(2),
+ B(Throw),
+ B(Mov), R(context), R(16),
+ B(Mov), R(11), R(17),
+ B(Mov), R(7), R(18),
+ B(InvokeIntrinsic), U8(Runtime::k_Call), R(17), U8(2),
+ B(Jump), U8(20),
+ B(Star), R(17),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(17), U8(7), U8(10),
+ B(Star), R(16),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Ldar), R(16),
+ B(PushContext), R(17),
+ B(PopContext), R(17),
+ B(Jump), U8(27),
+ B(Mov), R(11), R(16),
+ B(Mov), R(7), R(17),
+ B(InvokeIntrinsic), U8(Runtime::k_Call), R(16), U8(2),
+ B(Star), R(12),
+ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(12), U8(1),
+ B(JumpIfToBooleanFalse), U8(4),
+ B(Jump), U8(7),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
+ B(Ldar), R(15),
+ B(SetPendingMessage),
+ B(LdaZero),
+ B(TestEqualStrictNoFeedback), R(13),
+ B(JumpIfFalse), U8(5),
+ B(Ldar), R(14),
+ B(ReThrow),
+ B(LdaUndefined),
+ /* 65 S> */ B(Return),
+]
+constant pool: [
+ SYMBOL_TYPE,
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["y"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
+ FIXED_ARRAY_TYPE,
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
+ FIXED_ARRAY_TYPE,
+]
+handlers: [
+ [7, 162, 168],
+ [10, 126, 128],
+ [228, 238, 240],
+]
+
+---
+snippet: "
+ function* f(arr) {
+ for (let x of arr) { let y = x; }
+ }
+ f([1, 2, 3]);
+"
+frame size: 13
+parameter count: 2
+bytecode array length: 589
+bytecodes: [
+ B(Ldar), R(new_target),
+ B(JumpIfUndefined), U8(25),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
+ B(PushContext), R(1),
+ B(ResumeGenerator), R(new_target),
+ B(Star), R(0),
+ B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
+ B(LdaSmi), I8(79),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
+ B(LdaSmi), I8(-2),
+ B(Star), R(0),
+ B(CreateFunctionContext), U8(9),
+ B(PushContext), R(2),
+ B(Ldar), R(arg0),
+ B(StaCurrentContextSlot), U8(4),
+ B(Mov), R(closure), R(3),
+ B(Mov), R(this), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
+ B(StaCurrentContextSlot), U8(5),
+ /* 11 E> */ B(StackCheck),
+ B(Mov), R(context), R(5),
+ B(LdaImmutableCurrentContextSlot), U8(5),
+ B(Star), R(6),
+ B(LdaImmutableCurrentContextSlot), U8(5),
+ B(Star), R(7),
+ B(LdaZero),
+ /* 11 E> */ B(SuspendGenerator), R(6), U8(0),
+ B(Ldar), R(7),
+ /* 55 S> */ B(Return),
+ B(LdaSmi), I8(-2),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(6), U8(1),
+ B(Star), R(7),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(6), U8(1),
+ B(Star), R(8),
+ B(LdaZero),
+ B(TestEqualStrictNoFeedback), R(8),
+ B(JumpIfTrue), U8(28),
+ B(LdaSmi), I8(2),
+ B(TestEqualStrictNoFeedback), R(8),
+ B(JumpIfTrue), U8(19),
+ B(LdaTrue),
+ B(Star), R(10),
+ B(Mov), R(7), R(9),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(9), U8(2),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
+ B(JumpConstant), U8(13),
+ B(Ldar), R(7),
+ /* 11 E> */ B(Throw),
+ B(Ldar), R(closure),
+ B(CreateBlockContext), U8(1),
+ B(PushContext), R(6),
+ B(LdaTheHole),
+ B(StaCurrentContextSlot), U8(4),
+ B(LdaZero),
+ B(StaContextSlot), R(6), U8(9), U8(0),
+ B(Mov), R(context), R(9),
+ B(Mov), R(context), R(10),
+ /* 35 S> */ B(LdaImmutableContextSlot), R(6), U8(4), U8(0),
+ B(Star), R(11),
+ B(LdaNamedProperty), R(11), U8(2), U8(3),
+ B(Star), R(12),
+ B(CallProperty0), R(12), R(11), U8(5),
+ B(JumpIfJSReceiver), U8(7),
+ B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
+ /* 35 E> */ B(StaContextSlot), R(6), U8(7), U8(0),
+ /* 32 S> */ B(LdaContextSlot), R(6), U8(7), U8(0),
+ B(Star), R(12),
+ B(LdaNamedProperty), R(12), U8(3), U8(9),
+ B(Star), R(11),
+ /* 32 E> */ B(CallProperty0), R(11), R(12), U8(7),
+ /* 32 E> */ B(StaContextSlot), R(6), U8(8), U8(0),
+ B(Star), R(11),
+ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(11), U8(1),
+ B(ToBooleanLogicalNot),
+ B(JumpIfFalse), U8(13),
+ B(LdaContextSlot), R(6), U8(8), U8(0),
+ B(Star), R(11),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
+ B(LdaContextSlot), R(6), U8(8), U8(0),
+ B(Star), R(11),
+ B(LdaNamedProperty), R(11), U8(4), U8(11),
+ B(JumpIfToBooleanTrue), U8(73),
+ B(LdaContextSlot), R(6), U8(8), U8(0),
+ B(Star), R(11),
+ B(LdaNamedProperty), R(11), U8(5), U8(13),
+ B(StaContextSlot), R(6), U8(10), U8(0),
+ B(LdaSmi), I8(2),
+ B(StaContextSlot), R(6), U8(9), U8(0),
+ B(LdaContextSlot), R(6), U8(10), U8(0),
+ B(StaContextSlot), R(6), U8(6), U8(0),
+ /* 21 E> */ B(StackCheck),
+ B(Ldar), R(closure),
+ B(CreateBlockContext), U8(6),
+ B(PushContext), R(11),
+ B(LdaTheHole),
+ B(StaCurrentContextSlot), U8(4),
+ B(LdaContextSlot), R(6), U8(6), U8(0),
+ B(StaCurrentContextSlot), U8(4),
+ B(Ldar), R(closure),
+ B(CreateBlockContext), U8(7),
+ B(PushContext), R(12),
+ B(LdaTheHole),
+ B(StaCurrentContextSlot), U8(4),
+ /* 50 S> */ B(LdaImmutableContextSlot), R(12), U8(4), U8(0),
+ /* 50 E> */ B(StaCurrentContextSlot), U8(4),
+ B(PopContext), R(12),
+ B(PopContext), R(11),
+ B(LdaZero),
+ B(StaContextSlot), R(6), U8(9), U8(0),
+ B(JumpLoop), U8(120), I8(0),
+ B(Jump), U8(44),
+ B(Star), R(11),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(11), U8(8), U8(9),
+ B(PushContext), R(11),
+ B(Star), R(10),
+ B(LdaContextSlot), R(6), U8(9), U8(0),
+ B(Star), R(12),
+ B(LdaSmi), I8(2),
+ B(TestEqualStrict), R(12), U8(15),
+ B(JumpIfFalse), U8(8),
+ B(LdaSmi), I8(1),
+ B(StaContextSlot), R(6), U8(9), U8(0),
+ B(LdaImmutableCurrentContextSlot), U8(4),
+ B(Star), R(12),
+ B(CallRuntime), U16(Runtime::kReThrow), R(12), U8(1),
+ B(PopContext), R(11),
+ B(LdaSmi), I8(-1),
+ B(Star), R(7),
+ B(Jump), U8(7),
+ B(Star), R(8),
+ B(LdaZero),
+ B(Star), R(7),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Star), R(9),
+ B(LdaContextSlot), R(6), U8(9), U8(0),
+ B(Star), R(10),
+ B(LdaZero),
+ B(TestEqualStrict), R(10), U8(16),
+ B(JumpIfTrue), U8(150),
+ B(LdaContextSlot), R(6), U8(7), U8(0),
+ B(Star), R(10),
+ B(LdaNamedProperty), R(10), U8(10), U8(17),
+ B(StaContextSlot), R(6), U8(11), U8(0),
+ B(LdaContextSlot), R(6), U8(11), U8(0),
+ B(TestUndetectable),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(127),
+ B(LdaContextSlot), R(6), U8(9), U8(0),
+ B(Star), R(10),
+ B(LdaSmi), I8(1),
+ B(TestEqualStrict), R(10), U8(20),
+ B(JumpIfFalse), U8(69),
+ B(LdaContextSlot), R(6), U8(11), U8(0),
+ B(TestTypeOf), U8(5),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(18),
+ B(Wide), B(LdaSmi), I16(130),
+ B(Star), R(10),
+ B(LdaConstant), U8(11),
+ B(Star), R(11),
+ B(CallRuntime), U16(Runtime::kNewTypeError), R(10), U8(2),
+ B(Throw),
+ B(Mov), R(context), R(10),
+ B(LdaContextSlot), R(6), U8(11), U8(0),
+ B(Star), R(11),
+ B(LdaContextSlot), R(6), U8(7), U8(0),
+ B(Star), R(12),
+ B(InvokeIntrinsic), U8(Runtime::k_Call), R(11), U8(2),
+ B(Jump), U8(20),
+ B(Star), R(11),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(11), U8(8), U8(12),
+ B(Star), R(10),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Ldar), R(10),
+ B(PushContext), R(11),
+ B(PopContext), R(11),
+ B(Jump), U8(47),
+ B(LdaContextSlot), R(6), U8(11), U8(0),
+ B(Star), R(10),
+ B(LdaContextSlot), R(6), U8(7), U8(0),
+ B(Star), R(11),
+ B(InvokeIntrinsic), U8(Runtime::k_Call), R(10), U8(2),
+ B(StaContextSlot), R(6), U8(12), U8(0),
+ B(LdaContextSlot), R(6), U8(12), U8(0),
+ B(Star), R(10),
+ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(10), U8(1),
+ B(JumpIfToBooleanFalse), U8(4),
+ B(Jump), U8(13),
+ B(LdaContextSlot), R(6), U8(12), U8(0),
+ B(Star), R(10),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
+ B(Ldar), R(9),
+ B(SetPendingMessage),
+ B(LdaZero),
+ B(TestEqualStrictNoFeedback), R(7),
+ B(JumpIfFalse), U8(15),
+ B(PopContext), R(6),
+ B(PopContext), R(6),
+ B(LdaSmi), I8(1),
+ B(Star), R(3),
+ B(Mov), R(8), R(4),
+ B(Jump), U8(33),
+ B(PopContext), R(6),
+ B(LdaUndefined),
+ B(Star), R(6),
+ B(LdaTrue),
+ B(Star), R(7),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
+ B(Jump), U8(14),
+ B(LdaSmi), I8(-1),
+ B(Star), R(3),
+ B(Jump), U8(8),
+ B(Star), R(4),
+ B(LdaSmi), I8(1),
+ B(Star), R(3),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Star), R(5),
+ B(LdaImmutableCurrentContextSlot), U8(5),
+ B(Star), R(6),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(6), U8(1),
+ B(Ldar), R(5),
+ B(SetPendingMessage),
+ B(Ldar), R(3),
+ B(SwitchOnSmiNoFeedback), U8(14), U8(2), I8(0),
+ B(Jump), U8(8),
+ B(Ldar), R(4),
+ /* 55 S> */ B(Return),
+ B(Ldar), R(4),
+ B(ReThrow),
+ B(LdaUndefined),
+ /* 55 S> */ B(Return),
+]
+constant pool: [
+ Smi [56],
+ FIXED_ARRAY_TYPE,
+ SYMBOL_TYPE,
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
+ FIXED_ARRAY_TYPE,
+ FIXED_ARRAY_TYPE,
+ ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
+ FIXED_ARRAY_TYPE,
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
+ FIXED_ARRAY_TYPE,
+ Smi [446],
+ Smi [6],
+ Smi [9],
+]
+handlers: [
+ [55, 546, 552],
+ [134, 331, 337],
+ [137, 287, 289],
+ [423, 439, 441],
+]
+
+---
+snippet: "
+ function* f(arr) {
+ for (let x of arr) yield x;
+ }
+ f([1, 2, 3]);
+"
+frame size: 17
+parameter count: 2
+bytecode array length: 695
+bytecodes: [
+ B(Ldar), R(new_target),
+ B(JumpIfUndefined), U8(25),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
+ B(PushContext), R(1),
+ B(ResumeGenerator), R(new_target),
+ B(Star), R(0),
+ B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0),
+ B(LdaSmi), I8(79),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
+ B(LdaSmi), I8(-2),
+ B(Star), R(0),
+ B(CreateFunctionContext), U8(9),
+ B(PushContext), R(2),
+ B(Ldar), R(arg0),
+ B(StaCurrentContextSlot), U8(4),
+ B(Mov), R(closure), R(3),
+ B(Mov), R(this), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
+ B(StaCurrentContextSlot), U8(5),
+ /* 11 E> */ B(StackCheck),
+ B(Mov), R(context), R(5),
+ B(LdaImmutableCurrentContextSlot), U8(5),
+ B(Star), R(6),
+ B(LdaImmutableCurrentContextSlot), U8(5),
+ B(Star), R(7),
+ B(LdaZero),
+ /* 11 E> */ B(SuspendGenerator), R(6), U8(0),
+ B(Ldar), R(7),
+ /* 49 S> */ B(Return),
+ B(LdaSmi), I8(-2),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(6), U8(1),
+ B(Star), R(7),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(6), U8(1),
+ B(Star), R(8),
+ B(LdaZero),
+ B(TestEqualStrictNoFeedback), R(8),
+ B(JumpIfTrue), U8(28),
+ B(LdaSmi), I8(2),
+ B(TestEqualStrictNoFeedback), R(8),
+ B(JumpIfTrue), U8(19),
+ B(LdaTrue),
+ B(Star), R(10),
+ B(Mov), R(7), R(9),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(9), U8(2),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
+ B(JumpConstant), U8(16),
+ B(Ldar), R(7),
+ /* 11 E> */ B(Throw),
+ B(Ldar), R(closure),
+ B(CreateBlockContext), U8(2),
+ B(PushContext), R(6),
+ B(LdaTheHole),
+ B(StaCurrentContextSlot), U8(4),
+ B(LdaZero),
+ B(StaContextSlot), R(6), U8(9), U8(0),
+ B(Mov), R(context), R(9),
+ B(Mov), R(context), R(10),
+ /* 35 S> */ B(LdaImmutableContextSlot), R(6), U8(4), U8(0),
+ B(Star), R(11),
+ B(LdaNamedProperty), R(11), U8(3), U8(3),
+ B(Star), R(12),
+ B(CallProperty0), R(12), R(11), U8(5),
+ B(JumpIfJSReceiver), U8(7),
+ B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
+ /* 35 E> */ B(StaContextSlot), R(6), U8(7), U8(0),
+ B(Ldar), R(0),
+ B(SwitchOnSmiNoFeedback), U8(4), U8(1), I8(1),
+ B(LdaSmi), I8(-2),
+ B(TestEqualStrictNoFeedback), R(0),
+ B(JumpIfTrue), U8(11),
+ B(LdaSmi), I8(79),
+ B(Star), R(11),
+ B(CallRuntime), U16(Runtime::kAbort), R(11), U8(1),
+ /* 32 S> */ B(LdaContextSlot), R(6), U8(7), U8(0),
+ B(Star), R(12),
+ B(LdaNamedProperty), R(12), U8(5), U8(9),
+ B(Star), R(11),
+ /* 32 E> */ B(CallProperty0), R(11), R(12), U8(7),
+ /* 32 E> */ B(StaContextSlot), R(6), U8(8), U8(0),
+ B(Star), R(11),
+ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(11), U8(1),
+ B(ToBooleanLogicalNot),
+ B(JumpIfFalse), U8(13),
+ B(LdaContextSlot), R(6), U8(8), U8(0),
+ B(Star), R(11),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
+ B(LdaContextSlot), R(6), U8(8), U8(0),
+ B(Star), R(11),
+ B(LdaNamedProperty), R(11), U8(6), U8(11),
+ B(JumpIfToBooleanTrue), U8(142),
+ B(LdaContextSlot), R(6), U8(8), U8(0),
+ B(Star), R(11),
+ B(LdaNamedProperty), R(11), U8(7), U8(13),
+ B(StaContextSlot), R(6), U8(10), U8(0),
+ B(LdaSmi), I8(2),
+ B(StaContextSlot), R(6), U8(9), U8(0),
+ B(LdaContextSlot), R(6), U8(10), U8(0),
+ B(StaContextSlot), R(6), U8(6), U8(0),
+ /* 21 E> */ B(StackCheck),
+ B(Ldar), R(closure),
+ B(CreateBlockContext), U8(8),
+ B(PushContext), R(11),
+ B(LdaTheHole),
+ B(StaCurrentContextSlot), U8(4),
+ B(LdaContextSlot), R(6), U8(6), U8(0),
+ B(StaCurrentContextSlot), U8(4),
+ /* 40 S> */ B(LdaImmutableContextSlot), R(6), U8(5), U8(0),
+ B(Star), R(12),
+ B(LdaImmutableCurrentContextSlot), U8(4),
+ B(Star), R(13),
+ B(LdaFalse),
+ B(Star), R(14),
+ /* 46 E> */ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(13), U8(2),
+ B(Star), R(13),
+ B(LdaSmi), I8(1),
+ B(SuspendGenerator), R(12), U8(0),
+ B(Ldar), R(13),
+ /* 49 S> */ B(Return),
+ B(LdaSmi), I8(-2),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(12), U8(1),
+ B(Star), R(13),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(12), U8(1),
+ B(Star), R(14),
+ B(LdaZero),
+ B(TestEqualStrictNoFeedback), R(14),
+ B(JumpIfTrue), U8(40),
+ B(LdaSmi), I8(2),
+ B(TestEqualStrictNoFeedback), R(14),
+ B(JumpIfTrue), U8(31),
+ B(LdaTrue),
+ B(Star), R(16),
+ B(Mov), R(13), R(15),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(15), U8(2),
+ B(PopContext), R(11),
+ B(PopContext), R(11),
+ B(PopContext), R(11),
+ B(PopContext), R(11),
+ B(PopContext), R(11),
+ B(PopContext), R(11),
+ B(Star), R(8),
+ B(LdaZero),
+ B(Star), R(7),
+ B(Jump), U8(71),
+ B(Ldar), R(13),
+ /* 40 E> */ B(Throw),
+ B(PopContext), R(11),
+ B(LdaZero),
+ B(StaContextSlot), R(6), U8(9), U8(0),
+ B(JumpLoop), U8(210), I8(0),
+ B(Jump), U8(44),
+ B(Star), R(11),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(11), U8(9), U8(10),
+ B(PushContext), R(11),
+ B(Star), R(10),
+ B(LdaContextSlot), R(6), U8(9), U8(0),
+ B(Star), R(12),
+ B(LdaSmi), I8(2),
+ B(TestEqualStrict), R(12), U8(15),
+ B(JumpIfFalse), U8(8),
+ B(LdaSmi), I8(1),
+ B(StaContextSlot), R(6), U8(9), U8(0),
+ B(LdaImmutableCurrentContextSlot), U8(4),
+ B(Star), R(12),
+ B(CallRuntime), U16(Runtime::kReThrow), R(12), U8(1),
+ B(PopContext), R(11),
+ B(LdaSmi), I8(-1),
+ B(Star), R(7),
+ B(Jump), U8(8),
+ B(Star), R(8),
+ B(LdaSmi), I8(1),
+ B(Star), R(7),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Star), R(9),
+ B(LdaContextSlot), R(6), U8(9), U8(0),
+ B(Star), R(10),
+ B(LdaZero),
+ B(TestEqualStrict), R(10), U8(16),
+ B(JumpIfTrue), U8(150),
+ B(LdaContextSlot), R(6), U8(7), U8(0),
+ B(Star), R(10),
+ B(LdaNamedProperty), R(10), U8(11), U8(17),
+ B(StaContextSlot), R(6), U8(11), U8(0),
+ B(LdaContextSlot), R(6), U8(11), U8(0),
+ B(TestUndetectable),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(127),
+ B(LdaContextSlot), R(6), U8(9), U8(0),
+ B(Star), R(10),
+ B(LdaSmi), I8(1),
+ B(TestEqualStrict), R(10), U8(20),
+ B(JumpIfFalse), U8(69),
+ B(LdaContextSlot), R(6), U8(11), U8(0),
+ B(TestTypeOf), U8(5),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(18),
+ B(Wide), B(LdaSmi), I16(130),
+ B(Star), R(10),
+ B(LdaConstant), U8(12),
+ B(Star), R(11),
+ B(CallRuntime), U16(Runtime::kNewTypeError), R(10), U8(2),
+ B(Throw),
+ B(Mov), R(context), R(10),
+ B(LdaContextSlot), R(6), U8(11), U8(0),
+ B(Star), R(11),
+ B(LdaContextSlot), R(6), U8(7), U8(0),
+ B(Star), R(12),
+ B(InvokeIntrinsic), U8(Runtime::k_Call), R(11), U8(2),
+ B(Jump), U8(20),
+ B(Star), R(11),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(11), U8(9), U8(13),
+ B(Star), R(10),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Ldar), R(10),
+ B(PushContext), R(11),
+ B(PopContext), R(11),
+ B(Jump), U8(47),
+ B(LdaContextSlot), R(6), U8(11), U8(0),
+ B(Star), R(10),
+ B(LdaContextSlot), R(6), U8(7), U8(0),
+ B(Star), R(11),
+ B(InvokeIntrinsic), U8(Runtime::k_Call), R(10), U8(2),
+ B(StaContextSlot), R(6), U8(12), U8(0),
+ B(LdaContextSlot), R(6), U8(12), U8(0),
+ B(Star), R(10),
+ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(10), U8(1),
+ B(JumpIfToBooleanFalse), U8(4),
+ B(Jump), U8(13),
+ B(LdaContextSlot), R(6), U8(12), U8(0),
+ B(Star), R(10),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
+ B(Ldar), R(9),
+ B(SetPendingMessage),
+ B(Ldar), R(7),
+ B(SwitchOnSmiNoFeedback), U8(14), U8(2), I8(0),
+ B(Jump), U8(27),
+ B(PopContext), R(6),
+ B(PopContext), R(6),
+ B(LdaZero),
+ B(Star), R(3),
+ B(Mov), R(8), R(4),
+ B(Jump), U8(46),
+ B(PopContext), R(6),
+ B(PopContext), R(6),
+ B(LdaSmi), I8(1),
+ B(Star), R(3),
+ B(Mov), R(8), R(4),
+ B(Jump), U8(33),
+ B(PopContext), R(6),
+ B(LdaUndefined),
+ B(Star), R(6),
+ B(LdaTrue),
+ B(Star), R(7),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
+ B(Jump), U8(14),
+ B(LdaSmi), I8(-1),
+ B(Star), R(3),
+ B(Jump), U8(8),
+ B(Star), R(4),
+ B(LdaSmi), I8(1),
+ B(Star), R(3),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Star), R(5),
+ B(LdaImmutableCurrentContextSlot), U8(5),
+ B(Star), R(6),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(6), U8(1),
+ B(Ldar), R(5),
+ B(SetPendingMessage),
+ B(Ldar), R(3),
+ B(SwitchOnSmiNoFeedback), U8(17), U8(2), I8(0),
+ B(Jump), U8(8),
+ B(Ldar), R(4),
+ /* 49 S> */ B(Return),
+ B(Ldar), R(4),
+ B(ReThrow),
+ B(LdaUndefined),
+ /* 49 S> */ B(Return),
+]
+constant pool: [
+ Smi [56],
+ Smi [150],
+ FIXED_ARRAY_TYPE,
+ SYMBOL_TYPE,
+ Smi [142],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
+ FIXED_ARRAY_TYPE,
+ ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
+ FIXED_ARRAY_TYPE,
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
+ FIXED_ARRAY_TYPE,
+ Smi [6],
+ Smi [18],
+ Smi [552],
+ Smi [6],
+ Smi [9],
+]
+handlers: [
+ [55, 652, 658],
+ [134, 421, 427],
+ [137, 377, 379],
+ [514, 530, 532],
+]
+
+---
+snippet: "
+ async function f(arr) {
+ for (let x of arr) { let y = x; }
+ }
+ f([1, 2, 3]);
+"
+frame size: 12
+parameter count: 2
+bytecode array length: 556
+bytecodes: [
+ B(CreateFunctionContext), U8(10),
+ B(PushContext), R(0),
+ B(Ldar), R(arg0),
+ B(StaCurrentContextSlot), U8(4),
+ /* 16 E> */ B(StackCheck),
+ B(LdaUndefined),
+ B(Star), R(1),
+ B(CallJSRuntime), U8(%async_function_promise_create), R(1), U8(1),
+ B(StaCurrentContextSlot), U8(13),
+ B(Mov), R(context), R(3),
+ B(Mov), R(context), R(4),
+ B(Ldar), R(closure),
+ B(CreateBlockContext), U8(0),
+ B(PushContext), R(5),
+ B(LdaTheHole),
+ B(StaCurrentContextSlot), U8(4),
+ B(LdaZero),
+ B(StaContextSlot), R(5), U8(9), U8(0),
+ B(Mov), R(context), R(8),
+ B(Mov), R(context), R(9),
+ /* 40 S> */ B(LdaImmutableContextSlot), R(5), U8(4), U8(0),
+ B(Star), R(10),
+ B(LdaNamedProperty), R(10), U8(1), U8(3),
+ B(Star), R(11),
+ B(CallProperty0), R(11), R(10), U8(5),
+ B(JumpIfJSReceiver), U8(7),
+ B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
+ /* 40 E> */ B(StaContextSlot), R(5), U8(7), U8(0),
+ /* 37 S> */ B(LdaContextSlot), R(5), U8(7), U8(0),
+ B(Star), R(11),
+ B(LdaNamedProperty), R(11), U8(2), U8(9),
+ B(Star), R(10),
+ /* 37 E> */ B(CallProperty0), R(10), R(11), U8(7),
+ /* 37 E> */ B(StaContextSlot), R(5), U8(8), U8(0),
+ B(Star), R(10),
+ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(10), U8(1),
+ B(ToBooleanLogicalNot),
+ B(JumpIfFalse), U8(13),
+ B(LdaContextSlot), R(5), U8(8), U8(0),
+ B(Star), R(10),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
+ B(LdaContextSlot), R(5), U8(8), U8(0),
+ B(Star), R(10),
+ B(LdaNamedProperty), R(10), U8(3), U8(11),
+ B(JumpIfToBooleanTrue), U8(73),
+ B(LdaContextSlot), R(5), U8(8), U8(0),
+ B(Star), R(10),
+ B(LdaNamedProperty), R(10), U8(4), U8(13),
+ B(StaContextSlot), R(5), U8(10), U8(0),
+ B(LdaSmi), I8(2),
+ B(StaContextSlot), R(5), U8(9), U8(0),
+ B(LdaContextSlot), R(5), U8(10), U8(0),
+ B(StaContextSlot), R(5), U8(6), U8(0),
+ /* 26 E> */ B(StackCheck),
+ B(Ldar), R(closure),
+ B(CreateBlockContext), U8(5),
+ B(PushContext), R(10),
+ B(LdaTheHole),
+ B(StaCurrentContextSlot), U8(4),
+ B(LdaContextSlot), R(5), U8(6), U8(0),
+ B(StaCurrentContextSlot), U8(4),
+ B(Ldar), R(closure),
+ B(CreateBlockContext), U8(6),
+ B(PushContext), R(11),
+ B(LdaTheHole),
+ B(StaCurrentContextSlot), U8(4),
+ /* 55 S> */ B(LdaImmutableContextSlot), R(11), U8(4), U8(0),
+ /* 55 E> */ B(StaCurrentContextSlot), U8(4),
+ B(PopContext), R(11),
+ B(PopContext), R(10),
+ B(LdaZero),
+ B(StaContextSlot), R(5), U8(9), U8(0),
+ B(JumpLoop), U8(120), I8(0),
+ B(Jump), U8(48),
+ B(Star), R(10),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(10), U8(7), U8(8),
+ B(Star), R(9),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Ldar), R(9),
+ B(PushContext), R(10),
+ B(LdaContextSlot), R(5), U8(9), U8(0),
+ B(Star), R(11),
+ B(LdaSmi), I8(2),
+ B(TestEqualStrict), R(11), U8(15),
+ B(JumpIfFalse), U8(8),
+ B(LdaSmi), I8(1),
+ B(StaContextSlot), R(5), U8(9), U8(0),
+ B(LdaImmutableCurrentContextSlot), U8(4),
+ B(Star), R(11),
+ B(CallRuntime), U16(Runtime::kReThrow), R(11), U8(1),
+ B(PopContext), R(10),
+ B(LdaSmi), I8(-1),
+ B(Star), R(6),
+ B(Jump), U8(7),
+ B(Star), R(7),
+ B(LdaZero),
+ B(Star), R(6),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Star), R(8),
+ B(LdaContextSlot), R(5), U8(9), U8(0),
+ B(Star), R(9),
+ B(LdaZero),
+ B(TestEqualStrict), R(9), U8(16),
+ B(JumpIfTrue), U8(150),
+ B(LdaContextSlot), R(5), U8(7), U8(0),
+ B(Star), R(9),
+ B(LdaNamedProperty), R(9), U8(9), U8(17),
+ B(StaContextSlot), R(5), U8(11), U8(0),
+ B(LdaContextSlot), R(5), U8(11), U8(0),
+ B(TestUndetectable),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(127),
+ B(LdaContextSlot), R(5), U8(9), U8(0),
+ B(Star), R(9),
+ B(LdaSmi), I8(1),
+ B(TestEqualStrict), R(9), U8(20),
+ B(JumpIfFalse), U8(69),
+ B(LdaContextSlot), R(5), U8(11), U8(0),
+ B(TestTypeOf), U8(5),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(18),
+ B(Wide), B(LdaSmi), I16(130),
+ B(Star), R(9),
+ B(LdaConstant), U8(10),
+ B(Star), R(10),
+ B(CallRuntime), U16(Runtime::kNewTypeError), R(9), U8(2),
+ B(Throw),
+ B(Mov), R(context), R(9),
+ B(LdaContextSlot), R(5), U8(11), U8(0),
+ B(Star), R(10),
+ B(LdaContextSlot), R(5), U8(7), U8(0),
+ B(Star), R(11),
+ B(InvokeIntrinsic), U8(Runtime::k_Call), R(10), U8(2),
+ B(Jump), U8(20),
+ B(Star), R(10),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(10), U8(7), U8(11),
+ B(Star), R(9),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Ldar), R(9),
+ B(PushContext), R(10),
+ B(PopContext), R(10),
+ B(Jump), U8(47),
+ B(LdaContextSlot), R(5), U8(11), U8(0),
+ B(Star), R(9),
+ B(LdaContextSlot), R(5), U8(7), U8(0),
+ B(Star), R(10),
+ B(InvokeIntrinsic), U8(Runtime::k_Call), R(9), U8(2),
+ B(StaContextSlot), R(5), U8(12), U8(0),
+ B(LdaContextSlot), R(5), U8(12), U8(0),
+ B(Star), R(9),
+ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(9), U8(1),
+ B(JumpIfToBooleanFalse), U8(4),
+ B(Jump), U8(13),
+ B(LdaContextSlot), R(5), U8(12), U8(0),
+ B(Star), R(9),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(9), U8(1),
+ B(Ldar), R(8),
+ B(SetPendingMessage),
+ B(LdaZero),
+ B(TestEqualStrictNoFeedback), R(6),
+ B(JumpIfFalse), U8(9),
+ B(PopContext), R(5),
+ B(PopContext), R(5),
+ B(Ldar), R(7),
+ B(ReThrow),
+ B(PopContext), R(5),
+ B(LdaUndefined),
+ B(Star), R(5),
+ B(LdaCurrentContextSlot), U8(13),
+ B(Star), R(6),
+ B(LdaUndefined),
+ B(Star), R(7),
+ B(CallJSRuntime), U8(%promise_resolve), R(5), U8(3),
+ B(LdaCurrentContextSlot), U8(13),
+ B(Star), R(2),
+ B(LdaZero),
+ B(Star), R(1),
+ B(Jump), U8(67),
+ B(Jump), U8(53),
+ B(Star), R(5),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(5), U8(7), U8(12),
+ B(Star), R(4),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Ldar), R(4),
+ B(PushContext), R(5),
+ B(LdaUndefined),
+ B(Star), R(6),
+ B(LdaContextSlot), R(5), U8(13), U8(0),
+ B(Star), R(7),
+ B(LdaImmutableCurrentContextSlot), U8(4),
+ B(Star), R(8),
+ B(LdaFalse),
+ B(Star), R(9),
+ B(CallJSRuntime), U8(%promise_internal_reject), R(6), U8(4),
+ B(LdaContextSlot), R(5), U8(13), U8(0),
+ B(PopContext), R(5),
+ B(PopContext), R(5),
+ B(Star), R(2),
+ B(LdaZero),
+ B(Star), R(1),
+ B(Jump), U8(14),
+ B(LdaSmi), I8(-1),
+ B(Star), R(1),
+ B(Jump), U8(8),
+ B(Star), R(2),
+ B(LdaSmi), I8(1),
+ B(Star), R(1),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Star), R(3),
+ B(LdaUndefined),
+ B(Star), R(4),
+ B(LdaCurrentContextSlot), U8(13),
+ B(Star), R(5),
+ B(CallJSRuntime), U8(%async_function_promise_release), R(4), U8(2),
+ B(Ldar), R(3),
+ B(SetPendingMessage),
+ B(Ldar), R(1),
+ B(SwitchOnSmiNoFeedback), U8(13), U8(2), I8(0),
+ B(Jump), U8(8),
+ B(Ldar), R(2),
+ /* 60 S> */ B(Return),
+ B(Ldar), R(2),
+ B(ReThrow),
+ B(LdaUndefined),
+ /* 60 S> */ B(Return),
+]
+constant pool: [
+ FIXED_ARRAY_TYPE,
+ SYMBOL_TYPE,
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
+ FIXED_ARRAY_TYPE,
+ FIXED_ARRAY_TYPE,
+ ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
+ FIXED_ARRAY_TYPE,
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
+ FIXED_ARRAY_TYPE,
+ FIXED_ARRAY_TYPE,
+ Smi [6],
+ Smi [9],
+]
+handlers: [
+ [21, 510, 516],
+ [24, 457, 459],
+ [41, 242, 248],
+ [44, 194, 196],
+ [334, 350, 352],
+]
+
+---
+snippet: "
+ async function f(arr) {
+ for (let x of arr) await x;
+ }
+ f([1, 2, 3]);
+"
+frame size: 18
+parameter count: 2
+bytecode array length: 732
+bytecodes: [
+ B(Ldar), R(new_target),
+ B(JumpIfUndefined), U8(25),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
+ B(PushContext), R(1),
+ B(ResumeGenerator), R(new_target),
+ B(Star), R(0),
+ B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
+ B(LdaSmi), I8(79),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
+ B(LdaSmi), I8(-2),
+ B(Star), R(0),
+ B(CreateFunctionContext), U8(11),
+ B(PushContext), R(2),
+ B(Ldar), R(arg0),
+ B(StaCurrentContextSlot), U8(4),
+ B(Mov), R(closure), R(3),
+ B(Mov), R(this), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
+ B(StaCurrentContextSlot), U8(5),
+ /* 16 E> */ B(StackCheck),
+ B(LdaUndefined),
+ B(Star), R(3),
+ B(CallJSRuntime), U8(%async_function_promise_create), R(3), U8(1),
+ B(StaCurrentContextSlot), U8(7),
+ B(Mov), R(context), R(5),
+ B(Mov), R(context), R(6),
+ B(Ldar), R(closure),
+ B(CreateBlockContext), U8(1),
+ B(PushContext), R(7),
+ B(LdaTheHole),
+ B(StaCurrentContextSlot), U8(4),
+ B(LdaZero),
+ B(StaContextSlot), R(7), U8(11), U8(0),
+ B(Mov), R(context), R(10),
+ B(Mov), R(context), R(11),
+ /* 40 S> */ B(LdaImmutableContextSlot), R(7), U8(4), U8(0),
+ B(Star), R(12),
+ B(LdaNamedProperty), R(12), U8(2), U8(3),
+ B(Star), R(13),
+ B(CallProperty0), R(13), R(12), U8(5),
+ B(JumpIfJSReceiver), U8(7),
+ B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
+ /* 40 E> */ B(StaContextSlot), R(7), U8(9), U8(0),
+ B(Ldar), R(0),
+ B(SwitchOnSmiNoFeedback), U8(3), U8(1), I8(0),
+ B(LdaSmi), I8(-2),
+ B(TestEqualStrictNoFeedback), R(0),
+ B(JumpIfTrue), U8(11),
+ B(LdaSmi), I8(79),
+ B(Star), R(12),
+ B(CallRuntime), U16(Runtime::kAbort), R(12), U8(1),
+ /* 37 S> */ B(LdaContextSlot), R(7), U8(9), U8(0),
+ B(Star), R(13),
+ B(LdaNamedProperty), R(13), U8(4), U8(9),
+ B(Star), R(12),
+ /* 37 E> */ B(CallProperty0), R(12), R(13), U8(7),
+ /* 37 E> */ B(StaContextSlot), R(7), U8(10), U8(0),
+ B(Star), R(12),
+ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(12), U8(1),
+ B(ToBooleanLogicalNot),
+ B(JumpIfFalse), U8(13),
+ B(LdaContextSlot), R(7), U8(10), U8(0),
+ B(Star), R(12),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
+ B(LdaContextSlot), R(7), U8(10), U8(0),
+ B(Star), R(12),
+ B(LdaNamedProperty), R(12), U8(5), U8(11),
+ B(JumpIfToBooleanTrue), U8(165),
+ B(LdaContextSlot), R(7), U8(10), U8(0),
+ B(Star), R(12),
+ B(LdaNamedProperty), R(12), U8(6), U8(13),
+ B(StaContextSlot), R(7), U8(12), U8(0),
+ B(LdaSmi), I8(2),
+ B(StaContextSlot), R(7), U8(11), U8(0),
+ B(LdaContextSlot), R(7), U8(12), U8(0),
+ B(StaContextSlot), R(7), U8(8), U8(0),
+ /* 26 E> */ B(StackCheck),
+ B(Ldar), R(closure),
+ B(CreateBlockContext), U8(7),
+ B(PushContext), R(12),
+ B(LdaTheHole),
+ B(StaCurrentContextSlot), U8(4),
+ B(LdaContextSlot), R(7), U8(8), U8(0),
+ B(StaCurrentContextSlot), U8(4),
+ /* 45 S> */ B(LdaImmutableContextSlot), R(7), U8(5), U8(0),
+ B(Star), R(13),
+ /* 51 S> */ B(LdaImmutableCurrentContextSlot), U8(4),
+ B(StaContextSlot), R(7), U8(6), U8(0),
+ /* 45 S> */ B(LdaUndefined),
+ B(Star), R(14),
+ B(LdaImmutableContextSlot), R(7), U8(5), U8(0),
+ B(Star), R(15),
+ B(LdaContextSlot), R(7), U8(6), U8(0),
+ B(Star), R(16),
+ B(LdaContextSlot), R(7), U8(7), U8(0),
+ B(Star), R(17),
+ B(CallJSRuntime), U8(%async_function_await_uncaught), R(14), U8(4),
+ B(LdaContextSlot), R(7), U8(7), U8(0),
+ B(Star), R(14),
+ B(LdaZero),
+ B(SuspendGenerator), R(13), U8(2),
+ B(Ldar), R(14),
+ /* 54 S> */ B(Return),
+ B(LdaSmi), I8(-2),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(13), U8(1),
+ B(Star), R(14),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(13), U8(1),
+ B(Star), R(15),
+ B(LdaZero),
+ B(TestEqualStrictNoFeedback), R(15),
+ B(JumpIfTrue), U8(40),
+ B(LdaSmi), I8(2),
+ B(TestEqualStrictNoFeedback), R(15),
+ B(JumpIfTrue), U8(31),
+ B(LdaTrue),
+ B(Star), R(17),
+ B(Mov), R(14), R(16),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(16), U8(2),
+ B(PopContext), R(12),
+ B(PopContext), R(12),
+ B(PopContext), R(12),
+ B(PopContext), R(12),
+ B(PopContext), R(12),
+ B(PopContext), R(12),
+ B(Star), R(9),
+ B(LdaZero),
+ B(Star), R(8),
+ B(Jump), U8(75),
+ B(Ldar), R(14),
+ B(ReThrow),
+ B(PopContext), R(12),
+ B(LdaZero),
+ B(StaContextSlot), R(7), U8(11), U8(0),
+ B(JumpLoop), U8(233), I8(0),
+ B(Jump), U8(48),
+ B(Star), R(12),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(12), U8(8), U8(9),
+ B(Star), R(11),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Ldar), R(11),
+ B(PushContext), R(12),
+ B(LdaContextSlot), R(7), U8(11), U8(0),
+ B(Star), R(13),
+ B(LdaSmi), I8(2),
+ B(TestEqualStrict), R(13), U8(15),
+ B(JumpIfFalse), U8(8),
+ B(LdaSmi), I8(1),
+ B(StaContextSlot), R(7), U8(11), U8(0),
+ B(LdaImmutableCurrentContextSlot), U8(4),
+ B(Star), R(13),
+ B(CallRuntime), U16(Runtime::kReThrow), R(13), U8(1),
+ B(PopContext), R(12),
+ B(LdaSmi), I8(-1),
+ B(Star), R(8),
+ B(Jump), U8(8),
+ B(Star), R(9),
+ B(LdaSmi), I8(1),
+ B(Star), R(8),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Star), R(10),
+ B(LdaContextSlot), R(7), U8(11), U8(0),
+ B(Star), R(11),
+ B(LdaZero),
+ B(TestEqualStrict), R(11), U8(16),
+ B(JumpIfTrue), U8(150),
+ B(LdaContextSlot), R(7), U8(9), U8(0),
+ B(Star), R(11),
+ B(LdaNamedProperty), R(11), U8(10), U8(17),
+ B(StaContextSlot), R(7), U8(13), U8(0),
+ B(LdaContextSlot), R(7), U8(13), U8(0),
+ B(TestUndetectable),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(127),
+ B(LdaContextSlot), R(7), U8(11), U8(0),
+ B(Star), R(11),
+ B(LdaSmi), I8(1),
+ B(TestEqualStrict), R(11), U8(20),
+ B(JumpIfFalse), U8(69),
+ B(LdaContextSlot), R(7), U8(13), U8(0),
+ B(TestTypeOf), U8(5),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(18),
+ B(Wide), B(LdaSmi), I16(130),
+ B(Star), R(11),
+ B(LdaConstant), U8(11),
+ B(Star), R(12),
+ B(CallRuntime), U16(Runtime::kNewTypeError), R(11), U8(2),
+ B(Throw),
+ B(Mov), R(context), R(11),
+ B(LdaContextSlot), R(7), U8(13), U8(0),
+ B(Star), R(12),
+ B(LdaContextSlot), R(7), U8(9), U8(0),
+ B(Star), R(13),
+ B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(2),
+ B(Jump), U8(20),
+ B(Star), R(12),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(12), U8(8), U8(12),
+ B(Star), R(11),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Ldar), R(11),
+ B(PushContext), R(12),
+ B(PopContext), R(12),
+ B(Jump), U8(47),
+ B(LdaContextSlot), R(7), U8(13), U8(0),
+ B(Star), R(11),
+ B(LdaContextSlot), R(7), U8(9), U8(0),
+ B(Star), R(12),
+ B(InvokeIntrinsic), U8(Runtime::k_Call), R(11), U8(2),
+ B(StaContextSlot), R(7), U8(14), U8(0),
+ B(LdaContextSlot), R(7), U8(14), U8(0),
+ B(Star), R(11),
+ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(11), U8(1),
+ B(JumpIfToBooleanFalse), U8(4),
+ B(Jump), U8(13),
+ B(LdaContextSlot), R(7), U8(14), U8(0),
+ B(Star), R(11),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
+ B(Ldar), R(10),
+ B(SetPendingMessage),
+ B(Ldar), R(8),
+ B(SwitchOnSmiNoFeedback), U8(13), U8(2), I8(0),
+ B(Jump), U8(25),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(LdaZero),
+ B(Star), R(3),
+ B(Mov), R(9), R(4),
+ B(Jump), U8(99),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(Ldar), R(9),
+ B(ReThrow),
+ B(PopContext), R(7),
+ B(LdaUndefined),
+ B(Star), R(7),
+ B(LdaCurrentContextSlot), U8(7),
+ B(Star), R(8),
+ B(LdaUndefined),
+ B(Star), R(9),
+ B(CallJSRuntime), U8(%promise_resolve), R(7), U8(3),
+ B(LdaCurrentContextSlot), U8(7),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
+ B(Jump), U8(67),
+ B(Jump), U8(53),
+ B(Star), R(7),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(7), U8(8), U8(15),
+ B(Star), R(6),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Ldar), R(6),
+ B(PushContext), R(7),
+ B(LdaUndefined),
+ B(Star), R(8),
+ B(LdaContextSlot), R(7), U8(7), U8(0),
+ B(Star), R(9),
+ B(LdaImmutableCurrentContextSlot), U8(4),
+ B(Star), R(10),
+ B(LdaFalse),
+ B(Star), R(11),
+ B(CallJSRuntime), U8(%promise_internal_reject), R(8), U8(4),
+ B(LdaContextSlot), R(7), U8(7), U8(0),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
+ B(Jump), U8(14),
+ B(LdaSmi), I8(-1),
+ B(Star), R(3),
+ B(Jump), U8(8),
+ B(Star), R(4),
+ B(LdaSmi), I8(1),
+ B(Star), R(3),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Star), R(5),
+ B(LdaUndefined),
+ B(Star), R(6),
+ B(LdaCurrentContextSlot), U8(7),
+ B(Star), R(7),
+ B(CallJSRuntime), U8(%async_function_promise_release), R(6), U8(2),
+ B(Ldar), R(5),
+ B(SetPendingMessage),
+ B(Ldar), R(3),
+ B(SwitchOnSmiNoFeedback), U8(16), U8(2), I8(0),
+ B(Jump), U8(8),
+ B(Ldar), R(4),
+ /* 54 S> */ B(Return),
+ B(Ldar), R(4),
+ B(ReThrow),
+ B(LdaUndefined),
+ /* 54 S> */ B(Return),
+]
+constant pool: [
+ Smi [100],
+ FIXED_ARRAY_TYPE,
+ SYMBOL_TYPE,
+ Smi [165],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
+ FIXED_ARRAY_TYPE,
+ ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
+ FIXED_ARRAY_TYPE,
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
+ FIXED_ARRAY_TYPE,
+ Smi [6],
+ Smi [22],
+ FIXED_ARRAY_TYPE,
+ Smi [6],
+ Smi [9],
+]
+handlers: [
+ [64, 686, 692],
+ [67, 633, 635],
+ [84, 398, 404],
+ [87, 350, 352],
+ [491, 507, 509],
+]
+
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/FunctionLiterals.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/FunctionLiterals.golden
index a9ba5bbf32..8fc6222588 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/FunctionLiterals.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/FunctionLiterals.golden
@@ -14,7 +14,7 @@ parameter count: 1
bytecode array length: 6
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 34 S> */ B(CreateClosure), U8(0), U8(2), U8(2),
+ /* 34 S> */ B(CreateClosure), U8(0), U8(3), U8(2),
/* 55 S> */ B(Return),
]
constant pool: [
@@ -32,9 +32,9 @@ parameter count: 1
bytecode array length: 11
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 34 S> */ B(CreateClosure), U8(0), U8(4), U8(2),
+ /* 34 S> */ B(CreateClosure), U8(0), U8(5), U8(2),
B(Star), R(0),
- /* 56 E> */ B(CallUndefinedReceiver0), R(0), U8(2),
+ /* 56 E> */ B(CallUndefinedReceiver0), R(0), U8(3),
/* 59 S> */ B(Return),
]
constant pool: [
@@ -52,11 +52,11 @@ parameter count: 1
bytecode array length: 16
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 34 S> */ B(CreateClosure), U8(0), U8(4), U8(2),
+ /* 34 S> */ B(CreateClosure), U8(0), U8(5), U8(2),
B(Star), R(0),
B(LdaSmi), I8(1),
B(Star), R(1),
- /* 67 E> */ B(CallUndefinedReceiver1), R(0), R(1), U8(2),
+ /* 67 E> */ B(CallUndefinedReceiver1), R(0), R(1), U8(3),
/* 71 S> */ B(Return),
]
constant pool: [
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/GenerateTestUndetectable.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/GenerateTestUndetectable.golden
index b8b23b03f9..48f9afaa27 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/GenerateTestUndetectable.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/GenerateTestUndetectable.golden
@@ -17,7 +17,7 @@ parameter count: 1
bytecode array length: 25
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(2),
+ /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(2),
B(Mov), R(2), R(0),
/* 63 S> */ B(LdaSmi), I8(10),
B(Star), R(1),
@@ -47,7 +47,7 @@ parameter count: 1
bytecode array length: 25
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(2),
+ /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(2),
B(Mov), R(2), R(0),
/* 63 S> */ B(LdaSmi), I8(10),
B(Star), R(1),
@@ -77,7 +77,7 @@ parameter count: 1
bytecode array length: 25
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(2),
+ /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(2),
B(Mov), R(2), R(0),
/* 63 S> */ B(LdaSmi), I8(10),
B(Star), R(1),
@@ -107,7 +107,7 @@ parameter count: 1
bytecode array length: 25
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(2),
+ /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(2),
B(Mov), R(2), R(0),
/* 63 S> */ B(LdaSmi), I8(10),
B(Star), R(1),
@@ -137,7 +137,7 @@ parameter count: 1
bytecode array length: 24
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(2),
+ /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(2),
B(Mov), R(2), R(0),
/* 63 S> */ B(LdaSmi), I8(10),
B(Star), R(1),
@@ -166,7 +166,7 @@ parameter count: 1
bytecode array length: 24
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(2),
+ /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(2),
B(Mov), R(2), R(0),
/* 63 S> */ B(LdaSmi), I8(10),
B(Star), R(1),
@@ -195,7 +195,7 @@ parameter count: 1
bytecode array length: 24
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(2),
+ /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(2),
B(Mov), R(2), R(0),
/* 63 S> */ B(LdaSmi), I8(10),
B(Star), R(1),
@@ -224,7 +224,7 @@ parameter count: 1
bytecode array length: 24
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(2),
+ /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(2),
B(Mov), R(2), R(0),
/* 63 S> */ B(LdaSmi), I8(10),
B(Star), R(1),
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/Generators.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/Generators.golden
index c92cf051ac..125e7b6502 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/Generators.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/Generators.golden
@@ -11,64 +11,59 @@ snippet: "
function* f() { }
f();
"
-frame size: 12
+frame size: 11
parameter count: 1
-bytecode array length: 199
+bytecode array length: 173
bytecodes: [
B(Ldar), R(new_target),
- B(JumpIfUndefined), U8(27),
- B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
- B(PushContext), R(2),
+ B(JumpIfUndefined), U8(25),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
+ B(PushContext), R(1),
B(ResumeGenerator), R(new_target),
- B(Star), R(1),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(1),
- B(JumpIfTrue), U8(54),
+ B(Star), R(0),
+ B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
B(LdaSmi), I8(79),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
B(LdaSmi), I8(-2),
- B(Star), R(1),
- B(CreateFunctionContext), U8(2),
- B(PushContext), R(0),
- B(Ldar), R(this),
+ B(Star), R(0),
+ B(CreateFunctionContext), U8(1),
+ B(PushContext), R(2),
+ B(Mov), R(closure), R(3),
+ B(Mov), R(this), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
B(StaCurrentContextSlot), U8(4),
/* 11 E> */ B(StackCheck),
B(Mov), R(context), R(5),
B(LdaImmutableCurrentContextSlot), U8(4),
- B(Star), R(7),
- B(Mov), R(closure), R(6),
- /* 11 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(6), U8(2),
- B(StaCurrentContextSlot), U8(5),
B(Star), R(6),
- B(LdaImmutableCurrentContextSlot), U8(5),
+ B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(7),
B(LdaZero),
- B(SuspendGenerator), R(7), U8(0),
- B(Ldar), R(6),
+ /* 11 E> */ B(SuspendGenerator), R(6), U8(0),
+ B(Ldar), R(7),
/* 16 S> */ B(Return),
B(LdaSmi), I8(-2),
- B(Star), R(1),
- B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(7), U8(1),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(6), U8(1),
+ B(Star), R(7),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(6), U8(1),
B(Star), R(8),
- B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(7), U8(1),
- B(Star), R(9),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(9),
- B(JumpIfTrue), U8(30),
+ B(TestEqualStrictNoFeedback), R(8),
+ B(JumpIfTrue), U8(28),
B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(9),
- B(JumpIfTrue), U8(21),
- B(Jump), U8(2),
+ B(TestEqualStrictNoFeedback), R(8),
+ B(JumpIfTrue), U8(19),
B(LdaTrue),
- B(Star), R(11),
- B(Mov), R(8), R(10),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(10), U8(2),
+ B(Star), R(10),
+ B(Mov), R(7), R(9),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(9), U8(2),
B(Star), R(4),
B(LdaZero),
B(Star), R(3),
- B(Jump), U8(35),
- B(Ldar), R(8),
+ B(Jump), U8(34),
+ B(Ldar), R(7),
/* 11 E> */ B(Throw),
B(LdaUndefined),
B(Star), R(6),
@@ -76,35 +71,26 @@ bytecodes: [
B(Star), R(7),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
B(Star), R(4),
- B(LdaSmi), I8(1),
+ B(LdaZero),
B(Star), R(3),
B(Jump), U8(14),
B(LdaSmi), I8(-1),
B(Star), R(3),
B(Jump), U8(8),
B(Star), R(4),
- B(LdaSmi), I8(2),
+ B(LdaSmi), I8(1),
B(Star), R(3),
B(LdaTheHole),
B(SetPendingMessage),
B(Star), R(5),
- B(LdaImmutableCurrentContextSlot), U8(5),
+ B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(6),
- B(CallRuntime), U16(Runtime::k_GeneratorClose), R(6), U8(1),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(6), U8(1),
B(Ldar), R(5),
B(SetPendingMessage),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(3),
- B(JumpIfTrue), U8(16),
- B(LdaSmi), I8(1),
- B(TestEqualStrictNoFeedback), R(3),
- B(JumpIfTrue), U8(13),
- B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(3),
- B(JumpIfTrue), U8(10),
- B(Jump), U8(11),
- B(Ldar), R(4),
- /* 16 S> */ B(Return),
+ B(Ldar), R(3),
+ B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0),
+ B(Jump), U8(8),
B(Ldar), R(4),
/* 16 S> */ B(Return),
B(Ldar), R(4),
@@ -113,9 +99,12 @@ bytecodes: [
/* 16 S> */ B(Return),
]
constant pool: [
+ Smi [52],
+ Smi [6],
+ Smi [9],
]
handlers: [
- [45, 141, 147],
+ [51, 130, 136],
]
---
@@ -123,102 +112,93 @@ snippet: "
function* f() { yield 42 }
f();
"
-frame size: 12
+frame size: 11
parameter count: 1
-bytecode array length: 291
+bytecode array length: 245
bytecodes: [
B(Ldar), R(new_target),
- B(JumpIfUndefined), U8(33),
- B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
- B(PushContext), R(2),
+ B(JumpIfUndefined), U8(25),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
+ B(PushContext), R(1),
B(ResumeGenerator), R(new_target),
- B(Star), R(1),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(1),
- B(JumpIfTrue), U8(60),
- B(LdaSmi), I8(1),
- B(TestEqualStrictNoFeedback), R(1),
- B(JumpIfTrue), U8(130),
+ B(Star), R(0),
+ B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0),
B(LdaSmi), I8(79),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
B(LdaSmi), I8(-2),
- B(Star), R(1),
- B(CreateFunctionContext), U8(2),
- B(PushContext), R(0),
- B(Ldar), R(this),
+ B(Star), R(0),
+ B(CreateFunctionContext), U8(1),
+ B(PushContext), R(2),
+ B(Mov), R(closure), R(3),
+ B(Mov), R(this), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
B(StaCurrentContextSlot), U8(4),
/* 11 E> */ B(StackCheck),
B(Mov), R(context), R(5),
B(LdaImmutableCurrentContextSlot), U8(4),
- B(Star), R(7),
- B(Mov), R(closure), R(6),
- /* 11 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(6), U8(2),
- B(StaCurrentContextSlot), U8(5),
B(Star), R(6),
- B(LdaImmutableCurrentContextSlot), U8(5),
+ B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(7),
B(LdaZero),
- B(SuspendGenerator), R(7), U8(0),
- B(Ldar), R(6),
+ /* 11 E> */ B(SuspendGenerator), R(6), U8(0),
+ B(Ldar), R(7),
/* 25 S> */ B(Return),
B(LdaSmi), I8(-2),
- B(Star), R(1),
- B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(7), U8(1),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(6), U8(1),
+ B(Star), R(7),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(6), U8(1),
B(Star), R(8),
- B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(7), U8(1),
- B(Star), R(9),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(9),
- B(JumpIfTrue), U8(30),
+ B(TestEqualStrictNoFeedback), R(8),
+ B(JumpIfTrue), U8(28),
B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(9),
- B(JumpIfTrue), U8(21),
- B(Jump), U8(2),
+ B(TestEqualStrictNoFeedback), R(8),
+ B(JumpIfTrue), U8(19),
B(LdaTrue),
- B(Star), R(11),
- B(Mov), R(8), R(10),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(10), U8(2),
+ B(Star), R(10),
+ B(Mov), R(7), R(9),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(9), U8(2),
B(Star), R(4),
B(LdaZero),
B(Star), R(3),
- B(Jump), U8(112),
- B(Ldar), R(8),
+ B(Jump), U8(106),
+ B(Ldar), R(7),
/* 11 E> */ B(Throw),
- /* 16 S> */ B(LdaSmi), I8(42),
+ /* 16 S> */ B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(6),
- B(LdaFalse),
+ B(LdaSmi), I8(42),
B(Star), R(7),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
- B(Star), R(6),
- B(LdaImmutableCurrentContextSlot), U8(5),
+ B(LdaFalse),
+ B(Star), R(8),
+ /* 16 E> */ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
B(Star), R(7),
B(LdaSmi), I8(1),
- B(SuspendGenerator), R(7), U8(0),
- B(Ldar), R(6),
+ B(SuspendGenerator), R(6), U8(0),
+ B(Ldar), R(7),
/* 25 S> */ B(Return),
B(LdaSmi), I8(-2),
- B(Star), R(1),
- B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(7), U8(1),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(6), U8(1),
+ B(Star), R(7),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(6), U8(1),
B(Star), R(8),
- B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(7), U8(1),
- B(Star), R(9),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(9),
- B(JumpIfTrue), U8(31),
+ B(TestEqualStrictNoFeedback), R(8),
+ B(JumpIfTrue), U8(28),
B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(9),
- B(JumpIfTrue), U8(22),
- B(Jump), U8(2),
+ B(TestEqualStrictNoFeedback), R(8),
+ B(JumpIfTrue), U8(19),
B(LdaTrue),
- B(Star), R(11),
- B(Mov), R(8), R(10),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(10), U8(2),
+ B(Star), R(10),
+ B(Mov), R(7), R(9),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(9), U8(2),
B(Star), R(4),
- B(LdaSmi), I8(1),
+ B(LdaZero),
B(Star), R(3),
- B(Jump), U8(35),
- B(Ldar), R(8),
+ B(Jump), U8(34),
+ B(Ldar), R(7),
/* 16 E> */ B(Throw),
B(LdaUndefined),
B(Star), R(6),
@@ -226,40 +206,26 @@ bytecodes: [
B(Star), R(7),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
B(Star), R(4),
- B(LdaSmi), I8(2),
+ B(LdaZero),
B(Star), R(3),
B(Jump), U8(14),
B(LdaSmi), I8(-1),
B(Star), R(3),
B(Jump), U8(8),
B(Star), R(4),
- B(LdaSmi), I8(3),
+ B(LdaSmi), I8(1),
B(Star), R(3),
B(LdaTheHole),
B(SetPendingMessage),
B(Star), R(5),
- B(LdaImmutableCurrentContextSlot), U8(5),
+ B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(6),
- B(CallRuntime), U16(Runtime::k_GeneratorClose), R(6), U8(1),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(6), U8(1),
B(Ldar), R(5),
B(SetPendingMessage),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(3),
- B(JumpIfTrue), U8(22),
- B(LdaSmi), I8(1),
- B(TestEqualStrictNoFeedback), R(3),
- B(JumpIfTrue), U8(19),
- B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(3),
- B(JumpIfTrue), U8(16),
- B(LdaSmi), I8(3),
- B(TestEqualStrictNoFeedback), R(3),
- B(JumpIfTrue), U8(13),
- B(Jump), U8(14),
- B(Ldar), R(4),
- /* 25 S> */ B(Return),
- B(Ldar), R(4),
- /* 25 S> */ B(Return),
+ B(Ldar), R(3),
+ B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
+ B(Jump), U8(8),
B(Ldar), R(4),
/* 25 S> */ B(Return),
B(Ldar), R(4),
@@ -268,9 +234,13 @@ bytecodes: [
/* 25 S> */ B(Return),
]
constant pool: [
+ Smi [52],
+ Smi [124],
+ Smi [6],
+ Smi [9],
]
handlers: [
- [51, 224, 230],
+ [51, 202, 208],
]
---
@@ -278,335 +248,305 @@ snippet: "
function* f() { for (let x of [42]) yield x }
f();
"
-frame size: 18
+frame size: 17
parameter count: 1
-bytecode array length: 751
+bytecode array length: 691
bytecodes: [
B(Ldar), R(new_target),
- B(JumpIfUndefined), U8(33),
- B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
- B(PushContext), R(4),
+ B(JumpIfUndefined), U8(25),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
+ B(PushContext), R(1),
B(ResumeGenerator), R(new_target),
- B(Star), R(3),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(3),
- B(JumpIfTrue), U8(60),
- B(LdaSmi), I8(1),
- B(TestEqualStrictNoFeedback), R(3),
- B(JumpIfTrue), U8(152),
+ B(Star), R(0),
+ B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0),
B(LdaSmi), I8(79),
- B(Star), R(5),
- B(CallRuntime), U16(Runtime::kAbort), R(5), U8(1),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
B(LdaSmi), I8(-2),
- B(Star), R(3),
- B(CreateFunctionContext), U8(9),
- B(PushContext), R(0),
- B(Ldar), R(this),
+ B(Star), R(0),
+ B(CreateFunctionContext), U8(8),
+ B(PushContext), R(2),
+ B(Mov), R(closure), R(3),
+ B(Mov), R(this), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
B(StaCurrentContextSlot), U8(4),
/* 11 E> */ B(StackCheck),
- B(Mov), R(context), R(7),
+ B(Mov), R(context), R(5),
B(LdaImmutableCurrentContextSlot), U8(4),
- B(Star), R(9),
- B(Mov), R(closure), R(8),
- /* 11 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(8), U8(2),
- B(StaCurrentContextSlot), U8(5),
- B(Star), R(8),
- B(LdaImmutableCurrentContextSlot), U8(5),
- B(Star), R(9),
+ B(Star), R(6),
+ B(LdaImmutableCurrentContextSlot), U8(4),
+ B(Star), R(7),
B(LdaZero),
- B(SuspendGenerator), R(9), U8(0),
- B(Ldar), R(8),
+ /* 11 E> */ B(SuspendGenerator), R(6), U8(0),
+ B(Ldar), R(7),
/* 44 S> */ B(Return),
B(LdaSmi), I8(-2),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(9), U8(1),
- B(Star), R(10),
- B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(9), U8(1),
- B(Star), R(11),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(6), U8(1),
+ B(Star), R(7),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(6), U8(1),
+ B(Star), R(8),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(11),
- B(JumpIfTrue), U8(30),
+ B(TestEqualStrictNoFeedback), R(8),
+ B(JumpIfTrue), U8(28),
B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(11),
- B(JumpIfTrue), U8(21),
- B(Jump), U8(2),
+ B(TestEqualStrictNoFeedback), R(8),
+ B(JumpIfTrue), U8(19),
B(LdaTrue),
- B(Star), R(13),
- B(Mov), R(10), R(12),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(12), U8(2),
- B(Star), R(6),
+ B(Star), R(10),
+ B(Mov), R(7), R(9),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(9), U8(2),
+ B(Star), R(4),
B(LdaZero),
- B(Star), R(5),
- B(JumpConstant), U8(12),
- B(Ldar), R(10),
+ B(Star), R(3),
+ B(JumpConstant), U8(17),
+ B(Ldar), R(7),
/* 11 E> */ B(Throw),
B(Ldar), R(closure),
- B(CreateBlockContext), U8(0),
- B(PushContext), R(1),
+ B(CreateBlockContext), U8(2),
+ B(PushContext), R(6),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(4),
B(LdaZero),
- B(StaContextSlot), R(1), U8(9), U8(0),
+ B(StaContextSlot), R(6), U8(8), U8(0),
+ B(Mov), R(context), R(9),
B(Mov), R(context), R(10),
- B(Mov), R(context), R(11),
- /* 30 S> */ B(CreateArrayLiteral), U8(1), U8(2), U8(9),
+ /* 30 S> */ B(CreateArrayLiteral), U8(3), U8(3), U8(17),
+ B(Star), R(11),
+ B(LdaNamedProperty), R(11), U8(4), U8(4),
B(Star), R(12),
- B(LdaNamedProperty), R(12), U8(2), U8(3),
- B(Star), R(13),
- B(CallProperty0), R(13), R(12), U8(5),
+ B(CallProperty0), R(12), R(11), U8(6),
B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
- /* 30 E> */ B(StaContextSlot), R(1), U8(7), U8(0),
+ /* 30 E> */ B(StaContextSlot), R(6), U8(6), U8(0),
+ B(Ldar), R(0),
+ B(SwitchOnSmiNoFeedback), U8(5), U8(1), I8(1),
B(LdaSmi), I8(-2),
- B(TestEqualStrictNoFeedback), R(3),
- B(JumpIfTrue), U8(17),
- B(LdaSmi), I8(1),
- B(TestEqualStrictNoFeedback), R(3),
- B(JumpIfTrue), U8(134),
+ B(TestEqualStrictNoFeedback), R(0),
+ B(JumpIfTrue), U8(11),
B(LdaSmi), I8(79),
+ B(Star), R(11),
+ B(CallRuntime), U16(Runtime::kAbort), R(11), U8(1),
+ /* 27 S> */ B(LdaContextSlot), R(6), U8(6), U8(0),
B(Star), R(12),
- B(CallRuntime), U16(Runtime::kAbort), R(12), U8(1),
- /* 27 S> */ B(LdaContextSlot), R(1), U8(7), U8(0),
- B(Star), R(13),
- B(LdaNamedProperty), R(13), U8(3), U8(9),
- B(Star), R(12),
- /* 27 E> */ B(CallProperty0), R(12), R(13), U8(7),
- /* 27 E> */ B(StaContextSlot), R(1), U8(8), U8(0),
- B(Star), R(12),
- B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(12), U8(1),
+ B(LdaNamedProperty), R(12), U8(6), U8(10),
+ B(Star), R(11),
+ /* 27 E> */ B(CallProperty0), R(11), R(12), U8(8),
+ /* 27 E> */ B(StaContextSlot), R(6), U8(7), U8(0),
+ B(Star), R(11),
+ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(11), U8(1),
B(ToBooleanLogicalNot),
B(JumpIfFalse), U8(13),
- B(LdaContextSlot), R(1), U8(8), U8(0),
- B(Star), R(12),
- B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
- B(LdaContextSlot), R(1), U8(8), U8(0),
- B(Star), R(12),
- B(LdaNamedProperty), R(12), U8(4), U8(11),
- B(JumpIfToBooleanTrue), U8(146),
- B(LdaContextSlot), R(1), U8(8), U8(0),
- B(Star), R(12),
- B(LdaNamedProperty), R(12), U8(5), U8(13),
- B(StaContextSlot), R(1), U8(10), U8(0),
+ B(LdaContextSlot), R(6), U8(7), U8(0),
+ B(Star), R(11),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
+ B(LdaContextSlot), R(6), U8(7), U8(0),
+ B(Star), R(11),
+ B(LdaNamedProperty), R(11), U8(7), U8(12),
+ B(JumpIfToBooleanTrue), U8(142),
+ B(LdaContextSlot), R(6), U8(7), U8(0),
+ B(Star), R(11),
+ B(LdaNamedProperty), R(11), U8(8), U8(14),
+ B(StaContextSlot), R(6), U8(9), U8(0),
B(LdaSmi), I8(2),
- B(StaContextSlot), R(1), U8(9), U8(0),
- B(LdaContextSlot), R(1), U8(10), U8(0),
- B(StaContextSlot), R(1), U8(6), U8(0),
+ B(StaContextSlot), R(6), U8(8), U8(0),
+ B(LdaContextSlot), R(6), U8(9), U8(0),
+ B(StaContextSlot), R(6), U8(5), U8(0),
/* 16 E> */ B(StackCheck),
B(Ldar), R(closure),
- B(CreateBlockContext), U8(6),
- B(PushContext), R(2),
+ B(CreateBlockContext), U8(9),
+ B(PushContext), R(11),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(4),
- B(LdaContextSlot), R(1), U8(6), U8(0),
+ B(LdaContextSlot), R(6), U8(5), U8(0),
B(StaCurrentContextSlot), U8(4),
- /* 36 S> */ B(LdaImmutableCurrentContextSlot), U8(4),
+ /* 36 S> */ B(LdaImmutableContextSlot), R(6), U8(4), U8(0),
B(Star), R(12),
- B(LdaFalse),
+ B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(13),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(12), U8(2),
- B(Star), R(12),
- B(LdaImmutableContextSlot), R(1), U8(5), U8(0),
+ B(LdaFalse),
+ B(Star), R(14),
+ /* 42 E> */ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(13), U8(2),
B(Star), R(13),
B(LdaSmi), I8(1),
- B(SuspendGenerator), R(13), U8(0),
- B(Ldar), R(12),
+ B(SuspendGenerator), R(12), U8(0),
+ B(Ldar), R(13),
/* 44 S> */ B(Return),
B(LdaSmi), I8(-2),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(13), U8(1),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(12), U8(1),
+ B(Star), R(13),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(12), U8(1),
B(Star), R(14),
- B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(13), U8(1),
- B(Star), R(15),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(15),
- B(JumpIfTrue), U8(42),
+ B(TestEqualStrictNoFeedback), R(14),
+ B(JumpIfTrue), U8(40),
B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(15),
- B(JumpIfTrue), U8(33),
- B(Jump), U8(2),
+ B(TestEqualStrictNoFeedback), R(14),
+ B(JumpIfTrue), U8(31),
B(LdaTrue),
- B(Star), R(17),
- B(Mov), R(14), R(16),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(16), U8(2),
- B(PopContext), R(2),
- B(PopContext), R(2),
- B(PopContext), R(2),
- B(PopContext), R(2),
- B(PopContext), R(2),
- B(PopContext), R(2),
- B(Star), R(9),
- B(LdaZero),
+ B(Star), R(16),
+ B(Mov), R(13), R(15),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(15), U8(2),
+ B(PopContext), R(11),
+ B(PopContext), R(11),
+ B(PopContext), R(11),
+ B(PopContext), R(11),
+ B(PopContext), R(11),
+ B(PopContext), R(11),
B(Star), R(8),
+ B(LdaZero),
+ B(Star), R(7),
B(Jump), U8(71),
- B(Ldar), R(14),
+ B(Ldar), R(13),
/* 36 E> */ B(Throw),
- B(PopContext), R(2),
+ B(PopContext), R(11),
B(LdaZero),
- B(StaContextSlot), R(1), U8(9), U8(0),
- B(JumpLoop), U8(214), I8(0),
+ B(StaContextSlot), R(6), U8(8), U8(0),
+ B(JumpLoop), U8(210), I8(0),
B(Jump), U8(44),
- B(Star), R(12),
- B(Ldar), R(closure),
- B(CreateCatchContext), R(12), U8(7), U8(8),
B(Star), R(11),
- B(PushContext), R(2),
- B(LdaContextSlot), R(1), U8(9), U8(0),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(11), U8(10), U8(11),
+ B(PushContext), R(11),
+ B(Star), R(10),
+ B(LdaContextSlot), R(6), U8(8), U8(0),
B(Star), R(12),
B(LdaSmi), I8(2),
- B(TestEqualStrict), R(12), U8(15),
+ B(TestEqualStrict), R(12), U8(16),
B(JumpIfFalse), U8(8),
B(LdaSmi), I8(1),
- B(StaContextSlot), R(1), U8(9), U8(0),
+ B(StaContextSlot), R(6), U8(8), U8(0),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(12),
B(CallRuntime), U16(Runtime::kReThrow), R(12), U8(1),
- B(PopContext), R(2),
+ B(PopContext), R(11),
B(LdaSmi), I8(-1),
- B(Star), R(8),
+ B(Star), R(7),
B(Jump), U8(8),
- B(Star), R(9),
- B(LdaSmi), I8(1),
B(Star), R(8),
+ B(LdaSmi), I8(1),
+ B(Star), R(7),
B(LdaTheHole),
B(SetPendingMessage),
+ B(Star), R(9),
+ B(LdaContextSlot), R(6), U8(8), U8(0),
B(Star), R(10),
- B(LdaContextSlot), R(1), U8(9), U8(0),
- B(Star), R(11),
B(LdaZero),
- B(TestEqualStrict), R(11), U8(16),
+ B(TestEqualStrict), R(10), U8(17),
B(JumpIfTrue), U8(150),
- B(LdaContextSlot), R(1), U8(7), U8(0),
- B(Star), R(11),
- B(LdaNamedProperty), R(11), U8(9), U8(17),
- B(StaContextSlot), R(1), U8(11), U8(0),
- B(LdaContextSlot), R(1), U8(11), U8(0),
+ B(LdaContextSlot), R(6), U8(6), U8(0),
+ B(Star), R(10),
+ B(LdaNamedProperty), R(10), U8(12), U8(18),
+ B(StaContextSlot), R(6), U8(10), U8(0),
+ B(LdaContextSlot), R(6), U8(10), U8(0),
B(TestUndetectable),
B(JumpIfFalse), U8(4),
B(Jump), U8(127),
- B(LdaContextSlot), R(1), U8(9), U8(0),
- B(Star), R(11),
+ B(LdaContextSlot), R(6), U8(8), U8(0),
+ B(Star), R(10),
B(LdaSmi), I8(1),
- B(TestEqualStrict), R(11), U8(20),
+ B(TestEqualStrict), R(10), U8(21),
B(JumpIfFalse), U8(69),
- B(LdaContextSlot), R(1), U8(11), U8(0),
+ B(LdaContextSlot), R(6), U8(10), U8(0),
B(TestTypeOf), U8(5),
B(JumpIfFalse), U8(4),
B(Jump), U8(18),
- B(Wide), B(LdaSmi), I16(132),
+ B(Wide), B(LdaSmi), I16(130),
+ B(Star), R(10),
+ B(LdaConstant), U8(13),
B(Star), R(11),
- B(LdaConstant), U8(10),
- B(Star), R(12),
- B(CallRuntime), U16(Runtime::kNewTypeError), R(11), U8(2),
+ B(CallRuntime), U16(Runtime::kNewTypeError), R(10), U8(2),
B(Throw),
- B(Mov), R(context), R(11),
- B(LdaContextSlot), R(1), U8(11), U8(0),
+ B(Mov), R(context), R(10),
+ B(LdaContextSlot), R(6), U8(10), U8(0),
+ B(Star), R(11),
+ B(LdaContextSlot), R(6), U8(6), U8(0),
B(Star), R(12),
- B(LdaContextSlot), R(1), U8(7), U8(0),
- B(Star), R(13),
- B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(2),
+ B(InvokeIntrinsic), U8(Runtime::k_Call), R(11), U8(2),
B(Jump), U8(20),
- B(Star), R(12),
- B(Ldar), R(closure),
- B(CreateCatchContext), R(12), U8(7), U8(11),
B(Star), R(11),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(11), U8(10), U8(14),
+ B(Star), R(10),
B(LdaTheHole),
B(SetPendingMessage),
- B(Ldar), R(11),
- B(PushContext), R(2),
- B(PopContext), R(2),
+ B(Ldar), R(10),
+ B(PushContext), R(11),
+ B(PopContext), R(11),
B(Jump), U8(47),
- B(LdaContextSlot), R(1), U8(11), U8(0),
- B(Star), R(11),
- B(LdaContextSlot), R(1), U8(7), U8(0),
- B(Star), R(12),
- B(InvokeIntrinsic), U8(Runtime::k_Call), R(11), U8(2),
- B(StaContextSlot), R(1), U8(12), U8(0),
- B(LdaContextSlot), R(1), U8(12), U8(0),
+ B(LdaContextSlot), R(6), U8(10), U8(0),
+ B(Star), R(10),
+ B(LdaContextSlot), R(6), U8(6), U8(0),
B(Star), R(11),
- B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(11), U8(1),
+ B(InvokeIntrinsic), U8(Runtime::k_Call), R(10), U8(2),
+ B(StaContextSlot), R(6), U8(11), U8(0),
+ B(LdaContextSlot), R(6), U8(11), U8(0),
+ B(Star), R(10),
+ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(10), U8(1),
B(JumpIfToBooleanFalse), U8(4),
B(Jump), U8(13),
- B(LdaContextSlot), R(1), U8(12), U8(0),
- B(Star), R(11),
- B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
- B(Ldar), R(10),
+ B(LdaContextSlot), R(6), U8(11), U8(0),
+ B(Star), R(10),
+ B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
+ B(Ldar), R(9),
B(SetPendingMessage),
+ B(Ldar), R(7),
+ B(SwitchOnSmiNoFeedback), U8(15), U8(2), I8(0),
+ B(Jump), U8(27),
+ B(PopContext), R(6),
+ B(PopContext), R(6),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(8),
- B(JumpIfTrue), U8(10),
- B(LdaSmi), I8(1),
- B(TestEqualStrictNoFeedback), R(8),
- B(JumpIfTrue), U8(17),
- B(Jump), U8(28),
- B(PopContext), R(1),
- B(PopContext), R(1),
+ B(Star), R(3),
+ B(Mov), R(8), R(4),
+ B(Jump), U8(46),
+ B(PopContext), R(6),
+ B(PopContext), R(6),
B(LdaSmi), I8(1),
- B(Star), R(5),
- B(Mov), R(9), R(6),
- B(Jump), U8(47),
- B(PopContext), R(1),
- B(PopContext), R(1),
- B(LdaSmi), I8(2),
- B(Star), R(5),
- B(Mov), R(9), R(6),
- B(Jump), U8(34),
- B(PopContext), R(1),
+ B(Star), R(3),
+ B(Mov), R(8), R(4),
+ B(Jump), U8(33),
+ B(PopContext), R(6),
B(LdaUndefined),
- B(Star), R(8),
- B(LdaTrue),
- B(Star), R(9),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(8), U8(2),
B(Star), R(6),
- B(LdaSmi), I8(3),
- B(Star), R(5),
+ B(LdaTrue),
+ B(Star), R(7),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
B(Jump), U8(14),
B(LdaSmi), I8(-1),
- B(Star), R(5),
+ B(Star), R(3),
B(Jump), U8(8),
- B(Star), R(6),
- B(LdaSmi), I8(4),
- B(Star), R(5),
+ B(Star), R(4),
+ B(LdaSmi), I8(1),
+ B(Star), R(3),
B(LdaTheHole),
B(SetPendingMessage),
- B(Star), R(7),
- B(LdaImmutableCurrentContextSlot), U8(5),
- B(Star), R(8),
- B(CallRuntime), U16(Runtime::k_GeneratorClose), R(8), U8(1),
- B(Ldar), R(7),
+ B(Star), R(5),
+ B(LdaImmutableCurrentContextSlot), U8(4),
+ B(Star), R(6),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(6), U8(1),
+ B(Ldar), R(5),
B(SetPendingMessage),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(5),
- B(JumpIfTrue), U8(28),
- B(LdaSmi), I8(1),
- B(TestEqualStrictNoFeedback), R(5),
- B(JumpIfTrue), U8(25),
- B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(5),
- B(JumpIfTrue), U8(22),
- B(LdaSmi), I8(3),
- B(TestEqualStrictNoFeedback), R(5),
- B(JumpIfTrue), U8(19),
- B(LdaSmi), I8(4),
- B(TestEqualStrictNoFeedback), R(5),
- B(JumpIfTrue), U8(16),
- B(Jump), U8(17),
- B(Ldar), R(6),
- /* 44 S> */ B(Return),
- B(Ldar), R(6),
- /* 44 S> */ B(Return),
- B(Ldar), R(6),
- B(ReThrow),
- B(Ldar), R(6),
+ B(Ldar), R(3),
+ B(SwitchOnSmiNoFeedback), U8(18), U8(2), I8(0),
+ B(Jump), U8(8),
+ B(Ldar), R(4),
/* 44 S> */ B(Return),
- B(Ldar), R(6),
+ B(Ldar), R(4),
B(ReThrow),
B(LdaUndefined),
/* 44 S> */ B(Return),
]
constant pool: [
+ Smi [52],
+ Smi [146],
FIXED_ARRAY_TYPE,
- CONSTANT_ELEMENTS_PAIR_TYPE,
+ TUPLE2_TYPE,
SYMBOL_TYPE,
+ Smi [142],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
@@ -616,12 +556,16 @@ constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
FIXED_ARRAY_TYPE,
- Smi [563],
+ Smi [6],
+ Smi [18],
+ Smi [552],
+ Smi [6],
+ Smi [9],
]
handlers: [
- [51, 675, 681],
- [146, 437, 443],
- [149, 393, 395],
- [530, 546, 548],
+ [51, 648, 654],
+ [130, 417, 423],
+ [133, 373, 375],
+ [510, 526, 528],
]
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/GlobalCompoundExpressions.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/GlobalCompoundExpressions.golden
index b085a663ea..20be404cac 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/GlobalCompoundExpressions.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/GlobalCompoundExpressions.golden
@@ -17,9 +17,9 @@ parameter count: 1
bytecode array length: 11
bytecodes: [
/* 26 E> */ B(StackCheck),
- /* 31 S> */ B(LdaGlobal), U8(0), U8(2),
- B(BitwiseAndSmi), I8(1), U8(4),
- /* 45 E> */ B(StaGlobalSloppy), U8(0), U8(5),
+ /* 31 S> */ B(LdaGlobal), U8(0), U8(3),
+ B(BitwiseAndSmi), I8(1), U8(5),
+ /* 45 E> */ B(StaGlobalSloppy), U8(0), U8(6),
/* 51 S> */ B(Return),
]
constant pool: [
@@ -39,9 +39,9 @@ parameter count: 1
bytecode array length: 11
bytecodes: [
/* 27 E> */ B(StackCheck),
- /* 32 S> */ B(LdaGlobal), U8(0), U8(2),
- B(AddSmi), I8(1), U8(4),
- /* 51 E> */ B(StaGlobalSloppy), U8(0), U8(5),
+ /* 32 S> */ B(LdaGlobal), U8(0), U8(3),
+ B(AddSmi), I8(1), U8(5),
+ /* 51 E> */ B(StaGlobalSloppy), U8(0), U8(6),
/* 57 S> */ B(Return),
]
constant pool: [
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/GlobalCountOperators.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/GlobalCountOperators.golden
index c40db11faf..e76e402f79 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/GlobalCountOperators.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/GlobalCountOperators.golden
@@ -17,9 +17,9 @@ parameter count: 1
bytecode array length: 10
bytecodes: [
/* 26 E> */ B(StackCheck),
- /* 31 S> */ B(LdaGlobal), U8(0), U8(2),
- B(Inc), U8(6),
- /* 40 E> */ B(StaGlobalSloppy), U8(0), U8(4),
+ /* 31 S> */ B(LdaGlobal), U8(0), U8(3),
+ B(Inc), U8(7),
+ /* 40 E> */ B(StaGlobalSloppy), U8(0), U8(5),
/* 48 S> */ B(Return),
]
constant pool: [
@@ -39,11 +39,11 @@ parameter count: 1
bytecode array length: 17
bytecodes: [
/* 26 E> */ B(StackCheck),
- /* 31 S> */ B(LdaGlobal), U8(0), U8(2),
- B(ToNumber), R(0), U8(6),
+ /* 31 S> */ B(LdaGlobal), U8(0), U8(3),
+ B(ToNumber), R(0), U8(7),
B(Ldar), R(0),
- B(Dec), U8(6),
- /* 44 E> */ B(StaGlobalSloppy), U8(0), U8(4),
+ B(Dec), U8(7),
+ /* 44 E> */ B(StaGlobalSloppy), U8(0), U8(5),
B(Ldar), R(0),
/* 48 S> */ B(Return),
]
@@ -64,9 +64,9 @@ parameter count: 1
bytecode array length: 10
bytecodes: [
/* 27 E> */ B(StackCheck),
- /* 46 S> */ B(LdaGlobal), U8(0), U8(2),
- B(Dec), U8(6),
- /* 55 E> */ B(StaGlobalStrict), U8(0), U8(4),
+ /* 46 S> */ B(LdaGlobal), U8(0), U8(3),
+ B(Dec), U8(7),
+ /* 55 E> */ B(StaGlobalStrict), U8(0), U8(5),
/* 68 S> */ B(Return),
]
constant pool: [
@@ -86,11 +86,11 @@ parameter count: 1
bytecode array length: 17
bytecodes: [
/* 27 E> */ B(StackCheck),
- /* 32 S> */ B(LdaGlobal), U8(0), U8(2),
- B(ToNumber), R(0), U8(6),
+ /* 32 S> */ B(LdaGlobal), U8(0), U8(3),
+ B(ToNumber), R(0), U8(7),
B(Ldar), R(0),
- B(Inc), U8(6),
- /* 50 E> */ B(StaGlobalSloppy), U8(0), U8(4),
+ B(Inc), U8(7),
+ /* 50 E> */ B(StaGlobalSloppy), U8(0), U8(5),
B(Ldar), R(0),
/* 54 S> */ B(Return),
]
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/GlobalDelete.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/GlobalDelete.golden
index 9491511c56..5bfea8531b 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/GlobalDelete.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/GlobalDelete.golden
@@ -19,7 +19,7 @@ parameter count: 1
bytecode array length: 11
bytecodes: [
/* 32 E> */ B(StackCheck),
- /* 39 S> */ B(LdaGlobal), U8(0), U8(2),
+ /* 39 S> */ B(LdaGlobal), U8(0), U8(3),
B(Star), R(0),
B(LdaConstant), U8(1),
B(DeletePropertySloppy), R(0),
@@ -46,7 +46,7 @@ parameter count: 1
bytecode array length: 11
bytecodes: [
/* 28 E> */ B(StackCheck),
- /* 51 S> */ B(LdaGlobal), U8(0), U8(2),
+ /* 51 S> */ B(LdaGlobal), U8(0), U8(3),
B(Star), R(0),
B(LdaSmi), I8(1),
B(DeletePropertyStrict), R(0),
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/IfConditions.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/IfConditions.golden
index 77e010d831..452a36cab4 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/IfConditions.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/IfConditions.golden
@@ -121,7 +121,7 @@ bytecodes: [
B(Star), R(0),
/* 30 S> */ B(JumpIfToBooleanFalse), U8(11),
/* 43 S> */ B(Ldar), R(0),
- B(AddSmi), I8(1), U8(2),
+ B(AddSmi), I8(1), U8(3),
B(Star), R(0),
B(Jump), U8(5),
/* 66 S> */ B(LdaSmi), I8(2),
@@ -151,7 +151,7 @@ bytecode array length: 19
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 18 S> */ B(LdaZero),
- /* 24 E> */ B(TestLessThanOrEqual), R(arg0), U8(2),
+ /* 24 E> */ B(TestLessThanOrEqual), R(arg0), U8(3),
B(JumpIfFalse), U8(7),
/* 36 S> */ B(Wide), B(LdaSmi), I16(200),
/* 80 S> */ B(Return),
@@ -258,7 +258,7 @@ snippet: "
"
frame size: 2
parameter count: 2
-bytecode array length: 410
+bytecode array length: 156
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 24 S> */ B(LdaZero),
@@ -266,136 +266,136 @@ bytecodes: [
/* 35 S> */ B(LdaZero),
B(Star), R(1),
/* 38 S> */ B(LdaConstant), U8(0),
- /* 44 E> */ B(TestEqualStrict), R(0), U8(2),
- B(JumpIfFalseConstant), U8(1),
+ /* 44 E> */ B(TestEqualStrict), R(0), U8(3),
+ B(JumpIfFalse), U8(137),
/* 58 S> */ B(Mov), R(0), R(1),
- /* 65 S> */ B(Mov), R(1), R(0),
- /* 74 S> */ B(Mov), R(0), R(1),
- /* 81 S> */ B(Mov), R(1), R(0),
- /* 90 S> */ B(Mov), R(0), R(1),
- /* 97 S> */ B(Mov), R(1), R(0),
- /* 106 S> */ B(Mov), R(0), R(1),
- /* 113 S> */ B(Mov), R(1), R(0),
- /* 122 S> */ B(Mov), R(0), R(1),
- /* 129 S> */ B(Mov), R(1), R(0),
- /* 138 S> */ B(Mov), R(0), R(1),
- /* 145 S> */ B(Mov), R(1), R(0),
- /* 154 S> */ B(Mov), R(0), R(1),
- /* 161 S> */ B(Mov), R(1), R(0),
- /* 170 S> */ B(Mov), R(0), R(1),
- /* 177 S> */ B(Mov), R(1), R(0),
- /* 186 S> */ B(Mov), R(0), R(1),
- /* 193 S> */ B(Mov), R(1), R(0),
- /* 202 S> */ B(Mov), R(0), R(1),
- /* 209 S> */ B(Mov), R(1), R(0),
- /* 218 S> */ B(Mov), R(0), R(1),
- /* 225 S> */ B(Mov), R(1), R(0),
- /* 234 S> */ B(Mov), R(0), R(1),
- /* 241 S> */ B(Mov), R(1), R(0),
- /* 250 S> */ B(Mov), R(0), R(1),
- /* 257 S> */ B(Mov), R(1), R(0),
- /* 266 S> */ B(Mov), R(0), R(1),
- /* 273 S> */ B(Mov), R(1), R(0),
- /* 282 S> */ B(Mov), R(0), R(1),
- /* 289 S> */ B(Mov), R(1), R(0),
- /* 298 S> */ B(Mov), R(0), R(1),
- /* 305 S> */ B(Mov), R(1), R(0),
- /* 314 S> */ B(Mov), R(0), R(1),
- /* 321 S> */ B(Mov), R(1), R(0),
- /* 330 S> */ B(Mov), R(0), R(1),
- /* 337 S> */ B(Mov), R(1), R(0),
- /* 346 S> */ B(Mov), R(0), R(1),
- /* 353 S> */ B(Mov), R(1), R(0),
- /* 362 S> */ B(Mov), R(0), R(1),
- /* 369 S> */ B(Mov), R(1), R(0),
- /* 378 S> */ B(Mov), R(0), R(1),
- /* 385 S> */ B(Mov), R(1), R(0),
- /* 394 S> */ B(Mov), R(0), R(1),
- /* 401 S> */ B(Mov), R(1), R(0),
- /* 410 S> */ B(Mov), R(0), R(1),
- /* 417 S> */ B(Mov), R(1), R(0),
- /* 426 S> */ B(Mov), R(0), R(1),
- /* 433 S> */ B(Mov), R(1), R(0),
- /* 442 S> */ B(Mov), R(0), R(1),
- /* 449 S> */ B(Mov), R(1), R(0),
- /* 458 S> */ B(Mov), R(0), R(1),
- /* 465 S> */ B(Mov), R(1), R(0),
- /* 474 S> */ B(Mov), R(0), R(1),
- /* 481 S> */ B(Mov), R(1), R(0),
- /* 490 S> */ B(Mov), R(0), R(1),
- /* 497 S> */ B(Mov), R(1), R(0),
- /* 506 S> */ B(Mov), R(0), R(1),
- /* 513 S> */ B(Mov), R(1), R(0),
- /* 522 S> */ B(Mov), R(0), R(1),
- /* 529 S> */ B(Mov), R(1), R(0),
- /* 538 S> */ B(Mov), R(0), R(1),
- /* 545 S> */ B(Mov), R(1), R(0),
- /* 554 S> */ B(Mov), R(0), R(1),
- /* 561 S> */ B(Mov), R(1), R(0),
- /* 570 S> */ B(Mov), R(0), R(1),
- /* 577 S> */ B(Mov), R(1), R(0),
- /* 586 S> */ B(Mov), R(0), R(1),
- /* 593 S> */ B(Mov), R(1), R(0),
- /* 602 S> */ B(Mov), R(0), R(1),
- /* 609 S> */ B(Mov), R(1), R(0),
- /* 618 S> */ B(Mov), R(0), R(1),
- /* 625 S> */ B(Mov), R(1), R(0),
- /* 634 S> */ B(Mov), R(0), R(1),
- /* 641 S> */ B(Mov), R(1), R(0),
- /* 650 S> */ B(Mov), R(0), R(1),
- /* 657 S> */ B(Mov), R(1), R(0),
- /* 666 S> */ B(Mov), R(0), R(1),
- /* 673 S> */ B(Mov), R(1), R(0),
- /* 682 S> */ B(Mov), R(0), R(1),
- /* 689 S> */ B(Mov), R(1), R(0),
- /* 698 S> */ B(Mov), R(0), R(1),
- /* 705 S> */ B(Mov), R(1), R(0),
- /* 714 S> */ B(Mov), R(0), R(1),
- /* 721 S> */ B(Mov), R(1), R(0),
- /* 730 S> */ B(Mov), R(0), R(1),
- /* 737 S> */ B(Mov), R(1), R(0),
- /* 746 S> */ B(Mov), R(0), R(1),
- /* 753 S> */ B(Mov), R(1), R(0),
- /* 762 S> */ B(Mov), R(0), R(1),
- /* 769 S> */ B(Mov), R(1), R(0),
- /* 778 S> */ B(Mov), R(0), R(1),
- /* 785 S> */ B(Mov), R(1), R(0),
- /* 794 S> */ B(Mov), R(0), R(1),
- /* 801 S> */ B(Mov), R(1), R(0),
- /* 810 S> */ B(Mov), R(0), R(1),
- /* 817 S> */ B(Mov), R(1), R(0),
- /* 826 S> */ B(Mov), R(0), R(1),
- /* 833 S> */ B(Mov), R(1), R(0),
- /* 842 S> */ B(Mov), R(0), R(1),
- /* 849 S> */ B(Mov), R(1), R(0),
- /* 858 S> */ B(Mov), R(0), R(1),
- /* 865 S> */ B(Mov), R(1), R(0),
- /* 874 S> */ B(Mov), R(0), R(1),
- /* 881 S> */ B(Mov), R(1), R(0),
- /* 890 S> */ B(Mov), R(0), R(1),
- /* 897 S> */ B(Mov), R(1), R(0),
- /* 906 S> */ B(Mov), R(0), R(1),
- /* 913 S> */ B(Mov), R(1), R(0),
- /* 922 S> */ B(Mov), R(0), R(1),
- /* 929 S> */ B(Mov), R(1), R(0),
- /* 938 S> */ B(Mov), R(0), R(1),
- /* 945 S> */ B(Mov), R(1), R(0),
- /* 954 S> */ B(Mov), R(0), R(1),
- /* 961 S> */ B(Mov), R(1), R(0),
- /* 970 S> */ B(Mov), R(0), R(1),
- /* 977 S> */ B(Mov), R(1), R(0),
- /* 986 S> */ B(Mov), R(0), R(1),
- /* 993 S> */ B(Mov), R(1), R(0),
- /* 1002 S> */ B(Mov), R(0), R(1),
- /* 1009 S> */ B(Mov), R(1), R(0),
- /* 1018 S> */ B(Mov), R(0), R(1),
- /* 1025 S> */ B(Mov), R(1), R(0),
- /* 1034 S> */ B(Mov), R(0), R(1),
- /* 1041 S> */ B(Mov), R(1), R(0),
- /* 1050 S> */ B(Mov), R(0), R(1),
- /* 1057 S> */ B(Mov), R(1), R(0),
- /* 1066 S> */ B(Mov), R(0), R(1),
- /* 1073 S> */ B(Mov), R(1), R(0),
+ /* 65 S> */ B(Nop),
+ /* 74 S> */ B(Nop),
+ /* 81 S> */ B(Nop),
+ /* 90 S> */ B(Nop),
+ /* 97 S> */ B(Nop),
+ /* 106 S> */ B(Nop),
+ /* 113 S> */ B(Nop),
+ /* 122 S> */ B(Nop),
+ /* 129 S> */ B(Nop),
+ /* 138 S> */ B(Nop),
+ /* 145 S> */ B(Nop),
+ /* 154 S> */ B(Nop),
+ /* 161 S> */ B(Nop),
+ /* 170 S> */ B(Nop),
+ /* 177 S> */ B(Nop),
+ /* 186 S> */ B(Nop),
+ /* 193 S> */ B(Nop),
+ /* 202 S> */ B(Nop),
+ /* 209 S> */ B(Nop),
+ /* 218 S> */ B(Nop),
+ /* 225 S> */ B(Nop),
+ /* 234 S> */ B(Nop),
+ /* 241 S> */ B(Nop),
+ /* 250 S> */ B(Nop),
+ /* 257 S> */ B(Nop),
+ /* 266 S> */ B(Nop),
+ /* 273 S> */ B(Nop),
+ /* 282 S> */ B(Nop),
+ /* 289 S> */ B(Nop),
+ /* 298 S> */ B(Nop),
+ /* 305 S> */ B(Nop),
+ /* 314 S> */ B(Nop),
+ /* 321 S> */ B(Nop),
+ /* 330 S> */ B(Nop),
+ /* 337 S> */ B(Nop),
+ /* 346 S> */ B(Nop),
+ /* 353 S> */ B(Nop),
+ /* 362 S> */ B(Nop),
+ /* 369 S> */ B(Nop),
+ /* 378 S> */ B(Nop),
+ /* 385 S> */ B(Nop),
+ /* 394 S> */ B(Nop),
+ /* 401 S> */ B(Nop),
+ /* 410 S> */ B(Nop),
+ /* 417 S> */ B(Nop),
+ /* 426 S> */ B(Nop),
+ /* 433 S> */ B(Nop),
+ /* 442 S> */ B(Nop),
+ /* 449 S> */ B(Nop),
+ /* 458 S> */ B(Nop),
+ /* 465 S> */ B(Nop),
+ /* 474 S> */ B(Nop),
+ /* 481 S> */ B(Nop),
+ /* 490 S> */ B(Nop),
+ /* 497 S> */ B(Nop),
+ /* 506 S> */ B(Nop),
+ /* 513 S> */ B(Nop),
+ /* 522 S> */ B(Nop),
+ /* 529 S> */ B(Nop),
+ /* 538 S> */ B(Nop),
+ /* 545 S> */ B(Nop),
+ /* 554 S> */ B(Nop),
+ /* 561 S> */ B(Nop),
+ /* 570 S> */ B(Nop),
+ /* 577 S> */ B(Nop),
+ /* 586 S> */ B(Nop),
+ /* 593 S> */ B(Nop),
+ /* 602 S> */ B(Nop),
+ /* 609 S> */ B(Nop),
+ /* 618 S> */ B(Nop),
+ /* 625 S> */ B(Nop),
+ /* 634 S> */ B(Nop),
+ /* 641 S> */ B(Nop),
+ /* 650 S> */ B(Nop),
+ /* 657 S> */ B(Nop),
+ /* 666 S> */ B(Nop),
+ /* 673 S> */ B(Nop),
+ /* 682 S> */ B(Nop),
+ /* 689 S> */ B(Nop),
+ /* 698 S> */ B(Nop),
+ /* 705 S> */ B(Nop),
+ /* 714 S> */ B(Nop),
+ /* 721 S> */ B(Nop),
+ /* 730 S> */ B(Nop),
+ /* 737 S> */ B(Nop),
+ /* 746 S> */ B(Nop),
+ /* 753 S> */ B(Nop),
+ /* 762 S> */ B(Nop),
+ /* 769 S> */ B(Nop),
+ /* 778 S> */ B(Nop),
+ /* 785 S> */ B(Nop),
+ /* 794 S> */ B(Nop),
+ /* 801 S> */ B(Nop),
+ /* 810 S> */ B(Nop),
+ /* 817 S> */ B(Nop),
+ /* 826 S> */ B(Nop),
+ /* 833 S> */ B(Nop),
+ /* 842 S> */ B(Nop),
+ /* 849 S> */ B(Nop),
+ /* 858 S> */ B(Nop),
+ /* 865 S> */ B(Nop),
+ /* 874 S> */ B(Nop),
+ /* 881 S> */ B(Nop),
+ /* 890 S> */ B(Nop),
+ /* 897 S> */ B(Nop),
+ /* 906 S> */ B(Nop),
+ /* 913 S> */ B(Nop),
+ /* 922 S> */ B(Nop),
+ /* 929 S> */ B(Nop),
+ /* 938 S> */ B(Nop),
+ /* 945 S> */ B(Nop),
+ /* 954 S> */ B(Nop),
+ /* 961 S> */ B(Nop),
+ /* 970 S> */ B(Nop),
+ /* 977 S> */ B(Nop),
+ /* 986 S> */ B(Nop),
+ /* 993 S> */ B(Nop),
+ /* 1002 S> */ B(Nop),
+ /* 1009 S> */ B(Nop),
+ /* 1018 S> */ B(Nop),
+ /* 1025 S> */ B(Nop),
+ /* 1034 S> */ B(Nop),
+ /* 1041 S> */ B(Nop),
+ /* 1050 S> */ B(Nop),
+ /* 1057 S> */ B(Nop),
+ /* 1066 S> */ B(Nop),
+ /* 1073 S> */ B(Nop),
/* 1081 S> */ B(Wide), B(LdaSmi), I16(200),
/* 1117 S> */ B(Return),
/* 1102 S> */ B(Wide), B(LdaSmi), I16(-200),
@@ -405,7 +405,6 @@ bytecodes: [
]
constant pool: [
HEAP_NUMBER_TYPE [0.01],
- Smi [391],
]
handlers: [
]
@@ -485,7 +484,7 @@ snippet: "
"
frame size: 2
parameter count: 1
-bytecode array length: 407
+bytecode array length: 153
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 25 S> */ B(LdaZero),
@@ -493,135 +492,135 @@ bytecodes: [
/* 36 S> */ B(LdaZero),
B(Star), R(1),
/* 41 S> */ B(Ldar), R(0),
- B(JumpIfToBooleanFalseConstant), U8(0),
+ B(JumpIfToBooleanFalse), U8(137),
/* 52 S> */ B(Mov), R(0), R(1),
- /* 59 S> */ B(Mov), R(1), R(0),
- /* 68 S> */ B(Mov), R(0), R(1),
- /* 75 S> */ B(Mov), R(1), R(0),
- /* 84 S> */ B(Mov), R(0), R(1),
- /* 91 S> */ B(Mov), R(1), R(0),
- /* 100 S> */ B(Mov), R(0), R(1),
- /* 107 S> */ B(Mov), R(1), R(0),
- /* 116 S> */ B(Mov), R(0), R(1),
- /* 123 S> */ B(Mov), R(1), R(0),
- /* 132 S> */ B(Mov), R(0), R(1),
- /* 139 S> */ B(Mov), R(1), R(0),
- /* 148 S> */ B(Mov), R(0), R(1),
- /* 155 S> */ B(Mov), R(1), R(0),
- /* 164 S> */ B(Mov), R(0), R(1),
- /* 171 S> */ B(Mov), R(1), R(0),
- /* 180 S> */ B(Mov), R(0), R(1),
- /* 187 S> */ B(Mov), R(1), R(0),
- /* 196 S> */ B(Mov), R(0), R(1),
- /* 203 S> */ B(Mov), R(1), R(0),
- /* 212 S> */ B(Mov), R(0), R(1),
- /* 219 S> */ B(Mov), R(1), R(0),
- /* 228 S> */ B(Mov), R(0), R(1),
- /* 235 S> */ B(Mov), R(1), R(0),
- /* 244 S> */ B(Mov), R(0), R(1),
- /* 251 S> */ B(Mov), R(1), R(0),
- /* 260 S> */ B(Mov), R(0), R(1),
- /* 267 S> */ B(Mov), R(1), R(0),
- /* 276 S> */ B(Mov), R(0), R(1),
- /* 283 S> */ B(Mov), R(1), R(0),
- /* 292 S> */ B(Mov), R(0), R(1),
- /* 299 S> */ B(Mov), R(1), R(0),
- /* 308 S> */ B(Mov), R(0), R(1),
- /* 315 S> */ B(Mov), R(1), R(0),
- /* 324 S> */ B(Mov), R(0), R(1),
- /* 331 S> */ B(Mov), R(1), R(0),
- /* 340 S> */ B(Mov), R(0), R(1),
- /* 347 S> */ B(Mov), R(1), R(0),
- /* 356 S> */ B(Mov), R(0), R(1),
- /* 363 S> */ B(Mov), R(1), R(0),
- /* 372 S> */ B(Mov), R(0), R(1),
- /* 379 S> */ B(Mov), R(1), R(0),
- /* 388 S> */ B(Mov), R(0), R(1),
- /* 395 S> */ B(Mov), R(1), R(0),
- /* 404 S> */ B(Mov), R(0), R(1),
- /* 411 S> */ B(Mov), R(1), R(0),
- /* 420 S> */ B(Mov), R(0), R(1),
- /* 427 S> */ B(Mov), R(1), R(0),
- /* 436 S> */ B(Mov), R(0), R(1),
- /* 443 S> */ B(Mov), R(1), R(0),
- /* 452 S> */ B(Mov), R(0), R(1),
- /* 459 S> */ B(Mov), R(1), R(0),
- /* 468 S> */ B(Mov), R(0), R(1),
- /* 475 S> */ B(Mov), R(1), R(0),
- /* 484 S> */ B(Mov), R(0), R(1),
- /* 491 S> */ B(Mov), R(1), R(0),
- /* 500 S> */ B(Mov), R(0), R(1),
- /* 507 S> */ B(Mov), R(1), R(0),
- /* 516 S> */ B(Mov), R(0), R(1),
- /* 523 S> */ B(Mov), R(1), R(0),
- /* 532 S> */ B(Mov), R(0), R(1),
- /* 539 S> */ B(Mov), R(1), R(0),
- /* 548 S> */ B(Mov), R(0), R(1),
- /* 555 S> */ B(Mov), R(1), R(0),
- /* 564 S> */ B(Mov), R(0), R(1),
- /* 571 S> */ B(Mov), R(1), R(0),
- /* 580 S> */ B(Mov), R(0), R(1),
- /* 587 S> */ B(Mov), R(1), R(0),
- /* 596 S> */ B(Mov), R(0), R(1),
- /* 603 S> */ B(Mov), R(1), R(0),
- /* 612 S> */ B(Mov), R(0), R(1),
- /* 619 S> */ B(Mov), R(1), R(0),
- /* 628 S> */ B(Mov), R(0), R(1),
- /* 635 S> */ B(Mov), R(1), R(0),
- /* 644 S> */ B(Mov), R(0), R(1),
- /* 651 S> */ B(Mov), R(1), R(0),
- /* 660 S> */ B(Mov), R(0), R(1),
- /* 667 S> */ B(Mov), R(1), R(0),
- /* 676 S> */ B(Mov), R(0), R(1),
- /* 683 S> */ B(Mov), R(1), R(0),
- /* 692 S> */ B(Mov), R(0), R(1),
- /* 699 S> */ B(Mov), R(1), R(0),
- /* 708 S> */ B(Mov), R(0), R(1),
- /* 715 S> */ B(Mov), R(1), R(0),
- /* 724 S> */ B(Mov), R(0), R(1),
- /* 731 S> */ B(Mov), R(1), R(0),
- /* 740 S> */ B(Mov), R(0), R(1),
- /* 747 S> */ B(Mov), R(1), R(0),
- /* 756 S> */ B(Mov), R(0), R(1),
- /* 763 S> */ B(Mov), R(1), R(0),
- /* 772 S> */ B(Mov), R(0), R(1),
- /* 779 S> */ B(Mov), R(1), R(0),
- /* 788 S> */ B(Mov), R(0), R(1),
- /* 795 S> */ B(Mov), R(1), R(0),
- /* 804 S> */ B(Mov), R(0), R(1),
- /* 811 S> */ B(Mov), R(1), R(0),
- /* 820 S> */ B(Mov), R(0), R(1),
- /* 827 S> */ B(Mov), R(1), R(0),
- /* 836 S> */ B(Mov), R(0), R(1),
- /* 843 S> */ B(Mov), R(1), R(0),
- /* 852 S> */ B(Mov), R(0), R(1),
- /* 859 S> */ B(Mov), R(1), R(0),
- /* 868 S> */ B(Mov), R(0), R(1),
- /* 875 S> */ B(Mov), R(1), R(0),
- /* 884 S> */ B(Mov), R(0), R(1),
- /* 891 S> */ B(Mov), R(1), R(0),
- /* 900 S> */ B(Mov), R(0), R(1),
- /* 907 S> */ B(Mov), R(1), R(0),
- /* 916 S> */ B(Mov), R(0), R(1),
- /* 923 S> */ B(Mov), R(1), R(0),
- /* 932 S> */ B(Mov), R(0), R(1),
- /* 939 S> */ B(Mov), R(1), R(0),
- /* 948 S> */ B(Mov), R(0), R(1),
- /* 955 S> */ B(Mov), R(1), R(0),
- /* 964 S> */ B(Mov), R(0), R(1),
- /* 971 S> */ B(Mov), R(1), R(0),
- /* 980 S> */ B(Mov), R(0), R(1),
- /* 987 S> */ B(Mov), R(1), R(0),
- /* 996 S> */ B(Mov), R(0), R(1),
- /* 1003 S> */ B(Mov), R(1), R(0),
- /* 1012 S> */ B(Mov), R(0), R(1),
- /* 1019 S> */ B(Mov), R(1), R(0),
- /* 1028 S> */ B(Mov), R(0), R(1),
- /* 1035 S> */ B(Mov), R(1), R(0),
- /* 1044 S> */ B(Mov), R(0), R(1),
- /* 1051 S> */ B(Mov), R(1), R(0),
- /* 1060 S> */ B(Mov), R(0), R(1),
- /* 1067 S> */ B(Mov), R(1), R(0),
+ /* 59 S> */ B(Nop),
+ /* 68 S> */ B(Nop),
+ /* 75 S> */ B(Nop),
+ /* 84 S> */ B(Nop),
+ /* 91 S> */ B(Nop),
+ /* 100 S> */ B(Nop),
+ /* 107 S> */ B(Nop),
+ /* 116 S> */ B(Nop),
+ /* 123 S> */ B(Nop),
+ /* 132 S> */ B(Nop),
+ /* 139 S> */ B(Nop),
+ /* 148 S> */ B(Nop),
+ /* 155 S> */ B(Nop),
+ /* 164 S> */ B(Nop),
+ /* 171 S> */ B(Nop),
+ /* 180 S> */ B(Nop),
+ /* 187 S> */ B(Nop),
+ /* 196 S> */ B(Nop),
+ /* 203 S> */ B(Nop),
+ /* 212 S> */ B(Nop),
+ /* 219 S> */ B(Nop),
+ /* 228 S> */ B(Nop),
+ /* 235 S> */ B(Nop),
+ /* 244 S> */ B(Nop),
+ /* 251 S> */ B(Nop),
+ /* 260 S> */ B(Nop),
+ /* 267 S> */ B(Nop),
+ /* 276 S> */ B(Nop),
+ /* 283 S> */ B(Nop),
+ /* 292 S> */ B(Nop),
+ /* 299 S> */ B(Nop),
+ /* 308 S> */ B(Nop),
+ /* 315 S> */ B(Nop),
+ /* 324 S> */ B(Nop),
+ /* 331 S> */ B(Nop),
+ /* 340 S> */ B(Nop),
+ /* 347 S> */ B(Nop),
+ /* 356 S> */ B(Nop),
+ /* 363 S> */ B(Nop),
+ /* 372 S> */ B(Nop),
+ /* 379 S> */ B(Nop),
+ /* 388 S> */ B(Nop),
+ /* 395 S> */ B(Nop),
+ /* 404 S> */ B(Nop),
+ /* 411 S> */ B(Nop),
+ /* 420 S> */ B(Nop),
+ /* 427 S> */ B(Nop),
+ /* 436 S> */ B(Nop),
+ /* 443 S> */ B(Nop),
+ /* 452 S> */ B(Nop),
+ /* 459 S> */ B(Nop),
+ /* 468 S> */ B(Nop),
+ /* 475 S> */ B(Nop),
+ /* 484 S> */ B(Nop),
+ /* 491 S> */ B(Nop),
+ /* 500 S> */ B(Nop),
+ /* 507 S> */ B(Nop),
+ /* 516 S> */ B(Nop),
+ /* 523 S> */ B(Nop),
+ /* 532 S> */ B(Nop),
+ /* 539 S> */ B(Nop),
+ /* 548 S> */ B(Nop),
+ /* 555 S> */ B(Nop),
+ /* 564 S> */ B(Nop),
+ /* 571 S> */ B(Nop),
+ /* 580 S> */ B(Nop),
+ /* 587 S> */ B(Nop),
+ /* 596 S> */ B(Nop),
+ /* 603 S> */ B(Nop),
+ /* 612 S> */ B(Nop),
+ /* 619 S> */ B(Nop),
+ /* 628 S> */ B(Nop),
+ /* 635 S> */ B(Nop),
+ /* 644 S> */ B(Nop),
+ /* 651 S> */ B(Nop),
+ /* 660 S> */ B(Nop),
+ /* 667 S> */ B(Nop),
+ /* 676 S> */ B(Nop),
+ /* 683 S> */ B(Nop),
+ /* 692 S> */ B(Nop),
+ /* 699 S> */ B(Nop),
+ /* 708 S> */ B(Nop),
+ /* 715 S> */ B(Nop),
+ /* 724 S> */ B(Nop),
+ /* 731 S> */ B(Nop),
+ /* 740 S> */ B(Nop),
+ /* 747 S> */ B(Nop),
+ /* 756 S> */ B(Nop),
+ /* 763 S> */ B(Nop),
+ /* 772 S> */ B(Nop),
+ /* 779 S> */ B(Nop),
+ /* 788 S> */ B(Nop),
+ /* 795 S> */ B(Nop),
+ /* 804 S> */ B(Nop),
+ /* 811 S> */ B(Nop),
+ /* 820 S> */ B(Nop),
+ /* 827 S> */ B(Nop),
+ /* 836 S> */ B(Nop),
+ /* 843 S> */ B(Nop),
+ /* 852 S> */ B(Nop),
+ /* 859 S> */ B(Nop),
+ /* 868 S> */ B(Nop),
+ /* 875 S> */ B(Nop),
+ /* 884 S> */ B(Nop),
+ /* 891 S> */ B(Nop),
+ /* 900 S> */ B(Nop),
+ /* 907 S> */ B(Nop),
+ /* 916 S> */ B(Nop),
+ /* 923 S> */ B(Nop),
+ /* 932 S> */ B(Nop),
+ /* 939 S> */ B(Nop),
+ /* 948 S> */ B(Nop),
+ /* 955 S> */ B(Nop),
+ /* 964 S> */ B(Nop),
+ /* 971 S> */ B(Nop),
+ /* 980 S> */ B(Nop),
+ /* 987 S> */ B(Nop),
+ /* 996 S> */ B(Nop),
+ /* 1003 S> */ B(Nop),
+ /* 1012 S> */ B(Nop),
+ /* 1019 S> */ B(Nop),
+ /* 1028 S> */ B(Nop),
+ /* 1035 S> */ B(Nop),
+ /* 1044 S> */ B(Nop),
+ /* 1051 S> */ B(Nop),
+ /* 1060 S> */ B(Nop),
+ /* 1067 S> */ B(Nop),
/* 1076 S> */ B(Wide), B(LdaSmi), I16(200),
/* 1112 S> */ B(Return),
/* 1097 S> */ B(Wide), B(LdaSmi), I16(-200),
@@ -630,7 +629,6 @@ bytecodes: [
/* 1112 S> */ B(Return),
]
constant pool: [
- Smi [391],
]
handlers: [
]
@@ -656,32 +654,32 @@ bytecode array length: 81
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 21 S> */ B(Ldar), R(arg1),
- /* 27 E> */ B(TestEqual), R(arg0), U8(2),
+ /* 27 E> */ B(TestEqual), R(arg0), U8(3),
B(JumpIfFalse), U8(5),
/* 35 S> */ B(LdaSmi), I8(1),
/* 262 S> */ B(Return),
/* 49 S> */ B(Ldar), R(arg1),
- /* 55 E> */ B(TestEqualStrict), R(arg0), U8(3),
+ /* 55 E> */ B(TestEqualStrict), R(arg0), U8(4),
B(JumpIfFalse), U8(5),
/* 64 S> */ B(LdaSmi), I8(1),
/* 262 S> */ B(Return),
/* 78 S> */ B(Ldar), R(arg1),
- /* 84 E> */ B(TestLessThan), R(arg0), U8(4),
+ /* 84 E> */ B(TestLessThan), R(arg0), U8(5),
B(JumpIfFalse), U8(5),
/* 91 S> */ B(LdaSmi), I8(1),
/* 262 S> */ B(Return),
/* 105 S> */ B(Ldar), R(arg1),
- /* 111 E> */ B(TestGreaterThan), R(arg0), U8(5),
+ /* 111 E> */ B(TestGreaterThan), R(arg0), U8(6),
B(JumpIfFalse), U8(5),
/* 118 S> */ B(LdaSmi), I8(1),
/* 262 S> */ B(Return),
/* 132 S> */ B(Ldar), R(arg1),
- /* 138 E> */ B(TestLessThanOrEqual), R(arg0), U8(6),
+ /* 138 E> */ B(TestLessThanOrEqual), R(arg0), U8(7),
B(JumpIfFalse), U8(5),
/* 146 S> */ B(LdaSmi), I8(1),
/* 262 S> */ B(Return),
/* 160 S> */ B(Ldar), R(arg1),
- /* 166 E> */ B(TestGreaterThanOrEqual), R(arg0), U8(7),
+ /* 166 E> */ B(TestGreaterThanOrEqual), R(arg0), U8(8),
B(JumpIfFalse), U8(5),
/* 174 S> */ B(LdaSmi), I8(1),
/* 262 S> */ B(Return),
@@ -754,18 +752,18 @@ bytecode array length: 36
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 21 S> */ B(Ldar), R(arg1),
- /* 27 E> */ B(TestEqual), R(arg0), U8(2),
+ /* 27 E> */ B(TestEqual), R(arg0), U8(3),
B(JumpIfTrue), U8(8),
B(LdaZero),
- /* 37 E> */ B(TestLessThan), R(arg0), U8(3),
+ /* 37 E> */ B(TestLessThan), R(arg0), U8(4),
B(JumpIfFalse), U8(5),
/* 48 S> */ B(LdaSmi), I8(1),
/* 133 S> */ B(Return),
/* 67 S> */ B(LdaZero),
- /* 73 E> */ B(TestGreaterThan), R(arg0), U8(4),
+ /* 73 E> */ B(TestGreaterThan), R(arg0), U8(5),
B(JumpIfFalse), U8(10),
B(LdaZero),
- /* 82 E> */ B(TestGreaterThan), R(arg1), U8(5),
+ /* 82 E> */ B(TestGreaterThan), R(arg1), U8(6),
B(JumpIfFalse), U8(4),
/* 93 S> */ B(LdaZero),
/* 133 S> */ B(Return),
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/JumpsRequiringConstantWideOperands.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/JumpsRequiringConstantWideOperands.golden
index 292247b425..0086de7bca 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/JumpsRequiringConstantWideOperands.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/JumpsRequiringConstantWideOperands.golden
@@ -957,19 +957,19 @@ bytecodes: [
/* 4103 S> */ B(LdaZero),
B(Star), R(1),
/* 4108 S> */ B(LdaSmi), I8(3),
- /* 4108 E> */ B(TestLessThan), R(1), U8(2),
+ /* 4108 E> */ B(TestLessThan), R(1), U8(3),
B(Wide), B(JumpIfFalse), U16(39),
/* 4090 E> */ B(StackCheck),
/* 4122 S> */ B(LdaSmi), I8(1),
- /* 4128 E> */ B(TestEqual), R(1), U8(4),
+ /* 4128 E> */ B(TestEqual), R(1), U8(5),
B(Wide), B(JumpIfFalse), U16(7),
/* 4134 S> */ B(Wide), B(Jump), U16(16),
/* 4146 S> */ B(LdaSmi), I8(2),
- /* 4152 E> */ B(TestEqual), R(1), U8(5),
+ /* 4152 E> */ B(TestEqual), R(1), U8(6),
B(Wide), B(JumpIfFalse), U16(7),
/* 4158 S> */ B(Wide), B(Jump), U16(12),
/* 4114 S> */ B(Ldar), R(1),
- B(Inc), U8(3),
+ B(Inc), U8(4),
B(Star), R(1),
B(JumpLoop), U8(42), I8(0),
/* 4167 S> */ B(LdaSmi), I8(3),
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/LetVariable.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/LetVariable.golden
index 60f236f17a..9ac2838412 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/LetVariable.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/LetVariable.golden
@@ -11,10 +11,8 @@ snippet: "
"
frame size: 1
parameter count: 1
-bytecode array length: 10
+bytecode array length: 7
bytecodes: [
- B(LdaTheHole),
- B(Star), R(0),
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(10),
B(Star), R(0),
@@ -32,10 +30,8 @@ snippet: "
"
frame size: 1
parameter count: 1
-bytecode array length: 10
+bytecode array length: 7
bytecodes: [
- B(LdaTheHole),
- B(Star), R(0),
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(10),
B(Star), R(0),
@@ -53,7 +49,7 @@ snippet: "
"
frame size: 3
parameter count: 1
-bytecode array length: 29
+bytecode array length: 26
bytecodes: [
B(LdaTheHole),
B(Star), R(0),
@@ -66,7 +62,6 @@ bytecodes: [
B(Star), R(2),
/* 45 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
B(Mov), R(1), R(0),
- B(Mov), R(1), R(0),
B(LdaUndefined),
/* 52 S> */ B(Return),
]
@@ -82,10 +77,8 @@ snippet: "
"
frame size: 1
parameter count: 1
-bytecode array length: 14
+bytecode array length: 11
bytecodes: [
- B(LdaTheHole),
- B(Star), R(0),
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(10),
B(Star), R(0),
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/LetVariableContextSlot.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/LetVariableContextSlot.golden
index 5d10939959..d471754930 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/LetVariableContextSlot.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/LetVariableContextSlot.golden
@@ -17,7 +17,7 @@ bytecodes: [
B(PushContext), R(1),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(4),
- B(CreateClosure), U8(0), U8(2), U8(2),
+ B(CreateClosure), U8(0), U8(3), U8(2),
B(Star), R(0),
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(10),
@@ -43,7 +43,7 @@ bytecodes: [
B(PushContext), R(1),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(4),
- B(CreateClosure), U8(0), U8(2), U8(2),
+ B(CreateClosure), U8(0), U8(3), U8(2),
B(Star), R(0),
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(10),
@@ -69,7 +69,7 @@ bytecodes: [
B(PushContext), R(1),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(4),
- B(CreateClosure), U8(0), U8(2), U8(2),
+ B(CreateClosure), U8(0), U8(3), U8(2),
B(Star), R(0),
/* 30 E> */ B(StackCheck),
/* 45 S> */ B(LdaSmi), I8(20),
@@ -104,7 +104,7 @@ bytecodes: [
B(PushContext), R(1),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(4),
- B(CreateClosure), U8(0), U8(2), U8(2),
+ B(CreateClosure), U8(0), U8(3), U8(2),
B(Star), R(0),
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(10),
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/LoadGlobal.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/LoadGlobal.golden
index addfa78a98..537f38b956 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/LoadGlobal.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/LoadGlobal.golden
@@ -17,7 +17,7 @@ parameter count: 1
bytecode array length: 5
bytecodes: [
/* 21 E> */ B(StackCheck),
- /* 26 S> */ B(LdaGlobal), U8(0), U8(2),
+ /* 26 S> */ B(LdaGlobal), U8(0), U8(3),
/* 36 S> */ B(Return),
]
constant pool: [
@@ -37,7 +37,7 @@ parameter count: 1
bytecode array length: 5
bytecodes: [
/* 27 E> */ B(StackCheck),
- /* 32 S> */ B(LdaGlobal), U8(0), U8(2),
+ /* 32 S> */ B(LdaGlobal), U8(0), U8(3),
/* 42 S> */ B(Return),
]
constant pool: [
@@ -57,7 +57,7 @@ parameter count: 1
bytecode array length: 5
bytecodes: [
/* 17 E> */ B(StackCheck),
- /* 22 S> */ B(LdaGlobal), U8(0), U8(2),
+ /* 22 S> */ B(LdaGlobal), U8(0), U8(3),
/* 32 S> */ B(Return),
]
constant pool: [
@@ -208,262 +208,262 @@ bytecode array length: 652
bytecodes: [
/* 17 E> */ B(StackCheck),
/* 25 S> */ B(Nop),
- /* 26 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(2),
+ /* 26 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(3),
/* 35 S> */ B(Nop),
- /* 36 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(4),
+ /* 36 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(5),
/* 45 S> */ B(Nop),
- /* 46 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(6),
+ /* 46 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(7),
/* 55 S> */ B(Nop),
- /* 56 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(8),
+ /* 56 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(9),
/* 65 S> */ B(Nop),
- /* 66 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(10),
+ /* 66 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(11),
/* 75 S> */ B(Nop),
- /* 76 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(12),
+ /* 76 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(13),
/* 85 S> */ B(Nop),
- /* 86 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(14),
+ /* 86 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(15),
/* 95 S> */ B(Nop),
- /* 96 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(16),
+ /* 96 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(17),
/* 105 S> */ B(Nop),
- /* 106 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(18),
+ /* 106 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(19),
/* 115 S> */ B(Nop),
- /* 116 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(20),
+ /* 116 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(21),
/* 125 S> */ B(Nop),
- /* 126 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(22),
+ /* 126 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(23),
/* 135 S> */ B(Nop),
- /* 136 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(24),
+ /* 136 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(25),
/* 145 S> */ B(Nop),
- /* 146 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(26),
+ /* 146 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(27),
/* 155 S> */ B(Nop),
- /* 156 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(28),
+ /* 156 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(29),
/* 165 S> */ B(Nop),
- /* 166 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(30),
+ /* 166 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(31),
/* 175 S> */ B(Nop),
- /* 176 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(32),
+ /* 176 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(33),
/* 185 S> */ B(Nop),
- /* 186 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(34),
+ /* 186 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(35),
/* 195 S> */ B(Nop),
- /* 196 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(36),
+ /* 196 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(37),
/* 205 S> */ B(Nop),
- /* 206 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(38),
+ /* 206 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(39),
/* 215 S> */ B(Nop),
- /* 216 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(40),
+ /* 216 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(41),
/* 225 S> */ B(Nop),
- /* 226 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(42),
+ /* 226 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(43),
/* 235 S> */ B(Nop),
- /* 236 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(44),
+ /* 236 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(45),
/* 245 S> */ B(Nop),
- /* 246 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(46),
+ /* 246 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(47),
/* 255 S> */ B(Nop),
- /* 256 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(48),
+ /* 256 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(49),
/* 265 S> */ B(Nop),
- /* 266 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(50),
+ /* 266 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(51),
/* 275 S> */ B(Nop),
- /* 276 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(52),
+ /* 276 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(53),
/* 285 S> */ B(Nop),
- /* 286 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(54),
+ /* 286 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(55),
/* 295 S> */ B(Nop),
- /* 296 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(56),
+ /* 296 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(57),
/* 305 S> */ B(Nop),
- /* 306 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(58),
+ /* 306 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(59),
/* 315 S> */ B(Nop),
- /* 316 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(60),
+ /* 316 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(61),
/* 325 S> */ B(Nop),
- /* 326 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(62),
+ /* 326 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(63),
/* 335 S> */ B(Nop),
- /* 336 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(64),
+ /* 336 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(65),
/* 345 S> */ B(Nop),
- /* 346 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(66),
+ /* 346 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(67),
/* 355 S> */ B(Nop),
- /* 356 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(68),
+ /* 356 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(69),
/* 365 S> */ B(Nop),
- /* 366 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(70),
+ /* 366 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(71),
/* 375 S> */ B(Nop),
- /* 376 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(72),
+ /* 376 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(73),
/* 385 S> */ B(Nop),
- /* 386 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(74),
+ /* 386 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(75),
/* 395 S> */ B(Nop),
- /* 396 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(76),
+ /* 396 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(77),
/* 405 S> */ B(Nop),
- /* 406 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(78),
+ /* 406 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(79),
/* 415 S> */ B(Nop),
- /* 416 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(80),
+ /* 416 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(81),
/* 425 S> */ B(Nop),
- /* 426 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(82),
+ /* 426 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(83),
/* 435 S> */ B(Nop),
- /* 436 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(84),
+ /* 436 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(85),
/* 445 S> */ B(Nop),
- /* 446 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(86),
+ /* 446 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(87),
/* 455 S> */ B(Nop),
- /* 456 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(88),
+ /* 456 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(89),
/* 465 S> */ B(Nop),
- /* 466 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(90),
+ /* 466 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(91),
/* 475 S> */ B(Nop),
- /* 476 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(92),
+ /* 476 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(93),
/* 485 S> */ B(Nop),
- /* 486 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(94),
+ /* 486 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(95),
/* 495 S> */ B(Nop),
- /* 496 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(96),
+ /* 496 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(97),
/* 505 S> */ B(Nop),
- /* 506 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(98),
+ /* 506 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(99),
/* 515 S> */ B(Nop),
- /* 516 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(100),
+ /* 516 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(101),
/* 525 S> */ B(Nop),
- /* 526 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(102),
+ /* 526 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(103),
/* 535 S> */ B(Nop),
- /* 536 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(104),
+ /* 536 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(105),
/* 545 S> */ B(Nop),
- /* 546 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(106),
+ /* 546 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(107),
/* 555 S> */ B(Nop),
- /* 556 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(108),
+ /* 556 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(109),
/* 565 S> */ B(Nop),
- /* 566 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(110),
+ /* 566 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(111),
/* 575 S> */ B(Nop),
- /* 576 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(112),
+ /* 576 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(113),
/* 585 S> */ B(Nop),
- /* 586 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(114),
+ /* 586 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(115),
/* 595 S> */ B(Nop),
- /* 596 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(116),
+ /* 596 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(117),
/* 605 S> */ B(Nop),
- /* 606 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(118),
+ /* 606 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(119),
/* 615 S> */ B(Nop),
- /* 616 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(120),
+ /* 616 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(121),
/* 625 S> */ B(Nop),
- /* 626 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(122),
+ /* 626 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(123),
/* 635 S> */ B(Nop),
- /* 636 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(124),
+ /* 636 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(125),
/* 645 S> */ B(Nop),
- /* 646 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(126),
+ /* 646 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(127),
/* 655 S> */ B(Nop),
- /* 656 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(128),
+ /* 656 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(129),
/* 665 S> */ B(Nop),
- /* 666 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(130),
+ /* 666 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(131),
/* 675 S> */ B(Nop),
- /* 676 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(132),
+ /* 676 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(133),
/* 685 S> */ B(Nop),
- /* 686 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(134),
+ /* 686 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(135),
/* 695 S> */ B(Nop),
- /* 696 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(136),
+ /* 696 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(137),
/* 705 S> */ B(Nop),
- /* 706 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(138),
+ /* 706 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(139),
/* 715 S> */ B(Nop),
- /* 716 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(140),
+ /* 716 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(141),
/* 725 S> */ B(Nop),
- /* 726 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(142),
+ /* 726 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(143),
/* 735 S> */ B(Nop),
- /* 736 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(144),
+ /* 736 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(145),
/* 745 S> */ B(Nop),
- /* 746 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(146),
+ /* 746 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(147),
/* 755 S> */ B(Nop),
- /* 756 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(148),
+ /* 756 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(149),
/* 765 S> */ B(Nop),
- /* 766 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(150),
+ /* 766 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(151),
/* 775 S> */ B(Nop),
- /* 776 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(152),
+ /* 776 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(153),
/* 785 S> */ B(Nop),
- /* 786 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(154),
+ /* 786 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(155),
/* 795 S> */ B(Nop),
- /* 796 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(156),
+ /* 796 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(157),
/* 805 S> */ B(Nop),
- /* 806 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(158),
+ /* 806 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(159),
/* 815 S> */ B(Nop),
- /* 816 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(160),
+ /* 816 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(161),
/* 825 S> */ B(Nop),
- /* 826 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(162),
+ /* 826 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(163),
/* 835 S> */ B(Nop),
- /* 836 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(164),
+ /* 836 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(165),
/* 845 S> */ B(Nop),
- /* 846 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(166),
+ /* 846 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(167),
/* 855 S> */ B(Nop),
- /* 856 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(168),
+ /* 856 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(169),
/* 865 S> */ B(Nop),
- /* 866 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(170),
+ /* 866 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(171),
/* 875 S> */ B(Nop),
- /* 876 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(172),
+ /* 876 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(173),
/* 885 S> */ B(Nop),
- /* 886 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(174),
+ /* 886 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(175),
/* 895 S> */ B(Nop),
- /* 896 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(176),
+ /* 896 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(177),
/* 905 S> */ B(Nop),
- /* 906 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(178),
+ /* 906 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(179),
/* 915 S> */ B(Nop),
- /* 916 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(180),
+ /* 916 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(181),
/* 925 S> */ B(Nop),
- /* 926 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(182),
+ /* 926 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(183),
/* 935 S> */ B(Nop),
- /* 936 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(184),
+ /* 936 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(185),
/* 945 S> */ B(Nop),
- /* 946 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(186),
+ /* 946 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(187),
/* 955 S> */ B(Nop),
- /* 956 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(188),
+ /* 956 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(189),
/* 965 S> */ B(Nop),
- /* 966 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(190),
+ /* 966 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(191),
/* 975 S> */ B(Nop),
- /* 976 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(192),
+ /* 976 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(193),
/* 985 S> */ B(Nop),
- /* 986 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(194),
+ /* 986 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(195),
/* 995 S> */ B(Nop),
- /* 996 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(196),
+ /* 996 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(197),
/* 1005 S> */ B(Nop),
- /* 1006 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(198),
+ /* 1006 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(199),
/* 1015 S> */ B(Nop),
- /* 1016 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(200),
+ /* 1016 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(201),
/* 1025 S> */ B(Nop),
- /* 1026 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(202),
+ /* 1026 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(203),
/* 1035 S> */ B(Nop),
- /* 1036 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(204),
+ /* 1036 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(205),
/* 1045 S> */ B(Nop),
- /* 1046 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(206),
+ /* 1046 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(207),
/* 1055 S> */ B(Nop),
- /* 1056 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(208),
+ /* 1056 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(209),
/* 1065 S> */ B(Nop),
- /* 1066 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(210),
+ /* 1066 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(211),
/* 1075 S> */ B(Nop),
- /* 1076 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(212),
+ /* 1076 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(213),
/* 1085 S> */ B(Nop),
- /* 1086 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(214),
+ /* 1086 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(215),
/* 1095 S> */ B(Nop),
- /* 1096 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(216),
+ /* 1096 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(217),
/* 1105 S> */ B(Nop),
- /* 1106 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(218),
+ /* 1106 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(219),
/* 1115 S> */ B(Nop),
- /* 1116 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(220),
+ /* 1116 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(221),
/* 1125 S> */ B(Nop),
- /* 1126 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(222),
+ /* 1126 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(223),
/* 1135 S> */ B(Nop),
- /* 1136 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(224),
+ /* 1136 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(225),
/* 1145 S> */ B(Nop),
- /* 1146 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(226),
+ /* 1146 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(227),
/* 1155 S> */ B(Nop),
- /* 1156 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(228),
+ /* 1156 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(229),
/* 1165 S> */ B(Nop),
- /* 1166 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(230),
+ /* 1166 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(231),
/* 1175 S> */ B(Nop),
- /* 1176 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(232),
+ /* 1176 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(233),
/* 1185 S> */ B(Nop),
- /* 1186 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(234),
+ /* 1186 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(235),
/* 1195 S> */ B(Nop),
- /* 1196 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(236),
+ /* 1196 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(237),
/* 1205 S> */ B(Nop),
- /* 1206 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(238),
+ /* 1206 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(239),
/* 1215 S> */ B(Nop),
- /* 1216 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(240),
+ /* 1216 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(241),
/* 1225 S> */ B(Nop),
- /* 1226 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(242),
+ /* 1226 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(243),
/* 1235 S> */ B(Nop),
- /* 1236 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(244),
+ /* 1236 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(245),
/* 1245 S> */ B(Nop),
- /* 1246 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(246),
+ /* 1246 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(247),
/* 1255 S> */ B(Nop),
- /* 1256 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(248),
+ /* 1256 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(249),
/* 1265 S> */ B(Nop),
- /* 1266 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(250),
+ /* 1266 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(251),
/* 1275 S> */ B(Nop),
- /* 1276 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(252),
+ /* 1276 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(253),
/* 1285 S> */ B(Nop),
- /* 1286 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(254),
+ /* 1286 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(255),
/* 1295 S> */ B(Nop),
- /* 1296 E> */ B(Wide), B(LdaNamedProperty), R16(arg0), U16(0), U16(256),
- /* 1305 S> */ B(Wide), B(LdaGlobal), U16(1), U16(258),
+ /* 1296 E> */ B(Wide), B(LdaNamedProperty), R16(arg0), U16(0), U16(257),
+ /* 1305 S> */ B(Wide), B(LdaGlobal), U16(1), U16(259),
/* 1315 S> */ B(Return),
]
constant pool: [
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/LogicalExpressions.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/LogicalExpressions.golden
index 8cfa8474f9..2f109764a4 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/LogicalExpressions.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/LogicalExpressions.golden
@@ -37,7 +37,7 @@ bytecodes: [
/* 42 S> */ B(LdaZero),
B(Star), R(0),
/* 45 S> */ B(LdaSmi), I8(1),
- /* 55 E> */ B(TestEqual), R(0), U8(2),
+ /* 55 E> */ B(TestEqual), R(0), U8(3),
B(JumpIfTrue), U8(4),
B(LdaSmi), I8(3),
/* 67 S> */ B(Return),
@@ -79,7 +79,7 @@ bytecodes: [
/* 42 S> */ B(LdaZero),
B(Star), R(0),
/* 45 S> */ B(LdaZero),
- /* 55 E> */ B(TestEqual), R(0), U8(2),
+ /* 55 E> */ B(TestEqual), R(0), U8(3),
B(JumpIfFalse), U8(4),
B(LdaSmi), I8(3),
/* 67 S> */ B(Return),
@@ -556,7 +556,7 @@ bytecodes: [
/* 60 S> */ B(LdaSmi), I8(3),
B(Star), R(2),
/* 63 S> */ B(LdaSmi), I8(3),
- /* 73 E> */ B(TestGreaterThan), R(0), U8(2),
+ /* 73 E> */ B(TestGreaterThan), R(0), U8(3),
B(JumpIfTrueConstant), U8(0),
B(LdaSmi), I8(1),
B(Star), R(1),
@@ -743,7 +743,7 @@ bytecodes: [
/* 60 S> */ B(LdaSmi), I8(3),
B(Star), R(2),
/* 63 S> */ B(LdaSmi), I8(5),
- /* 73 E> */ B(TestLessThan), R(0), U8(2),
+ /* 73 E> */ B(TestLessThan), R(0), U8(3),
B(JumpIfFalseConstant), U8(0),
B(LdaSmi), I8(1),
B(Star), R(1),
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/LookupSlot.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/LookupSlot.golden
index 8ecf2c316d..d5501dc513 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/LookupSlot.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/LookupSlot.golden
@@ -23,7 +23,7 @@ bytecodes: [
B(Ldar), R(new_target),
B(StaCurrentContextSlot), U8(5),
/* 10 E> */ B(StackCheck),
- /* 14 S> */ B(LdaLookupGlobalSlot), U8(0), U8(4), U8(1),
+ /* 14 S> */ B(LdaLookupGlobalSlot), U8(0), U8(5), U8(1),
B(Star), R(1),
B(LdaConstant), U8(1),
B(Star), R(2),
@@ -38,8 +38,8 @@ bytecodes: [
B(Mov), R(closure), R(5),
B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(3), U8(6),
B(Star), R(1),
- /* 14 E> */ B(CallUndefinedReceiver1), R(1), R(2), U8(2),
- /* 35 S> */ B(LdaLookupGlobalSlot), U8(2), U8(6), U8(1),
+ /* 14 E> */ B(CallUndefinedReceiver1), R(1), R(2), U8(3),
+ /* 35 S> */ B(LdaLookupGlobalSlot), U8(2), U8(7), U8(1),
/* 45 S> */ B(Return),
]
constant pool: [
@@ -67,7 +67,7 @@ bytecodes: [
B(Ldar), R(new_target),
B(StaCurrentContextSlot), U8(5),
/* 10 E> */ B(StackCheck),
- /* 14 S> */ B(LdaLookupGlobalSlot), U8(0), U8(4), U8(1),
+ /* 14 S> */ B(LdaLookupGlobalSlot), U8(0), U8(5), U8(1),
B(Star), R(1),
B(LdaConstant), U8(1),
B(Star), R(2),
@@ -82,8 +82,8 @@ bytecodes: [
B(Mov), R(closure), R(5),
B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(3), U8(6),
B(Star), R(1),
- /* 14 E> */ B(CallUndefinedReceiver1), R(1), R(2), U8(2),
- /* 35 S> */ B(LdaLookupGlobalSlotInsideTypeof), U8(2), U8(6), U8(1),
+ /* 14 E> */ B(CallUndefinedReceiver1), R(1), R(2), U8(3),
+ /* 35 S> */ B(LdaLookupGlobalSlotInsideTypeof), U8(2), U8(7), U8(1),
B(TypeOf),
/* 52 S> */ B(Return),
]
@@ -114,7 +114,7 @@ bytecodes: [
/* 10 E> */ B(StackCheck),
/* 14 S> */ B(LdaSmi), I8(20),
/* 16 E> */ B(StaLookupSlotSloppy), U8(0),
- /* 22 S> */ B(LdaLookupGlobalSlot), U8(1), U8(4), U8(1),
+ /* 22 S> */ B(LdaLookupGlobalSlot), U8(1), U8(5), U8(1),
B(Star), R(1),
B(LdaConstant), U8(2),
B(Star), R(2),
@@ -129,7 +129,7 @@ bytecodes: [
B(Mov), R(closure), R(5),
B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(3), U8(6),
B(Star), R(1),
- /* 29 E> */ B(CallUndefinedReceiver1), R(1), R(2), U8(2),
+ /* 29 E> */ B(CallUndefinedReceiver1), R(1), R(2), U8(3),
/* 39 S> */ B(Return),
]
constant pool: [
@@ -162,7 +162,7 @@ bytecodes: [
B(Ldar), R(new_target),
B(StaCurrentContextSlot), U8(5),
/* 38 E> */ B(StackCheck),
- /* 44 S> */ B(LdaLookupGlobalSlot), U8(0), U8(4), U8(1),
+ /* 44 S> */ B(LdaLookupGlobalSlot), U8(0), U8(5), U8(1),
B(Star), R(1),
B(LdaConstant), U8(1),
B(Star), R(2),
@@ -177,7 +177,7 @@ bytecodes: [
B(Mov), R(closure), R(5),
B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(3), U8(6),
B(Star), R(1),
- /* 44 E> */ B(CallUndefinedReceiver1), R(1), R(2), U8(2),
+ /* 44 E> */ B(CallUndefinedReceiver1), R(1), R(2), U8(3),
/* 66 S> */ B(LdaLookupContextSlot), U8(2), U8(6), U8(1),
/* 76 S> */ B(Return),
]
@@ -211,7 +211,7 @@ bytecodes: [
B(Ldar), R(new_target),
B(StaCurrentContextSlot), U8(5),
/* 34 E> */ B(StackCheck),
- /* 40 S> */ B(LdaLookupGlobalSlot), U8(0), U8(4), U8(1),
+ /* 40 S> */ B(LdaLookupGlobalSlot), U8(0), U8(5), U8(1),
B(Star), R(1),
B(LdaConstant), U8(1),
B(Star), R(2),
@@ -226,8 +226,8 @@ bytecodes: [
B(Mov), R(closure), R(5),
B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(3), U8(6),
B(Star), R(1),
- /* 40 E> */ B(CallUndefinedReceiver1), R(1), R(2), U8(2),
- /* 62 S> */ B(LdaLookupGlobalSlot), U8(2), U8(6), U8(1),
+ /* 40 E> */ B(CallUndefinedReceiver1), R(1), R(2), U8(3),
+ /* 62 S> */ B(LdaLookupGlobalSlot), U8(2), U8(7), U8(1),
/* 72 S> */ B(Return),
]
constant pool: [
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/LookupSlotInEval.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/LookupSlotInEval.golden
index 9a40416535..77e2438dc0 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/LookupSlotInEval.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/LookupSlotInEval.golden
@@ -20,7 +20,7 @@ parameter count: 1
bytecode array length: 6
bytecodes: [
/* 10 E> */ B(StackCheck),
- /* 15 S> */ B(LdaLookupGlobalSlot), U8(0), U8(2), U8(1),
+ /* 15 S> */ B(LdaLookupGlobalSlot), U8(0), U8(3), U8(1),
/* 25 S> */ B(Return),
]
constant pool: [
@@ -93,7 +93,7 @@ parameter count: 1
bytecode array length: 7
bytecodes: [
/* 10 E> */ B(StackCheck),
- /* 15 S> */ B(LdaLookupGlobalSlotInsideTypeof), U8(0), U8(2), U8(1),
+ /* 15 S> */ B(LdaLookupGlobalSlotInsideTypeof), U8(0), U8(3), U8(1),
B(TypeOf),
/* 32 S> */ B(Return),
]
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/LookupSlotWideInEval.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/LookupSlotWideInEval.golden
index 2dcd93b231..f90c3668b7 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/LookupSlotWideInEval.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/LookupSlotWideInEval.golden
@@ -792,7 +792,7 @@ bytecodes: [
B(Star), R(0),
/* 3082 S> */ B(LdaConstant), U8(255),
B(Star), R(0),
- /* 3086 S> */ B(Wide), B(LdaLookupGlobalSlot), U16(256), U16(2), U16(1),
+ /* 3086 S> */ B(Wide), B(LdaLookupGlobalSlot), U16(256), U16(3), U16(1),
/* 3095 S> */ B(Return),
]
constant pool: [
@@ -1843,7 +1843,7 @@ bytecodes: [
B(Star), R(0),
/* 3082 S> */ B(LdaConstant), U8(255),
B(Star), R(0),
- /* 3086 S> */ B(Wide), B(LdaLookupGlobalSlotInsideTypeof), U16(256), U16(2), U16(1),
+ /* 3086 S> */ B(Wide), B(LdaLookupGlobalSlotInsideTypeof), U16(256), U16(3), U16(1),
B(TypeOf),
/* 3102 S> */ B(Return),
]
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/Modules.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/Modules.golden
index 510e573f54..2a44009043 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/Modules.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/Modules.golden
@@ -11,68 +11,62 @@ top level: yes
snippet: "
import \"bar\";
"
-frame size: 9
+frame size: 8
parameter count: 2
-bytecode array length: 143
+bytecode array length: 130
bytecodes: [
B(Ldar), R(new_target),
- B(JumpIfUndefined), U8(27),
- B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
- B(PushContext), R(2),
+ B(JumpIfUndefined), U8(25),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
+ B(PushContext), R(1),
B(ResumeGenerator), R(new_target),
- B(Star), R(1),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(1),
- B(JumpIfTrue), U8(64),
+ B(Star), R(0),
+ B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
B(LdaSmi), I8(79),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
B(LdaSmi), I8(-2),
- B(Star), R(1),
- B(LdaConstant), U8(0),
- B(Star), R(5),
- B(Mov), R(arg0), R(3),
- B(Mov), R(closure), R(4),
- B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
- B(PushContext), R(0),
- B(Ldar), R(this),
+ B(Star), R(0),
+ B(LdaConstant), U8(1),
+ B(Star), R(4),
+ B(Mov), R(arg0), R(2),
+ B(Mov), R(closure), R(3),
+ B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
+ B(PushContext), R(2),
+ B(Mov), R(this), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
B(StaCurrentContextSlot), U8(4),
/* 0 E> */ B(StackCheck),
B(LdaImmutableCurrentContextSlot), U8(4),
- B(Star), R(4),
- B(Mov), R(closure), R(3),
- /* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2),
- B(StaCurrentContextSlot), U8(5),
B(Star), R(3),
- B(LdaImmutableCurrentContextSlot), U8(5),
+ B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(4),
B(LdaZero),
- B(SuspendGenerator), R(4), U8(0),
- B(Ldar), R(3),
+ /* 0 E> */ B(SuspendGenerator), R(3), U8(0),
+ B(Ldar), R(4),
/* 13 S> */ B(Return),
B(LdaSmi), I8(-2),
- B(Star), R(1),
- B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(3), U8(1),
+ B(Star), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
B(Star), R(5),
- B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
- B(Star), R(6),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(6),
- B(JumpIfTrue), U8(24),
+ B(TestEqualStrictNoFeedback), R(5),
+ B(JumpIfTrue), U8(22),
B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(6),
- B(JumpIfTrue), U8(15),
- B(Jump), U8(2),
+ B(TestEqualStrictNoFeedback), R(5),
+ B(JumpIfTrue), U8(13),
B(LdaTrue),
- B(Star), R(8),
- B(Mov), R(5), R(7),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
+ B(Star), R(7),
+ B(Mov), R(4), R(6),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
/* 13 S> */ B(Return),
- B(Ldar), R(5),
+ B(Ldar), R(4),
/* 0 E> */ B(Throw),
- B(Ldar), R(5),
- B(StaCurrentContextSlot), U8(6),
- B(LdaCurrentContextSlot), U8(6),
+ B(Ldar), R(4),
+ B(StaCurrentContextSlot), U8(5),
+ B(LdaCurrentContextSlot), U8(5),
B(Star), R(3),
B(LdaTrue),
B(Star), R(4),
@@ -80,6 +74,7 @@ bytecodes: [
/* 13 S> */ B(Return),
]
constant pool: [
+ Smi [59],
FIXED_ARRAY_TYPE,
]
handlers: [
@@ -89,68 +84,62 @@ handlers: [
snippet: "
import {foo} from \"bar\";
"
-frame size: 9
+frame size: 8
parameter count: 2
-bytecode array length: 143
+bytecode array length: 130
bytecodes: [
B(Ldar), R(new_target),
- B(JumpIfUndefined), U8(27),
- B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
- B(PushContext), R(2),
+ B(JumpIfUndefined), U8(25),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
+ B(PushContext), R(1),
B(ResumeGenerator), R(new_target),
- B(Star), R(1),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(1),
- B(JumpIfTrue), U8(64),
+ B(Star), R(0),
+ B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
B(LdaSmi), I8(79),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
B(LdaSmi), I8(-2),
- B(Star), R(1),
- B(LdaConstant), U8(0),
- B(Star), R(5),
- B(Mov), R(arg0), R(3),
- B(Mov), R(closure), R(4),
- B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
- B(PushContext), R(0),
- B(Ldar), R(this),
+ B(Star), R(0),
+ B(LdaConstant), U8(1),
+ B(Star), R(4),
+ B(Mov), R(arg0), R(2),
+ B(Mov), R(closure), R(3),
+ B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
+ B(PushContext), R(2),
+ B(Mov), R(this), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
B(StaCurrentContextSlot), U8(4),
/* 0 E> */ B(StackCheck),
B(LdaImmutableCurrentContextSlot), U8(4),
- B(Star), R(4),
- B(Mov), R(closure), R(3),
- /* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2),
- B(StaCurrentContextSlot), U8(5),
B(Star), R(3),
- B(LdaImmutableCurrentContextSlot), U8(5),
+ B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(4),
B(LdaZero),
- B(SuspendGenerator), R(4), U8(0),
- B(Ldar), R(3),
+ /* 0 E> */ B(SuspendGenerator), R(3), U8(0),
+ B(Ldar), R(4),
/* 24 S> */ B(Return),
B(LdaSmi), I8(-2),
- B(Star), R(1),
- B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(3), U8(1),
+ B(Star), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
B(Star), R(5),
- B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
- B(Star), R(6),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(6),
- B(JumpIfTrue), U8(24),
+ B(TestEqualStrictNoFeedback), R(5),
+ B(JumpIfTrue), U8(22),
B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(6),
- B(JumpIfTrue), U8(15),
- B(Jump), U8(2),
+ B(TestEqualStrictNoFeedback), R(5),
+ B(JumpIfTrue), U8(13),
B(LdaTrue),
- B(Star), R(8),
- B(Mov), R(5), R(7),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
+ B(Star), R(7),
+ B(Mov), R(4), R(6),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
/* 24 S> */ B(Return),
- B(Ldar), R(5),
+ B(Ldar), R(4),
/* 0 E> */ B(Throw),
- B(Ldar), R(5),
- B(StaCurrentContextSlot), U8(6),
- B(LdaCurrentContextSlot), U8(6),
+ B(Ldar), R(4),
+ B(StaCurrentContextSlot), U8(5),
+ B(LdaCurrentContextSlot), U8(5),
B(Star), R(3),
B(LdaTrue),
B(Star), R(4),
@@ -158,6 +147,7 @@ bytecodes: [
/* 24 S> */ B(Return),
]
constant pool: [
+ Smi [59],
FIXED_ARRAY_TYPE,
]
handlers: [
@@ -169,100 +159,95 @@ snippet: "
goo(42);
{ let x; { goo(42) } };
"
-frame size: 10
+frame size: 8
parameter count: 2
-bytecode array length: 205
+bytecode array length: 192
bytecodes: [
B(Ldar), R(new_target),
- B(JumpIfUndefined), U8(27),
- B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
- B(PushContext), R(3),
+ B(JumpIfUndefined), U8(25),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
+ B(PushContext), R(1),
B(ResumeGenerator), R(new_target),
- B(Star), R(2),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(2),
- B(JumpIfTrue), U8(64),
+ B(Star), R(0),
+ B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
B(LdaSmi), I8(79),
- B(Star), R(4),
- B(CallRuntime), U16(Runtime::kAbort), R(4), U8(1),
- B(LdaSmi), I8(-2),
B(Star), R(2),
- B(LdaConstant), U8(0),
- B(Star), R(6),
- B(Mov), R(arg0), R(4),
- B(Mov), R(closure), R(5),
- B(CallRuntime), U16(Runtime::kPushModuleContext), R(4), U8(3),
- B(PushContext), R(0),
- B(Ldar), R(this),
+ B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
+ B(LdaSmi), I8(-2),
+ B(Star), R(0),
+ B(LdaConstant), U8(1),
+ B(Star), R(4),
+ B(Mov), R(arg0), R(2),
+ B(Mov), R(closure), R(3),
+ B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
+ B(PushContext), R(2),
+ B(Mov), R(this), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
B(StaCurrentContextSlot), U8(4),
/* 0 E> */ B(StackCheck),
B(LdaImmutableCurrentContextSlot), U8(4),
- B(Star), R(5),
- B(Mov), R(closure), R(4),
- /* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(4), U8(2),
- B(StaCurrentContextSlot), U8(5),
+ B(Star), R(3),
+ B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(4),
- B(LdaImmutableCurrentContextSlot), U8(5),
- B(Star), R(5),
B(LdaZero),
- B(SuspendGenerator), R(5), U8(0),
+ /* 0 E> */ B(SuspendGenerator), R(3), U8(0),
B(Ldar), R(4),
/* 64 S> */ B(Return),
B(LdaSmi), I8(-2),
- B(Star), R(2),
- B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(5), U8(1),
- B(Star), R(6),
- B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(5), U8(1),
- B(Star), R(7),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(3), U8(1),
+ B(Star), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
+ B(Star), R(5),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(7),
- B(JumpIfTrue), U8(24),
+ B(TestEqualStrictNoFeedback), R(5),
+ B(JumpIfTrue), U8(22),
B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(7),
- B(JumpIfTrue), U8(15),
- B(Jump), U8(2),
+ B(TestEqualStrictNoFeedback), R(5),
+ B(JumpIfTrue), U8(13),
B(LdaTrue),
- B(Star), R(9),
- B(Mov), R(6), R(8),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(8), U8(2),
+ B(Star), R(7),
+ B(Mov), R(4), R(6),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
/* 64 S> */ B(Return),
- B(Ldar), R(6),
+ B(Ldar), R(4),
/* 0 E> */ B(Throw),
/* 32 S> */ B(LdaModuleVariable), I8(-1), U8(0),
B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(1),
- B(Star), R(5),
- B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1),
+ B(LdaConstant), U8(2),
B(Star), R(4),
+ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
+ B(Star), R(3),
B(LdaSmi), I8(42),
- B(Star), R(5),
- /* 32 E> */ B(CallUndefinedReceiver1), R(4), R(5), U8(2),
+ B(Star), R(4),
+ /* 32 E> */ B(CallUndefinedReceiver1), R(3), R(4), U8(3),
B(Ldar), R(closure),
- B(CreateBlockContext), U8(2),
- B(PushContext), R(1),
+ B(CreateBlockContext), U8(3),
+ B(PushContext), R(3),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(4),
/* 47 S> */ B(LdaUndefined),
/* 47 E> */ B(StaCurrentContextSlot), U8(4),
/* 52 S> */ B(LdaModuleVariable), I8(-1), U8(1),
B(JumpIfNotHole), U8(11),
- B(LdaConstant), U8(1),
+ B(LdaConstant), U8(2),
B(Star), R(5),
B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1),
B(Star), R(4),
B(LdaSmi), I8(42),
B(Star), R(5),
- /* 52 E> */ B(CallUndefinedReceiver1), R(4), R(5), U8(4),
- B(StaContextSlot), R(1), U8(6), U8(0),
- B(PopContext), R(1),
- B(LdaCurrentContextSlot), U8(6),
- B(Star), R(4),
+ /* 52 E> */ B(CallUndefinedReceiver1), R(4), R(5), U8(5),
+ B(StaContextSlot), R(3), U8(5), U8(0),
+ B(PopContext), R(3),
+ B(LdaCurrentContextSlot), U8(5),
+ B(Star), R(3),
B(LdaTrue),
- B(Star), R(5),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(4), U8(2),
+ B(Star), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(3), U8(2),
/* 64 S> */ B(Return),
]
constant pool: [
+ Smi [59],
FIXED_ARRAY_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["goo"],
FIXED_ARRAY_TYPE,
@@ -276,93 +261,88 @@ snippet: "
foo++;
{ let x; { foo++ } };
"
-frame size: 10
+frame size: 8
parameter count: 2
-bytecode array length: 185
+bytecode array length: 172
bytecodes: [
B(Ldar), R(new_target),
- B(JumpIfUndefined), U8(27),
- B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
- B(PushContext), R(3),
+ B(JumpIfUndefined), U8(25),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
+ B(PushContext), R(1),
B(ResumeGenerator), R(new_target),
- B(Star), R(2),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(2),
- B(JumpIfTrue), U8(64),
+ B(Star), R(0),
+ B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
B(LdaSmi), I8(79),
- B(Star), R(4),
- B(CallRuntime), U16(Runtime::kAbort), R(4), U8(1),
- B(LdaSmi), I8(-2),
B(Star), R(2),
- B(LdaConstant), U8(0),
- B(Star), R(6),
- B(Mov), R(arg0), R(4),
- B(Mov), R(closure), R(5),
- B(CallRuntime), U16(Runtime::kPushModuleContext), R(4), U8(3),
- B(PushContext), R(0),
- B(Ldar), R(this),
+ B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
+ B(LdaSmi), I8(-2),
+ B(Star), R(0),
+ B(LdaConstant), U8(1),
+ B(Star), R(4),
+ B(Mov), R(arg0), R(2),
+ B(Mov), R(closure), R(3),
+ B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
+ B(PushContext), R(2),
+ B(Mov), R(this), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
B(StaCurrentContextSlot), U8(4),
/* 0 E> */ B(StackCheck),
B(LdaImmutableCurrentContextSlot), U8(4),
- B(Star), R(5),
- B(Mov), R(closure), R(4),
- /* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(4), U8(2),
- B(StaCurrentContextSlot), U8(5),
+ B(Star), R(3),
+ B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(4),
- B(LdaImmutableCurrentContextSlot), U8(5),
- B(Star), R(5),
B(LdaZero),
- B(SuspendGenerator), R(5), U8(0),
+ /* 0 E> */ B(SuspendGenerator), R(3), U8(0),
B(Ldar), R(4),
/* 49 S> */ B(Return),
B(LdaSmi), I8(-2),
- B(Star), R(2),
- B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(5), U8(1),
- B(Star), R(6),
- B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(5), U8(1),
- B(Star), R(7),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(3), U8(1),
+ B(Star), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
+ B(Star), R(5),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(7),
- B(JumpIfTrue), U8(24),
+ B(TestEqualStrictNoFeedback), R(5),
+ B(JumpIfTrue), U8(22),
B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(7),
- B(JumpIfTrue), U8(15),
- B(Jump), U8(2),
+ B(TestEqualStrictNoFeedback), R(5),
+ B(JumpIfTrue), U8(13),
B(LdaTrue),
- B(Star), R(9),
- B(Mov), R(6), R(8),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(8), U8(2),
+ B(Star), R(7),
+ B(Mov), R(4), R(6),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
/* 49 S> */ B(Return),
- B(Ldar), R(6),
+ B(Ldar), R(4),
/* 0 E> */ B(Throw),
/* 17 S> */ B(LdaSmi), I8(42),
/* 17 E> */ B(StaModuleVariable), I8(1), U8(0),
/* 21 S> */ B(LdaModuleVariable), I8(1), U8(0),
- B(Inc), U8(2),
+ B(Inc), U8(3),
/* 24 E> */ B(StaModuleVariable), I8(1), U8(0),
B(Ldar), R(closure),
- B(CreateBlockContext), U8(1),
- B(PushContext), R(1),
+ B(CreateBlockContext), U8(2),
+ B(PushContext), R(3),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(4),
/* 34 S> */ B(LdaUndefined),
/* 34 E> */ B(StaCurrentContextSlot), U8(4),
/* 39 S> */ B(LdaModuleVariable), I8(1), U8(1),
- B(ToNumber), R(4), U8(3),
+ B(ToNumber), R(4), U8(4),
B(Ldar), R(4),
- B(Inc), U8(3),
+ B(Inc), U8(4),
/* 42 E> */ B(StaModuleVariable), I8(1), U8(1),
B(Ldar), R(4),
- B(StaContextSlot), R(1), U8(6), U8(0),
- B(PopContext), R(1),
- B(LdaCurrentContextSlot), U8(6),
- B(Star), R(4),
+ B(StaContextSlot), R(3), U8(5), U8(0),
+ B(PopContext), R(3),
+ B(LdaCurrentContextSlot), U8(5),
+ B(Star), R(3),
B(LdaTrue),
- B(Star), R(5),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(4), U8(2),
+ B(Star), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(3), U8(2),
/* 49 S> */ B(Return),
]
constant pool: [
+ Smi [59],
FIXED_ARRAY_TYPE,
FIXED_ARRAY_TYPE,
]
@@ -375,95 +355,90 @@ snippet: "
foo++;
{ let x; { foo++ } };
"
-frame size: 10
+frame size: 8
parameter count: 2
-bytecode array length: 189
+bytecode array length: 176
bytecodes: [
B(Ldar), R(new_target),
- B(JumpIfUndefined), U8(27),
- B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
- B(PushContext), R(3),
+ B(JumpIfUndefined), U8(25),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
+ B(PushContext), R(1),
B(ResumeGenerator), R(new_target),
- B(Star), R(2),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(2),
- B(JumpIfTrue), U8(68),
+ B(Star), R(0),
+ B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
B(LdaSmi), I8(79),
- B(Star), R(4),
- B(CallRuntime), U16(Runtime::kAbort), R(4), U8(1),
- B(LdaSmi), I8(-2),
B(Star), R(2),
- B(LdaConstant), U8(0),
- B(Star), R(6),
- B(Mov), R(arg0), R(4),
- B(Mov), R(closure), R(5),
- B(CallRuntime), U16(Runtime::kPushModuleContext), R(4), U8(3),
- B(PushContext), R(0),
- B(Ldar), R(this),
+ B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
+ B(LdaSmi), I8(-2),
+ B(Star), R(0),
+ B(LdaConstant), U8(1),
+ B(Star), R(4),
+ B(Mov), R(arg0), R(2),
+ B(Mov), R(closure), R(3),
+ B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
+ B(PushContext), R(2),
+ B(Mov), R(this), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
B(StaCurrentContextSlot), U8(4),
B(LdaTheHole),
B(StaModuleVariable), I8(1), U8(0),
/* 0 E> */ B(StackCheck),
B(LdaImmutableCurrentContextSlot), U8(4),
- B(Star), R(5),
- B(Mov), R(closure), R(4),
- /* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(4), U8(2),
- B(StaCurrentContextSlot), U8(5),
+ B(Star), R(3),
+ B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(4),
- B(LdaImmutableCurrentContextSlot), U8(5),
- B(Star), R(5),
B(LdaZero),
- B(SuspendGenerator), R(5), U8(0),
+ /* 0 E> */ B(SuspendGenerator), R(3), U8(0),
B(Ldar), R(4),
/* 49 S> */ B(Return),
B(LdaSmi), I8(-2),
- B(Star), R(2),
- B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(5), U8(1),
- B(Star), R(6),
- B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(5), U8(1),
- B(Star), R(7),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(3), U8(1),
+ B(Star), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
+ B(Star), R(5),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(7),
- B(JumpIfTrue), U8(24),
+ B(TestEqualStrictNoFeedback), R(5),
+ B(JumpIfTrue), U8(22),
B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(7),
- B(JumpIfTrue), U8(15),
- B(Jump), U8(2),
+ B(TestEqualStrictNoFeedback), R(5),
+ B(JumpIfTrue), U8(13),
B(LdaTrue),
- B(Star), R(9),
- B(Mov), R(6), R(8),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(8), U8(2),
+ B(Star), R(7),
+ B(Mov), R(4), R(6),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
/* 49 S> */ B(Return),
- B(Ldar), R(6),
+ B(Ldar), R(4),
/* 0 E> */ B(Throw),
/* 17 S> */ B(LdaSmi), I8(42),
/* 17 E> */ B(StaModuleVariable), I8(1), U8(0),
/* 21 S> */ B(LdaModuleVariable), I8(1), U8(0),
- B(Inc), U8(2),
+ B(Inc), U8(3),
/* 24 E> */ B(StaModuleVariable), I8(1), U8(0),
B(Ldar), R(closure),
- B(CreateBlockContext), U8(1),
- B(PushContext), R(1),
+ B(CreateBlockContext), U8(2),
+ B(PushContext), R(3),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(4),
/* 34 S> */ B(LdaUndefined),
/* 34 E> */ B(StaCurrentContextSlot), U8(4),
/* 39 S> */ B(LdaModuleVariable), I8(1), U8(1),
- B(ToNumber), R(4), U8(3),
+ B(ToNumber), R(4), U8(4),
B(Ldar), R(4),
- B(Inc), U8(3),
+ B(Inc), U8(4),
/* 42 E> */ B(StaModuleVariable), I8(1), U8(1),
B(Ldar), R(4),
- B(StaContextSlot), R(1), U8(6), U8(0),
- B(PopContext), R(1),
- B(LdaCurrentContextSlot), U8(6),
- B(Star), R(4),
+ B(StaContextSlot), R(3), U8(5), U8(0),
+ B(PopContext), R(3),
+ B(LdaCurrentContextSlot), U8(5),
+ B(Star), R(3),
B(LdaTrue),
- B(Star), R(5),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(4), U8(2),
+ B(Star), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(3), U8(2),
/* 49 S> */ B(Return),
]
constant pool: [
+ Smi [63],
FIXED_ARRAY_TYPE,
FIXED_ARRAY_TYPE,
]
@@ -476,95 +451,90 @@ snippet: "
foo++;
{ let x; { foo++ } };
"
-frame size: 10
+frame size: 8
parameter count: 2
-bytecode array length: 193
+bytecode array length: 180
bytecodes: [
B(Ldar), R(new_target),
- B(JumpIfUndefined), U8(27),
- B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
- B(PushContext), R(3),
+ B(JumpIfUndefined), U8(25),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
+ B(PushContext), R(1),
B(ResumeGenerator), R(new_target),
- B(Star), R(2),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(2),
- B(JumpIfTrue), U8(68),
+ B(Star), R(0),
+ B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
B(LdaSmi), I8(79),
- B(Star), R(4),
- B(CallRuntime), U16(Runtime::kAbort), R(4), U8(1),
- B(LdaSmi), I8(-2),
B(Star), R(2),
- B(LdaConstant), U8(0),
- B(Star), R(6),
- B(Mov), R(arg0), R(4),
- B(Mov), R(closure), R(5),
- B(CallRuntime), U16(Runtime::kPushModuleContext), R(4), U8(3),
- B(PushContext), R(0),
- B(Ldar), R(this),
+ B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
+ B(LdaSmi), I8(-2),
+ B(Star), R(0),
+ B(LdaConstant), U8(1),
+ B(Star), R(4),
+ B(Mov), R(arg0), R(2),
+ B(Mov), R(closure), R(3),
+ B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
+ B(PushContext), R(2),
+ B(Mov), R(this), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
B(StaCurrentContextSlot), U8(4),
B(LdaTheHole),
B(StaModuleVariable), I8(1), U8(0),
/* 0 E> */ B(StackCheck),
B(LdaImmutableCurrentContextSlot), U8(4),
- B(Star), R(5),
- B(Mov), R(closure), R(4),
- /* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(4), U8(2),
- B(StaCurrentContextSlot), U8(5),
+ B(Star), R(3),
+ B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(4),
- B(LdaImmutableCurrentContextSlot), U8(5),
- B(Star), R(5),
B(LdaZero),
- B(SuspendGenerator), R(5), U8(0),
+ /* 0 E> */ B(SuspendGenerator), R(3), U8(0),
B(Ldar), R(4),
/* 51 S> */ B(Return),
B(LdaSmi), I8(-2),
- B(Star), R(2),
- B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(5), U8(1),
- B(Star), R(6),
- B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(5), U8(1),
- B(Star), R(7),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(3), U8(1),
+ B(Star), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
+ B(Star), R(5),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(7),
- B(JumpIfTrue), U8(24),
+ B(TestEqualStrictNoFeedback), R(5),
+ B(JumpIfTrue), U8(22),
B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(7),
- B(JumpIfTrue), U8(15),
- B(Jump), U8(2),
+ B(TestEqualStrictNoFeedback), R(5),
+ B(JumpIfTrue), U8(13),
B(LdaTrue),
- B(Star), R(9),
- B(Mov), R(6), R(8),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(8), U8(2),
+ B(Star), R(7),
+ B(Mov), R(4), R(6),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
/* 51 S> */ B(Return),
- B(Ldar), R(6),
+ B(Ldar), R(4),
/* 0 E> */ B(Throw),
/* 19 S> */ B(LdaSmi), I8(42),
/* 19 E> */ B(StaModuleVariable), I8(1), U8(0),
/* 23 S> */ B(LdaModuleVariable), I8(1), U8(0),
- B(Inc), U8(2),
+ B(Inc), U8(3),
/* 26 E> */ B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0),
B(Ldar), R(closure),
- B(CreateBlockContext), U8(1),
- B(PushContext), R(1),
+ B(CreateBlockContext), U8(2),
+ B(PushContext), R(3),
B(LdaTheHole),
B(StaCurrentContextSlot), U8(4),
/* 36 S> */ B(LdaUndefined),
/* 36 E> */ B(StaCurrentContextSlot), U8(4),
/* 41 S> */ B(LdaModuleVariable), I8(1), U8(1),
- B(ToNumber), R(4), U8(3),
+ B(ToNumber), R(4), U8(4),
B(Ldar), R(4),
- B(Inc), U8(3),
+ B(Inc), U8(4),
/* 44 E> */ B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0),
B(Ldar), R(4),
- B(StaContextSlot), R(1), U8(6), U8(0),
- B(PopContext), R(1),
- B(LdaCurrentContextSlot), U8(6),
- B(Star), R(4),
+ B(StaContextSlot), R(3), U8(5), U8(0),
+ B(PopContext), R(3),
+ B(LdaCurrentContextSlot), U8(5),
+ B(Star), R(3),
B(LdaTrue),
- B(Star), R(5),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(4), U8(2),
+ B(Star), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(3), U8(2),
/* 51 S> */ B(Return),
]
constant pool: [
+ Smi [63],
FIXED_ARRAY_TYPE,
FIXED_ARRAY_TYPE,
]
@@ -575,72 +545,66 @@ handlers: [
snippet: "
export default (function () {});
"
-frame size: 9
+frame size: 8
parameter count: 2
-bytecode array length: 154
+bytecode array length: 141
bytecodes: [
B(Ldar), R(new_target),
- B(JumpIfUndefined), U8(27),
- B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
- B(PushContext), R(2),
+ B(JumpIfUndefined), U8(25),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
+ B(PushContext), R(1),
B(ResumeGenerator), R(new_target),
- B(Star), R(1),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(1),
- B(JumpIfTrue), U8(68),
+ B(Star), R(0),
+ B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
B(LdaSmi), I8(79),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
B(LdaSmi), I8(-2),
- B(Star), R(1),
- B(LdaConstant), U8(0),
- B(Star), R(5),
- B(Mov), R(arg0), R(3),
- B(Mov), R(closure), R(4),
- B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
- B(PushContext), R(0),
- B(Ldar), R(this),
+ B(Star), R(0),
+ B(LdaConstant), U8(1),
+ B(Star), R(4),
+ B(Mov), R(arg0), R(2),
+ B(Mov), R(closure), R(3),
+ B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
+ B(PushContext), R(2),
+ B(Mov), R(this), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
B(StaCurrentContextSlot), U8(4),
B(LdaTheHole),
B(StaModuleVariable), I8(1), U8(0),
/* 0 E> */ B(StackCheck),
B(LdaImmutableCurrentContextSlot), U8(4),
- B(Star), R(4),
- B(Mov), R(closure), R(3),
- /* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2),
- B(StaCurrentContextSlot), U8(5),
B(Star), R(3),
- B(LdaImmutableCurrentContextSlot), U8(5),
+ B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(4),
B(LdaZero),
- B(SuspendGenerator), R(4), U8(0),
- B(Ldar), R(3),
+ /* 0 E> */ B(SuspendGenerator), R(3), U8(0),
+ B(Ldar), R(4),
/* 32 S> */ B(Return),
B(LdaSmi), I8(-2),
- B(Star), R(1),
- B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(3), U8(1),
+ B(Star), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
B(Star), R(5),
- B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
- B(Star), R(6),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(6),
- B(JumpIfTrue), U8(24),
+ B(TestEqualStrictNoFeedback), R(5),
+ B(JumpIfTrue), U8(22),
B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(6),
- B(JumpIfTrue), U8(15),
- B(Jump), U8(2),
+ B(TestEqualStrictNoFeedback), R(5),
+ B(JumpIfTrue), U8(13),
B(LdaTrue),
- B(Star), R(8),
- B(Mov), R(5), R(7),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
+ B(Star), R(7),
+ B(Mov), R(4), R(6),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
/* 32 S> */ B(Return),
- B(Ldar), R(5),
+ B(Ldar), R(4),
/* 0 E> */ B(Throw),
- B(Ldar), R(5),
- B(StaCurrentContextSlot), U8(6),
- B(CreateClosure), U8(1), U8(2), U8(0),
+ B(Ldar), R(4),
+ B(StaCurrentContextSlot), U8(5),
+ B(CreateClosure), U8(2), U8(3), U8(0),
B(StaModuleVariable), I8(1), U8(0),
- B(LdaCurrentContextSlot), U8(6),
+ B(LdaCurrentContextSlot), U8(5),
B(Star), R(3),
B(LdaTrue),
B(Star), R(4),
@@ -648,6 +612,7 @@ bytecodes: [
/* 32 S> */ B(Return),
]
constant pool: [
+ Smi [63],
FIXED_ARRAY_TYPE,
SHARED_FUNCTION_INFO_TYPE,
]
@@ -658,70 +623,64 @@ handlers: [
snippet: "
export default (class {});
"
-frame size: 9
+frame size: 8
parameter count: 2
-bytecode array length: 191
+bytecode array length: 174
bytecodes: [
B(Ldar), R(new_target),
- B(JumpIfUndefined), U8(27),
- B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
- B(PushContext), R(2),
+ B(JumpIfUndefined), U8(25),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
+ B(PushContext), R(1),
B(ResumeGenerator), R(new_target),
- B(Star), R(1),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(1),
- B(JumpIfTrue), U8(68),
+ B(Star), R(0),
+ B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
B(LdaSmi), I8(79),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
B(LdaSmi), I8(-2),
- B(Star), R(1),
- B(LdaConstant), U8(0),
- B(Star), R(5),
- B(Mov), R(arg0), R(3),
- B(Mov), R(closure), R(4),
- B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
- B(PushContext), R(0),
- B(Ldar), R(this),
+ B(Star), R(0),
+ B(LdaConstant), U8(1),
+ B(Star), R(4),
+ B(Mov), R(arg0), R(2),
+ B(Mov), R(closure), R(3),
+ B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
+ B(PushContext), R(2),
+ B(Mov), R(this), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
B(StaCurrentContextSlot), U8(4),
B(LdaTheHole),
B(StaModuleVariable), I8(1), U8(0),
/* 0 E> */ B(StackCheck),
B(LdaImmutableCurrentContextSlot), U8(4),
- B(Star), R(4),
- B(Mov), R(closure), R(3),
- /* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2),
- B(StaCurrentContextSlot), U8(5),
B(Star), R(3),
- B(LdaImmutableCurrentContextSlot), U8(5),
+ B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(4),
B(LdaZero),
- B(SuspendGenerator), R(4), U8(0),
- B(Ldar), R(3),
+ /* 0 E> */ B(SuspendGenerator), R(3), U8(0),
+ B(Ldar), R(4),
/* 26 S> */ B(Return),
B(LdaSmi), I8(-2),
- B(Star), R(1),
- B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(3), U8(1),
+ B(Star), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
B(Star), R(5),
- B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
- B(Star), R(6),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(6),
- B(JumpIfTrue), U8(24),
+ B(TestEqualStrictNoFeedback), R(5),
+ B(JumpIfTrue), U8(22),
B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(6),
- B(JumpIfTrue), U8(15),
- B(Jump), U8(2),
+ B(TestEqualStrictNoFeedback), R(5),
+ B(JumpIfTrue), U8(13),
B(LdaTrue),
- B(Star), R(8),
- B(Mov), R(5), R(7),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
+ B(Star), R(7),
+ B(Mov), R(4), R(6),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
/* 26 S> */ B(Return),
- B(Ldar), R(5),
+ B(Ldar), R(4),
/* 0 E> */ B(Throw),
- B(Ldar), R(5),
- B(StaCurrentContextSlot), U8(7),
- /* 16 S> */ B(CreateClosure), U8(1), U8(2), U8(0),
+ B(Ldar), R(4),
+ B(StaCurrentContextSlot), U8(5),
+ B(CreateClosure), U8(2), U8(3), U8(0),
B(Star), R(3),
B(LdaTheHole),
B(Star), R(4),
@@ -734,10 +693,8 @@ bytecodes: [
B(Star), R(4),
B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(3), U8(1),
B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1),
- B(StaCurrentContextSlot), U8(6),
- B(LdaCurrentContextSlot), U8(6),
- /* 16 E> */ B(StaModuleVariable), I8(1), U8(0),
- B(LdaCurrentContextSlot), U8(7),
+ B(StaModuleVariable), I8(1), U8(0),
+ B(LdaCurrentContextSlot), U8(5),
B(Star), R(3),
B(LdaTrue),
B(Star), R(4),
@@ -745,6 +702,7 @@ bytecodes: [
/* 26 S> */ B(Return),
]
constant pool: [
+ Smi [63],
FIXED_ARRAY_TYPE,
SHARED_FUNCTION_INFO_TYPE,
]
@@ -755,68 +713,62 @@ handlers: [
snippet: "
export {foo as goo} from \"bar\"
"
-frame size: 9
+frame size: 8
parameter count: 2
-bytecode array length: 143
+bytecode array length: 130
bytecodes: [
B(Ldar), R(new_target),
- B(JumpIfUndefined), U8(27),
- B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
- B(PushContext), R(2),
+ B(JumpIfUndefined), U8(25),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
+ B(PushContext), R(1),
B(ResumeGenerator), R(new_target),
- B(Star), R(1),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(1),
- B(JumpIfTrue), U8(64),
+ B(Star), R(0),
+ B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
B(LdaSmi), I8(79),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
B(LdaSmi), I8(-2),
- B(Star), R(1),
- B(LdaConstant), U8(0),
- B(Star), R(5),
- B(Mov), R(arg0), R(3),
- B(Mov), R(closure), R(4),
- B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
- B(PushContext), R(0),
- B(Ldar), R(this),
+ B(Star), R(0),
+ B(LdaConstant), U8(1),
+ B(Star), R(4),
+ B(Mov), R(arg0), R(2),
+ B(Mov), R(closure), R(3),
+ B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
+ B(PushContext), R(2),
+ B(Mov), R(this), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
B(StaCurrentContextSlot), U8(4),
/* 0 E> */ B(StackCheck),
B(LdaImmutableCurrentContextSlot), U8(4),
- B(Star), R(4),
- B(Mov), R(closure), R(3),
- /* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2),
- B(StaCurrentContextSlot), U8(5),
B(Star), R(3),
- B(LdaImmutableCurrentContextSlot), U8(5),
+ B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(4),
B(LdaZero),
- B(SuspendGenerator), R(4), U8(0),
- B(Ldar), R(3),
+ /* 0 E> */ B(SuspendGenerator), R(3), U8(0),
+ B(Ldar), R(4),
/* 30 S> */ B(Return),
B(LdaSmi), I8(-2),
- B(Star), R(1),
- B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(3), U8(1),
+ B(Star), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
B(Star), R(5),
- B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
- B(Star), R(6),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(6),
- B(JumpIfTrue), U8(24),
+ B(TestEqualStrictNoFeedback), R(5),
+ B(JumpIfTrue), U8(22),
B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(6),
- B(JumpIfTrue), U8(15),
- B(Jump), U8(2),
+ B(TestEqualStrictNoFeedback), R(5),
+ B(JumpIfTrue), U8(13),
B(LdaTrue),
- B(Star), R(8),
- B(Mov), R(5), R(7),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
+ B(Star), R(7),
+ B(Mov), R(4), R(6),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
/* 30 S> */ B(Return),
- B(Ldar), R(5),
+ B(Ldar), R(4),
/* 0 E> */ B(Throw),
- B(Ldar), R(5),
- B(StaCurrentContextSlot), U8(6),
- B(LdaCurrentContextSlot), U8(6),
+ B(Ldar), R(4),
+ B(StaCurrentContextSlot), U8(5),
+ B(LdaCurrentContextSlot), U8(5),
B(Star), R(3),
B(LdaTrue),
B(Star), R(4),
@@ -824,6 +776,7 @@ bytecodes: [
/* 30 S> */ B(Return),
]
constant pool: [
+ Smi [59],
FIXED_ARRAY_TYPE,
]
handlers: [
@@ -833,68 +786,62 @@ handlers: [
snippet: "
export * from \"bar\"
"
-frame size: 9
+frame size: 8
parameter count: 2
-bytecode array length: 143
+bytecode array length: 130
bytecodes: [
B(Ldar), R(new_target),
- B(JumpIfUndefined), U8(27),
- B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
- B(PushContext), R(2),
+ B(JumpIfUndefined), U8(25),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
+ B(PushContext), R(1),
B(ResumeGenerator), R(new_target),
- B(Star), R(1),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(1),
- B(JumpIfTrue), U8(64),
+ B(Star), R(0),
+ B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
B(LdaSmi), I8(79),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
B(LdaSmi), I8(-2),
- B(Star), R(1),
- B(LdaConstant), U8(0),
- B(Star), R(5),
- B(Mov), R(arg0), R(3),
- B(Mov), R(closure), R(4),
- B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
- B(PushContext), R(0),
- B(Ldar), R(this),
+ B(Star), R(0),
+ B(LdaConstant), U8(1),
+ B(Star), R(4),
+ B(Mov), R(arg0), R(2),
+ B(Mov), R(closure), R(3),
+ B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
+ B(PushContext), R(2),
+ B(Mov), R(this), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
B(StaCurrentContextSlot), U8(4),
/* 0 E> */ B(StackCheck),
B(LdaImmutableCurrentContextSlot), U8(4),
- B(Star), R(4),
- B(Mov), R(closure), R(3),
- /* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2),
- B(StaCurrentContextSlot), U8(5),
B(Star), R(3),
- B(LdaImmutableCurrentContextSlot), U8(5),
+ B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(4),
B(LdaZero),
- B(SuspendGenerator), R(4), U8(0),
- B(Ldar), R(3),
+ /* 0 E> */ B(SuspendGenerator), R(3), U8(0),
+ B(Ldar), R(4),
/* 19 S> */ B(Return),
B(LdaSmi), I8(-2),
- B(Star), R(1),
- B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(3), U8(1),
+ B(Star), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
B(Star), R(5),
- B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
- B(Star), R(6),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(6),
- B(JumpIfTrue), U8(24),
+ B(TestEqualStrictNoFeedback), R(5),
+ B(JumpIfTrue), U8(22),
B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(6),
- B(JumpIfTrue), U8(15),
- B(Jump), U8(2),
+ B(TestEqualStrictNoFeedback), R(5),
+ B(JumpIfTrue), U8(13),
B(LdaTrue),
- B(Star), R(8),
- B(Mov), R(5), R(7),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
+ B(Star), R(7),
+ B(Mov), R(4), R(6),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
/* 19 S> */ B(Return),
- B(Ldar), R(5),
+ B(Ldar), R(4),
/* 0 E> */ B(Throw),
- B(Ldar), R(5),
- B(StaCurrentContextSlot), U8(6),
- B(LdaCurrentContextSlot), U8(6),
+ B(Ldar), R(4),
+ B(StaCurrentContextSlot), U8(5),
+ B(LdaCurrentContextSlot), U8(5),
B(Star), R(3),
B(LdaTrue),
B(Star), R(4),
@@ -902,6 +849,7 @@ bytecodes: [
/* 19 S> */ B(Return),
]
constant pool: [
+ Smi [59],
FIXED_ARRAY_TYPE,
]
handlers: [
@@ -912,82 +860,76 @@ snippet: "
import * as foo from \"bar\"
foo.f(foo, foo.x);
"
-frame size: 9
+frame size: 8
parameter count: 2
-bytecode array length: 181
+bytecode array length: 168
bytecodes: [
B(Ldar), R(new_target),
- B(JumpIfUndefined), U8(27),
- B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
- B(PushContext), R(2),
+ B(JumpIfUndefined), U8(25),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
+ B(PushContext), R(1),
B(ResumeGenerator), R(new_target),
- B(Star), R(1),
- B(LdaZero),
- B(TestEqualStrictNoFeedback), R(1),
- B(JumpIfTrue), U8(74),
+ B(Star), R(0),
+ B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
B(LdaSmi), I8(79),
- B(Star), R(3),
- B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
B(LdaSmi), I8(-2),
- B(Star), R(1),
- B(LdaConstant), U8(0),
- B(Star), R(5),
- B(Mov), R(arg0), R(3),
- B(Mov), R(closure), R(4),
- B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
- B(PushContext), R(0),
- B(Ldar), R(this),
+ B(Star), R(0),
+ B(LdaConstant), U8(1),
+ B(Star), R(4),
+ B(Mov), R(arg0), R(2),
+ B(Mov), R(closure), R(3),
+ B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
+ B(PushContext), R(2),
+ B(Mov), R(this), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
B(StaCurrentContextSlot), U8(4),
B(LdaZero),
B(Star), R(3),
B(CallRuntime), U16(Runtime::kGetModuleNamespace), R(3), U8(1),
- B(StaCurrentContextSlot), U8(6),
+ B(StaCurrentContextSlot), U8(5),
/* 0 E> */ B(StackCheck),
B(LdaImmutableCurrentContextSlot), U8(4),
- B(Star), R(4),
- B(Mov), R(closure), R(3),
- /* 0 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8(2),
- B(StaCurrentContextSlot), U8(5),
B(Star), R(3),
- B(LdaImmutableCurrentContextSlot), U8(5),
+ B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(4),
B(LdaZero),
- B(SuspendGenerator), R(4), U8(0),
- B(Ldar), R(3),
+ /* 0 E> */ B(SuspendGenerator), R(3), U8(0),
+ B(Ldar), R(4),
/* 45 S> */ B(Return),
B(LdaSmi), I8(-2),
- B(Star), R(1),
- B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(3), U8(1),
+ B(Star), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
B(Star), R(5),
- B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
- B(Star), R(6),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(6),
- B(JumpIfTrue), U8(24),
+ B(TestEqualStrictNoFeedback), R(5),
+ B(JumpIfTrue), U8(22),
B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(6),
- B(JumpIfTrue), U8(15),
- B(Jump), U8(2),
+ B(TestEqualStrictNoFeedback), R(5),
+ B(JumpIfTrue), U8(13),
B(LdaTrue),
- B(Star), R(8),
- B(Mov), R(5), R(7),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
+ B(Star), R(7),
+ B(Mov), R(4), R(6),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
/* 45 S> */ B(Return),
- B(Ldar), R(5),
+ B(Ldar), R(4),
/* 0 E> */ B(Throw),
- /* 27 S> */ B(LdaImmutableCurrentContextSlot), U8(6),
+ /* 27 S> */ B(LdaImmutableCurrentContextSlot), U8(5),
B(Star), R(4),
- /* 30 E> */ B(LdaNamedProperty), R(4), U8(1), U8(4),
+ /* 30 E> */ B(LdaNamedProperty), R(4), U8(2), U8(5),
B(Star), R(3),
- B(LdaImmutableCurrentContextSlot), U8(6),
+ B(LdaImmutableCurrentContextSlot), U8(5),
B(Star), R(5),
- B(LdaImmutableCurrentContextSlot), U8(6),
+ B(LdaImmutableCurrentContextSlot), U8(5),
B(Star), R(6),
- /* 41 E> */ B(LdaNamedProperty), R(6), U8(2), U8(6),
+ /* 41 E> */ B(LdaNamedProperty), R(6), U8(3), U8(7),
B(Star), R(6),
- /* 31 E> */ B(CallProperty2), R(3), R(4), R(5), R(6), U8(2),
- B(StaCurrentContextSlot), U8(7),
- B(LdaCurrentContextSlot), U8(7),
+ /* 31 E> */ B(CallProperty2), R(3), R(4), R(5), R(6), U8(3),
+ B(StaCurrentContextSlot), U8(6),
+ B(LdaCurrentContextSlot), U8(6),
B(Star), R(3),
B(LdaTrue),
B(Star), R(4),
@@ -995,6 +937,7 @@ bytecodes: [
/* 45 S> */ B(Return),
]
constant pool: [
+ Smi [69],
FIXED_ARRAY_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["f"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"],
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/NewAndSpread.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/NewAndSpread.golden
index e77314533c..9c5a9f0158 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/NewAndSpread.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/NewAndSpread.golden
@@ -10,41 +10,36 @@ snippet: "
class A { constructor(...args) { this.args = args; } }
new A(...[1, 2, 3]);
"
-frame size: 8
+frame size: 7
parameter count: 1
-bytecode array length: 64
+bytecode array length: 56
bytecodes: [
- B(LdaTheHole),
- B(Star), R(2),
/* 30 E> */ B(StackCheck),
+ B(CreateClosure), U8(0), U8(3), U8(2),
+ B(Star), R(2),
B(LdaTheHole),
- B(Star), R(0),
- /* 34 S> */ B(CreateClosure), U8(0), U8(2), U8(2),
B(Star), R(3),
- B(LdaTheHole),
- B(Star), R(4),
B(LdaSmi), I8(34),
- B(Star), R(6),
+ B(Star), R(5),
B(LdaSmi), I8(88),
- B(Star), R(7),
- B(Mov), R(3), R(5),
- B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4),
- B(Star), R(4),
- B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(3), U8(1),
- B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1),
+ B(Star), R(6),
+ B(Mov), R(2), R(4),
+ B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(2), U8(1),
+ B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1),
B(Star), R(0),
B(Star), R(1),
- B(Star), R(2),
- /* 89 S> */ B(CreateArrayLiteral), U8(1), U8(5), U8(9),
- B(Star), R(4),
- B(Ldar), R(2),
- /* 89 E> */ B(ConstructWithSpread), R(2), R(4), U8(1),
+ /* 89 S> */ B(CreateArrayLiteral), U8(1), U8(6), U8(17),
+ B(Star), R(3),
+ B(Ldar), R(1),
+ /* 89 E> */ B(ConstructWithSpread), R(1), R(3), U8(1),
B(LdaUndefined),
/* 110 S> */ B(Return),
]
constant pool: [
SHARED_FUNCTION_INFO_TYPE,
- CONSTANT_ELEMENTS_PAIR_TYPE,
+ TUPLE2_TYPE,
]
handlers: [
]
@@ -54,43 +49,38 @@ snippet: "
class A { constructor(...args) { this.args = args; } }
new A(0, ...[1, 2, 3]);
"
-frame size: 8
+frame size: 7
parameter count: 1
-bytecode array length: 67
+bytecode array length: 59
bytecodes: [
- B(LdaTheHole),
- B(Star), R(2),
/* 30 E> */ B(StackCheck),
+ B(CreateClosure), U8(0), U8(3), U8(2),
+ B(Star), R(2),
B(LdaTheHole),
- B(Star), R(0),
- /* 34 S> */ B(CreateClosure), U8(0), U8(2), U8(2),
B(Star), R(3),
- B(LdaTheHole),
- B(Star), R(4),
B(LdaSmi), I8(34),
- B(Star), R(6),
+ B(Star), R(5),
B(LdaSmi), I8(88),
- B(Star), R(7),
- B(Mov), R(3), R(5),
- B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4),
- B(Star), R(4),
- B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(3), U8(1),
- B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1),
+ B(Star), R(6),
+ B(Mov), R(2), R(4),
+ B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(2), U8(1),
+ B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1),
B(Star), R(0),
B(Star), R(1),
- B(Star), R(2),
/* 89 S> */ B(LdaZero),
+ B(Star), R(3),
+ B(CreateArrayLiteral), U8(1), U8(6), U8(17),
B(Star), R(4),
- B(CreateArrayLiteral), U8(1), U8(5), U8(9),
- B(Star), R(5),
- B(Ldar), R(2),
- /* 89 E> */ B(ConstructWithSpread), R(2), R(4), U8(2),
+ B(Ldar), R(1),
+ /* 89 E> */ B(ConstructWithSpread), R(1), R(3), U8(2),
B(LdaUndefined),
/* 113 S> */ B(Return),
]
constant pool: [
SHARED_FUNCTION_INFO_TYPE,
- CONSTANT_ELEMENTS_PAIR_TYPE,
+ TUPLE2_TYPE,
]
handlers: [
]
@@ -100,57 +90,52 @@ snippet: "
class A { constructor(...args) { this.args = args; } }
new A(0, ...[1, 2, 3], 4);
"
-frame size: 9
+frame size: 8
parameter count: 1
-bytecode array length: 98
+bytecode array length: 90
bytecodes: [
- B(LdaTheHole),
- B(Star), R(2),
/* 30 E> */ B(StackCheck),
+ B(CreateClosure), U8(0), U8(3), U8(2),
+ B(Star), R(2),
B(LdaTheHole),
- B(Star), R(0),
- /* 34 S> */ B(CreateClosure), U8(0), U8(2), U8(2),
B(Star), R(3),
- B(LdaTheHole),
- B(Star), R(4),
B(LdaSmi), I8(34),
- B(Star), R(6),
+ B(Star), R(5),
B(LdaSmi), I8(88),
- B(Star), R(7),
- B(Mov), R(3), R(5),
- B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4),
- B(Star), R(4),
- B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(3), U8(1),
- B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1),
+ B(Star), R(6),
+ B(Mov), R(2), R(4),
+ B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
+ B(Star), R(3),
+ B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(2), U8(1),
+ B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1),
B(Star), R(0),
B(Star), R(1),
- B(Star), R(2),
/* 89 S> */ B(LdaUndefined),
- B(Star), R(3),
+ B(Star), R(2),
B(LdaUndefined),
+ B(Star), R(4),
+ /* 93 E> */ B(CreateArrayLiteral), U8(1), U8(4), U8(17),
B(Star), R(5),
- /* 93 E> */ B(CreateArrayLiteral), U8(1), U8(3), U8(9),
- B(Star), R(6),
B(LdaUndefined),
+ B(Star), R(6),
+ B(CreateArrayLiteral), U8(2), U8(5), U8(17),
B(Star), R(7),
- B(CreateArrayLiteral), U8(2), U8(4), U8(9),
- B(Star), R(8),
- B(CallJSRuntime), U8(%spread_iterable), R(7), U8(2),
+ B(CallJSRuntime), U8(%spread_iterable), R(6), U8(2),
+ B(Star), R(6),
+ B(CreateArrayLiteral), U8(3), U8(6), U8(17),
B(Star), R(7),
- B(CreateArrayLiteral), U8(3), U8(5), U8(9),
- B(Star), R(8),
- B(CallJSRuntime), U8(%spread_arguments), R(5), U8(4),
- B(Star), R(5),
- B(Mov), R(1), R(4),
- B(CallJSRuntime), U8(%reflect_construct), R(3), U8(3),
+ B(CallJSRuntime), U8(%spread_arguments), R(4), U8(4),
+ B(Star), R(4),
+ B(Mov), R(0), R(3),
+ B(CallJSRuntime), U8(%reflect_construct), R(2), U8(3),
B(LdaUndefined),
/* 116 S> */ B(Return),
]
constant pool: [
SHARED_FUNCTION_INFO_TYPE,
- CONSTANT_ELEMENTS_PAIR_TYPE,
- CONSTANT_ELEMENTS_PAIR_TYPE,
- CONSTANT_ELEMENTS_PAIR_TYPE,
+ TUPLE2_TYPE,
+ TUPLE2_TYPE,
+ TUPLE2_TYPE,
]
handlers: [
]
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/ObjectLiterals.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/ObjectLiterals.golden
index 7a31554ac7..5b1046054b 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/ObjectLiterals.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/ObjectLiterals.golden
@@ -14,7 +14,7 @@ parameter count: 1
bytecode array length: 9
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(35), R(0),
+ /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(19), R(0),
B(Ldar), R(0),
/* 46 S> */ B(Return),
]
@@ -33,7 +33,7 @@ parameter count: 1
bytecode array length: 9
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(0),
+ /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(0),
B(Ldar), R(0),
/* 71 S> */ B(Return),
]
@@ -54,8 +54,8 @@ bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
- /* 45 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(1),
- /* 75 E> */ B(StaNamedOwnProperty), R(1), U8(1), U8(3),
+ /* 45 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(1),
+ /* 75 E> */ B(StaNamedOwnProperty), R(1), U8(1), U8(4),
B(Ldar), R(1),
/* 80 S> */ B(Return),
]
@@ -77,9 +77,9 @@ bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
- /* 45 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(1),
- /* 69 E> */ B(AddSmi), I8(1), U8(2),
- B(StaNamedOwnProperty), R(1), U8(1), U8(4),
+ /* 45 S> */ B(CreateObjectLiteral), U8(0), U8(4), U8(1), R(1),
+ /* 69 E> */ B(AddSmi), I8(1), U8(3),
+ B(StaNamedOwnProperty), R(1), U8(1), U8(5),
B(Ldar), R(1),
/* 76 S> */ B(Return),
]
@@ -99,9 +99,9 @@ parameter count: 1
bytecode array length: 17
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(0),
- B(CreateClosure), U8(1), U8(2), U8(2),
- B(StaNamedOwnProperty), R(0), U8(2), U8(4),
+ /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(4), U8(1), R(0),
+ B(CreateClosure), U8(1), U8(3), U8(2),
+ B(StaNamedOwnProperty), R(0), U8(2), U8(5),
B(Ldar), R(0),
/* 67 S> */ B(Return),
]
@@ -122,9 +122,9 @@ parameter count: 1
bytecode array length: 17
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(0),
- B(CreateClosure), U8(1), U8(2), U8(2),
- B(StaNamedOwnProperty), R(0), U8(2), U8(4),
+ /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(4), U8(1), R(0),
+ B(CreateClosure), U8(1), U8(3), U8(2),
+ B(StaNamedOwnProperty), R(0), U8(2), U8(5),
B(Ldar), R(0),
/* 68 S> */ B(Return),
]
@@ -145,10 +145,10 @@ parameter count: 1
bytecode array length: 33
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(0),
+ /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(4), U8(1), R(0),
B(LdaConstant), U8(1),
B(Star), R(2),
- B(CreateClosure), U8(2), U8(2), U8(2),
+ B(CreateClosure), U8(2), U8(3), U8(2),
B(Star), R(3),
B(LdaNull),
B(Star), R(4),
@@ -176,12 +176,12 @@ parameter count: 1
bytecode array length: 36
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(4), U8(1), R(0),
+ /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(5), U8(1), R(0),
B(LdaConstant), U8(1),
B(Star), R(2),
- B(CreateClosure), U8(2), U8(2), U8(2),
+ B(CreateClosure), U8(2), U8(3), U8(2),
B(Star), R(3),
- B(CreateClosure), U8(3), U8(3), U8(2),
+ B(CreateClosure), U8(3), U8(4), U8(2),
B(Star), R(4),
B(LdaZero),
B(Star), R(5),
@@ -208,12 +208,12 @@ parameter count: 1
bytecode array length: 33
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(0),
+ /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(4), U8(1), R(0),
B(LdaConstant), U8(1),
B(Star), R(2),
B(LdaNull),
B(Star), R(3),
- B(CreateClosure), U8(2), U8(2), U8(2),
+ B(CreateClosure), U8(2), U8(3), U8(2),
B(Star), R(4),
B(LdaZero),
B(Star), R(5),
@@ -241,7 +241,7 @@ bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
- /* 45 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(1),
+ /* 45 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(1),
B(LdaSmi), I8(1),
B(Star), R(3),
B(LdaZero),
@@ -262,17 +262,13 @@ handlers: [
snippet: "
return { __proto__: null };
"
-frame size: 3
+frame size: 1
parameter count: 1
-bytecode array length: 20
+bytecode array length: 9
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(35), R(0),
- B(LdaNull),
- B(Star), R(2),
- B(Mov), R(0), R(1),
- B(CallRuntime), U16(Runtime::kInternalSetPrototype), R(1), U8(2),
- B(Ldar), R(1),
+ /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(27), R(0),
+ B(Ldar), R(0),
/* 62 S> */ B(Return),
]
constant pool: [
@@ -285,18 +281,17 @@ handlers: [
snippet: "
var a = 'test'; return { [a]: 1 };
"
-frame size: 4
+frame size: 3
parameter count: 1
-bytecode array length: 24
+bytecode array length: 22
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaConstant), U8(0),
B(Star), R(0),
- /* 50 S> */ B(CreateObjectLiteral), U8(1), U8(2), U8(35), R(1),
+ /* 50 S> */ B(CreateObjectLiteral), U8(1), U8(3), U8(19), R(1),
/* 60 E> */ B(ToName), R(2),
B(LdaSmi), I8(1),
- B(Star), R(3),
- B(StaDataPropertyInLiteral), R(1), R(2), U8(0), U8(3),
+ B(StaDataPropertyInLiteral), R(1), R(2), U8(0), U8(4),
B(Ldar), R(1),
/* 69 S> */ B(Return),
]
@@ -311,19 +306,18 @@ handlers: [
snippet: "
var a = 'test'; return { val: a, [a]: 1 };
"
-frame size: 4
+frame size: 3
parameter count: 1
-bytecode array length: 28
+bytecode array length: 26
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaConstant), U8(0),
B(Star), R(0),
- /* 50 S> */ B(CreateObjectLiteral), U8(1), U8(2), U8(1), R(1),
- /* 64 E> */ B(StaNamedOwnProperty), R(1), U8(2), U8(3),
+ /* 50 S> */ B(CreateObjectLiteral), U8(1), U8(3), U8(1), R(1),
+ /* 64 E> */ B(StaNamedOwnProperty), R(1), U8(2), U8(4),
/* 68 E> */ B(ToName), R(2),
B(LdaSmi), I8(1),
- B(Star), R(3),
- B(StaDataPropertyInLiteral), R(1), R(2), U8(0), U8(5),
+ B(StaDataPropertyInLiteral), R(1), R(2), U8(0), U8(6),
B(Ldar), R(1),
/* 77 S> */ B(Return),
]
@@ -346,12 +340,12 @@ bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaConstant), U8(0),
B(Star), R(0),
- /* 50 S> */ B(CreateObjectLiteral), U8(1), U8(3), U8(35), R(1),
+ /* 50 S> */ B(CreateObjectLiteral), U8(1), U8(4), U8(19), R(1),
/* 60 E> */ B(ToName), R(2),
B(LdaSmi), I8(1),
+ B(StaDataPropertyInLiteral), R(1), R(2), U8(0), U8(5),
+ B(CreateObjectLiteral), U8(1), U8(3), U8(19), R(4),
B(Star), R(3),
- B(StaDataPropertyInLiteral), R(1), R(2), U8(0), U8(4),
- B(CreateObjectLiteral), U8(1), U8(2), U8(35), R(4),
B(Mov), R(1), R(2),
B(Mov), R(4), R(3),
B(CallRuntime), U16(Runtime::kInternalSetPrototype), R(2), U8(2),
@@ -376,14 +370,14 @@ bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaConstant), U8(0),
B(Star), R(0),
- /* 50 S> */ B(CreateObjectLiteral), U8(1), U8(4), U8(35), R(1),
+ /* 50 S> */ B(CreateObjectLiteral), U8(1), U8(5), U8(19), R(1),
/* 60 E> */ B(ToName), R(2),
B(LdaConstant), U8(2),
+ B(StaDataPropertyInLiteral), R(1), R(2), U8(0), U8(6),
B(Star), R(3),
- B(StaDataPropertyInLiteral), R(1), R(2), U8(0), U8(5),
B(LdaConstant), U8(3),
B(Star), R(3),
- B(CreateClosure), U8(4), U8(2), U8(2),
+ B(CreateClosure), U8(4), U8(3), U8(2),
B(Star), R(4),
B(LdaZero),
B(Star), R(5),
@@ -391,7 +385,7 @@ bytecodes: [
B(CallRuntime), U16(Runtime::kDefineGetterPropertyUnchecked), R(2), U8(4),
B(LdaConstant), U8(3),
B(Star), R(3),
- B(CreateClosure), U8(5), U8(3), U8(2),
+ B(CreateClosure), U8(5), U8(4), U8(2),
B(Star), R(4),
B(LdaZero),
B(Star), R(5),
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/ObjectLiteralsWide.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/ObjectLiteralsWide.golden
index e1f320e397..54f00f400d 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/ObjectLiteralsWide.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/ObjectLiteralsWide.golden
@@ -783,7 +783,7 @@ bytecodes: [
B(Star), R(0),
/* 2591 S> */ B(LdaConstant), U8(255),
B(Star), R(0),
- /* 2601 S> */ B(Wide), B(CreateObjectLiteral), U16(256), U16(2), U8(1), R16(1),
+ /* 2601 S> */ B(Wide), B(CreateObjectLiteral), U16(256), U16(3), U8(1), R16(1),
B(Ldar), R(1),
/* 2638 S> */ B(Return),
]
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/OuterContextVariables.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/OuterContextVariables.golden
index d72a32aef4..474a5c8c92 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/OuterContextVariables.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/OuterContextVariables.golden
@@ -26,7 +26,7 @@ bytecodes: [
/* 102 S> */ B(LdaImmutableContextSlot), R(context), U8(4), U8(1),
B(Star), R(0),
B(LdaImmutableCurrentContextSlot), U8(4),
- /* 118 E> */ B(Mul), R(0), U8(2),
+ /* 118 E> */ B(Mul), R(0), U8(3),
/* 130 S> */ B(Return),
]
constant pool: [
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/PrimitiveExpressions.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/PrimitiveExpressions.golden
index 62c7c14efd..7784d86192 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/PrimitiveExpressions.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/PrimitiveExpressions.golden
@@ -36,7 +36,7 @@ bytecodes: [
/* 42 S> */ B(LdaZero),
B(Star), R(0),
/* 45 S> */ B(Nop),
- /* 54 E> */ B(AddSmi), I8(3), U8(2),
+ /* 54 E> */ B(AddSmi), I8(3), U8(3),
/* 59 S> */ B(Return),
]
constant pool: [
@@ -58,7 +58,7 @@ bytecodes: [
/* 45 S> */ B(LdaSmi), I8(3),
B(Star), R(1),
B(Ldar), R(0),
- /* 54 E> */ B(Add), R(1), U8(2),
+ /* 54 E> */ B(Add), R(1), U8(3),
/* 59 S> */ B(Return),
]
constant pool: [
@@ -78,7 +78,7 @@ bytecodes: [
/* 42 S> */ B(LdaZero),
B(Star), R(0),
/* 45 S> */ B(Nop),
- /* 54 E> */ B(SubSmi), I8(3), U8(2),
+ /* 54 E> */ B(SubSmi), I8(3), U8(3),
/* 59 S> */ B(Return),
]
constant pool: [
@@ -100,7 +100,7 @@ bytecodes: [
/* 45 S> */ B(LdaSmi), I8(3),
B(Star), R(1),
B(Ldar), R(0),
- /* 54 E> */ B(Sub), R(1), U8(2),
+ /* 54 E> */ B(Sub), R(1), U8(3),
/* 59 S> */ B(Return),
]
constant pool: [
@@ -120,7 +120,7 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), I8(4),
B(Star), R(0),
/* 45 S> */ B(Nop),
- /* 54 E> */ B(MulSmi), I8(3), U8(2),
+ /* 54 E> */ B(MulSmi), I8(3), U8(3),
/* 59 S> */ B(Return),
]
constant pool: [
@@ -140,7 +140,7 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), I8(4),
B(Star), R(0),
/* 45 S> */ B(Nop),
- /* 54 E> */ B(MulSmi), I8(3), U8(2),
+ /* 54 E> */ B(MulSmi), I8(3), U8(3),
/* 59 S> */ B(Return),
]
constant pool: [
@@ -160,7 +160,7 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), I8(4),
B(Star), R(0),
/* 45 S> */ B(Nop),
- /* 54 E> */ B(DivSmi), I8(3), U8(2),
+ /* 54 E> */ B(DivSmi), I8(3), U8(3),
/* 59 S> */ B(Return),
]
constant pool: [
@@ -182,7 +182,7 @@ bytecodes: [
/* 45 S> */ B(LdaSmi), I8(3),
B(Star), R(1),
B(Ldar), R(0),
- /* 54 E> */ B(Div), R(1), U8(2),
+ /* 54 E> */ B(Div), R(1), U8(3),
/* 59 S> */ B(Return),
]
constant pool: [
@@ -202,7 +202,7 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), I8(4),
B(Star), R(0),
/* 45 S> */ B(Nop),
- /* 54 E> */ B(ModSmi), I8(3), U8(2),
+ /* 54 E> */ B(ModSmi), I8(3), U8(3),
/* 59 S> */ B(Return),
]
constant pool: [
@@ -224,7 +224,7 @@ bytecodes: [
/* 45 S> */ B(LdaSmi), I8(3),
B(Star), R(1),
B(Ldar), R(0),
- /* 54 E> */ B(Mod), R(1), U8(2),
+ /* 54 E> */ B(Mod), R(1), U8(3),
/* 59 S> */ B(Return),
]
constant pool: [
@@ -244,7 +244,7 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
/* 45 S> */ B(Nop),
- /* 54 E> */ B(BitwiseOrSmi), I8(2), U8(2),
+ /* 54 E> */ B(BitwiseOrSmi), I8(2), U8(3),
/* 59 S> */ B(Return),
]
constant pool: [
@@ -264,7 +264,7 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
/* 45 S> */ B(Nop),
- /* 54 E> */ B(BitwiseOrSmi), I8(2), U8(2),
+ /* 54 E> */ B(BitwiseOrSmi), I8(2), U8(3),
/* 59 S> */ B(Return),
]
constant pool: [
@@ -284,7 +284,7 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
/* 45 S> */ B(Nop),
- /* 54 E> */ B(BitwiseXorSmi), I8(2), U8(2),
+ /* 54 E> */ B(BitwiseXorSmi), I8(2), U8(3),
/* 59 S> */ B(Return),
]
constant pool: [
@@ -304,7 +304,7 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
/* 45 S> */ B(Nop),
- /* 54 E> */ B(BitwiseXorSmi), I8(2), U8(2),
+ /* 54 E> */ B(BitwiseXorSmi), I8(2), U8(3),
/* 59 S> */ B(Return),
]
constant pool: [
@@ -324,7 +324,7 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
/* 45 S> */ B(Nop),
- /* 54 E> */ B(BitwiseAndSmi), I8(2), U8(2),
+ /* 54 E> */ B(BitwiseAndSmi), I8(2), U8(3),
/* 59 S> */ B(Return),
]
constant pool: [
@@ -344,7 +344,7 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
/* 45 S> */ B(Nop),
- /* 54 E> */ B(BitwiseAndSmi), I8(2), U8(2),
+ /* 54 E> */ B(BitwiseAndSmi), I8(2), U8(3),
/* 59 S> */ B(Return),
]
constant pool: [
@@ -364,7 +364,7 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), I8(10),
B(Star), R(0),
/* 46 S> */ B(Nop),
- /* 55 E> */ B(ShiftLeftSmi), I8(3), U8(2),
+ /* 55 E> */ B(ShiftLeftSmi), I8(3), U8(3),
/* 61 S> */ B(Return),
]
constant pool: [
@@ -386,7 +386,7 @@ bytecodes: [
/* 46 S> */ B(LdaSmi), I8(3),
B(Star), R(1),
B(Ldar), R(0),
- /* 55 E> */ B(ShiftLeft), R(1), U8(2),
+ /* 55 E> */ B(ShiftLeft), R(1), U8(3),
/* 61 S> */ B(Return),
]
constant pool: [
@@ -406,7 +406,7 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), I8(10),
B(Star), R(0),
/* 46 S> */ B(Nop),
- /* 55 E> */ B(ShiftRightSmi), I8(3), U8(2),
+ /* 55 E> */ B(ShiftRightSmi), I8(3), U8(3),
/* 61 S> */ B(Return),
]
constant pool: [
@@ -428,7 +428,7 @@ bytecodes: [
/* 46 S> */ B(LdaSmi), I8(3),
B(Star), R(1),
B(Ldar), R(0),
- /* 55 E> */ B(ShiftRight), R(1), U8(2),
+ /* 55 E> */ B(ShiftRight), R(1), U8(3),
/* 61 S> */ B(Return),
]
constant pool: [
@@ -448,7 +448,7 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), I8(10),
B(Star), R(0),
/* 46 S> */ B(Nop),
- /* 55 E> */ B(ShiftRightLogicalSmi), I8(3), U8(2),
+ /* 55 E> */ B(ShiftRightLogicalSmi), I8(3), U8(3),
/* 62 S> */ B(Return),
]
constant pool: [
@@ -470,7 +470,7 @@ bytecodes: [
/* 46 S> */ B(LdaSmi), I8(3),
B(Star), R(1),
B(Ldar), R(0),
- /* 55 E> */ B(ShiftRightLogical), R(1), U8(2),
+ /* 55 E> */ B(ShiftRightLogical), R(1), U8(3),
/* 62 S> */ B(Return),
]
constant pool: [
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/PropertyCall.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/PropertyCall.golden
index 2feef5ed76..8bf592611c 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/PropertyCall.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/PropertyCall.golden
@@ -17,9 +17,9 @@ bytecode array length: 13
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 16 S> */ B(Nop),
- /* 24 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(4),
+ /* 24 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(5),
B(Star), R(0),
- /* 25 E> */ B(CallProperty0), R(0), R(arg0), U8(2),
+ /* 25 E> */ B(CallProperty0), R(0), R(arg0), U8(3),
/* 33 S> */ B(Return),
]
constant pool: [
@@ -39,9 +39,9 @@ bytecode array length: 15
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 22 S> */ B(Nop),
- /* 30 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(4),
+ /* 30 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(5),
B(Star), R(0),
- /* 31 E> */ B(CallProperty2), R(0), R(arg0), R(arg1), R(arg2), U8(2),
+ /* 31 E> */ B(CallProperty2), R(0), R(arg0), R(arg1), R(arg2), U8(3),
/* 43 S> */ B(Return),
]
constant pool: [
@@ -61,12 +61,12 @@ bytecode array length: 22
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 19 S> */ B(Nop),
- /* 27 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(4),
+ /* 27 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(5),
B(Star), R(0),
B(Ldar), R(arg1),
- /* 35 E> */ B(Add), R(arg1), U8(6),
+ /* 35 E> */ B(Add), R(arg1), U8(7),
B(Star), R(2),
- /* 28 E> */ B(CallProperty2), R(0), R(arg0), R(2), R(arg1), U8(2),
+ /* 28 E> */ B(CallProperty2), R(0), R(arg0), R(2), R(arg1), U8(3),
/* 44 S> */ B(Return),
]
constant pool: [
@@ -215,265 +215,265 @@ bytecode array length: 665
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 17 S> */ B(Nop),
- /* 18 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(2),
+ /* 18 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(3),
/* 26 S> */ B(Nop),
- /* 27 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(4),
+ /* 27 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(5),
/* 35 S> */ B(Nop),
- /* 36 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(6),
+ /* 36 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(7),
/* 44 S> */ B(Nop),
- /* 45 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(8),
+ /* 45 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(9),
/* 53 S> */ B(Nop),
- /* 54 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(10),
+ /* 54 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(11),
/* 62 S> */ B(Nop),
- /* 63 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(12),
+ /* 63 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(13),
/* 71 S> */ B(Nop),
- /* 72 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(14),
+ /* 72 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(15),
/* 80 S> */ B(Nop),
- /* 81 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(16),
+ /* 81 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(17),
/* 89 S> */ B(Nop),
- /* 90 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(18),
+ /* 90 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(19),
/* 98 S> */ B(Nop),
- /* 99 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(20),
+ /* 99 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(21),
/* 107 S> */ B(Nop),
- /* 108 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(22),
+ /* 108 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(23),
/* 116 S> */ B(Nop),
- /* 117 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(24),
+ /* 117 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(25),
/* 125 S> */ B(Nop),
- /* 126 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(26),
+ /* 126 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(27),
/* 134 S> */ B(Nop),
- /* 135 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(28),
+ /* 135 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(29),
/* 143 S> */ B(Nop),
- /* 144 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(30),
+ /* 144 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(31),
/* 152 S> */ B(Nop),
- /* 153 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(32),
+ /* 153 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(33),
/* 161 S> */ B(Nop),
- /* 162 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(34),
+ /* 162 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(35),
/* 170 S> */ B(Nop),
- /* 171 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(36),
+ /* 171 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(37),
/* 179 S> */ B(Nop),
- /* 180 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(38),
+ /* 180 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(39),
/* 188 S> */ B(Nop),
- /* 189 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(40),
+ /* 189 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(41),
/* 197 S> */ B(Nop),
- /* 198 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(42),
+ /* 198 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(43),
/* 206 S> */ B(Nop),
- /* 207 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(44),
+ /* 207 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(45),
/* 215 S> */ B(Nop),
- /* 216 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(46),
+ /* 216 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(47),
/* 224 S> */ B(Nop),
- /* 225 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(48),
+ /* 225 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(49),
/* 233 S> */ B(Nop),
- /* 234 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(50),
+ /* 234 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(51),
/* 242 S> */ B(Nop),
- /* 243 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(52),
+ /* 243 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(53),
/* 251 S> */ B(Nop),
- /* 252 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(54),
+ /* 252 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(55),
/* 260 S> */ B(Nop),
- /* 261 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(56),
+ /* 261 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(57),
/* 269 S> */ B(Nop),
- /* 270 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(58),
+ /* 270 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(59),
/* 278 S> */ B(Nop),
- /* 279 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(60),
+ /* 279 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(61),
/* 287 S> */ B(Nop),
- /* 288 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(62),
+ /* 288 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(63),
/* 296 S> */ B(Nop),
- /* 297 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(64),
+ /* 297 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(65),
/* 305 S> */ B(Nop),
- /* 306 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(66),
+ /* 306 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(67),
/* 314 S> */ B(Nop),
- /* 315 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(68),
+ /* 315 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(69),
/* 323 S> */ B(Nop),
- /* 324 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(70),
+ /* 324 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(71),
/* 332 S> */ B(Nop),
- /* 333 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(72),
+ /* 333 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(73),
/* 341 S> */ B(Nop),
- /* 342 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(74),
+ /* 342 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(75),
/* 350 S> */ B(Nop),
- /* 351 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(76),
+ /* 351 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(77),
/* 359 S> */ B(Nop),
- /* 360 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(78),
+ /* 360 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(79),
/* 368 S> */ B(Nop),
- /* 369 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(80),
+ /* 369 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(81),
/* 377 S> */ B(Nop),
- /* 378 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(82),
+ /* 378 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(83),
/* 386 S> */ B(Nop),
- /* 387 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(84),
+ /* 387 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(85),
/* 395 S> */ B(Nop),
- /* 396 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(86),
+ /* 396 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(87),
/* 404 S> */ B(Nop),
- /* 405 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(88),
+ /* 405 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(89),
/* 413 S> */ B(Nop),
- /* 414 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(90),
+ /* 414 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(91),
/* 422 S> */ B(Nop),
- /* 423 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(92),
+ /* 423 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(93),
/* 431 S> */ B(Nop),
- /* 432 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(94),
+ /* 432 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(95),
/* 440 S> */ B(Nop),
- /* 441 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(96),
+ /* 441 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(97),
/* 449 S> */ B(Nop),
- /* 450 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(98),
+ /* 450 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(99),
/* 458 S> */ B(Nop),
- /* 459 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(100),
+ /* 459 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(101),
/* 467 S> */ B(Nop),
- /* 468 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(102),
+ /* 468 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(103),
/* 476 S> */ B(Nop),
- /* 477 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(104),
+ /* 477 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(105),
/* 485 S> */ B(Nop),
- /* 486 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(106),
+ /* 486 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(107),
/* 494 S> */ B(Nop),
- /* 495 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(108),
+ /* 495 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(109),
/* 503 S> */ B(Nop),
- /* 504 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(110),
+ /* 504 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(111),
/* 512 S> */ B(Nop),
- /* 513 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(112),
+ /* 513 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(113),
/* 521 S> */ B(Nop),
- /* 522 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(114),
+ /* 522 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(115),
/* 530 S> */ B(Nop),
- /* 531 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(116),
+ /* 531 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(117),
/* 539 S> */ B(Nop),
- /* 540 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(118),
+ /* 540 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(119),
/* 548 S> */ B(Nop),
- /* 549 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(120),
+ /* 549 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(121),
/* 557 S> */ B(Nop),
- /* 558 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(122),
+ /* 558 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(123),
/* 566 S> */ B(Nop),
- /* 567 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(124),
+ /* 567 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(125),
/* 575 S> */ B(Nop),
- /* 576 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(126),
+ /* 576 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(127),
/* 584 S> */ B(Nop),
- /* 585 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(128),
+ /* 585 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(129),
/* 593 S> */ B(Nop),
- /* 594 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(130),
+ /* 594 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(131),
/* 602 S> */ B(Nop),
- /* 603 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(132),
+ /* 603 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(133),
/* 611 S> */ B(Nop),
- /* 612 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(134),
+ /* 612 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(135),
/* 620 S> */ B(Nop),
- /* 621 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(136),
+ /* 621 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(137),
/* 629 S> */ B(Nop),
- /* 630 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(138),
+ /* 630 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(139),
/* 638 S> */ B(Nop),
- /* 639 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(140),
+ /* 639 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(141),
/* 647 S> */ B(Nop),
- /* 648 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(142),
+ /* 648 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(143),
/* 656 S> */ B(Nop),
- /* 657 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(144),
+ /* 657 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(145),
/* 665 S> */ B(Nop),
- /* 666 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(146),
+ /* 666 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(147),
/* 674 S> */ B(Nop),
- /* 675 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(148),
+ /* 675 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(149),
/* 683 S> */ B(Nop),
- /* 684 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(150),
+ /* 684 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(151),
/* 692 S> */ B(Nop),
- /* 693 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(152),
+ /* 693 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(153),
/* 701 S> */ B(Nop),
- /* 702 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(154),
+ /* 702 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(155),
/* 710 S> */ B(Nop),
- /* 711 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(156),
+ /* 711 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(157),
/* 719 S> */ B(Nop),
- /* 720 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(158),
+ /* 720 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(159),
/* 728 S> */ B(Nop),
- /* 729 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(160),
+ /* 729 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(161),
/* 737 S> */ B(Nop),
- /* 738 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(162),
+ /* 738 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(163),
/* 746 S> */ B(Nop),
- /* 747 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(164),
+ /* 747 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(165),
/* 755 S> */ B(Nop),
- /* 756 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(166),
+ /* 756 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(167),
/* 764 S> */ B(Nop),
- /* 765 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(168),
+ /* 765 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(169),
/* 773 S> */ B(Nop),
- /* 774 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(170),
+ /* 774 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(171),
/* 782 S> */ B(Nop),
- /* 783 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(172),
+ /* 783 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(173),
/* 791 S> */ B(Nop),
- /* 792 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(174),
+ /* 792 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(175),
/* 800 S> */ B(Nop),
- /* 801 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(176),
+ /* 801 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(177),
/* 809 S> */ B(Nop),
- /* 810 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(178),
+ /* 810 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(179),
/* 818 S> */ B(Nop),
- /* 819 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(180),
+ /* 819 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(181),
/* 827 S> */ B(Nop),
- /* 828 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(182),
+ /* 828 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(183),
/* 836 S> */ B(Nop),
- /* 837 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(184),
+ /* 837 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(185),
/* 845 S> */ B(Nop),
- /* 846 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(186),
+ /* 846 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(187),
/* 854 S> */ B(Nop),
- /* 855 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(188),
+ /* 855 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(189),
/* 863 S> */ B(Nop),
- /* 864 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(190),
+ /* 864 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(191),
/* 872 S> */ B(Nop),
- /* 873 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(192),
+ /* 873 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(193),
/* 881 S> */ B(Nop),
- /* 882 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(194),
+ /* 882 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(195),
/* 890 S> */ B(Nop),
- /* 891 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(196),
+ /* 891 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(197),
/* 899 S> */ B(Nop),
- /* 900 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(198),
+ /* 900 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(199),
/* 908 S> */ B(Nop),
- /* 909 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(200),
+ /* 909 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(201),
/* 917 S> */ B(Nop),
- /* 918 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(202),
+ /* 918 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(203),
/* 926 S> */ B(Nop),
- /* 927 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(204),
+ /* 927 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(205),
/* 935 S> */ B(Nop),
- /* 936 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(206),
+ /* 936 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(207),
/* 944 S> */ B(Nop),
- /* 945 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(208),
+ /* 945 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(209),
/* 953 S> */ B(Nop),
- /* 954 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(210),
+ /* 954 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(211),
/* 962 S> */ B(Nop),
- /* 963 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(212),
+ /* 963 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(213),
/* 971 S> */ B(Nop),
- /* 972 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(214),
+ /* 972 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(215),
/* 980 S> */ B(Nop),
- /* 981 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(216),
+ /* 981 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(217),
/* 989 S> */ B(Nop),
- /* 990 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(218),
+ /* 990 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(219),
/* 998 S> */ B(Nop),
- /* 999 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(220),
+ /* 999 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(221),
/* 1007 S> */ B(Nop),
- /* 1008 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(222),
+ /* 1008 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(223),
/* 1016 S> */ B(Nop),
- /* 1017 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(224),
+ /* 1017 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(225),
/* 1025 S> */ B(Nop),
- /* 1026 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(226),
+ /* 1026 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(227),
/* 1034 S> */ B(Nop),
- /* 1035 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(228),
+ /* 1035 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(229),
/* 1043 S> */ B(Nop),
- /* 1044 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(230),
+ /* 1044 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(231),
/* 1052 S> */ B(Nop),
- /* 1053 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(232),
+ /* 1053 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(233),
/* 1061 S> */ B(Nop),
- /* 1062 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(234),
+ /* 1062 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(235),
/* 1070 S> */ B(Nop),
- /* 1071 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(236),
+ /* 1071 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(237),
/* 1079 S> */ B(Nop),
- /* 1080 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(238),
+ /* 1080 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(239),
/* 1088 S> */ B(Nop),
- /* 1089 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(240),
+ /* 1089 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(241),
/* 1097 S> */ B(Nop),
- /* 1098 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(242),
+ /* 1098 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(243),
/* 1106 S> */ B(Nop),
- /* 1107 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(244),
+ /* 1107 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(245),
/* 1115 S> */ B(Nop),
- /* 1116 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(246),
+ /* 1116 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(247),
/* 1124 S> */ B(Nop),
- /* 1125 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(248),
+ /* 1125 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(249),
/* 1133 S> */ B(Nop),
- /* 1134 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(250),
+ /* 1134 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(251),
/* 1142 S> */ B(Nop),
- /* 1143 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(252),
+ /* 1143 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(253),
/* 1151 S> */ B(Nop),
- /* 1152 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(254),
+ /* 1152 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(255),
/* 1160 S> */ B(Nop),
- /* 1161 E> */ B(Wide), B(LdaNamedProperty), R16(arg0), U16(0), U16(256),
+ /* 1161 E> */ B(Wide), B(LdaNamedProperty), R16(arg0), U16(0), U16(257),
/* 1169 S> */ B(Nop),
- /* 1177 E> */ B(Wide), B(LdaNamedProperty), R16(arg0), U16(0), U16(260),
+ /* 1177 E> */ B(Wide), B(LdaNamedProperty), R16(arg0), U16(0), U16(261),
B(Star), R(0),
- /* 1178 E> */ B(Wide), B(CallProperty0), R16(0), R16(arg0), U16(258),
+ /* 1178 E> */ B(Wide), B(CallProperty0), R16(0), R16(arg0), U16(259),
/* 1186 S> */ B(Return),
]
constant pool: [
@@ -493,23 +493,23 @@ bytecode array length: 52
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 16 S> */ B(Nop),
- /* 24 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(8),
+ /* 24 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(9),
B(Star), R(2),
B(LdaSmi), I8(1),
B(Star), R(4),
- /* 25 E> */ B(CallProperty1), R(2), R(arg0), R(4), U8(6),
+ /* 25 E> */ B(CallProperty1), R(2), R(arg0), R(4), U8(7),
B(Star), R(2),
- /* 32 E> */ B(LdaNamedProperty), R(2), U8(0), U8(10),
+ /* 32 E> */ B(LdaNamedProperty), R(2), U8(0), U8(11),
B(Star), R(1),
B(LdaSmi), I8(2),
B(Star), R(3),
- /* 33 E> */ B(CallProperty1), R(1), R(2), R(3), U8(4),
+ /* 33 E> */ B(CallProperty1), R(1), R(2), R(3), U8(5),
B(Star), R(1),
- /* 40 E> */ B(LdaNamedProperty), R(1), U8(0), U8(12),
+ /* 40 E> */ B(LdaNamedProperty), R(1), U8(0), U8(13),
B(Star), R(0),
B(LdaSmi), I8(3),
B(Star), R(2),
- /* 41 E> */ B(CallProperty1), R(0), R(1), R(2), U8(2),
+ /* 41 E> */ B(CallProperty1), R(0), R(1), R(2), U8(3),
/* 50 S> */ B(Return),
]
constant pool: [
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/PropertyLoads.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/PropertyLoads.golden
index bee525cf44..33ec14c396 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/PropertyLoads.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/PropertyLoads.golden
@@ -17,7 +17,7 @@ bytecode array length: 7
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 16 S> */ B(Nop),
- /* 24 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(2),
+ /* 24 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(3),
/* 31 S> */ B(Return),
]
constant pool: [
@@ -37,7 +37,7 @@ bytecode array length: 7
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 16 S> */ B(Nop),
- /* 24 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(2),
+ /* 24 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(3),
/* 33 S> */ B(Return),
]
constant pool: [
@@ -57,7 +57,7 @@ bytecode array length: 7
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 16 S> */ B(LdaSmi), I8(100),
- /* 24 E> */ B(LdaKeyedProperty), R(arg0), U8(2),
+ /* 24 E> */ B(LdaKeyedProperty), R(arg0), U8(3),
/* 31 S> */ B(Return),
]
constant pool: [
@@ -76,7 +76,7 @@ bytecode array length: 7
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 19 S> */ B(Ldar), R(arg1),
- /* 28 E> */ B(LdaKeyedProperty), R(arg0), U8(2),
+ /* 28 E> */ B(LdaKeyedProperty), R(arg0), U8(3),
/* 32 S> */ B(Return),
]
constant pool: [
@@ -95,10 +95,10 @@ bytecode array length: 14
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 25 S> */ B(Nop),
- /* 25 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(2),
+ /* 25 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(3),
B(Star), R(0),
/* 32 S> */ B(LdaSmi), I8(-124),
- /* 40 E> */ B(LdaKeyedProperty), R(arg0), U8(4),
+ /* 40 E> */ B(LdaKeyedProperty), R(arg0), U8(5),
/* 48 S> */ B(Return),
]
constant pool: [
@@ -249,391 +249,391 @@ bytecode array length: 911
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 27 S> */ B(Nop),
- /* 32 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(2),
+ /* 32 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(3),
B(Star), R(0),
/* 41 S> */ B(Nop),
- /* 46 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(4),
+ /* 46 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(5),
B(Star), R(0),
/* 55 S> */ B(Nop),
- /* 60 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(6),
+ /* 60 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(7),
B(Star), R(0),
/* 69 S> */ B(Nop),
- /* 74 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(8),
+ /* 74 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(9),
B(Star), R(0),
/* 83 S> */ B(Nop),
- /* 88 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(10),
+ /* 88 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(11),
B(Star), R(0),
/* 97 S> */ B(Nop),
- /* 102 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(12),
+ /* 102 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(13),
B(Star), R(0),
/* 111 S> */ B(Nop),
- /* 116 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(14),
+ /* 116 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(15),
B(Star), R(0),
/* 125 S> */ B(Nop),
- /* 130 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(16),
+ /* 130 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(17),
B(Star), R(0),
/* 139 S> */ B(Nop),
- /* 144 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(18),
+ /* 144 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(19),
B(Star), R(0),
/* 153 S> */ B(Nop),
- /* 158 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(20),
+ /* 158 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(21),
B(Star), R(0),
/* 167 S> */ B(Nop),
- /* 172 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(22),
+ /* 172 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(23),
B(Star), R(0),
/* 181 S> */ B(Nop),
- /* 186 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(24),
+ /* 186 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(25),
B(Star), R(0),
/* 195 S> */ B(Nop),
- /* 200 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(26),
+ /* 200 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(27),
B(Star), R(0),
/* 209 S> */ B(Nop),
- /* 214 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(28),
+ /* 214 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(29),
B(Star), R(0),
/* 223 S> */ B(Nop),
- /* 228 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(30),
+ /* 228 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(31),
B(Star), R(0),
/* 237 S> */ B(Nop),
- /* 242 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(32),
+ /* 242 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(33),
B(Star), R(0),
/* 251 S> */ B(Nop),
- /* 256 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(34),
+ /* 256 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(35),
B(Star), R(0),
/* 265 S> */ B(Nop),
- /* 270 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(36),
+ /* 270 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(37),
B(Star), R(0),
/* 279 S> */ B(Nop),
- /* 284 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(38),
+ /* 284 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(39),
B(Star), R(0),
/* 293 S> */ B(Nop),
- /* 298 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(40),
+ /* 298 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(41),
B(Star), R(0),
/* 307 S> */ B(Nop),
- /* 312 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(42),
+ /* 312 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(43),
B(Star), R(0),
/* 321 S> */ B(Nop),
- /* 326 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(44),
+ /* 326 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(45),
B(Star), R(0),
/* 335 S> */ B(Nop),
- /* 340 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(46),
+ /* 340 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(47),
B(Star), R(0),
/* 349 S> */ B(Nop),
- /* 354 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(48),
+ /* 354 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(49),
B(Star), R(0),
/* 363 S> */ B(Nop),
- /* 368 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(50),
+ /* 368 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(51),
B(Star), R(0),
/* 377 S> */ B(Nop),
- /* 382 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(52),
+ /* 382 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(53),
B(Star), R(0),
/* 391 S> */ B(Nop),
- /* 396 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(54),
+ /* 396 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(55),
B(Star), R(0),
/* 405 S> */ B(Nop),
- /* 410 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(56),
+ /* 410 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(57),
B(Star), R(0),
/* 419 S> */ B(Nop),
- /* 424 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(58),
+ /* 424 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(59),
B(Star), R(0),
/* 433 S> */ B(Nop),
- /* 438 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(60),
+ /* 438 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(61),
B(Star), R(0),
/* 447 S> */ B(Nop),
- /* 452 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(62),
+ /* 452 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(63),
B(Star), R(0),
/* 461 S> */ B(Nop),
- /* 466 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(64),
+ /* 466 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(65),
B(Star), R(0),
/* 475 S> */ B(Nop),
- /* 480 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(66),
+ /* 480 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(67),
B(Star), R(0),
/* 489 S> */ B(Nop),
- /* 494 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(68),
+ /* 494 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(69),
B(Star), R(0),
/* 503 S> */ B(Nop),
- /* 508 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(70),
+ /* 508 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(71),
B(Star), R(0),
/* 517 S> */ B(Nop),
- /* 522 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(72),
+ /* 522 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(73),
B(Star), R(0),
/* 531 S> */ B(Nop),
- /* 536 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(74),
+ /* 536 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(75),
B(Star), R(0),
/* 545 S> */ B(Nop),
- /* 550 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(76),
+ /* 550 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(77),
B(Star), R(0),
/* 559 S> */ B(Nop),
- /* 564 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(78),
+ /* 564 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(79),
B(Star), R(0),
/* 573 S> */ B(Nop),
- /* 578 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(80),
+ /* 578 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(81),
B(Star), R(0),
/* 587 S> */ B(Nop),
- /* 592 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(82),
+ /* 592 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(83),
B(Star), R(0),
/* 601 S> */ B(Nop),
- /* 606 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(84),
+ /* 606 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(85),
B(Star), R(0),
/* 615 S> */ B(Nop),
- /* 620 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(86),
+ /* 620 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(87),
B(Star), R(0),
/* 629 S> */ B(Nop),
- /* 634 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(88),
+ /* 634 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(89),
B(Star), R(0),
/* 643 S> */ B(Nop),
- /* 648 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(90),
+ /* 648 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(91),
B(Star), R(0),
/* 657 S> */ B(Nop),
- /* 662 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(92),
+ /* 662 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(93),
B(Star), R(0),
/* 671 S> */ B(Nop),
- /* 676 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(94),
+ /* 676 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(95),
B(Star), R(0),
/* 685 S> */ B(Nop),
- /* 690 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(96),
+ /* 690 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(97),
B(Star), R(0),
/* 699 S> */ B(Nop),
- /* 704 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(98),
+ /* 704 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(99),
B(Star), R(0),
/* 713 S> */ B(Nop),
- /* 718 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(100),
+ /* 718 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(101),
B(Star), R(0),
/* 727 S> */ B(Nop),
- /* 732 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(102),
+ /* 732 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(103),
B(Star), R(0),
/* 741 S> */ B(Nop),
- /* 746 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(104),
+ /* 746 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(105),
B(Star), R(0),
/* 755 S> */ B(Nop),
- /* 760 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(106),
+ /* 760 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(107),
B(Star), R(0),
/* 769 S> */ B(Nop),
- /* 774 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(108),
+ /* 774 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(109),
B(Star), R(0),
/* 783 S> */ B(Nop),
- /* 788 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(110),
+ /* 788 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(111),
B(Star), R(0),
/* 797 S> */ B(Nop),
- /* 802 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(112),
+ /* 802 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(113),
B(Star), R(0),
/* 811 S> */ B(Nop),
- /* 816 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(114),
+ /* 816 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(115),
B(Star), R(0),
/* 825 S> */ B(Nop),
- /* 830 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(116),
+ /* 830 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(117),
B(Star), R(0),
/* 839 S> */ B(Nop),
- /* 844 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(118),
+ /* 844 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(119),
B(Star), R(0),
/* 853 S> */ B(Nop),
- /* 858 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(120),
+ /* 858 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(121),
B(Star), R(0),
/* 867 S> */ B(Nop),
- /* 872 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(122),
+ /* 872 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(123),
B(Star), R(0),
/* 881 S> */ B(Nop),
- /* 886 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(124),
+ /* 886 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(125),
B(Star), R(0),
/* 895 S> */ B(Nop),
- /* 900 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(126),
+ /* 900 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(127),
B(Star), R(0),
/* 909 S> */ B(Nop),
- /* 914 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(128),
+ /* 914 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(129),
B(Star), R(0),
/* 923 S> */ B(Nop),
- /* 928 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(130),
+ /* 928 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(131),
B(Star), R(0),
/* 937 S> */ B(Nop),
- /* 942 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(132),
+ /* 942 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(133),
B(Star), R(0),
/* 951 S> */ B(Nop),
- /* 956 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(134),
+ /* 956 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(135),
B(Star), R(0),
/* 965 S> */ B(Nop),
- /* 970 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(136),
+ /* 970 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(137),
B(Star), R(0),
/* 979 S> */ B(Nop),
- /* 984 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(138),
+ /* 984 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(139),
B(Star), R(0),
/* 993 S> */ B(Nop),
- /* 998 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(140),
+ /* 998 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(141),
B(Star), R(0),
/* 1007 S> */ B(Nop),
- /* 1012 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(142),
+ /* 1012 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(143),
B(Star), R(0),
/* 1021 S> */ B(Nop),
- /* 1026 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(144),
+ /* 1026 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(145),
B(Star), R(0),
/* 1035 S> */ B(Nop),
- /* 1040 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(146),
+ /* 1040 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(147),
B(Star), R(0),
/* 1049 S> */ B(Nop),
- /* 1054 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(148),
+ /* 1054 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(149),
B(Star), R(0),
/* 1063 S> */ B(Nop),
- /* 1068 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(150),
+ /* 1068 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(151),
B(Star), R(0),
/* 1077 S> */ B(Nop),
- /* 1082 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(152),
+ /* 1082 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(153),
B(Star), R(0),
/* 1091 S> */ B(Nop),
- /* 1096 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(154),
+ /* 1096 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(155),
B(Star), R(0),
/* 1105 S> */ B(Nop),
- /* 1110 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(156),
+ /* 1110 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(157),
B(Star), R(0),
/* 1119 S> */ B(Nop),
- /* 1124 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(158),
+ /* 1124 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(159),
B(Star), R(0),
/* 1133 S> */ B(Nop),
- /* 1138 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(160),
+ /* 1138 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(161),
B(Star), R(0),
/* 1147 S> */ B(Nop),
- /* 1152 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(162),
+ /* 1152 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(163),
B(Star), R(0),
/* 1161 S> */ B(Nop),
- /* 1166 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(164),
+ /* 1166 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(165),
B(Star), R(0),
/* 1175 S> */ B(Nop),
- /* 1180 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(166),
+ /* 1180 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(167),
B(Star), R(0),
/* 1189 S> */ B(Nop),
- /* 1194 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(168),
+ /* 1194 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(169),
B(Star), R(0),
/* 1203 S> */ B(Nop),
- /* 1208 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(170),
+ /* 1208 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(171),
B(Star), R(0),
/* 1217 S> */ B(Nop),
- /* 1222 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(172),
+ /* 1222 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(173),
B(Star), R(0),
/* 1231 S> */ B(Nop),
- /* 1236 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(174),
+ /* 1236 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(175),
B(Star), R(0),
/* 1245 S> */ B(Nop),
- /* 1250 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(176),
+ /* 1250 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(177),
B(Star), R(0),
/* 1259 S> */ B(Nop),
- /* 1264 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(178),
+ /* 1264 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(179),
B(Star), R(0),
/* 1273 S> */ B(Nop),
- /* 1278 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(180),
+ /* 1278 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(181),
B(Star), R(0),
/* 1287 S> */ B(Nop),
- /* 1292 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(182),
+ /* 1292 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(183),
B(Star), R(0),
/* 1301 S> */ B(Nop),
- /* 1306 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(184),
+ /* 1306 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(185),
B(Star), R(0),
/* 1315 S> */ B(Nop),
- /* 1320 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(186),
+ /* 1320 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(187),
B(Star), R(0),
/* 1329 S> */ B(Nop),
- /* 1334 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(188),
+ /* 1334 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(189),
B(Star), R(0),
/* 1343 S> */ B(Nop),
- /* 1348 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(190),
+ /* 1348 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(191),
B(Star), R(0),
/* 1357 S> */ B(Nop),
- /* 1362 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(192),
+ /* 1362 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(193),
B(Star), R(0),
/* 1371 S> */ B(Nop),
- /* 1376 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(194),
+ /* 1376 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(195),
B(Star), R(0),
/* 1385 S> */ B(Nop),
- /* 1390 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(196),
+ /* 1390 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(197),
B(Star), R(0),
/* 1399 S> */ B(Nop),
- /* 1404 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(198),
+ /* 1404 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(199),
B(Star), R(0),
/* 1413 S> */ B(Nop),
- /* 1418 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(200),
+ /* 1418 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(201),
B(Star), R(0),
/* 1427 S> */ B(Nop),
- /* 1432 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(202),
+ /* 1432 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(203),
B(Star), R(0),
/* 1441 S> */ B(Nop),
- /* 1446 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(204),
+ /* 1446 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(205),
B(Star), R(0),
/* 1455 S> */ B(Nop),
- /* 1460 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(206),
+ /* 1460 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(207),
B(Star), R(0),
/* 1469 S> */ B(Nop),
- /* 1474 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(208),
+ /* 1474 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(209),
B(Star), R(0),
/* 1483 S> */ B(Nop),
- /* 1488 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(210),
+ /* 1488 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(211),
B(Star), R(0),
/* 1497 S> */ B(Nop),
- /* 1502 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(212),
+ /* 1502 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(213),
B(Star), R(0),
/* 1511 S> */ B(Nop),
- /* 1516 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(214),
+ /* 1516 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(215),
B(Star), R(0),
/* 1525 S> */ B(Nop),
- /* 1530 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(216),
+ /* 1530 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(217),
B(Star), R(0),
/* 1539 S> */ B(Nop),
- /* 1544 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(218),
+ /* 1544 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(219),
B(Star), R(0),
/* 1553 S> */ B(Nop),
- /* 1558 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(220),
+ /* 1558 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(221),
B(Star), R(0),
/* 1567 S> */ B(Nop),
- /* 1572 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(222),
+ /* 1572 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(223),
B(Star), R(0),
/* 1581 S> */ B(Nop),
- /* 1586 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(224),
+ /* 1586 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(225),
B(Star), R(0),
/* 1595 S> */ B(Nop),
- /* 1600 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(226),
+ /* 1600 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(227),
B(Star), R(0),
/* 1609 S> */ B(Nop),
- /* 1614 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(228),
+ /* 1614 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(229),
B(Star), R(0),
/* 1623 S> */ B(Nop),
- /* 1628 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(230),
+ /* 1628 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(231),
B(Star), R(0),
/* 1637 S> */ B(Nop),
- /* 1642 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(232),
+ /* 1642 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(233),
B(Star), R(0),
/* 1651 S> */ B(Nop),
- /* 1656 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(234),
+ /* 1656 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(235),
B(Star), R(0),
/* 1665 S> */ B(Nop),
- /* 1670 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(236),
+ /* 1670 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(237),
B(Star), R(0),
/* 1679 S> */ B(Nop),
- /* 1684 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(238),
+ /* 1684 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(239),
B(Star), R(0),
/* 1693 S> */ B(Nop),
- /* 1698 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(240),
+ /* 1698 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(241),
B(Star), R(0),
/* 1707 S> */ B(Nop),
- /* 1712 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(242),
+ /* 1712 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(243),
B(Star), R(0),
/* 1721 S> */ B(Nop),
- /* 1726 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(244),
+ /* 1726 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(245),
B(Star), R(0),
/* 1735 S> */ B(Nop),
- /* 1740 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(246),
+ /* 1740 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(247),
B(Star), R(0),
/* 1749 S> */ B(Nop),
- /* 1754 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(248),
+ /* 1754 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(249),
B(Star), R(0),
/* 1763 S> */ B(Nop),
- /* 1768 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(250),
+ /* 1768 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(251),
B(Star), R(0),
/* 1777 S> */ B(Nop),
- /* 1782 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(252),
+ /* 1782 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(253),
B(Star), R(0),
/* 1791 S> */ B(Nop),
- /* 1796 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(254),
+ /* 1796 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(255),
B(Star), R(0),
/* 1805 S> */ B(Nop),
- /* 1810 E> */ B(Wide), B(LdaNamedProperty), R16(arg0), U16(0), U16(256),
+ /* 1810 E> */ B(Wide), B(LdaNamedProperty), R16(arg0), U16(0), U16(257),
B(Star), R(0),
/* 1819 S> */ B(Nop),
- /* 1827 E> */ B(Wide), B(LdaNamedProperty), R16(arg0), U16(0), U16(258),
+ /* 1827 E> */ B(Wide), B(LdaNamedProperty), R16(arg0), U16(0), U16(259),
/* 1834 S> */ B(Return),
]
constant pool: [
@@ -784,391 +784,391 @@ bytecode array length: 909
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 30 S> */ B(Ldar), R(arg1),
- /* 36 E> */ B(LdaKeyedProperty), R(arg0), U8(2),
+ /* 36 E> */ B(LdaKeyedProperty), R(arg0), U8(3),
B(Star), R(0),
/* 42 S> */ B(Ldar), R(arg1),
- /* 48 E> */ B(LdaKeyedProperty), R(arg0), U8(4),
+ /* 48 E> */ B(LdaKeyedProperty), R(arg0), U8(5),
B(Star), R(0),
/* 54 S> */ B(Ldar), R(arg1),
- /* 60 E> */ B(LdaKeyedProperty), R(arg0), U8(6),
+ /* 60 E> */ B(LdaKeyedProperty), R(arg0), U8(7),
B(Star), R(0),
/* 66 S> */ B(Ldar), R(arg1),
- /* 72 E> */ B(LdaKeyedProperty), R(arg0), U8(8),
+ /* 72 E> */ B(LdaKeyedProperty), R(arg0), U8(9),
B(Star), R(0),
/* 78 S> */ B(Ldar), R(arg1),
- /* 84 E> */ B(LdaKeyedProperty), R(arg0), U8(10),
+ /* 84 E> */ B(LdaKeyedProperty), R(arg0), U8(11),
B(Star), R(0),
/* 90 S> */ B(Ldar), R(arg1),
- /* 96 E> */ B(LdaKeyedProperty), R(arg0), U8(12),
+ /* 96 E> */ B(LdaKeyedProperty), R(arg0), U8(13),
B(Star), R(0),
/* 102 S> */ B(Ldar), R(arg1),
- /* 108 E> */ B(LdaKeyedProperty), R(arg0), U8(14),
+ /* 108 E> */ B(LdaKeyedProperty), R(arg0), U8(15),
B(Star), R(0),
/* 114 S> */ B(Ldar), R(arg1),
- /* 120 E> */ B(LdaKeyedProperty), R(arg0), U8(16),
+ /* 120 E> */ B(LdaKeyedProperty), R(arg0), U8(17),
B(Star), R(0),
/* 126 S> */ B(Ldar), R(arg1),
- /* 132 E> */ B(LdaKeyedProperty), R(arg0), U8(18),
+ /* 132 E> */ B(LdaKeyedProperty), R(arg0), U8(19),
B(Star), R(0),
/* 138 S> */ B(Ldar), R(arg1),
- /* 144 E> */ B(LdaKeyedProperty), R(arg0), U8(20),
+ /* 144 E> */ B(LdaKeyedProperty), R(arg0), U8(21),
B(Star), R(0),
/* 150 S> */ B(Ldar), R(arg1),
- /* 156 E> */ B(LdaKeyedProperty), R(arg0), U8(22),
+ /* 156 E> */ B(LdaKeyedProperty), R(arg0), U8(23),
B(Star), R(0),
/* 162 S> */ B(Ldar), R(arg1),
- /* 168 E> */ B(LdaKeyedProperty), R(arg0), U8(24),
+ /* 168 E> */ B(LdaKeyedProperty), R(arg0), U8(25),
B(Star), R(0),
/* 174 S> */ B(Ldar), R(arg1),
- /* 180 E> */ B(LdaKeyedProperty), R(arg0), U8(26),
+ /* 180 E> */ B(LdaKeyedProperty), R(arg0), U8(27),
B(Star), R(0),
/* 186 S> */ B(Ldar), R(arg1),
- /* 192 E> */ B(LdaKeyedProperty), R(arg0), U8(28),
+ /* 192 E> */ B(LdaKeyedProperty), R(arg0), U8(29),
B(Star), R(0),
/* 198 S> */ B(Ldar), R(arg1),
- /* 204 E> */ B(LdaKeyedProperty), R(arg0), U8(30),
+ /* 204 E> */ B(LdaKeyedProperty), R(arg0), U8(31),
B(Star), R(0),
/* 210 S> */ B(Ldar), R(arg1),
- /* 216 E> */ B(LdaKeyedProperty), R(arg0), U8(32),
+ /* 216 E> */ B(LdaKeyedProperty), R(arg0), U8(33),
B(Star), R(0),
/* 222 S> */ B(Ldar), R(arg1),
- /* 228 E> */ B(LdaKeyedProperty), R(arg0), U8(34),
+ /* 228 E> */ B(LdaKeyedProperty), R(arg0), U8(35),
B(Star), R(0),
/* 234 S> */ B(Ldar), R(arg1),
- /* 240 E> */ B(LdaKeyedProperty), R(arg0), U8(36),
+ /* 240 E> */ B(LdaKeyedProperty), R(arg0), U8(37),
B(Star), R(0),
/* 246 S> */ B(Ldar), R(arg1),
- /* 252 E> */ B(LdaKeyedProperty), R(arg0), U8(38),
+ /* 252 E> */ B(LdaKeyedProperty), R(arg0), U8(39),
B(Star), R(0),
/* 258 S> */ B(Ldar), R(arg1),
- /* 264 E> */ B(LdaKeyedProperty), R(arg0), U8(40),
+ /* 264 E> */ B(LdaKeyedProperty), R(arg0), U8(41),
B(Star), R(0),
/* 270 S> */ B(Ldar), R(arg1),
- /* 276 E> */ B(LdaKeyedProperty), R(arg0), U8(42),
+ /* 276 E> */ B(LdaKeyedProperty), R(arg0), U8(43),
B(Star), R(0),
/* 282 S> */ B(Ldar), R(arg1),
- /* 288 E> */ B(LdaKeyedProperty), R(arg0), U8(44),
+ /* 288 E> */ B(LdaKeyedProperty), R(arg0), U8(45),
B(Star), R(0),
/* 294 S> */ B(Ldar), R(arg1),
- /* 300 E> */ B(LdaKeyedProperty), R(arg0), U8(46),
+ /* 300 E> */ B(LdaKeyedProperty), R(arg0), U8(47),
B(Star), R(0),
/* 306 S> */ B(Ldar), R(arg1),
- /* 312 E> */ B(LdaKeyedProperty), R(arg0), U8(48),
+ /* 312 E> */ B(LdaKeyedProperty), R(arg0), U8(49),
B(Star), R(0),
/* 318 S> */ B(Ldar), R(arg1),
- /* 324 E> */ B(LdaKeyedProperty), R(arg0), U8(50),
+ /* 324 E> */ B(LdaKeyedProperty), R(arg0), U8(51),
B(Star), R(0),
/* 330 S> */ B(Ldar), R(arg1),
- /* 336 E> */ B(LdaKeyedProperty), R(arg0), U8(52),
+ /* 336 E> */ B(LdaKeyedProperty), R(arg0), U8(53),
B(Star), R(0),
/* 342 S> */ B(Ldar), R(arg1),
- /* 348 E> */ B(LdaKeyedProperty), R(arg0), U8(54),
+ /* 348 E> */ B(LdaKeyedProperty), R(arg0), U8(55),
B(Star), R(0),
/* 354 S> */ B(Ldar), R(arg1),
- /* 360 E> */ B(LdaKeyedProperty), R(arg0), U8(56),
+ /* 360 E> */ B(LdaKeyedProperty), R(arg0), U8(57),
B(Star), R(0),
/* 366 S> */ B(Ldar), R(arg1),
- /* 372 E> */ B(LdaKeyedProperty), R(arg0), U8(58),
+ /* 372 E> */ B(LdaKeyedProperty), R(arg0), U8(59),
B(Star), R(0),
/* 378 S> */ B(Ldar), R(arg1),
- /* 384 E> */ B(LdaKeyedProperty), R(arg0), U8(60),
+ /* 384 E> */ B(LdaKeyedProperty), R(arg0), U8(61),
B(Star), R(0),
/* 390 S> */ B(Ldar), R(arg1),
- /* 396 E> */ B(LdaKeyedProperty), R(arg0), U8(62),
+ /* 396 E> */ B(LdaKeyedProperty), R(arg0), U8(63),
B(Star), R(0),
/* 402 S> */ B(Ldar), R(arg1),
- /* 408 E> */ B(LdaKeyedProperty), R(arg0), U8(64),
+ /* 408 E> */ B(LdaKeyedProperty), R(arg0), U8(65),
B(Star), R(0),
/* 414 S> */ B(Ldar), R(arg1),
- /* 420 E> */ B(LdaKeyedProperty), R(arg0), U8(66),
+ /* 420 E> */ B(LdaKeyedProperty), R(arg0), U8(67),
B(Star), R(0),
/* 426 S> */ B(Ldar), R(arg1),
- /* 432 E> */ B(LdaKeyedProperty), R(arg0), U8(68),
+ /* 432 E> */ B(LdaKeyedProperty), R(arg0), U8(69),
B(Star), R(0),
/* 438 S> */ B(Ldar), R(arg1),
- /* 444 E> */ B(LdaKeyedProperty), R(arg0), U8(70),
+ /* 444 E> */ B(LdaKeyedProperty), R(arg0), U8(71),
B(Star), R(0),
/* 450 S> */ B(Ldar), R(arg1),
- /* 456 E> */ B(LdaKeyedProperty), R(arg0), U8(72),
+ /* 456 E> */ B(LdaKeyedProperty), R(arg0), U8(73),
B(Star), R(0),
/* 462 S> */ B(Ldar), R(arg1),
- /* 468 E> */ B(LdaKeyedProperty), R(arg0), U8(74),
+ /* 468 E> */ B(LdaKeyedProperty), R(arg0), U8(75),
B(Star), R(0),
/* 474 S> */ B(Ldar), R(arg1),
- /* 480 E> */ B(LdaKeyedProperty), R(arg0), U8(76),
+ /* 480 E> */ B(LdaKeyedProperty), R(arg0), U8(77),
B(Star), R(0),
/* 486 S> */ B(Ldar), R(arg1),
- /* 492 E> */ B(LdaKeyedProperty), R(arg0), U8(78),
+ /* 492 E> */ B(LdaKeyedProperty), R(arg0), U8(79),
B(Star), R(0),
/* 498 S> */ B(Ldar), R(arg1),
- /* 504 E> */ B(LdaKeyedProperty), R(arg0), U8(80),
+ /* 504 E> */ B(LdaKeyedProperty), R(arg0), U8(81),
B(Star), R(0),
/* 510 S> */ B(Ldar), R(arg1),
- /* 516 E> */ B(LdaKeyedProperty), R(arg0), U8(82),
+ /* 516 E> */ B(LdaKeyedProperty), R(arg0), U8(83),
B(Star), R(0),
/* 522 S> */ B(Ldar), R(arg1),
- /* 528 E> */ B(LdaKeyedProperty), R(arg0), U8(84),
+ /* 528 E> */ B(LdaKeyedProperty), R(arg0), U8(85),
B(Star), R(0),
/* 534 S> */ B(Ldar), R(arg1),
- /* 540 E> */ B(LdaKeyedProperty), R(arg0), U8(86),
+ /* 540 E> */ B(LdaKeyedProperty), R(arg0), U8(87),
B(Star), R(0),
/* 546 S> */ B(Ldar), R(arg1),
- /* 552 E> */ B(LdaKeyedProperty), R(arg0), U8(88),
+ /* 552 E> */ B(LdaKeyedProperty), R(arg0), U8(89),
B(Star), R(0),
/* 558 S> */ B(Ldar), R(arg1),
- /* 564 E> */ B(LdaKeyedProperty), R(arg0), U8(90),
+ /* 564 E> */ B(LdaKeyedProperty), R(arg0), U8(91),
B(Star), R(0),
/* 570 S> */ B(Ldar), R(arg1),
- /* 576 E> */ B(LdaKeyedProperty), R(arg0), U8(92),
+ /* 576 E> */ B(LdaKeyedProperty), R(arg0), U8(93),
B(Star), R(0),
/* 582 S> */ B(Ldar), R(arg1),
- /* 588 E> */ B(LdaKeyedProperty), R(arg0), U8(94),
+ /* 588 E> */ B(LdaKeyedProperty), R(arg0), U8(95),
B(Star), R(0),
/* 594 S> */ B(Ldar), R(arg1),
- /* 600 E> */ B(LdaKeyedProperty), R(arg0), U8(96),
+ /* 600 E> */ B(LdaKeyedProperty), R(arg0), U8(97),
B(Star), R(0),
/* 606 S> */ B(Ldar), R(arg1),
- /* 612 E> */ B(LdaKeyedProperty), R(arg0), U8(98),
+ /* 612 E> */ B(LdaKeyedProperty), R(arg0), U8(99),
B(Star), R(0),
/* 618 S> */ B(Ldar), R(arg1),
- /* 624 E> */ B(LdaKeyedProperty), R(arg0), U8(100),
+ /* 624 E> */ B(LdaKeyedProperty), R(arg0), U8(101),
B(Star), R(0),
/* 630 S> */ B(Ldar), R(arg1),
- /* 636 E> */ B(LdaKeyedProperty), R(arg0), U8(102),
+ /* 636 E> */ B(LdaKeyedProperty), R(arg0), U8(103),
B(Star), R(0),
/* 642 S> */ B(Ldar), R(arg1),
- /* 648 E> */ B(LdaKeyedProperty), R(arg0), U8(104),
+ /* 648 E> */ B(LdaKeyedProperty), R(arg0), U8(105),
B(Star), R(0),
/* 654 S> */ B(Ldar), R(arg1),
- /* 660 E> */ B(LdaKeyedProperty), R(arg0), U8(106),
+ /* 660 E> */ B(LdaKeyedProperty), R(arg0), U8(107),
B(Star), R(0),
/* 666 S> */ B(Ldar), R(arg1),
- /* 672 E> */ B(LdaKeyedProperty), R(arg0), U8(108),
+ /* 672 E> */ B(LdaKeyedProperty), R(arg0), U8(109),
B(Star), R(0),
/* 678 S> */ B(Ldar), R(arg1),
- /* 684 E> */ B(LdaKeyedProperty), R(arg0), U8(110),
+ /* 684 E> */ B(LdaKeyedProperty), R(arg0), U8(111),
B(Star), R(0),
/* 690 S> */ B(Ldar), R(arg1),
- /* 696 E> */ B(LdaKeyedProperty), R(arg0), U8(112),
+ /* 696 E> */ B(LdaKeyedProperty), R(arg0), U8(113),
B(Star), R(0),
/* 702 S> */ B(Ldar), R(arg1),
- /* 708 E> */ B(LdaKeyedProperty), R(arg0), U8(114),
+ /* 708 E> */ B(LdaKeyedProperty), R(arg0), U8(115),
B(Star), R(0),
/* 714 S> */ B(Ldar), R(arg1),
- /* 720 E> */ B(LdaKeyedProperty), R(arg0), U8(116),
+ /* 720 E> */ B(LdaKeyedProperty), R(arg0), U8(117),
B(Star), R(0),
/* 726 S> */ B(Ldar), R(arg1),
- /* 732 E> */ B(LdaKeyedProperty), R(arg0), U8(118),
+ /* 732 E> */ B(LdaKeyedProperty), R(arg0), U8(119),
B(Star), R(0),
/* 738 S> */ B(Ldar), R(arg1),
- /* 744 E> */ B(LdaKeyedProperty), R(arg0), U8(120),
+ /* 744 E> */ B(LdaKeyedProperty), R(arg0), U8(121),
B(Star), R(0),
/* 750 S> */ B(Ldar), R(arg1),
- /* 756 E> */ B(LdaKeyedProperty), R(arg0), U8(122),
+ /* 756 E> */ B(LdaKeyedProperty), R(arg0), U8(123),
B(Star), R(0),
/* 762 S> */ B(Ldar), R(arg1),
- /* 768 E> */ B(LdaKeyedProperty), R(arg0), U8(124),
+ /* 768 E> */ B(LdaKeyedProperty), R(arg0), U8(125),
B(Star), R(0),
/* 774 S> */ B(Ldar), R(arg1),
- /* 780 E> */ B(LdaKeyedProperty), R(arg0), U8(126),
+ /* 780 E> */ B(LdaKeyedProperty), R(arg0), U8(127),
B(Star), R(0),
/* 786 S> */ B(Ldar), R(arg1),
- /* 792 E> */ B(LdaKeyedProperty), R(arg0), U8(128),
+ /* 792 E> */ B(LdaKeyedProperty), R(arg0), U8(129),
B(Star), R(0),
/* 798 S> */ B(Ldar), R(arg1),
- /* 804 E> */ B(LdaKeyedProperty), R(arg0), U8(130),
+ /* 804 E> */ B(LdaKeyedProperty), R(arg0), U8(131),
B(Star), R(0),
/* 810 S> */ B(Ldar), R(arg1),
- /* 816 E> */ B(LdaKeyedProperty), R(arg0), U8(132),
+ /* 816 E> */ B(LdaKeyedProperty), R(arg0), U8(133),
B(Star), R(0),
/* 822 S> */ B(Ldar), R(arg1),
- /* 828 E> */ B(LdaKeyedProperty), R(arg0), U8(134),
+ /* 828 E> */ B(LdaKeyedProperty), R(arg0), U8(135),
B(Star), R(0),
/* 834 S> */ B(Ldar), R(arg1),
- /* 840 E> */ B(LdaKeyedProperty), R(arg0), U8(136),
+ /* 840 E> */ B(LdaKeyedProperty), R(arg0), U8(137),
B(Star), R(0),
/* 846 S> */ B(Ldar), R(arg1),
- /* 852 E> */ B(LdaKeyedProperty), R(arg0), U8(138),
+ /* 852 E> */ B(LdaKeyedProperty), R(arg0), U8(139),
B(Star), R(0),
/* 858 S> */ B(Ldar), R(arg1),
- /* 864 E> */ B(LdaKeyedProperty), R(arg0), U8(140),
+ /* 864 E> */ B(LdaKeyedProperty), R(arg0), U8(141),
B(Star), R(0),
/* 870 S> */ B(Ldar), R(arg1),
- /* 876 E> */ B(LdaKeyedProperty), R(arg0), U8(142),
+ /* 876 E> */ B(LdaKeyedProperty), R(arg0), U8(143),
B(Star), R(0),
/* 882 S> */ B(Ldar), R(arg1),
- /* 888 E> */ B(LdaKeyedProperty), R(arg0), U8(144),
+ /* 888 E> */ B(LdaKeyedProperty), R(arg0), U8(145),
B(Star), R(0),
/* 894 S> */ B(Ldar), R(arg1),
- /* 900 E> */ B(LdaKeyedProperty), R(arg0), U8(146),
+ /* 900 E> */ B(LdaKeyedProperty), R(arg0), U8(147),
B(Star), R(0),
/* 906 S> */ B(Ldar), R(arg1),
- /* 912 E> */ B(LdaKeyedProperty), R(arg0), U8(148),
+ /* 912 E> */ B(LdaKeyedProperty), R(arg0), U8(149),
B(Star), R(0),
/* 918 S> */ B(Ldar), R(arg1),
- /* 924 E> */ B(LdaKeyedProperty), R(arg0), U8(150),
+ /* 924 E> */ B(LdaKeyedProperty), R(arg0), U8(151),
B(Star), R(0),
/* 930 S> */ B(Ldar), R(arg1),
- /* 936 E> */ B(LdaKeyedProperty), R(arg0), U8(152),
+ /* 936 E> */ B(LdaKeyedProperty), R(arg0), U8(153),
B(Star), R(0),
/* 942 S> */ B(Ldar), R(arg1),
- /* 948 E> */ B(LdaKeyedProperty), R(arg0), U8(154),
+ /* 948 E> */ B(LdaKeyedProperty), R(arg0), U8(155),
B(Star), R(0),
/* 954 S> */ B(Ldar), R(arg1),
- /* 960 E> */ B(LdaKeyedProperty), R(arg0), U8(156),
+ /* 960 E> */ B(LdaKeyedProperty), R(arg0), U8(157),
B(Star), R(0),
/* 966 S> */ B(Ldar), R(arg1),
- /* 972 E> */ B(LdaKeyedProperty), R(arg0), U8(158),
+ /* 972 E> */ B(LdaKeyedProperty), R(arg0), U8(159),
B(Star), R(0),
/* 978 S> */ B(Ldar), R(arg1),
- /* 984 E> */ B(LdaKeyedProperty), R(arg0), U8(160),
+ /* 984 E> */ B(LdaKeyedProperty), R(arg0), U8(161),
B(Star), R(0),
/* 990 S> */ B(Ldar), R(arg1),
- /* 996 E> */ B(LdaKeyedProperty), R(arg0), U8(162),
+ /* 996 E> */ B(LdaKeyedProperty), R(arg0), U8(163),
B(Star), R(0),
/* 1002 S> */ B(Ldar), R(arg1),
- /* 1008 E> */ B(LdaKeyedProperty), R(arg0), U8(164),
+ /* 1008 E> */ B(LdaKeyedProperty), R(arg0), U8(165),
B(Star), R(0),
/* 1014 S> */ B(Ldar), R(arg1),
- /* 1020 E> */ B(LdaKeyedProperty), R(arg0), U8(166),
+ /* 1020 E> */ B(LdaKeyedProperty), R(arg0), U8(167),
B(Star), R(0),
/* 1026 S> */ B(Ldar), R(arg1),
- /* 1032 E> */ B(LdaKeyedProperty), R(arg0), U8(168),
+ /* 1032 E> */ B(LdaKeyedProperty), R(arg0), U8(169),
B(Star), R(0),
/* 1038 S> */ B(Ldar), R(arg1),
- /* 1044 E> */ B(LdaKeyedProperty), R(arg0), U8(170),
+ /* 1044 E> */ B(LdaKeyedProperty), R(arg0), U8(171),
B(Star), R(0),
/* 1050 S> */ B(Ldar), R(arg1),
- /* 1056 E> */ B(LdaKeyedProperty), R(arg0), U8(172),
+ /* 1056 E> */ B(LdaKeyedProperty), R(arg0), U8(173),
B(Star), R(0),
/* 1062 S> */ B(Ldar), R(arg1),
- /* 1068 E> */ B(LdaKeyedProperty), R(arg0), U8(174),
+ /* 1068 E> */ B(LdaKeyedProperty), R(arg0), U8(175),
B(Star), R(0),
/* 1074 S> */ B(Ldar), R(arg1),
- /* 1080 E> */ B(LdaKeyedProperty), R(arg0), U8(176),
+ /* 1080 E> */ B(LdaKeyedProperty), R(arg0), U8(177),
B(Star), R(0),
/* 1086 S> */ B(Ldar), R(arg1),
- /* 1092 E> */ B(LdaKeyedProperty), R(arg0), U8(178),
+ /* 1092 E> */ B(LdaKeyedProperty), R(arg0), U8(179),
B(Star), R(0),
/* 1098 S> */ B(Ldar), R(arg1),
- /* 1104 E> */ B(LdaKeyedProperty), R(arg0), U8(180),
+ /* 1104 E> */ B(LdaKeyedProperty), R(arg0), U8(181),
B(Star), R(0),
/* 1110 S> */ B(Ldar), R(arg1),
- /* 1116 E> */ B(LdaKeyedProperty), R(arg0), U8(182),
+ /* 1116 E> */ B(LdaKeyedProperty), R(arg0), U8(183),
B(Star), R(0),
/* 1122 S> */ B(Ldar), R(arg1),
- /* 1128 E> */ B(LdaKeyedProperty), R(arg0), U8(184),
+ /* 1128 E> */ B(LdaKeyedProperty), R(arg0), U8(185),
B(Star), R(0),
/* 1134 S> */ B(Ldar), R(arg1),
- /* 1140 E> */ B(LdaKeyedProperty), R(arg0), U8(186),
+ /* 1140 E> */ B(LdaKeyedProperty), R(arg0), U8(187),
B(Star), R(0),
/* 1146 S> */ B(Ldar), R(arg1),
- /* 1152 E> */ B(LdaKeyedProperty), R(arg0), U8(188),
+ /* 1152 E> */ B(LdaKeyedProperty), R(arg0), U8(189),
B(Star), R(0),
/* 1158 S> */ B(Ldar), R(arg1),
- /* 1164 E> */ B(LdaKeyedProperty), R(arg0), U8(190),
+ /* 1164 E> */ B(LdaKeyedProperty), R(arg0), U8(191),
B(Star), R(0),
/* 1170 S> */ B(Ldar), R(arg1),
- /* 1176 E> */ B(LdaKeyedProperty), R(arg0), U8(192),
+ /* 1176 E> */ B(LdaKeyedProperty), R(arg0), U8(193),
B(Star), R(0),
/* 1182 S> */ B(Ldar), R(arg1),
- /* 1188 E> */ B(LdaKeyedProperty), R(arg0), U8(194),
+ /* 1188 E> */ B(LdaKeyedProperty), R(arg0), U8(195),
B(Star), R(0),
/* 1194 S> */ B(Ldar), R(arg1),
- /* 1200 E> */ B(LdaKeyedProperty), R(arg0), U8(196),
+ /* 1200 E> */ B(LdaKeyedProperty), R(arg0), U8(197),
B(Star), R(0),
/* 1206 S> */ B(Ldar), R(arg1),
- /* 1212 E> */ B(LdaKeyedProperty), R(arg0), U8(198),
+ /* 1212 E> */ B(LdaKeyedProperty), R(arg0), U8(199),
B(Star), R(0),
/* 1218 S> */ B(Ldar), R(arg1),
- /* 1224 E> */ B(LdaKeyedProperty), R(arg0), U8(200),
+ /* 1224 E> */ B(LdaKeyedProperty), R(arg0), U8(201),
B(Star), R(0),
/* 1230 S> */ B(Ldar), R(arg1),
- /* 1236 E> */ B(LdaKeyedProperty), R(arg0), U8(202),
+ /* 1236 E> */ B(LdaKeyedProperty), R(arg0), U8(203),
B(Star), R(0),
/* 1242 S> */ B(Ldar), R(arg1),
- /* 1248 E> */ B(LdaKeyedProperty), R(arg0), U8(204),
+ /* 1248 E> */ B(LdaKeyedProperty), R(arg0), U8(205),
B(Star), R(0),
/* 1254 S> */ B(Ldar), R(arg1),
- /* 1260 E> */ B(LdaKeyedProperty), R(arg0), U8(206),
+ /* 1260 E> */ B(LdaKeyedProperty), R(arg0), U8(207),
B(Star), R(0),
/* 1266 S> */ B(Ldar), R(arg1),
- /* 1272 E> */ B(LdaKeyedProperty), R(arg0), U8(208),
+ /* 1272 E> */ B(LdaKeyedProperty), R(arg0), U8(209),
B(Star), R(0),
/* 1278 S> */ B(Ldar), R(arg1),
- /* 1284 E> */ B(LdaKeyedProperty), R(arg0), U8(210),
+ /* 1284 E> */ B(LdaKeyedProperty), R(arg0), U8(211),
B(Star), R(0),
/* 1290 S> */ B(Ldar), R(arg1),
- /* 1296 E> */ B(LdaKeyedProperty), R(arg0), U8(212),
+ /* 1296 E> */ B(LdaKeyedProperty), R(arg0), U8(213),
B(Star), R(0),
/* 1302 S> */ B(Ldar), R(arg1),
- /* 1308 E> */ B(LdaKeyedProperty), R(arg0), U8(214),
+ /* 1308 E> */ B(LdaKeyedProperty), R(arg0), U8(215),
B(Star), R(0),
/* 1314 S> */ B(Ldar), R(arg1),
- /* 1320 E> */ B(LdaKeyedProperty), R(arg0), U8(216),
+ /* 1320 E> */ B(LdaKeyedProperty), R(arg0), U8(217),
B(Star), R(0),
/* 1326 S> */ B(Ldar), R(arg1),
- /* 1332 E> */ B(LdaKeyedProperty), R(arg0), U8(218),
+ /* 1332 E> */ B(LdaKeyedProperty), R(arg0), U8(219),
B(Star), R(0),
/* 1338 S> */ B(Ldar), R(arg1),
- /* 1344 E> */ B(LdaKeyedProperty), R(arg0), U8(220),
+ /* 1344 E> */ B(LdaKeyedProperty), R(arg0), U8(221),
B(Star), R(0),
/* 1350 S> */ B(Ldar), R(arg1),
- /* 1356 E> */ B(LdaKeyedProperty), R(arg0), U8(222),
+ /* 1356 E> */ B(LdaKeyedProperty), R(arg0), U8(223),
B(Star), R(0),
/* 1362 S> */ B(Ldar), R(arg1),
- /* 1368 E> */ B(LdaKeyedProperty), R(arg0), U8(224),
+ /* 1368 E> */ B(LdaKeyedProperty), R(arg0), U8(225),
B(Star), R(0),
/* 1374 S> */ B(Ldar), R(arg1),
- /* 1380 E> */ B(LdaKeyedProperty), R(arg0), U8(226),
+ /* 1380 E> */ B(LdaKeyedProperty), R(arg0), U8(227),
B(Star), R(0),
/* 1386 S> */ B(Ldar), R(arg1),
- /* 1392 E> */ B(LdaKeyedProperty), R(arg0), U8(228),
+ /* 1392 E> */ B(LdaKeyedProperty), R(arg0), U8(229),
B(Star), R(0),
/* 1398 S> */ B(Ldar), R(arg1),
- /* 1404 E> */ B(LdaKeyedProperty), R(arg0), U8(230),
+ /* 1404 E> */ B(LdaKeyedProperty), R(arg0), U8(231),
B(Star), R(0),
/* 1410 S> */ B(Ldar), R(arg1),
- /* 1416 E> */ B(LdaKeyedProperty), R(arg0), U8(232),
+ /* 1416 E> */ B(LdaKeyedProperty), R(arg0), U8(233),
B(Star), R(0),
/* 1422 S> */ B(Ldar), R(arg1),
- /* 1428 E> */ B(LdaKeyedProperty), R(arg0), U8(234),
+ /* 1428 E> */ B(LdaKeyedProperty), R(arg0), U8(235),
B(Star), R(0),
/* 1434 S> */ B(Ldar), R(arg1),
- /* 1440 E> */ B(LdaKeyedProperty), R(arg0), U8(236),
+ /* 1440 E> */ B(LdaKeyedProperty), R(arg0), U8(237),
B(Star), R(0),
/* 1446 S> */ B(Ldar), R(arg1),
- /* 1452 E> */ B(LdaKeyedProperty), R(arg0), U8(238),
+ /* 1452 E> */ B(LdaKeyedProperty), R(arg0), U8(239),
B(Star), R(0),
/* 1458 S> */ B(Ldar), R(arg1),
- /* 1464 E> */ B(LdaKeyedProperty), R(arg0), U8(240),
+ /* 1464 E> */ B(LdaKeyedProperty), R(arg0), U8(241),
B(Star), R(0),
/* 1470 S> */ B(Ldar), R(arg1),
- /* 1476 E> */ B(LdaKeyedProperty), R(arg0), U8(242),
+ /* 1476 E> */ B(LdaKeyedProperty), R(arg0), U8(243),
B(Star), R(0),
/* 1482 S> */ B(Ldar), R(arg1),
- /* 1488 E> */ B(LdaKeyedProperty), R(arg0), U8(244),
+ /* 1488 E> */ B(LdaKeyedProperty), R(arg0), U8(245),
B(Star), R(0),
/* 1494 S> */ B(Ldar), R(arg1),
- /* 1500 E> */ B(LdaKeyedProperty), R(arg0), U8(246),
+ /* 1500 E> */ B(LdaKeyedProperty), R(arg0), U8(247),
B(Star), R(0),
/* 1506 S> */ B(Ldar), R(arg1),
- /* 1512 E> */ B(LdaKeyedProperty), R(arg0), U8(248),
+ /* 1512 E> */ B(LdaKeyedProperty), R(arg0), U8(249),
B(Star), R(0),
/* 1518 S> */ B(Ldar), R(arg1),
- /* 1524 E> */ B(LdaKeyedProperty), R(arg0), U8(250),
+ /* 1524 E> */ B(LdaKeyedProperty), R(arg0), U8(251),
B(Star), R(0),
/* 1530 S> */ B(Ldar), R(arg1),
- /* 1536 E> */ B(LdaKeyedProperty), R(arg0), U8(252),
+ /* 1536 E> */ B(LdaKeyedProperty), R(arg0), U8(253),
B(Star), R(0),
/* 1542 S> */ B(Ldar), R(arg1),
- /* 1548 E> */ B(LdaKeyedProperty), R(arg0), U8(254),
+ /* 1548 E> */ B(LdaKeyedProperty), R(arg0), U8(255),
B(Star), R(0),
/* 1554 S> */ B(Ldar), R(arg1),
- /* 1560 E> */ B(Wide), B(LdaKeyedProperty), R16(arg0), U16(256),
+ /* 1560 E> */ B(Wide), B(LdaKeyedProperty), R16(arg0), U16(257),
B(Star), R(0),
/* 1566 S> */ B(Ldar), R(arg1),
- /* 1575 E> */ B(Wide), B(LdaKeyedProperty), R16(arg0), U16(258),
+ /* 1575 E> */ B(Wide), B(LdaKeyedProperty), R16(arg0), U16(259),
/* 1579 S> */ B(Return),
]
constant pool: [
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/PropertyStores.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/PropertyStores.golden
index 7e6dd5ae78..e3c161ee7a 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/PropertyStores.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/PropertyStores.golden
@@ -17,7 +17,7 @@ bytecode array length: 9
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 16 S> */ B(LdaConstant), U8(0),
- /* 23 E> */ B(StaNamedPropertySloppy), R(arg0), U8(1), U8(2),
+ /* 23 E> */ B(StaNamedPropertySloppy), R(arg0), U8(1), U8(3),
B(LdaUndefined),
/* 32 S> */ B(Return),
]
@@ -39,7 +39,7 @@ bytecode array length: 9
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 16 S> */ B(LdaConstant), U8(0),
- /* 25 E> */ B(StaNamedPropertySloppy), R(arg0), U8(1), U8(2),
+ /* 25 E> */ B(StaNamedPropertySloppy), R(arg0), U8(1), U8(3),
B(LdaUndefined),
/* 34 S> */ B(Return),
]
@@ -63,7 +63,7 @@ bytecodes: [
/* 16 S> */ B(LdaSmi), I8(100),
B(Star), R(1),
B(LdaConstant), U8(0),
- /* 23 E> */ B(StaKeyedPropertySloppy), R(arg0), R(1), U8(2),
+ /* 23 E> */ B(StaKeyedPropertySloppy), R(arg0), R(1), U8(3),
B(LdaUndefined),
/* 32 S> */ B(Return),
]
@@ -84,7 +84,7 @@ bytecode array length: 9
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 19 S> */ B(LdaConstant), U8(0),
- /* 24 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(2),
+ /* 24 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(3),
B(LdaUndefined),
/* 33 S> */ B(Return),
]
@@ -105,8 +105,8 @@ bytecode array length: 12
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 16 S> */ B(LdaSmi), I8(-124),
- /* 26 E> */ B(LdaKeyedProperty), R(arg0), U8(2),
- /* 23 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(4),
+ /* 26 E> */ B(LdaKeyedProperty), R(arg0), U8(3),
+ /* 23 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(5),
B(LdaUndefined),
/* 34 S> */ B(Return),
]
@@ -127,7 +127,7 @@ bytecode array length: 9
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 30 S> */ B(LdaConstant), U8(0),
- /* 37 E> */ B(StaNamedPropertyStrict), R(arg0), U8(1), U8(2),
+ /* 37 E> */ B(StaNamedPropertyStrict), R(arg0), U8(1), U8(3),
B(LdaUndefined),
/* 46 S> */ B(Return),
]
@@ -149,7 +149,7 @@ bytecode array length: 9
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 33 S> */ B(LdaConstant), U8(0),
- /* 38 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(2),
+ /* 38 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(3),
B(LdaUndefined),
/* 47 S> */ B(Return),
]
@@ -300,263 +300,263 @@ bytecode array length: 785
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 18 S> */ B(LdaSmi), I8(1),
- /* 25 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(2),
+ /* 25 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(3),
/* 32 S> */ B(LdaSmi), I8(1),
- /* 39 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(4),
+ /* 39 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(5),
/* 46 S> */ B(LdaSmi), I8(1),
- /* 53 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(6),
+ /* 53 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(7),
/* 60 S> */ B(LdaSmi), I8(1),
- /* 67 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(8),
+ /* 67 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(9),
/* 74 S> */ B(LdaSmi), I8(1),
- /* 81 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(10),
+ /* 81 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(11),
/* 88 S> */ B(LdaSmi), I8(1),
- /* 95 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(12),
+ /* 95 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(13),
/* 102 S> */ B(LdaSmi), I8(1),
- /* 109 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(14),
+ /* 109 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(15),
/* 116 S> */ B(LdaSmi), I8(1),
- /* 123 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(16),
+ /* 123 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(17),
/* 130 S> */ B(LdaSmi), I8(1),
- /* 137 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(18),
+ /* 137 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(19),
/* 144 S> */ B(LdaSmi), I8(1),
- /* 151 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(20),
+ /* 151 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(21),
/* 158 S> */ B(LdaSmi), I8(1),
- /* 165 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(22),
+ /* 165 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(23),
/* 172 S> */ B(LdaSmi), I8(1),
- /* 179 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(24),
+ /* 179 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(25),
/* 186 S> */ B(LdaSmi), I8(1),
- /* 193 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(26),
+ /* 193 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(27),
/* 200 S> */ B(LdaSmi), I8(1),
- /* 207 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(28),
+ /* 207 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(29),
/* 214 S> */ B(LdaSmi), I8(1),
- /* 221 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(30),
+ /* 221 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(31),
/* 228 S> */ B(LdaSmi), I8(1),
- /* 235 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(32),
+ /* 235 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(33),
/* 242 S> */ B(LdaSmi), I8(1),
- /* 249 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(34),
+ /* 249 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(35),
/* 256 S> */ B(LdaSmi), I8(1),
- /* 263 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(36),
+ /* 263 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(37),
/* 270 S> */ B(LdaSmi), I8(1),
- /* 277 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(38),
+ /* 277 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(39),
/* 284 S> */ B(LdaSmi), I8(1),
- /* 291 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(40),
+ /* 291 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(41),
/* 298 S> */ B(LdaSmi), I8(1),
- /* 305 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(42),
+ /* 305 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(43),
/* 312 S> */ B(LdaSmi), I8(1),
- /* 319 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(44),
+ /* 319 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(45),
/* 326 S> */ B(LdaSmi), I8(1),
- /* 333 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(46),
+ /* 333 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(47),
/* 340 S> */ B(LdaSmi), I8(1),
- /* 347 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(48),
+ /* 347 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(49),
/* 354 S> */ B(LdaSmi), I8(1),
- /* 361 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(50),
+ /* 361 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(51),
/* 368 S> */ B(LdaSmi), I8(1),
- /* 375 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(52),
+ /* 375 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(53),
/* 382 S> */ B(LdaSmi), I8(1),
- /* 389 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(54),
+ /* 389 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(55),
/* 396 S> */ B(LdaSmi), I8(1),
- /* 403 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(56),
+ /* 403 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(57),
/* 410 S> */ B(LdaSmi), I8(1),
- /* 417 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(58),
+ /* 417 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(59),
/* 424 S> */ B(LdaSmi), I8(1),
- /* 431 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(60),
+ /* 431 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(61),
/* 438 S> */ B(LdaSmi), I8(1),
- /* 445 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(62),
+ /* 445 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(63),
/* 452 S> */ B(LdaSmi), I8(1),
- /* 459 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(64),
+ /* 459 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(65),
/* 466 S> */ B(LdaSmi), I8(1),
- /* 473 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(66),
+ /* 473 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(67),
/* 480 S> */ B(LdaSmi), I8(1),
- /* 487 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(68),
+ /* 487 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(69),
/* 494 S> */ B(LdaSmi), I8(1),
- /* 501 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(70),
+ /* 501 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(71),
/* 508 S> */ B(LdaSmi), I8(1),
- /* 515 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(72),
+ /* 515 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(73),
/* 522 S> */ B(LdaSmi), I8(1),
- /* 529 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(74),
+ /* 529 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(75),
/* 536 S> */ B(LdaSmi), I8(1),
- /* 543 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(76),
+ /* 543 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(77),
/* 550 S> */ B(LdaSmi), I8(1),
- /* 557 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(78),
+ /* 557 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(79),
/* 564 S> */ B(LdaSmi), I8(1),
- /* 571 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(80),
+ /* 571 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(81),
/* 578 S> */ B(LdaSmi), I8(1),
- /* 585 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(82),
+ /* 585 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(83),
/* 592 S> */ B(LdaSmi), I8(1),
- /* 599 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(84),
+ /* 599 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(85),
/* 606 S> */ B(LdaSmi), I8(1),
- /* 613 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(86),
+ /* 613 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(87),
/* 620 S> */ B(LdaSmi), I8(1),
- /* 627 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(88),
+ /* 627 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(89),
/* 634 S> */ B(LdaSmi), I8(1),
- /* 641 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(90),
+ /* 641 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(91),
/* 648 S> */ B(LdaSmi), I8(1),
- /* 655 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(92),
+ /* 655 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(93),
/* 662 S> */ B(LdaSmi), I8(1),
- /* 669 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(94),
+ /* 669 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(95),
/* 676 S> */ B(LdaSmi), I8(1),
- /* 683 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(96),
+ /* 683 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(97),
/* 690 S> */ B(LdaSmi), I8(1),
- /* 697 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(98),
+ /* 697 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(99),
/* 704 S> */ B(LdaSmi), I8(1),
- /* 711 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(100),
+ /* 711 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(101),
/* 718 S> */ B(LdaSmi), I8(1),
- /* 725 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(102),
+ /* 725 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(103),
/* 732 S> */ B(LdaSmi), I8(1),
- /* 739 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(104),
+ /* 739 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(105),
/* 746 S> */ B(LdaSmi), I8(1),
- /* 753 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(106),
+ /* 753 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(107),
/* 760 S> */ B(LdaSmi), I8(1),
- /* 767 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(108),
+ /* 767 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(109),
/* 774 S> */ B(LdaSmi), I8(1),
- /* 781 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(110),
+ /* 781 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(111),
/* 788 S> */ B(LdaSmi), I8(1),
- /* 795 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(112),
+ /* 795 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(113),
/* 802 S> */ B(LdaSmi), I8(1),
- /* 809 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(114),
+ /* 809 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(115),
/* 816 S> */ B(LdaSmi), I8(1),
- /* 823 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(116),
+ /* 823 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(117),
/* 830 S> */ B(LdaSmi), I8(1),
- /* 837 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(118),
+ /* 837 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(119),
/* 844 S> */ B(LdaSmi), I8(1),
- /* 851 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(120),
+ /* 851 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(121),
/* 858 S> */ B(LdaSmi), I8(1),
- /* 865 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(122),
+ /* 865 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(123),
/* 872 S> */ B(LdaSmi), I8(1),
- /* 879 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(124),
+ /* 879 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(125),
/* 886 S> */ B(LdaSmi), I8(1),
- /* 893 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(126),
+ /* 893 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(127),
/* 900 S> */ B(LdaSmi), I8(1),
- /* 907 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(128),
+ /* 907 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(129),
/* 914 S> */ B(LdaSmi), I8(1),
- /* 921 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(130),
+ /* 921 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(131),
/* 928 S> */ B(LdaSmi), I8(1),
- /* 935 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(132),
+ /* 935 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(133),
/* 942 S> */ B(LdaSmi), I8(1),
- /* 949 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(134),
+ /* 949 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(135),
/* 956 S> */ B(LdaSmi), I8(1),
- /* 963 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(136),
+ /* 963 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(137),
/* 970 S> */ B(LdaSmi), I8(1),
- /* 977 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(138),
+ /* 977 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(139),
/* 984 S> */ B(LdaSmi), I8(1),
- /* 991 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(140),
+ /* 991 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(141),
/* 998 S> */ B(LdaSmi), I8(1),
- /* 1005 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(142),
+ /* 1005 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(143),
/* 1012 S> */ B(LdaSmi), I8(1),
- /* 1019 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(144),
+ /* 1019 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(145),
/* 1026 S> */ B(LdaSmi), I8(1),
- /* 1033 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(146),
+ /* 1033 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(147),
/* 1040 S> */ B(LdaSmi), I8(1),
- /* 1047 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(148),
+ /* 1047 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(149),
/* 1054 S> */ B(LdaSmi), I8(1),
- /* 1061 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(150),
+ /* 1061 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(151),
/* 1068 S> */ B(LdaSmi), I8(1),
- /* 1075 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(152),
+ /* 1075 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(153),
/* 1082 S> */ B(LdaSmi), I8(1),
- /* 1089 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(154),
+ /* 1089 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(155),
/* 1096 S> */ B(LdaSmi), I8(1),
- /* 1103 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(156),
+ /* 1103 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(157),
/* 1110 S> */ B(LdaSmi), I8(1),
- /* 1117 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(158),
+ /* 1117 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(159),
/* 1124 S> */ B(LdaSmi), I8(1),
- /* 1131 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(160),
+ /* 1131 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(161),
/* 1138 S> */ B(LdaSmi), I8(1),
- /* 1145 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(162),
+ /* 1145 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(163),
/* 1152 S> */ B(LdaSmi), I8(1),
- /* 1159 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(164),
+ /* 1159 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(165),
/* 1166 S> */ B(LdaSmi), I8(1),
- /* 1173 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(166),
+ /* 1173 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(167),
/* 1180 S> */ B(LdaSmi), I8(1),
- /* 1187 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(168),
+ /* 1187 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(169),
/* 1194 S> */ B(LdaSmi), I8(1),
- /* 1201 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(170),
+ /* 1201 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(171),
/* 1208 S> */ B(LdaSmi), I8(1),
- /* 1215 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(172),
+ /* 1215 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(173),
/* 1222 S> */ B(LdaSmi), I8(1),
- /* 1229 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(174),
+ /* 1229 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(175),
/* 1236 S> */ B(LdaSmi), I8(1),
- /* 1243 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(176),
+ /* 1243 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(177),
/* 1250 S> */ B(LdaSmi), I8(1),
- /* 1257 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(178),
+ /* 1257 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(179),
/* 1264 S> */ B(LdaSmi), I8(1),
- /* 1271 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(180),
+ /* 1271 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(181),
/* 1278 S> */ B(LdaSmi), I8(1),
- /* 1285 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(182),
+ /* 1285 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(183),
/* 1292 S> */ B(LdaSmi), I8(1),
- /* 1299 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(184),
+ /* 1299 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(185),
/* 1306 S> */ B(LdaSmi), I8(1),
- /* 1313 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(186),
+ /* 1313 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(187),
/* 1320 S> */ B(LdaSmi), I8(1),
- /* 1327 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(188),
+ /* 1327 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(189),
/* 1334 S> */ B(LdaSmi), I8(1),
- /* 1341 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(190),
+ /* 1341 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(191),
/* 1348 S> */ B(LdaSmi), I8(1),
- /* 1355 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(192),
+ /* 1355 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(193),
/* 1362 S> */ B(LdaSmi), I8(1),
- /* 1369 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(194),
+ /* 1369 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(195),
/* 1376 S> */ B(LdaSmi), I8(1),
- /* 1383 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(196),
+ /* 1383 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(197),
/* 1390 S> */ B(LdaSmi), I8(1),
- /* 1397 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(198),
+ /* 1397 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(199),
/* 1404 S> */ B(LdaSmi), I8(1),
- /* 1411 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(200),
+ /* 1411 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(201),
/* 1418 S> */ B(LdaSmi), I8(1),
- /* 1425 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(202),
+ /* 1425 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(203),
/* 1432 S> */ B(LdaSmi), I8(1),
- /* 1439 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(204),
+ /* 1439 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(205),
/* 1446 S> */ B(LdaSmi), I8(1),
- /* 1453 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(206),
+ /* 1453 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(207),
/* 1460 S> */ B(LdaSmi), I8(1),
- /* 1467 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(208),
+ /* 1467 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(209),
/* 1474 S> */ B(LdaSmi), I8(1),
- /* 1481 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(210),
+ /* 1481 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(211),
/* 1488 S> */ B(LdaSmi), I8(1),
- /* 1495 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(212),
+ /* 1495 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(213),
/* 1502 S> */ B(LdaSmi), I8(1),
- /* 1509 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(214),
+ /* 1509 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(215),
/* 1516 S> */ B(LdaSmi), I8(1),
- /* 1523 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(216),
+ /* 1523 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(217),
/* 1530 S> */ B(LdaSmi), I8(1),
- /* 1537 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(218),
+ /* 1537 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(219),
/* 1544 S> */ B(LdaSmi), I8(1),
- /* 1551 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(220),
+ /* 1551 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(221),
/* 1558 S> */ B(LdaSmi), I8(1),
- /* 1565 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(222),
+ /* 1565 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(223),
/* 1572 S> */ B(LdaSmi), I8(1),
- /* 1579 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(224),
+ /* 1579 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(225),
/* 1586 S> */ B(LdaSmi), I8(1),
- /* 1593 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(226),
+ /* 1593 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(227),
/* 1600 S> */ B(LdaSmi), I8(1),
- /* 1607 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(228),
+ /* 1607 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(229),
/* 1614 S> */ B(LdaSmi), I8(1),
- /* 1621 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(230),
+ /* 1621 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(231),
/* 1628 S> */ B(LdaSmi), I8(1),
- /* 1635 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(232),
+ /* 1635 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(233),
/* 1642 S> */ B(LdaSmi), I8(1),
- /* 1649 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(234),
+ /* 1649 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(235),
/* 1656 S> */ B(LdaSmi), I8(1),
- /* 1663 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(236),
+ /* 1663 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(237),
/* 1670 S> */ B(LdaSmi), I8(1),
- /* 1677 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(238),
+ /* 1677 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(239),
/* 1684 S> */ B(LdaSmi), I8(1),
- /* 1691 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(240),
+ /* 1691 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(241),
/* 1698 S> */ B(LdaSmi), I8(1),
- /* 1705 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(242),
+ /* 1705 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(243),
/* 1712 S> */ B(LdaSmi), I8(1),
- /* 1719 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(244),
+ /* 1719 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(245),
/* 1726 S> */ B(LdaSmi), I8(1),
- /* 1733 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(246),
+ /* 1733 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(247),
/* 1740 S> */ B(LdaSmi), I8(1),
- /* 1747 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(248),
+ /* 1747 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(249),
/* 1754 S> */ B(LdaSmi), I8(1),
- /* 1761 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(250),
+ /* 1761 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(251),
/* 1768 S> */ B(LdaSmi), I8(1),
- /* 1775 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(252),
+ /* 1775 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(253),
/* 1782 S> */ B(LdaSmi), I8(1),
- /* 1789 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(254),
+ /* 1789 E> */ B(StaNamedPropertySloppy), R(arg0), U8(0), U8(255),
/* 1796 S> */ B(LdaSmi), I8(1),
- /* 1803 E> */ B(Wide), B(StaNamedPropertySloppy), R16(arg0), U16(0), U16(256),
+ /* 1803 E> */ B(Wide), B(StaNamedPropertySloppy), R16(arg0), U16(0), U16(257),
/* 1810 S> */ B(LdaSmi), I8(2),
- /* 1817 E> */ B(Wide), B(StaNamedPropertySloppy), R16(arg0), U16(0), U16(258),
+ /* 1817 E> */ B(Wide), B(StaNamedPropertySloppy), R16(arg0), U16(0), U16(259),
B(LdaUndefined),
/* 1822 S> */ B(Return),
]
@@ -708,263 +708,263 @@ bytecode array length: 785
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 33 S> */ B(LdaSmi), I8(1),
- /* 40 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(2),
+ /* 40 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(3),
/* 47 S> */ B(LdaSmi), I8(1),
- /* 54 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(4),
+ /* 54 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(5),
/* 61 S> */ B(LdaSmi), I8(1),
- /* 68 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(6),
+ /* 68 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(7),
/* 75 S> */ B(LdaSmi), I8(1),
- /* 82 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(8),
+ /* 82 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(9),
/* 89 S> */ B(LdaSmi), I8(1),
- /* 96 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(10),
+ /* 96 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(11),
/* 103 S> */ B(LdaSmi), I8(1),
- /* 110 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(12),
+ /* 110 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(13),
/* 117 S> */ B(LdaSmi), I8(1),
- /* 124 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(14),
+ /* 124 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(15),
/* 131 S> */ B(LdaSmi), I8(1),
- /* 138 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(16),
+ /* 138 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(17),
/* 145 S> */ B(LdaSmi), I8(1),
- /* 152 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(18),
+ /* 152 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(19),
/* 159 S> */ B(LdaSmi), I8(1),
- /* 166 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(20),
+ /* 166 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(21),
/* 173 S> */ B(LdaSmi), I8(1),
- /* 180 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(22),
+ /* 180 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(23),
/* 187 S> */ B(LdaSmi), I8(1),
- /* 194 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(24),
+ /* 194 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(25),
/* 201 S> */ B(LdaSmi), I8(1),
- /* 208 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(26),
+ /* 208 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(27),
/* 215 S> */ B(LdaSmi), I8(1),
- /* 222 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(28),
+ /* 222 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(29),
/* 229 S> */ B(LdaSmi), I8(1),
- /* 236 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(30),
+ /* 236 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(31),
/* 243 S> */ B(LdaSmi), I8(1),
- /* 250 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(32),
+ /* 250 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(33),
/* 257 S> */ B(LdaSmi), I8(1),
- /* 264 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(34),
+ /* 264 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(35),
/* 271 S> */ B(LdaSmi), I8(1),
- /* 278 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(36),
+ /* 278 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(37),
/* 285 S> */ B(LdaSmi), I8(1),
- /* 292 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(38),
+ /* 292 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(39),
/* 299 S> */ B(LdaSmi), I8(1),
- /* 306 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(40),
+ /* 306 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(41),
/* 313 S> */ B(LdaSmi), I8(1),
- /* 320 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(42),
+ /* 320 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(43),
/* 327 S> */ B(LdaSmi), I8(1),
- /* 334 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(44),
+ /* 334 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(45),
/* 341 S> */ B(LdaSmi), I8(1),
- /* 348 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(46),
+ /* 348 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(47),
/* 355 S> */ B(LdaSmi), I8(1),
- /* 362 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(48),
+ /* 362 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(49),
/* 369 S> */ B(LdaSmi), I8(1),
- /* 376 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(50),
+ /* 376 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(51),
/* 383 S> */ B(LdaSmi), I8(1),
- /* 390 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(52),
+ /* 390 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(53),
/* 397 S> */ B(LdaSmi), I8(1),
- /* 404 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(54),
+ /* 404 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(55),
/* 411 S> */ B(LdaSmi), I8(1),
- /* 418 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(56),
+ /* 418 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(57),
/* 425 S> */ B(LdaSmi), I8(1),
- /* 432 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(58),
+ /* 432 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(59),
/* 439 S> */ B(LdaSmi), I8(1),
- /* 446 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(60),
+ /* 446 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(61),
/* 453 S> */ B(LdaSmi), I8(1),
- /* 460 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(62),
+ /* 460 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(63),
/* 467 S> */ B(LdaSmi), I8(1),
- /* 474 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(64),
+ /* 474 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(65),
/* 481 S> */ B(LdaSmi), I8(1),
- /* 488 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(66),
+ /* 488 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(67),
/* 495 S> */ B(LdaSmi), I8(1),
- /* 502 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(68),
+ /* 502 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(69),
/* 509 S> */ B(LdaSmi), I8(1),
- /* 516 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(70),
+ /* 516 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(71),
/* 523 S> */ B(LdaSmi), I8(1),
- /* 530 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(72),
+ /* 530 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(73),
/* 537 S> */ B(LdaSmi), I8(1),
- /* 544 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(74),
+ /* 544 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(75),
/* 551 S> */ B(LdaSmi), I8(1),
- /* 558 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(76),
+ /* 558 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(77),
/* 565 S> */ B(LdaSmi), I8(1),
- /* 572 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(78),
+ /* 572 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(79),
/* 579 S> */ B(LdaSmi), I8(1),
- /* 586 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(80),
+ /* 586 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(81),
/* 593 S> */ B(LdaSmi), I8(1),
- /* 600 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(82),
+ /* 600 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(83),
/* 607 S> */ B(LdaSmi), I8(1),
- /* 614 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(84),
+ /* 614 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(85),
/* 621 S> */ B(LdaSmi), I8(1),
- /* 628 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(86),
+ /* 628 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(87),
/* 635 S> */ B(LdaSmi), I8(1),
- /* 642 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(88),
+ /* 642 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(89),
/* 649 S> */ B(LdaSmi), I8(1),
- /* 656 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(90),
+ /* 656 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(91),
/* 663 S> */ B(LdaSmi), I8(1),
- /* 670 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(92),
+ /* 670 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(93),
/* 677 S> */ B(LdaSmi), I8(1),
- /* 684 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(94),
+ /* 684 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(95),
/* 691 S> */ B(LdaSmi), I8(1),
- /* 698 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(96),
+ /* 698 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(97),
/* 705 S> */ B(LdaSmi), I8(1),
- /* 712 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(98),
+ /* 712 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(99),
/* 719 S> */ B(LdaSmi), I8(1),
- /* 726 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(100),
+ /* 726 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(101),
/* 733 S> */ B(LdaSmi), I8(1),
- /* 740 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(102),
+ /* 740 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(103),
/* 747 S> */ B(LdaSmi), I8(1),
- /* 754 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(104),
+ /* 754 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(105),
/* 761 S> */ B(LdaSmi), I8(1),
- /* 768 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(106),
+ /* 768 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(107),
/* 775 S> */ B(LdaSmi), I8(1),
- /* 782 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(108),
+ /* 782 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(109),
/* 789 S> */ B(LdaSmi), I8(1),
- /* 796 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(110),
+ /* 796 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(111),
/* 803 S> */ B(LdaSmi), I8(1),
- /* 810 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(112),
+ /* 810 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(113),
/* 817 S> */ B(LdaSmi), I8(1),
- /* 824 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(114),
+ /* 824 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(115),
/* 831 S> */ B(LdaSmi), I8(1),
- /* 838 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(116),
+ /* 838 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(117),
/* 845 S> */ B(LdaSmi), I8(1),
- /* 852 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(118),
+ /* 852 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(119),
/* 859 S> */ B(LdaSmi), I8(1),
- /* 866 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(120),
+ /* 866 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(121),
/* 873 S> */ B(LdaSmi), I8(1),
- /* 880 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(122),
+ /* 880 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(123),
/* 887 S> */ B(LdaSmi), I8(1),
- /* 894 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(124),
+ /* 894 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(125),
/* 901 S> */ B(LdaSmi), I8(1),
- /* 908 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(126),
+ /* 908 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(127),
/* 915 S> */ B(LdaSmi), I8(1),
- /* 922 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(128),
+ /* 922 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(129),
/* 929 S> */ B(LdaSmi), I8(1),
- /* 936 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(130),
+ /* 936 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(131),
/* 943 S> */ B(LdaSmi), I8(1),
- /* 950 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(132),
+ /* 950 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(133),
/* 957 S> */ B(LdaSmi), I8(1),
- /* 964 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(134),
+ /* 964 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(135),
/* 971 S> */ B(LdaSmi), I8(1),
- /* 978 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(136),
+ /* 978 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(137),
/* 985 S> */ B(LdaSmi), I8(1),
- /* 992 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(138),
+ /* 992 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(139),
/* 999 S> */ B(LdaSmi), I8(1),
- /* 1006 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(140),
+ /* 1006 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(141),
/* 1013 S> */ B(LdaSmi), I8(1),
- /* 1020 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(142),
+ /* 1020 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(143),
/* 1027 S> */ B(LdaSmi), I8(1),
- /* 1034 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(144),
+ /* 1034 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(145),
/* 1041 S> */ B(LdaSmi), I8(1),
- /* 1048 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(146),
+ /* 1048 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(147),
/* 1055 S> */ B(LdaSmi), I8(1),
- /* 1062 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(148),
+ /* 1062 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(149),
/* 1069 S> */ B(LdaSmi), I8(1),
- /* 1076 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(150),
+ /* 1076 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(151),
/* 1083 S> */ B(LdaSmi), I8(1),
- /* 1090 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(152),
+ /* 1090 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(153),
/* 1097 S> */ B(LdaSmi), I8(1),
- /* 1104 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(154),
+ /* 1104 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(155),
/* 1111 S> */ B(LdaSmi), I8(1),
- /* 1118 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(156),
+ /* 1118 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(157),
/* 1125 S> */ B(LdaSmi), I8(1),
- /* 1132 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(158),
+ /* 1132 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(159),
/* 1139 S> */ B(LdaSmi), I8(1),
- /* 1146 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(160),
+ /* 1146 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(161),
/* 1153 S> */ B(LdaSmi), I8(1),
- /* 1160 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(162),
+ /* 1160 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(163),
/* 1167 S> */ B(LdaSmi), I8(1),
- /* 1174 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(164),
+ /* 1174 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(165),
/* 1181 S> */ B(LdaSmi), I8(1),
- /* 1188 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(166),
+ /* 1188 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(167),
/* 1195 S> */ B(LdaSmi), I8(1),
- /* 1202 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(168),
+ /* 1202 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(169),
/* 1209 S> */ B(LdaSmi), I8(1),
- /* 1216 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(170),
+ /* 1216 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(171),
/* 1223 S> */ B(LdaSmi), I8(1),
- /* 1230 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(172),
+ /* 1230 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(173),
/* 1237 S> */ B(LdaSmi), I8(1),
- /* 1244 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(174),
+ /* 1244 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(175),
/* 1251 S> */ B(LdaSmi), I8(1),
- /* 1258 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(176),
+ /* 1258 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(177),
/* 1265 S> */ B(LdaSmi), I8(1),
- /* 1272 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(178),
+ /* 1272 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(179),
/* 1279 S> */ B(LdaSmi), I8(1),
- /* 1286 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(180),
+ /* 1286 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(181),
/* 1293 S> */ B(LdaSmi), I8(1),
- /* 1300 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(182),
+ /* 1300 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(183),
/* 1307 S> */ B(LdaSmi), I8(1),
- /* 1314 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(184),
+ /* 1314 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(185),
/* 1321 S> */ B(LdaSmi), I8(1),
- /* 1328 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(186),
+ /* 1328 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(187),
/* 1335 S> */ B(LdaSmi), I8(1),
- /* 1342 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(188),
+ /* 1342 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(189),
/* 1349 S> */ B(LdaSmi), I8(1),
- /* 1356 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(190),
+ /* 1356 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(191),
/* 1363 S> */ B(LdaSmi), I8(1),
- /* 1370 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(192),
+ /* 1370 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(193),
/* 1377 S> */ B(LdaSmi), I8(1),
- /* 1384 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(194),
+ /* 1384 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(195),
/* 1391 S> */ B(LdaSmi), I8(1),
- /* 1398 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(196),
+ /* 1398 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(197),
/* 1405 S> */ B(LdaSmi), I8(1),
- /* 1412 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(198),
+ /* 1412 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(199),
/* 1419 S> */ B(LdaSmi), I8(1),
- /* 1426 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(200),
+ /* 1426 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(201),
/* 1433 S> */ B(LdaSmi), I8(1),
- /* 1440 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(202),
+ /* 1440 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(203),
/* 1447 S> */ B(LdaSmi), I8(1),
- /* 1454 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(204),
+ /* 1454 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(205),
/* 1461 S> */ B(LdaSmi), I8(1),
- /* 1468 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(206),
+ /* 1468 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(207),
/* 1475 S> */ B(LdaSmi), I8(1),
- /* 1482 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(208),
+ /* 1482 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(209),
/* 1489 S> */ B(LdaSmi), I8(1),
- /* 1496 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(210),
+ /* 1496 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(211),
/* 1503 S> */ B(LdaSmi), I8(1),
- /* 1510 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(212),
+ /* 1510 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(213),
/* 1517 S> */ B(LdaSmi), I8(1),
- /* 1524 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(214),
+ /* 1524 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(215),
/* 1531 S> */ B(LdaSmi), I8(1),
- /* 1538 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(216),
+ /* 1538 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(217),
/* 1545 S> */ B(LdaSmi), I8(1),
- /* 1552 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(218),
+ /* 1552 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(219),
/* 1559 S> */ B(LdaSmi), I8(1),
- /* 1566 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(220),
+ /* 1566 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(221),
/* 1573 S> */ B(LdaSmi), I8(1),
- /* 1580 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(222),
+ /* 1580 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(223),
/* 1587 S> */ B(LdaSmi), I8(1),
- /* 1594 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(224),
+ /* 1594 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(225),
/* 1601 S> */ B(LdaSmi), I8(1),
- /* 1608 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(226),
+ /* 1608 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(227),
/* 1615 S> */ B(LdaSmi), I8(1),
- /* 1622 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(228),
+ /* 1622 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(229),
/* 1629 S> */ B(LdaSmi), I8(1),
- /* 1636 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(230),
+ /* 1636 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(231),
/* 1643 S> */ B(LdaSmi), I8(1),
- /* 1650 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(232),
+ /* 1650 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(233),
/* 1657 S> */ B(LdaSmi), I8(1),
- /* 1664 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(234),
+ /* 1664 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(235),
/* 1671 S> */ B(LdaSmi), I8(1),
- /* 1678 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(236),
+ /* 1678 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(237),
/* 1685 S> */ B(LdaSmi), I8(1),
- /* 1692 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(238),
+ /* 1692 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(239),
/* 1699 S> */ B(LdaSmi), I8(1),
- /* 1706 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(240),
+ /* 1706 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(241),
/* 1713 S> */ B(LdaSmi), I8(1),
- /* 1720 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(242),
+ /* 1720 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(243),
/* 1727 S> */ B(LdaSmi), I8(1),
- /* 1734 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(244),
+ /* 1734 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(245),
/* 1741 S> */ B(LdaSmi), I8(1),
- /* 1748 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(246),
+ /* 1748 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(247),
/* 1755 S> */ B(LdaSmi), I8(1),
- /* 1762 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(248),
+ /* 1762 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(249),
/* 1769 S> */ B(LdaSmi), I8(1),
- /* 1776 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(250),
+ /* 1776 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(251),
/* 1783 S> */ B(LdaSmi), I8(1),
- /* 1790 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(252),
+ /* 1790 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(253),
/* 1797 S> */ B(LdaSmi), I8(1),
- /* 1804 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(254),
+ /* 1804 E> */ B(StaNamedPropertyStrict), R(arg0), U8(0), U8(255),
/* 1811 S> */ B(LdaSmi), I8(1),
- /* 1818 E> */ B(Wide), B(StaNamedPropertyStrict), R16(arg0), U16(0), U16(256),
+ /* 1818 E> */ B(Wide), B(StaNamedPropertyStrict), R16(arg0), U16(0), U16(257),
/* 1825 S> */ B(LdaSmi), I8(2),
- /* 1832 E> */ B(Wide), B(StaNamedPropertyStrict), R16(arg0), U16(0), U16(258),
+ /* 1832 E> */ B(Wide), B(StaNamedPropertyStrict), R16(arg0), U16(0), U16(259),
B(LdaUndefined),
/* 1837 S> */ B(Return),
]
@@ -1115,263 +1115,263 @@ bytecode array length: 785
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 21 S> */ B(LdaSmi), I8(1),
- /* 26 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(2),
+ /* 26 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(3),
/* 33 S> */ B(LdaSmi), I8(1),
- /* 38 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(4),
+ /* 38 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(5),
/* 45 S> */ B(LdaSmi), I8(1),
- /* 50 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(6),
+ /* 50 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(7),
/* 57 S> */ B(LdaSmi), I8(1),
- /* 62 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(8),
+ /* 62 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(9),
/* 69 S> */ B(LdaSmi), I8(1),
- /* 74 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(10),
+ /* 74 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(11),
/* 81 S> */ B(LdaSmi), I8(1),
- /* 86 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(12),
+ /* 86 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(13),
/* 93 S> */ B(LdaSmi), I8(1),
- /* 98 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(14),
+ /* 98 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(15),
/* 105 S> */ B(LdaSmi), I8(1),
- /* 110 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(16),
+ /* 110 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(17),
/* 117 S> */ B(LdaSmi), I8(1),
- /* 122 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(18),
+ /* 122 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(19),
/* 129 S> */ B(LdaSmi), I8(1),
- /* 134 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(20),
+ /* 134 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(21),
/* 141 S> */ B(LdaSmi), I8(1),
- /* 146 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(22),
+ /* 146 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(23),
/* 153 S> */ B(LdaSmi), I8(1),
- /* 158 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(24),
+ /* 158 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(25),
/* 165 S> */ B(LdaSmi), I8(1),
- /* 170 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(26),
+ /* 170 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(27),
/* 177 S> */ B(LdaSmi), I8(1),
- /* 182 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(28),
+ /* 182 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(29),
/* 189 S> */ B(LdaSmi), I8(1),
- /* 194 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(30),
+ /* 194 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(31),
/* 201 S> */ B(LdaSmi), I8(1),
- /* 206 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(32),
+ /* 206 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(33),
/* 213 S> */ B(LdaSmi), I8(1),
- /* 218 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(34),
+ /* 218 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(35),
/* 225 S> */ B(LdaSmi), I8(1),
- /* 230 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(36),
+ /* 230 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(37),
/* 237 S> */ B(LdaSmi), I8(1),
- /* 242 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(38),
+ /* 242 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(39),
/* 249 S> */ B(LdaSmi), I8(1),
- /* 254 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(40),
+ /* 254 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(41),
/* 261 S> */ B(LdaSmi), I8(1),
- /* 266 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(42),
+ /* 266 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(43),
/* 273 S> */ B(LdaSmi), I8(1),
- /* 278 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(44),
+ /* 278 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(45),
/* 285 S> */ B(LdaSmi), I8(1),
- /* 290 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(46),
+ /* 290 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(47),
/* 297 S> */ B(LdaSmi), I8(1),
- /* 302 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(48),
+ /* 302 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(49),
/* 309 S> */ B(LdaSmi), I8(1),
- /* 314 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(50),
+ /* 314 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(51),
/* 321 S> */ B(LdaSmi), I8(1),
- /* 326 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(52),
+ /* 326 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(53),
/* 333 S> */ B(LdaSmi), I8(1),
- /* 338 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(54),
+ /* 338 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(55),
/* 345 S> */ B(LdaSmi), I8(1),
- /* 350 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(56),
+ /* 350 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(57),
/* 357 S> */ B(LdaSmi), I8(1),
- /* 362 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(58),
+ /* 362 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(59),
/* 369 S> */ B(LdaSmi), I8(1),
- /* 374 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(60),
+ /* 374 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(61),
/* 381 S> */ B(LdaSmi), I8(1),
- /* 386 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(62),
+ /* 386 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(63),
/* 393 S> */ B(LdaSmi), I8(1),
- /* 398 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(64),
+ /* 398 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(65),
/* 405 S> */ B(LdaSmi), I8(1),
- /* 410 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(66),
+ /* 410 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(67),
/* 417 S> */ B(LdaSmi), I8(1),
- /* 422 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(68),
+ /* 422 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(69),
/* 429 S> */ B(LdaSmi), I8(1),
- /* 434 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(70),
+ /* 434 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(71),
/* 441 S> */ B(LdaSmi), I8(1),
- /* 446 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(72),
+ /* 446 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(73),
/* 453 S> */ B(LdaSmi), I8(1),
- /* 458 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(74),
+ /* 458 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(75),
/* 465 S> */ B(LdaSmi), I8(1),
- /* 470 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(76),
+ /* 470 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(77),
/* 477 S> */ B(LdaSmi), I8(1),
- /* 482 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(78),
+ /* 482 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(79),
/* 489 S> */ B(LdaSmi), I8(1),
- /* 494 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(80),
+ /* 494 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(81),
/* 501 S> */ B(LdaSmi), I8(1),
- /* 506 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(82),
+ /* 506 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(83),
/* 513 S> */ B(LdaSmi), I8(1),
- /* 518 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(84),
+ /* 518 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(85),
/* 525 S> */ B(LdaSmi), I8(1),
- /* 530 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(86),
+ /* 530 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(87),
/* 537 S> */ B(LdaSmi), I8(1),
- /* 542 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(88),
+ /* 542 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(89),
/* 549 S> */ B(LdaSmi), I8(1),
- /* 554 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(90),
+ /* 554 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(91),
/* 561 S> */ B(LdaSmi), I8(1),
- /* 566 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(92),
+ /* 566 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(93),
/* 573 S> */ B(LdaSmi), I8(1),
- /* 578 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(94),
+ /* 578 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(95),
/* 585 S> */ B(LdaSmi), I8(1),
- /* 590 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(96),
+ /* 590 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(97),
/* 597 S> */ B(LdaSmi), I8(1),
- /* 602 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(98),
+ /* 602 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(99),
/* 609 S> */ B(LdaSmi), I8(1),
- /* 614 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(100),
+ /* 614 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(101),
/* 621 S> */ B(LdaSmi), I8(1),
- /* 626 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(102),
+ /* 626 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(103),
/* 633 S> */ B(LdaSmi), I8(1),
- /* 638 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(104),
+ /* 638 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(105),
/* 645 S> */ B(LdaSmi), I8(1),
- /* 650 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(106),
+ /* 650 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(107),
/* 657 S> */ B(LdaSmi), I8(1),
- /* 662 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(108),
+ /* 662 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(109),
/* 669 S> */ B(LdaSmi), I8(1),
- /* 674 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(110),
+ /* 674 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(111),
/* 681 S> */ B(LdaSmi), I8(1),
- /* 686 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(112),
+ /* 686 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(113),
/* 693 S> */ B(LdaSmi), I8(1),
- /* 698 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(114),
+ /* 698 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(115),
/* 705 S> */ B(LdaSmi), I8(1),
- /* 710 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(116),
+ /* 710 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(117),
/* 717 S> */ B(LdaSmi), I8(1),
- /* 722 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(118),
+ /* 722 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(119),
/* 729 S> */ B(LdaSmi), I8(1),
- /* 734 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(120),
+ /* 734 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(121),
/* 741 S> */ B(LdaSmi), I8(1),
- /* 746 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(122),
+ /* 746 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(123),
/* 753 S> */ B(LdaSmi), I8(1),
- /* 758 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(124),
+ /* 758 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(125),
/* 765 S> */ B(LdaSmi), I8(1),
- /* 770 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(126),
+ /* 770 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(127),
/* 777 S> */ B(LdaSmi), I8(1),
- /* 782 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(128),
+ /* 782 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(129),
/* 789 S> */ B(LdaSmi), I8(1),
- /* 794 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(130),
+ /* 794 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(131),
/* 801 S> */ B(LdaSmi), I8(1),
- /* 806 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(132),
+ /* 806 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(133),
/* 813 S> */ B(LdaSmi), I8(1),
- /* 818 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(134),
+ /* 818 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(135),
/* 825 S> */ B(LdaSmi), I8(1),
- /* 830 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(136),
+ /* 830 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(137),
/* 837 S> */ B(LdaSmi), I8(1),
- /* 842 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(138),
+ /* 842 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(139),
/* 849 S> */ B(LdaSmi), I8(1),
- /* 854 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(140),
+ /* 854 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(141),
/* 861 S> */ B(LdaSmi), I8(1),
- /* 866 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(142),
+ /* 866 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(143),
/* 873 S> */ B(LdaSmi), I8(1),
- /* 878 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(144),
+ /* 878 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(145),
/* 885 S> */ B(LdaSmi), I8(1),
- /* 890 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(146),
+ /* 890 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(147),
/* 897 S> */ B(LdaSmi), I8(1),
- /* 902 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(148),
+ /* 902 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(149),
/* 909 S> */ B(LdaSmi), I8(1),
- /* 914 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(150),
+ /* 914 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(151),
/* 921 S> */ B(LdaSmi), I8(1),
- /* 926 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(152),
+ /* 926 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(153),
/* 933 S> */ B(LdaSmi), I8(1),
- /* 938 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(154),
+ /* 938 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(155),
/* 945 S> */ B(LdaSmi), I8(1),
- /* 950 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(156),
+ /* 950 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(157),
/* 957 S> */ B(LdaSmi), I8(1),
- /* 962 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(158),
+ /* 962 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(159),
/* 969 S> */ B(LdaSmi), I8(1),
- /* 974 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(160),
+ /* 974 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(161),
/* 981 S> */ B(LdaSmi), I8(1),
- /* 986 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(162),
+ /* 986 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(163),
/* 993 S> */ B(LdaSmi), I8(1),
- /* 998 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(164),
+ /* 998 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(165),
/* 1005 S> */ B(LdaSmi), I8(1),
- /* 1010 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(166),
+ /* 1010 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(167),
/* 1017 S> */ B(LdaSmi), I8(1),
- /* 1022 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(168),
+ /* 1022 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(169),
/* 1029 S> */ B(LdaSmi), I8(1),
- /* 1034 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(170),
+ /* 1034 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(171),
/* 1041 S> */ B(LdaSmi), I8(1),
- /* 1046 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(172),
+ /* 1046 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(173),
/* 1053 S> */ B(LdaSmi), I8(1),
- /* 1058 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(174),
+ /* 1058 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(175),
/* 1065 S> */ B(LdaSmi), I8(1),
- /* 1070 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(176),
+ /* 1070 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(177),
/* 1077 S> */ B(LdaSmi), I8(1),
- /* 1082 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(178),
+ /* 1082 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(179),
/* 1089 S> */ B(LdaSmi), I8(1),
- /* 1094 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(180),
+ /* 1094 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(181),
/* 1101 S> */ B(LdaSmi), I8(1),
- /* 1106 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(182),
+ /* 1106 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(183),
/* 1113 S> */ B(LdaSmi), I8(1),
- /* 1118 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(184),
+ /* 1118 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(185),
/* 1125 S> */ B(LdaSmi), I8(1),
- /* 1130 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(186),
+ /* 1130 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(187),
/* 1137 S> */ B(LdaSmi), I8(1),
- /* 1142 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(188),
+ /* 1142 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(189),
/* 1149 S> */ B(LdaSmi), I8(1),
- /* 1154 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(190),
+ /* 1154 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(191),
/* 1161 S> */ B(LdaSmi), I8(1),
- /* 1166 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(192),
+ /* 1166 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(193),
/* 1173 S> */ B(LdaSmi), I8(1),
- /* 1178 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(194),
+ /* 1178 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(195),
/* 1185 S> */ B(LdaSmi), I8(1),
- /* 1190 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(196),
+ /* 1190 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(197),
/* 1197 S> */ B(LdaSmi), I8(1),
- /* 1202 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(198),
+ /* 1202 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(199),
/* 1209 S> */ B(LdaSmi), I8(1),
- /* 1214 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(200),
+ /* 1214 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(201),
/* 1221 S> */ B(LdaSmi), I8(1),
- /* 1226 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(202),
+ /* 1226 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(203),
/* 1233 S> */ B(LdaSmi), I8(1),
- /* 1238 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(204),
+ /* 1238 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(205),
/* 1245 S> */ B(LdaSmi), I8(1),
- /* 1250 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(206),
+ /* 1250 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(207),
/* 1257 S> */ B(LdaSmi), I8(1),
- /* 1262 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(208),
+ /* 1262 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(209),
/* 1269 S> */ B(LdaSmi), I8(1),
- /* 1274 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(210),
+ /* 1274 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(211),
/* 1281 S> */ B(LdaSmi), I8(1),
- /* 1286 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(212),
+ /* 1286 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(213),
/* 1293 S> */ B(LdaSmi), I8(1),
- /* 1298 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(214),
+ /* 1298 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(215),
/* 1305 S> */ B(LdaSmi), I8(1),
- /* 1310 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(216),
+ /* 1310 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(217),
/* 1317 S> */ B(LdaSmi), I8(1),
- /* 1322 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(218),
+ /* 1322 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(219),
/* 1329 S> */ B(LdaSmi), I8(1),
- /* 1334 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(220),
+ /* 1334 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(221),
/* 1341 S> */ B(LdaSmi), I8(1),
- /* 1346 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(222),
+ /* 1346 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(223),
/* 1353 S> */ B(LdaSmi), I8(1),
- /* 1358 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(224),
+ /* 1358 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(225),
/* 1365 S> */ B(LdaSmi), I8(1),
- /* 1370 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(226),
+ /* 1370 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(227),
/* 1377 S> */ B(LdaSmi), I8(1),
- /* 1382 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(228),
+ /* 1382 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(229),
/* 1389 S> */ B(LdaSmi), I8(1),
- /* 1394 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(230),
+ /* 1394 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(231),
/* 1401 S> */ B(LdaSmi), I8(1),
- /* 1406 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(232),
+ /* 1406 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(233),
/* 1413 S> */ B(LdaSmi), I8(1),
- /* 1418 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(234),
+ /* 1418 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(235),
/* 1425 S> */ B(LdaSmi), I8(1),
- /* 1430 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(236),
+ /* 1430 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(237),
/* 1437 S> */ B(LdaSmi), I8(1),
- /* 1442 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(238),
+ /* 1442 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(239),
/* 1449 S> */ B(LdaSmi), I8(1),
- /* 1454 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(240),
+ /* 1454 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(241),
/* 1461 S> */ B(LdaSmi), I8(1),
- /* 1466 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(242),
+ /* 1466 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(243),
/* 1473 S> */ B(LdaSmi), I8(1),
- /* 1478 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(244),
+ /* 1478 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(245),
/* 1485 S> */ B(LdaSmi), I8(1),
- /* 1490 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(246),
+ /* 1490 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(247),
/* 1497 S> */ B(LdaSmi), I8(1),
- /* 1502 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(248),
+ /* 1502 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(249),
/* 1509 S> */ B(LdaSmi), I8(1),
- /* 1514 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(250),
+ /* 1514 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(251),
/* 1521 S> */ B(LdaSmi), I8(1),
- /* 1526 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(252),
+ /* 1526 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(253),
/* 1533 S> */ B(LdaSmi), I8(1),
- /* 1538 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(254),
+ /* 1538 E> */ B(StaKeyedPropertySloppy), R(arg0), R(arg1), U8(255),
/* 1545 S> */ B(LdaSmi), I8(1),
- /* 1550 E> */ B(Wide), B(StaKeyedPropertySloppy), R16(arg0), R16(arg1), U16(256),
+ /* 1550 E> */ B(Wide), B(StaKeyedPropertySloppy), R16(arg0), R16(arg1), U16(257),
/* 1557 S> */ B(LdaSmi), I8(2),
- /* 1562 E> */ B(Wide), B(StaKeyedPropertySloppy), R16(arg0), R16(arg1), U16(258),
+ /* 1562 E> */ B(Wide), B(StaKeyedPropertySloppy), R16(arg0), R16(arg1), U16(259),
B(LdaUndefined),
/* 1567 S> */ B(Return),
]
@@ -1522,263 +1522,263 @@ bytecode array length: 785
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 37 S> */ B(LdaSmi), I8(1),
- /* 42 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(2),
+ /* 42 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(3),
/* 49 S> */ B(LdaSmi), I8(1),
- /* 54 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(4),
+ /* 54 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(5),
/* 61 S> */ B(LdaSmi), I8(1),
- /* 66 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(6),
+ /* 66 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(7),
/* 73 S> */ B(LdaSmi), I8(1),
- /* 78 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(8),
+ /* 78 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(9),
/* 85 S> */ B(LdaSmi), I8(1),
- /* 90 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(10),
+ /* 90 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(11),
/* 97 S> */ B(LdaSmi), I8(1),
- /* 102 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(12),
+ /* 102 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(13),
/* 109 S> */ B(LdaSmi), I8(1),
- /* 114 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(14),
+ /* 114 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(15),
/* 121 S> */ B(LdaSmi), I8(1),
- /* 126 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(16),
+ /* 126 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(17),
/* 133 S> */ B(LdaSmi), I8(1),
- /* 138 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(18),
+ /* 138 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(19),
/* 145 S> */ B(LdaSmi), I8(1),
- /* 150 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(20),
+ /* 150 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(21),
/* 157 S> */ B(LdaSmi), I8(1),
- /* 162 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(22),
+ /* 162 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(23),
/* 169 S> */ B(LdaSmi), I8(1),
- /* 174 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(24),
+ /* 174 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(25),
/* 181 S> */ B(LdaSmi), I8(1),
- /* 186 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(26),
+ /* 186 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(27),
/* 193 S> */ B(LdaSmi), I8(1),
- /* 198 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(28),
+ /* 198 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(29),
/* 205 S> */ B(LdaSmi), I8(1),
- /* 210 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(30),
+ /* 210 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(31),
/* 217 S> */ B(LdaSmi), I8(1),
- /* 222 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(32),
+ /* 222 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(33),
/* 229 S> */ B(LdaSmi), I8(1),
- /* 234 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(34),
+ /* 234 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(35),
/* 241 S> */ B(LdaSmi), I8(1),
- /* 246 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(36),
+ /* 246 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(37),
/* 253 S> */ B(LdaSmi), I8(1),
- /* 258 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(38),
+ /* 258 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(39),
/* 265 S> */ B(LdaSmi), I8(1),
- /* 270 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(40),
+ /* 270 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(41),
/* 277 S> */ B(LdaSmi), I8(1),
- /* 282 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(42),
+ /* 282 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(43),
/* 289 S> */ B(LdaSmi), I8(1),
- /* 294 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(44),
+ /* 294 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(45),
/* 301 S> */ B(LdaSmi), I8(1),
- /* 306 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(46),
+ /* 306 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(47),
/* 313 S> */ B(LdaSmi), I8(1),
- /* 318 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(48),
+ /* 318 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(49),
/* 325 S> */ B(LdaSmi), I8(1),
- /* 330 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(50),
+ /* 330 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(51),
/* 337 S> */ B(LdaSmi), I8(1),
- /* 342 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(52),
+ /* 342 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(53),
/* 349 S> */ B(LdaSmi), I8(1),
- /* 354 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(54),
+ /* 354 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(55),
/* 361 S> */ B(LdaSmi), I8(1),
- /* 366 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(56),
+ /* 366 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(57),
/* 373 S> */ B(LdaSmi), I8(1),
- /* 378 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(58),
+ /* 378 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(59),
/* 385 S> */ B(LdaSmi), I8(1),
- /* 390 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(60),
+ /* 390 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(61),
/* 397 S> */ B(LdaSmi), I8(1),
- /* 402 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(62),
+ /* 402 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(63),
/* 409 S> */ B(LdaSmi), I8(1),
- /* 414 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(64),
+ /* 414 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(65),
/* 421 S> */ B(LdaSmi), I8(1),
- /* 426 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(66),
+ /* 426 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(67),
/* 433 S> */ B(LdaSmi), I8(1),
- /* 438 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(68),
+ /* 438 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(69),
/* 445 S> */ B(LdaSmi), I8(1),
- /* 450 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(70),
+ /* 450 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(71),
/* 457 S> */ B(LdaSmi), I8(1),
- /* 462 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(72),
+ /* 462 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(73),
/* 469 S> */ B(LdaSmi), I8(1),
- /* 474 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(74),
+ /* 474 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(75),
/* 481 S> */ B(LdaSmi), I8(1),
- /* 486 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(76),
+ /* 486 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(77),
/* 493 S> */ B(LdaSmi), I8(1),
- /* 498 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(78),
+ /* 498 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(79),
/* 505 S> */ B(LdaSmi), I8(1),
- /* 510 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(80),
+ /* 510 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(81),
/* 517 S> */ B(LdaSmi), I8(1),
- /* 522 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(82),
+ /* 522 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(83),
/* 529 S> */ B(LdaSmi), I8(1),
- /* 534 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(84),
+ /* 534 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(85),
/* 541 S> */ B(LdaSmi), I8(1),
- /* 546 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(86),
+ /* 546 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(87),
/* 553 S> */ B(LdaSmi), I8(1),
- /* 558 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(88),
+ /* 558 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(89),
/* 565 S> */ B(LdaSmi), I8(1),
- /* 570 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(90),
+ /* 570 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(91),
/* 577 S> */ B(LdaSmi), I8(1),
- /* 582 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(92),
+ /* 582 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(93),
/* 589 S> */ B(LdaSmi), I8(1),
- /* 594 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(94),
+ /* 594 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(95),
/* 601 S> */ B(LdaSmi), I8(1),
- /* 606 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(96),
+ /* 606 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(97),
/* 613 S> */ B(LdaSmi), I8(1),
- /* 618 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(98),
+ /* 618 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(99),
/* 625 S> */ B(LdaSmi), I8(1),
- /* 630 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(100),
+ /* 630 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(101),
/* 637 S> */ B(LdaSmi), I8(1),
- /* 642 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(102),
+ /* 642 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(103),
/* 649 S> */ B(LdaSmi), I8(1),
- /* 654 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(104),
+ /* 654 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(105),
/* 661 S> */ B(LdaSmi), I8(1),
- /* 666 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(106),
+ /* 666 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(107),
/* 673 S> */ B(LdaSmi), I8(1),
- /* 678 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(108),
+ /* 678 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(109),
/* 685 S> */ B(LdaSmi), I8(1),
- /* 690 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(110),
+ /* 690 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(111),
/* 697 S> */ B(LdaSmi), I8(1),
- /* 702 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(112),
+ /* 702 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(113),
/* 709 S> */ B(LdaSmi), I8(1),
- /* 714 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(114),
+ /* 714 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(115),
/* 721 S> */ B(LdaSmi), I8(1),
- /* 726 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(116),
+ /* 726 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(117),
/* 733 S> */ B(LdaSmi), I8(1),
- /* 738 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(118),
+ /* 738 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(119),
/* 745 S> */ B(LdaSmi), I8(1),
- /* 750 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(120),
+ /* 750 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(121),
/* 757 S> */ B(LdaSmi), I8(1),
- /* 762 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(122),
+ /* 762 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(123),
/* 769 S> */ B(LdaSmi), I8(1),
- /* 774 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(124),
+ /* 774 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(125),
/* 781 S> */ B(LdaSmi), I8(1),
- /* 786 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(126),
+ /* 786 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(127),
/* 793 S> */ B(LdaSmi), I8(1),
- /* 798 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(128),
+ /* 798 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(129),
/* 805 S> */ B(LdaSmi), I8(1),
- /* 810 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(130),
+ /* 810 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(131),
/* 817 S> */ B(LdaSmi), I8(1),
- /* 822 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(132),
+ /* 822 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(133),
/* 829 S> */ B(LdaSmi), I8(1),
- /* 834 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(134),
+ /* 834 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(135),
/* 841 S> */ B(LdaSmi), I8(1),
- /* 846 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(136),
+ /* 846 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(137),
/* 853 S> */ B(LdaSmi), I8(1),
- /* 858 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(138),
+ /* 858 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(139),
/* 865 S> */ B(LdaSmi), I8(1),
- /* 870 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(140),
+ /* 870 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(141),
/* 877 S> */ B(LdaSmi), I8(1),
- /* 882 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(142),
+ /* 882 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(143),
/* 889 S> */ B(LdaSmi), I8(1),
- /* 894 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(144),
+ /* 894 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(145),
/* 901 S> */ B(LdaSmi), I8(1),
- /* 906 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(146),
+ /* 906 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(147),
/* 913 S> */ B(LdaSmi), I8(1),
- /* 918 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(148),
+ /* 918 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(149),
/* 925 S> */ B(LdaSmi), I8(1),
- /* 930 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(150),
+ /* 930 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(151),
/* 937 S> */ B(LdaSmi), I8(1),
- /* 942 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(152),
+ /* 942 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(153),
/* 949 S> */ B(LdaSmi), I8(1),
- /* 954 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(154),
+ /* 954 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(155),
/* 961 S> */ B(LdaSmi), I8(1),
- /* 966 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(156),
+ /* 966 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(157),
/* 973 S> */ B(LdaSmi), I8(1),
- /* 978 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(158),
+ /* 978 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(159),
/* 985 S> */ B(LdaSmi), I8(1),
- /* 990 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(160),
+ /* 990 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(161),
/* 997 S> */ B(LdaSmi), I8(1),
- /* 1002 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(162),
+ /* 1002 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(163),
/* 1009 S> */ B(LdaSmi), I8(1),
- /* 1014 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(164),
+ /* 1014 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(165),
/* 1021 S> */ B(LdaSmi), I8(1),
- /* 1026 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(166),
+ /* 1026 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(167),
/* 1033 S> */ B(LdaSmi), I8(1),
- /* 1038 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(168),
+ /* 1038 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(169),
/* 1045 S> */ B(LdaSmi), I8(1),
- /* 1050 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(170),
+ /* 1050 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(171),
/* 1057 S> */ B(LdaSmi), I8(1),
- /* 1062 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(172),
+ /* 1062 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(173),
/* 1069 S> */ B(LdaSmi), I8(1),
- /* 1074 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(174),
+ /* 1074 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(175),
/* 1081 S> */ B(LdaSmi), I8(1),
- /* 1086 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(176),
+ /* 1086 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(177),
/* 1093 S> */ B(LdaSmi), I8(1),
- /* 1098 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(178),
+ /* 1098 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(179),
/* 1105 S> */ B(LdaSmi), I8(1),
- /* 1110 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(180),
+ /* 1110 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(181),
/* 1117 S> */ B(LdaSmi), I8(1),
- /* 1122 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(182),
+ /* 1122 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(183),
/* 1129 S> */ B(LdaSmi), I8(1),
- /* 1134 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(184),
+ /* 1134 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(185),
/* 1141 S> */ B(LdaSmi), I8(1),
- /* 1146 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(186),
+ /* 1146 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(187),
/* 1153 S> */ B(LdaSmi), I8(1),
- /* 1158 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(188),
+ /* 1158 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(189),
/* 1165 S> */ B(LdaSmi), I8(1),
- /* 1170 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(190),
+ /* 1170 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(191),
/* 1177 S> */ B(LdaSmi), I8(1),
- /* 1182 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(192),
+ /* 1182 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(193),
/* 1189 S> */ B(LdaSmi), I8(1),
- /* 1194 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(194),
+ /* 1194 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(195),
/* 1201 S> */ B(LdaSmi), I8(1),
- /* 1206 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(196),
+ /* 1206 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(197),
/* 1213 S> */ B(LdaSmi), I8(1),
- /* 1218 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(198),
+ /* 1218 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(199),
/* 1225 S> */ B(LdaSmi), I8(1),
- /* 1230 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(200),
+ /* 1230 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(201),
/* 1237 S> */ B(LdaSmi), I8(1),
- /* 1242 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(202),
+ /* 1242 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(203),
/* 1249 S> */ B(LdaSmi), I8(1),
- /* 1254 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(204),
+ /* 1254 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(205),
/* 1261 S> */ B(LdaSmi), I8(1),
- /* 1266 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(206),
+ /* 1266 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(207),
/* 1273 S> */ B(LdaSmi), I8(1),
- /* 1278 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(208),
+ /* 1278 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(209),
/* 1285 S> */ B(LdaSmi), I8(1),
- /* 1290 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(210),
+ /* 1290 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(211),
/* 1297 S> */ B(LdaSmi), I8(1),
- /* 1302 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(212),
+ /* 1302 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(213),
/* 1309 S> */ B(LdaSmi), I8(1),
- /* 1314 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(214),
+ /* 1314 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(215),
/* 1321 S> */ B(LdaSmi), I8(1),
- /* 1326 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(216),
+ /* 1326 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(217),
/* 1333 S> */ B(LdaSmi), I8(1),
- /* 1338 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(218),
+ /* 1338 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(219),
/* 1345 S> */ B(LdaSmi), I8(1),
- /* 1350 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(220),
+ /* 1350 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(221),
/* 1357 S> */ B(LdaSmi), I8(1),
- /* 1362 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(222),
+ /* 1362 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(223),
/* 1369 S> */ B(LdaSmi), I8(1),
- /* 1374 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(224),
+ /* 1374 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(225),
/* 1381 S> */ B(LdaSmi), I8(1),
- /* 1386 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(226),
+ /* 1386 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(227),
/* 1393 S> */ B(LdaSmi), I8(1),
- /* 1398 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(228),
+ /* 1398 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(229),
/* 1405 S> */ B(LdaSmi), I8(1),
- /* 1410 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(230),
+ /* 1410 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(231),
/* 1417 S> */ B(LdaSmi), I8(1),
- /* 1422 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(232),
+ /* 1422 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(233),
/* 1429 S> */ B(LdaSmi), I8(1),
- /* 1434 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(234),
+ /* 1434 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(235),
/* 1441 S> */ B(LdaSmi), I8(1),
- /* 1446 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(236),
+ /* 1446 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(237),
/* 1453 S> */ B(LdaSmi), I8(1),
- /* 1458 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(238),
+ /* 1458 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(239),
/* 1465 S> */ B(LdaSmi), I8(1),
- /* 1470 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(240),
+ /* 1470 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(241),
/* 1477 S> */ B(LdaSmi), I8(1),
- /* 1482 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(242),
+ /* 1482 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(243),
/* 1489 S> */ B(LdaSmi), I8(1),
- /* 1494 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(244),
+ /* 1494 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(245),
/* 1501 S> */ B(LdaSmi), I8(1),
- /* 1506 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(246),
+ /* 1506 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(247),
/* 1513 S> */ B(LdaSmi), I8(1),
- /* 1518 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(248),
+ /* 1518 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(249),
/* 1525 S> */ B(LdaSmi), I8(1),
- /* 1530 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(250),
+ /* 1530 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(251),
/* 1537 S> */ B(LdaSmi), I8(1),
- /* 1542 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(252),
+ /* 1542 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(253),
/* 1549 S> */ B(LdaSmi), I8(1),
- /* 1554 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(254),
+ /* 1554 E> */ B(StaKeyedPropertyStrict), R(arg0), R(arg1), U8(255),
/* 1561 S> */ B(LdaSmi), I8(1),
- /* 1566 E> */ B(Wide), B(StaKeyedPropertyStrict), R16(arg0), R16(arg1), U16(256),
+ /* 1566 E> */ B(Wide), B(StaKeyedPropertyStrict), R16(arg0), R16(arg1), U16(257),
/* 1573 S> */ B(LdaSmi), I8(2),
- /* 1578 E> */ B(Wide), B(StaKeyedPropertyStrict), R16(arg0), R16(arg1), U16(258),
+ /* 1578 E> */ B(Wide), B(StaKeyedPropertyStrict), R16(arg0), R16(arg1), U16(259),
B(LdaUndefined),
/* 1583 S> */ B(Return),
]
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/RegExpLiterals.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/RegExpLiterals.golden
index 4c98cea746..18c9f2ce21 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/RegExpLiterals.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/RegExpLiterals.golden
@@ -14,7 +14,7 @@ parameter count: 1
bytecode array length: 6
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 34 S> */ B(CreateRegExpLiteral), U8(0), U8(2), U8(0),
+ /* 34 S> */ B(CreateRegExpLiteral), U8(0), U8(3), U8(0),
/* 49 S> */ B(Return),
]
constant pool: [
@@ -32,7 +32,7 @@ parameter count: 1
bytecode array length: 6
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 34 S> */ B(CreateRegExpLiteral), U8(0), U8(2), U8(2),
+ /* 34 S> */ B(CreateRegExpLiteral), U8(0), U8(3), U8(2),
/* 58 S> */ B(Return),
]
constant pool: [
@@ -50,13 +50,13 @@ parameter count: 1
bytecode array length: 23
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 34 S> */ B(CreateRegExpLiteral), U8(0), U8(4), U8(0),
+ /* 34 S> */ B(CreateRegExpLiteral), U8(0), U8(5), U8(0),
B(Star), R(1),
- /* 47 E> */ B(LdaNamedProperty), R(1), U8(1), U8(5),
+ /* 47 E> */ B(LdaNamedProperty), R(1), U8(1), U8(6),
B(Star), R(0),
B(LdaConstant), U8(2),
B(Star), R(2),
- /* 48 E> */ B(CallProperty1), R(0), R(1), R(2), U8(2),
+ /* 48 E> */ B(CallProperty1), R(0), R(1), R(2), U8(3),
/* 62 S> */ B(Return),
]
constant pool: [
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/RegExpLiteralsWide.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/RegExpLiteralsWide.golden
index 2fcd4b1188..a2f7ef5c20 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/RegExpLiteralsWide.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/RegExpLiteralsWide.golden
@@ -783,7 +783,7 @@ bytecodes: [
B(Star), R(0),
/* 2591 S> */ B(LdaConstant), U8(255),
B(Star), R(0),
- /* 2601 S> */ B(Wide), B(CreateRegExpLiteral), U16(256), U16(2), U8(0),
+ /* 2601 S> */ B(Wide), B(CreateRegExpLiteral), U16(256), U16(3), U8(0),
/* 2616 S> */ B(Return),
]
constant pool: [
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/RemoveRedundantLdar.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/RemoveRedundantLdar.golden
index 4fb7fbe420..6df03300b4 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/RemoveRedundantLdar.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/RemoveRedundantLdar.golden
@@ -23,10 +23,10 @@ bytecodes: [
B(Star), R(0),
/* 48 E> */ B(StackCheck),
/* 64 S> */ B(Ldar), R(0),
- /* 76 E> */ B(Add), R(0), U8(2),
+ /* 76 E> */ B(Add), R(0), U8(3),
B(Star), R(0),
/* 86 S> */ B(LdaSmi), I8(10),
- /* 95 E> */ B(TestGreaterThan), R(0), U8(3),
+ /* 95 E> */ B(TestGreaterThan), R(0), U8(4),
B(JumpIfFalse), U8(4),
/* 101 S> */ B(Jump), U8(5),
B(JumpLoop), U8(17), I8(0),
@@ -56,10 +56,10 @@ bytecodes: [
B(Star), R(0),
/* 48 E> */ B(StackCheck),
/* 55 S> */ B(Nop),
- /* 67 E> */ B(Add), R(0), U8(2),
+ /* 67 E> */ B(Add), R(0), U8(3),
B(Star), R(0),
/* 77 S> */ B(LdaSmi), I8(10),
- /* 86 E> */ B(TestGreaterThan), R(0), U8(3),
+ /* 86 E> */ B(TestGreaterThan), R(0), U8(4),
B(JumpIfFalse), U8(4),
/* 92 S> */ B(Jump), U8(2),
/* 118 S> */ B(Ldar), R(0),
@@ -84,7 +84,7 @@ bytecodes: [
/* 45 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
/* 50 S> */ B(Nop),
- /* 62 E> */ B(Add), R(0), U8(2),
+ /* 62 E> */ B(Add), R(0), U8(3),
B(Star), R(0),
/* 72 S> */ B(Nop),
/* 85 S> */ B(Return),
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/StandardForLoop.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/StandardForLoop.golden
new file mode 100644
index 0000000000..12f4e99cc3
--- /dev/null
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/StandardForLoop.golden
@@ -0,0 +1,1070 @@
+#
+# Autogenerated by generate-bytecode-expectations.
+#
+
+---
+wrap: no
+test function name: f
+
+---
+snippet: "
+ function f() {
+ for (let x = 0; x < 10; ++x) { let y = x; }
+ }
+ f();
+"
+frame size: 2
+parameter count: 1
+bytecode array length: 26
+bytecodes: [
+ /* 10 E> */ B(StackCheck),
+ /* 30 S> */ B(LdaZero),
+ B(Star), R(1),
+ /* 35 S> */ B(LdaSmi), I8(10),
+ /* 35 E> */ B(TestLessThan), R(1), U8(3),
+ B(JumpIfFalse), U8(15),
+ /* 17 E> */ B(StackCheck),
+ /* 56 S> */ B(Mov), R(1), R(0),
+ /* 43 S> */ B(Ldar), R(0),
+ B(Inc), U8(4),
+ B(Star), R(1),
+ B(JumpLoop), U8(17), I8(0),
+ B(LdaUndefined),
+ /* 61 S> */ B(Return),
+]
+constant pool: [
+]
+handlers: [
+]
+
+---
+snippet: "
+ function f() {
+ for (let x = 0; x < 10; ++x) { eval('1'); }
+ }
+ f();
+"
+frame size: 14
+parameter count: 1
+bytecode array length: 168
+bytecodes: [
+ B(CreateFunctionContext), U8(3),
+ B(PushContext), R(3),
+ B(Ldar), R(this),
+ B(StaCurrentContextSlot), U8(4),
+ B(CreateMappedArguments),
+ B(StaCurrentContextSlot), U8(6),
+ B(Ldar), R(new_target),
+ B(StaCurrentContextSlot), U8(5),
+ /* 10 E> */ B(StackCheck),
+ B(Ldar), R(closure),
+ B(CreateBlockContext), U8(0),
+ B(PushContext), R(4),
+ B(LdaTheHole),
+ B(StaCurrentContextSlot), U8(4),
+ /* 30 S> */ B(LdaZero),
+ /* 30 E> */ B(StaCurrentContextSlot), U8(4),
+ B(LdaCurrentContextSlot), U8(4),
+ B(Star), R(0),
+ B(LdaSmi), I8(1),
+ B(Star), R(1),
+ /* 59 E> */ B(StackCheck),
+ B(Ldar), R(closure),
+ B(CreateBlockContext), U8(1),
+ B(PushContext), R(5),
+ B(LdaTheHole),
+ B(StaCurrentContextSlot), U8(4),
+ B(Ldar), R(0),
+ B(StaCurrentContextSlot), U8(4),
+ B(LdaSmi), I8(1),
+ B(TestEqual), R(1), U8(3),
+ B(JumpIfFalse), U8(7),
+ B(LdaZero),
+ B(Star), R(1),
+ B(Jump), U8(8),
+ /* 43 S> */ B(LdaCurrentContextSlot), U8(4),
+ B(Inc), U8(4),
+ /* 43 E> */ B(StaCurrentContextSlot), U8(4),
+ B(LdaSmi), I8(1),
+ B(Star), R(2),
+ /* 35 S> */ B(LdaCurrentContextSlot), U8(4),
+ B(Star), R(6),
+ B(LdaSmi), I8(10),
+ /* 35 E> */ B(TestLessThan), R(6), U8(5),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(6),
+ B(PopContext), R(5),
+ B(Jump), U8(77),
+ B(LdaSmi), I8(1),
+ B(TestEqual), R(2), U8(6),
+ B(JumpIfFalse), U8(54),
+ /* 17 E> */ B(StackCheck),
+ /* 48 S> */ B(LdaLookupGlobalSlot), U8(2), U8(9), U8(1),
+ B(Star), R(6),
+ B(LdaConstant), U8(3),
+ B(Star), R(7),
+ B(LdaZero),
+ B(Star), R(11),
+ B(LdaSmi), I8(31),
+ B(Star), R(12),
+ B(LdaSmi), I8(48),
+ B(Star), R(13),
+ B(Mov), R(6), R(8),
+ B(Mov), R(7), R(9),
+ B(Mov), R(closure), R(10),
+ B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(8), U8(6),
+ B(Star), R(6),
+ /* 48 E> */ B(CallUndefinedReceiver1), R(6), R(7), U8(7),
+ B(LdaZero),
+ B(Star), R(2),
+ B(LdaCurrentContextSlot), U8(4),
+ B(Star), R(0),
+ B(JumpLoop), U8(56), I8(1),
+ B(LdaSmi), I8(1),
+ /* 59 E> */ B(TestEqual), R(2), U8(11),
+ B(JumpIfFalse), U8(6),
+ B(PopContext), R(5),
+ B(Jump), U8(7),
+ B(PopContext), R(5),
+ B(JumpLoop), U8(125), I8(0),
+ B(PopContext), R(4),
+ B(LdaUndefined),
+ /* 61 S> */ B(Return),
+]
+constant pool: [
+ FIXED_ARRAY_TYPE,
+ FIXED_ARRAY_TYPE,
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["eval"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["1"],
+]
+handlers: [
+]
+
+---
+snippet: "
+ function f() {
+ for (let x = 0; x < 10; ++x) { (function() { return x; })(); }
+ }
+ f();
+"
+frame size: 6
+parameter count: 1
+bytecode array length: 108
+bytecodes: [
+ /* 10 E> */ B(StackCheck),
+ /* 30 S> */ B(LdaZero),
+ B(Star), R(0),
+ B(Star), R(1),
+ B(LdaSmi), I8(1),
+ B(Star), R(2),
+ /* 78 E> */ B(StackCheck),
+ B(Ldar), R(closure),
+ B(CreateBlockContext), U8(0),
+ B(PushContext), R(4),
+ B(LdaTheHole),
+ B(StaCurrentContextSlot), U8(4),
+ B(Ldar), R(1),
+ B(StaCurrentContextSlot), U8(4),
+ B(LdaSmi), I8(1),
+ B(TestEqual), R(2), U8(3),
+ B(JumpIfFalse), U8(7),
+ B(LdaZero),
+ B(Star), R(2),
+ B(Jump), U8(8),
+ /* 43 S> */ B(LdaCurrentContextSlot), U8(4),
+ B(Inc), U8(4),
+ /* 43 E> */ B(StaCurrentContextSlot), U8(4),
+ B(LdaSmi), I8(1),
+ B(Star), R(3),
+ /* 35 S> */ B(LdaCurrentContextSlot), U8(4),
+ B(Star), R(5),
+ B(LdaSmi), I8(10),
+ /* 35 E> */ B(TestLessThan), R(5), U8(5),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(6),
+ B(PopContext), R(4),
+ B(Jump), U8(45),
+ B(LdaSmi), I8(1),
+ B(TestEqual), R(3), U8(6),
+ B(JumpIfFalse), U8(22),
+ /* 17 E> */ B(StackCheck),
+ /* 48 S> */ B(CreateClosure), U8(1), U8(9), U8(2),
+ B(Star), R(5),
+ /* 74 E> */ B(CallUndefinedReceiver0), R(5), U8(7),
+ B(LdaZero),
+ B(Star), R(3),
+ B(LdaCurrentContextSlot), U8(4),
+ B(Star), R(1),
+ B(JumpLoop), U8(24), I8(1),
+ B(LdaSmi), I8(1),
+ /* 78 E> */ B(TestEqual), R(3), U8(10),
+ B(JumpIfFalse), U8(6),
+ B(PopContext), R(4),
+ B(Jump), U8(7),
+ B(PopContext), R(4),
+ B(JumpLoop), U8(93), I8(0),
+ B(LdaUndefined),
+ /* 80 S> */ B(Return),
+]
+constant pool: [
+ FIXED_ARRAY_TYPE,
+ SHARED_FUNCTION_INFO_TYPE,
+]
+handlers: [
+]
+
+---
+snippet: "
+ function f() {
+ for (let { x, y } = { x: 0, y: 3 }; y > 0; --y) { let z = x + y; }
+ }
+ f();
+"
+frame size: 6
+parameter count: 1
+bytecode array length: 68
+bytecodes: [
+ /* 10 E> */ B(StackCheck),
+ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(4),
+ B(Mov), R(4), R(3),
+ B(Ldar), R(3),
+ B(JumpIfUndefined), U8(6),
+ B(Ldar), R(3),
+ B(JumpIfNotNull), U8(16),
+ B(LdaSmi), I8(61),
+ B(Star), R(4),
+ B(LdaConstant), U8(1),
+ B(Star), R(5),
+ B(CallRuntime), U16(Runtime::kNewTypeError), R(4), U8(2),
+ B(Throw),
+ /* 28 S> */ B(LdaNamedProperty), R(3), U8(2), U8(6),
+ B(Star), R(1),
+ /* 31 S> */ B(LdaNamedProperty), R(3), U8(3), U8(8),
+ B(Star), R(2),
+ /* 55 S> */ B(LdaZero),
+ /* 55 E> */ B(TestGreaterThan), R(2), U8(10),
+ B(JumpIfFalse), U8(19),
+ /* 17 E> */ B(StackCheck),
+ /* 77 S> */ B(Ldar), R(2),
+ /* 77 E> */ B(Add), R(1), U8(12),
+ B(Star), R(0),
+ /* 62 S> */ B(Ldar), R(2),
+ B(Dec), U8(11),
+ B(Star), R(2),
+ B(JumpLoop), U8(20), I8(0),
+ B(LdaUndefined),
+ /* 84 S> */ B(Return),
+]
+constant pool: [
+ FIXED_ARRAY_TYPE,
+ ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE ["y"],
+]
+handlers: [
+]
+
+---
+snippet: "
+ function* f() {
+ for (let x = 0; x < 10; ++x) { let y = x; }
+ }
+ f();
+"
+frame size: 11
+parameter count: 1
+bytecode array length: 331
+bytecodes: [
+ B(Ldar), R(new_target),
+ B(JumpIfUndefined), U8(25),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
+ B(PushContext), R(1),
+ B(ResumeGenerator), R(new_target),
+ B(Star), R(0),
+ B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
+ B(LdaSmi), I8(79),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
+ B(LdaSmi), I8(-2),
+ B(Star), R(0),
+ B(CreateFunctionContext), U8(4),
+ B(PushContext), R(2),
+ B(Mov), R(closure), R(3),
+ B(Mov), R(this), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
+ B(StaCurrentContextSlot), U8(4),
+ /* 11 E> */ B(StackCheck),
+ B(Mov), R(context), R(5),
+ B(LdaImmutableCurrentContextSlot), U8(4),
+ B(Star), R(6),
+ B(LdaImmutableCurrentContextSlot), U8(4),
+ B(Star), R(7),
+ B(LdaZero),
+ /* 11 E> */ B(SuspendGenerator), R(6), U8(0),
+ B(Ldar), R(7),
+ /* 62 S> */ B(Return),
+ B(LdaSmi), I8(-2),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(6), U8(1),
+ B(Star), R(7),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(6), U8(1),
+ B(Star), R(8),
+ B(LdaZero),
+ B(TestEqualStrictNoFeedback), R(8),
+ B(JumpIfTrue), U8(28),
+ B(LdaSmi), I8(2),
+ B(TestEqualStrictNoFeedback), R(8),
+ B(JumpIfTrue), U8(19),
+ B(LdaTrue),
+ B(Star), R(10),
+ B(Mov), R(7), R(9),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(9), U8(2),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
+ B(Jump), U8(192),
+ B(Ldar), R(7),
+ /* 11 E> */ B(Throw),
+ B(Ldar), R(closure),
+ B(CreateBlockContext), U8(1),
+ B(PushContext), R(6),
+ B(LdaTheHole),
+ B(StaCurrentContextSlot), U8(4),
+ /* 31 S> */ B(LdaZero),
+ /* 31 E> */ B(StaCurrentContextSlot), U8(4),
+ B(LdaImmutableCurrentContextSlot), U8(4),
+ /* 60 E> */ B(StaContextSlot), R(6), U8(5), U8(0),
+ B(LdaSmi), I8(1),
+ B(StaContextSlot), R(6), U8(6), U8(0),
+ B(StackCheck),
+ B(Ldar), R(closure),
+ B(CreateBlockContext), U8(2),
+ B(PushContext), R(7),
+ B(LdaTheHole),
+ B(StaCurrentContextSlot), U8(4),
+ B(LdaContextSlot), R(6), U8(5), U8(0),
+ B(StaCurrentContextSlot), U8(4),
+ B(LdaContextSlot), R(6), U8(6), U8(0),
+ B(Star), R(8),
+ B(LdaSmi), I8(1),
+ B(TestEqual), R(8), U8(3),
+ B(JumpIfFalse), U8(9),
+ B(LdaZero),
+ B(StaContextSlot), R(6), U8(6), U8(0),
+ B(Jump), U8(8),
+ /* 44 S> */ B(LdaCurrentContextSlot), U8(4),
+ B(Inc), U8(4),
+ /* 44 E> */ B(StaCurrentContextSlot), U8(4),
+ B(LdaSmi), I8(1),
+ B(StaContextSlot), R(6), U8(7), U8(0),
+ /* 36 S> */ B(LdaCurrentContextSlot), U8(4),
+ B(Star), R(8),
+ B(LdaSmi), I8(10),
+ /* 36 E> */ B(TestLessThan), R(8), U8(5),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(6),
+ B(PopContext), R(7),
+ B(Jump), U8(69),
+ B(LdaContextSlot), R(6), U8(7), U8(0),
+ B(Star), R(8),
+ B(LdaSmi), I8(1),
+ B(TestEqual), R(8), U8(6),
+ B(JumpIfFalse), U8(34),
+ /* 18 E> */ B(StackCheck),
+ B(Ldar), R(closure),
+ B(CreateBlockContext), U8(3),
+ B(PushContext), R(8),
+ B(LdaTheHole),
+ B(StaCurrentContextSlot), U8(4),
+ /* 57 S> */ B(LdaContextSlot), R(8), U8(4), U8(0),
+ /* 57 E> */ B(StaCurrentContextSlot), U8(4),
+ B(PopContext), R(8),
+ B(LdaZero),
+ B(StaContextSlot), R(6), U8(7), U8(0),
+ B(LdaCurrentContextSlot), U8(4),
+ /* 60 E> */ B(StaContextSlot), R(6), U8(5), U8(0),
+ B(JumpLoop), U8(42), I8(1),
+ B(LdaContextSlot), R(6), U8(7), U8(0),
+ B(Star), R(8),
+ B(LdaSmi), I8(1),
+ B(TestEqual), R(8), U8(7),
+ B(JumpIfFalse), U8(6),
+ B(PopContext), R(7),
+ B(Jump), U8(7),
+ B(PopContext), R(7),
+ B(JumpLoop), U8(129), I8(0),
+ B(PopContext), R(6),
+ B(LdaUndefined),
+ B(Star), R(6),
+ B(LdaTrue),
+ B(Star), R(7),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
+ B(Jump), U8(14),
+ B(LdaSmi), I8(-1),
+ B(Star), R(3),
+ B(Jump), U8(8),
+ B(Star), R(4),
+ B(LdaSmi), I8(1),
+ B(Star), R(3),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Star), R(5),
+ B(LdaImmutableCurrentContextSlot), U8(4),
+ B(Star), R(6),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(6), U8(1),
+ B(Ldar), R(5),
+ B(SetPendingMessage),
+ B(Ldar), R(3),
+ B(SwitchOnSmiNoFeedback), U8(4), U8(2), I8(0),
+ B(Jump), U8(8),
+ B(Ldar), R(4),
+ /* 62 S> */ B(Return),
+ B(Ldar), R(4),
+ B(ReThrow),
+ B(LdaUndefined),
+ /* 62 S> */ B(Return),
+]
+constant pool: [
+ Smi [52],
+ FIXED_ARRAY_TYPE,
+ FIXED_ARRAY_TYPE,
+ FIXED_ARRAY_TYPE,
+ Smi [6],
+ Smi [9],
+]
+handlers: [
+ [51, 288, 294],
+]
+
+---
+snippet: "
+ function* f() {
+ for (let x = 0; x < 10; ++x) yield x;
+ }
+ f();
+"
+frame size: 13
+parameter count: 1
+bytecode array length: 438
+bytecodes: [
+ B(Ldar), R(new_target),
+ B(JumpIfUndefined), U8(25),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
+ B(PushContext), R(1),
+ B(ResumeGenerator), R(new_target),
+ B(Star), R(0),
+ B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0),
+ B(LdaSmi), I8(79),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
+ B(LdaSmi), I8(-2),
+ B(Star), R(0),
+ B(CreateFunctionContext), U8(4),
+ B(PushContext), R(2),
+ B(Mov), R(closure), R(3),
+ B(Mov), R(this), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
+ B(StaCurrentContextSlot), U8(4),
+ /* 11 E> */ B(StackCheck),
+ B(Mov), R(context), R(5),
+ B(LdaImmutableCurrentContextSlot), U8(4),
+ B(Star), R(6),
+ B(LdaImmutableCurrentContextSlot), U8(4),
+ B(Star), R(7),
+ B(LdaZero),
+ /* 11 E> */ B(SuspendGenerator), R(6), U8(0),
+ B(Ldar), R(7),
+ /* 56 S> */ B(Return),
+ B(LdaSmi), I8(-2),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(6), U8(1),
+ B(Star), R(7),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(6), U8(1),
+ B(Star), R(8),
+ B(LdaZero),
+ B(TestEqualStrictNoFeedback), R(8),
+ B(JumpIfTrue), U8(28),
+ B(LdaSmi), I8(2),
+ B(TestEqualStrictNoFeedback), R(8),
+ B(JumpIfTrue), U8(19),
+ B(LdaTrue),
+ B(Star), R(10),
+ B(Mov), R(7), R(9),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(9), U8(2),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
+ B(JumpConstant), U8(6),
+ B(Ldar), R(7),
+ /* 11 E> */ B(Throw),
+ B(Ldar), R(closure),
+ B(CreateBlockContext), U8(2),
+ B(PushContext), R(6),
+ B(LdaTheHole),
+ B(StaCurrentContextSlot), U8(4),
+ /* 31 S> */ B(LdaZero),
+ /* 31 E> */ B(StaCurrentContextSlot), U8(4),
+ B(LdaImmutableCurrentContextSlot), U8(4),
+ /* 54 E> */ B(StaContextSlot), R(6), U8(5), U8(0),
+ B(LdaSmi), I8(1),
+ B(StaContextSlot), R(6), U8(6), U8(0),
+ B(Ldar), R(0),
+ B(SwitchOnSmiNoFeedback), U8(3), U8(1), I8(1),
+ B(LdaSmi), I8(-2),
+ B(TestEqualStrictNoFeedback), R(0),
+ B(JumpIfTrue), U8(11),
+ B(LdaSmi), I8(79),
+ B(Star), R(7),
+ B(CallRuntime), U16(Runtime::kAbort), R(7), U8(1),
+ B(StackCheck),
+ B(Ldar), R(closure),
+ B(CreateBlockContext), U8(4),
+ B(PushContext), R(7),
+ B(LdaTheHole),
+ B(StaCurrentContextSlot), U8(4),
+ B(LdaContextSlot), R(6), U8(5), U8(0),
+ B(StaCurrentContextSlot), U8(4),
+ B(LdaContextSlot), R(6), U8(6), U8(0),
+ B(Star), R(8),
+ B(LdaSmi), I8(1),
+ B(TestEqual), R(8), U8(3),
+ B(JumpIfFalse), U8(9),
+ B(LdaZero),
+ B(StaContextSlot), R(6), U8(6), U8(0),
+ B(Jump), U8(8),
+ /* 44 S> */ B(LdaCurrentContextSlot), U8(4),
+ B(Inc), U8(4),
+ /* 44 E> */ B(StaCurrentContextSlot), U8(4),
+ B(LdaSmi), I8(1),
+ B(StaContextSlot), R(6), U8(7), U8(0),
+ /* 36 S> */ B(LdaCurrentContextSlot), U8(4),
+ B(Star), R(8),
+ B(LdaSmi), I8(10),
+ /* 36 E> */ B(TestLessThan), R(8), U8(5),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(6),
+ B(PopContext), R(7),
+ B(Jump), U8(155),
+ B(Ldar), R(0),
+ B(SwitchOnSmiNoFeedback), U8(5), U8(1), I8(1),
+ B(LdaSmi), I8(-2),
+ B(TestEqualStrictNoFeedback), R(0),
+ B(JumpIfTrue), U8(11),
+ B(LdaSmi), I8(79),
+ B(Star), R(8),
+ B(CallRuntime), U16(Runtime::kAbort), R(8), U8(1),
+ B(LdaContextSlot), R(6), U8(7), U8(0),
+ B(Star), R(8),
+ B(LdaSmi), I8(1),
+ B(TestEqual), R(8), U8(6),
+ B(JumpIfFalse), U8(99),
+ /* 18 E> */ B(StackCheck),
+ /* 47 S> */ B(LdaImmutableContextSlot), R(6), U8(4), U8(0),
+ B(Star), R(8),
+ B(LdaCurrentContextSlot), U8(4),
+ B(Star), R(9),
+ B(LdaFalse),
+ B(Star), R(10),
+ /* 53 E> */ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(9), U8(2),
+ B(Star), R(9),
+ B(LdaSmi), I8(1),
+ B(SuspendGenerator), R(8), U8(0),
+ B(Ldar), R(9),
+ /* 56 S> */ B(Return),
+ B(LdaSmi), I8(-2),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(8), U8(1),
+ B(Star), R(9),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(8), U8(1),
+ B(Star), R(10),
+ B(LdaZero),
+ B(TestEqualStrictNoFeedback), R(10),
+ B(JumpIfTrue), U8(36),
+ B(LdaSmi), I8(2),
+ B(TestEqualStrictNoFeedback), R(10),
+ B(JumpIfTrue), U8(27),
+ B(LdaTrue),
+ B(Star), R(12),
+ B(Mov), R(9), R(11),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(11), U8(2),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(PopContext), R(6),
+ B(PopContext), R(6),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
+ B(Jump), U8(72),
+ B(Ldar), R(9),
+ /* 47 E> */ B(Throw),
+ B(LdaZero),
+ B(StaContextSlot), R(6), U8(7), U8(0),
+ B(LdaCurrentContextSlot), U8(4),
+ /* 54 E> */ B(StaContextSlot), R(6), U8(5), U8(0),
+ B(JumpLoop), U8(128), I8(1),
+ B(LdaContextSlot), R(6), U8(7), U8(0),
+ B(Star), R(8),
+ B(LdaSmi), I8(1),
+ B(TestEqual), R(8), U8(7),
+ B(JumpIfFalse), U8(6),
+ B(PopContext), R(7),
+ B(Jump), U8(7),
+ B(PopContext), R(7),
+ B(JumpLoop), U8(236), I8(0),
+ B(PopContext), R(6),
+ B(LdaUndefined),
+ B(Star), R(6),
+ B(LdaTrue),
+ B(Star), R(7),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
+ B(Jump), U8(14),
+ B(LdaSmi), I8(-1),
+ B(Star), R(3),
+ B(Jump), U8(8),
+ B(Star), R(4),
+ B(LdaSmi), I8(1),
+ B(Star), R(3),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Star), R(5),
+ B(LdaImmutableCurrentContextSlot), U8(4),
+ B(Star), R(6),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(6), U8(1),
+ B(Ldar), R(5),
+ B(SetPendingMessage),
+ B(Ldar), R(3),
+ B(SwitchOnSmiNoFeedback), U8(7), U8(2), I8(0),
+ B(Jump), U8(8),
+ B(Ldar), R(4),
+ /* 56 S> */ B(Return),
+ B(Ldar), R(4),
+ B(ReThrow),
+ B(LdaUndefined),
+ /* 56 S> */ B(Return),
+]
+constant pool: [
+ Smi [52],
+ Smi [123],
+ FIXED_ARRAY_TYPE,
+ Smi [84],
+ FIXED_ARRAY_TYPE,
+ Smi [60],
+ Smi [299],
+ Smi [6],
+ Smi [9],
+]
+handlers: [
+ [51, 395, 401],
+]
+
+---
+snippet: "
+ async function f() {
+ for (let x = 0; x < 10; ++x) { let y = x; }
+ }
+ f();
+"
+frame size: 10
+parameter count: 1
+bytecode array length: 300
+bytecodes: [
+ B(CreateFunctionContext), U8(5),
+ B(PushContext), R(0),
+ /* 16 E> */ B(StackCheck),
+ B(LdaUndefined),
+ B(Star), R(1),
+ B(CallJSRuntime), U8(%async_function_promise_create), R(1), U8(1),
+ B(StaCurrentContextSlot), U8(8),
+ B(Mov), R(context), R(3),
+ B(Mov), R(context), R(4),
+ B(Ldar), R(closure),
+ B(CreateBlockContext), U8(0),
+ B(PushContext), R(5),
+ B(LdaTheHole),
+ B(StaCurrentContextSlot), U8(4),
+ /* 36 S> */ B(LdaZero),
+ /* 36 E> */ B(StaCurrentContextSlot), U8(4),
+ B(LdaImmutableCurrentContextSlot), U8(4),
+ /* 65 E> */ B(StaContextSlot), R(5), U8(5), U8(0),
+ B(LdaSmi), I8(1),
+ B(StaContextSlot), R(5), U8(6), U8(0),
+ B(StackCheck),
+ B(Ldar), R(closure),
+ B(CreateBlockContext), U8(1),
+ B(PushContext), R(6),
+ B(LdaTheHole),
+ B(StaCurrentContextSlot), U8(4),
+ B(LdaContextSlot), R(5), U8(5), U8(0),
+ B(StaCurrentContextSlot), U8(4),
+ B(LdaContextSlot), R(5), U8(6), U8(0),
+ B(Star), R(7),
+ B(LdaSmi), I8(1),
+ B(TestEqual), R(7), U8(3),
+ B(JumpIfFalse), U8(9),
+ B(LdaZero),
+ B(StaContextSlot), R(5), U8(6), U8(0),
+ B(Jump), U8(8),
+ /* 49 S> */ B(LdaCurrentContextSlot), U8(4),
+ B(Inc), U8(4),
+ /* 49 E> */ B(StaCurrentContextSlot), U8(4),
+ B(LdaSmi), I8(1),
+ B(StaContextSlot), R(5), U8(7), U8(0),
+ /* 41 S> */ B(LdaCurrentContextSlot), U8(4),
+ B(Star), R(7),
+ B(LdaSmi), I8(10),
+ /* 41 E> */ B(TestLessThan), R(7), U8(5),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(6),
+ B(PopContext), R(6),
+ B(Jump), U8(69),
+ B(LdaContextSlot), R(5), U8(7), U8(0),
+ B(Star), R(7),
+ B(LdaSmi), I8(1),
+ B(TestEqual), R(7), U8(6),
+ B(JumpIfFalse), U8(34),
+ /* 23 E> */ B(StackCheck),
+ B(Ldar), R(closure),
+ B(CreateBlockContext), U8(2),
+ B(PushContext), R(7),
+ B(LdaTheHole),
+ B(StaCurrentContextSlot), U8(4),
+ /* 62 S> */ B(LdaContextSlot), R(7), U8(4), U8(0),
+ /* 62 E> */ B(StaCurrentContextSlot), U8(4),
+ B(PopContext), R(7),
+ B(LdaZero),
+ B(StaContextSlot), R(5), U8(7), U8(0),
+ B(LdaCurrentContextSlot), U8(4),
+ /* 65 E> */ B(StaContextSlot), R(5), U8(5), U8(0),
+ B(JumpLoop), U8(42), I8(1),
+ B(LdaContextSlot), R(5), U8(7), U8(0),
+ B(Star), R(7),
+ B(LdaSmi), I8(1),
+ B(TestEqual), R(7), U8(7),
+ B(JumpIfFalse), U8(6),
+ B(PopContext), R(6),
+ B(Jump), U8(7),
+ B(PopContext), R(6),
+ B(JumpLoop), U8(129), I8(0),
+ B(PopContext), R(5),
+ B(LdaUndefined),
+ B(Star), R(5),
+ B(LdaCurrentContextSlot), U8(8),
+ B(Star), R(6),
+ B(LdaUndefined),
+ B(Star), R(7),
+ B(CallJSRuntime), U8(%promise_resolve), R(5), U8(3),
+ B(LdaCurrentContextSlot), U8(8),
+ B(Star), R(2),
+ B(LdaZero),
+ B(Star), R(1),
+ B(Jump), U8(67),
+ B(Jump), U8(53),
+ B(Star), R(5),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(5), U8(3), U8(4),
+ B(Star), R(4),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Ldar), R(4),
+ B(PushContext), R(5),
+ B(LdaUndefined),
+ B(Star), R(6),
+ B(LdaContextSlot), R(5), U8(8), U8(0),
+ B(Star), R(7),
+ B(LdaImmutableCurrentContextSlot), U8(4),
+ B(Star), R(8),
+ B(LdaFalse),
+ B(Star), R(9),
+ B(CallJSRuntime), U8(%promise_internal_reject), R(6), U8(4),
+ B(LdaContextSlot), R(5), U8(8), U8(0),
+ B(PopContext), R(5),
+ B(PopContext), R(5),
+ B(Star), R(2),
+ B(LdaZero),
+ B(Star), R(1),
+ B(Jump), U8(14),
+ B(LdaSmi), I8(-1),
+ B(Star), R(1),
+ B(Jump), U8(8),
+ B(Star), R(2),
+ B(LdaSmi), I8(1),
+ B(Star), R(1),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Star), R(3),
+ B(LdaUndefined),
+ B(Star), R(4),
+ B(LdaCurrentContextSlot), U8(8),
+ B(Star), R(5),
+ B(CallJSRuntime), U8(%async_function_promise_release), R(4), U8(2),
+ B(Ldar), R(3),
+ B(SetPendingMessage),
+ B(Ldar), R(1),
+ B(SwitchOnSmiNoFeedback), U8(5), U8(2), I8(0),
+ B(Jump), U8(8),
+ B(Ldar), R(2),
+ /* 67 S> */ B(Return),
+ B(Ldar), R(2),
+ B(ReThrow),
+ B(LdaUndefined),
+ /* 67 S> */ B(Return),
+]
+constant pool: [
+ FIXED_ARRAY_TYPE,
+ FIXED_ARRAY_TYPE,
+ FIXED_ARRAY_TYPE,
+ ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
+ FIXED_ARRAY_TYPE,
+ Smi [6],
+ Smi [9],
+]
+handlers: [
+ [17, 254, 260],
+ [20, 201, 203],
+]
+
+---
+snippet: "
+ async function f() {
+ for (let x = 0; x < 10; ++x) await x;
+ }
+ f();
+"
+frame size: 14
+parameter count: 1
+bytecode array length: 480
+bytecodes: [
+ B(Ldar), R(new_target),
+ B(JumpIfUndefined), U8(25),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(new_target), U8(1),
+ B(PushContext), R(1),
+ B(ResumeGenerator), R(new_target),
+ B(Star), R(0),
+ B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
+ B(LdaSmi), I8(79),
+ B(Star), R(2),
+ B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
+ B(LdaSmi), I8(-2),
+ B(Star), R(0),
+ B(CreateFunctionContext), U8(6),
+ B(PushContext), R(2),
+ B(Mov), R(closure), R(3),
+ B(Mov), R(this), R(4),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
+ B(StaCurrentContextSlot), U8(4),
+ /* 16 E> */ B(StackCheck),
+ B(LdaUndefined),
+ B(Star), R(3),
+ B(CallJSRuntime), U8(%async_function_promise_create), R(3), U8(1),
+ B(StaCurrentContextSlot), U8(6),
+ B(Mov), R(context), R(5),
+ B(Mov), R(context), R(6),
+ B(Ldar), R(closure),
+ B(CreateBlockContext), U8(1),
+ B(PushContext), R(7),
+ B(LdaTheHole),
+ B(StaCurrentContextSlot), U8(4),
+ /* 36 S> */ B(LdaZero),
+ /* 36 E> */ B(StaCurrentContextSlot), U8(4),
+ B(LdaImmutableCurrentContextSlot), U8(4),
+ /* 59 E> */ B(StaContextSlot), R(7), U8(7), U8(0),
+ B(LdaSmi), I8(1),
+ B(StaContextSlot), R(7), U8(8), U8(0),
+ B(Ldar), R(0),
+ B(SwitchOnSmiNoFeedback), U8(2), U8(1), I8(0),
+ B(LdaSmi), I8(-2),
+ B(TestEqualStrictNoFeedback), R(0),
+ B(JumpIfTrue), U8(11),
+ B(LdaSmi), I8(79),
+ B(Star), R(8),
+ B(CallRuntime), U16(Runtime::kAbort), R(8), U8(1),
+ B(StackCheck),
+ B(Ldar), R(closure),
+ B(CreateBlockContext), U8(3),
+ B(PushContext), R(8),
+ B(LdaTheHole),
+ B(StaCurrentContextSlot), U8(4),
+ B(LdaContextSlot), R(7), U8(7), U8(0),
+ B(StaCurrentContextSlot), U8(4),
+ B(LdaContextSlot), R(7), U8(8), U8(0),
+ B(Star), R(9),
+ B(LdaSmi), I8(1),
+ B(TestEqual), R(9), U8(3),
+ B(JumpIfFalse), U8(9),
+ B(LdaZero),
+ B(StaContextSlot), R(7), U8(8), U8(0),
+ B(Jump), U8(8),
+ /* 49 S> */ B(LdaCurrentContextSlot), U8(4),
+ B(Inc), U8(4),
+ /* 49 E> */ B(StaCurrentContextSlot), U8(4),
+ B(LdaSmi), I8(1),
+ B(StaContextSlot), R(7), U8(9), U8(0),
+ /* 41 S> */ B(LdaCurrentContextSlot), U8(4),
+ B(Star), R(9),
+ B(LdaSmi), I8(10),
+ /* 41 E> */ B(TestLessThan), R(9), U8(5),
+ B(JumpIfFalse), U8(4),
+ B(Jump), U8(6),
+ B(PopContext), R(8),
+ B(Jump), U8(185),
+ B(Ldar), R(0),
+ B(SwitchOnSmiNoFeedback), U8(4), U8(1), I8(0),
+ B(LdaSmi), I8(-2),
+ B(TestEqualStrictNoFeedback), R(0),
+ B(JumpIfTrue), U8(11),
+ B(LdaSmi), I8(79),
+ B(Star), R(9),
+ B(CallRuntime), U16(Runtime::kAbort), R(9), U8(1),
+ B(LdaContextSlot), R(7), U8(9), U8(0),
+ B(Star), R(9),
+ B(LdaSmi), I8(1),
+ B(TestEqual), R(9), U8(6),
+ B(JumpIfFalse), U8(126),
+ /* 23 E> */ B(StackCheck),
+ /* 52 S> */ B(LdaImmutableContextSlot), R(7), U8(4), U8(0),
+ B(Star), R(9),
+ /* 58 S> */ B(LdaCurrentContextSlot), U8(4),
+ B(StaContextSlot), R(7), U8(5), U8(0),
+ /* 52 S> */ B(LdaUndefined),
+ B(Star), R(10),
+ B(LdaImmutableContextSlot), R(7), U8(4), U8(0),
+ B(Star), R(11),
+ B(LdaContextSlot), R(7), U8(5), U8(0),
+ B(Star), R(12),
+ B(LdaContextSlot), R(7), U8(6), U8(0),
+ B(Star), R(13),
+ B(CallJSRuntime), U8(%async_function_await_uncaught), R(10), U8(4),
+ B(LdaContextSlot), R(7), U8(6), U8(0),
+ B(Star), R(10),
+ B(LdaZero),
+ B(SuspendGenerator), R(9), U8(2),
+ B(Ldar), R(10),
+ /* 61 S> */ B(Return),
+ B(LdaSmi), I8(-2),
+ B(Star), R(0),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(9), U8(1),
+ B(Star), R(10),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(9), U8(1),
+ B(Star), R(11),
+ B(LdaZero),
+ B(TestEqualStrictNoFeedback), R(11),
+ B(JumpIfTrue), U8(40),
+ B(LdaSmi), I8(2),
+ B(TestEqualStrictNoFeedback), R(11),
+ B(JumpIfTrue), U8(31),
+ B(LdaTrue),
+ B(Star), R(13),
+ B(Mov), R(10), R(12),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(12), U8(2),
+ B(PopContext), R(8),
+ B(PopContext), R(8),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
+ B(Jump), U8(134),
+ B(Ldar), R(10),
+ B(ReThrow),
+ B(LdaZero),
+ B(StaContextSlot), R(7), U8(9), U8(0),
+ B(LdaCurrentContextSlot), U8(4),
+ /* 59 E> */ B(StaContextSlot), R(7), U8(7), U8(0),
+ B(JumpLoop), U8(155), I8(1),
+ B(LdaContextSlot), R(7), U8(9), U8(0),
+ B(Star), R(9),
+ B(LdaSmi), I8(1),
+ B(TestEqual), R(9), U8(7),
+ B(JumpIfFalse), U8(6),
+ B(PopContext), R(8),
+ B(Jump), U8(10),
+ B(PopContext), R(8),
+ B(Wide), B(JumpLoop), U16(264), I16(0),
+ B(PopContext), R(7),
+ B(LdaUndefined),
+ B(Star), R(7),
+ B(LdaCurrentContextSlot), U8(6),
+ B(Star), R(8),
+ B(LdaUndefined),
+ B(Star), R(9),
+ B(CallJSRuntime), U8(%promise_resolve), R(7), U8(3),
+ B(LdaCurrentContextSlot), U8(6),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
+ B(Jump), U8(67),
+ B(Jump), U8(53),
+ B(Star), R(7),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(7), U8(5), U8(6),
+ B(Star), R(6),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Ldar), R(6),
+ B(PushContext), R(7),
+ B(LdaUndefined),
+ B(Star), R(8),
+ B(LdaContextSlot), R(7), U8(6), U8(0),
+ B(Star), R(9),
+ B(LdaImmutableCurrentContextSlot), U8(4),
+ B(Star), R(10),
+ B(LdaFalse),
+ B(Star), R(11),
+ B(CallJSRuntime), U8(%promise_internal_reject), R(8), U8(4),
+ B(LdaContextSlot), R(7), U8(6), U8(0),
+ B(PopContext), R(7),
+ B(PopContext), R(7),
+ B(Star), R(4),
+ B(LdaZero),
+ B(Star), R(3),
+ B(Jump), U8(14),
+ B(LdaSmi), I8(-1),
+ B(Star), R(3),
+ B(Jump), U8(8),
+ B(Star), R(4),
+ B(LdaSmi), I8(1),
+ B(Star), R(3),
+ B(LdaTheHole),
+ B(SetPendingMessage),
+ B(Star), R(5),
+ B(LdaUndefined),
+ B(Star), R(6),
+ B(LdaCurrentContextSlot), U8(6),
+ B(Star), R(7),
+ B(CallJSRuntime), U8(%async_function_promise_release), R(6), U8(2),
+ B(Ldar), R(5),
+ B(SetPendingMessage),
+ B(Ldar), R(3),
+ B(SwitchOnSmiNoFeedback), U8(7), U8(2), I8(0),
+ B(Jump), U8(8),
+ B(Ldar), R(4),
+ /* 61 S> */ B(Return),
+ B(Ldar), R(4),
+ B(ReThrow),
+ B(LdaUndefined),
+ /* 61 S> */ B(Return),
+]
+constant pool: [
+ Smi [73],
+ FIXED_ARRAY_TYPE,
+ Smi [84],
+ FIXED_ARRAY_TYPE,
+ Smi [83],
+ ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
+ FIXED_ARRAY_TYPE,
+ Smi [6],
+ Smi [9],
+]
+handlers: [
+ [60, 434, 440],
+ [63, 381, 383],
+]
+
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/StoreGlobal.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/StoreGlobal.golden
index 4e0330ede3..590fe85edf 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/StoreGlobal.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/StoreGlobal.golden
@@ -18,7 +18,7 @@ bytecode array length: 8
bytecodes: [
/* 21 E> */ B(StackCheck),
/* 26 S> */ B(LdaSmi), I8(2),
- /* 28 E> */ B(StaGlobalSloppy), U8(0), U8(2),
+ /* 28 E> */ B(StaGlobalSloppy), U8(0), U8(3),
B(LdaUndefined),
/* 33 S> */ B(Return),
]
@@ -39,7 +39,7 @@ bytecode array length: 8
bytecodes: [
/* 26 E> */ B(StackCheck),
/* 32 S> */ B(Ldar), R(arg0),
- /* 34 E> */ B(StaGlobalSloppy), U8(0), U8(2),
+ /* 34 E> */ B(StaGlobalSloppy), U8(0), U8(3),
B(LdaUndefined),
/* 39 S> */ B(Return),
]
@@ -61,7 +61,7 @@ bytecode array length: 8
bytecodes: [
/* 35 E> */ B(StackCheck),
/* 40 S> */ B(LdaSmi), I8(2),
- /* 42 E> */ B(StaGlobalStrict), U8(0), U8(2),
+ /* 42 E> */ B(StaGlobalStrict), U8(0), U8(3),
B(LdaUndefined),
/* 47 S> */ B(Return),
]
@@ -83,7 +83,7 @@ bytecode array length: 8
bytecodes: [
/* 17 E> */ B(StackCheck),
/* 22 S> */ B(LdaSmi), I8(2),
- /* 24 E> */ B(StaGlobalSloppy), U8(0), U8(2),
+ /* 24 E> */ B(StaGlobalSloppy), U8(0), U8(3),
B(LdaUndefined),
/* 29 S> */ B(Return),
]
@@ -235,263 +235,263 @@ bytecode array length: 655
bytecodes: [
/* 17 E> */ B(StackCheck),
/* 25 S> */ B(Nop),
- /* 26 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(2),
+ /* 26 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(3),
/* 35 S> */ B(Nop),
- /* 36 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(4),
+ /* 36 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(5),
/* 45 S> */ B(Nop),
- /* 46 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(6),
+ /* 46 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(7),
/* 55 S> */ B(Nop),
- /* 56 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(8),
+ /* 56 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(9),
/* 65 S> */ B(Nop),
- /* 66 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(10),
+ /* 66 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(11),
/* 75 S> */ B(Nop),
- /* 76 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(12),
+ /* 76 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(13),
/* 85 S> */ B(Nop),
- /* 86 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(14),
+ /* 86 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(15),
/* 95 S> */ B(Nop),
- /* 96 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(16),
+ /* 96 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(17),
/* 105 S> */ B(Nop),
- /* 106 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(18),
+ /* 106 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(19),
/* 115 S> */ B(Nop),
- /* 116 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(20),
+ /* 116 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(21),
/* 125 S> */ B(Nop),
- /* 126 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(22),
+ /* 126 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(23),
/* 135 S> */ B(Nop),
- /* 136 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(24),
+ /* 136 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(25),
/* 145 S> */ B(Nop),
- /* 146 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(26),
+ /* 146 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(27),
/* 155 S> */ B(Nop),
- /* 156 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(28),
+ /* 156 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(29),
/* 165 S> */ B(Nop),
- /* 166 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(30),
+ /* 166 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(31),
/* 175 S> */ B(Nop),
- /* 176 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(32),
+ /* 176 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(33),
/* 185 S> */ B(Nop),
- /* 186 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(34),
+ /* 186 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(35),
/* 195 S> */ B(Nop),
- /* 196 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(36),
+ /* 196 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(37),
/* 205 S> */ B(Nop),
- /* 206 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(38),
+ /* 206 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(39),
/* 215 S> */ B(Nop),
- /* 216 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(40),
+ /* 216 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(41),
/* 225 S> */ B(Nop),
- /* 226 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(42),
+ /* 226 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(43),
/* 235 S> */ B(Nop),
- /* 236 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(44),
+ /* 236 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(45),
/* 245 S> */ B(Nop),
- /* 246 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(46),
+ /* 246 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(47),
/* 255 S> */ B(Nop),
- /* 256 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(48),
+ /* 256 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(49),
/* 265 S> */ B(Nop),
- /* 266 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(50),
+ /* 266 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(51),
/* 275 S> */ B(Nop),
- /* 276 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(52),
+ /* 276 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(53),
/* 285 S> */ B(Nop),
- /* 286 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(54),
+ /* 286 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(55),
/* 295 S> */ B(Nop),
- /* 296 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(56),
+ /* 296 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(57),
/* 305 S> */ B(Nop),
- /* 306 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(58),
+ /* 306 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(59),
/* 315 S> */ B(Nop),
- /* 316 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(60),
+ /* 316 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(61),
/* 325 S> */ B(Nop),
- /* 326 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(62),
+ /* 326 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(63),
/* 335 S> */ B(Nop),
- /* 336 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(64),
+ /* 336 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(65),
/* 345 S> */ B(Nop),
- /* 346 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(66),
+ /* 346 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(67),
/* 355 S> */ B(Nop),
- /* 356 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(68),
+ /* 356 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(69),
/* 365 S> */ B(Nop),
- /* 366 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(70),
+ /* 366 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(71),
/* 375 S> */ B(Nop),
- /* 376 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(72),
+ /* 376 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(73),
/* 385 S> */ B(Nop),
- /* 386 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(74),
+ /* 386 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(75),
/* 395 S> */ B(Nop),
- /* 396 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(76),
+ /* 396 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(77),
/* 405 S> */ B(Nop),
- /* 406 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(78),
+ /* 406 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(79),
/* 415 S> */ B(Nop),
- /* 416 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(80),
+ /* 416 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(81),
/* 425 S> */ B(Nop),
- /* 426 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(82),
+ /* 426 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(83),
/* 435 S> */ B(Nop),
- /* 436 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(84),
+ /* 436 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(85),
/* 445 S> */ B(Nop),
- /* 446 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(86),
+ /* 446 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(87),
/* 455 S> */ B(Nop),
- /* 456 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(88),
+ /* 456 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(89),
/* 465 S> */ B(Nop),
- /* 466 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(90),
+ /* 466 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(91),
/* 475 S> */ B(Nop),
- /* 476 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(92),
+ /* 476 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(93),
/* 485 S> */ B(Nop),
- /* 486 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(94),
+ /* 486 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(95),
/* 495 S> */ B(Nop),
- /* 496 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(96),
+ /* 496 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(97),
/* 505 S> */ B(Nop),
- /* 506 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(98),
+ /* 506 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(99),
/* 515 S> */ B(Nop),
- /* 516 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(100),
+ /* 516 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(101),
/* 525 S> */ B(Nop),
- /* 526 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(102),
+ /* 526 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(103),
/* 535 S> */ B(Nop),
- /* 536 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(104),
+ /* 536 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(105),
/* 545 S> */ B(Nop),
- /* 546 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(106),
+ /* 546 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(107),
/* 555 S> */ B(Nop),
- /* 556 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(108),
+ /* 556 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(109),
/* 565 S> */ B(Nop),
- /* 566 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(110),
+ /* 566 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(111),
/* 575 S> */ B(Nop),
- /* 576 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(112),
+ /* 576 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(113),
/* 585 S> */ B(Nop),
- /* 586 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(114),
+ /* 586 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(115),
/* 595 S> */ B(Nop),
- /* 596 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(116),
+ /* 596 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(117),
/* 605 S> */ B(Nop),
- /* 606 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(118),
+ /* 606 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(119),
/* 615 S> */ B(Nop),
- /* 616 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(120),
+ /* 616 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(121),
/* 625 S> */ B(Nop),
- /* 626 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(122),
+ /* 626 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(123),
/* 635 S> */ B(Nop),
- /* 636 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(124),
+ /* 636 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(125),
/* 645 S> */ B(Nop),
- /* 646 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(126),
+ /* 646 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(127),
/* 655 S> */ B(Nop),
- /* 656 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(128),
+ /* 656 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(129),
/* 665 S> */ B(Nop),
- /* 666 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(130),
+ /* 666 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(131),
/* 675 S> */ B(Nop),
- /* 676 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(132),
+ /* 676 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(133),
/* 685 S> */ B(Nop),
- /* 686 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(134),
+ /* 686 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(135),
/* 695 S> */ B(Nop),
- /* 696 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(136),
+ /* 696 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(137),
/* 705 S> */ B(Nop),
- /* 706 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(138),
+ /* 706 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(139),
/* 715 S> */ B(Nop),
- /* 716 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(140),
+ /* 716 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(141),
/* 725 S> */ B(Nop),
- /* 726 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(142),
+ /* 726 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(143),
/* 735 S> */ B(Nop),
- /* 736 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(144),
+ /* 736 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(145),
/* 745 S> */ B(Nop),
- /* 746 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(146),
+ /* 746 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(147),
/* 755 S> */ B(Nop),
- /* 756 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(148),
+ /* 756 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(149),
/* 765 S> */ B(Nop),
- /* 766 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(150),
+ /* 766 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(151),
/* 775 S> */ B(Nop),
- /* 776 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(152),
+ /* 776 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(153),
/* 785 S> */ B(Nop),
- /* 786 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(154),
+ /* 786 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(155),
/* 795 S> */ B(Nop),
- /* 796 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(156),
+ /* 796 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(157),
/* 805 S> */ B(Nop),
- /* 806 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(158),
+ /* 806 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(159),
/* 815 S> */ B(Nop),
- /* 816 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(160),
+ /* 816 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(161),
/* 825 S> */ B(Nop),
- /* 826 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(162),
+ /* 826 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(163),
/* 835 S> */ B(Nop),
- /* 836 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(164),
+ /* 836 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(165),
/* 845 S> */ B(Nop),
- /* 846 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(166),
+ /* 846 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(167),
/* 855 S> */ B(Nop),
- /* 856 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(168),
+ /* 856 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(169),
/* 865 S> */ B(Nop),
- /* 866 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(170),
+ /* 866 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(171),
/* 875 S> */ B(Nop),
- /* 876 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(172),
+ /* 876 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(173),
/* 885 S> */ B(Nop),
- /* 886 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(174),
+ /* 886 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(175),
/* 895 S> */ B(Nop),
- /* 896 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(176),
+ /* 896 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(177),
/* 905 S> */ B(Nop),
- /* 906 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(178),
+ /* 906 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(179),
/* 915 S> */ B(Nop),
- /* 916 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(180),
+ /* 916 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(181),
/* 925 S> */ B(Nop),
- /* 926 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(182),
+ /* 926 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(183),
/* 935 S> */ B(Nop),
- /* 936 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(184),
+ /* 936 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(185),
/* 945 S> */ B(Nop),
- /* 946 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(186),
+ /* 946 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(187),
/* 955 S> */ B(Nop),
- /* 956 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(188),
+ /* 956 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(189),
/* 965 S> */ B(Nop),
- /* 966 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(190),
+ /* 966 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(191),
/* 975 S> */ B(Nop),
- /* 976 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(192),
+ /* 976 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(193),
/* 985 S> */ B(Nop),
- /* 986 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(194),
+ /* 986 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(195),
/* 995 S> */ B(Nop),
- /* 996 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(196),
+ /* 996 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(197),
/* 1005 S> */ B(Nop),
- /* 1006 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(198),
+ /* 1006 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(199),
/* 1015 S> */ B(Nop),
- /* 1016 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(200),
+ /* 1016 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(201),
/* 1025 S> */ B(Nop),
- /* 1026 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(202),
+ /* 1026 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(203),
/* 1035 S> */ B(Nop),
- /* 1036 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(204),
+ /* 1036 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(205),
/* 1045 S> */ B(Nop),
- /* 1046 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(206),
+ /* 1046 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(207),
/* 1055 S> */ B(Nop),
- /* 1056 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(208),
+ /* 1056 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(209),
/* 1065 S> */ B(Nop),
- /* 1066 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(210),
+ /* 1066 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(211),
/* 1075 S> */ B(Nop),
- /* 1076 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(212),
+ /* 1076 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(213),
/* 1085 S> */ B(Nop),
- /* 1086 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(214),
+ /* 1086 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(215),
/* 1095 S> */ B(Nop),
- /* 1096 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(216),
+ /* 1096 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(217),
/* 1105 S> */ B(Nop),
- /* 1106 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(218),
+ /* 1106 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(219),
/* 1115 S> */ B(Nop),
- /* 1116 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(220),
+ /* 1116 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(221),
/* 1125 S> */ B(Nop),
- /* 1126 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(222),
+ /* 1126 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(223),
/* 1135 S> */ B(Nop),
- /* 1136 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(224),
+ /* 1136 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(225),
/* 1145 S> */ B(Nop),
- /* 1146 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(226),
+ /* 1146 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(227),
/* 1155 S> */ B(Nop),
- /* 1156 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(228),
+ /* 1156 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(229),
/* 1165 S> */ B(Nop),
- /* 1166 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(230),
+ /* 1166 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(231),
/* 1175 S> */ B(Nop),
- /* 1176 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(232),
+ /* 1176 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(233),
/* 1185 S> */ B(Nop),
- /* 1186 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(234),
+ /* 1186 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(235),
/* 1195 S> */ B(Nop),
- /* 1196 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(236),
+ /* 1196 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(237),
/* 1205 S> */ B(Nop),
- /* 1206 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(238),
+ /* 1206 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(239),
/* 1215 S> */ B(Nop),
- /* 1216 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(240),
+ /* 1216 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(241),
/* 1225 S> */ B(Nop),
- /* 1226 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(242),
+ /* 1226 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(243),
/* 1235 S> */ B(Nop),
- /* 1236 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(244),
+ /* 1236 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(245),
/* 1245 S> */ B(Nop),
- /* 1246 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(246),
+ /* 1246 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(247),
/* 1255 S> */ B(Nop),
- /* 1256 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(248),
+ /* 1256 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(249),
/* 1265 S> */ B(Nop),
- /* 1266 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(250),
+ /* 1266 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(251),
/* 1275 S> */ B(Nop),
- /* 1276 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(252),
+ /* 1276 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(253),
/* 1285 S> */ B(Nop),
- /* 1286 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(254),
+ /* 1286 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(255),
/* 1295 S> */ B(Nop),
- /* 1296 E> */ B(Wide), B(LdaNamedProperty), R16(arg0), U16(0), U16(256),
+ /* 1296 E> */ B(Wide), B(LdaNamedProperty), R16(arg0), U16(0), U16(257),
/* 1305 S> */ B(LdaSmi), I8(2),
- /* 1307 E> */ B(Wide), B(StaGlobalSloppy), U16(1), U16(258),
+ /* 1307 E> */ B(Wide), B(StaGlobalSloppy), U16(1), U16(259),
B(LdaUndefined),
/* 1312 S> */ B(Return),
]
@@ -645,263 +645,263 @@ bytecode array length: 655
bytecodes: [
/* 17 E> */ B(StackCheck),
/* 41 S> */ B(Nop),
- /* 42 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(2),
+ /* 42 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(3),
/* 51 S> */ B(Nop),
- /* 52 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(4),
+ /* 52 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(5),
/* 61 S> */ B(Nop),
- /* 62 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(6),
+ /* 62 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(7),
/* 71 S> */ B(Nop),
- /* 72 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(8),
+ /* 72 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(9),
/* 81 S> */ B(Nop),
- /* 82 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(10),
+ /* 82 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(11),
/* 91 S> */ B(Nop),
- /* 92 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(12),
+ /* 92 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(13),
/* 101 S> */ B(Nop),
- /* 102 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(14),
+ /* 102 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(15),
/* 111 S> */ B(Nop),
- /* 112 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(16),
+ /* 112 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(17),
/* 121 S> */ B(Nop),
- /* 122 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(18),
+ /* 122 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(19),
/* 131 S> */ B(Nop),
- /* 132 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(20),
+ /* 132 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(21),
/* 141 S> */ B(Nop),
- /* 142 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(22),
+ /* 142 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(23),
/* 151 S> */ B(Nop),
- /* 152 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(24),
+ /* 152 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(25),
/* 161 S> */ B(Nop),
- /* 162 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(26),
+ /* 162 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(27),
/* 171 S> */ B(Nop),
- /* 172 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(28),
+ /* 172 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(29),
/* 181 S> */ B(Nop),
- /* 182 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(30),
+ /* 182 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(31),
/* 191 S> */ B(Nop),
- /* 192 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(32),
+ /* 192 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(33),
/* 201 S> */ B(Nop),
- /* 202 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(34),
+ /* 202 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(35),
/* 211 S> */ B(Nop),
- /* 212 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(36),
+ /* 212 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(37),
/* 221 S> */ B(Nop),
- /* 222 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(38),
+ /* 222 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(39),
/* 231 S> */ B(Nop),
- /* 232 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(40),
+ /* 232 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(41),
/* 241 S> */ B(Nop),
- /* 242 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(42),
+ /* 242 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(43),
/* 251 S> */ B(Nop),
- /* 252 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(44),
+ /* 252 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(45),
/* 261 S> */ B(Nop),
- /* 262 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(46),
+ /* 262 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(47),
/* 271 S> */ B(Nop),
- /* 272 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(48),
+ /* 272 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(49),
/* 281 S> */ B(Nop),
- /* 282 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(50),
+ /* 282 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(51),
/* 291 S> */ B(Nop),
- /* 292 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(52),
+ /* 292 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(53),
/* 301 S> */ B(Nop),
- /* 302 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(54),
+ /* 302 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(55),
/* 311 S> */ B(Nop),
- /* 312 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(56),
+ /* 312 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(57),
/* 321 S> */ B(Nop),
- /* 322 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(58),
+ /* 322 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(59),
/* 331 S> */ B(Nop),
- /* 332 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(60),
+ /* 332 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(61),
/* 341 S> */ B(Nop),
- /* 342 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(62),
+ /* 342 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(63),
/* 351 S> */ B(Nop),
- /* 352 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(64),
+ /* 352 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(65),
/* 361 S> */ B(Nop),
- /* 362 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(66),
+ /* 362 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(67),
/* 371 S> */ B(Nop),
- /* 372 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(68),
+ /* 372 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(69),
/* 381 S> */ B(Nop),
- /* 382 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(70),
+ /* 382 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(71),
/* 391 S> */ B(Nop),
- /* 392 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(72),
+ /* 392 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(73),
/* 401 S> */ B(Nop),
- /* 402 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(74),
+ /* 402 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(75),
/* 411 S> */ B(Nop),
- /* 412 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(76),
+ /* 412 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(77),
/* 421 S> */ B(Nop),
- /* 422 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(78),
+ /* 422 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(79),
/* 431 S> */ B(Nop),
- /* 432 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(80),
+ /* 432 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(81),
/* 441 S> */ B(Nop),
- /* 442 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(82),
+ /* 442 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(83),
/* 451 S> */ B(Nop),
- /* 452 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(84),
+ /* 452 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(85),
/* 461 S> */ B(Nop),
- /* 462 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(86),
+ /* 462 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(87),
/* 471 S> */ B(Nop),
- /* 472 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(88),
+ /* 472 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(89),
/* 481 S> */ B(Nop),
- /* 482 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(90),
+ /* 482 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(91),
/* 491 S> */ B(Nop),
- /* 492 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(92),
+ /* 492 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(93),
/* 501 S> */ B(Nop),
- /* 502 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(94),
+ /* 502 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(95),
/* 511 S> */ B(Nop),
- /* 512 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(96),
+ /* 512 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(97),
/* 521 S> */ B(Nop),
- /* 522 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(98),
+ /* 522 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(99),
/* 531 S> */ B(Nop),
- /* 532 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(100),
+ /* 532 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(101),
/* 541 S> */ B(Nop),
- /* 542 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(102),
+ /* 542 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(103),
/* 551 S> */ B(Nop),
- /* 552 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(104),
+ /* 552 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(105),
/* 561 S> */ B(Nop),
- /* 562 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(106),
+ /* 562 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(107),
/* 571 S> */ B(Nop),
- /* 572 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(108),
+ /* 572 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(109),
/* 581 S> */ B(Nop),
- /* 582 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(110),
+ /* 582 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(111),
/* 591 S> */ B(Nop),
- /* 592 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(112),
+ /* 592 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(113),
/* 601 S> */ B(Nop),
- /* 602 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(114),
+ /* 602 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(115),
/* 611 S> */ B(Nop),
- /* 612 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(116),
+ /* 612 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(117),
/* 621 S> */ B(Nop),
- /* 622 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(118),
+ /* 622 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(119),
/* 631 S> */ B(Nop),
- /* 632 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(120),
+ /* 632 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(121),
/* 641 S> */ B(Nop),
- /* 642 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(122),
+ /* 642 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(123),
/* 651 S> */ B(Nop),
- /* 652 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(124),
+ /* 652 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(125),
/* 661 S> */ B(Nop),
- /* 662 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(126),
+ /* 662 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(127),
/* 671 S> */ B(Nop),
- /* 672 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(128),
+ /* 672 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(129),
/* 681 S> */ B(Nop),
- /* 682 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(130),
+ /* 682 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(131),
/* 691 S> */ B(Nop),
- /* 692 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(132),
+ /* 692 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(133),
/* 701 S> */ B(Nop),
- /* 702 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(134),
+ /* 702 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(135),
/* 711 S> */ B(Nop),
- /* 712 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(136),
+ /* 712 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(137),
/* 721 S> */ B(Nop),
- /* 722 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(138),
+ /* 722 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(139),
/* 731 S> */ B(Nop),
- /* 732 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(140),
+ /* 732 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(141),
/* 741 S> */ B(Nop),
- /* 742 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(142),
+ /* 742 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(143),
/* 751 S> */ B(Nop),
- /* 752 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(144),
+ /* 752 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(145),
/* 761 S> */ B(Nop),
- /* 762 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(146),
+ /* 762 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(147),
/* 771 S> */ B(Nop),
- /* 772 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(148),
+ /* 772 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(149),
/* 781 S> */ B(Nop),
- /* 782 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(150),
+ /* 782 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(151),
/* 791 S> */ B(Nop),
- /* 792 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(152),
+ /* 792 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(153),
/* 801 S> */ B(Nop),
- /* 802 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(154),
+ /* 802 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(155),
/* 811 S> */ B(Nop),
- /* 812 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(156),
+ /* 812 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(157),
/* 821 S> */ B(Nop),
- /* 822 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(158),
+ /* 822 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(159),
/* 831 S> */ B(Nop),
- /* 832 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(160),
+ /* 832 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(161),
/* 841 S> */ B(Nop),
- /* 842 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(162),
+ /* 842 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(163),
/* 851 S> */ B(Nop),
- /* 852 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(164),
+ /* 852 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(165),
/* 861 S> */ B(Nop),
- /* 862 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(166),
+ /* 862 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(167),
/* 871 S> */ B(Nop),
- /* 872 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(168),
+ /* 872 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(169),
/* 881 S> */ B(Nop),
- /* 882 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(170),
+ /* 882 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(171),
/* 891 S> */ B(Nop),
- /* 892 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(172),
+ /* 892 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(173),
/* 901 S> */ B(Nop),
- /* 902 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(174),
+ /* 902 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(175),
/* 911 S> */ B(Nop),
- /* 912 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(176),
+ /* 912 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(177),
/* 921 S> */ B(Nop),
- /* 922 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(178),
+ /* 922 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(179),
/* 931 S> */ B(Nop),
- /* 932 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(180),
+ /* 932 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(181),
/* 941 S> */ B(Nop),
- /* 942 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(182),
+ /* 942 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(183),
/* 951 S> */ B(Nop),
- /* 952 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(184),
+ /* 952 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(185),
/* 961 S> */ B(Nop),
- /* 962 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(186),
+ /* 962 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(187),
/* 971 S> */ B(Nop),
- /* 972 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(188),
+ /* 972 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(189),
/* 981 S> */ B(Nop),
- /* 982 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(190),
+ /* 982 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(191),
/* 991 S> */ B(Nop),
- /* 992 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(192),
+ /* 992 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(193),
/* 1001 S> */ B(Nop),
- /* 1002 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(194),
+ /* 1002 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(195),
/* 1011 S> */ B(Nop),
- /* 1012 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(196),
+ /* 1012 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(197),
/* 1021 S> */ B(Nop),
- /* 1022 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(198),
+ /* 1022 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(199),
/* 1031 S> */ B(Nop),
- /* 1032 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(200),
+ /* 1032 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(201),
/* 1041 S> */ B(Nop),
- /* 1042 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(202),
+ /* 1042 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(203),
/* 1051 S> */ B(Nop),
- /* 1052 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(204),
+ /* 1052 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(205),
/* 1061 S> */ B(Nop),
- /* 1062 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(206),
+ /* 1062 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(207),
/* 1071 S> */ B(Nop),
- /* 1072 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(208),
+ /* 1072 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(209),
/* 1081 S> */ B(Nop),
- /* 1082 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(210),
+ /* 1082 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(211),
/* 1091 S> */ B(Nop),
- /* 1092 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(212),
+ /* 1092 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(213),
/* 1101 S> */ B(Nop),
- /* 1102 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(214),
+ /* 1102 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(215),
/* 1111 S> */ B(Nop),
- /* 1112 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(216),
+ /* 1112 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(217),
/* 1121 S> */ B(Nop),
- /* 1122 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(218),
+ /* 1122 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(219),
/* 1131 S> */ B(Nop),
- /* 1132 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(220),
+ /* 1132 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(221),
/* 1141 S> */ B(Nop),
- /* 1142 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(222),
+ /* 1142 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(223),
/* 1151 S> */ B(Nop),
- /* 1152 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(224),
+ /* 1152 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(225),
/* 1161 S> */ B(Nop),
- /* 1162 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(226),
+ /* 1162 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(227),
/* 1171 S> */ B(Nop),
- /* 1172 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(228),
+ /* 1172 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(229),
/* 1181 S> */ B(Nop),
- /* 1182 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(230),
+ /* 1182 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(231),
/* 1191 S> */ B(Nop),
- /* 1192 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(232),
+ /* 1192 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(233),
/* 1201 S> */ B(Nop),
- /* 1202 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(234),
+ /* 1202 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(235),
/* 1211 S> */ B(Nop),
- /* 1212 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(236),
+ /* 1212 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(237),
/* 1221 S> */ B(Nop),
- /* 1222 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(238),
+ /* 1222 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(239),
/* 1231 S> */ B(Nop),
- /* 1232 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(240),
+ /* 1232 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(241),
/* 1241 S> */ B(Nop),
- /* 1242 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(242),
+ /* 1242 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(243),
/* 1251 S> */ B(Nop),
- /* 1252 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(244),
+ /* 1252 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(245),
/* 1261 S> */ B(Nop),
- /* 1262 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(246),
+ /* 1262 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(247),
/* 1271 S> */ B(Nop),
- /* 1272 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(248),
+ /* 1272 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(249),
/* 1281 S> */ B(Nop),
- /* 1282 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(250),
+ /* 1282 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(251),
/* 1291 S> */ B(Nop),
- /* 1292 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(252),
+ /* 1292 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(253),
/* 1301 S> */ B(Nop),
- /* 1302 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(254),
+ /* 1302 E> */ B(LdaNamedProperty), R(arg0), U8(0), U8(255),
/* 1311 S> */ B(Nop),
- /* 1312 E> */ B(Wide), B(LdaNamedProperty), R16(arg0), U16(0), U16(256),
+ /* 1312 E> */ B(Wide), B(LdaNamedProperty), R16(arg0), U16(0), U16(257),
/* 1321 S> */ B(LdaSmi), I8(2),
- /* 1323 E> */ B(Wide), B(StaGlobalStrict), U16(1), U16(258),
+ /* 1323 E> */ B(Wide), B(StaGlobalStrict), U16(1), U16(259),
B(LdaUndefined),
/* 1328 S> */ B(Return),
]
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/SuperCallAndSpread.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/SuperCallAndSpread.golden
index f7e241721a..425bdb1b9c 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/SuperCallAndSpread.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/SuperCallAndSpread.golden
@@ -53,15 +53,13 @@ snippet: "
"
frame size: 7
parameter count: 1
-bytecode array length: 61
+bytecode array length: 58
bytecodes: [
B(CreateRestParameter),
B(Star), R(2),
B(Mov), R(closure), R(1),
B(Mov), R(new_target), R(0),
B(Ldar), R(new_target),
- B(LdaTheHole),
- B(Star), R(3),
/* 128 E> */ B(StackCheck),
B(Mov), R(2), R(3),
/* 140 S> */ B(Ldar), R(1),
@@ -102,15 +100,13 @@ snippet: "
"
frame size: 10
parameter count: 1
-bytecode array length: 94
+bytecode array length: 91
bytecodes: [
B(CreateRestParameter),
B(Star), R(2),
B(Mov), R(closure), R(1),
B(Mov), R(new_target), R(0),
B(Ldar), R(new_target),
- B(LdaTheHole),
- B(Star), R(3),
/* 128 E> */ B(StackCheck),
B(Mov), R(2), R(3),
/* 140 S> */ B(LdaUndefined),
@@ -119,14 +115,14 @@ bytecodes: [
B(Star), R(5),
B(LdaUndefined),
B(Star), R(6),
- B(CreateArrayLiteral), U8(0), U8(2), U8(9),
+ B(CreateArrayLiteral), U8(0), U8(3), U8(17),
B(Star), R(7),
B(LdaUndefined),
B(Star), R(8),
B(Mov), R(2), R(9),
/* 152 E> */ B(CallJSRuntime), U8(%spread_iterable), R(8), U8(2),
B(Star), R(8),
- B(CreateArrayLiteral), U8(1), U8(3), U8(9),
+ B(CreateArrayLiteral), U8(1), U8(4), U8(17),
B(Star), R(9),
B(CallJSRuntime), U8(%spread_arguments), R(6), U8(4),
B(Star), R(6),
@@ -144,8 +140,8 @@ bytecodes: [
/* 162 S> */ B(Return),
]
constant pool: [
- CONSTANT_ELEMENTS_PAIR_TYPE,
- CONSTANT_ELEMENTS_PAIR_TYPE,
+ TUPLE2_TYPE,
+ TUPLE2_TYPE,
]
handlers: [
]
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/Switch.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/Switch.golden
index decd5df726..798ffa0408 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/Switch.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/Switch.golden
@@ -22,11 +22,11 @@ bytecodes: [
B(Star), R(0),
B(Star), R(1),
/* 45 S> */ B(LdaSmi), I8(1),
- B(TestEqualStrict), R(1), U8(2),
+ B(TestEqualStrict), R(1), U8(3),
B(Mov), R(0), R(2),
B(JumpIfTrue), U8(11),
B(LdaSmi), I8(2),
- B(TestEqualStrict), R(2), U8(3),
+ B(TestEqualStrict), R(2), U8(4),
B(JumpIfTrue), U8(7),
B(Jump), U8(8),
/* 66 S> */ B(LdaSmi), I8(2),
@@ -58,11 +58,11 @@ bytecodes: [
B(Star), R(0),
B(Star), R(1),
/* 45 S> */ B(LdaSmi), I8(1),
- B(TestEqualStrict), R(1), U8(2),
+ B(TestEqualStrict), R(1), U8(3),
B(Mov), R(0), R(2),
B(JumpIfTrue), U8(11),
B(LdaSmi), I8(2),
- B(TestEqualStrict), R(2), U8(3),
+ B(TestEqualStrict), R(2), U8(4),
B(JumpIfTrue), U8(10),
B(Jump), U8(14),
/* 66 S> */ B(LdaSmi), I8(2),
@@ -96,11 +96,11 @@ bytecodes: [
B(Star), R(0),
B(Star), R(1),
/* 45 S> */ B(LdaSmi), I8(1),
- B(TestEqualStrict), R(1), U8(2),
+ B(TestEqualStrict), R(1), U8(3),
B(Mov), R(0), R(2),
B(JumpIfTrue), U8(11),
B(LdaSmi), I8(2),
- B(TestEqualStrict), R(2), U8(3),
+ B(TestEqualStrict), R(2), U8(4),
B(JumpIfTrue), U8(8),
B(Jump), U8(12),
/* 66 S> */ B(LdaSmi), I8(2),
@@ -134,11 +134,11 @@ bytecodes: [
B(Star), R(0),
B(Star), R(1),
/* 45 S> */ B(LdaSmi), I8(2),
- B(TestEqualStrict), R(1), U8(2),
+ B(TestEqualStrict), R(1), U8(3),
B(Mov), R(0), R(2),
B(JumpIfTrue), U8(11),
B(LdaSmi), I8(3),
- B(TestEqualStrict), R(2), U8(3),
+ B(TestEqualStrict), R(2), U8(4),
B(JumpIfTrue), U8(6),
B(Jump), U8(6),
/* 66 S> */ B(Jump), U8(10),
@@ -173,11 +173,11 @@ bytecodes: [
/* 42 E> */ B(TypeOf),
B(Star), R(1),
/* 45 S> */ B(LdaSmi), I8(2),
- B(TestEqualStrict), R(1), U8(2),
+ B(TestEqualStrict), R(1), U8(3),
B(Mov), R(1), R(2),
B(JumpIfTrue), U8(11),
B(LdaSmi), I8(3),
- B(TestEqualStrict), R(2), U8(3),
+ B(TestEqualStrict), R(2), U8(4),
B(JumpIfTrue), U8(10),
B(Jump), U8(14),
/* 74 S> */ B(LdaSmi), I8(1),
@@ -214,7 +214,7 @@ bytecodes: [
B(Star), R(0),
B(Star), R(1),
/* 45 S> */ B(TypeOf),
- B(TestEqualStrict), R(1), U8(2),
+ B(TestEqualStrict), R(1), U8(3),
B(Mov), R(0), R(2),
B(JumpIfTrue), U8(4),
B(Jump), U8(8),
@@ -316,11 +316,11 @@ bytecodes: [
B(Star), R(0),
B(Star), R(1),
/* 45 S> */ B(LdaSmi), I8(1),
- B(TestEqualStrict), R(1), U8(2),
+ B(TestEqualStrict), R(1), U8(3),
B(Mov), R(0), R(2),
B(JumpIfTrue), U8(11),
B(LdaSmi), I8(2),
- B(TestEqualStrict), R(2), U8(3),
+ B(TestEqualStrict), R(2), U8(4),
B(JumpIfTrueConstant), U8(0),
B(JumpConstant), U8(1),
/* 68 S> */ B(LdaSmi), I8(2),
@@ -486,18 +486,18 @@ bytecodes: [
B(Star), R(0),
B(Star), R(2),
/* 45 S> */ B(LdaSmi), I8(1),
- B(TestEqualStrict), R(2), U8(5),
+ B(TestEqualStrict), R(2), U8(6),
B(Mov), R(0), R(3),
B(JumpIfTrue), U8(11),
B(LdaSmi), I8(2),
- B(TestEqualStrict), R(3), U8(6),
+ B(TestEqualStrict), R(3), U8(7),
B(JumpIfTrue), U8(35),
B(Jump), U8(37),
B(Ldar), R(0),
- /* 79 E> */ B(AddSmi), I8(1), U8(2),
+ /* 79 E> */ B(AddSmi), I8(1), U8(3),
B(Star), R(1),
/* 70 S> */ B(LdaSmi), I8(2),
- B(TestEqualStrict), R(1), U8(3),
+ B(TestEqualStrict), R(1), U8(4),
B(Mov), R(1), R(4),
B(JumpIfTrue), U8(4),
B(Jump), U8(8),
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/TopLevelObjectLiterals.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/TopLevelObjectLiterals.golden
index 275bdf5491..21dd67c139 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/TopLevelObjectLiterals.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/TopLevelObjectLiterals.golden
@@ -24,10 +24,10 @@ bytecodes: [
/* 8 S> */ B(LdaConstant), U8(1),
B(Star), R(1),
B(LdaZero),
- B(CreateObjectLiteral), U8(2), U8(5), U8(1), R(3),
+ B(CreateObjectLiteral), U8(2), U8(6), U8(1), R(3),
B(Star), R(2),
- B(CreateClosure), U8(3), U8(4), U8(0),
- B(StaNamedOwnProperty), R(3), U8(4), U8(6),
+ B(CreateClosure), U8(3), U8(5), U8(0),
+ B(StaNamedOwnProperty), R(3), U8(4), U8(7),
B(CallRuntime), U16(Runtime::kInitializeVarGlobal), R(1), U8(3),
B(LdaUndefined),
/* 33 S> */ B(Return),
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/TryCatch.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/TryCatch.golden
index 93f906c287..16800815c1 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/TryCatch.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/TryCatch.golden
@@ -9,25 +9,25 @@ wrap: yes
snippet: "
try { return 1; } catch(e) { return 2; }
"
-frame size: 3
+frame size: 2
parameter count: 1
bytecode array length: 32
bytecodes: [
/* 30 E> */ B(StackCheck),
- B(Mov), R(context), R(1),
+ B(Mov), R(context), R(0),
/* 40 S> */ B(LdaSmi), I8(1),
/* 75 S> */ B(Return),
B(Jump), U8(23),
- B(Star), R(2),
- B(Ldar), R(closure),
- B(CreateCatchContext), R(2), U8(0), U8(1),
B(Star), R(1),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(1), U8(0), U8(1),
+ B(Star), R(0),
B(LdaTheHole),
B(SetPendingMessage),
- B(Ldar), R(1),
- B(PushContext), R(0),
+ B(Ldar), R(0),
+ B(PushContext), R(1),
/* 63 S> */ B(LdaSmi), I8(2),
- B(PopContext), R(0),
+ B(PopContext), R(1),
/* 75 S> */ B(Return),
B(LdaUndefined),
/* 75 S> */ B(Return),
@@ -46,39 +46,39 @@ snippet: "
try { a = 1 } catch(e1) {};
try { a = 2 } catch(e2) { a = 3 }
"
-frame size: 4
+frame size: 3
parameter count: 1
bytecode array length: 61
bytecodes: [
/* 30 E> */ B(StackCheck),
- B(Mov), R(context), R(2),
+ B(Mov), R(context), R(1),
/* 47 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
B(Jump), U8(20),
- B(Star), R(3),
- B(Ldar), R(closure),
- /* 49 E> */ B(CreateCatchContext), R(3), U8(0), U8(1),
B(Star), R(2),
+ B(Ldar), R(closure),
+ /* 49 E> */ B(CreateCatchContext), R(2), U8(0), U8(1),
+ B(Star), R(1),
B(LdaTheHole),
B(SetPendingMessage),
- B(Ldar), R(2),
- B(PushContext), R(1),
- B(PopContext), R(1),
- B(Mov), R(context), R(2),
+ B(Ldar), R(1),
+ B(PushContext), R(2),
+ B(PopContext), R(2),
+ B(Mov), R(context), R(1),
/* 75 S> */ B(LdaSmi), I8(2),
B(Star), R(0),
B(Jump), U8(24),
- B(Star), R(3),
- B(Ldar), R(closure),
- /* 77 E> */ B(CreateCatchContext), R(3), U8(2), U8(3),
B(Star), R(2),
+ B(Ldar), R(closure),
+ /* 77 E> */ B(CreateCatchContext), R(2), U8(2), U8(3),
+ B(Star), R(1),
B(LdaTheHole),
B(SetPendingMessage),
- B(Ldar), R(2),
- B(PushContext), R(1),
+ B(Ldar), R(1),
+ B(PushContext), R(2),
/* 95 S> */ B(LdaSmi), I8(3),
B(Star), R(0),
- B(PopContext), R(1),
+ B(PopContext), R(2),
B(LdaUndefined),
/* 103 S> */ B(Return),
]
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/TryFinally.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/TryFinally.golden
index 6b5dadb53f..faa4f4c931 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/TryFinally.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/TryFinally.golden
@@ -12,7 +12,7 @@ snippet: "
"
frame size: 4
parameter count: 1
-bytecode array length: 46
+bytecode array length: 44
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(1),
@@ -35,8 +35,7 @@ bytecodes: [
/* 72 E> */ B(SetPendingMessage),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(1),
- B(JumpIfTrue), U8(4),
- B(Jump), U8(5),
+ B(JumpIfFalse), U8(5),
B(Ldar), R(2),
B(ReThrow),
B(LdaUndefined),
@@ -53,47 +52,46 @@ snippet: "
var a = 1;
try { a = 2; } catch(e) { a = 20 } finally { a = 3; }
"
-frame size: 7
+frame size: 6
parameter count: 1
-bytecode array length: 73
+bytecode array length: 71
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
+ B(Mov), R(context), R(3),
B(Mov), R(context), R(4),
- B(Mov), R(context), R(5),
/* 51 S> */ B(LdaSmi), I8(2),
B(Star), R(0),
B(Jump), U8(24),
- B(Star), R(6),
- B(Ldar), R(closure),
- /* 53 E> */ B(CreateCatchContext), R(6), U8(0), U8(1),
B(Star), R(5),
+ B(Ldar), R(closure),
+ /* 53 E> */ B(CreateCatchContext), R(5), U8(0), U8(1),
+ B(Star), R(4),
B(LdaTheHole),
B(SetPendingMessage),
- B(Ldar), R(5),
- B(PushContext), R(1),
+ B(Ldar), R(4),
+ B(PushContext), R(5),
/* 71 S> */ B(LdaSmi), I8(20),
B(Star), R(0),
- B(PopContext), R(1),
+ B(PopContext), R(5),
B(LdaSmi), I8(-1),
- B(Star), R(2),
+ B(Star), R(1),
B(Jump), U8(7),
- B(Star), R(3),
- B(LdaZero),
B(Star), R(2),
+ B(LdaZero),
+ B(Star), R(1),
B(LdaTheHole),
/* 73 E> */ B(SetPendingMessage),
- B(Star), R(4),
+ B(Star), R(3),
/* 90 S> */ B(LdaSmi), I8(3),
B(Star), R(0),
- B(Ldar), R(4),
+ B(Ldar), R(3),
/* 92 E> */ B(SetPendingMessage),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(2),
- B(JumpIfTrue), U8(4),
- B(Jump), U8(5),
- B(Ldar), R(3),
+ B(TestEqualStrictNoFeedback), R(1),
+ B(JumpIfFalse), U8(5),
+ B(Ldar), R(2),
B(ReThrow),
B(LdaUndefined),
/* 99 S> */ B(Return),
@@ -113,58 +111,57 @@ snippet: "
try { a = 1 } catch(e) { a = 2 }
} catch(e) { a = 20 } finally { a = 3; }
"
-frame size: 8
+frame size: 7
parameter count: 1
-bytecode array length: 96
+bytecode array length: 94
bytecodes: [
/* 30 E> */ B(StackCheck),
+ B(Mov), R(context), R(3),
B(Mov), R(context), R(4),
B(Mov), R(context), R(5),
- B(Mov), R(context), R(6),
/* 55 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
B(Jump), U8(24),
- B(Star), R(7),
- B(Ldar), R(closure),
- /* 57 E> */ B(CreateCatchContext), R(7), U8(0), U8(1),
B(Star), R(6),
+ B(Ldar), R(closure),
+ /* 57 E> */ B(CreateCatchContext), R(6), U8(0), U8(1),
+ B(Star), R(5),
B(LdaTheHole),
B(SetPendingMessage),
- B(Ldar), R(6),
- B(PushContext), R(1),
+ B(Ldar), R(5),
+ B(PushContext), R(6),
/* 74 S> */ B(LdaSmi), I8(2),
B(Star), R(0),
- B(PopContext), R(1),
+ B(PopContext), R(6),
B(Jump), U8(24),
- B(Star), R(6),
- B(Ldar), R(closure),
- /* 76 E> */ B(CreateCatchContext), R(6), U8(0), U8(2),
B(Star), R(5),
+ B(Ldar), R(closure),
+ /* 76 E> */ B(CreateCatchContext), R(5), U8(0), U8(2),
+ B(Star), R(4),
B(LdaTheHole),
B(SetPendingMessage),
- B(Ldar), R(5),
- B(PushContext), R(1),
+ B(Ldar), R(4),
+ B(PushContext), R(5),
/* 95 S> */ B(LdaSmi), I8(20),
B(Star), R(0),
- B(PopContext), R(1),
+ B(PopContext), R(5),
B(LdaSmi), I8(-1),
- B(Star), R(2),
+ B(Star), R(1),
B(Jump), U8(7),
- B(Star), R(3),
- B(LdaZero),
B(Star), R(2),
+ B(LdaZero),
+ B(Star), R(1),
B(LdaTheHole),
/* 97 E> */ B(SetPendingMessage),
- B(Star), R(4),
+ B(Star), R(3),
/* 114 S> */ B(LdaSmi), I8(3),
B(Star), R(0),
- B(Ldar), R(4),
+ B(Ldar), R(3),
/* 116 E> */ B(SetPendingMessage),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(2),
- B(JumpIfTrue), U8(4),
- B(Jump), U8(5),
- B(Ldar), R(3),
+ B(TestEqualStrictNoFeedback), R(1),
+ B(JumpIfFalse), U8(5),
+ B(Ldar), R(2),
B(ReThrow),
B(LdaUndefined),
/* 123 S> */ B(Return),
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/Typeof.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/Typeof.golden
index ecf9ed6d64..7a2559e453 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/Typeof.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/Typeof.golden
@@ -42,7 +42,7 @@ parameter count: 1
bytecode array length: 6
bytecodes: [
/* 22 E> */ B(StackCheck),
- /* 28 S> */ B(LdaGlobalInsideTypeof), U8(0), U8(2),
+ /* 28 S> */ B(LdaGlobalInsideTypeof), U8(0), U8(3),
B(TypeOf),
/* 46 S> */ B(Return),
]
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/UnaryOperators.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/UnaryOperators.golden
index 7bf28b4058..6473a7d0a6 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/UnaryOperators.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/UnaryOperators.golden
@@ -21,11 +21,11 @@ bytecodes: [
/* 42 S> */ B(LdaZero),
B(Star), R(0),
/* 54 S> */ B(LdaSmi), I8(10),
- /* 54 E> */ B(TestEqual), R(0), U8(2),
+ /* 54 E> */ B(TestEqual), R(0), U8(3),
B(JumpIfTrue), U8(13),
/* 45 E> */ B(StackCheck),
/* 65 S> */ B(Ldar), R(0),
- /* 71 E> */ B(AddSmi), I8(10), U8(3),
+ /* 71 E> */ B(AddSmi), I8(10), U8(4),
B(Star), R(0),
B(JumpLoop), U8(15), I8(0),
/* 79 S> */ B(Ldar), R(0),
@@ -56,7 +56,7 @@ bytecodes: [
B(ToBooleanLogicalNot),
B(Star), R(0),
/* 74 S> */ B(LdaFalse),
- /* 74 E> */ B(TestEqual), R(0), U8(2),
+ /* 74 E> */ B(TestEqual), R(0), U8(3),
B(JumpIfFalse), U8(5),
B(JumpLoop), U8(12), I8(0),
/* 85 S> */ B(Ldar), R(0),
@@ -80,7 +80,7 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), I8(101),
B(Star), R(0),
/* 47 S> */ B(Nop),
- /* 61 E> */ B(MulSmi), I8(3), U8(2),
+ /* 61 E> */ B(MulSmi), I8(3), U8(3),
B(LdaUndefined),
/* 67 S> */ B(Return),
]
@@ -103,8 +103,8 @@ bytecodes: [
/* 42 S> */ B(Wide), B(LdaSmi), I16(1234),
B(Star), R(0),
/* 56 S> */ B(Nop),
- /* 64 E> */ B(Mul), R(0), U8(2),
- /* 68 E> */ B(SubSmi), I8(1), U8(3),
+ /* 64 E> */ B(Mul), R(0), U8(3),
+ /* 68 E> */ B(SubSmi), I8(1), U8(4),
B(LdaUndefined),
B(Star), R(1),
/* 74 S> */ B(Nop),
@@ -128,7 +128,7 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), I8(13),
B(Star), R(0),
/* 46 S> */ B(Nop),
- /* 53 E> */ B(BitwiseXorSmi), I8(-1), U8(2),
+ /* 53 E> */ B(BitwiseXorSmi), I8(-1), U8(3),
/* 57 S> */ B(Return),
]
constant pool: [
@@ -149,7 +149,7 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), I8(13),
B(Star), R(0),
/* 46 S> */ B(Nop),
- /* 53 E> */ B(MulSmi), I8(1), U8(2),
+ /* 53 E> */ B(MulSmi), I8(1), U8(3),
/* 57 S> */ B(Return),
]
constant pool: [
@@ -170,7 +170,7 @@ bytecodes: [
/* 42 S> */ B(LdaSmi), I8(13),
B(Star), R(0),
/* 46 S> */ B(Nop),
- /* 53 E> */ B(MulSmi), I8(-1), U8(2),
+ /* 53 E> */ B(MulSmi), I8(-1), U8(3),
/* 57 S> */ B(Return),
]
constant pool: [
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/WideRegisters.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/WideRegisters.golden
index 402b9aea80..b333c2f7e7 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/WideRegisters.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/WideRegisters.golden
@@ -525,7 +525,7 @@ bytecode array length: 18
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 1494 S> */ B(LdaSmi), I8(3),
- /* 1501 E> */ B(TestGreaterThan), R(2), U8(2),
+ /* 1501 E> */ B(TestGreaterThan), R(2), U8(3),
B(JumpIfFalse), U8(7),
/* 1508 S> */ B(Wide), B(Ldar), R16(129),
/* 1536 S> */ B(Return),
@@ -709,12 +709,12 @@ bytecodes: [
/* 1503 S> */ B(LdaZero),
B(Star), R(0),
/* 1506 S> */ B(LdaSmi), I8(3),
- /* 1515 E> */ B(Wide), B(TestEqual), R16(129), U16(2),
+ /* 1515 E> */ B(Wide), B(TestEqual), R16(129), U16(3),
B(JumpIfFalse), U8(10),
/* 1534 S> */ B(Wide), B(Mov), R16(0), R16(129),
B(Ldar), R(0),
/* 1540 S> */ B(LdaSmi), I8(3),
- /* 1547 E> */ B(TestGreaterThan), R(2), U8(3),
+ /* 1547 E> */ B(TestGreaterThan), R(2), U8(4),
B(JumpIfFalse), U8(5),
/* 1554 S> */ B(Ldar), R(0),
/* 1580 S> */ B(Return),
@@ -901,15 +901,15 @@ bytecodes: [
/* 1523 S> */ B(LdaZero),
B(Wide), B(Star), R16(128),
/* 1538 S> */ B(LdaSmi), I8(64),
- /* 1538 E> */ B(Wide), B(TestLessThan), R16(128), U16(2),
+ /* 1538 E> */ B(Wide), B(TestLessThan), R16(128), U16(3),
B(JumpIfFalse), U8(31),
/* 1518 E> */ B(StackCheck),
/* 1555 S> */ B(Wide), B(Ldar), R16(128),
- /* 1561 E> */ B(Add), R(1), U8(4),
+ /* 1561 E> */ B(Add), R(1), U8(5),
B(Wide), B(Mov), R16(1), R16(157),
B(Star), R(1),
/* 1548 S> */ B(Wide), B(Ldar), R16(128),
- B(Inc), U8(3),
+ B(Inc), U8(4),
B(Wide), B(Star), R16(128),
B(JumpLoop), U8(36), I8(0),
/* 1567 S> */ B(Wide), B(Ldar), R16(128),
@@ -1101,12 +1101,12 @@ bytecodes: [
B(Wide), B(Star), R16(161),
/* 1526 S> */ B(Wide), B(ForInContinue), R16(161), R16(160),
B(JumpIfFalse), U8(45),
- B(Wide), B(ForInNext), R16(157), R16(161), R16(158), U16(3),
+ B(Wide), B(ForInNext), R16(157), R16(161), R16(158), U16(4),
B(JumpIfUndefined), U8(22),
B(Wide), B(Star), R16(128),
/* 1521 E> */ B(StackCheck),
/* 1541 S> */ B(Wide), B(Ldar), R16(128),
- /* 1547 E> */ B(Add), R(1), U8(2),
+ /* 1547 E> */ B(Add), R(1), U8(3),
B(Wide), B(Mov), R16(1), R16(162),
B(Star), R(1),
/* 1544 E> */ B(Wide), B(ForInStep), R16(161),
diff --git a/deps/v8/test/cctest/interpreter/bytecode_expectations/WithStatement.golden b/deps/v8/test/cctest/interpreter/bytecode_expectations/WithStatement.golden
index 93467600ef..67822005ba 100644
--- a/deps/v8/test/cctest/interpreter/bytecode_expectations/WithStatement.golden
+++ b/deps/v8/test/cctest/interpreter/bytecode_expectations/WithStatement.golden
@@ -9,16 +9,16 @@ wrap: yes
snippet: "
with ({x:42}) { return x; }
"
-frame size: 2
+frame size: 1
parameter count: 1
bytecode array length: 22
bytecodes: [
/* 30 E> */ B(StackCheck),
- /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(1),
- B(Ldar), R(1),
- B(ToObject), R(1),
+ /* 34 S> */ B(CreateObjectLiteral), U8(0), U8(3), U8(1), R(0),
+ B(Ldar), R(0),
+ B(ToObject), R(0),
B(Ldar), R(closure),
- B(CreateWithContext), R(1), U8(1),
+ B(CreateWithContext), R(0), U8(1),
B(PushContext), R(0),
/* 50 S> */ B(LdaLookupSlot), U8(2),
B(PopContext), R(0),
diff --git a/deps/v8/test/cctest/interpreter/source-position-matcher.cc b/deps/v8/test/cctest/interpreter/source-position-matcher.cc
index 082ac01ef3..9cff95af5b 100644
--- a/deps/v8/test/cctest/interpreter/source-position-matcher.cc
+++ b/deps/v8/test/cctest/interpreter/source-position-matcher.cc
@@ -56,9 +56,9 @@ struct PositionTableEntryComparer {
bool SourcePositionMatcher::Match(Handle<BytecodeArray> original_bytecode,
Handle<BytecodeArray> optimized_bytecode) {
SourcePositionTableIterator original(
- original_bytecode->source_position_table());
+ original_bytecode->SourcePositionTable());
SourcePositionTableIterator optimized(
- optimized_bytecode->source_position_table());
+ optimized_bytecode->SourcePositionTable());
int last_original_bytecode_offset = 0;
int last_optimized_bytecode_offset = 0;
diff --git a/deps/v8/test/cctest/interpreter/test-bytecode-generator.cc b/deps/v8/test/cctest/interpreter/test-bytecode-generator.cc
index b249799f6c..6b6227e96e 100644
--- a/deps/v8/test/cctest/interpreter/test-bytecode-generator.cc
+++ b/deps/v8/test/cctest/interpreter/test-bytecode-generator.cc
@@ -2507,6 +2507,108 @@ TEST(ForAwaitOf) {
i::FLAG_harmony_async_iteration = old_flag;
}
+TEST(StandardForLoop) {
+ InitializedIgnitionHandleScope scope;
+ BytecodeExpectationsPrinter printer(CcTest::isolate());
+ printer.set_wrap(false);
+ printer.set_test_function_name("f");
+
+ const char* snippets[] = {
+ "function f() {\n"
+ " for (let x = 0; x < 10; ++x) { let y = x; }\n"
+ "}\n"
+ "f();\n",
+
+ "function f() {\n"
+ " for (let x = 0; x < 10; ++x) { eval('1'); }\n"
+ "}\n"
+ "f();\n",
+
+ "function f() {\n"
+ " for (let x = 0; x < 10; ++x) { (function() { return x; })(); }\n"
+ "}\n"
+ "f();\n",
+
+ "function f() {\n"
+ " for (let { x, y } = { x: 0, y: 3 }; y > 0; --y) { let z = x + y; }\n"
+ "}\n"
+ "f();\n",
+
+ "function* f() {\n"
+ " for (let x = 0; x < 10; ++x) { let y = x; }\n"
+ "}\n"
+ "f();\n",
+
+ "function* f() {\n"
+ " for (let x = 0; x < 10; ++x) yield x;\n"
+ "}\n"
+ "f();\n",
+
+ "async function f() {\n"
+ " for (let x = 0; x < 10; ++x) { let y = x; }\n"
+ "}\n"
+ "f();\n",
+
+ "async function f() {\n"
+ " for (let x = 0; x < 10; ++x) await x;\n"
+ "}\n"
+ "f();\n"};
+
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("StandardForLoop.golden")));
+}
+
+TEST(ForOfLoop) {
+ InitializedIgnitionHandleScope scope;
+ BytecodeExpectationsPrinter printer(CcTest::isolate());
+ printer.set_wrap(false);
+ printer.set_test_function_name("f");
+
+ const char* snippets[] = {
+ "function f(arr) {\n"
+ " for (let x of arr) { let y = x; }\n"
+ "}\n"
+ "f([1, 2, 3]);\n",
+
+ "function f(arr) {\n"
+ " for (let x of arr) { eval('1'); }\n"
+ "}\n"
+ "f([1, 2, 3]);\n",
+
+ "function f(arr) {\n"
+ " for (let x of arr) { (function() { return x; })(); }\n"
+ "}\n"
+ "f([1, 2, 3]);\n",
+
+ "function f(arr) {\n"
+ " for (let { x, y } of arr) { let z = x + y; }\n"
+ "}\n"
+ "f([{ x: 0, y: 3 }, { x: 1, y: 9 }, { x: -12, y: 17 }]);\n",
+
+ "function* f(arr) {\n"
+ " for (let x of arr) { let y = x; }\n"
+ "}\n"
+ "f([1, 2, 3]);\n",
+
+ "function* f(arr) {\n"
+ " for (let x of arr) yield x;\n"
+ "}\n"
+ "f([1, 2, 3]);\n",
+
+ "async function f(arr) {\n"
+ " for (let x of arr) { let y = x; }\n"
+ "}\n"
+ "f([1, 2, 3]);\n",
+
+ "async function f(arr) {\n"
+ " for (let x of arr) await x;\n"
+ "}\n"
+ "f([1, 2, 3]);\n"};
+
+ CHECK(CompareTexts(BuildActual(printer, snippets),
+ LoadGolden("ForOfLoop.golden")));
+}
+
} // namespace interpreter
} // namespace internal
} // namespace v8
diff --git a/deps/v8/test/cctest/interpreter/test-interpreter.cc b/deps/v8/test/cctest/interpreter/test-interpreter.cc
index f58740ea20..eba3ba3057 100644
--- a/deps/v8/test/cctest/interpreter/test-interpreter.cc
+++ b/deps/v8/test/cctest/interpreter/test-interpreter.cc
@@ -35,7 +35,7 @@ TEST(InterpreterReturn) {
Zone* zone = handles.main_zone();
Handle<Object> undefined_value = isolate->factory()->undefined_value();
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 0);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 0);
builder.Return();
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
@@ -52,7 +52,7 @@ TEST(InterpreterLoadUndefined) {
Zone* zone = handles.main_zone();
Handle<Object> undefined_value = isolate->factory()->undefined_value();
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 0);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 0);
builder.LoadUndefined().Return();
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
@@ -69,7 +69,7 @@ TEST(InterpreterLoadNull) {
Zone* zone = handles.main_zone();
Handle<Object> null_value = isolate->factory()->null_value();
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 0);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 0);
builder.LoadNull().Return();
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
@@ -86,7 +86,7 @@ TEST(InterpreterLoadTheHole) {
Zone* zone = handles.main_zone();
Handle<Object> the_hole_value = isolate->factory()->the_hole_value();
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 0);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 0);
builder.LoadTheHole().Return();
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
@@ -103,7 +103,7 @@ TEST(InterpreterLoadTrue) {
Zone* zone = handles.main_zone();
Handle<Object> true_value = isolate->factory()->true_value();
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 0);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 0);
builder.LoadTrue().Return();
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
@@ -120,7 +120,7 @@ TEST(InterpreterLoadFalse) {
Zone* zone = handles.main_zone();
Handle<Object> false_value = isolate->factory()->false_value();
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 0);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 0);
builder.LoadFalse().Return();
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
@@ -138,7 +138,7 @@ TEST(InterpreterLoadLiteral) {
// Small Smis.
for (int i = -128; i < 128; i++) {
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 0);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 0);
builder.LoadLiteral(Smi::FromInt(i)).Return();
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
@@ -150,7 +150,7 @@ TEST(InterpreterLoadLiteral) {
// Large Smis.
{
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 0);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 0);
builder.LoadLiteral(Smi::FromInt(0x12345678)).Return();
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
@@ -166,7 +166,7 @@ TEST(InterpreterLoadLiteral) {
AstValueFactory ast_factory(zone, isolate->ast_string_constants(),
isolate->heap()->HashSeed());
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 0);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 0);
builder.LoadLiteral(ast_factory.NewNumber(-2.1e19)).Return();
@@ -184,7 +184,7 @@ TEST(InterpreterLoadLiteral) {
AstValueFactory ast_factory(zone, isolate->ast_string_constants(),
isolate->heap()->HashSeed());
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 0);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 0);
const AstRawString* raw_string = ast_factory.GetOneByteString("String");
builder.LoadLiteral(raw_string).Return();
@@ -206,7 +206,7 @@ TEST(InterpreterLoadStoreRegisters) {
Zone* zone = handles.main_zone();
Handle<Object> true_value = isolate->factory()->true_value();
for (int i = 0; i <= kMaxInt8; i++) {
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, i + 1);
+ BytecodeArrayBuilder builder(isolate, zone, 1, i + 1);
Register reg(i);
builder.LoadTrue()
@@ -291,7 +291,7 @@ TEST(InterpreterShiftOpsSmi) {
Isolate* isolate = handles.main_isolate();
Zone* zone = handles.main_zone();
Factory* factory = isolate->factory();
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 1);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 1);
FeedbackVectorSpec feedback_spec(zone);
FeedbackSlot slot = feedback_spec.AddInterpreterBinaryOpICSlot();
@@ -330,7 +330,7 @@ TEST(InterpreterBinaryOpsSmi) {
Isolate* isolate = handles.main_isolate();
Zone* zone = handles.main_zone();
Factory* factory = isolate->factory();
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 1);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 1);
FeedbackVectorSpec feedback_spec(zone);
FeedbackSlot slot = feedback_spec.AddInterpreterBinaryOpICSlot();
@@ -372,7 +372,7 @@ TEST(InterpreterBinaryOpsHeapNumber) {
Factory* factory = isolate->factory();
AstValueFactory ast_factory(zone, isolate->ast_string_constants(),
isolate->heap()->HashSeed());
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 1);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 1);
FeedbackVectorSpec feedback_spec(zone);
FeedbackSlot slot = feedback_spec.AddInterpreterBinaryOpICSlot();
@@ -447,7 +447,7 @@ TEST(InterpreterStringAdd) {
};
for (size_t i = 0; i < arraysize(test_cases); i++) {
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 1);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 1);
FeedbackVectorSpec feedback_spec(zone);
FeedbackSlot slot = feedback_spec.AddInterpreterBinaryOpICSlot();
Handle<i::FeedbackMetadata> metadata =
@@ -479,7 +479,7 @@ TEST(InterpreterParameter1) {
HandleAndZoneScope handles;
Isolate* isolate = handles.main_isolate();
Zone* zone = handles.main_zone();
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 0);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 0);
builder.LoadAccumulatorWithRegister(builder.Receiver()).Return();
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(isolate);
@@ -505,7 +505,7 @@ TEST(InterpreterParameter8) {
Zone* zone = handles.main_zone();
AstValueFactory ast_factory(zone, isolate->ast_string_constants(),
isolate->heap()->HashSeed());
- BytecodeArrayBuilder builder(isolate, zone, 8, 0, 0);
+ BytecodeArrayBuilder builder(isolate, zone, 8, 0);
FeedbackVectorSpec feedback_spec(zone);
FeedbackSlot slot = feedback_spec.AddInterpreterBinaryOpICSlot();
@@ -664,7 +664,7 @@ TEST(InterpreterBinaryOpTypeFeedback) {
Handle<Smi>(Smi::FromInt(1), isolate), BinaryOperationFeedback::kAny}};
for (const BinaryOpExpectation& test_case : kTestCases) {
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 1);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 1);
i::FeedbackVectorSpec feedback_spec(zone);
i::FeedbackSlot slot0 = feedback_spec.AddInterpreterBinaryOpICSlot();
@@ -777,7 +777,7 @@ TEST(InterpreterBinaryOpSmiTypeFeedback) {
Handle<Smi>(Smi::FromInt(1), isolate), BinaryOperationFeedback::kAny}};
for (const BinaryOpExpectation& test_case : kTestCases) {
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 1);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 1);
i::FeedbackVectorSpec feedback_spec(zone);
i::FeedbackSlot slot0 = feedback_spec.AddInterpreterBinaryOpICSlot();
@@ -828,7 +828,7 @@ TEST(InterpreterUnaryOpFeedback) {
{Token::Value::ADD, smi_one, smi_max, number, str},
{Token::Value::SUB, smi_one, smi_min, number, str}};
for (TestCase const& test_case : kTestCases) {
- BytecodeArrayBuilder builder(isolate, zone, 4, 0, 0);
+ BytecodeArrayBuilder builder(isolate, zone, 4, 0);
i::FeedbackVectorSpec feedback_spec(zone);
i::FeedbackSlot slot0 = feedback_spec.AddInterpreterBinaryOpICSlot();
@@ -892,7 +892,7 @@ TEST(InterpreterBitwiseTypeFeedback) {
Token::Value::SHL, Token::Value::SHR, Token::Value::SAR};
for (Token::Value op : kBitwiseBinaryOperators) {
- BytecodeArrayBuilder builder(isolate, zone, 4, 0, 0);
+ BytecodeArrayBuilder builder(isolate, zone, 4, 0);
i::FeedbackVectorSpec feedback_spec(zone);
i::FeedbackSlot slot0 = feedback_spec.AddInterpreterBinaryOpICSlot();
@@ -943,7 +943,7 @@ TEST(InterpreterParameter1Assign) {
HandleAndZoneScope handles;
Isolate* isolate = handles.main_isolate();
Zone* zone = handles.main_zone();
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 0);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 0);
builder.LoadLiteral(Smi::FromInt(5))
.StoreAccumulatorInRegister(builder.Receiver())
@@ -1074,7 +1074,7 @@ TEST(InterpreterLoadNamedProperty) {
const AstRawString* name = ast_factory.GetOneByteString("val");
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 0);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 0);
builder.LoadNamedProperty(builder.Receiver(), name, GetIndex(slot)).Return();
ast_factory.Internalize(isolate);
@@ -1127,7 +1127,7 @@ TEST(InterpreterLoadKeyedProperty) {
const AstRawString* key = ast_factory.GetOneByteString("key");
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 1);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 1);
builder.LoadLiteral(key)
.LoadKeyedProperty(builder.Receiver(), GetIndex(slot))
@@ -1170,7 +1170,7 @@ TEST(InterpreterStoreNamedProperty) {
const AstRawString* name = ast_factory.GetOneByteString("val");
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 0);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 0);
builder.LoadLiteral(Smi::FromInt(999))
.StoreNamedProperty(builder.Receiver(), name, GetIndex(slot), STRICT)
@@ -1233,7 +1233,7 @@ TEST(InterpreterStoreKeyedProperty) {
const AstRawString* name = ast_factory.GetOneByteString("val");
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 1);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 1);
builder.LoadLiteral(name)
.StoreAccumulatorInRegister(Register(0))
@@ -1291,7 +1291,7 @@ static void TestInterpreterCall(TailCallMode tail_call_mode) {
// Check with no args.
{
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 1);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 1);
Register reg = builder.register_allocator()->NewRegister();
RegisterList args = builder.register_allocator()->NewRegisterList(1);
builder.LoadNamedProperty(builder.Receiver(), name, slot_index)
@@ -1319,7 +1319,7 @@ static void TestInterpreterCall(TailCallMode tail_call_mode) {
// Check that receiver is passed properly.
{
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 1);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 1);
Register reg = builder.register_allocator()->NewRegister();
RegisterList args = builder.register_allocator()->NewRegisterList(1);
builder.LoadNamedProperty(builder.Receiver(), name, slot_index)
@@ -1348,7 +1348,7 @@ static void TestInterpreterCall(TailCallMode tail_call_mode) {
// Check with two parameters (+ receiver).
{
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 4);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 4);
Register reg = builder.register_allocator()->NewRegister();
RegisterList args = builder.register_allocator()->NewRegisterList(3);
@@ -1385,7 +1385,7 @@ static void TestInterpreterCall(TailCallMode tail_call_mode) {
// Check with 10 parameters (+ receiver).
{
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 12);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 12);
Register reg = builder.register_allocator()->NewRegister();
RegisterList args = builder.register_allocator()->NewRegisterList(11);
@@ -1471,7 +1471,7 @@ TEST(InterpreterJumps) {
HandleAndZoneScope handles;
Isolate* isolate = handles.main_isolate();
Zone* zone = handles.main_zone();
- BytecodeArrayBuilder builder(isolate, zone, 0, 0, 2);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 2);
FeedbackVectorSpec feedback_spec(zone);
FeedbackSlot slot = feedback_spec.AddInterpreterBinaryOpICSlot();
@@ -1509,7 +1509,7 @@ TEST(InterpreterConditionalJumps) {
HandleAndZoneScope handles;
Isolate* isolate = handles.main_isolate();
Zone* zone = handles.main_zone();
- BytecodeArrayBuilder builder(isolate, zone, 0, 0, 2);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 2);
FeedbackVectorSpec feedback_spec(zone);
FeedbackSlot slot = feedback_spec.AddInterpreterBinaryOpICSlot();
@@ -1559,7 +1559,7 @@ TEST(InterpreterConditionalJumps2) {
HandleAndZoneScope handles;
Isolate* isolate = handles.main_isolate();
Zone* zone = handles.main_zone();
- BytecodeArrayBuilder builder(isolate, zone, 0, 0, 2);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 2);
FeedbackVectorSpec feedback_spec(zone);
FeedbackSlot slot = feedback_spec.AddInterpreterBinaryOpICSlot();
@@ -1610,7 +1610,7 @@ TEST(InterpreterJumpConstantWith16BitOperand) {
Zone* zone = handles.main_zone();
AstValueFactory ast_factory(zone, isolate->ast_string_constants(),
isolate->heap()->HashSeed());
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 257);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 257);
FeedbackVectorSpec feedback_spec(zone);
FeedbackSlot slot = feedback_spec.AddInterpreterBinaryOpICSlot();
@@ -1671,7 +1671,7 @@ TEST(InterpreterJumpWith32BitOperand) {
Zone* zone = handles.main_zone();
AstValueFactory ast_factory(zone, isolate->ast_string_constants(),
isolate->heap()->HashSeed());
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 1);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 1);
Register reg(0);
BytecodeLabel done;
@@ -1763,7 +1763,7 @@ TEST(InterpreterSmiComparisons) {
HandleAndZoneScope handles;
Isolate* isolate = handles.main_isolate();
Zone* zone = handles.main_zone();
- BytecodeArrayBuilder builder(isolate, zone, 0, 0, 1);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 1);
FeedbackVectorSpec feedback_spec(zone);
FeedbackSlot slot = feedback_spec.AddInterpreterCompareICSlot();
@@ -1812,7 +1812,7 @@ TEST(InterpreterHeapNumberComparisons) {
AstValueFactory ast_factory(zone, isolate->ast_string_constants(),
isolate->heap()->HashSeed());
- BytecodeArrayBuilder builder(isolate, zone, 0, 0, 1);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 1);
FeedbackVectorSpec feedback_spec(zone);
FeedbackSlot slot = feedback_spec.AddInterpreterCompareICSlot();
@@ -1867,7 +1867,7 @@ TEST(InterpreterStringComparisons) {
Handle<i::FeedbackMetadata> metadata =
NewFeedbackMetadata(isolate, &feedback_spec);
- BytecodeArrayBuilder builder(isolate, zone, 0, 0, 1);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 1);
Register r0(0);
builder.LoadLiteral(ast_factory.GetOneByteString(lhs))
.StoreAccumulatorInRegister(r0)
@@ -1942,7 +1942,7 @@ TEST(InterpreterMixedComparisons) {
Zone* zone = handles.main_zone();
AstValueFactory ast_factory(zone, isolate->ast_string_constants(),
isolate->heap()->HashSeed());
- BytecodeArrayBuilder builder(isolate, zone, 0, 0, 0);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 0);
FeedbackVectorSpec feedback_spec(zone);
FeedbackSlot string_add_slot =
@@ -2122,7 +2122,7 @@ TEST(InterpreterCompareTypeOf) {
LiteralFlag literal_flag = kLiterals[l];
if (literal_flag == LiteralFlag::kOther) continue;
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 0);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 0);
builder.LoadAccumulatorWithRegister(builder.Receiver())
.CompareTypeOf(kLiterals[l])
.Return();
@@ -2150,7 +2150,7 @@ TEST(InterpreterInstanceOf) {
Handle<i::Object> cases[] = {Handle<i::Object>::cast(instance), other};
for (size_t i = 0; i < arraysize(cases); i++) {
bool expected_value = (i == 0);
- BytecodeArrayBuilder builder(isolate, zone, 0, 0, 1);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 1);
Register r0(0);
size_t case_entry = builder.AllocateDeferredConstantPoolEntry();
@@ -2187,7 +2187,7 @@ TEST(InterpreterTestIn) {
const char* properties[] = {"length", "fuzzle", "x", "0"};
for (size_t i = 0; i < arraysize(properties); i++) {
bool expected_value = (i == 0);
- BytecodeArrayBuilder builder(isolate, zone, 0, 0, 1);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 1);
Register r0(0);
builder.LoadLiteral(ast_factory.GetOneByteString(properties[i]))
@@ -2216,7 +2216,7 @@ TEST(InterpreterUnaryNot) {
Zone* zone = handles.main_zone();
for (size_t i = 1; i < 10; i++) {
bool expected_value = ((i & 1) == 1);
- BytecodeArrayBuilder builder(isolate, zone, 0, 0, 0);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 0);
Register r0(0);
builder.LoadFalse();
@@ -2255,7 +2255,7 @@ TEST(InterpreterUnaryNotNonBoolean) {
};
for (size_t i = 0; i < arraysize(object_type_tuples); i++) {
- BytecodeArrayBuilder builder(isolate, zone, 0, 0, 0);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 0);
Register r0(0);
builder.LoadLiteral(object_type_tuples[i].first);
@@ -2305,7 +2305,7 @@ TEST(InterpreterCallRuntime) {
Isolate* isolate = handles.main_isolate();
Zone* zone = handles.main_zone();
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 2);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 2);
RegisterList args = builder.register_allocator()->NewRegisterList(2);
builder.LoadLiteral(Smi::FromInt(15))
@@ -2328,7 +2328,7 @@ TEST(InterpreterInvokeIntrinsic) {
Isolate* isolate = handles.main_isolate();
Zone* zone = handles.main_zone();
- BytecodeArrayBuilder builder(isolate, zone, 1, 0, 2);
+ BytecodeArrayBuilder builder(isolate, zone, 1, 2);
builder.LoadLiteral(Smi::FromInt(15))
.StoreAccumulatorInRegister(Register(0))
diff --git a/deps/v8/test/cctest/parsing/test-preparser.cc b/deps/v8/test/cctest/parsing/test-preparser.cc
index 2fcff02d95..c28195cb01 100644
--- a/deps/v8/test/cctest/parsing/test-preparser.cc
+++ b/deps/v8/test/cctest/parsing/test-preparser.cc
@@ -28,7 +28,7 @@ enum SkipTests {
TEST(PreParserScopeAnalysis) {
i::FLAG_lazy_inner_functions = true;
- i::FLAG_preparser_scope_analysis = true;
+ i::FLAG_experimental_preparser_scope_analysis = true;
i::Isolate* isolate = CcTest::i_isolate();
i::Factory* factory = isolate->factory();
i::HandleScope scope(isolate);
@@ -76,45 +76,111 @@ TEST(PreParserScopeAnalysis) {
bool strict_outer;
bool strict_test_function;
bool arrow;
+ std::vector<unsigned> location; // "Directions" to the relevant scope.
} outers[] = {
// Normal case (test function at the laziness boundary):
- {"(function outer() { ", "})();", " function test(%s) { %s }",
- "(function test(%s) { %s })()", false, false, false},
+ {"(function outer() { ",
+ "})();",
+ " function test(%s) { %s }",
+ "(function test(%s) { %s })()",
+ false,
+ false,
+ false,
+ {0, 0}},
// Test function deeper:
- {"(function outer() { ", "})();",
+ {"(function outer() { ",
+ "})();",
" function inner() { function test(%s) { %s } }",
- "(function inner() { function test(%s) { %s } })()", false, false,
- false},
+ "(function inner() { function test(%s) { %s } })()",
+ false,
+ false,
+ false,
+ {0, 0}},
// Arrow functions (they can never be at the laziness boundary):
- {"(function outer() { ", "})();", " function inner() { (%s) => { %s } }",
- "(function inner() { (%s) => { %s } })()", false, false, true},
+ {"(function outer() { ",
+ "})();",
+ " function inner() { (%s) => { %s } }",
+ "(function inner() { (%s) => { %s } })()",
+ false,
+ false,
+ true,
+ {0, 0}},
// Repeat the above mentioned cases w/ outer function declaring itself
// strict:
- {"(function outer() { 'use strict'; ", "})();",
- " function test(%s) { %s }", "(function test(%s) { %s })()", true, false,
- false},
- {"(function outer() { 'use strict'; ", "})();",
+ {"(function outer() { 'use strict'; ",
+ "})();",
+ " function test(%s) { %s }",
+ "(function test(%s) { %s })()",
+ true,
+ false,
+ false,
+ {0, 0}},
+ {"(function outer() { 'use strict'; ",
+ "})();",
" function inner() { function test(%s) { %s } }",
- "(function inner() { function test(%s) { %s } })()", true, false, false},
- {"(function outer() { 'use strict'; ", "})();",
+ "(function inner() { function test(%s) { %s } })()",
+ true,
+ false,
+ false,
+ {0, 0}},
+ {"(function outer() { 'use strict'; ",
+ "})();",
" function inner() { (%s) => { %s } }",
- "(function inner() { (%s) => { %s } })()", true, false, true},
+ "(function inner() { (%s) => { %s } })()",
+ true,
+ false,
+ true,
+ {0, 0}},
// ... and with the test function declaring itself strict:
- {"(function outer() { ", "})();",
+ {"(function outer() { ",
+ "})();",
" function test(%s) { 'use strict'; %s }",
- "(function test(%s) { 'use strict'; %s })()", false, true, false},
- {"(function outer() { ", "})();",
+ "(function test(%s) { 'use strict'; %s })()",
+ false,
+ true,
+ false,
+ {0, 0}},
+ {"(function outer() { ",
+ "})();",
" function inner() { function test(%s) { 'use strict'; %s } }",
- "(function inner() { function test(%s) { 'use strict'; %s } })()", false,
- true, false},
- {"(function outer() { ", "})();",
+ "(function inner() { function test(%s) { 'use strict'; %s } })()",
+ false,
+ true,
+ false,
+ {0, 0}},
+ {"(function outer() { ",
+ "})();",
" function inner() { (%s) => { 'use strict'; %s } }",
- "(function inner() { (%s) => { 'use strict'; %s } })()", false, true,
- true},
+ "(function inner() { (%s) => { 'use strict'; %s } })()",
+ false,
+ true,
+ true,
+ {0, 0}},
+
+ // Methods containing skippable functions. Cannot test at the laziness
+ // boundary, since there's no way to force eager parsing of a method.
+ {"class MyClass { constructor() {",
+ "} }",
+ " function test(%s) { %s }",
+ "(function test(%s) { %s })()",
+ true,
+ true,
+ false,
+ {0, 0, 0}},
+
+ {"class MyClass { mymethod() {",
+ "} }",
+ " function test(%s) { %s }",
+ "(function test(%s) { %s })()",
+ true,
+ true,
+ false,
+ // The default constructor is scope 0 inside the class.
+ {0, 1, 0}},
// FIXME(marja): Generators and async functions
};
@@ -166,6 +232,15 @@ TEST(PreParserScopeAnalysis) {
{"if (true) { const var1 = 5; }"},
{"const var1 = 5; function f() { var1; }"},
+ // Functions.
+ {"function f1() { let var2; }"},
+ {"var var1 = function f1() { let var2; }"},
+ {"let var1 = function f1() { let var2; }"},
+ {"const var1 = function f1() { let var2; }"},
+ {"var var1 = function() { let var2; }"},
+ {"let var1 = function() { let var2; }"},
+ {"const var1 = function() { let var2; }"},
+
// Redeclarations.
{"var var1; var var1;"},
{"var var1; var var1; var1 = 5;"},
@@ -491,6 +566,9 @@ TEST(PreParserScopeAnalysis) {
"{name9: var9, name10: var10}, ...var11",
"", SKIP_STRICT_FUNCTION, false},
+ // Complicated cases from bugs.
+ {"var1 = {} = {}", "", SKIP_STRICT_FUNCTION, false},
+
// Destructuring rest. Because we can.
{"var1, ...[var2]", "", SKIP_STRICT_FUNCTION},
{"var1, ...[var2]", "() => { var2; }", SKIP_STRICT_FUNCTION},
@@ -547,6 +625,55 @@ TEST(PreParserScopeAnalysis) {
// Shadowing the catch variable
{"try { } catch(var1) { var var1 = 3; }"},
{"try { } catch(var1) { var var1 = 3; function f() { var1 = 3; } }"},
+
+ // Classes
+ {"class MyClass {}"},
+ {"var1 = class MyClass {}"},
+ {"var var1 = class MyClass {}"},
+ {"let var1 = class MyClass {}"},
+ {"const var1 = class MyClass {}"},
+ {"var var1 = class {}"},
+ {"let var1 = class {}"},
+ {"const var1 = class {}"},
+
+ {"class MyClass { constructor() {} }"},
+ {"class MyClass { constructor() { var var1; } }"},
+ {"class MyClass { constructor() { var var1 = 11; } }"},
+ {"class MyClass { constructor() { var var1; function foo() { var1 = 11; "
+ "} } }"},
+
+ {"class MyClass { m() {} }"},
+ {"class MyClass { m() { var var1; } }"},
+ {"class MyClass { m() { var var1 = 11; } }"},
+ {"class MyClass { m() { var var1; function foo() { var1 = 11; } } }"},
+
+ {"class MyClass { static m() {} }"},
+ {"class MyClass { static m() { var var1; } }"},
+ {"class MyClass { static m() { var var1 = 11; } }"},
+ {"class MyClass { static m() { var var1; function foo() { var1 = 11; } } "
+ "}"},
+
+ {"class MyBase {} class MyClass extends MyBase {}"},
+ {"class MyClass extends MyBase { constructor() {} }"},
+ {"class MyClass extends MyBase { constructor() { super(); } }"},
+ {"class MyClass extends MyBase { constructor() { var var1; } }"},
+ {"class MyClass extends MyBase { constructor() { var var1 = 11; } }"},
+ {"class MyClass extends MyBase { constructor() { var var1; function "
+ "foo() { var1 = 11; } } }"},
+
+ {"class MyClass extends MyBase { m() {} }"},
+ {"class MyClass extends MyBase { m() { super.foo; } }"},
+ {"class MyClass extends MyBase { m() { var var1; } }"},
+ {"class MyClass extends MyBase { m() { var var1 = 11; } }"},
+ {"class MyClass extends MyBase { m() { var var1; function foo() { var1 = "
+ "11; } } }"},
+
+ {"class MyClass extends MyBase { static m() {} }"},
+ {"class MyClass extends MyBase { static m() { super.foo; } }"},
+ {"class MyClass extends MyBase { static m() { var var1; } }"},
+ {"class MyClass extends MyBase { static m() { var var1 = 11; } }"},
+ {"class MyClass extends MyBase { static m() { var var1; function foo() { "
+ "var1 = 11; } } }"},
};
for (unsigned outer_ix = 0; outer_ix < arraysize(outers); ++outer_ix) {
@@ -626,9 +753,8 @@ TEST(PreParserScopeAnalysis) {
CHECK(i::parsing::ParseProgram(&eager_normal, isolate));
CHECK(i::Compiler::Analyze(&eager_normal, isolate));
- i::Scope* normal_scope =
- eager_normal.literal()->scope()->inner_scope()->inner_scope();
- CHECK_NOT_NULL(normal_scope);
+ i::Scope* normal_scope = i::ScopeTestHelper::FindScope(
+ eager_normal.literal()->scope(), outers[outer_ix].location);
CHECK_NULL(normal_scope->sibling());
CHECK(normal_scope->is_function_scope());
@@ -639,15 +765,12 @@ TEST(PreParserScopeAnalysis) {
// Don't run scope analysis (that would obviously decide the correct
// allocation for the variables).
- i::Scope* unallocated_scope = eager_using_scope_data.literal()
- ->scope()
- ->inner_scope()
- ->inner_scope();
- CHECK_NOT_NULL(unallocated_scope);
+ i::Scope* unallocated_scope = i::ScopeTestHelper::FindScope(
+ eager_using_scope_data.literal()->scope(), outers[outer_ix].location);
CHECK_NULL(unallocated_scope->sibling());
CHECK(unallocated_scope->is_function_scope());
- int index = 0;
+ uint32_t index = 0;
lazy_info.preparsed_scope_data()->RestoreData(unallocated_scope, &index);
i::ScopeTestHelper::AllocateWithoutVariableResolution(unallocated_scope);
diff --git a/deps/v8/test/cctest/parsing/test-scanner-streams.cc b/deps/v8/test/cctest/parsing/test-scanner-streams.cc
index 7b621114fe..d76dea3245 100644
--- a/deps/v8/test/cctest/parsing/test-scanner-streams.cc
+++ b/deps/v8/test/cctest/parsing/test-scanner-streams.cc
@@ -22,6 +22,13 @@ class ChunkSource : public v8::ScriptCompiler::ExternalSourceStream {
chunks++;
} while (chunks_.back().len > 0);
}
+ explicit ChunkSource(const char* chunks) : current_(0) {
+ do {
+ chunks_.push_back(
+ {reinterpret_cast<const uint8_t*>(chunks), strlen(chunks)});
+ chunks += strlen(chunks) + 1;
+ } while (chunks_.back().len > 0);
+ }
ChunkSource(const uint8_t* data, size_t len, bool extra_chunky)
: current_(0) {
// If extra_chunky, we'll use increasingly large chunk sizes.
@@ -450,3 +457,42 @@ TEST(Regress651333) {
CHECK_EQ(i::Utf16CharacterStream::kEndOfInput, stream->Advance());
}
}
+
+TEST(Regress6377) {
+ const char* cases[] = {
+ "\xf0\x90\0" // first chunk - start of 4-byte seq
+ "\x80\x80" // second chunk - end of 4-byte seq
+ "a\0", // and an 'a'
+
+ "\xe0\xbf\0" // first chunk - start of 3-byte seq
+ "\xbf" // second chunk - one-byte end of 3-byte seq
+ "a\0", // and an 'a'
+
+ "\xc3\0" // first chunk - start of 2-byte seq
+ "\xbf" // second chunk - end of 2-byte seq
+ "a\0", // and an 'a'
+
+ "\xf0\x90\x80\0" // first chunk - start of 4-byte seq
+ "\x80" // second chunk - one-byte end of 4-byte seq
+ "a\xc3\0" // and an 'a' + start of 2-byte seq
+ "\xbf\0", // third chunk - end of 2-byte seq
+ };
+ const std::vector<std::vector<uint16_t>> unicode = {
+ {0xd800, 0xdc00, 97}, {0xfff, 97}, {0xff, 97}, {0xd800, 0xdc00, 97, 0xff},
+ };
+ CHECK_EQ(unicode.size(), sizeof(cases) / sizeof(cases[0]));
+ for (size_t c = 0; c < unicode.size(); ++c) {
+ ChunkSource chunk_source(cases[c]);
+ std::unique_ptr<i::Utf16CharacterStream> stream(i::ScannerStream::For(
+ &chunk_source, v8::ScriptCompiler::StreamedSource::UTF8, nullptr));
+ for (size_t i = 0; i < unicode[c].size(); i++) {
+ CHECK_EQ(unicode[c][i], stream->Advance());
+ }
+ CHECK_EQ(i::Utf16CharacterStream::kEndOfInput, stream->Advance());
+ stream->Seek(0);
+ for (size_t i = 0; i < unicode[c].size(); i++) {
+ CHECK_EQ(unicode[c][i], stream->Advance());
+ }
+ CHECK_EQ(i::Utf16CharacterStream::kEndOfInput, stream->Advance());
+ }
+}
diff --git a/deps/v8/test/cctest/parsing/test-scanner.cc b/deps/v8/test/cctest/parsing/test-scanner.cc
index 2c27ca67ec..7ca02ba3d6 100644
--- a/deps/v8/test/cctest/parsing/test-scanner.cc
+++ b/deps/v8/test/cctest/parsing/test-scanner.cc
@@ -39,7 +39,7 @@ ScannerTestHelper make_scanner(const char* src) {
helper.stream = ScannerStream::ForTesting(src);
helper.scanner =
std::unique_ptr<Scanner>(new Scanner(helper.unicode_cache.get()));
- helper.scanner->Initialize(helper.stream.get());
+ helper.scanner->Initialize(helper.stream.get(), false);
return helper;
}
diff --git a/deps/v8/test/cctest/scope-test-helper.h b/deps/v8/test/cctest/scope-test-helper.h
index 691a723981..61a5167854 100644
--- a/deps/v8/test/cctest/scope-test-helper.h
+++ b/deps/v8/test/cctest/scope-test-helper.h
@@ -23,31 +23,38 @@ class ScopeTestHelper {
static void CompareScopes(Scope* baseline, Scope* scope,
bool precise_maybe_assigned) {
- if (!scope->is_hidden()) {
- for (auto baseline_local = baseline->locals()->begin(),
- scope_local = scope->locals()->begin();
- baseline_local != baseline->locals()->end();
- ++baseline_local, ++scope_local) {
- if (scope_local->mode() == VAR || scope_local->mode() == LET ||
- scope_local->mode() == CONST) {
- // Sanity check the variable name. If this fails, the variable order
- // is not deterministic.
- CHECK_EQ(scope_local->raw_name()->length(),
- baseline_local->raw_name()->length());
- for (int i = 0; i < scope_local->raw_name()->length(); ++i) {
- CHECK_EQ(scope_local->raw_name()->raw_data()[i],
- baseline_local->raw_name()->raw_data()[i]);
- }
+ CHECK_EQ(baseline->scope_type(), scope->scope_type());
+ CHECK_IMPLIES(baseline->is_declaration_scope(),
+ baseline->AsDeclarationScope()->function_kind() ==
+ scope->AsDeclarationScope()->function_kind());
- CHECK_EQ(scope_local->location(), baseline_local->location());
- if (precise_maybe_assigned) {
- CHECK_EQ(scope_local->maybe_assigned(),
- baseline_local->maybe_assigned());
- } else {
- STATIC_ASSERT(kMaybeAssigned > kNotAssigned);
- CHECK_GE(scope_local->maybe_assigned(),
- baseline_local->maybe_assigned());
- }
+ if (!PreParsedScopeData::ScopeNeedsData(baseline)) {
+ return;
+ }
+
+ for (auto baseline_local = baseline->locals()->begin(),
+ scope_local = scope->locals()->begin();
+ baseline_local != baseline->locals()->end();
+ ++baseline_local, ++scope_local) {
+ if (scope_local->mode() == VAR || scope_local->mode() == LET ||
+ scope_local->mode() == CONST) {
+ // Sanity check the variable name. If this fails, the variable order
+ // is not deterministic.
+ CHECK_EQ(scope_local->raw_name()->length(),
+ baseline_local->raw_name()->length());
+ for (int i = 0; i < scope_local->raw_name()->length(); ++i) {
+ CHECK_EQ(scope_local->raw_name()->raw_data()[i],
+ baseline_local->raw_name()->raw_data()[i]);
+ }
+
+ CHECK_EQ(scope_local->location(), baseline_local->location());
+ if (precise_maybe_assigned) {
+ CHECK_EQ(scope_local->maybe_assigned(),
+ baseline_local->maybe_assigned());
+ } else {
+ STATIC_ASSERT(kMaybeAssigned > kNotAssigned);
+ CHECK_GE(scope_local->maybe_assigned(),
+ baseline_local->maybe_assigned());
}
}
}
@@ -59,6 +66,20 @@ class ScopeTestHelper {
CompareScopes(baseline_inner, scope_inner, precise_maybe_assigned);
}
}
+
+ // Finds a scope given a start point and directions to it (which inner scope
+ // to pick).
+ static Scope* FindScope(Scope* scope, const std::vector<unsigned>& location) {
+ for (auto n : location) {
+ scope = scope->inner_scope();
+ CHECK_NOT_NULL(scope);
+ while (n-- > 0) {
+ scope = scope->sibling();
+ CHECK_NOT_NULL(scope);
+ }
+ }
+ return scope;
+ }
};
} // namespace internal
} // namespace v8
diff --git a/deps/v8/test/cctest/test-accessor-assembler.cc b/deps/v8/test/cctest/test-accessor-assembler.cc
index 629fe4226a..17617affee 100644
--- a/deps/v8/test/cctest/test-accessor-assembler.cc
+++ b/deps/v8/test/cctest/test-accessor-assembler.cc
@@ -140,18 +140,18 @@ TEST(TryProbeStubCache) {
m.TryProbeStubCache(&stub_cache, receiver, name, &if_handler, &var_handler,
&if_miss);
- m.Bind(&if_handler);
+ m.BIND(&if_handler);
m.Branch(m.WordEqual(expected_handler, var_handler.value()), &passed,
&failed);
- m.Bind(&if_miss);
+ m.BIND(&if_miss);
m.Branch(m.WordEqual(expected_handler, m.IntPtrConstant(0)), &passed,
&failed);
- m.Bind(&passed);
+ m.BIND(&passed);
m.Return(m.BooleanConstant(true));
- m.Bind(&failed);
+ m.BIND(&failed);
m.Return(m.BooleanConstant(false));
}
diff --git a/deps/v8/test/cctest/test-accessors.cc b/deps/v8/test/cctest/test-accessors.cc
index c38d77bd21..070a1a0817 100644
--- a/deps/v8/test/cctest/test-accessors.cc
+++ b/deps/v8/test/cctest/test-accessors.cc
@@ -319,7 +319,7 @@ static void CheckAccessorArgsCorrect(
CHECK(info.Data()
->Equals(info.GetIsolate()->GetCurrentContext(), v8_str("data"))
.FromJust());
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK(info.GetIsolate() == CcTest::isolate());
CHECK(info.This() == info.Holder());
CHECK(info.Data()
diff --git a/deps/v8/test/cctest/test-api-interceptors.cc b/deps/v8/test/cctest/test-api-interceptors.cc
index 9e739687b4..f81d48eb58 100644
--- a/deps/v8/test/cctest/test-api-interceptors.cc
+++ b/deps/v8/test/cctest/test-api-interceptors.cc
@@ -378,7 +378,7 @@ void InterceptorHasOwnPropertyGetter(
void InterceptorHasOwnPropertyGetterGC(
Local<Name> name, const v8::PropertyCallbackInfo<v8::Value>& info) {
ApiTestFuzzer::Fuzz();
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
}
int query_counter_int = 0;
@@ -4226,7 +4226,7 @@ THREADED_TEST(NamedPropertyHandlerGetterAttributes) {
THREADED_TEST(Regress256330) {
- if (!i::FLAG_crankshaft) return;
+ if (!i::FLAG_opt) return;
i::FLAG_allow_natives_syntax = true;
LocalContext context;
v8::HandleScope scope(context->GetIsolate());
diff --git a/deps/v8/test/cctest/test-api.cc b/deps/v8/test/cctest/test-api.cc
index f2cbc7dabf..bebff5f172 100644
--- a/deps/v8/test/cctest/test-api.cc
+++ b/deps/v8/test/cctest/test-api.cc
@@ -456,7 +456,7 @@ THREADED_TEST(ScriptUsingStringResource) {
CHECK_EQ(static_cast<const String::ExternalStringResourceBase*>(resource),
source->GetExternalStringResourceBase(&encoding));
CHECK_EQ(String::TWO_BYTE_ENCODING, encoding);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(0, dispose_count);
}
CcTest::i_isolate()->compilation_cache()->Clear();
@@ -487,7 +487,7 @@ THREADED_TEST(ScriptUsingOneByteStringResource) {
Local<Value> value = script->Run(env.local()).ToLocalChecked();
CHECK(value->IsNumber());
CHECK_EQ(7, value->Int32Value(env.local()).FromJust());
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(0, dispose_count);
}
CcTest::i_isolate()->compilation_cache()->Clear();
@@ -521,11 +521,11 @@ THREADED_TEST(ScriptMakingExternalString) {
Local<Value> value = script->Run(env.local()).ToLocalChecked();
CHECK(value->IsNumber());
CHECK_EQ(7, value->Int32Value(env.local()).FromJust());
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(0, dispose_count);
}
CcTest::i_isolate()->compilation_cache()->Clear();
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(1, dispose_count);
}
@@ -547,11 +547,11 @@ THREADED_TEST(ScriptMakingExternalOneByteString) {
Local<Value> value = script->Run(env.local()).ToLocalChecked();
CHECK(value->IsNumber());
CHECK_EQ(7, value->Int32Value(env.local()).FromJust());
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(0, dispose_count);
}
CcTest::i_isolate()->compilation_cache()->Clear();
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(1, dispose_count);
}
@@ -629,7 +629,7 @@ TEST(MakingExternalUnalignedOneByteString) {
CHECK(success);
// Trigger GCs and force evacuation.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CcTest::CollectAllGarbage(i::Heap::kReduceMemoryFootprintMask);
}
@@ -651,8 +651,8 @@ THREADED_TEST(UsingExternalString) {
factory->InternalizeString(istring);
CHECK(isymbol->IsInternalizedString());
}
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
+ CcTest::CollectAllGarbage();
}
@@ -674,8 +674,8 @@ THREADED_TEST(UsingExternalOneByteString) {
factory->InternalizeString(istring);
CHECK(isymbol->IsInternalizedString());
}
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
+ CcTest::CollectAllGarbage();
}
@@ -900,8 +900,8 @@ THREADED_TEST(StringConcat) {
CHECK_EQ(68, value->Int32Value(env.local()).FromJust());
}
CcTest::i_isolate()->compilation_cache()->Clear();
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
+ CcTest::CollectAllGarbage();
}
@@ -2670,7 +2670,7 @@ static void CheckAlignedPointerInInternalField(Local<v8::Object> obj,
void* value) {
CHECK_EQ(0, static_cast<int>(reinterpret_cast<uintptr_t>(value) & 0x1));
obj->SetAlignedPointerInInternalField(0, value);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(value, obj->GetAlignedPointerFromInternalField(0));
}
@@ -2725,14 +2725,14 @@ THREADED_TEST(SetAlignedPointerInInternalFields) {
void* values[] = {heap_allocated_1, heap_allocated_2};
obj->SetAlignedPointerInInternalFields(2, indices, values);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(heap_allocated_1, obj->GetAlignedPointerFromInternalField(0));
CHECK_EQ(heap_allocated_2, obj->GetAlignedPointerFromInternalField(1));
indices[0] = 1;
indices[1] = 0;
obj->SetAlignedPointerInInternalFields(2, indices, values);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(heap_allocated_2, obj->GetAlignedPointerFromInternalField(0));
CHECK_EQ(heap_allocated_1, obj->GetAlignedPointerFromInternalField(1));
@@ -2744,7 +2744,7 @@ static void CheckAlignedPointerInEmbedderData(LocalContext* env, int index,
void* value) {
CHECK_EQ(0, static_cast<int>(reinterpret_cast<uintptr_t>(value) & 0x1));
(*env)->SetAlignedPointerInEmbedderData(index, value);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(value, (*env)->GetAlignedPointerFromEmbedderData(index));
}
@@ -2774,7 +2774,7 @@ THREADED_TEST(EmbedderDataAlignedPointers) {
for (int i = 0; i < 100; i++) {
env->SetAlignedPointerInEmbedderData(i, AlignedTestPointer(i));
}
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
for (int i = 0; i < 100; i++) {
CHECK_EQ(AlignedTestPointer(i), env->GetAlignedPointerFromEmbedderData(i));
}
@@ -2806,7 +2806,7 @@ THREADED_TEST(IdentityHash) {
// Ensure that the test starts with an fresh heap to test whether the hash
// code is based on the address.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
Local<v8::Object> obj = v8::Object::New(isolate);
int hash = obj->GetIdentityHash();
int hash1 = obj->GetIdentityHash();
@@ -2816,7 +2816,7 @@ THREADED_TEST(IdentityHash) {
// objects should not be assigned the same hash code. If the test below fails
// the random number generator should be evaluated.
CHECK_NE(hash, hash2);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
int hash3 = v8::Object::New(isolate)->GetIdentityHash();
// Make sure that the identity hash is not based on the initial address of
// the object alone. If the test below fails the random number generator
@@ -2892,7 +2892,7 @@ TEST(SymbolIdentityHash) {
int hash = symbol->GetIdentityHash();
int hash1 = symbol->GetIdentityHash();
CHECK_EQ(hash, hash1);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
int hash3 = symbol->GetIdentityHash();
CHECK_EQ(hash, hash3);
}
@@ -2903,7 +2903,7 @@ TEST(SymbolIdentityHash) {
int hash = js_symbol->GetIdentityHash();
int hash1 = js_symbol->GetIdentityHash();
CHECK_EQ(hash, hash1);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
int hash3 = js_symbol->GetIdentityHash();
CHECK_EQ(hash, hash3);
}
@@ -2919,7 +2919,7 @@ TEST(StringIdentityHash) {
int hash = str->GetIdentityHash();
int hash1 = str->GetIdentityHash();
CHECK_EQ(hash, hash1);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
int hash3 = str->GetIdentityHash();
CHECK_EQ(hash, hash3);
@@ -2938,8 +2938,9 @@ THREADED_TEST(SymbolProperties) {
v8::Local<v8::Symbol> sym1 = v8::Symbol::New(isolate);
v8::Local<v8::Symbol> sym2 = v8::Symbol::New(isolate, v8_str("my-symbol"));
v8::Local<v8::Symbol> sym3 = v8::Symbol::New(isolate, v8_str("sym3"));
+ v8::Local<v8::Symbol> sym4 = v8::Symbol::New(isolate, v8_str("native"));
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
// Check basic symbol functionality.
CHECK(sym1->IsSymbol());
@@ -3008,7 +3009,7 @@ THREADED_TEST(SymbolProperties) {
CHECK_EQ(num_props + 1,
obj->GetPropertyNames(env.local()).ToLocalChecked()->Length());
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK(obj->SetAccessor(env.local(), sym3, SymbolAccessorGetter,
SymbolAccessorSetter)
@@ -3024,6 +3025,23 @@ THREADED_TEST(SymbolProperties) {
->Equals(env.local(), v8::Integer::New(isolate, 42))
.FromJust());
+ CHECK(obj->SetNativeDataProperty(env.local(), sym4, SymbolAccessorGetter)
+ .FromJust());
+ CHECK(obj->Get(env.local(), sym4).ToLocalChecked()->IsUndefined());
+ CHECK(obj->Set(env.local(), v8_str("accessor_native"),
+ v8::Integer::New(isolate, 123))
+ .FromJust());
+ CHECK_EQ(123, obj->Get(env.local(), sym4)
+ .ToLocalChecked()
+ ->Int32Value(env.local())
+ .FromJust());
+ CHECK(obj->Set(env.local(), sym4, v8::Integer::New(isolate, 314)).FromJust());
+ CHECK(obj->Get(env.local(), sym4)
+ .ToLocalChecked()
+ ->Equals(env.local(), v8::Integer::New(isolate, 314))
+ .FromJust());
+ CHECK(obj->Delete(env.local(), v8_str("accessor_native")).FromJust());
+
// Add another property and delete it afterwards to force the object in
// slow case.
CHECK(
@@ -3118,7 +3136,7 @@ THREADED_TEST(PrivatePropertiesOnProxies) {
v8::Local<v8::Private> priv2 =
v8::Private::New(isolate, v8_str("my-private"));
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK(priv2->Name()
->Equals(env.local(),
@@ -3160,7 +3178,7 @@ THREADED_TEST(PrivatePropertiesOnProxies) {
CHECK_EQ(num_props + 1,
proxy->GetPropertyNames(env.local()).ToLocalChecked()->Length());
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
// Add another property and delete it afterwards to force the object in
// slow case.
@@ -3212,7 +3230,7 @@ THREADED_TEST(PrivateProperties) {
v8::Local<v8::Private> priv2 =
v8::Private::New(isolate, v8_str("my-private"));
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK(priv2->Name()
->Equals(env.local(),
@@ -3254,7 +3272,7 @@ THREADED_TEST(PrivateProperties) {
CHECK_EQ(num_props + 1,
obj->GetPropertyNames(env.local()).ToLocalChecked()->Length());
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
// Add another property and delete it afterwards to force the object in
// slow case.
@@ -3357,6 +3375,15 @@ static void CheckWellKnownSymbol(v8::Local<v8::Symbol>(*getter)(v8::Isolate*),
THREADED_TEST(WellKnownSymbols) {
CheckWellKnownSymbol(v8::Symbol::GetIterator, "Symbol.iterator");
CheckWellKnownSymbol(v8::Symbol::GetUnscopables, "Symbol.unscopables");
+ CheckWellKnownSymbol(v8::Symbol::GetHasInstance, "Symbol.hasInstance");
+ CheckWellKnownSymbol(v8::Symbol::GetIsConcatSpreadable,
+ "Symbol.isConcatSpreadable");
+ CheckWellKnownSymbol(v8::Symbol::GetMatch, "Symbol.match");
+ CheckWellKnownSymbol(v8::Symbol::GetReplace, "Symbol.replace");
+ CheckWellKnownSymbol(v8::Symbol::GetSearch, "Symbol.search");
+ CheckWellKnownSymbol(v8::Symbol::GetSplit, "Symbol.split");
+ CheckWellKnownSymbol(v8::Symbol::GetToPrimitive, "Symbol.toPrimitive");
+ CheckWellKnownSymbol(v8::Symbol::GetToStringTag, "Symbol.toStringTag");
}
@@ -3417,7 +3444,7 @@ THREADED_TEST(ArrayBuffer_ApiInternalToExternal) {
CheckInternalFieldsAreZero(ab);
CHECK_EQ(1024, static_cast<int>(ab->ByteLength()));
CHECK(!ab->IsExternal());
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
ScopedArrayBufferContents ab_contents(ab->Externalize());
CHECK(ab->IsExternal());
@@ -3693,7 +3720,7 @@ THREADED_TEST(SharedArrayBuffer_ApiInternalToExternal) {
CheckInternalFieldsAreZero(ab);
CHECK_EQ(1024, static_cast<int>(ab->ByteLength()));
CHECK(!ab->IsExternal());
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
ScopedSharedArrayBufferContents ab_contents(ab->Externalize());
CHECK(ab->IsExternal());
@@ -3810,7 +3837,7 @@ THREADED_TEST(HiddenProperties) {
v8::Local<v8::String> empty = v8_str("");
v8::Local<v8::String> prop_name = v8_str("prop_name");
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
// Make sure delete of a non-existent hidden value works
obj->DeletePrivate(env.local(), key).FromJust();
@@ -3828,7 +3855,7 @@ THREADED_TEST(HiddenProperties) {
->Int32Value(env.local())
.FromJust());
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
// Make sure we do not find the hidden property.
CHECK(!obj->Has(env.local(), empty).FromJust());
@@ -3852,7 +3879,7 @@ THREADED_TEST(HiddenProperties) {
->Int32Value(env.local())
.FromJust());
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
// Add another property and delete it afterwards to force the object in
// slow case.
@@ -3876,7 +3903,7 @@ THREADED_TEST(HiddenProperties) {
->Int32Value(env.local())
.FromJust());
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK(obj->SetPrivate(env.local(), key, v8::Integer::New(isolate, 2002))
.FromJust());
@@ -4167,7 +4194,7 @@ void SecondPassCallback(const v8::WeakCallbackInfo<TwoPassCallbackData>& data) {
if (!trigger_gc) return;
auto data_2 = new TwoPassCallbackData(data.GetIsolate(), instance_counter);
data_2->SetWeak();
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
}
@@ -4188,7 +4215,7 @@ TEST(TwoPassPhantomCallbacks) {
data->SetWeak();
}
CHECK_EQ(static_cast<int>(kLength), instance_counter);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
EmptyMessageQueues(isolate);
CHECK_EQ(0, instance_counter);
}
@@ -4207,7 +4234,7 @@ TEST(TwoPassPhantomCallbacksNestedGc) {
array[10]->MarkTriggerGc();
array[15]->MarkTriggerGc();
CHECK_EQ(static_cast<int>(kLength), instance_counter);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
EmptyMessageQueues(isolate);
CHECK_EQ(0, instance_counter);
}
@@ -4772,7 +4799,7 @@ TEST(NativeWeakMap) {
CHECK(value->Equals(env.local(), weak_map->Get(obj2)).FromJust());
CHECK(value->Equals(env.local(), weak_map->Get(sym1)).FromJust());
}
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
{
HandleScope scope(isolate);
CHECK(value->Equals(env.local(), weak_map->Get(local1)).FromJust());
@@ -4794,7 +4821,7 @@ TEST(NativeWeakMap) {
s1.handle.SetWeak(&s1, &WeakPointerCallback,
v8::WeakCallbackType::kParameter);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(3, counter.NumberOfWeakCalls());
CHECK(o1.handle.IsEmpty());
@@ -6224,6 +6251,63 @@ THREADED_TEST(TypeOf) {
.FromJust());
}
+THREADED_TEST(InstanceOf) {
+ LocalContext env;
+ v8::HandleScope scope(env->GetIsolate());
+ CompileRun(
+ "var A = {};"
+ "var B = {};"
+ "var C = {};"
+ "B.__proto__ = A;"
+ "C.__proto__ = B;"
+ "function F() {}"
+ "F.prototype = A;"
+ "var G = { [Symbol.hasInstance] : null};"
+ "var H = { [Symbol.hasInstance] : () => { throw new Error(); } };"
+ "var J = { [Symbol.hasInstance] : () => true };"
+ "class K {}"
+ "var D = new K;"
+ "class L extends K {}"
+ "var E = new L");
+
+ v8::Local<v8::Object> f = v8::Local<v8::Object>::Cast(CompileRun("F"));
+ v8::Local<v8::Object> g = v8::Local<v8::Object>::Cast(CompileRun("G"));
+ v8::Local<v8::Object> h = v8::Local<v8::Object>::Cast(CompileRun("H"));
+ v8::Local<v8::Object> j = v8::Local<v8::Object>::Cast(CompileRun("J"));
+ v8::Local<v8::Object> k = v8::Local<v8::Object>::Cast(CompileRun("K"));
+ v8::Local<v8::Object> l = v8::Local<v8::Object>::Cast(CompileRun("L"));
+ v8::Local<v8::Value> a = v8::Local<v8::Value>::Cast(CompileRun("A"));
+ v8::Local<v8::Value> b = v8::Local<v8::Value>::Cast(CompileRun("B"));
+ v8::Local<v8::Value> c = v8::Local<v8::Value>::Cast(CompileRun("C"));
+ v8::Local<v8::Value> d = v8::Local<v8::Value>::Cast(CompileRun("D"));
+ v8::Local<v8::Value> e = v8::Local<v8::Value>::Cast(CompileRun("E"));
+
+ v8::TryCatch try_catch(env->GetIsolate());
+ CHECK(!a->InstanceOf(env.local(), f).ToChecked());
+ CHECK(b->InstanceOf(env.local(), f).ToChecked());
+ CHECK(c->InstanceOf(env.local(), f).ToChecked());
+ CHECK(!d->InstanceOf(env.local(), f).ToChecked());
+ CHECK(!e->InstanceOf(env.local(), f).ToChecked());
+ CHECK(!try_catch.HasCaught());
+
+ CHECK(a->InstanceOf(env.local(), g).IsNothing());
+ CHECK(try_catch.HasCaught());
+ try_catch.Reset();
+
+ CHECK(b->InstanceOf(env.local(), h).IsNothing());
+ CHECK(try_catch.HasCaught());
+ try_catch.Reset();
+
+ CHECK(v8_num(1)->InstanceOf(env.local(), j).ToChecked());
+ CHECK(!try_catch.HasCaught());
+
+ CHECK(d->InstanceOf(env.local(), k).ToChecked());
+ CHECK(e->InstanceOf(env.local(), k).ToChecked());
+ CHECK(!d->InstanceOf(env.local(), l).ToChecked());
+ CHECK(e->InstanceOf(env.local(), l).ToChecked());
+ CHECK(!try_catch.HasCaught());
+}
+
THREADED_TEST(MultiRun) {
LocalContext context;
v8::HandleScope scope(context->GetIsolate());
@@ -7470,7 +7554,7 @@ static void IndependentWeakHandle(bool global_gc, bool interlinked) {
b->Set(context, v8_str("x"), a).FromJust();
}
if (global_gc) {
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
} else {
CcTest::CollectGarbage(i::NEW_SPACE);
}
@@ -7496,7 +7580,7 @@ static void IndependentWeakHandle(bool global_gc, bool interlinked) {
object_b.handle.MarkIndependent();
CHECK(object_b.handle.IsIndependent());
if (global_gc) {
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
} else {
CcTest::CollectGarbage(i::NEW_SPACE);
}
@@ -7594,7 +7678,7 @@ void InternalFieldCallback(bool global_gc) {
}
}
if (global_gc) {
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
} else {
CcTest::CollectGarbage(i::NEW_SPACE);
}
@@ -7674,9 +7758,7 @@ THREADED_HEAP_TEST(ResetWeakHandle) {
static void InvokeScavenge() { CcTest::CollectGarbage(i::NEW_SPACE); }
-static void InvokeMarkSweep() {
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
-}
+static void InvokeMarkSweep() { CcTest::CollectAllGarbage(); }
static void ForceScavenge2(
const v8::WeakCallbackInfo<FlagAndPersistent>& data) {
@@ -7752,7 +7834,7 @@ static void ArgumentsTestCallback(
CHECK(v8::Integer::New(isolate, 3)->Equals(context, args[2]).FromJust());
CHECK(v8::Undefined(isolate)->Equals(context, args[3]).FromJust());
v8::HandleScope scope(args.GetIsolate());
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
}
@@ -9082,7 +9164,7 @@ static bool security_check_with_gc_called;
static bool SecurityTestCallbackWithGC(Local<v8::Context> accessing_context,
Local<v8::Object> accessed_object,
Local<v8::Value> data) {
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
security_check_with_gc_called = true;
return true;
}
@@ -11179,47 +11261,78 @@ THREADED_TEST(ConstructorForObject) {
Local<Function> function =
function_template->GetFunction(context.local()).ToLocalChecked();
Local<Object> instance1 = function;
+ CHECK(instance1->IsObject());
+ CHECK(instance1->IsFunction());
CHECK(context->Global()
->Set(context.local(), v8_str("obj4"), instance1)
.FromJust());
v8::TryCatch try_catch(isolate);
- Local<Value> value;
CHECK(!try_catch.HasCaught());
- CHECK(instance1->IsObject());
- CHECK(instance1->IsFunction());
+ {
+ Local<Value> value = CompileRun("new obj4(28)");
+ CHECK(!try_catch.HasCaught());
+ CHECK(value->IsObject());
+
+ Local<Value> args[] = {v8_num(28)};
+ value = instance1->CallAsConstructor(context.local(), 1, args)
+ .ToLocalChecked();
+ CHECK(!try_catch.HasCaught());
+ CHECK(value->IsObject());
+ }
- value = CompileRun("new obj4(28)");
+ Local<Value> proxy = CompileRun("proxy = new Proxy({},{})");
CHECK(!try_catch.HasCaught());
- CHECK(value->IsObject());
+ CHECK(proxy->IsProxy());
- Local<Value> args1[] = {v8_num(28)};
- value = instance1->CallAsConstructor(context.local(), 1, args1)
- .ToLocalChecked();
- CHECK(!try_catch.HasCaught());
- CHECK(value->IsObject());
+ {
+ Local<Value> value = CompileRun("new obj4(proxy)");
+ CHECK(!try_catch.HasCaught());
+ CHECK(value->IsProxy());
+ CHECK(value->SameValue(proxy));
+
+ Local<Value> args[] = {proxy};
+ value = instance1->CallAsConstructor(context.local(), 1, args)
+ .ToLocalChecked();
+ CHECK(!try_catch.HasCaught());
+ CHECK(value->SameValue(proxy));
+ }
Local<ObjectTemplate> instance_template = ObjectTemplate::New(isolate);
instance_template->SetCallAsFunctionHandler(FakeConstructorCallback);
Local<Object> instance2 =
instance_template->NewInstance(context.local()).ToLocalChecked();
+ CHECK(instance2->IsObject());
+ CHECK(instance2->IsFunction());
CHECK(context->Global()
->Set(context.local(), v8_str("obj5"), instance2)
.FromJust());
CHECK(!try_catch.HasCaught());
- CHECK(instance2->IsObject());
- CHECK(instance2->IsFunction());
-
- value = CompileRun("new obj5(28)");
- CHECK(!try_catch.HasCaught());
- CHECK(!value->IsObject());
+ {
+ Local<Value> value = CompileRun("new obj5(28)");
+ CHECK(!try_catch.HasCaught());
+ CHECK(!value->IsObject());
+
+ Local<Value> args[] = {v8_num(28)};
+ value = instance2->CallAsConstructor(context.local(), 1, args)
+ .ToLocalChecked();
+ CHECK(!try_catch.HasCaught());
+ CHECK(!value->IsObject());
+ }
- Local<Value> args2[] = {v8_num(28)};
- value = instance2->CallAsConstructor(context.local(), 1, args2)
- .ToLocalChecked();
- CHECK(!try_catch.HasCaught());
- CHECK(!value->IsObject());
+ {
+ Local<Value> value = CompileRun("new obj5(proxy)");
+ CHECK(!try_catch.HasCaught());
+ CHECK(value->IsProxy());
+ CHECK(value->SameValue(proxy));
+
+ Local<Value> args[] = {proxy};
+ value = instance2->CallAsConstructor(context.local(), 1, args)
+ .ToLocalChecked();
+ CHECK(!try_catch.HasCaught());
+ CHECK(value->SameValue(proxy));
+ }
}
}
@@ -11856,7 +11969,7 @@ static void InterceptorCallICFastApi(
reinterpret_cast<int*>(v8::External::Cast(*info.Data())->Value());
++(*call_count);
if ((*call_count) % 20 == 0) {
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
}
}
@@ -11913,7 +12026,7 @@ static void GenerateSomeGarbage() {
void DirectApiCallback(const v8::FunctionCallbackInfo<v8::Value>& args) {
static int count = 0;
if (count++ % 3 == 0) {
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
// This should move the stub
GenerateSomeGarbage(); // This should ensure the old stub memory is flushed
}
@@ -11983,7 +12096,7 @@ static int p_getter_count_3;
static Local<Value> DoDirectGetter() {
if (++p_getter_count_3 % 3 == 0) {
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
GenerateSomeGarbage();
}
return v8_str("Direct Getter Result");
@@ -13692,7 +13805,7 @@ static void CheckSurvivingGlobalObjectsCount(int expected) {
// the first garbage collection but some of the maps have already
// been marked at that point. Therefore some of the maps are not
// collected until the second garbage collection.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CcTest::CollectAllGarbage(i::Heap::kMakeHeapIterableMask);
int count = GetGlobalObjectsCount();
CHECK_EQ(expected, count);
@@ -13834,7 +13947,7 @@ THREADED_TEST(NewPersistentHandleFromWeakCallback) {
handle1.SetWeak(&handle1, NewPersistentHandleCallback1,
v8::WeakCallbackType::kParameter);
handle2.Reset();
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
}
@@ -13844,7 +13957,7 @@ v8::Persistent<v8::Object> to_be_disposed;
void DisposeAndForceGcCallback2(
const v8::WeakCallbackInfo<v8::Persistent<v8::Object>>& data) {
to_be_disposed.Reset();
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
}
@@ -13868,7 +13981,7 @@ THREADED_TEST(DoNotUseDeletedNodesInSecondLevelGc) {
handle1.SetWeak(&handle1, DisposeAndForceGcCallback1,
v8::WeakCallbackType::kParameter);
to_be_disposed.Reset(isolate, handle2);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
}
void DisposingCallback(
@@ -13906,7 +14019,7 @@ THREADED_TEST(NoGlobalHandlesOrphaningDueToWeakCallback) {
v8::WeakCallbackType::kParameter);
handle3.SetWeak(&handle3, HandleCreatingCallback1,
v8::WeakCallbackType::kParameter);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
EmptyMessageQueues(isolate);
}
@@ -14246,7 +14359,7 @@ void SetFunctionEntryHookTest::RunTest() {
CHECK_EQ(2, CountInvocations(NULL, "bar"));
CHECK_EQ(200, CountInvocations("bar", "foo"));
CHECK_EQ(200, CountInvocations(NULL, "foo"));
- } else if (i::FLAG_crankshaft) {
+ } else if (i::FLAG_opt) {
// For ignition we don't see the actual functions being called, instead
// we see the InterpreterEntryTrampoline at least 102 times
// (100 unoptimized calls to foo, and 2 calls to bar).
@@ -16137,7 +16250,7 @@ static void ObjectWithExternalArrayTestHelper(Local<Context> context,
"}"
"sum;");
// Force GC to trigger verification.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(28, result->Int32Value(context).FromJust());
// Make sure out-of-range loads do not throw.
@@ -16353,12 +16466,12 @@ static void FixedTypedArrayTestHelper(i::ExternalArrayType array_type,
CHECK_EQ(FixedTypedArrayClass::kInstanceType,
fixed_array->map()->instance_type());
CHECK_EQ(kElementCount, fixed_array->length());
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
for (int i = 0; i < kElementCount; i++) {
fixed_array->set(i, static_cast<ElementType>(i));
}
// Force GC to trigger verification.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
for (int i = 0; i < kElementCount; i++) {
CHECK_EQ(static_cast<int64_t>(static_cast<ElementType>(i)),
static_cast<int64_t>(fixed_array->get_scalar(i)));
@@ -16550,8 +16663,8 @@ THREADED_TEST(SkipArrayBufferBackingStoreDuringGC) {
// Should not crash
CcTest::CollectGarbage(i::NEW_SPACE); // in survivor space now
CcTest::CollectGarbage(i::NEW_SPACE); // in old gen now
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
+ CcTest::CollectAllGarbage();
// Should not move the pointer
CHECK_EQ(ab->GetContents().Data(), store_ptr);
@@ -17080,7 +17193,7 @@ TEST(ErrorLevelWarning) {
i::Handle<i::JSMessageObject> message =
i::MessageHandler::MakeMessageObject(
i_isolate, i::MessageTemplate::kAsmJsInvalid, &location, msg,
- i::Handle<i::JSArray>::null());
+ i::Handle<i::FixedArray>::null());
message->set_error_level(levels[i]);
expected_error_level = levels[i];
i::MessageHandler::ReportMessage(i_isolate, &location, message);
@@ -18802,7 +18915,7 @@ TEST(Regress528) {
other_context->Enter();
CompileRun(source_simple);
other_context->Exit();
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
if (GetGlobalObjectsCount() == 1) break;
}
CHECK_GE(2, gc_count);
@@ -18824,7 +18937,7 @@ TEST(Regress528) {
other_context->Enter();
CompileRun(source_eval);
other_context->Exit();
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
if (GetGlobalObjectsCount() == 1) break;
}
CHECK_GE(2, gc_count);
@@ -18851,7 +18964,7 @@ TEST(Regress528) {
other_context->Enter();
CompileRun(source_exception);
other_context->Exit();
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
if (GetGlobalObjectsCount() == 1) break;
}
CHECK_GE(2, gc_count);
@@ -19480,26 +19593,26 @@ TEST(GCCallbacksOld) {
context->GetIsolate()->AddGCEpilogueCallback(EpilogueCallback);
CHECK_EQ(0, prologue_call_count);
CHECK_EQ(0, epilogue_call_count);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(1, prologue_call_count);
CHECK_EQ(1, epilogue_call_count);
context->GetIsolate()->AddGCPrologueCallback(PrologueCallbackSecond);
context->GetIsolate()->AddGCEpilogueCallback(EpilogueCallbackSecond);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(2, prologue_call_count);
CHECK_EQ(2, epilogue_call_count);
CHECK_EQ(1, prologue_call_count_second);
CHECK_EQ(1, epilogue_call_count_second);
context->GetIsolate()->RemoveGCPrologueCallback(PrologueCallback);
context->GetIsolate()->RemoveGCEpilogueCallback(EpilogueCallback);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(2, prologue_call_count);
CHECK_EQ(2, epilogue_call_count);
CHECK_EQ(2, prologue_call_count_second);
CHECK_EQ(2, epilogue_call_count_second);
context->GetIsolate()->RemoveGCPrologueCallback(PrologueCallbackSecond);
context->GetIsolate()->RemoveGCEpilogueCallback(EpilogueCallbackSecond);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(2, prologue_call_count);
CHECK_EQ(2, epilogue_call_count);
CHECK_EQ(2, prologue_call_count_second);
@@ -19515,26 +19628,26 @@ TEST(GCCallbacks) {
isolate->AddGCEpilogueCallback(EpilogueCallback);
CHECK_EQ(0, prologue_call_count);
CHECK_EQ(0, epilogue_call_count);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(1, prologue_call_count);
CHECK_EQ(1, epilogue_call_count);
isolate->AddGCPrologueCallback(PrologueCallbackSecond);
isolate->AddGCEpilogueCallback(EpilogueCallbackSecond);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(2, prologue_call_count);
CHECK_EQ(2, epilogue_call_count);
CHECK_EQ(1, prologue_call_count_second);
CHECK_EQ(1, epilogue_call_count_second);
isolate->RemoveGCPrologueCallback(PrologueCallback);
isolate->RemoveGCEpilogueCallback(EpilogueCallback);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(2, prologue_call_count);
CHECK_EQ(2, epilogue_call_count);
CHECK_EQ(2, prologue_call_count_second);
CHECK_EQ(2, epilogue_call_count_second);
isolate->RemoveGCPrologueCallback(PrologueCallbackSecond);
isolate->RemoveGCEpilogueCallback(EpilogueCallbackSecond);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(2, prologue_call_count);
CHECK_EQ(2, epilogue_call_count);
CHECK_EQ(2, prologue_call_count_second);
@@ -19722,7 +19835,7 @@ TEST(ContainsOnlyOneByte) {
void FailedAccessCheckCallbackGC(Local<v8::Object> target,
v8::AccessType type,
Local<v8::Value> data) {
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CcTest::isolate()->ThrowException(
v8::Exception::Error(v8_str("cross context")));
}
@@ -20345,7 +20458,7 @@ TEST(DontDeleteCellLoadIC) {
"})()",
"ReferenceError: cell is not defined");
CompileRun("cell = \"new_second\";");
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
ExpectString("readCell()", "new_second");
ExpectString("readCell()", "new_second");
}
@@ -20415,8 +20528,8 @@ TEST(PersistentHandleInNewSpaceVisitor) {
object1.SetWrapperClassId(42);
CHECK_EQ(42, object1.WrapperClassId());
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
+ CcTest::CollectAllGarbage();
v8::Persistent<v8::Object> object2(isolate, v8::Object::New(isolate));
CHECK_EQ(0, object2.WrapperClassId());
@@ -20794,13 +20907,16 @@ void HasOwnPropertyNamedPropertyQuery2(
}
}
-
void HasOwnPropertyAccessorGetter(
Local<String> property,
const v8::PropertyCallbackInfo<v8::Value>& info) {
info.GetReturnValue().Set(v8_str("yes"));
}
+void HasOwnPropertyAccessorNameGetter(
+ Local<Name> property, const v8::PropertyCallbackInfo<v8::Value>& info) {
+ info.GetReturnValue().Set(v8_str("yes"));
+}
TEST(HasOwnProperty) {
LocalContext env;
@@ -20882,6 +20998,18 @@ TEST(HasOwnProperty) {
CHECK(!instance->HasOwnProperty(env.local(), v8_str("foo")).FromJust());
CHECK(instance->HasOwnProperty(env.local(), v8_str("bar")).FromJust());
}
+ { // Check that non-internalized keys are handled correctly.
+ Local<ObjectTemplate> templ = ObjectTemplate::New(isolate);
+ templ->SetHandler(v8::NamedPropertyHandlerConfiguration(
+ HasOwnPropertyAccessorNameGetter));
+ Local<Object> instance = templ->NewInstance(env.local()).ToLocalChecked();
+ env->Global()->Set(env.local(), v8_str("obj"), instance).FromJust();
+ const char* src =
+ "var dyn_string = 'this string ';"
+ "dyn_string += 'does not exist elsewhere';"
+ "({}).hasOwnProperty.call(obj, dyn_string)";
+ CHECK(CompileRun(src)->BooleanValue(env.local()).FromJust());
+ }
}
@@ -21888,7 +22016,7 @@ void TestStubCache(bool primary) {
} else {
FLAG_test_secondary_stub_cache = true;
}
- FLAG_crankshaft = false;
+ FLAG_opt = false;
v8::Isolate::CreateParams create_params;
create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
@@ -22533,6 +22661,43 @@ THREADED_TEST(JSONParseNumber) {
ExpectString("JSON.stringify(obj)", "42");
}
+namespace {
+void TestJSONParseArray(Local<Context> context, const char* input_str,
+ const char* expected_output_str,
+ i::ElementsKind expected_elements_kind) {
+ Local<Value> obj =
+ v8::JSON::Parse(context, v8_str(input_str)).ToLocalChecked();
+
+ i::Handle<i::JSArray> a =
+ i::Handle<i::JSArray>::cast(v8::Utils::OpenHandle(*obj));
+ CHECK_EQ(expected_elements_kind, a->GetElementsKind());
+
+ Local<Object> global = context->Global();
+ global->Set(context, v8_str("obj"), obj).FromJust();
+ ExpectString("JSON.stringify(obj)", expected_output_str);
+}
+} // namespace
+
+THREADED_TEST(JSONParseArray) {
+ LocalContext context;
+ HandleScope scope(context->GetIsolate());
+
+ TestJSONParseArray(context.local(), "[0, 1, 2]", "[0,1,2]",
+ i::FAST_SMI_ELEMENTS);
+ TestJSONParseArray(context.local(), "[0, 1.2, 2]", "[0,1.2,2]",
+ i::FAST_DOUBLE_ELEMENTS);
+ TestJSONParseArray(context.local(), "[0.2, 1, 2]", "[0.2,1,2]",
+ i::FAST_DOUBLE_ELEMENTS);
+ TestJSONParseArray(context.local(), "[0, \"a\", 2]", "[0,\"a\",2]",
+ i::FAST_ELEMENTS);
+ TestJSONParseArray(context.local(), "[\"a\", 1, 2]", "[\"a\",1,2]",
+ i::FAST_ELEMENTS);
+ TestJSONParseArray(context.local(), "[\"a\", 1.2, 2]", "[\"a\",1.2,2]",
+ i::FAST_ELEMENTS);
+ TestJSONParseArray(context.local(), "[0, 1.2, \"a\"]", "[0,1.2,\"a\"]",
+ i::FAST_ELEMENTS);
+}
+
THREADED_TEST(JSONStringifyObject) {
LocalContext context;
HandleScope scope(context->GetIsolate());
@@ -22780,10 +22945,12 @@ TEST(AccessCheckThrows) {
CheckCorrectThrow("%GetProperty(other, 'x')");
CheckCorrectThrow("%SetProperty(other, 'x', 'foo', 0)");
CheckCorrectThrow("%AddNamedProperty(other, 'x', 'foo', 1)");
- CheckCorrectThrow("%DeleteProperty_Sloppy(other, 'x')");
- CheckCorrectThrow("%DeleteProperty_Strict(other, 'x')");
- CheckCorrectThrow("%DeleteProperty_Sloppy(other, '1')");
- CheckCorrectThrow("%DeleteProperty_Strict(other, '1')");
+ STATIC_ASSERT(i::SLOPPY == 0);
+ STATIC_ASSERT(i::STRICT == 1);
+ CheckCorrectThrow("%DeleteProperty(other, 'x', 0)"); // 0 == SLOPPY
+ CheckCorrectThrow("%DeleteProperty(other, 'x', 1)"); // 1 == STRICT
+ CheckCorrectThrow("%DeleteProperty(other, '1', 0)");
+ CheckCorrectThrow("%DeleteProperty(other, '1', 1)");
CheckCorrectThrow("Object.prototype.hasOwnProperty.call(other, 'x')");
CheckCorrectThrow("%HasProperty(other, 'x')");
CheckCorrectThrow("Object.prototype.propertyIsEnumerable(other, 'x')");
@@ -22805,7 +22972,7 @@ TEST(AccessCheckInIC) {
if (FLAG_ignition || FLAG_turbo) return;
FLAG_native_code_counters = true;
- FLAG_crankshaft = false;
+ FLAG_opt = false;
v8::Isolate::CreateParams create_params;
create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
@@ -24362,12 +24529,13 @@ TEST(GetOwnPropertyDescriptor) {
v8::Isolate* isolate = env->GetIsolate();
v8::HandleScope scope(isolate);
CompileRun(
- "var x = { value : 13};"
- "Object.defineProperty(x, 'p0', {value : 12});"
- "Object.defineProperty(x, 'p1', {"
- " set : function(value) { this.value = value; },"
- " get : function() { return this.value; },"
- "});");
+ "var x = { value : 13};"
+ "Object.defineProperty(x, 'p0', {value : 12});"
+ "Object.defineProperty(x, Symbol.toStringTag, {value: 'foo'});"
+ "Object.defineProperty(x, 'p1', {"
+ " set : function(value) { this.value = value; },"
+ " get : function() { return this.value; },"
+ "});");
Local<Object> x = Local<Object>::Cast(
env->Global()->Get(env.local(), v8_str("x")).ToLocalChecked());
Local<Value> desc =
@@ -24401,6 +24569,14 @@ TEST(GetOwnPropertyDescriptor) {
->Equals(env.local(),
get->Call(env.local(), x, 0, NULL).ToLocalChecked())
.FromJust());
+ desc =
+ x->GetOwnPropertyDescriptor(env.local(), Symbol::GetToStringTag(isolate))
+ .ToLocalChecked();
+ CHECK(v8_str("foo")
+ ->Equals(env.local(), Local<Object>::Cast(desc)
+ ->Get(env.local(), v8_str("value"))
+ .ToLocalChecked())
+ .FromJust());
}
@@ -26471,3 +26647,84 @@ TEST(DeterministicRandomNumberGeneration) {
v8::internal::FLAG_random_seed = previous_seed;
}
+
+UNINITIALIZED_TEST(AllowAtomicsWait) {
+ using namespace i;
+ v8::Isolate::CreateParams create_params;
+ create_params.allow_atomics_wait = false;
+ create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
+ v8::Isolate* isolate = v8::Isolate::New(create_params);
+ Isolate* i_isolate = reinterpret_cast<Isolate*>(isolate);
+ {
+ CHECK_EQ(false, i_isolate->allow_atomics_wait());
+ isolate->SetAllowAtomicsWait(true);
+ CHECK_EQ(true, i_isolate->allow_atomics_wait());
+ }
+ isolate->Dispose();
+}
+
+enum ContextId { EnteredContext, CurrentContext };
+
+void CheckContexts(v8::Isolate* isolate) {
+ CHECK_EQ(CurrentContext, isolate->GetCurrentContext()
+ ->GetEmbedderData(1)
+ .As<v8::Integer>()
+ ->Value());
+ CHECK_EQ(EnteredContext, isolate->GetEnteredContext()
+ ->GetEmbedderData(1)
+ .As<v8::Integer>()
+ ->Value());
+}
+
+void ContextCheckGetter(Local<String> name,
+ const v8::PropertyCallbackInfo<v8::Value>& info) {
+ CheckContexts(info.GetIsolate());
+ info.GetReturnValue().Set(true);
+}
+
+void ContextCheckSetter(Local<String> name, Local<Value>,
+ const v8::PropertyCallbackInfo<void>& info) {
+ CheckContexts(info.GetIsolate());
+}
+
+void ContextCheckToString(const v8::FunctionCallbackInfo<v8::Value>& info) {
+ CheckContexts(info.GetIsolate());
+ info.GetReturnValue().Set(v8_str("foo"));
+}
+
+TEST(CorrectEnteredContext) {
+ v8::HandleScope scope(CcTest::isolate());
+
+ LocalContext currentContext;
+ currentContext->SetEmbedderData(
+ 1, v8::Integer::New(currentContext->GetIsolate(), CurrentContext));
+ LocalContext enteredContext;
+ enteredContext->SetEmbedderData(
+ 1, v8::Integer::New(enteredContext->GetIsolate(), EnteredContext));
+
+ v8::Context::Scope contextScope(enteredContext.local());
+
+ v8::Local<v8::ObjectTemplate> object_template =
+ ObjectTemplate::New(currentContext->GetIsolate());
+ object_template->SetAccessor(v8_str("p"), &ContextCheckGetter,
+ &ContextCheckSetter);
+
+ v8::Local<v8::Object> object =
+ object_template->NewInstance(currentContext.local()).ToLocalChecked();
+
+ object->Get(currentContext.local(), v8_str("p")).ToLocalChecked();
+ object->Set(currentContext.local(), v8_str("p"), v8_int(0)).FromJust();
+
+ v8::Local<v8::Function> to_string =
+ v8::Function::New(currentContext.local(), ContextCheckToString)
+ .ToLocalChecked();
+
+ to_string->Call(currentContext.local(), object, 0, nullptr).ToLocalChecked();
+
+ object
+ ->CreateDataProperty(currentContext.local(), v8_str("toString"),
+ to_string)
+ .FromJust();
+
+ object->ToString(currentContext.local()).ToLocalChecked();
+}
diff --git a/deps/v8/test/cctest/test-assembler-arm.cc b/deps/v8/test/cctest/test-assembler-arm.cc
index 056dd9ffa5..44b35f8d46 100644
--- a/deps/v8/test/cctest/test-assembler-arm.cc
+++ b/deps/v8/test/cctest/test-assembler-arm.cc
@@ -1297,9 +1297,11 @@ TEST(15) {
uint32_t vabs_s8[4], vabs_s16[4], vabs_s32[4];
uint32_t vneg_s8[4], vneg_s16[4], vneg_s32[4];
uint32_t veor[4], vand[4], vorr[4];
- float vdupf[4], vaddf[4], vsubf[4], vmulf[4];
+ float vdupf[4], vaddf[4], vpaddf[2], vsubf[4], vmulf[4];
+ uint32_t vdupf_16[2], vdupf_8[4];
uint32_t vmin_s8[4], vmin_u16[4], vmin_s32[4];
uint32_t vmax_s8[4], vmax_u16[4], vmax_s32[4];
+ uint32_t vpadd_i8[2], vpadd_i16[2], vpadd_i32[2];
uint32_t vpmin_s8[2], vpmin_u16[2], vpmin_s32[2];
uint32_t vpmax_s8[2], vpmax_u16[2], vpmax_s32[2];
uint32_t vadd8[4], vadd16[4], vadd32[4];
@@ -1309,6 +1311,7 @@ TEST(15) {
uint32_t vmul8[4], vmul16[4], vmul32[4];
uint32_t vshl8[4], vshl16[4], vshl32[5];
uint32_t vshr_s8[4], vshr_u16[4], vshr_s32[5];
+ uint32_t vsli_64[2], vsri_64[2], vsli_32[2], vsri_32[2];
uint32_t vceq[4], vceqf[4], vcgef[4], vcgtf[4];
uint32_t vcge_s8[4], vcge_u16[4], vcge_s32[4];
uint32_t vcgt_s8[4], vcgt_u16[4], vcgt_s32[4];
@@ -1439,7 +1442,7 @@ TEST(15) {
__ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vcvt_f32_u32))));
__ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
- // vdup (integer).
+ // vdup (from register).
__ mov(r4, Operand(0xa));
__ vdup(Neon8, q0, r4);
__ vdup(Neon16, q1, r4);
@@ -1451,11 +1454,16 @@ TEST(15) {
__ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vdup32))));
__ vst1(Neon8, NeonListOperand(q2), NeonMemOperand(r4));
- // vdup (float).
+ // vdup (from scalar).
__ vmov(s0, -1.0);
- __ vdup(q0, s0);
+ __ vdup(Neon32, q1, d0, 0);
__ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vdupf))));
- __ vst1(Neon8, NeonListOperand(q0), NeonMemOperand(r4));
+ __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
+ __ vdup(Neon16, d2, d0, 1);
+ __ vstr(d2, r0, offsetof(T, vdupf_16));
+ __ vdup(Neon8, q1, d0, 3);
+ __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vdupf_8))));
+ __ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
// vabs (float).
__ vmov(s0, -1.0);
@@ -1524,74 +1532,81 @@ TEST(15) {
// vmin (float).
__ vmov(s4, 2.0);
- __ vdup(q0, s4);
+ __ vdup(Neon32, q0, d2, 0);
__ vmov(s4, 1.0);
- __ vdup(q1, s4);
+ __ vdup(Neon32, q1, d2, 0);
__ vmin(q1, q1, q0);
__ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vminf))));
__ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
// vmax (float).
__ vmov(s4, 2.0);
- __ vdup(q0, s4);
+ __ vdup(Neon32, q0, d2, 0);
__ vmov(s4, 1.0);
- __ vdup(q1, s4);
+ __ vdup(Neon32, q1, d2, 0);
__ vmax(q1, q1, q0);
__ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vmaxf))));
__ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
// vadd (float).
__ vmov(s4, 1.0);
- __ vdup(q0, s4);
- __ vdup(q1, s4);
+ __ vdup(Neon32, q0, d2, 0);
+ __ vdup(Neon32, q1, d2, 0);
__ vadd(q1, q1, q0);
__ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vaddf))));
__ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
+ // vpadd (float).
+ __ vmov(s0, 1.0);
+ __ vmov(s1, 2.0);
+ __ vmov(s2, 3.0);
+ __ vmov(s3, 4.0);
+ __ vpadd(d2, d0, d1);
+ __ vstr(d2, r0, offsetof(T, vpaddf));
// vsub (float).
__ vmov(s4, 2.0);
- __ vdup(q0, s4);
+ __ vdup(Neon32, q0, d2, 0);
__ vmov(s4, 1.0);
- __ vdup(q1, s4);
+ __ vdup(Neon32, q1, d2, 0);
__ vsub(q1, q1, q0);
__ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vsubf))));
__ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
// vmul (float).
__ vmov(s4, 2.0);
- __ vdup(q0, s4);
- __ vdup(q1, s4);
+ __ vdup(Neon32, q0, d2, 0);
+ __ vdup(Neon32, q1, d2, 0);
__ vmul(q1, q1, q0);
__ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vmulf))));
__ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
// vrecpe.
__ vmov(s4, 2.0);
- __ vdup(q0, s4);
+ __ vdup(Neon32, q0, d2, 0);
__ vrecpe(q1, q0);
__ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vrecpe))));
__ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
// vrecps.
__ vmov(s4, 2.0);
- __ vdup(q0, s4);
+ __ vdup(Neon32, q0, d2, 0);
__ vmov(s4, 1.5);
- __ vdup(q1, s4);
+ __ vdup(Neon32, q1, d2, 0);
__ vrecps(q1, q0, q1);
__ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vrecps))));
__ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
// vrsqrte.
__ vmov(s4, 4.0);
- __ vdup(q0, s4);
+ __ vdup(Neon32, q0, d2, 0);
__ vrsqrte(q1, q0);
__ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vrsqrte))));
__ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
// vrsqrts.
__ vmov(s4, 2.0);
- __ vdup(q0, s4);
+ __ vdup(Neon32, q0, d2, 0);
__ vmov(s4, 2.5);
- __ vdup(q1, s4);
+ __ vdup(Neon32, q1, d2, 0);
__ vrsqrts(q1, q0, q1);
__ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vrsqrts))));
__ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
// vceq (float).
__ vmov(s4, 1.0);
- __ vdup(q0, s4);
- __ vdup(q1, s4);
+ __ vdup(Neon32, q0, d2, 0);
+ __ vdup(Neon32, q1, d2, 0);
__ vceq(q1, q1, q0);
__ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vceqf))));
__ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
@@ -1600,7 +1615,7 @@ TEST(15) {
__ vmov(s1, -1.0);
__ vmov(s2, -0.0);
__ vmov(s3, 0.0);
- __ vdup(q1, s3);
+ __ vdup(Neon32, q1, d1, 1);
__ vcge(q2, q1, q0);
__ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vcgef))));
__ vst1(Neon8, NeonListOperand(q2), NeonMemOperand(r4));
@@ -1637,6 +1652,17 @@ TEST(15) {
__ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vmax_s32))));
__ vst1(Neon8, NeonListOperand(q2), NeonMemOperand(r4));
+ // vpadd integer.
+ __ mov(r4, Operand(0x03));
+ __ vdup(Neon16, q0, r4);
+ __ vdup(Neon8, q1, r4);
+ __ vpadd(Neon8, d0, d0, d2);
+ __ vstr(d0, r0, offsetof(T, vpadd_i8));
+ __ vpadd(Neon16, d0, d0, d2);
+ __ vstr(d0, r0, offsetof(T, vpadd_i16));
+ __ vpadd(Neon32, d0, d0, d2);
+ __ vstr(d0, r0, offsetof(T, vpadd_i32));
+
// vpmin/vpmax integer.
__ mov(r4, Operand(0x03));
__ vdup(Neon16, q0, r4);
@@ -1795,6 +1821,26 @@ TEST(15) {
__ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, vshr_s32))));
__ vst1(Neon8, NeonListOperand(q1), NeonMemOperand(r4));
+ // vsli, vsri.
+ __ mov(r4, Operand(0xffffffff));
+ __ mov(r5, Operand(0x1));
+ __ vmov(d0, r4, r5);
+ __ vmov(d1, r5, r5);
+ __ vsli(Neon64, d1, d0, 32);
+ __ vstr(d1, r0, offsetof(T, vsli_64));
+ __ vmov(d0, r5, r4);
+ __ vmov(d1, r5, r5);
+ __ vsri(Neon64, d1, d0, 32);
+ __ vstr(d1, r0, offsetof(T, vsri_64));
+ __ vmov(d0, r4, r5);
+ __ vmov(d1, r5, r5);
+ __ vsli(Neon32, d1, d0, 16);
+ __ vstr(d1, r0, offsetof(T, vsli_32));
+ __ vmov(d0, r5, r4);
+ __ vmov(d1, r5, r5);
+ __ vsri(Neon32, d1, d0, 16);
+ __ vstr(d1, r0, offsetof(T, vsri_32));
+
// vceq.
__ mov(r4, Operand(0x03));
__ vdup(Neon8, q0, r4);
@@ -2088,7 +2134,9 @@ TEST(15) {
CHECK_EQ_SPLAT(vdup8, 0x0a0a0a0au);
CHECK_EQ_SPLAT(vdup16, 0x000a000au);
CHECK_EQ_SPLAT(vdup32, 0x0000000au);
- CHECK_EQ_SPLAT(vdupf, -1.0);
+ CHECK_EQ_SPLAT(vdupf, -1.0); // bit pattern is 0xbf800000.
+ CHECK_EQ_32X2(vdupf_16, 0xbf80bf80u, 0xbf80bf80u);
+ CHECK_EQ_SPLAT(vdupf_8, 0xbfbfbfbfu);
// src: [-1, -1, 1, 1]
CHECK_EQ_32X4(vcvt_s32_f32, -1, -1, 1, 1);
@@ -2115,6 +2163,7 @@ TEST(15) {
CHECK_EQ_SPLAT(vand, 0x00fe00feu);
CHECK_EQ_SPLAT(vorr, 0x00ff00ffu);
CHECK_EQ_SPLAT(vaddf, 2.0);
+ CHECK_EQ_32X2(vpaddf, 3.0, 7.0);
CHECK_EQ_SPLAT(vminf, 1.0);
CHECK_EQ_SPLAT(vmaxf, 2.0);
CHECK_EQ_SPLAT(vsubf, -1.0);
@@ -2137,6 +2186,9 @@ TEST(15) {
CHECK_EQ_SPLAT(vmin_s32, 0xffffffffu);
CHECK_EQ_SPLAT(vmax_s32, 0xffu);
// [0, 3, 0, 3, ...] and [3, 3, 3, 3, ...]
+ CHECK_EQ_32X2(vpadd_i8, 0x03030303u, 0x06060606u);
+ CHECK_EQ_32X2(vpadd_i16, 0x0c0c0606u, 0x06060606u);
+ CHECK_EQ_32X2(vpadd_i32, 0x12120c0cu, 0x06060606u);
CHECK_EQ_32X2(vpmin_s8, 0x00000000u, 0x03030303u);
CHECK_EQ_32X2(vpmax_s8, 0x03030303u, 0x03030303u);
// [0, ffff, 0, ffff] and [ffff, ffff]
@@ -2166,6 +2218,10 @@ TEST(15) {
CHECK_EQ_SPLAT(vshr_s8, 0xc0c0c0c0u);
CHECK_EQ_SPLAT(vshr_u16, 0x00400040u);
CHECK_EQ_SPLAT(vshr_s32, 0xffffc040u);
+ CHECK_EQ_32X2(vsli_64, 0x01u, 0xffffffffu);
+ CHECK_EQ_32X2(vsri_64, 0xffffffffu, 0x01u);
+ CHECK_EQ_32X2(vsli_32, 0xffff0001u, 0x00010001u);
+ CHECK_EQ_32X2(vsri_32, 0x00000000u, 0x0000ffffu);
CHECK_EQ_SPLAT(vceq, 0x00ff00ffu);
// [0, 3, 0, 3, ...] >= [3, 3, 3, 3, ...]
CHECK_EQ_SPLAT(vcge_s8, 0x00ff00ffu);
@@ -3817,11 +3873,8 @@ TEST(vswp) {
const uint32_t test_2 = 0x89abcdef;
__ mov(r4, Operand(test_1));
__ mov(r5, Operand(test_2));
- // TODO(bbudge) replace with vdup when implemented.
- __ vmov(d8, r4, r4);
- __ vmov(d9, r4, r4); // q4 = [1.0, 1.0]
- __ vmov(d10, r5, r5);
- __ vmov(d11, r5, r5); // q5 = [-1.0, -1.0]
+ __ vdup(Neon32, q4, r4);
+ __ vdup(Neon32, q5, r5);
__ vswp(q4, q5);
__ add(r6, r0, Operand(static_cast<int32_t>(offsetof(T, vswp_q4))));
__ vst1(Neon8, NeonListOperand(q4), NeonMemOperand(r6));
diff --git a/deps/v8/test/cctest/test-assembler-arm64.cc b/deps/v8/test/cctest/test-assembler-arm64.cc
index 1728a9c7e7..05650ed233 100644
--- a/deps/v8/test/cctest/test-assembler-arm64.cc
+++ b/deps/v8/test/cctest/test-assembler-arm64.cc
@@ -173,15 +173,15 @@ static void InitializeVM() {
#else // ifdef USE_SIMULATOR.
// Run the test on real hardware or models.
-#define SETUP_SIZE(buf_size) \
- Isolate* isolate = CcTest::i_isolate(); \
- HandleScope scope(isolate); \
- CHECK(isolate != NULL); \
- size_t actual_size; \
- byte* buf = static_cast<byte*>( \
- v8::base::OS::Allocate(buf_size, &actual_size, true)); \
- MacroAssembler masm(isolate, buf, actual_size, \
- v8::internal::CodeObjectRequired::kYes); \
+#define SETUP_SIZE(buf_size) \
+ Isolate* isolate = CcTest::i_isolate(); \
+ HandleScope scope(isolate); \
+ CHECK(isolate != NULL); \
+ size_t actual_size; \
+ byte* buf = static_cast<byte*>( \
+ v8::base::OS::Allocate(buf_size, &actual_size, true)); \
+ MacroAssembler masm(isolate, buf, static_cast<unsigned>(actual_size), \
+ v8::internal::CodeObjectRequired::kYes); \
RegisterDump core;
#define RESET() \
@@ -841,11 +841,13 @@ TEST(bic) {
// field.
// Use x20 to preserve csp. We check for the result via x21 because the
// test infrastructure requires that csp be restored to its original value.
+ __ SetStackPointer(jssp); // Change stack pointer to avoid consistency check.
__ Mov(x20, csp);
__ Mov(x0, 0xffffff);
__ Bic(csp, x0, Operand(0xabcdef));
__ Mov(x21, csp);
__ Mov(csp, x20);
+ __ SetStackPointer(csp); // Restore stack pointer.
END();
RUN();
@@ -3742,6 +3744,77 @@ TEST(add_sub_zero) {
TEARDOWN();
}
+TEST(preshift_immediates) {
+ INIT_V8();
+ SETUP();
+
+ START();
+ // Test operations involving immediates that could be generated using a
+ // pre-shifted encodable immediate followed by a post-shift applied to
+ // the arithmetic or logical operation.
+
+ // Save csp and change stack pointer to avoid consistency check.
+ __ SetStackPointer(jssp);
+ __ Mov(x29, csp);
+
+ // Set the registers to known values.
+ __ Mov(x0, 0x1000);
+ __ Mov(csp, 0x1000);
+
+ // Arithmetic ops.
+ __ Add(x1, x0, 0x1f7de);
+ __ Add(w2, w0, 0xffffff1);
+ __ Adds(x3, x0, 0x18001);
+ __ Adds(w4, w0, 0xffffff1);
+ __ Add(x5, x0, 0x10100);
+ __ Sub(w6, w0, 0xffffff1);
+ __ Subs(x7, x0, 0x18001);
+ __ Subs(w8, w0, 0xffffff1);
+
+ // Logical ops.
+ __ And(x9, x0, 0x1f7de);
+ __ Orr(w10, w0, 0xffffff1);
+ __ Eor(x11, x0, 0x18001);
+
+ // Ops using the stack pointer.
+ __ Add(csp, csp, 0x1f7f0);
+ __ Mov(x12, csp);
+ __ Mov(csp, 0x1000);
+
+ __ Adds(x13, csp, 0x1f7f0);
+
+ __ Orr(csp, x0, 0x1f7f0);
+ __ Mov(x14, csp);
+ __ Mov(csp, 0x1000);
+
+ __ Add(csp, csp, 0x10100);
+ __ Mov(x15, csp);
+
+ // Restore csp.
+ __ Mov(csp, x29);
+ __ SetStackPointer(csp);
+ END();
+
+ RUN();
+
+ CHECK_EQUAL_64(0x1000, x0);
+ CHECK_EQUAL_64(0x207de, x1);
+ CHECK_EQUAL_64(0x10000ff1, x2);
+ CHECK_EQUAL_64(0x19001, x3);
+ CHECK_EQUAL_64(0x10000ff1, x4);
+ CHECK_EQUAL_64(0x11100, x5);
+ CHECK_EQUAL_64(0xf000100f, x6);
+ CHECK_EQUAL_64(0xfffffffffffe8fff, x7);
+ CHECK_EQUAL_64(0xf000100f, x8);
+ CHECK_EQUAL_64(0x1000, x9);
+ CHECK_EQUAL_64(0xffffff1, x10);
+ CHECK_EQUAL_64(0x207f0, x12);
+ CHECK_EQUAL_64(0x207f0, x13);
+ CHECK_EQUAL_64(0x1f7f0, x14);
+ CHECK_EQUAL_64(0x11100, x15);
+
+ TEARDOWN();
+}
TEST(claim_drop_zero) {
INIT_V8();
diff --git a/deps/v8/test/cctest/test-assembler-mips.cc b/deps/v8/test/cctest/test-assembler-mips.cc
index 2283d4978c..0d3dd096d0 100644
--- a/deps/v8/test/cctest/test-assembler-mips.cc
+++ b/deps/v8/test/cctest/test-assembler-mips.cc
@@ -5513,4 +5513,78 @@ TEST(maddf_msubf_d) {
});
}
+uint32_t run_Subu(uint32_t imm, int32_t num_instr) {
+ Isolate* isolate = CcTest::i_isolate();
+ HandleScope scope(isolate);
+
+ MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+
+ Label code_start;
+ __ bind(&code_start);
+ __ Subu(v0, zero_reg, imm);
+ CHECK_EQ(assm.SizeOfCodeGeneratedSince(&code_start),
+ num_instr * Assembler::kInstrSize);
+ __ jr(ra);
+ __ nop();
+
+ CodeDesc desc;
+ assm.GetCode(&desc);
+ Handle<Code> code = isolate->factory()->NewCode(
+ desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
+ F2 f = FUNCTION_CAST<F2>(code->entry());
+
+ uint32_t res = reinterpret_cast<uint32_t>(
+ CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+
+ return res;
+}
+
+TEST(Subu) {
+ CcTest::InitializeVM();
+
+ // Test Subu macro-instruction for min_int16 and max_int16 border cases.
+ // For subtracting int16 immediate values we use addiu.
+
+ struct TestCaseSubu {
+ uint32_t imm;
+ uint32_t expected_res;
+ int32_t num_instr;
+ };
+
+ // We call Subu(v0, zero_reg, imm) to test cases listed below.
+ // 0 - imm = expected_res
+ struct TestCaseSubu tc[] = {
+ // imm, expected_res, num_instr
+ {0xffff8000, 0x00008000, 2}, // min_int16
+ // Generates ori + addu
+ // We can't have just addiu because -min_int16 > max_int16 so use
+ // register. We can load min_int16 to at register with addiu and then
+ // subtract at with subu, but now we use ori + addu because -min_int16 can
+ // be loaded using ori.
+ {0x8000, 0xffff8000, 1}, // max_int16 + 1
+ // Generates addiu
+ // max_int16 + 1 is not int16 but -(max_int16 + 1) is, just use addiu.
+ {0xffff7fff, 0x8001, 2}, // min_int16 - 1
+ // Generates ori + addu
+ // To load this value to at we need two instructions and another one to
+ // subtract, lui + ori + subu. But we can load -value to at using just
+ // ori and then add at register with addu.
+ {0x8001, 0xffff7fff, 2}, // max_int16 + 2
+ // Generates ori + subu
+ // Not int16 but is uint16, load value to at with ori and subtract with
+ // subu.
+ {0x00010000, 0xffff0000, 2},
+ // Generates lui + subu
+ // Load value using lui to at and subtract with subu.
+ {0x00010001, 0xfffeffff, 3},
+ // Generates lui + ori + subu
+ // We have to generate three instructions in this case.
+ };
+
+ size_t nr_test_cases = sizeof(tc) / sizeof(TestCaseSubu);
+ for (size_t i = 0; i < nr_test_cases; ++i) {
+ CHECK_EQ(tc[i].expected_res, run_Subu(tc[i].imm, tc[i].num_instr));
+ }
+}
+
#undef __
diff --git a/deps/v8/test/cctest/test-assembler-mips64.cc b/deps/v8/test/cctest/test-assembler-mips64.cc
index 5875f1e79d..d796b4faad 100644
--- a/deps/v8/test/cctest/test-assembler-mips64.cc
+++ b/deps/v8/test/cctest/test-assembler-mips64.cc
@@ -288,61 +288,61 @@ TEST(MIPS3) {
Label L, C;
// Double precision floating point instructions.
- __ ldc1(f4, MemOperand(a0, offsetof(T, a)) );
- __ ldc1(f6, MemOperand(a0, offsetof(T, b)) );
+ __ Ldc1(f4, MemOperand(a0, offsetof(T, a)));
+ __ Ldc1(f6, MemOperand(a0, offsetof(T, b)));
__ add_d(f8, f4, f6);
- __ sdc1(f8, MemOperand(a0, offsetof(T, c)) ); // c = a + b.
+ __ Sdc1(f8, MemOperand(a0, offsetof(T, c))); // c = a + b.
__ mov_d(f10, f8); // c
__ neg_d(f12, f6); // -b
__ sub_d(f10, f10, f12);
- __ sdc1(f10, MemOperand(a0, offsetof(T, d)) ); // d = c - (-b).
+ __ Sdc1(f10, MemOperand(a0, offsetof(T, d))); // d = c - (-b).
- __ sdc1(f4, MemOperand(a0, offsetof(T, b)) ); // b = a.
+ __ Sdc1(f4, MemOperand(a0, offsetof(T, b))); // b = a.
__ li(a4, 120);
__ mtc1(a4, f14);
__ cvt_d_w(f14, f14); // f14 = 120.0.
__ mul_d(f10, f10, f14);
- __ sdc1(f10, MemOperand(a0, offsetof(T, e)) ); // e = d * 120 = 1.8066e16.
+ __ Sdc1(f10, MemOperand(a0, offsetof(T, e))); // e = d * 120 = 1.8066e16.
__ div_d(f12, f10, f4);
- __ sdc1(f12, MemOperand(a0, offsetof(T, f)) ); // f = e / a = 120.44.
+ __ Sdc1(f12, MemOperand(a0, offsetof(T, f))); // f = e / a = 120.44.
__ sqrt_d(f14, f12);
- __ sdc1(f14, MemOperand(a0, offsetof(T, g)) );
+ __ Sdc1(f14, MemOperand(a0, offsetof(T, g)));
// g = sqrt(f) = 10.97451593465515908537
if (kArchVariant == kMips64r2) {
- __ ldc1(f4, MemOperand(a0, offsetof(T, h)) );
- __ ldc1(f6, MemOperand(a0, offsetof(T, i)) );
+ __ Ldc1(f4, MemOperand(a0, offsetof(T, h)));
+ __ Ldc1(f6, MemOperand(a0, offsetof(T, i)));
__ madd_d(f14, f6, f4, f6);
- __ sdc1(f14, MemOperand(a0, offsetof(T, h)) );
+ __ Sdc1(f14, MemOperand(a0, offsetof(T, h)));
}
// Single precision floating point instructions.
- __ lwc1(f4, MemOperand(a0, offsetof(T, fa)) );
- __ lwc1(f6, MemOperand(a0, offsetof(T, fb)) );
+ __ Lwc1(f4, MemOperand(a0, offsetof(T, fa)));
+ __ Lwc1(f6, MemOperand(a0, offsetof(T, fb)));
__ add_s(f8, f4, f6);
- __ swc1(f8, MemOperand(a0, offsetof(T, fc)) ); // fc = fa + fb.
+ __ Swc1(f8, MemOperand(a0, offsetof(T, fc))); // fc = fa + fb.
__ neg_s(f10, f6); // -fb
__ sub_s(f10, f8, f10);
- __ swc1(f10, MemOperand(a0, offsetof(T, fd)) ); // fd = fc - (-fb).
+ __ Swc1(f10, MemOperand(a0, offsetof(T, fd))); // fd = fc - (-fb).
- __ swc1(f4, MemOperand(a0, offsetof(T, fb)) ); // fb = fa.
+ __ Swc1(f4, MemOperand(a0, offsetof(T, fb))); // fb = fa.
__ li(t0, 120);
__ mtc1(t0, f14);
__ cvt_s_w(f14, f14); // f14 = 120.0.
__ mul_s(f10, f10, f14);
- __ swc1(f10, MemOperand(a0, offsetof(T, fe)) ); // fe = fd * 120
+ __ Swc1(f10, MemOperand(a0, offsetof(T, fe))); // fe = fd * 120
__ div_s(f12, f10, f4);
- __ swc1(f12, MemOperand(a0, offsetof(T, ff)) ); // ff = fe / fa
+ __ Swc1(f12, MemOperand(a0, offsetof(T, ff))); // ff = fe / fa
__ sqrt_s(f14, f12);
- __ swc1(f14, MemOperand(a0, offsetof(T, fg)) );
+ __ Swc1(f14, MemOperand(a0, offsetof(T, fg)));
__ jr(ra);
__ nop();
@@ -408,11 +408,11 @@ TEST(MIPS4) {
} T;
T t;
- Assembler assm(isolate, NULL, 0);
+ MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
Label L, C;
- __ ldc1(f4, MemOperand(a0, offsetof(T, a)));
- __ ldc1(f5, MemOperand(a0, offsetof(T, b)));
+ __ Ldc1(f4, MemOperand(a0, offsetof(T, a)));
+ __ Ldc1(f5, MemOperand(a0, offsetof(T, b)));
// Swap f4 and f5, by using 3 integer registers, a4-a6,
// both two 32-bit chunks, and one 64-bit chunk.
@@ -427,16 +427,16 @@ TEST(MIPS4) {
__ dmtc1(a6, f4);
// Store the swapped f4 and f5 back to memory.
- __ sdc1(f4, MemOperand(a0, offsetof(T, a)));
- __ sdc1(f5, MemOperand(a0, offsetof(T, c)));
+ __ Sdc1(f4, MemOperand(a0, offsetof(T, a)));
+ __ Sdc1(f5, MemOperand(a0, offsetof(T, c)));
// Test sign extension of move operations from coprocessor.
- __ ldc1(f4, MemOperand(a0, offsetof(T, d)));
+ __ Ldc1(f4, MemOperand(a0, offsetof(T, d)));
__ mfhc1(a4, f4);
__ mfc1(a5, f4);
- __ sd(a4, MemOperand(a0, offsetof(T, high)));
- __ sd(a5, MemOperand(a0, offsetof(T, low)));
+ __ Sd(a4, MemOperand(a0, offsetof(T, high)));
+ __ Sd(a5, MemOperand(a0, offsetof(T, low)));
__ jr(ra);
__ nop();
@@ -475,34 +475,34 @@ TEST(MIPS5) {
} T;
T t;
- Assembler assm(isolate, NULL, 0);
+ MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
Label L, C;
// Load all structure elements to registers.
- __ ldc1(f4, MemOperand(a0, offsetof(T, a)) );
- __ ldc1(f6, MemOperand(a0, offsetof(T, b)) );
- __ lw(a4, MemOperand(a0, offsetof(T, i)) );
- __ lw(a5, MemOperand(a0, offsetof(T, j)) );
+ __ Ldc1(f4, MemOperand(a0, offsetof(T, a)));
+ __ Ldc1(f6, MemOperand(a0, offsetof(T, b)));
+ __ Lw(a4, MemOperand(a0, offsetof(T, i)));
+ __ Lw(a5, MemOperand(a0, offsetof(T, j)));
// Convert double in f4 to int in element i.
__ cvt_w_d(f8, f4);
__ mfc1(a6, f8);
- __ sw(a6, MemOperand(a0, offsetof(T, i)) );
+ __ Sw(a6, MemOperand(a0, offsetof(T, i)));
// Convert double in f6 to int in element j.
__ cvt_w_d(f10, f6);
__ mfc1(a7, f10);
- __ sw(a7, MemOperand(a0, offsetof(T, j)) );
+ __ Sw(a7, MemOperand(a0, offsetof(T, j)));
// Convert int in original i (a4) to double in a.
__ mtc1(a4, f12);
__ cvt_d_w(f0, f12);
- __ sdc1(f0, MemOperand(a0, offsetof(T, a)) );
+ __ Sdc1(f0, MemOperand(a0, offsetof(T, a)));
// Convert int in original j (a5) to double in b.
__ mtc1(a5, f14);
__ cvt_d_w(f2, f14);
- __ sdc1(f2, MemOperand(a0, offsetof(T, b)) );
+ __ Sdc1(f2, MemOperand(a0, offsetof(T, b)));
__ jr(ra);
__ nop();
@@ -544,35 +544,35 @@ TEST(MIPS6) {
} T;
T t;
- Assembler assm(isolate, NULL, 0);
+ MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
Label L, C;
// Basic word load/store.
- __ lw(a4, MemOperand(a0, offsetof(T, ui)) );
- __ sw(a4, MemOperand(a0, offsetof(T, r1)) );
+ __ Lw(a4, MemOperand(a0, offsetof(T, ui)));
+ __ Sw(a4, MemOperand(a0, offsetof(T, r1)));
// lh with positive data.
- __ lh(a5, MemOperand(a0, offsetof(T, ui)) );
- __ sw(a5, MemOperand(a0, offsetof(T, r2)) );
+ __ Lh(a5, MemOperand(a0, offsetof(T, ui)));
+ __ Sw(a5, MemOperand(a0, offsetof(T, r2)));
// lh with negative data.
- __ lh(a6, MemOperand(a0, offsetof(T, si)) );
- __ sw(a6, MemOperand(a0, offsetof(T, r3)) );
+ __ Lh(a6, MemOperand(a0, offsetof(T, si)));
+ __ Sw(a6, MemOperand(a0, offsetof(T, r3)));
// lhu with negative data.
- __ lhu(a7, MemOperand(a0, offsetof(T, si)) );
- __ sw(a7, MemOperand(a0, offsetof(T, r4)) );
+ __ Lhu(a7, MemOperand(a0, offsetof(T, si)));
+ __ Sw(a7, MemOperand(a0, offsetof(T, r4)));
- // lb with negative data.
- __ lb(t0, MemOperand(a0, offsetof(T, si)) );
- __ sw(t0, MemOperand(a0, offsetof(T, r5)) );
+ // Lb with negative data.
+ __ Lb(t0, MemOperand(a0, offsetof(T, si)));
+ __ Sw(t0, MemOperand(a0, offsetof(T, r5)));
// sh writes only 1/2 of word.
__ lui(t1, 0x3333);
__ ori(t1, t1, 0x3333);
- __ sw(t1, MemOperand(a0, offsetof(T, r6)) );
- __ lhu(t1, MemOperand(a0, offsetof(T, si)) );
- __ sh(t1, MemOperand(a0, offsetof(T, r6)) );
+ __ Sw(t1, MemOperand(a0, offsetof(T, r6)));
+ __ Lhu(t1, MemOperand(a0, offsetof(T, si)));
+ __ Sh(t1, MemOperand(a0, offsetof(T, r6)));
__ jr(ra);
__ nop();
@@ -626,8 +626,8 @@ TEST(MIPS7) {
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
Label neither_is_nan, less_than, outa_here;
- __ ldc1(f4, MemOperand(a0, offsetof(T, a)) );
- __ ldc1(f6, MemOperand(a0, offsetof(T, b)) );
+ __ Ldc1(f4, MemOperand(a0, offsetof(T, a)));
+ __ Ldc1(f6, MemOperand(a0, offsetof(T, b)));
if (kArchVariant != kMips64r6) {
__ c(UN, D, f4, f6);
__ bc1f(&neither_is_nan);
@@ -636,7 +636,7 @@ TEST(MIPS7) {
__ bc1eqz(&neither_is_nan, f2);
}
__ nop();
- __ sw(zero_reg, MemOperand(a0, offsetof(T, result)) );
+ __ Sw(zero_reg, MemOperand(a0, offsetof(T, result)));
__ Branch(&outa_here);
__ bind(&neither_is_nan);
@@ -650,13 +650,12 @@ TEST(MIPS7) {
}
__ nop();
- __ sw(zero_reg, MemOperand(a0, offsetof(T, result)) );
+ __ Sw(zero_reg, MemOperand(a0, offsetof(T, result)));
__ Branch(&outa_here);
__ bind(&less_than);
__ Addu(a4, zero_reg, Operand(1));
- __ sw(a4, MemOperand(a0, offsetof(T, result)) ); // Set true.
-
+ __ Sw(a4, MemOperand(a0, offsetof(T, result))); // Set true.
// This test-case should have additional tests.
@@ -715,7 +714,7 @@ TEST(MIPS8) {
v8::internal::CodeObjectRequired::kYes);
// Basic word load.
- __ lw(a4, MemOperand(a0, offsetof(T, input)) );
+ __ Lw(a4, MemOperand(a0, offsetof(T, input)));
// ROTR instruction (called through the Ror macro).
__ Ror(a5, a4, 0x0004);
@@ -727,13 +726,13 @@ TEST(MIPS8) {
__ Ror(t3, a4, 0x001c);
// Basic word store.
- __ sw(a5, MemOperand(a0, offsetof(T, result_rotr_4)) );
- __ sw(a6, MemOperand(a0, offsetof(T, result_rotr_8)) );
- __ sw(a7, MemOperand(a0, offsetof(T, result_rotr_12)) );
- __ sw(t0, MemOperand(a0, offsetof(T, result_rotr_16)) );
- __ sw(t1, MemOperand(a0, offsetof(T, result_rotr_20)) );
- __ sw(t2, MemOperand(a0, offsetof(T, result_rotr_24)) );
- __ sw(t3, MemOperand(a0, offsetof(T, result_rotr_28)) );
+ __ Sw(a5, MemOperand(a0, offsetof(T, result_rotr_4)));
+ __ Sw(a6, MemOperand(a0, offsetof(T, result_rotr_8)));
+ __ Sw(a7, MemOperand(a0, offsetof(T, result_rotr_12)));
+ __ Sw(t0, MemOperand(a0, offsetof(T, result_rotr_16)));
+ __ Sw(t1, MemOperand(a0, offsetof(T, result_rotr_20)));
+ __ Sw(t2, MemOperand(a0, offsetof(T, result_rotr_24)));
+ __ Sw(t3, MemOperand(a0, offsetof(T, result_rotr_28)));
// ROTRV instruction (called through the Ror macro).
__ li(t3, 0x0004);
@@ -752,13 +751,13 @@ TEST(MIPS8) {
__ Ror(t3, a4, t3);
// Basic word store.
- __ sw(a5, MemOperand(a0, offsetof(T, result_rotrv_4)) );
- __ sw(a6, MemOperand(a0, offsetof(T, result_rotrv_8)) );
- __ sw(a7, MemOperand(a0, offsetof(T, result_rotrv_12)) );
- __ sw(t0, MemOperand(a0, offsetof(T, result_rotrv_16)) );
- __ sw(t1, MemOperand(a0, offsetof(T, result_rotrv_20)) );
- __ sw(t2, MemOperand(a0, offsetof(T, result_rotrv_24)) );
- __ sw(t3, MemOperand(a0, offsetof(T, result_rotrv_28)) );
+ __ Sw(a5, MemOperand(a0, offsetof(T, result_rotrv_4)));
+ __ Sw(a6, MemOperand(a0, offsetof(T, result_rotrv_8)));
+ __ Sw(a7, MemOperand(a0, offsetof(T, result_rotrv_12)));
+ __ Sw(t0, MemOperand(a0, offsetof(T, result_rotrv_16)));
+ __ Sw(t1, MemOperand(a0, offsetof(T, result_rotrv_20)));
+ __ Sw(t2, MemOperand(a0, offsetof(T, result_rotrv_24)));
+ __ Sw(t3, MemOperand(a0, offsetof(T, result_rotrv_28)));
__ jr(ra);
__ nop();
@@ -838,7 +837,7 @@ TEST(MIPS10) {
} T;
T t;
- Assembler assm(isolate, NULL, 0);
+ MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
Label L, C;
if (kArchVariant == kMips64r2) {
@@ -846,43 +845,41 @@ TEST(MIPS10) {
// - 32 FP regs of 64-bits each, no odd/even pairs.
// - Note that cvt_l_d/cvt_d_l ARE legal in FR=1 mode.
// Load all structure elements to registers.
- __ ldc1(f0, MemOperand(a0, offsetof(T, a)));
+ __ Ldc1(f0, MemOperand(a0, offsetof(T, a)));
// Save the raw bits of the double.
__ mfc1(a4, f0);
__ mfhc1(a5, f0);
- __ sw(a4, MemOperand(a0, offsetof(T, dbl_mant)));
- __ sw(a5, MemOperand(a0, offsetof(T, dbl_exp)));
+ __ Sw(a4, MemOperand(a0, offsetof(T, dbl_mant)));
+ __ Sw(a5, MemOperand(a0, offsetof(T, dbl_exp)));
// Convert double in f0 to long, save hi/lo parts.
__ cvt_l_d(f0, f0);
__ mfc1(a4, f0); // f0 LS 32 bits of long.
__ mfhc1(a5, f0); // f0 MS 32 bits of long.
- __ sw(a4, MemOperand(a0, offsetof(T, long_lo)));
- __ sw(a5, MemOperand(a0, offsetof(T, long_hi)));
+ __ Sw(a4, MemOperand(a0, offsetof(T, long_lo)));
+ __ Sw(a5, MemOperand(a0, offsetof(T, long_hi)));
// Combine the high/low ints, convert back to double.
__ dsll32(a6, a5, 0); // Move a5 to high bits of a6.
__ or_(a6, a6, a4);
__ dmtc1(a6, f1);
__ cvt_d_l(f1, f1);
- __ sdc1(f1, MemOperand(a0, offsetof(T, a_converted)));
-
+ __ Sdc1(f1, MemOperand(a0, offsetof(T, a_converted)));
// Convert the b long integers to double b.
- __ lw(a4, MemOperand(a0, offsetof(T, b_long_lo)));
- __ lw(a5, MemOperand(a0, offsetof(T, b_long_hi)));
+ __ Lw(a4, MemOperand(a0, offsetof(T, b_long_lo)));
+ __ Lw(a5, MemOperand(a0, offsetof(T, b_long_hi)));
__ mtc1(a4, f8); // f8 LS 32-bits.
__ mthc1(a5, f8); // f8 MS 32-bits.
__ cvt_d_l(f10, f8);
- __ sdc1(f10, MemOperand(a0, offsetof(T, b)));
+ __ Sdc1(f10, MemOperand(a0, offsetof(T, b)));
// Convert double b back to long-int.
- __ ldc1(f31, MemOperand(a0, offsetof(T, b)));
+ __ Ldc1(f31, MemOperand(a0, offsetof(T, b)));
__ cvt_l_d(f31, f31);
__ dmfc1(a7, f31);
- __ sd(a7, MemOperand(a0, offsetof(T, b_long_as_int64)));
-
+ __ Sd(a7, MemOperand(a0, offsetof(T, b_long_as_int64)));
__ jr(ra);
__ nop();
@@ -941,82 +938,83 @@ TEST(MIPS11) {
} T;
T t;
- Assembler assm(isolate, NULL, 0);
+ MacroAssembler assm(isolate, NULL, 0,
+ v8::internal::CodeObjectRequired::kYes);
// Test all combinations of LWL and vAddr.
- __ lw(a4, MemOperand(a0, offsetof(T, reg_init)));
+ __ Lw(a4, MemOperand(a0, offsetof(T, reg_init)));
__ lwl(a4, MemOperand(a0, offsetof(T, mem_init)));
- __ sw(a4, MemOperand(a0, offsetof(T, lwl_0)));
+ __ Sw(a4, MemOperand(a0, offsetof(T, lwl_0)));
- __ lw(a5, MemOperand(a0, offsetof(T, reg_init)));
+ __ Lw(a5, MemOperand(a0, offsetof(T, reg_init)));
__ lwl(a5, MemOperand(a0, offsetof(T, mem_init) + 1));
- __ sw(a5, MemOperand(a0, offsetof(T, lwl_1)));
+ __ Sw(a5, MemOperand(a0, offsetof(T, lwl_1)));
- __ lw(a6, MemOperand(a0, offsetof(T, reg_init)));
+ __ Lw(a6, MemOperand(a0, offsetof(T, reg_init)));
__ lwl(a6, MemOperand(a0, offsetof(T, mem_init) + 2));
- __ sw(a6, MemOperand(a0, offsetof(T, lwl_2)));
+ __ Sw(a6, MemOperand(a0, offsetof(T, lwl_2)));
- __ lw(a7, MemOperand(a0, offsetof(T, reg_init)));
+ __ Lw(a7, MemOperand(a0, offsetof(T, reg_init)));
__ lwl(a7, MemOperand(a0, offsetof(T, mem_init) + 3));
- __ sw(a7, MemOperand(a0, offsetof(T, lwl_3)));
+ __ Sw(a7, MemOperand(a0, offsetof(T, lwl_3)));
// Test all combinations of LWR and vAddr.
- __ lw(a4, MemOperand(a0, offsetof(T, reg_init)));
+ __ Lw(a4, MemOperand(a0, offsetof(T, reg_init)));
__ lwr(a4, MemOperand(a0, offsetof(T, mem_init)));
- __ sw(a4, MemOperand(a0, offsetof(T, lwr_0)));
+ __ Sw(a4, MemOperand(a0, offsetof(T, lwr_0)));
- __ lw(a5, MemOperand(a0, offsetof(T, reg_init)));
+ __ Lw(a5, MemOperand(a0, offsetof(T, reg_init)));
__ lwr(a5, MemOperand(a0, offsetof(T, mem_init) + 1));
- __ sw(a5, MemOperand(a0, offsetof(T, lwr_1)));
+ __ Sw(a5, MemOperand(a0, offsetof(T, lwr_1)));
- __ lw(a6, MemOperand(a0, offsetof(T, reg_init)));
+ __ Lw(a6, MemOperand(a0, offsetof(T, reg_init)));
__ lwr(a6, MemOperand(a0, offsetof(T, mem_init) + 2));
- __ sw(a6, MemOperand(a0, offsetof(T, lwr_2)) );
+ __ Sw(a6, MemOperand(a0, offsetof(T, lwr_2)));
- __ lw(a7, MemOperand(a0, offsetof(T, reg_init)));
+ __ Lw(a7, MemOperand(a0, offsetof(T, reg_init)));
__ lwr(a7, MemOperand(a0, offsetof(T, mem_init) + 3));
- __ sw(a7, MemOperand(a0, offsetof(T, lwr_3)) );
+ __ Sw(a7, MemOperand(a0, offsetof(T, lwr_3)));
// Test all combinations of SWL and vAddr.
- __ lw(a4, MemOperand(a0, offsetof(T, mem_init)));
- __ sw(a4, MemOperand(a0, offsetof(T, swl_0)));
- __ lw(a4, MemOperand(a0, offsetof(T, reg_init)));
+ __ Lw(a4, MemOperand(a0, offsetof(T, mem_init)));
+ __ Sw(a4, MemOperand(a0, offsetof(T, swl_0)));
+ __ Lw(a4, MemOperand(a0, offsetof(T, reg_init)));
__ swl(a4, MemOperand(a0, offsetof(T, swl_0)));
- __ lw(a5, MemOperand(a0, offsetof(T, mem_init)));
- __ sw(a5, MemOperand(a0, offsetof(T, swl_1)));
- __ lw(a5, MemOperand(a0, offsetof(T, reg_init)));
+ __ Lw(a5, MemOperand(a0, offsetof(T, mem_init)));
+ __ Sw(a5, MemOperand(a0, offsetof(T, swl_1)));
+ __ Lw(a5, MemOperand(a0, offsetof(T, reg_init)));
__ swl(a5, MemOperand(a0, offsetof(T, swl_1) + 1));
- __ lw(a6, MemOperand(a0, offsetof(T, mem_init)));
- __ sw(a6, MemOperand(a0, offsetof(T, swl_2)));
- __ lw(a6, MemOperand(a0, offsetof(T, reg_init)));
+ __ Lw(a6, MemOperand(a0, offsetof(T, mem_init)));
+ __ Sw(a6, MemOperand(a0, offsetof(T, swl_2)));
+ __ Lw(a6, MemOperand(a0, offsetof(T, reg_init)));
__ swl(a6, MemOperand(a0, offsetof(T, swl_2) + 2));
- __ lw(a7, MemOperand(a0, offsetof(T, mem_init)));
- __ sw(a7, MemOperand(a0, offsetof(T, swl_3)));
- __ lw(a7, MemOperand(a0, offsetof(T, reg_init)));
+ __ Lw(a7, MemOperand(a0, offsetof(T, mem_init)));
+ __ Sw(a7, MemOperand(a0, offsetof(T, swl_3)));
+ __ Lw(a7, MemOperand(a0, offsetof(T, reg_init)));
__ swl(a7, MemOperand(a0, offsetof(T, swl_3) + 3));
// Test all combinations of SWR and vAddr.
- __ lw(a4, MemOperand(a0, offsetof(T, mem_init)));
- __ sw(a4, MemOperand(a0, offsetof(T, swr_0)));
- __ lw(a4, MemOperand(a0, offsetof(T, reg_init)));
+ __ Lw(a4, MemOperand(a0, offsetof(T, mem_init)));
+ __ Sw(a4, MemOperand(a0, offsetof(T, swr_0)));
+ __ Lw(a4, MemOperand(a0, offsetof(T, reg_init)));
__ swr(a4, MemOperand(a0, offsetof(T, swr_0)));
- __ lw(a5, MemOperand(a0, offsetof(T, mem_init)));
- __ sw(a5, MemOperand(a0, offsetof(T, swr_1)));
- __ lw(a5, MemOperand(a0, offsetof(T, reg_init)));
+ __ Lw(a5, MemOperand(a0, offsetof(T, mem_init)));
+ __ Sw(a5, MemOperand(a0, offsetof(T, swr_1)));
+ __ Lw(a5, MemOperand(a0, offsetof(T, reg_init)));
__ swr(a5, MemOperand(a0, offsetof(T, swr_1) + 1));
- __ lw(a6, MemOperand(a0, offsetof(T, mem_init)));
- __ sw(a6, MemOperand(a0, offsetof(T, swr_2)));
- __ lw(a6, MemOperand(a0, offsetof(T, reg_init)));
+ __ Lw(a6, MemOperand(a0, offsetof(T, mem_init)));
+ __ Sw(a6, MemOperand(a0, offsetof(T, swr_2)));
+ __ Lw(a6, MemOperand(a0, offsetof(T, reg_init)));
__ swr(a6, MemOperand(a0, offsetof(T, swr_2) + 2));
- __ lw(a7, MemOperand(a0, offsetof(T, mem_init)));
- __ sw(a7, MemOperand(a0, offsetof(T, swr_3)));
- __ lw(a7, MemOperand(a0, offsetof(T, reg_init)));
+ __ Lw(a7, MemOperand(a0, offsetof(T, mem_init)));
+ __ Sw(a7, MemOperand(a0, offsetof(T, swr_3)));
+ __ Lw(a7, MemOperand(a0, offsetof(T, reg_init)));
__ swr(a7, MemOperand(a0, offsetof(T, swr_3) + 3));
__ jr(ra);
@@ -1097,8 +1095,8 @@ TEST(MIPS12) {
__ mov(t2, fp); // Save frame pointer.
__ mov(fp, a0); // Access struct T by fp.
- __ lw(a4, MemOperand(a0, offsetof(T, y)));
- __ lw(a7, MemOperand(a0, offsetof(T, y4)));
+ __ Lw(a4, MemOperand(a0, offsetof(T, y)));
+ __ Lw(a7, MemOperand(a0, offsetof(T, y4)));
__ addu(a5, a4, a7);
__ subu(t0, a4, a7);
@@ -1116,30 +1114,30 @@ TEST(MIPS12) {
__ push(a7);
__ pop(t0);
__ nop();
- __ sw(a4, MemOperand(fp, offsetof(T, y)));
- __ lw(a4, MemOperand(fp, offsetof(T, y)));
+ __ Sw(a4, MemOperand(fp, offsetof(T, y)));
+ __ Lw(a4, MemOperand(fp, offsetof(T, y)));
__ nop();
- __ sw(a4, MemOperand(fp, offsetof(T, y)));
- __ lw(a5, MemOperand(fp, offsetof(T, y)));
+ __ Sw(a4, MemOperand(fp, offsetof(T, y)));
+ __ Lw(a5, MemOperand(fp, offsetof(T, y)));
__ nop();
__ push(a5);
- __ lw(a5, MemOperand(fp, offsetof(T, y)));
+ __ Lw(a5, MemOperand(fp, offsetof(T, y)));
__ pop(a5);
__ nop();
__ push(a5);
- __ lw(a6, MemOperand(fp, offsetof(T, y)));
+ __ Lw(a6, MemOperand(fp, offsetof(T, y)));
__ pop(a5);
__ nop();
__ push(a5);
- __ lw(a6, MemOperand(fp, offsetof(T, y)));
+ __ Lw(a6, MemOperand(fp, offsetof(T, y)));
__ pop(a6);
__ nop();
__ push(a6);
- __ lw(a6, MemOperand(fp, offsetof(T, y)));
+ __ Lw(a6, MemOperand(fp, offsetof(T, y)));
__ pop(a5);
__ nop();
__ push(a5);
- __ lw(a6, MemOperand(fp, offsetof(T, y)));
+ __ Lw(a6, MemOperand(fp, offsetof(T, y)));
__ pop(a7);
__ nop();
@@ -1184,19 +1182,19 @@ TEST(MIPS13) {
MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
- __ sw(a4, MemOperand(a0, offsetof(T, cvt_small_in)));
+ __ Sw(a4, MemOperand(a0, offsetof(T, cvt_small_in)));
__ Cvt_d_uw(f10, a4);
- __ sdc1(f10, MemOperand(a0, offsetof(T, cvt_small_out)));
+ __ Sdc1(f10, MemOperand(a0, offsetof(T, cvt_small_out)));
__ Trunc_uw_d(f10, f10, f4);
- __ swc1(f10, MemOperand(a0, offsetof(T, trunc_small_out)));
+ __ Swc1(f10, MemOperand(a0, offsetof(T, trunc_small_out)));
- __ sw(a4, MemOperand(a0, offsetof(T, cvt_big_in)));
+ __ Sw(a4, MemOperand(a0, offsetof(T, cvt_big_in)));
__ Cvt_d_uw(f8, a4);
- __ sdc1(f8, MemOperand(a0, offsetof(T, cvt_big_out)));
+ __ Sdc1(f8, MemOperand(a0, offsetof(T, cvt_big_out)));
__ Trunc_uw_d(f8, f8, f4);
- __ swc1(f8, MemOperand(a0, offsetof(T, trunc_big_out)));
+ __ Swc1(f8, MemOperand(a0, offsetof(T, trunc_big_out)));
__ jr(ra);
__ nop();
@@ -1266,49 +1264,49 @@ TEST(MIPS14) {
__ cfc1(a1, FCSR);
// Disable FPU exceptions.
__ ctc1(zero_reg, FCSR);
-#define RUN_ROUND_TEST(x) \
- __ cfc1(t0, FCSR);\
- __ sw(t0, MemOperand(a0, offsetof(T, x##_isNaN2008))); \
- __ ldc1(f0, MemOperand(a0, offsetof(T, round_up_in))); \
- __ x##_w_d(f0, f0); \
- __ swc1(f0, MemOperand(a0, offsetof(T, x##_up_out))); \
- \
- __ ldc1(f0, MemOperand(a0, offsetof(T, round_down_in))); \
- __ x##_w_d(f0, f0); \
- __ swc1(f0, MemOperand(a0, offsetof(T, x##_down_out))); \
- \
- __ ldc1(f0, MemOperand(a0, offsetof(T, neg_round_up_in))); \
- __ x##_w_d(f0, f0); \
- __ swc1(f0, MemOperand(a0, offsetof(T, neg_##x##_up_out))); \
- \
- __ ldc1(f0, MemOperand(a0, offsetof(T, neg_round_down_in))); \
- __ x##_w_d(f0, f0); \
- __ swc1(f0, MemOperand(a0, offsetof(T, neg_##x##_down_out))); \
- \
- __ ldc1(f0, MemOperand(a0, offsetof(T, err1_in))); \
- __ ctc1(zero_reg, FCSR); \
- __ x##_w_d(f0, f0); \
- __ cfc1(a2, FCSR); \
- __ sw(a2, MemOperand(a0, offsetof(T, x##_err1_out))); \
- \
- __ ldc1(f0, MemOperand(a0, offsetof(T, err2_in))); \
- __ ctc1(zero_reg, FCSR); \
- __ x##_w_d(f0, f0); \
- __ cfc1(a2, FCSR); \
- __ sw(a2, MemOperand(a0, offsetof(T, x##_err2_out))); \
- \
- __ ldc1(f0, MemOperand(a0, offsetof(T, err3_in))); \
- __ ctc1(zero_reg, FCSR); \
- __ x##_w_d(f0, f0); \
- __ cfc1(a2, FCSR); \
- __ sw(a2, MemOperand(a0, offsetof(T, x##_err3_out))); \
- \
- __ ldc1(f0, MemOperand(a0, offsetof(T, err4_in))); \
- __ ctc1(zero_reg, FCSR); \
- __ x##_w_d(f0, f0); \
- __ cfc1(a2, FCSR); \
- __ sw(a2, MemOperand(a0, offsetof(T, x##_err4_out))); \
- __ swc1(f0, MemOperand(a0, offsetof(T, x##_invalid_result)));
+#define RUN_ROUND_TEST(x) \
+ __ cfc1(t0, FCSR); \
+ __ Sw(t0, MemOperand(a0, offsetof(T, x##_isNaN2008))); \
+ __ Ldc1(f0, MemOperand(a0, offsetof(T, round_up_in))); \
+ __ x##_w_d(f0, f0); \
+ __ Swc1(f0, MemOperand(a0, offsetof(T, x##_up_out))); \
+ \
+ __ Ldc1(f0, MemOperand(a0, offsetof(T, round_down_in))); \
+ __ x##_w_d(f0, f0); \
+ __ Swc1(f0, MemOperand(a0, offsetof(T, x##_down_out))); \
+ \
+ __ Ldc1(f0, MemOperand(a0, offsetof(T, neg_round_up_in))); \
+ __ x##_w_d(f0, f0); \
+ __ Swc1(f0, MemOperand(a0, offsetof(T, neg_##x##_up_out))); \
+ \
+ __ Ldc1(f0, MemOperand(a0, offsetof(T, neg_round_down_in))); \
+ __ x##_w_d(f0, f0); \
+ __ Swc1(f0, MemOperand(a0, offsetof(T, neg_##x##_down_out))); \
+ \
+ __ Ldc1(f0, MemOperand(a0, offsetof(T, err1_in))); \
+ __ ctc1(zero_reg, FCSR); \
+ __ x##_w_d(f0, f0); \
+ __ cfc1(a2, FCSR); \
+ __ Sw(a2, MemOperand(a0, offsetof(T, x##_err1_out))); \
+ \
+ __ Ldc1(f0, MemOperand(a0, offsetof(T, err2_in))); \
+ __ ctc1(zero_reg, FCSR); \
+ __ x##_w_d(f0, f0); \
+ __ cfc1(a2, FCSR); \
+ __ Sw(a2, MemOperand(a0, offsetof(T, x##_err2_out))); \
+ \
+ __ Ldc1(f0, MemOperand(a0, offsetof(T, err3_in))); \
+ __ ctc1(zero_reg, FCSR); \
+ __ x##_w_d(f0, f0); \
+ __ cfc1(a2, FCSR); \
+ __ Sw(a2, MemOperand(a0, offsetof(T, x##_err3_out))); \
+ \
+ __ Ldc1(f0, MemOperand(a0, offsetof(T, err4_in))); \
+ __ ctc1(zero_reg, FCSR); \
+ __ x##_w_d(f0, f0); \
+ __ cfc1(a2, FCSR); \
+ __ Sw(a2, MemOperand(a0, offsetof(T, x##_err4_out))); \
+ __ Swc1(f0, MemOperand(a0, offsetof(T, x##_invalid_result)));
RUN_ROUND_TEST(round)
RUN_ROUND_TEST(floor)
@@ -1403,51 +1401,51 @@ TEST(MIPS16) {
};
T t;
- Assembler assm(isolate, NULL, 0);
+ MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
Label L, C;
// Basic 32-bit word load/store, with un-signed data.
- __ lw(a4, MemOperand(a0, offsetof(T, ui)));
- __ sw(a4, MemOperand(a0, offsetof(T, r1)));
+ __ Lw(a4, MemOperand(a0, offsetof(T, ui)));
+ __ Sw(a4, MemOperand(a0, offsetof(T, r1)));
// Check that the data got zero-extended into 64-bit a4.
- __ sd(a4, MemOperand(a0, offsetof(T, r2)));
+ __ Sd(a4, MemOperand(a0, offsetof(T, r2)));
// Basic 32-bit word load/store, with SIGNED data.
- __ lw(a5, MemOperand(a0, offsetof(T, si)));
- __ sw(a5, MemOperand(a0, offsetof(T, r3)));
+ __ Lw(a5, MemOperand(a0, offsetof(T, si)));
+ __ Sw(a5, MemOperand(a0, offsetof(T, r3)));
// Check that the data got sign-extended into 64-bit a4.
- __ sd(a5, MemOperand(a0, offsetof(T, r4)));
+ __ Sd(a5, MemOperand(a0, offsetof(T, r4)));
// 32-bit UNSIGNED word load/store, with SIGNED data.
- __ lwu(a6, MemOperand(a0, offsetof(T, si)));
- __ sw(a6, MemOperand(a0, offsetof(T, r5)));
+ __ Lwu(a6, MemOperand(a0, offsetof(T, si)));
+ __ Sw(a6, MemOperand(a0, offsetof(T, r5)));
// Check that the data got zero-extended into 64-bit a4.
- __ sd(a6, MemOperand(a0, offsetof(T, r6)));
+ __ Sd(a6, MemOperand(a0, offsetof(T, r6)));
// lh with positive data.
- __ lh(a5, MemOperand(a0, offsetof(T, ui)));
- __ sw(a5, MemOperand(a0, offsetof(T, r7)));
+ __ Lh(a5, MemOperand(a0, offsetof(T, ui)));
+ __ Sw(a5, MemOperand(a0, offsetof(T, r7)));
// lh with negative data.
- __ lh(a6, MemOperand(a0, offsetof(T, si)));
- __ sw(a6, MemOperand(a0, offsetof(T, r8)));
+ __ Lh(a6, MemOperand(a0, offsetof(T, si)));
+ __ Sw(a6, MemOperand(a0, offsetof(T, r8)));
// lhu with negative data.
- __ lhu(a7, MemOperand(a0, offsetof(T, si)));
- __ sw(a7, MemOperand(a0, offsetof(T, r9)));
+ __ Lhu(a7, MemOperand(a0, offsetof(T, si)));
+ __ Sw(a7, MemOperand(a0, offsetof(T, r9)));
- // lb with negative data.
- __ lb(t0, MemOperand(a0, offsetof(T, si)));
- __ sw(t0, MemOperand(a0, offsetof(T, r10)));
+ // Lb with negative data.
+ __ Lb(t0, MemOperand(a0, offsetof(T, si)));
+ __ Sw(t0, MemOperand(a0, offsetof(T, r10)));
// sh writes only 1/2 of word.
- __ lw(a4, MemOperand(a0, offsetof(T, ui)));
- __ sh(a4, MemOperand(a0, offsetof(T, r11)));
- __ lw(a4, MemOperand(a0, offsetof(T, si)));
- __ sh(a4, MemOperand(a0, offsetof(T, r12)));
+ __ Lw(a4, MemOperand(a0, offsetof(T, ui)));
+ __ Sh(a4, MemOperand(a0, offsetof(T, r11)));
+ __ Lw(a4, MemOperand(a0, offsetof(T, si)));
+ __ Sh(a4, MemOperand(a0, offsetof(T, r12)));
__ jr(ra);
__ nop();
@@ -1559,26 +1557,26 @@ TEST(seleqz_selnez) {
// Integer part of test.
__ addiu(t1, zero_reg, 1); // t1 = 1
__ seleqz(t3, t1, zero_reg); // t3 = 1
- __ sw(t3, MemOperand(a0, offsetof(Test, a))); // a = 1
+ __ Sw(t3, MemOperand(a0, offsetof(Test, a))); // a = 1
__ seleqz(t2, t1, t1); // t2 = 0
- __ sw(t2, MemOperand(a0, offsetof(Test, b))); // b = 0
+ __ Sw(t2, MemOperand(a0, offsetof(Test, b))); // b = 0
__ selnez(t3, t1, zero_reg); // t3 = 1;
- __ sw(t3, MemOperand(a0, offsetof(Test, c))); // c = 0
+ __ Sw(t3, MemOperand(a0, offsetof(Test, c))); // c = 0
__ selnez(t3, t1, t1); // t3 = 1
- __ sw(t3, MemOperand(a0, offsetof(Test, d))); // d = 1
+ __ Sw(t3, MemOperand(a0, offsetof(Test, d))); // d = 1
// Floating point part of test.
- __ ldc1(f0, MemOperand(a0, offsetof(Test, e)) ); // src
- __ ldc1(f2, MemOperand(a0, offsetof(Test, f)) ); // test
- __ lwc1(f8, MemOperand(a0, offsetof(Test, i)) ); // src
- __ lwc1(f10, MemOperand(a0, offsetof(Test, j)) ); // test
+ __ Ldc1(f0, MemOperand(a0, offsetof(Test, e))); // src
+ __ Ldc1(f2, MemOperand(a0, offsetof(Test, f))); // test
+ __ Lwc1(f8, MemOperand(a0, offsetof(Test, i))); // src
+ __ Lwc1(f10, MemOperand(a0, offsetof(Test, j))); // test
__ seleqz_d(f4, f0, f2);
__ selnez_d(f6, f0, f2);
__ seleqz_s(f12, f8, f10);
__ selnez_s(f14, f8, f10);
- __ sdc1(f4, MemOperand(a0, offsetof(Test, g)) ); // src
- __ sdc1(f6, MemOperand(a0, offsetof(Test, h)) ); // src
- __ swc1(f12, MemOperand(a0, offsetof(Test, k)) ); // src
- __ swc1(f14, MemOperand(a0, offsetof(Test, l)) ); // src
+ __ Sdc1(f4, MemOperand(a0, offsetof(Test, g))); // src
+ __ Sdc1(f6, MemOperand(a0, offsetof(Test, h))); // src
+ __ Swc1(f12, MemOperand(a0, offsetof(Test, k))); // src
+ __ Swc1(f14, MemOperand(a0, offsetof(Test, l))); // src
__ jr(ra);
__ nop();
CodeDesc desc;
@@ -1682,18 +1680,18 @@ TEST(min_max) {
float outputsfmax[kTableLength] = {3.0, 3.0, 3.0, 3.0, 0.0, 0.0, finf,
finf, finf, finf, finf, finf, fnan};
- __ ldc1(f4, MemOperand(a0, offsetof(TestFloat, a)));
- __ ldc1(f8, MemOperand(a0, offsetof(TestFloat, b)));
- __ lwc1(f2, MemOperand(a0, offsetof(TestFloat, e)));
- __ lwc1(f6, MemOperand(a0, offsetof(TestFloat, f)));
+ __ Ldc1(f4, MemOperand(a0, offsetof(TestFloat, a)));
+ __ Ldc1(f8, MemOperand(a0, offsetof(TestFloat, b)));
+ __ Lwc1(f2, MemOperand(a0, offsetof(TestFloat, e)));
+ __ Lwc1(f6, MemOperand(a0, offsetof(TestFloat, f)));
__ min_d(f10, f4, f8);
__ max_d(f12, f4, f8);
__ min_s(f14, f2, f6);
__ max_s(f16, f2, f6);
- __ sdc1(f10, MemOperand(a0, offsetof(TestFloat, c)));
- __ sdc1(f12, MemOperand(a0, offsetof(TestFloat, d)));
- __ swc1(f14, MemOperand(a0, offsetof(TestFloat, g)));
- __ swc1(f16, MemOperand(a0, offsetof(TestFloat, h)));
+ __ Sdc1(f10, MemOperand(a0, offsetof(TestFloat, c)));
+ __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, d)));
+ __ Swc1(f14, MemOperand(a0, offsetof(TestFloat, g)));
+ __ Swc1(f16, MemOperand(a0, offsetof(TestFloat, h)));
__ jr(ra);
__ nop();
@@ -1798,11 +1796,11 @@ TEST(rint_d) {
int fcsr_inputs[4] =
{kRoundToNearest, kRoundToZero, kRoundToPlusInf, kRoundToMinusInf};
double* outputs[4] = {outputs_RN, outputs_RZ, outputs_RP, outputs_RM};
- __ ldc1(f4, MemOperand(a0, offsetof(TestFloat, a)) );
- __ lw(t0, MemOperand(a0, offsetof(TestFloat, fcsr)) );
+ __ Ldc1(f4, MemOperand(a0, offsetof(TestFloat, a)));
+ __ Lw(t0, MemOperand(a0, offsetof(TestFloat, fcsr)));
__ ctc1(t0, FCSR);
__ rint_d(f8, f4);
- __ sdc1(f8, MemOperand(a0, offsetof(TestFloat, b)) );
+ __ Sdc1(f8, MemOperand(a0, offsetof(TestFloat, b)));
__ jr(ra);
__ nop();
@@ -1842,16 +1840,16 @@ TEST(sel) {
} Test;
Test test;
- __ ldc1(f0, MemOperand(a0, offsetof(Test, dd)) ); // test
- __ ldc1(f2, MemOperand(a0, offsetof(Test, ds)) ); // src1
- __ ldc1(f4, MemOperand(a0, offsetof(Test, dt)) ); // src2
- __ lwc1(f6, MemOperand(a0, offsetof(Test, fd)) ); // test
- __ lwc1(f8, MemOperand(a0, offsetof(Test, fs)) ); // src1
- __ lwc1(f10, MemOperand(a0, offsetof(Test, ft)) ); // src2
+ __ Ldc1(f0, MemOperand(a0, offsetof(Test, dd))); // test
+ __ Ldc1(f2, MemOperand(a0, offsetof(Test, ds))); // src1
+ __ Ldc1(f4, MemOperand(a0, offsetof(Test, dt))); // src2
+ __ Lwc1(f6, MemOperand(a0, offsetof(Test, fd))); // test
+ __ Lwc1(f8, MemOperand(a0, offsetof(Test, fs))); // src1
+ __ Lwc1(f10, MemOperand(a0, offsetof(Test, ft))); // src2
__ sel_d(f0, f2, f4);
__ sel_s(f6, f8, f10);
- __ sdc1(f0, MemOperand(a0, offsetof(Test, dd)) );
- __ swc1(f6, MemOperand(a0, offsetof(Test, fd)) );
+ __ Sdc1(f0, MemOperand(a0, offsetof(Test, dd)));
+ __ Swc1(f6, MemOperand(a0, offsetof(Test, fd)));
__ jr(ra);
__ nop();
CodeDesc desc;
@@ -1977,12 +1975,12 @@ TEST(rint_s) {
int fcsr_inputs[4] =
{kRoundToNearest, kRoundToZero, kRoundToPlusInf, kRoundToMinusInf};
float* outputs[4] = {outputs_RN, outputs_RZ, outputs_RP, outputs_RM};
- __ lwc1(f4, MemOperand(a0, offsetof(TestFloat, a)) );
- __ lw(t0, MemOperand(a0, offsetof(TestFloat, fcsr)) );
+ __ Lwc1(f4, MemOperand(a0, offsetof(TestFloat, a)));
+ __ Lw(t0, MemOperand(a0, offsetof(TestFloat, fcsr)));
__ cfc1(t1, FCSR);
__ ctc1(t0, FCSR);
__ rint_s(f8, f4);
- __ swc1(f8, MemOperand(a0, offsetof(TestFloat, b)) );
+ __ Swc1(f8, MemOperand(a0, offsetof(TestFloat, b)));
__ ctc1(t1, FCSR);
__ jr(ra);
__ nop();
@@ -2058,18 +2056,18 @@ TEST(mina_maxa) {
5.3, 5.3, 6.1, -10.0, 9.8, 9.8, -10.0, 9.8, 9.8, -10.0, -11.2, -9.8,
3.0, 3.0, 0.0, 0.0, finf, finf, finf, finf, finf, finf, fnan};
- __ ldc1(f2, MemOperand(a0, offsetof(TestFloat, a)) );
- __ ldc1(f4, MemOperand(a0, offsetof(TestFloat, b)) );
- __ lwc1(f8, MemOperand(a0, offsetof(TestFloat, c)) );
- __ lwc1(f10, MemOperand(a0, offsetof(TestFloat, d)) );
+ __ Ldc1(f2, MemOperand(a0, offsetof(TestFloat, a)));
+ __ Ldc1(f4, MemOperand(a0, offsetof(TestFloat, b)));
+ __ Lwc1(f8, MemOperand(a0, offsetof(TestFloat, c)));
+ __ Lwc1(f10, MemOperand(a0, offsetof(TestFloat, d)));
__ mina_d(f6, f2, f4);
__ mina_s(f12, f8, f10);
__ maxa_d(f14, f2, f4);
__ maxa_s(f16, f8, f10);
- __ swc1(f12, MemOperand(a0, offsetof(TestFloat, resf)) );
- __ sdc1(f6, MemOperand(a0, offsetof(TestFloat, resd)) );
- __ swc1(f16, MemOperand(a0, offsetof(TestFloat, resf1)) );
- __ sdc1(f14, MemOperand(a0, offsetof(TestFloat, resd1)) );
+ __ Swc1(f12, MemOperand(a0, offsetof(TestFloat, resf)));
+ __ Sdc1(f6, MemOperand(a0, offsetof(TestFloat, resd)));
+ __ Swc1(f16, MemOperand(a0, offsetof(TestFloat, resf1)));
+ __ Sdc1(f14, MemOperand(a0, offsetof(TestFloat, resd1)));
__ jr(ra);
__ nop();
@@ -2145,13 +2143,13 @@ TEST(trunc_l) {
dFPU64InvalidResult};
__ cfc1(t1, FCSR);
- __ sw(t1, MemOperand(a0, offsetof(Test, isNaN2008)));
- __ ldc1(f4, MemOperand(a0, offsetof(Test, a)) );
- __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) );
+ __ Sw(t1, MemOperand(a0, offsetof(Test, isNaN2008)));
+ __ Ldc1(f4, MemOperand(a0, offsetof(Test, a)));
+ __ Lwc1(f6, MemOperand(a0, offsetof(Test, b)));
__ trunc_l_d(f8, f4);
__ trunc_l_s(f10, f6);
- __ sdc1(f8, MemOperand(a0, offsetof(Test, c)) );
- __ sdc1(f10, MemOperand(a0, offsetof(Test, d)) );
+ __ Sdc1(f8, MemOperand(a0, offsetof(Test, c)));
+ __ Sdc1(f10, MemOperand(a0, offsetof(Test, d)));
__ jr(ra);
__ nop();
Test test;
@@ -2214,25 +2212,25 @@ TEST(movz_movn) {
5.3, -5.3, 5.3, -2.9
};
- __ ldc1(f2, MemOperand(a0, offsetof(TestFloat, a)) );
- __ lwc1(f6, MemOperand(a0, offsetof(TestFloat, c)) );
- __ ld(t0, MemOperand(a0, offsetof(TestFloat, rt)));
+ __ Ldc1(f2, MemOperand(a0, offsetof(TestFloat, a)));
+ __ Lwc1(f6, MemOperand(a0, offsetof(TestFloat, c)));
+ __ Ld(t0, MemOperand(a0, offsetof(TestFloat, rt)));
__ Move(f12, 0.0);
__ Move(f10, 0.0);
__ Move(f16, 0.0);
__ Move(f14, 0.0);
- __ sdc1(f12, MemOperand(a0, offsetof(TestFloat, bold)) );
- __ swc1(f10, MemOperand(a0, offsetof(TestFloat, dold)) );
- __ sdc1(f16, MemOperand(a0, offsetof(TestFloat, bold1)) );
- __ swc1(f14, MemOperand(a0, offsetof(TestFloat, dold1)) );
+ __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, bold)));
+ __ Swc1(f10, MemOperand(a0, offsetof(TestFloat, dold)));
+ __ Sdc1(f16, MemOperand(a0, offsetof(TestFloat, bold1)));
+ __ Swc1(f14, MemOperand(a0, offsetof(TestFloat, dold1)));
__ movz_s(f10, f6, t0);
__ movz_d(f12, f2, t0);
__ movn_s(f14, f6, t0);
__ movn_d(f16, f2, t0);
- __ swc1(f10, MemOperand(a0, offsetof(TestFloat, d)) );
- __ sdc1(f12, MemOperand(a0, offsetof(TestFloat, b)) );
- __ swc1(f14, MemOperand(a0, offsetof(TestFloat, d1)) );
- __ sdc1(f16, MemOperand(a0, offsetof(TestFloat, b1)) );
+ __ Swc1(f10, MemOperand(a0, offsetof(TestFloat, d)));
+ __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, b)));
+ __ Swc1(f14, MemOperand(a0, offsetof(TestFloat, d1)));
+ __ Sdc1(f16, MemOperand(a0, offsetof(TestFloat, b1)));
__ jr(ra);
__ nop();
@@ -2313,26 +2311,26 @@ TEST(movt_movd) {
HandleScope scope(isolate);
MacroAssembler assm(isolate, NULL, 0,
v8::internal::CodeObjectRequired::kYes);
- __ ldc1(f2, MemOperand(a0, offsetof(TestFloat, srcd)) );
- __ lwc1(f4, MemOperand(a0, offsetof(TestFloat, srcf)) );
- __ lw(t1, MemOperand(a0, offsetof(TestFloat, fcsr)) );
+ __ Ldc1(f2, MemOperand(a0, offsetof(TestFloat, srcd)));
+ __ Lwc1(f4, MemOperand(a0, offsetof(TestFloat, srcf)));
+ __ Lw(t1, MemOperand(a0, offsetof(TestFloat, fcsr)));
__ cfc1(t0, FCSR);
__ ctc1(t1, FCSR);
__ li(t2, 0x0);
__ mtc1(t2, f12);
__ mtc1(t2, f10);
- __ sdc1(f10, MemOperand(a0, offsetof(TestFloat, dstdold)) );
- __ swc1(f12, MemOperand(a0, offsetof(TestFloat, dstfold)) );
+ __ Sdc1(f10, MemOperand(a0, offsetof(TestFloat, dstdold)));
+ __ Swc1(f12, MemOperand(a0, offsetof(TestFloat, dstfold)));
__ movt_s(f12, f4, test.cc);
__ movt_d(f10, f2, test.cc);
- __ swc1(f12, MemOperand(a0, offsetof(TestFloat, dstf)) );
- __ sdc1(f10, MemOperand(a0, offsetof(TestFloat, dstd)) );
- __ sdc1(f10, MemOperand(a0, offsetof(TestFloat, dstdold1)) );
- __ swc1(f12, MemOperand(a0, offsetof(TestFloat, dstfold1)) );
+ __ Swc1(f12, MemOperand(a0, offsetof(TestFloat, dstf)));
+ __ Sdc1(f10, MemOperand(a0, offsetof(TestFloat, dstd)));
+ __ Sdc1(f10, MemOperand(a0, offsetof(TestFloat, dstdold1)));
+ __ Swc1(f12, MemOperand(a0, offsetof(TestFloat, dstfold1)));
__ movf_s(f12, f4, test.cc);
__ movf_d(f10, f2, test.cc);
- __ swc1(f12, MemOperand(a0, offsetof(TestFloat, dstf1)) );
- __ sdc1(f10, MemOperand(a0, offsetof(TestFloat, dstd1)) );
+ __ Swc1(f12, MemOperand(a0, offsetof(TestFloat, dstf1)));
+ __ Sdc1(f10, MemOperand(a0, offsetof(TestFloat, dstd1)));
__ ctc1(t0, FCSR);
__ jr(ra);
__ nop();
@@ -2413,12 +2411,12 @@ TEST(cvt_w_d) {
int fcsr_inputs[4] =
{kRoundToNearest, kRoundToZero, kRoundToPlusInf, kRoundToMinusInf};
double* outputs[4] = {outputs_RN, outputs_RZ, outputs_RP, outputs_RM};
- __ ldc1(f4, MemOperand(a0, offsetof(Test, a)) );
- __ lw(t0, MemOperand(a0, offsetof(Test, fcsr)) );
+ __ Ldc1(f4, MemOperand(a0, offsetof(Test, a)));
+ __ Lw(t0, MemOperand(a0, offsetof(Test, fcsr)));
__ cfc1(t1, FCSR);
__ ctc1(t0, FCSR);
__ cvt_w_d(f8, f4);
- __ swc1(f8, MemOperand(a0, offsetof(Test, b)) );
+ __ Swc1(f8, MemOperand(a0, offsetof(Test, b)));
__ ctc1(t1, FCSR);
__ jr(ra);
__ nop();
@@ -2480,13 +2478,13 @@ TEST(trunc_w) {
kFPUInvalidResult};
__ cfc1(t1, FCSR);
- __ sw(t1, MemOperand(a0, offsetof(Test, isNaN2008)));
- __ ldc1(f4, MemOperand(a0, offsetof(Test, a)) );
- __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) );
+ __ Sw(t1, MemOperand(a0, offsetof(Test, isNaN2008)));
+ __ Ldc1(f4, MemOperand(a0, offsetof(Test, a)));
+ __ Lwc1(f6, MemOperand(a0, offsetof(Test, b)));
__ trunc_w_d(f8, f4);
__ trunc_w_s(f10, f6);
- __ swc1(f8, MemOperand(a0, offsetof(Test, c)) );
- __ swc1(f10, MemOperand(a0, offsetof(Test, d)) );
+ __ Swc1(f8, MemOperand(a0, offsetof(Test, c)));
+ __ Swc1(f10, MemOperand(a0, offsetof(Test, d)));
__ jr(ra);
__ nop();
Test test;
@@ -2549,13 +2547,13 @@ TEST(round_w) {
kFPUInvalidResult};
__ cfc1(t1, FCSR);
- __ sw(t1, MemOperand(a0, offsetof(Test, isNaN2008)));
- __ ldc1(f4, MemOperand(a0, offsetof(Test, a)) );
- __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) );
+ __ Sw(t1, MemOperand(a0, offsetof(Test, isNaN2008)));
+ __ Ldc1(f4, MemOperand(a0, offsetof(Test, a)));
+ __ Lwc1(f6, MemOperand(a0, offsetof(Test, b)));
__ round_w_d(f8, f4);
__ round_w_s(f10, f6);
- __ swc1(f8, MemOperand(a0, offsetof(Test, c)) );
- __ swc1(f10, MemOperand(a0, offsetof(Test, d)) );
+ __ Swc1(f8, MemOperand(a0, offsetof(Test, c)));
+ __ Swc1(f10, MemOperand(a0, offsetof(Test, d)));
__ jr(ra);
__ nop();
Test test;
@@ -2620,13 +2618,13 @@ TEST(round_l) {
dFPU64InvalidResult};
__ cfc1(t1, FCSR);
- __ sw(t1, MemOperand(a0, offsetof(Test, isNaN2008)));
- __ ldc1(f4, MemOperand(a0, offsetof(Test, a)) );
- __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) );
+ __ Sw(t1, MemOperand(a0, offsetof(Test, isNaN2008)));
+ __ Ldc1(f4, MemOperand(a0, offsetof(Test, a)));
+ __ Lwc1(f6, MemOperand(a0, offsetof(Test, b)));
__ round_l_d(f8, f4);
__ round_l_s(f10, f6);
- __ sdc1(f8, MemOperand(a0, offsetof(Test, c)) );
- __ sdc1(f10, MemOperand(a0, offsetof(Test, d)) );
+ __ Sdc1(f8, MemOperand(a0, offsetof(Test, c)));
+ __ Sdc1(f10, MemOperand(a0, offsetof(Test, d)));
__ jr(ra);
__ nop();
Test test;
@@ -2691,14 +2689,14 @@ TEST(sub) {
0.5, -0.5, 0.0, -10.1, -10.1, -5.8,
10.1, 10.1, 5.8, -0.5, 0.5, 0.0
};
- __ lwc1(f2, MemOperand(a0, offsetof(TestFloat, a)) );
- __ lwc1(f4, MemOperand(a0, offsetof(TestFloat, b)) );
- __ ldc1(f8, MemOperand(a0, offsetof(TestFloat, c)) );
- __ ldc1(f10, MemOperand(a0, offsetof(TestFloat, d)) );
+ __ Lwc1(f2, MemOperand(a0, offsetof(TestFloat, a)));
+ __ Lwc1(f4, MemOperand(a0, offsetof(TestFloat, b)));
+ __ Ldc1(f8, MemOperand(a0, offsetof(TestFloat, c)));
+ __ Ldc1(f10, MemOperand(a0, offsetof(TestFloat, d)));
__ sub_s(f6, f2, f4);
__ sub_d(f12, f8, f10);
- __ swc1(f6, MemOperand(a0, offsetof(TestFloat, resultS)) );
- __ sdc1(f12, MemOperand(a0, offsetof(TestFloat, resultD)) );
+ __ Swc1(f6, MemOperand(a0, offsetof(TestFloat, resultS)));
+ __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, resultD)));
__ jr(ra);
__ nop();
@@ -2757,21 +2755,20 @@ TEST(sqrt_rsqrt_recip) {
0.0, 2.0, sqrt2_s, 2e-14
};
-
- __ lwc1(f2, MemOperand(a0, offsetof(TestFloat, a)) );
- __ ldc1(f8, MemOperand(a0, offsetof(TestFloat, c)) );
+ __ Lwc1(f2, MemOperand(a0, offsetof(TestFloat, a)));
+ __ Ldc1(f8, MemOperand(a0, offsetof(TestFloat, c)));
__ sqrt_s(f6, f2);
__ sqrt_d(f12, f8);
__ rsqrt_d(f14, f8);
__ rsqrt_s(f16, f2);
__ recip_d(f18, f8);
__ recip_s(f4, f2);
- __ swc1(f6, MemOperand(a0, offsetof(TestFloat, resultS)) );
- __ sdc1(f12, MemOperand(a0, offsetof(TestFloat, resultD)) );
- __ swc1(f16, MemOperand(a0, offsetof(TestFloat, resultS1)) );
- __ sdc1(f14, MemOperand(a0, offsetof(TestFloat, resultD1)) );
- __ swc1(f4, MemOperand(a0, offsetof(TestFloat, resultS2)) );
- __ sdc1(f18, MemOperand(a0, offsetof(TestFloat, resultD2)) );
+ __ Swc1(f6, MemOperand(a0, offsetof(TestFloat, resultS)));
+ __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, resultD)));
+ __ Swc1(f16, MemOperand(a0, offsetof(TestFloat, resultS1)));
+ __ Sdc1(f14, MemOperand(a0, offsetof(TestFloat, resultD1)));
+ __ Swc1(f4, MemOperand(a0, offsetof(TestFloat, resultS2)));
+ __ Sdc1(f18, MemOperand(a0, offsetof(TestFloat, resultD2)));
__ jr(ra);
__ nop();
@@ -2844,12 +2841,12 @@ TEST(neg) {
float outputs_S[kTableLength] = {
-4.0, 2.0
};
- __ lwc1(f2, MemOperand(a0, offsetof(TestFloat, a)) );
- __ ldc1(f8, MemOperand(a0, offsetof(TestFloat, c)) );
+ __ Lwc1(f2, MemOperand(a0, offsetof(TestFloat, a)));
+ __ Ldc1(f8, MemOperand(a0, offsetof(TestFloat, c)));
__ neg_s(f6, f2);
__ neg_d(f12, f8);
- __ swc1(f6, MemOperand(a0, offsetof(TestFloat, resultS)) );
- __ sdc1(f12, MemOperand(a0, offsetof(TestFloat, resultD)) );
+ __ Swc1(f6, MemOperand(a0, offsetof(TestFloat, resultS)));
+ __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, resultD)));
__ jr(ra);
__ nop();
@@ -2900,14 +2897,14 @@ TEST(mul) {
4.8, 4.8, -4.8, -0.29
};
- __ lwc1(f2, MemOperand(a0, offsetof(TestFloat, a)) );
- __ lwc1(f4, MemOperand(a0, offsetof(TestFloat, b)) );
- __ ldc1(f6, MemOperand(a0, offsetof(TestFloat, c)) );
- __ ldc1(f8, MemOperand(a0, offsetof(TestFloat, d)) );
+ __ Lwc1(f2, MemOperand(a0, offsetof(TestFloat, a)));
+ __ Lwc1(f4, MemOperand(a0, offsetof(TestFloat, b)));
+ __ Ldc1(f6, MemOperand(a0, offsetof(TestFloat, c)));
+ __ Ldc1(f8, MemOperand(a0, offsetof(TestFloat, d)));
__ mul_s(f10, f2, f4);
__ mul_d(f12, f6, f8);
- __ swc1(f10, MemOperand(a0, offsetof(TestFloat, resultS)) );
- __ sdc1(f12, MemOperand(a0, offsetof(TestFloat, resultD)) );
+ __ Swc1(f10, MemOperand(a0, offsetof(TestFloat, resultS)));
+ __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, resultD)));
__ jr(ra);
__ nop();
@@ -2957,12 +2954,12 @@ TEST(mov) {
5.3, -5.3, 5.3, -2.9
};
- __ ldc1(f4, MemOperand(a0, offsetof(TestFloat, a)) );
- __ lwc1(f6, MemOperand(a0, offsetof(TestFloat, c)) );
+ __ Ldc1(f4, MemOperand(a0, offsetof(TestFloat, a)));
+ __ Lwc1(f6, MemOperand(a0, offsetof(TestFloat, c)));
__ mov_s(f8, f6);
__ mov_d(f10, f4);
- __ swc1(f8, MemOperand(a0, offsetof(TestFloat, d)) );
- __ sdc1(f10, MemOperand(a0, offsetof(TestFloat, b)) );
+ __ Swc1(f8, MemOperand(a0, offsetof(TestFloat, d)));
+ __ Sdc1(f10, MemOperand(a0, offsetof(TestFloat, b)));
__ jr(ra);
__ nop();
@@ -3023,13 +3020,13 @@ TEST(floor_w) {
kFPUInvalidResult};
__ cfc1(t1, FCSR);
- __ sw(t1, MemOperand(a0, offsetof(Test, isNaN2008)));
- __ ldc1(f4, MemOperand(a0, offsetof(Test, a)) );
- __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) );
+ __ Sw(t1, MemOperand(a0, offsetof(Test, isNaN2008)));
+ __ Ldc1(f4, MemOperand(a0, offsetof(Test, a)));
+ __ Lwc1(f6, MemOperand(a0, offsetof(Test, b)));
__ floor_w_d(f8, f4);
__ floor_w_s(f10, f6);
- __ swc1(f8, MemOperand(a0, offsetof(Test, c)) );
- __ swc1(f10, MemOperand(a0, offsetof(Test, d)) );
+ __ Swc1(f8, MemOperand(a0, offsetof(Test, c)));
+ __ Swc1(f10, MemOperand(a0, offsetof(Test, d)));
__ jr(ra);
__ nop();
Test test;
@@ -3094,13 +3091,13 @@ TEST(floor_l) {
dFPU64InvalidResult};
__ cfc1(t1, FCSR);
- __ sw(t1, MemOperand(a0, offsetof(Test, isNaN2008)));
- __ ldc1(f4, MemOperand(a0, offsetof(Test, a)) );
- __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) );
+ __ Sw(t1, MemOperand(a0, offsetof(Test, isNaN2008)));
+ __ Ldc1(f4, MemOperand(a0, offsetof(Test, a)));
+ __ Lwc1(f6, MemOperand(a0, offsetof(Test, b)));
__ floor_l_d(f8, f4);
__ floor_l_s(f10, f6);
- __ sdc1(f8, MemOperand(a0, offsetof(Test, c)) );
- __ sdc1(f10, MemOperand(a0, offsetof(Test, d)) );
+ __ Sdc1(f8, MemOperand(a0, offsetof(Test, c)));
+ __ Sdc1(f10, MemOperand(a0, offsetof(Test, d)));
__ jr(ra);
__ nop();
Test test;
@@ -3165,13 +3162,13 @@ TEST(ceil_w) {
kFPUInvalidResult};
__ cfc1(t1, FCSR);
- __ sw(t1, MemOperand(a0, offsetof(Test, isNaN2008)));
- __ ldc1(f4, MemOperand(a0, offsetof(Test, a)) );
- __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) );
+ __ Sw(t1, MemOperand(a0, offsetof(Test, isNaN2008)));
+ __ Ldc1(f4, MemOperand(a0, offsetof(Test, a)));
+ __ Lwc1(f6, MemOperand(a0, offsetof(Test, b)));
__ ceil_w_d(f8, f4);
__ ceil_w_s(f10, f6);
- __ swc1(f8, MemOperand(a0, offsetof(Test, c)) );
- __ swc1(f10, MemOperand(a0, offsetof(Test, d)) );
+ __ Swc1(f8, MemOperand(a0, offsetof(Test, c)));
+ __ Swc1(f10, MemOperand(a0, offsetof(Test, d)));
__ jr(ra);
__ nop();
Test test;
@@ -3236,13 +3233,13 @@ TEST(ceil_l) {
dFPU64InvalidResult};
__ cfc1(t1, FCSR);
- __ sw(t1, MemOperand(a0, offsetof(Test, isNaN2008)));
- __ ldc1(f4, MemOperand(a0, offsetof(Test, a)) );
- __ lwc1(f6, MemOperand(a0, offsetof(Test, b)) );
+ __ Sw(t1, MemOperand(a0, offsetof(Test, isNaN2008)));
+ __ Ldc1(f4, MemOperand(a0, offsetof(Test, a)));
+ __ Lwc1(f6, MemOperand(a0, offsetof(Test, b)));
__ ceil_l_d(f8, f4);
__ ceil_l_s(f10, f6);
- __ sdc1(f8, MemOperand(a0, offsetof(Test, c)) );
- __ sdc1(f10, MemOperand(a0, offsetof(Test, d)) );
+ __ Sdc1(f8, MemOperand(a0, offsetof(Test, c)));
+ __ Sdc1(f10, MemOperand(a0, offsetof(Test, d)));
__ jr(ra);
__ nop();
Test test;
@@ -3271,7 +3268,7 @@ TEST(jump_tables1) {
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
HandleScope scope(isolate);
- Assembler assm(isolate, nullptr, 0);
+ MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
const int kNumCases = 512;
int values[kNumCases];
@@ -3279,7 +3276,7 @@ TEST(jump_tables1) {
Label labels[kNumCases];
__ daddiu(sp, sp, -8);
- __ sd(ra, MemOperand(sp));
+ __ Sd(ra, MemOperand(sp));
__ Align(8);
Label done;
@@ -3293,7 +3290,7 @@ TEST(jump_tables1) {
__ dsll(at, a0, 3); // In delay slot.
__ bind(&here);
__ daddu(at, at, ra);
- __ ld(at, MemOperand(at, 4 * Assembler::kInstrSize));
+ __ Ld(at, MemOperand(at, 4 * Assembler::kInstrSize));
__ jr(at);
__ nop();
for (int i = 0; i < kNumCases; ++i) {
@@ -3310,7 +3307,7 @@ TEST(jump_tables1) {
}
__ bind(&done);
- __ ld(ra, MemOperand(sp));
+ __ Ld(ra, MemOperand(sp));
__ daddiu(sp, sp, 8);
__ jr(ra);
__ nop();
@@ -3339,7 +3336,7 @@ TEST(jump_tables2) {
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
HandleScope scope(isolate);
- Assembler assm(isolate, nullptr, 0);
+ MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
const int kNumCases = 512;
int values[kNumCases];
@@ -3347,7 +3344,7 @@ TEST(jump_tables2) {
Label labels[kNumCases];
__ daddiu(sp, sp, -8);
- __ sd(ra, MemOperand(sp));
+ __ Sd(ra, MemOperand(sp));
Label done, dispatch;
__ b(&dispatch);
@@ -3373,7 +3370,7 @@ TEST(jump_tables2) {
__ dsll(at, a0, 3); // In delay slot.
__ bind(&here);
__ daddu(at, at, ra);
- __ ld(at, MemOperand(at, 4 * Assembler::kInstrSize));
+ __ Ld(at, MemOperand(at, 4 * Assembler::kInstrSize));
__ jr(at);
__ nop();
for (int i = 0; i < kNumCases; ++i) {
@@ -3382,7 +3379,7 @@ TEST(jump_tables2) {
}
__ bind(&done);
- __ ld(ra, MemOperand(sp));
+ __ Ld(ra, MemOperand(sp));
__ daddiu(sp, sp, 8);
__ jr(ra);
__ nop();
@@ -3409,7 +3406,7 @@ TEST(jump_tables3) {
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
HandleScope scope(isolate);
- Assembler assm(isolate, nullptr, 0);
+ MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
const int kNumCases = 512;
Handle<Object> values[kNumCases];
@@ -3422,7 +3419,7 @@ TEST(jump_tables3) {
int64_t imm64;
__ daddiu(sp, sp, -8);
- __ sd(ra, MemOperand(sp));
+ __ Sd(ra, MemOperand(sp));
Label done, dispatch;
__ b(&dispatch);
@@ -3453,7 +3450,7 @@ TEST(jump_tables3) {
__ dsll(at, a0, 3); // In delay slot.
__ bind(&here);
__ daddu(at, at, ra);
- __ ld(at, MemOperand(at, 4 * Assembler::kInstrSize));
+ __ Ld(at, MemOperand(at, 4 * Assembler::kInstrSize));
__ jr(at);
__ nop();
for (int i = 0; i < kNumCases; ++i) {
@@ -3462,7 +3459,7 @@ TEST(jump_tables3) {
}
__ bind(&done);
- __ ld(ra, MemOperand(sp));
+ __ Ld(ra, MemOperand(sp));
__ daddiu(sp, sp, 8);
__ jr(ra);
__ nop();
@@ -3505,37 +3502,38 @@ TEST(BITSWAP) {
} T;
T t;
- Assembler assm(isolate, NULL, 0);
+ MacroAssembler assm(isolate, NULL, 0,
+ v8::internal::CodeObjectRequired::kYes);
- __ ld(a4, MemOperand(a0, offsetof(T, r1)));
+ __ Ld(a4, MemOperand(a0, offsetof(T, r1)));
__ nop();
__ bitswap(a6, a4);
- __ sd(a6, MemOperand(a0, offsetof(T, r1)));
+ __ Sd(a6, MemOperand(a0, offsetof(T, r1)));
- __ ld(a4, MemOperand(a0, offsetof(T, r2)));
+ __ Ld(a4, MemOperand(a0, offsetof(T, r2)));
__ nop();
__ bitswap(a6, a4);
- __ sd(a6, MemOperand(a0, offsetof(T, r2)));
+ __ Sd(a6, MemOperand(a0, offsetof(T, r2)));
- __ ld(a4, MemOperand(a0, offsetof(T, r3)));
+ __ Ld(a4, MemOperand(a0, offsetof(T, r3)));
__ nop();
__ bitswap(a6, a4);
- __ sd(a6, MemOperand(a0, offsetof(T, r3)));
+ __ Sd(a6, MemOperand(a0, offsetof(T, r3)));
- __ ld(a4, MemOperand(a0, offsetof(T, r4)));
+ __ Ld(a4, MemOperand(a0, offsetof(T, r4)));
__ nop();
__ bitswap(a6, a4);
- __ sd(a6, MemOperand(a0, offsetof(T, r4)));
+ __ Sd(a6, MemOperand(a0, offsetof(T, r4)));
- __ ld(a4, MemOperand(a0, offsetof(T, r5)));
+ __ Ld(a4, MemOperand(a0, offsetof(T, r5)));
__ nop();
__ dbitswap(a6, a4);
- __ sd(a6, MemOperand(a0, offsetof(T, r5)));
+ __ Sd(a6, MemOperand(a0, offsetof(T, r5)));
- __ ld(a4, MemOperand(a0, offsetof(T, r6)));
+ __ Ld(a4, MemOperand(a0, offsetof(T, r6)));
__ nop();
__ dbitswap(a6, a4);
- __ sd(a6, MemOperand(a0, offsetof(T, r6)));
+ __ Sd(a6, MemOperand(a0, offsetof(T, r6)));
__ jr(ra);
__ nop();
@@ -3599,86 +3597,86 @@ TEST(class_fmt) {
MacroAssembler assm(isolate, NULL, 0,
v8::internal::CodeObjectRequired::kYes);
- __ ldc1(f4, MemOperand(a0, offsetof(T, dSignalingNan)));
+ __ Ldc1(f4, MemOperand(a0, offsetof(T, dSignalingNan)));
__ class_d(f6, f4);
- __ sdc1(f6, MemOperand(a0, offsetof(T, dSignalingNan)));
+ __ Sdc1(f6, MemOperand(a0, offsetof(T, dSignalingNan)));
- __ ldc1(f4, MemOperand(a0, offsetof(T, dQuietNan)));
+ __ Ldc1(f4, MemOperand(a0, offsetof(T, dQuietNan)));
__ class_d(f6, f4);
- __ sdc1(f6, MemOperand(a0, offsetof(T, dQuietNan)));
+ __ Sdc1(f6, MemOperand(a0, offsetof(T, dQuietNan)));
- __ ldc1(f4, MemOperand(a0, offsetof(T, dNegInf)));
+ __ Ldc1(f4, MemOperand(a0, offsetof(T, dNegInf)));
__ class_d(f6, f4);
- __ sdc1(f6, MemOperand(a0, offsetof(T, dNegInf)));
+ __ Sdc1(f6, MemOperand(a0, offsetof(T, dNegInf)));
- __ ldc1(f4, MemOperand(a0, offsetof(T, dNegNorm)));
+ __ Ldc1(f4, MemOperand(a0, offsetof(T, dNegNorm)));
__ class_d(f6, f4);
- __ sdc1(f6, MemOperand(a0, offsetof(T, dNegNorm)));
+ __ Sdc1(f6, MemOperand(a0, offsetof(T, dNegNorm)));
- __ ldc1(f4, MemOperand(a0, offsetof(T, dNegSubnorm)));
+ __ Ldc1(f4, MemOperand(a0, offsetof(T, dNegSubnorm)));
__ class_d(f6, f4);
- __ sdc1(f6, MemOperand(a0, offsetof(T, dNegSubnorm)));
+ __ Sdc1(f6, MemOperand(a0, offsetof(T, dNegSubnorm)));
- __ ldc1(f4, MemOperand(a0, offsetof(T, dNegZero)));
+ __ Ldc1(f4, MemOperand(a0, offsetof(T, dNegZero)));
__ class_d(f6, f4);
- __ sdc1(f6, MemOperand(a0, offsetof(T, dNegZero)));
+ __ Sdc1(f6, MemOperand(a0, offsetof(T, dNegZero)));
- __ ldc1(f4, MemOperand(a0, offsetof(T, dPosInf)));
+ __ Ldc1(f4, MemOperand(a0, offsetof(T, dPosInf)));
__ class_d(f6, f4);
- __ sdc1(f6, MemOperand(a0, offsetof(T, dPosInf)));
+ __ Sdc1(f6, MemOperand(a0, offsetof(T, dPosInf)));
- __ ldc1(f4, MemOperand(a0, offsetof(T, dPosNorm)));
+ __ Ldc1(f4, MemOperand(a0, offsetof(T, dPosNorm)));
__ class_d(f6, f4);
- __ sdc1(f6, MemOperand(a0, offsetof(T, dPosNorm)));
+ __ Sdc1(f6, MemOperand(a0, offsetof(T, dPosNorm)));
- __ ldc1(f4, MemOperand(a0, offsetof(T, dPosSubnorm)));
+ __ Ldc1(f4, MemOperand(a0, offsetof(T, dPosSubnorm)));
__ class_d(f6, f4);
- __ sdc1(f6, MemOperand(a0, offsetof(T, dPosSubnorm)));
+ __ Sdc1(f6, MemOperand(a0, offsetof(T, dPosSubnorm)));
- __ ldc1(f4, MemOperand(a0, offsetof(T, dPosZero)));
+ __ Ldc1(f4, MemOperand(a0, offsetof(T, dPosZero)));
__ class_d(f6, f4);
- __ sdc1(f6, MemOperand(a0, offsetof(T, dPosZero)));
+ __ Sdc1(f6, MemOperand(a0, offsetof(T, dPosZero)));
// Testing instruction CLASS.S
- __ lwc1(f4, MemOperand(a0, offsetof(T, fSignalingNan)));
+ __ Lwc1(f4, MemOperand(a0, offsetof(T, fSignalingNan)));
__ class_s(f6, f4);
- __ swc1(f6, MemOperand(a0, offsetof(T, fSignalingNan)));
+ __ Swc1(f6, MemOperand(a0, offsetof(T, fSignalingNan)));
- __ lwc1(f4, MemOperand(a0, offsetof(T, fQuietNan)));
+ __ Lwc1(f4, MemOperand(a0, offsetof(T, fQuietNan)));
__ class_s(f6, f4);
- __ swc1(f6, MemOperand(a0, offsetof(T, fQuietNan)));
+ __ Swc1(f6, MemOperand(a0, offsetof(T, fQuietNan)));
- __ lwc1(f4, MemOperand(a0, offsetof(T, fNegInf)));
+ __ Lwc1(f4, MemOperand(a0, offsetof(T, fNegInf)));
__ class_s(f6, f4);
- __ swc1(f6, MemOperand(a0, offsetof(T, fNegInf)));
+ __ Swc1(f6, MemOperand(a0, offsetof(T, fNegInf)));
- __ lwc1(f4, MemOperand(a0, offsetof(T, fNegNorm)));
+ __ Lwc1(f4, MemOperand(a0, offsetof(T, fNegNorm)));
__ class_s(f6, f4);
- __ swc1(f6, MemOperand(a0, offsetof(T, fNegNorm)));
+ __ Swc1(f6, MemOperand(a0, offsetof(T, fNegNorm)));
- __ lwc1(f4, MemOperand(a0, offsetof(T, fNegSubnorm)));
+ __ Lwc1(f4, MemOperand(a0, offsetof(T, fNegSubnorm)));
__ class_s(f6, f4);
- __ swc1(f6, MemOperand(a0, offsetof(T, fNegSubnorm)));
+ __ Swc1(f6, MemOperand(a0, offsetof(T, fNegSubnorm)));
- __ lwc1(f4, MemOperand(a0, offsetof(T, fNegZero)));
+ __ Lwc1(f4, MemOperand(a0, offsetof(T, fNegZero)));
__ class_s(f6, f4);
- __ swc1(f6, MemOperand(a0, offsetof(T, fNegZero)));
+ __ Swc1(f6, MemOperand(a0, offsetof(T, fNegZero)));
- __ lwc1(f4, MemOperand(a0, offsetof(T, fPosInf)));
+ __ Lwc1(f4, MemOperand(a0, offsetof(T, fPosInf)));
__ class_s(f6, f4);
- __ swc1(f6, MemOperand(a0, offsetof(T, fPosInf)));
+ __ Swc1(f6, MemOperand(a0, offsetof(T, fPosInf)));
- __ lwc1(f4, MemOperand(a0, offsetof(T, fPosNorm)));
+ __ Lwc1(f4, MemOperand(a0, offsetof(T, fPosNorm)));
__ class_s(f6, f4);
- __ swc1(f6, MemOperand(a0, offsetof(T, fPosNorm)));
+ __ Swc1(f6, MemOperand(a0, offsetof(T, fPosNorm)));
- __ lwc1(f4, MemOperand(a0, offsetof(T, fPosSubnorm)));
+ __ Lwc1(f4, MemOperand(a0, offsetof(T, fPosSubnorm)));
__ class_s(f6, f4);
- __ swc1(f6, MemOperand(a0, offsetof(T, fPosSubnorm)));
+ __ Swc1(f6, MemOperand(a0, offsetof(T, fPosSubnorm)));
- __ lwc1(f4, MemOperand(a0, offsetof(T, fPosZero)));
+ __ Lwc1(f4, MemOperand(a0, offsetof(T, fPosZero)));
__ class_s(f6, f4);
- __ swc1(f6, MemOperand(a0, offsetof(T, fPosZero)));
+ __ Swc1(f6, MemOperand(a0, offsetof(T, fPosZero)));
__ jr(ra);
__ nop();
@@ -3759,17 +3757,17 @@ TEST(ABS) {
// Save FIR.
__ cfc1(a1, FCSR);
- __ sd(a1, MemOperand(a0, offsetof(TestFloat, fcsr)));
+ __ Sd(a1, MemOperand(a0, offsetof(TestFloat, fcsr)));
// Disable FPU exceptions.
__ ctc1(zero_reg, FCSR);
- __ ldc1(f4, MemOperand(a0, offsetof(TestFloat, a)));
+ __ Ldc1(f4, MemOperand(a0, offsetof(TestFloat, a)));
__ abs_d(f10, f4);
- __ sdc1(f10, MemOperand(a0, offsetof(TestFloat, a)));
+ __ Sdc1(f10, MemOperand(a0, offsetof(TestFloat, a)));
- __ lwc1(f4, MemOperand(a0, offsetof(TestFloat, b)));
+ __ Lwc1(f4, MemOperand(a0, offsetof(TestFloat, b)));
__ abs_s(f10, f4);
- __ swc1(f10, MemOperand(a0, offsetof(TestFloat, b)));
+ __ Swc1(f10, MemOperand(a0, offsetof(TestFloat, b)));
// Restore FCSR.
__ ctc1(a1, FCSR);
@@ -3857,15 +3855,15 @@ TEST(ADD_FMT) {
TestFloat test;
- __ ldc1(f4, MemOperand(a0, offsetof(TestFloat, a)));
- __ ldc1(f8, MemOperand(a0, offsetof(TestFloat, b)));
+ __ Ldc1(f4, MemOperand(a0, offsetof(TestFloat, a)));
+ __ Ldc1(f8, MemOperand(a0, offsetof(TestFloat, b)));
__ add_d(f10, f8, f4);
- __ sdc1(f10, MemOperand(a0, offsetof(TestFloat, c)));
+ __ Sdc1(f10, MemOperand(a0, offsetof(TestFloat, c)));
- __ lwc1(f4, MemOperand(a0, offsetof(TestFloat, fa)));
- __ lwc1(f8, MemOperand(a0, offsetof(TestFloat, fb)));
+ __ Lwc1(f4, MemOperand(a0, offsetof(TestFloat, fa)));
+ __ Lwc1(f8, MemOperand(a0, offsetof(TestFloat, fb)));
__ add_s(f10, f8, f4);
- __ swc1(f10, MemOperand(a0, offsetof(TestFloat, fc)));
+ __ Swc1(f10, MemOperand(a0, offsetof(TestFloat, fc)));
__ jr(ra);
__ nop();
@@ -3944,11 +3942,11 @@ TEST(C_COND_FMT) {
__ li(t1, 1);
- __ ldc1(f4, MemOperand(a0, offsetof(TestFloat, dOp1)));
- __ ldc1(f6, MemOperand(a0, offsetof(TestFloat, dOp2)));
+ __ Ldc1(f4, MemOperand(a0, offsetof(TestFloat, dOp1)));
+ __ Ldc1(f6, MemOperand(a0, offsetof(TestFloat, dOp2)));
- __ lwc1(f14, MemOperand(a0, offsetof(TestFloat, fOp1)));
- __ lwc1(f16, MemOperand(a0, offsetof(TestFloat, fOp2)));
+ __ Lwc1(f14, MemOperand(a0, offsetof(TestFloat, fOp1)));
+ __ Lwc1(f16, MemOperand(a0, offsetof(TestFloat, fOp2)));
__ mov(t2, zero_reg);
__ mov(t3, zero_reg);
@@ -3956,8 +3954,8 @@ TEST(C_COND_FMT) {
__ c_s(F, f14, f16, 2);
__ movt(t2, t1, 0);
__ movt(t3, t1, 2);
- __ sw(t2, MemOperand(a0, offsetof(TestFloat, dF)) );
- __ sw(t3, MemOperand(a0, offsetof(TestFloat, fF)) );
+ __ Sw(t2, MemOperand(a0, offsetof(TestFloat, dF)));
+ __ Sw(t3, MemOperand(a0, offsetof(TestFloat, fF)));
__ mov(t2, zero_reg);
__ mov(t3, zero_reg);
@@ -3965,8 +3963,8 @@ TEST(C_COND_FMT) {
__ c_s(UN, f14, f16, 4);
__ movt(t2, t1, 2);
__ movt(t3, t1, 4);
- __ sw(t2, MemOperand(a0, offsetof(TestFloat, dUn)) );
- __ sw(t3, MemOperand(a0, offsetof(TestFloat, fUn)) );
+ __ Sw(t2, MemOperand(a0, offsetof(TestFloat, dUn)));
+ __ Sw(t3, MemOperand(a0, offsetof(TestFloat, fUn)));
__ mov(t2, zero_reg);
__ mov(t3, zero_reg);
@@ -3974,8 +3972,8 @@ TEST(C_COND_FMT) {
__ c_s(EQ, f14, f16, 6);
__ movt(t2, t1, 4);
__ movt(t3, t1, 6);
- __ sw(t2, MemOperand(a0, offsetof(TestFloat, dEq)) );
- __ sw(t3, MemOperand(a0, offsetof(TestFloat, fEq)) );
+ __ Sw(t2, MemOperand(a0, offsetof(TestFloat, dEq)));
+ __ Sw(t3, MemOperand(a0, offsetof(TestFloat, fEq)));
__ mov(t2, zero_reg);
__ mov(t3, zero_reg);
@@ -3983,8 +3981,8 @@ TEST(C_COND_FMT) {
__ c_s(UEQ, f14, f16, 0);
__ movt(t2, t1, 6);
__ movt(t3, t1, 0);
- __ sw(t2, MemOperand(a0, offsetof(TestFloat, dUeq)) );
- __ sw(t3, MemOperand(a0, offsetof(TestFloat, fUeq)) );
+ __ Sw(t2, MemOperand(a0, offsetof(TestFloat, dUeq)));
+ __ Sw(t3, MemOperand(a0, offsetof(TestFloat, fUeq)));
__ mov(t2, zero_reg);
__ mov(t3, zero_reg);
@@ -3992,8 +3990,8 @@ TEST(C_COND_FMT) {
__ c_s(OLT, f14, f16, 2);
__ movt(t2, t1, 0);
__ movt(t3, t1, 2);
- __ sw(t2, MemOperand(a0, offsetof(TestFloat, dOlt)) );
- __ sw(t3, MemOperand(a0, offsetof(TestFloat, fOlt)) );
+ __ Sw(t2, MemOperand(a0, offsetof(TestFloat, dOlt)));
+ __ Sw(t3, MemOperand(a0, offsetof(TestFloat, fOlt)));
__ mov(t2, zero_reg);
__ mov(t3, zero_reg);
@@ -4001,8 +3999,8 @@ TEST(C_COND_FMT) {
__ c_s(ULT, f14, f16, 4);
__ movt(t2, t1, 2);
__ movt(t3, t1, 4);
- __ sw(t2, MemOperand(a0, offsetof(TestFloat, dUlt)) );
- __ sw(t3, MemOperand(a0, offsetof(TestFloat, fUlt)) );
+ __ Sw(t2, MemOperand(a0, offsetof(TestFloat, dUlt)));
+ __ Sw(t3, MemOperand(a0, offsetof(TestFloat, fUlt)));
__ mov(t2, zero_reg);
__ mov(t3, zero_reg);
@@ -4010,8 +4008,8 @@ TEST(C_COND_FMT) {
__ c_s(OLE, f14, f16, 6);
__ movt(t2, t1, 4);
__ movt(t3, t1, 6);
- __ sw(t2, MemOperand(a0, offsetof(TestFloat, dOle)) );
- __ sw(t3, MemOperand(a0, offsetof(TestFloat, fOle)) );
+ __ Sw(t2, MemOperand(a0, offsetof(TestFloat, dOle)));
+ __ Sw(t3, MemOperand(a0, offsetof(TestFloat, fOle)));
__ mov(t2, zero_reg);
__ mov(t3, zero_reg);
@@ -4019,8 +4017,8 @@ TEST(C_COND_FMT) {
__ c_s(ULE, f14, f16, 0);
__ movt(t2, t1, 6);
__ movt(t3, t1, 0);
- __ sw(t2, MemOperand(a0, offsetof(TestFloat, dUle)) );
- __ sw(t3, MemOperand(a0, offsetof(TestFloat, fUle)) );
+ __ Sw(t2, MemOperand(a0, offsetof(TestFloat, dUle)));
+ __ Sw(t3, MemOperand(a0, offsetof(TestFloat, fUle)));
__ jr(ra);
__ nop();
@@ -4162,66 +4160,66 @@ TEST(CMP_COND_FMT) {
__ li(t1, 1);
- __ ldc1(f4, MemOperand(a0, offsetof(TestFloat, dOp1)));
- __ ldc1(f6, MemOperand(a0, offsetof(TestFloat, dOp2)));
+ __ Ldc1(f4, MemOperand(a0, offsetof(TestFloat, dOp1)));
+ __ Ldc1(f6, MemOperand(a0, offsetof(TestFloat, dOp2)));
- __ lwc1(f14, MemOperand(a0, offsetof(TestFloat, fOp1)));
- __ lwc1(f16, MemOperand(a0, offsetof(TestFloat, fOp2)));
+ __ Lwc1(f14, MemOperand(a0, offsetof(TestFloat, fOp1)));
+ __ Lwc1(f16, MemOperand(a0, offsetof(TestFloat, fOp2)));
__ cmp_d(F, f2, f4, f6);
__ cmp_s(F, f12, f14, f16);
- __ sdc1(f2, MemOperand(a0, offsetof(TestFloat, dF)) );
- __ swc1(f12, MemOperand(a0, offsetof(TestFloat, fF)) );
+ __ Sdc1(f2, MemOperand(a0, offsetof(TestFloat, dF)));
+ __ Swc1(f12, MemOperand(a0, offsetof(TestFloat, fF)));
__ cmp_d(UN, f2, f4, f6);
__ cmp_s(UN, f12, f14, f16);
- __ sdc1(f2, MemOperand(a0, offsetof(TestFloat, dUn)) );
- __ swc1(f12, MemOperand(a0, offsetof(TestFloat, fUn)) );
+ __ Sdc1(f2, MemOperand(a0, offsetof(TestFloat, dUn)));
+ __ Swc1(f12, MemOperand(a0, offsetof(TestFloat, fUn)));
__ cmp_d(EQ, f2, f4, f6);
__ cmp_s(EQ, f12, f14, f16);
- __ sdc1(f2, MemOperand(a0, offsetof(TestFloat, dEq)) );
- __ swc1(f12, MemOperand(a0, offsetof(TestFloat, fEq)) );
+ __ Sdc1(f2, MemOperand(a0, offsetof(TestFloat, dEq)));
+ __ Swc1(f12, MemOperand(a0, offsetof(TestFloat, fEq)));
__ cmp_d(UEQ, f2, f4, f6);
__ cmp_s(UEQ, f12, f14, f16);
- __ sdc1(f2, MemOperand(a0, offsetof(TestFloat, dUeq)) );
- __ swc1(f12, MemOperand(a0, offsetof(TestFloat, fUeq)) );
+ __ Sdc1(f2, MemOperand(a0, offsetof(TestFloat, dUeq)));
+ __ Swc1(f12, MemOperand(a0, offsetof(TestFloat, fUeq)));
__ cmp_d(LT, f2, f4, f6);
__ cmp_s(LT, f12, f14, f16);
- __ sdc1(f2, MemOperand(a0, offsetof(TestFloat, dOlt)) );
- __ swc1(f12, MemOperand(a0, offsetof(TestFloat, fOlt)) );
+ __ Sdc1(f2, MemOperand(a0, offsetof(TestFloat, dOlt)));
+ __ Swc1(f12, MemOperand(a0, offsetof(TestFloat, fOlt)));
__ cmp_d(ULT, f2, f4, f6);
__ cmp_s(ULT, f12, f14, f16);
- __ sdc1(f2, MemOperand(a0, offsetof(TestFloat, dUlt)) );
- __ swc1(f12, MemOperand(a0, offsetof(TestFloat, fUlt)) );
+ __ Sdc1(f2, MemOperand(a0, offsetof(TestFloat, dUlt)));
+ __ Swc1(f12, MemOperand(a0, offsetof(TestFloat, fUlt)));
__ cmp_d(LE, f2, f4, f6);
__ cmp_s(LE, f12, f14, f16);
- __ sdc1(f2, MemOperand(a0, offsetof(TestFloat, dOle)) );
- __ swc1(f12, MemOperand(a0, offsetof(TestFloat, fOle)) );
+ __ Sdc1(f2, MemOperand(a0, offsetof(TestFloat, dOle)));
+ __ Swc1(f12, MemOperand(a0, offsetof(TestFloat, fOle)));
__ cmp_d(ULE, f2, f4, f6);
__ cmp_s(ULE, f12, f14, f16);
- __ sdc1(f2, MemOperand(a0, offsetof(TestFloat, dUle)) );
- __ swc1(f12, MemOperand(a0, offsetof(TestFloat, fUle)) );
+ __ Sdc1(f2, MemOperand(a0, offsetof(TestFloat, dUle)));
+ __ Swc1(f12, MemOperand(a0, offsetof(TestFloat, fUle)));
__ cmp_d(ORD, f2, f4, f6);
__ cmp_s(ORD, f12, f14, f16);
- __ sdc1(f2, MemOperand(a0, offsetof(TestFloat, dOr)) );
- __ swc1(f12, MemOperand(a0, offsetof(TestFloat, fOr)) );
+ __ Sdc1(f2, MemOperand(a0, offsetof(TestFloat, dOr)));
+ __ Swc1(f12, MemOperand(a0, offsetof(TestFloat, fOr)));
__ cmp_d(UNE, f2, f4, f6);
__ cmp_s(UNE, f12, f14, f16);
- __ sdc1(f2, MemOperand(a0, offsetof(TestFloat, dUne)) );
- __ swc1(f12, MemOperand(a0, offsetof(TestFloat, fUne)) );
+ __ Sdc1(f2, MemOperand(a0, offsetof(TestFloat, dUne)));
+ __ Swc1(f12, MemOperand(a0, offsetof(TestFloat, fUne)));
__ cmp_d(NE, f2, f4, f6);
__ cmp_s(NE, f12, f14, f16);
- __ sdc1(f2, MemOperand(a0, offsetof(TestFloat, dNe)) );
- __ swc1(f12, MemOperand(a0, offsetof(TestFloat, fNe)) );
+ __ Sdc1(f2, MemOperand(a0, offsetof(TestFloat, dNe)));
+ __ Swc1(f12, MemOperand(a0, offsetof(TestFloat, fNe)));
__ jr(ra);
__ nop();
@@ -4558,19 +4556,19 @@ TEST(DIV_FMT) {
// Disable FPU exceptions.
__ ctc1(zero_reg, FCSR);
- __ ldc1(f4, MemOperand(a0, offsetof(Test, dOp1)) );
- __ ldc1(f2, MemOperand(a0, offsetof(Test, dOp2)) );
+ __ Ldc1(f4, MemOperand(a0, offsetof(Test, dOp1)));
+ __ Ldc1(f2, MemOperand(a0, offsetof(Test, dOp2)));
__ nop();
__ div_d(f6, f4, f2);
- __ sdc1(f6, MemOperand(a0, offsetof(Test, dRes)) );
+ __ Sdc1(f6, MemOperand(a0, offsetof(Test, dRes)));
- __ lwc1(f4, MemOperand(a0, offsetof(Test, fOp1)) );
- __ lwc1(f2, MemOperand(a0, offsetof(Test, fOp2)) );
+ __ Lwc1(f4, MemOperand(a0, offsetof(Test, fOp1)));
+ __ Lwc1(f2, MemOperand(a0, offsetof(Test, fOp2)));
__ nop();
__ div_s(f6, f4, f2);
- __ swc1(f6, MemOperand(a0, offsetof(Test, fRes)) );
+ __ Swc1(f6, MemOperand(a0, offsetof(Test, fRes)));
- // Restore FCSR.
+ // Restore FCSR.
__ ctc1(a1, FCSR);
__ jr(ra);
@@ -5971,15 +5969,15 @@ void helper_madd_msub_maddf_msubf(F func) {
};
if (std::is_same<T, float>::value) {
- __ lwc1(f4, MemOperand(a0, offsetof(TestCaseMaddMsub<T>, fr)));
- __ lwc1(f6, MemOperand(a0, offsetof(TestCaseMaddMsub<T>, fs)));
- __ lwc1(f8, MemOperand(a0, offsetof(TestCaseMaddMsub<T>, ft)));
- __ lwc1(f16, MemOperand(a0, offsetof(TestCaseMaddMsub<T>, fr)));
+ __ Lwc1(f4, MemOperand(a0, offsetof(TestCaseMaddMsub<T>, fr)));
+ __ Lwc1(f6, MemOperand(a0, offsetof(TestCaseMaddMsub<T>, fs)));
+ __ Lwc1(f8, MemOperand(a0, offsetof(TestCaseMaddMsub<T>, ft)));
+ __ Lwc1(f16, MemOperand(a0, offsetof(TestCaseMaddMsub<T>, fr)));
} else if (std::is_same<T, double>::value) {
- __ ldc1(f4, MemOperand(a0, offsetof(TestCaseMaddMsub<T>, fr)));
- __ ldc1(f6, MemOperand(a0, offsetof(TestCaseMaddMsub<T>, fs)));
- __ ldc1(f8, MemOperand(a0, offsetof(TestCaseMaddMsub<T>, ft)));
- __ ldc1(f16, MemOperand(a0, offsetof(TestCaseMaddMsub<T>, fr)));
+ __ Ldc1(f4, MemOperand(a0, offsetof(TestCaseMaddMsub<T>, fr)));
+ __ Ldc1(f6, MemOperand(a0, offsetof(TestCaseMaddMsub<T>, fs)));
+ __ Ldc1(f8, MemOperand(a0, offsetof(TestCaseMaddMsub<T>, ft)));
+ __ Ldc1(f16, MemOperand(a0, offsetof(TestCaseMaddMsub<T>, fr)));
} else {
UNREACHABLE();
}
@@ -6023,9 +6021,9 @@ TEST(madd_msub_s) {
if (kArchVariant == kMips64r6) return;
helper_madd_msub_maddf_msubf<float>([](MacroAssembler& assm) {
__ madd_s(f10, f4, f6, f8);
- __ swc1(f10, MemOperand(a0, offsetof(TestCaseMaddMsub<float>, fd_add)));
+ __ Swc1(f10, MemOperand(a0, offsetof(TestCaseMaddMsub<float>, fd_add)));
__ msub_s(f16, f4, f6, f8);
- __ swc1(f16, MemOperand(a0, offsetof(TestCaseMaddMsub<float>, fd_sub)));
+ __ Swc1(f16, MemOperand(a0, offsetof(TestCaseMaddMsub<float>, fd_sub)));
});
}
@@ -6033,9 +6031,9 @@ TEST(madd_msub_d) {
if (kArchVariant == kMips64r6) return;
helper_madd_msub_maddf_msubf<double>([](MacroAssembler& assm) {
__ madd_d(f10, f4, f6, f8);
- __ sdc1(f10, MemOperand(a0, offsetof(TestCaseMaddMsub<double>, fd_add)));
+ __ Sdc1(f10, MemOperand(a0, offsetof(TestCaseMaddMsub<double>, fd_add)));
__ msub_d(f16, f4, f6, f8);
- __ sdc1(f16, MemOperand(a0, offsetof(TestCaseMaddMsub<double>, fd_sub)));
+ __ Sdc1(f16, MemOperand(a0, offsetof(TestCaseMaddMsub<double>, fd_sub)));
});
}
@@ -6043,9 +6041,9 @@ TEST(maddf_msubf_s) {
if (kArchVariant != kMips64r6) return;
helper_madd_msub_maddf_msubf<float>([](MacroAssembler& assm) {
__ maddf_s(f4, f6, f8);
- __ swc1(f4, MemOperand(a0, offsetof(TestCaseMaddMsub<float>, fd_add)));
+ __ Swc1(f4, MemOperand(a0, offsetof(TestCaseMaddMsub<float>, fd_add)));
__ msubf_s(f16, f6, f8);
- __ swc1(f16, MemOperand(a0, offsetof(TestCaseMaddMsub<float>, fd_sub)));
+ __ Swc1(f16, MemOperand(a0, offsetof(TestCaseMaddMsub<float>, fd_sub)));
});
}
@@ -6053,10 +6051,69 @@ TEST(maddf_msubf_d) {
if (kArchVariant != kMips64r6) return;
helper_madd_msub_maddf_msubf<double>([](MacroAssembler& assm) {
__ maddf_d(f4, f6, f8);
- __ sdc1(f4, MemOperand(a0, offsetof(TestCaseMaddMsub<double>, fd_add)));
+ __ Sdc1(f4, MemOperand(a0, offsetof(TestCaseMaddMsub<double>, fd_add)));
__ msubf_d(f16, f6, f8);
- __ sdc1(f16, MemOperand(a0, offsetof(TestCaseMaddMsub<double>, fd_sub)));
+ __ Sdc1(f16, MemOperand(a0, offsetof(TestCaseMaddMsub<double>, fd_sub)));
});
}
+uint64_t run_Dins(uint64_t imm, uint64_t source, uint16_t pos, uint16_t size) {
+ Isolate* isolate = CcTest::i_isolate();
+ HandleScope scope(isolate);
+
+ MacroAssembler assm(isolate, NULL, 0, v8::internal::CodeObjectRequired::kYes);
+
+ __ li(v0, imm);
+ __ li(t0, source);
+ __ Dins(v0, t0, pos, size);
+ __ jr(ra);
+ __ nop();
+
+ CodeDesc desc;
+ assm.GetCode(&desc);
+ Handle<Code> code = isolate->factory()->NewCode(
+ desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
+ F2 f = FUNCTION_CAST<F2>(code->entry());
+
+ uint64_t res = reinterpret_cast<uint64_t>(
+ CALL_GENERATED_CODE(isolate, f, 0, 0, 0, 0, 0));
+
+ return res;
+}
+
+TEST(Dins) {
+ CcTest::InitializeVM();
+
+ // Test Dins macro-instruction.
+
+ struct TestCaseDins {
+ uint64_t imm;
+ uint64_t source;
+ uint16_t pos;
+ uint16_t size;
+ uint64_t expected_res;
+ };
+
+ // We load imm to v0 and source to t0 and then call
+ // Dins(v0, t0, pos, size) to test cases listed below.
+ struct TestCaseDins tc[] = {
+ // imm, source, pos, size, expected_res
+ {0x5555555555555555, 0x1ABCDEF01, 31, 1, 0x55555555D5555555},
+ {0x5555555555555555, 0x1ABCDEF02, 30, 2, 0x5555555595555555},
+ {0x201234567, 0x1FABCDEFF, 0, 32, 0x2FABCDEFF},
+ {0x201234567, 0x7FABCDEFF, 31, 2, 0x381234567},
+ {0x800000000, 0x7FABCDEFF, 0, 33, 0x9FABCDEFF},
+ {0x1234, 0xABCDABCDABCDABCD, 0, 64, 0xABCDABCDABCDABCD},
+ {0xABCD, 0xABCEABCF, 32, 1, 0x10000ABCD},
+ {0xABCD, 0xABCEABCF, 63, 1, 0x800000000000ABCD},
+ {0xABCD, 0xABC1ABC2ABC3ABC4, 32, 32, 0xABC3ABC40000ABCD},
+ };
+
+ size_t nr_test_cases = sizeof(tc) / sizeof(TestCaseDins);
+ for (size_t i = 0; i < nr_test_cases; ++i) {
+ CHECK_EQ(tc[i].expected_res,
+ run_Dins(tc[i].imm, tc[i].source, tc[i].pos, tc[i].size));
+ }
+}
+
#undef __
diff --git a/deps/v8/test/cctest/test-ast.cc b/deps/v8/test/cctest/test-ast.cc
index c027e88a52..75496e9f93 100644
--- a/deps/v8/test/cctest/test-ast.cc
+++ b/deps/v8/test/cctest/test-ast.cc
@@ -48,7 +48,7 @@ TEST(List) {
Zone zone(&allocator, ZONE_NAME);
AstValueFactory value_factory(&zone, isolate->ast_string_constants(),
isolate->heap()->HashSeed());
- AstNodeFactory factory(&value_factory);
+ AstNodeFactory factory(&value_factory, &zone);
AstNode* node = factory.NewEmptyStatement(kNoSourcePosition);
list->Add(node);
CHECK_EQ(1, list->length());
diff --git a/deps/v8/test/cctest/test-code-stub-assembler.cc b/deps/v8/test/cctest/test-code-stub-assembler.cc
index b8f1ccc19e..ca01f24b93 100644
--- a/deps/v8/test/cctest/test-code-stub-assembler.cc
+++ b/deps/v8/test/cctest/test-code-stub-assembler.cc
@@ -28,6 +28,45 @@ using compiler::CodeAssemblerVariableList;
namespace {
+int sum9(int a0, int a1, int a2, int a3, int a4, int a5, int a6, int a7,
+ int a8) {
+ return a0 + a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8;
+}
+
+} // namespace
+
+TEST(CallCFunction9) {
+ Isolate* isolate(CcTest::InitIsolateOnce());
+
+ const int kNumParams = 0;
+ CodeAssemblerTester data(isolate, kNumParams);
+ CodeStubAssembler m(data.state());
+
+ {
+ Node* const fun_constant = m.ExternalConstant(
+ ExternalReference(reinterpret_cast<Address>(sum9), isolate));
+
+ MachineType type_intptr = MachineType::IntPtr();
+
+ Node* const result = m.CallCFunction9(
+ type_intptr, type_intptr, type_intptr, type_intptr, type_intptr,
+ type_intptr, type_intptr, type_intptr, type_intptr, type_intptr,
+ fun_constant, m.IntPtrConstant(0), m.IntPtrConstant(1),
+ m.IntPtrConstant(2), m.IntPtrConstant(3), m.IntPtrConstant(4),
+ m.IntPtrConstant(5), m.IntPtrConstant(6), m.IntPtrConstant(7),
+ m.IntPtrConstant(8));
+ m.Return(m.SmiTag(result));
+ }
+
+ Handle<Code> code = data.GenerateCode();
+ FunctionTester ft(code, kNumParams);
+
+ Handle<Object> result = ft.Call().ToHandleChecked();
+ CHECK_EQ(36, Handle<Smi>::cast(result)->value());
+}
+
+namespace {
+
void CheckToUint32Result(uint32_t expected, Handle<Object> result) {
const int64_t result_int64 = NumberToInt64(*result);
const uint32_t result_uint32 = NumberToUint32(*result);
@@ -312,29 +351,29 @@ TEST(TryToName) {
m.TryToName(key, &if_keyisindex, &var_index, &if_keyisunique, &var_unique,
&if_bailout);
- m.Bind(&if_keyisindex);
+ m.BIND(&if_keyisindex);
m.GotoIfNot(m.WordEqual(expected_result,
m.SmiConstant(Smi::FromInt(kKeyIsIndex))),
&failed);
m.Branch(m.WordEqual(m.SmiUntag(expected_arg), var_index.value()),
&passed, &failed);
- m.Bind(&if_keyisunique);
+ m.BIND(&if_keyisunique);
m.GotoIfNot(m.WordEqual(expected_result,
m.SmiConstant(Smi::FromInt(kKeyIsUnique))),
&failed);
m.Branch(m.WordEqual(expected_arg, var_unique.value()), &passed, &failed);
}
- m.Bind(&if_bailout);
+ m.BIND(&if_bailout);
m.Branch(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kBailout))),
&passed, &failed);
- m.Bind(&passed);
+ m.BIND(&passed);
m.Return(m.BooleanConstant(true));
- m.Bind(&failed);
+ m.BIND(&failed);
m.Return(m.BooleanConstant(false));
}
@@ -496,22 +535,22 @@ void TestNameDictionaryLookup() {
m.NameDictionaryLookup<Dictionary>(dictionary, unique_name, &if_found,
&var_name_index, &if_not_found);
- m.Bind(&if_found);
+ m.BIND(&if_found);
m.GotoIfNot(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kFound))),
&failed);
m.Branch(m.WordEqual(m.SmiUntag(expected_arg), var_name_index.value()),
&passed, &failed);
- m.Bind(&if_not_found);
+ m.BIND(&if_not_found);
m.Branch(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kNotFound))),
&passed, &failed);
- m.Bind(&passed);
+ m.BIND(&passed);
m.Return(m.BooleanConstant(true));
- m.Bind(&failed);
+ m.BIND(&failed);
m.Return(m.BooleanConstant(false));
}
@@ -603,22 +642,22 @@ void TestNumberDictionaryLookup() {
m.NumberDictionaryLookup<Dictionary>(dictionary, key, &if_found, &var_entry,
&if_not_found);
- m.Bind(&if_found);
+ m.BIND(&if_found);
m.GotoIfNot(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kFound))),
&failed);
m.Branch(m.WordEqual(m.SmiUntag(expected_arg), var_entry.value()), &passed,
&failed);
- m.Bind(&if_not_found);
+ m.BIND(&if_not_found);
m.Branch(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kNotFound))),
&passed, &failed);
- m.Bind(&passed);
+ m.BIND(&passed);
m.Return(m.BooleanConstant(true));
- m.Bind(&failed);
+ m.BIND(&failed);
m.Return(m.BooleanConstant(false));
}
@@ -743,24 +782,24 @@ TEST(TryHasOwnProperty) {
m.TryHasOwnProperty(object, map, instance_type, unique_name, &if_found,
&if_not_found, &if_bailout);
- m.Bind(&if_found);
+ m.BIND(&if_found);
m.Branch(m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kFound))),
&passed, &failed);
- m.Bind(&if_not_found);
+ m.BIND(&if_not_found);
m.Branch(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kNotFound))),
&passed, &failed);
- m.Bind(&if_bailout);
+ m.BIND(&if_bailout);
m.Branch(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kBailout))),
&passed, &failed);
- m.Bind(&passed);
+ m.BIND(&passed);
m.Return(m.BooleanConstant(true));
- m.Bind(&failed);
+ m.BIND(&failed);
m.Return(m.BooleanConstant(false));
}
@@ -932,13 +971,13 @@ TEST(TryGetOwnProperty) {
unique_name, &if_found, &var_value, &if_not_found,
&if_bailout);
- m.Bind(&if_found);
+ m.BIND(&if_found);
m.Return(var_value.value());
- m.Bind(&if_not_found);
+ m.BIND(&if_not_found);
m.Return(m.HeapConstant(not_found_symbol));
- m.Bind(&if_bailout);
+ m.BIND(&if_bailout);
m.Return(m.HeapConstant(bailout_symbol));
}
@@ -1147,28 +1186,28 @@ TEST(TryLookupElement) {
m.TryLookupElement(object, map, instance_type, index, &if_found, &if_absent,
&if_not_found, &if_bailout);
- m.Bind(&if_found);
+ m.BIND(&if_found);
m.Branch(m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kFound))),
&passed, &failed);
- m.Bind(&if_absent);
+ m.BIND(&if_absent);
m.Branch(m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kAbsent))),
&passed, &failed);
- m.Bind(&if_not_found);
+ m.BIND(&if_not_found);
m.Branch(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kNotFound))),
&passed, &failed);
- m.Bind(&if_bailout);
+ m.BIND(&if_bailout);
m.Branch(
m.WordEqual(expected_result, m.SmiConstant(Smi::FromInt(kBailout))),
&passed, &failed);
- m.Bind(&passed);
+ m.BIND(&passed);
m.Return(m.BooleanConstant(true));
- m.Bind(&failed);
+ m.BIND(&failed);
m.Return(m.BooleanConstant(false));
}
@@ -1718,9 +1757,9 @@ TEST(IsDebugActive) {
CodeAssemblerLabel if_active(&m), if_not_active(&m);
m.Branch(m.IsDebugActive(), &if_active, &if_not_active);
- m.Bind(&if_active);
+ m.BIND(&if_active);
m.Return(m.TrueConstant());
- m.Bind(&if_not_active);
+ m.BIND(&if_not_active);
m.Return(m.FalseConstant());
Handle<Code> code = data.GenerateCode();
@@ -1768,12 +1807,11 @@ class AppendJSArrayCodeStubAssembler : public CodeStubAssembler {
Variable arg_index(this, MachineType::PointerRepresentation());
Label bailout(this);
arg_index.Bind(IntPtrConstant(0));
- Node* length = BuildAppendJSArray(
- kind_, HeapConstant(Handle<HeapObject>(isolate->context(), isolate)),
- HeapConstant(array), args, arg_index, &bailout);
+ Node* length = BuildAppendJSArray(kind_, HeapConstant(array), args,
+ arg_index, &bailout);
Return(length);
- Bind(&bailout);
+ BIND(&bailout);
Return(SmiTag(IntPtrAdd(arg_index.value(), IntPtrConstant(2))));
Handle<Code> code = tester->GenerateCode();
@@ -2448,7 +2486,7 @@ TEST(DirectMemoryTest8BitWord32Immediate) {
m.Return(m.SmiConstant(1));
- m.Bind(&bad);
+ m.BIND(&bad);
m.Return(m.SmiConstant(0));
Handle<Code> code = data.GenerateCode();
@@ -2485,7 +2523,7 @@ TEST(DirectMemoryTest16BitWord32Immediate) {
m.Return(m.SmiConstant(1));
- m.Bind(&bad);
+ m.BIND(&bad);
m.Return(m.SmiConstant(0));
Handle<Code> code = data.GenerateCode();
@@ -2534,7 +2572,7 @@ TEST(DirectMemoryTest8BitWord32) {
m.Return(m.SmiConstant(1));
- m.Bind(&bad);
+ m.BIND(&bad);
m.Return(m.SmiConstant(0));
Handle<Code> code = data.GenerateCode();
@@ -2597,7 +2635,7 @@ TEST(DirectMemoryTest16BitWord32) {
m.Return(m.SmiConstant(1));
- m.Bind(&bad);
+ m.BIND(&bad);
m.Return(m.SmiConstant(0));
Handle<Code> code = data.GenerateCode();
diff --git a/deps/v8/test/cctest/test-code-stubs-mips64.cc b/deps/v8/test/cctest/test-code-stubs-mips64.cc
index bef21717ee..45d28f2c19 100644
--- a/deps/v8/test/cctest/test-code-stubs-mips64.cc
+++ b/deps/v8/test/cctest/test-code-stubs-mips64.cc
@@ -75,7 +75,7 @@ ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate,
}
// Push the double argument.
__ Dsubu(sp, sp, Operand(kDoubleSize));
- __ sdc1(f12, MemOperand(sp));
+ __ Sdc1(f12, MemOperand(sp));
__ Move(source_reg, sp);
// Save registers make sure they don't get clobbered.
@@ -92,11 +92,11 @@ ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate,
// Re-push the double argument.
__ Dsubu(sp, sp, Operand(kDoubleSize));
- __ sdc1(f12, MemOperand(sp));
+ __ Sdc1(f12, MemOperand(sp));
// Call through to the actual stub
if (inline_fastpath) {
- __ ldc1(f12, MemOperand(source_reg));
+ __ Ldc1(f12, MemOperand(source_reg));
__ TryInlineTruncateDoubleToI(destination_reg, f12, &done);
if (destination_reg.is(source_reg) && !source_reg.is(sp)) {
// Restore clobbered source_reg.
@@ -112,7 +112,7 @@ ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate,
for (--reg_num; reg_num >= 2; --reg_num) {
Register reg = Register::from_code(reg_num);
if (!reg.is(destination_reg)) {
- __ ld(at, MemOperand(sp, 0));
+ __ Ld(at, MemOperand(sp, 0));
__ Assert(eq, kRegisterWasClobbered, reg, Operand(at));
__ Daddu(sp, sp, Operand(kPointerSize));
}
diff --git a/deps/v8/test/cctest/test-compiler.cc b/deps/v8/test/cctest/test-compiler.cc
index 2dc5d6b4cb..751e1dbe07 100644
--- a/deps/v8/test/cctest/test-compiler.cc
+++ b/deps/v8/test/cctest/test-compiler.cc
@@ -289,10 +289,10 @@ TEST(GetScriptLineNumber) {
TEST(FeedbackVectorPreservedAcrossRecompiles) {
- if (i::FLAG_always_opt || !i::FLAG_crankshaft) return;
+ if (i::FLAG_always_opt || !i::FLAG_opt) return;
i::FLAG_allow_natives_syntax = true;
CcTest::InitializeVM();
- if (!CcTest::i_isolate()->use_crankshaft()) return;
+ if (!CcTest::i_isolate()->use_optimizer()) return;
v8::HandleScope scope(CcTest::isolate());
v8::Local<v8::Context> context = CcTest::isolate()->GetCurrentContext();
@@ -402,8 +402,8 @@ TEST(OptimizedCodeSharing1) {
env->Global()
->Get(env.local(), v8_str("closure2"))
.ToLocalChecked())));
- CHECK(fun1->IsOptimized() || !CcTest::i_isolate()->use_crankshaft());
- CHECK(fun2->IsOptimized() || !CcTest::i_isolate()->use_crankshaft());
+ CHECK(fun1->IsOptimized() || !CcTest::i_isolate()->use_optimizer());
+ CHECK(fun2->IsOptimized() || !CcTest::i_isolate()->use_optimizer());
CHECK_EQ(fun1->code(), fun2->code());
}
}
diff --git a/deps/v8/test/cctest/test-cpu-profiler.cc b/deps/v8/test/cctest/test-cpu-profiler.cc
index 08f262d0e7..9ccc93f0f5 100644
--- a/deps/v8/test/cctest/test-cpu-profiler.cc
+++ b/deps/v8/test/cctest/test-cpu-profiler.cc
@@ -1033,7 +1033,7 @@ TEST(BoundFunctionCall) {
// This tests checks distribution of the samples through the source lines.
static void TickLines(bool optimize) {
- if (!optimize) i::FLAG_crankshaft = false;
+ if (!optimize) i::FLAG_opt = false;
CcTest::InitializeVM();
LocalContext env;
i::FLAG_allow_natives_syntax = true;
@@ -1072,7 +1072,7 @@ static void TickLines(bool optimize) {
CHECK(func->shared());
CHECK(func->shared()->abstract_code());
CHECK(!optimize || func->IsOptimized() ||
- !CcTest::i_isolate()->use_crankshaft());
+ !CcTest::i_isolate()->use_optimizer());
i::AbstractCode* code = func->abstract_code();
CHECK(code);
i::Address code_address = code->instruction_start();
@@ -1179,7 +1179,7 @@ TEST(FunctionCallSample) {
// Collect garbage that might have be generated while installing
// extensions.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CompileRun(call_function_test_source);
v8::Local<v8::Function> function = GetFunction(env.local(), "start");
@@ -1792,7 +1792,7 @@ const char* GetBranchDeoptReason(v8::Local<v8::Context> context,
// deopt at top function
TEST(CollectDeoptEvents) {
- if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
+ if (!CcTest::i_isolate()->use_optimizer() || i::FLAG_always_opt) return;
i::FLAG_allow_natives_syntax = true;
v8::HandleScope scope(CcTest::isolate());
v8::Local<v8::Context> env = CcTest::NewContext(PROFILER_EXTENSION);
@@ -1926,7 +1926,7 @@ static const char* inlined_source =
// deopt at the first level inlined function
TEST(DeoptAtFirstLevelInlinedSource) {
- if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
+ if (!CcTest::i_isolate()->use_optimizer() || i::FLAG_always_opt) return;
i::FLAG_allow_natives_syntax = true;
v8::HandleScope scope(CcTest::isolate());
v8::Local<v8::Context> env = CcTest::NewContext(PROFILER_EXTENSION);
@@ -1996,7 +1996,7 @@ TEST(DeoptAtFirstLevelInlinedSource) {
// deopt at the second level inlined function
TEST(DeoptAtSecondLevelInlinedSource) {
- if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
+ if (!CcTest::i_isolate()->use_optimizer() || i::FLAG_always_opt) return;
i::FLAG_allow_natives_syntax = true;
v8::HandleScope scope(CcTest::isolate());
v8::Local<v8::Context> env = CcTest::NewContext(PROFILER_EXTENSION);
@@ -2071,7 +2071,7 @@ TEST(DeoptAtSecondLevelInlinedSource) {
// deopt in untracked function
TEST(DeoptUntrackedFunction) {
- if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
+ if (!CcTest::i_isolate()->use_optimizer() || i::FLAG_always_opt) return;
i::FLAG_allow_natives_syntax = true;
v8::HandleScope scope(CcTest::isolate());
v8::Local<v8::Context> env = CcTest::NewContext(PROFILER_EXTENSION);
diff --git a/deps/v8/test/cctest/test-date.cc b/deps/v8/test/cctest/test-date.cc
index aa9f9f7ca1..14e606a7c3 100644
--- a/deps/v8/test/cctest/test-date.cc
+++ b/deps/v8/test/cctest/test-date.cc
@@ -194,7 +194,7 @@ TEST(DateParseLegacyUseCounter) {
CHECK_EQ(1, legacy_parse_count);
}
-#ifdef V8_I18N_SUPPORT
+#ifdef V8_INTL_SUPPORT
TEST(DateCacheVersion) {
FLAG_allow_natives_syntax = true;
v8::Isolate* isolate = CcTest::isolate();
@@ -215,4 +215,4 @@ TEST(DateCacheVersion) {
CHECK(date_cache_version->IsNumber());
CHECK_EQ(1.0, date_cache_version->NumberValue(context).FromMaybe(-1.0));
}
-#endif // V8_I18N_SUPPORT
+#endif // V8_INTL_SUPPORT
diff --git a/deps/v8/test/cctest/test-debug.cc b/deps/v8/test/cctest/test-debug.cc
index 908b59bc20..e055b5f145 100644
--- a/deps/v8/test/cctest/test-debug.cc
+++ b/deps/v8/test/cctest/test-debug.cc
@@ -384,14 +384,13 @@ void CheckDebuggerUnloaded(bool check_functions) {
CHECK(!CcTest::i_isolate()->debug()->debug_info_list_);
// Collect garbage to ensure weak handles are cleared.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CcTest::CollectAllGarbage(Heap::kMakeHeapIterableMask);
- // Iterate the head and check that there are no debugger related objects left.
+ // Iterate the heap and check that there are no debugger related objects left.
HeapIterator iterator(CcTest::heap());
for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) {
CHECK(!obj->IsDebugInfo());
- CHECK(!obj->IsBreakPointInfo());
// If deep check of functions is requested check that no debug break code
// is left in all functions.
@@ -813,7 +812,7 @@ static void DebugEventBreakPointCollectGarbage(
CcTest::CollectGarbage(v8::internal::NEW_SPACE);
} else {
// Mark sweep compact.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
}
}
}
@@ -1224,7 +1223,7 @@ static void CallAndGC(v8::Local<v8::Context> context,
CHECK_EQ(2 + i * 3, break_point_hit_count);
// Mark sweep (and perhaps compact) and call function.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
f->Call(context, recv, 0, NULL).ToLocalChecked();
CHECK_EQ(3 + i * 3, break_point_hit_count);
}
@@ -1948,7 +1947,7 @@ TEST(ScriptBreakPointLineTopLevel) {
->Get(context, v8_str(env->GetIsolate(), "f"))
.ToLocalChecked());
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
SetScriptBreakPointByNameFromJS(env->GetIsolate(), "test.html", 3, -1);
@@ -6713,3 +6712,29 @@ TEST(DebugGetPossibleBreakpointsReturnLocations) {
CHECK(returns_count == 1);
}
}
+
+TEST(DebugEvaluateNoSideEffect) {
+ LocalContext env;
+ i::Isolate* isolate = CcTest::i_isolate();
+ i::HandleScope scope(isolate);
+ i::List<i::Handle<i::JSFunction>> list;
+ {
+ i::HeapIterator iterator(isolate->heap());
+ while (i::HeapObject* obj = iterator.next()) {
+ if (!obj->IsJSFunction()) continue;
+ i::JSFunction* fun = i::JSFunction::cast(obj);
+ list.Add(i::Handle<i::JSFunction>(fun));
+ }
+ }
+
+ // Perform side effect check on all built-in functions. The side effect check
+ // itself contains additional sanity checks.
+ for (i::Handle<i::JSFunction> fun : list) {
+ bool failed = false;
+ {
+ i::NoSideEffectScope scope(isolate, true);
+ failed = !isolate->debug()->PerformSideEffectCheck(fun);
+ }
+ if (failed) isolate->clear_pending_exception();
+ }
+}
diff --git a/deps/v8/test/cctest/test-deoptimization.cc b/deps/v8/test/cctest/test-deoptimization.cc
index 06d746b2e6..7da027d03f 100644
--- a/deps/v8/test/cctest/test-deoptimization.cc
+++ b/deps/v8/test/cctest/test-deoptimization.cc
@@ -448,7 +448,7 @@ UNINITIALIZED_TEST(DeoptimizeBinaryOperationADDString) {
i::FLAG_always_opt = true;
CompileRun(f_source);
CompileRun("f('a+', new X());");
- CHECK(!i_isolate->use_crankshaft() ||
+ CHECK(!i_isolate->use_optimizer() ||
GetJSFunction(env.local(), "f")->IsOptimized());
// Call f and force deoptimization while processing the binary operation.
@@ -510,7 +510,7 @@ static void TestDeoptimizeBinaryOpHelper(LocalContext* env,
i::FLAG_always_opt = true;
CompileRun(f_source);
CompileRun("f(7, new X());");
- CHECK(!i_isolate->use_crankshaft() ||
+ CHECK(!i_isolate->use_optimizer() ||
GetJSFunction((*env).local(), "f")->IsOptimized());
// Call f and force deoptimization while processing the binary operation.
@@ -707,7 +707,7 @@ UNINITIALIZED_TEST(DeoptimizeCompare) {
i::FLAG_always_opt = true;
CompileRun(f_source);
CompileRun("f('a', new X());");
- CHECK(!i_isolate->use_crankshaft() ||
+ CHECK(!i_isolate->use_optimizer() ||
GetJSFunction(env.local(), "f")->IsOptimized());
// Call f and force deoptimization while processing the comparison.
@@ -798,7 +798,7 @@ UNINITIALIZED_TEST(DeoptimizeLoadICStoreIC) {
CompileRun("g1(new X());");
CompileRun("f2(new X(), 'z');");
CompileRun("g2(new X(), 'z');");
- if (i_isolate->use_crankshaft()) {
+ if (i_isolate->use_optimizer()) {
CHECK(GetJSFunction(env.local(), "f1")->IsOptimized());
CHECK(GetJSFunction(env.local(), "g1")->IsOptimized());
CHECK(GetJSFunction(env.local(), "f2")->IsOptimized());
@@ -902,7 +902,7 @@ UNINITIALIZED_TEST(DeoptimizeLoadICStoreICNested) {
CompileRun("g1(new X());");
CompileRun("f2(new X(), 'z');");
CompileRun("g2(new X(), 'z');");
- if (i_isolate->use_crankshaft()) {
+ if (i_isolate->use_optimizer()) {
CHECK(GetJSFunction(env.local(), "f1")->IsOptimized());
CHECK(GetJSFunction(env.local(), "g1")->IsOptimized());
CHECK(GetJSFunction(env.local(), "f2")->IsOptimized());
diff --git a/deps/v8/test/cctest/test-dictionary.cc b/deps/v8/test/cctest/test-dictionary.cc
index b0d429f5c8..fd015639af 100644
--- a/deps/v8/test/cctest/test-dictionary.cc
+++ b/deps/v8/test/cctest/test-dictionary.cc
@@ -29,6 +29,7 @@
#include "test/cctest/cctest.h"
#include "src/api.h"
+#include "src/builtins/builtins-constructor.h"
#include "src/debug/debug.h"
#include "src/execution.h"
#include "src/factory.h"
@@ -311,4 +312,15 @@ TEST(SetRequiresCopyOnCapacityChange) {
CHECK_NE(*dict, *new_dict);
}
+TEST(MaximumClonedShallowObjectProperties) {
+ // Assert that a NameDictionary with kMaximumClonedShallowObjectProperties is
+ // not in large-object space.
+ const int max_capacity = NameDictionary::ComputeCapacity(
+ ConstructorBuiltins::kMaximumClonedShallowObjectProperties);
+ const int max_literal_entry = max_capacity / NameDictionary::kEntrySize;
+ const int max_literal_index = NameDictionary::EntryToIndex(max_literal_entry);
+ CHECK_LE(NameDictionary::OffsetOfElementAt(max_literal_index),
+ kMaxRegularHeapObjectSize);
+}
+
} // namespace
diff --git a/deps/v8/test/cctest/test-disasm-arm.cc b/deps/v8/test/cctest/test-disasm-arm.cc
index 450986d3d2..89f8819a25 100644
--- a/deps/v8/test/cctest/test-disasm-arm.cc
+++ b/deps/v8/test/cctest/test-disasm-arm.cc
@@ -994,10 +994,14 @@ TEST(Neon) {
"eea24b30 vdup.16 q1, r4");
COMPARE(vdup(Neon32, q15, r1),
"eeae1b90 vdup.32 q15, r1");
- COMPARE(vdup(q0, s3),
- "f3bc0c41 vdup q0, d1[1]");
- COMPARE(vdup(q15, s2),
- "f3f4ec41 vdup q15, d1[0]");
+ COMPARE(vdup(Neon32, q0, d1, 1),
+ "f3bc0c41 vdup.32 q0, d1[1]");
+ COMPARE(vdup(Neon32, q15, d1, 0),
+ "f3f4ec41 vdup.32 q15, d1[0]");
+ COMPARE(vdup(Neon16, q7, d8, 3),
+ "f3beec48 vdup.16 q7, d8[3]");
+ COMPARE(vdup(Neon32, d0, d30, 0),
+ "f3b40c2e vdup.32 d0, d30[0]");
COMPARE(vcvt_f32_s32(q15, q1),
"f3fbe642 vcvt.f32.s32 q15, q1");
COMPARE(vcvt_f32_u32(q8, q9),
@@ -1044,6 +1048,14 @@ TEST(Neon) {
"f3142670 vmin.u16 q1, q2, q8");
COMPARE(vmax(NeonS32, q15, q0, q8),
"f260e660 vmax.s32 q15, q0, q8");
+ COMPARE(vpadd(d0, d1, d2),
+ "f3010d02 vpadd.f32 d0, d1, d2");
+ COMPARE(vpadd(Neon8, d0, d1, d2),
+ "f2010b12 vpadd.i8 d0, d1, d2");
+ COMPARE(vpadd(Neon16, d0, d1, d2),
+ "f2110b12 vpadd.i16 d0, d1, d2");
+ COMPARE(vpadd(Neon32, d0, d1, d2),
+ "f2210b12 vpadd.i32 d0, d1, d2");
COMPARE(vpmax(NeonS8, d0, d1, d2),
"f2010a02 vpmax.s8 d0, d1, d2");
COMPARE(vpmin(NeonU16, d1, d2, d8),
@@ -1098,6 +1110,14 @@ TEST(Neon) {
"f3d6e050 vshr.u16 q15, q0, #10");
COMPARE(vshr(NeonS32, q15, q0, 17),
"f2efe050 vshr.s32 q15, q0, #17");
+ COMPARE(vsli(Neon64, d2, d0, 32),
+ "f3a02590 vsli.64 d2, d0, #32");
+ COMPARE(vsli(Neon32, d7, d8, 17),
+ "f3b17518 vsli.32 d7, d8, #17");
+ COMPARE(vsri(Neon64, d2, d0, 32),
+ "f3a02490 vsri.64 d2, d0, #32");
+ COMPARE(vsri(Neon16, d7, d8, 8),
+ "f3987418 vsri.16 d7, d8, #8");
COMPARE(vrecpe(q15, q0),
"f3fbe540 vrecpe.f32 q15, q0");
COMPARE(vrecps(q15, q0, q8),
@@ -1385,6 +1405,39 @@ TEST(LoadStore) {
}
+static void TestLoadLiteral(byte* buffer, Assembler* assm, bool* failure,
+ int offset) {
+ int pc_offset = assm->pc_offset();
+ byte *progcounter = &buffer[pc_offset];
+ assm->ldr(r0, MemOperand(pc, offset));
+
+ const char *expected_string_template =
+ (offset >= 0) ?
+ "e59f0%03x ldr r0, [pc, #+%d] (addr %p)" :
+ "e51f0%03x ldr r0, [pc, #%d] (addr %p)";
+ char expected_string[80];
+ snprintf(expected_string, sizeof(expected_string), expected_string_template,
+ abs(offset), offset,
+ progcounter + Instruction::kPCReadOffset + offset);
+ if (!DisassembleAndCompare(progcounter, expected_string)) *failure = true;
+}
+
+
+TEST(LoadLiteral) {
+ SET_UP();
+
+ TestLoadLiteral(buffer, &assm, &failure, 0);
+ TestLoadLiteral(buffer, &assm, &failure, 1);
+ TestLoadLiteral(buffer, &assm, &failure, 4);
+ TestLoadLiteral(buffer, &assm, &failure, 4095);
+ TestLoadLiteral(buffer, &assm, &failure, -1);
+ TestLoadLiteral(buffer, &assm, &failure, -4);
+ TestLoadLiteral(buffer, &assm, &failure, -4095);
+
+ VERIFY_RUN();
+}
+
+
TEST(Barrier) {
SET_UP();
diff --git a/deps/v8/test/cctest/test-disasm-ia32.cc b/deps/v8/test/cctest/test-disasm-ia32.cc
index 3331521df9..5a560df8c3 100644
--- a/deps/v8/test/cctest/test-disasm-ia32.cc
+++ b/deps/v8/test/cctest/test-disasm-ia32.cc
@@ -428,6 +428,19 @@ TEST(DisasmIa320) {
__ minps(xmm1, Operand(ebx, ecx, times_4, 10000));
__ maxps(xmm1, xmm0);
__ maxps(xmm1, Operand(ebx, ecx, times_4, 10000));
+ __ rcpps(xmm1, xmm0);
+ __ rcpps(xmm1, Operand(ebx, ecx, times_4, 10000));
+ __ rsqrtps(xmm1, xmm0);
+ __ rsqrtps(xmm1, Operand(ebx, ecx, times_4, 10000));
+
+ __ cmpeqps(xmm5, xmm1);
+ __ cmpeqps(xmm5, Operand(ebx, ecx, times_4, 10000));
+ __ cmpltps(xmm5, xmm1);
+ __ cmpltps(xmm5, Operand(ebx, ecx, times_4, 10000));
+ __ cmpleps(xmm5, xmm1);
+ __ cmpleps(xmm5, Operand(ebx, ecx, times_4, 10000));
+ __ cmpneqps(xmm5, xmm1);
+ __ cmpneqps(xmm5, Operand(ebx, ecx, times_4, 10000));
__ ucomiss(xmm0, xmm1);
__ ucomiss(xmm0, Operand(ebx, ecx, times_4, 10000));
@@ -437,6 +450,10 @@ TEST(DisasmIa320) {
__ cvtsi2sd(xmm1, Operand(ebx, ecx, times_4, 10000));
__ cvtss2sd(xmm1, Operand(ebx, ecx, times_4, 10000));
__ cvtss2sd(xmm1, xmm0);
+ __ cvtdq2ps(xmm1, xmm0);
+ __ cvtdq2ps(xmm1, Operand(ebx, ecx, times_4, 10000));
+ __ cvttps2dq(xmm1, xmm0);
+ __ cvttps2dq(xmm1, Operand(ebx, ecx, times_4, 10000));
__ movsd(xmm1, Operand(ebx, ecx, times_4, 10000));
__ movsd(Operand(ebx, ecx, times_4, 10000), xmm1);
// 128 bit move instructions.
@@ -566,6 +583,19 @@ TEST(DisasmIa320) {
__ vdivps(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000));
__ vmaxps(xmm0, xmm1, xmm2);
__ vmaxps(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000));
+ __ vrcpps(xmm1, xmm0);
+ __ vrcpps(xmm1, Operand(ebx, ecx, times_4, 10000));
+ __ vrsqrtps(xmm1, xmm0);
+ __ vrsqrtps(xmm1, Operand(ebx, ecx, times_4, 10000));
+
+ __ vcmpeqps(xmm5, xmm4, xmm1);
+ __ vcmpeqps(xmm5, xmm4, Operand(ebx, ecx, times_4, 10000));
+ __ vcmpltps(xmm5, xmm4, xmm1);
+ __ vcmpltps(xmm5, xmm4, Operand(ebx, ecx, times_4, 10000));
+ __ vcmpleps(xmm5, xmm4, xmm1);
+ __ vcmpleps(xmm5, xmm4, Operand(ebx, ecx, times_4, 10000));
+ __ vcmpneqps(xmm5, xmm4, xmm1);
+ __ vcmpneqps(xmm5, xmm4, Operand(ebx, ecx, times_4, 10000));
__ vandpd(xmm0, xmm1, xmm2);
__ vandpd(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000));
@@ -590,6 +620,12 @@ TEST(DisasmIa320) {
__ vpsrld(xmm0, xmm7, 21);
__ vpsraw(xmm0, xmm7, 21);
__ vpsrad(xmm0, xmm7, 21);
+
+ __ vcvtdq2ps(xmm1, xmm0);
+ __ vcvtdq2ps(xmm1, Operand(ebx, ecx, times_4, 10000));
+ __ vcvttps2dq(xmm1, xmm0);
+ __ vcvttps2dq(xmm1, Operand(ebx, ecx, times_4, 10000));
+
#define EMIT_SSE2_AVXINSTR(instruction, notUsed1, notUsed2, notUsed3) \
__ v##instruction(xmm7, xmm5, xmm1); \
__ v##instruction(xmm7, xmm5, Operand(edx, 4));
diff --git a/deps/v8/test/cctest/test-disasm-mips64.cc b/deps/v8/test/cctest/test-disasm-mips64.cc
index eca9e1ffdd..5046527d4e 100644
--- a/deps/v8/test/cctest/test-disasm-mips64.cc
+++ b/deps/v8/test/cctest/test-disasm-mips64.cc
@@ -711,26 +711,41 @@ TEST(Type0) {
COMPARE(dsbh(s6, s7), "7c17b0a4 dsbh s6, s7");
COMPARE(dsbh(v0, v1), "7c0310a4 dsbh v0, v1");
+ COMPARE(dshd(a0, a1), "7c052164 dshd a0, a1");
+ COMPARE(dshd(s6, s7), "7c17b164 dshd s6, s7");
+ COMPARE(dshd(v0, v1), "7c031164 dshd v0, v1");
+
+ COMPARE(ext_(a0, a1, 31, 1), "7ca407c0 ext a0, a1, 31, 1");
+ COMPARE(ext_(s6, s7, 30, 2), "7ef60f80 ext s6, s7, 30, 2");
+ COMPARE(ext_(v0, v1, 0, 32), "7c62f800 ext v0, v1, 0, 32");
+
+ COMPARE(dext_(a0, a1, 31, 1), "7ca407c3 dext a0, a1, 31, 1");
+ COMPARE(dext_(s6, s7, 30, 2), "7ef60f83 dext s6, s7, 30, 2");
+ COMPARE(dext_(v0, v1, 0, 32), "7c62f803 dext v0, v1, 0, 32");
+
+ COMPARE(dextm_(a0, a1, 31, 33), "7ca407c1 dextm a0, a1, 31, 33");
+ COMPARE(dextm_(s6, s7, 0, 33), "7ef60001 dextm s6, s7, 0, 33");
+ COMPARE(dextm_(v0, v1, 0, 64), "7c62f801 dextm v0, v1, 0, 64");
+
+ COMPARE(dextu_(a0, a1, 32, 1), "7ca40002 dextu a0, a1, 32, 1");
+ COMPARE(dextu_(s6, s7, 63, 1), "7ef607c2 dextu s6, s7, 63, 1");
+ COMPARE(dextu_(v0, v1, 32, 32), "7c62f802 dextu v0, v1, 32, 32");
+
+ COMPARE(ins_(a0, a1, 31, 1), "7ca4ffc4 ins a0, a1, 31, 1");
+ COMPARE(ins_(s6, s7, 30, 2), "7ef6ff84 ins s6, s7, 30, 2");
+ COMPARE(ins_(v0, v1, 0, 32), "7c62f804 ins v0, v1, 0, 32");
+
COMPARE(dins_(a0, a1, 31, 1), "7ca4ffc7 dins a0, a1, 31, 1");
COMPARE(dins_(s6, s7, 30, 2), "7ef6ff87 dins s6, s7, 30, 2");
COMPARE(dins_(v0, v1, 0, 32), "7c62f807 dins v0, v1, 0, 32");
- COMPARE(dshd(a0, a1), "7c052164 dshd a0, a1");
- COMPARE(dshd(s6, s7), "7c17b164 dshd s6, s7");
- COMPARE(dshd(v0, v1), "7c031164 dshd v0, v1");
+ COMPARE(dinsm_(a0, a1, 31, 2), "7ca407c5 dinsm a0, a1, 31, 2");
+ COMPARE(dinsm_(s6, s7, 0, 33), "7ef60005 dinsm s6, s7, 0, 33");
+ COMPARE(dinsm_(v0, v1, 0, 64), "7c62f805 dinsm v0, v1, 0, 64");
- COMPARE(ins_(a0, a1, 31, 1),
- "7ca4ffc4 ins a0, a1, 31, 1");
- COMPARE(ins_(s6, s7, 30, 2),
- "7ef6ff84 ins s6, s7, 30, 2");
- COMPARE(ins_(v0, v1, 0, 32),
- "7c62f804 ins v0, v1, 0, 32");
- COMPARE(ext_(a0, a1, 31, 1),
- "7ca407c0 ext a0, a1, 31, 1");
- COMPARE(ext_(s6, s7, 30, 2),
- "7ef60f80 ext s6, s7, 30, 2");
- COMPARE(ext_(v0, v1, 0, 32),
- "7c62f800 ext v0, v1, 0, 32");
+ COMPARE(dinsu_(a0, a1, 32, 1), "7ca40006 dinsu a0, a1, 32, 1");
+ COMPARE(dinsu_(s6, s7, 63, 1), "7ef6ffc6 dinsu s6, s7, 63, 1");
+ COMPARE(dinsu_(v0, v1, 32, 32), "7c62f806 dinsu v0, v1, 32, 32");
COMPARE(add_s(f4, f6, f8), "46083100 add.s f4, f6, f8");
COMPARE(add_d(f12, f14, f16), "46307300 add.d f12, f14, f16");
diff --git a/deps/v8/test/cctest/test-disasm-x64.cc b/deps/v8/test/cctest/test-disasm-x64.cc
index 8ab35365b8..41f06a61bb 100644
--- a/deps/v8/test/cctest/test-disasm-x64.cc
+++ b/deps/v8/test/cctest/test-disasm-x64.cc
@@ -469,6 +469,9 @@ TEST(DisasmX64) {
__ punpckldq(xmm5, Operand(rdx, 4));
__ punpckhdq(xmm8, xmm15);
+ __ pshuflw(xmm2, xmm4, 3);
+ __ pshufhw(xmm1, xmm9, 6);
+
#define EMIT_SSE2_INSTR(instruction, notUsed1, notUsed2, notUsed3) \
__ instruction(xmm5, xmm1); \
__ instruction(xmm5, Operand(rdx, 4));
@@ -521,6 +524,7 @@ TEST(DisasmX64) {
__ insertps(xmm5, xmm1, 123);
__ extractps(rax, xmm1, 0);
__ pextrw(rbx, xmm2, 1);
+ __ pinsrw(xmm2, rcx, 1);
__ pextrd(rbx, xmm15, 0);
__ pextrd(r12, xmm0, 1);
__ pinsrd(xmm9, r9, 0);
diff --git a/deps/v8/test/cctest/test-feedback-vector.cc b/deps/v8/test/cctest/test-feedback-vector.cc
index dc111e340f..2ae65197ef 100644
--- a/deps/v8/test/cctest/test-feedback-vector.cc
+++ b/deps/v8/test/cctest/test-feedback-vector.cc
@@ -220,7 +220,7 @@ TEST(VectorCallICStates) {
CHECK_EQ(GENERIC, nexus.StateFromFeedback());
// After a collection, state should remain GENERIC.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(GENERIC, nexus.StateFromFeedback());
}
@@ -245,7 +245,7 @@ TEST(VectorCallFeedbackForArray) {
CHECK_EQ(MONOMORPHIC, nexus.StateFromFeedback());
CHECK(nexus.GetFeedback()->IsAllocationSite());
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
// It should stay monomorphic even after a GC.
CHECK_EQ(MONOMORPHIC, nexus.StateFromFeedback());
}
@@ -349,9 +349,9 @@ TEST(VectorLoadICStates) {
CompileRun("f({ blarg: 3, torino: 10, foo: 2 })");
CHECK_EQ(POLYMORPHIC, nexus.StateFromFeedback());
- MapHandleList maps;
- nexus.FindAllMaps(&maps);
- CHECK_EQ(4, maps.length());
+ MapHandles maps;
+ nexus.ExtractMaps(&maps);
+ CHECK_EQ(4, maps.size());
// Finally driven megamorphic.
CompileRun("f({ blarg: 3, gran: 3, torino: 10, foo: 2 })");
@@ -359,7 +359,7 @@ TEST(VectorLoadICStates) {
CHECK(!nexus.FindFirstMap());
// After a collection, state should not be reset to PREMONOMORPHIC.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
CHECK_EQ(MEGAMORPHIC, nexus.StateFromFeedback());
}
@@ -428,9 +428,9 @@ TEST(VectorLoadICOnSmi) {
CompileRun("f(o)");
CHECK_EQ(POLYMORPHIC, nexus.StateFromFeedback());
- MapHandleList maps;
- nexus.FindAllMaps(&maps);
- CHECK_EQ(2, maps.length());
+ MapHandles maps;
+ nexus.ExtractMaps(&maps);
+ CHECK_EQ(2, maps.size());
// One of the maps should be the o map.
v8::MaybeLocal<v8::Value> v8_o =
@@ -439,8 +439,7 @@ TEST(VectorLoadICOnSmi) {
Handle<JSObject>::cast(v8::Utils::OpenHandle(*v8_o.ToLocalChecked()));
bool number_map_found = false;
bool o_map_found = false;
- for (int i = 0; i < maps.length(); i++) {
- Handle<Map> current = maps[i];
+ for (Handle<Map> current : maps) {
if (*current == number_map)
number_map_found = true;
else if (*current == o->map())
@@ -451,9 +450,9 @@ TEST(VectorLoadICOnSmi) {
// The degree of polymorphism doesn't change.
CompileRun("f(100)");
CHECK_EQ(POLYMORPHIC, nexus.StateFromFeedback());
- MapHandleList maps2;
- nexus.FindAllMaps(&maps2);
- CHECK_EQ(2, maps2.length());
+ MapHandles maps2;
+ nexus.ExtractMaps(&maps2);
+ CHECK_EQ(2, maps2.size());
}
diff --git a/deps/v8/test/cctest/test-field-type-tracking.cc b/deps/v8/test/cctest/test-field-type-tracking.cc
index 0ecf7911bd..79bb9b7860 100644
--- a/deps/v8/test/cctest/test-field-type-tracking.cc
+++ b/deps/v8/test/cctest/test-field-type-tracking.cc
@@ -322,8 +322,21 @@ class Expectations {
Handle<FieldType> heap_type) {
CHECK_EQ(number_of_properties_, map->NumberOfOwnDescriptors());
int property_index = number_of_properties_++;
- SetDataField(property_index, attributes, constness, representation,
- heap_type);
+ PropertyConstness expected_constness = constness;
+ Representation expected_representation = representation;
+ Handle<FieldType> expected_heap_type = heap_type;
+ if (IsTransitionableFastElementsKind(map->elements_kind())) {
+ // Maps with transitionable elements kinds must have non in-place
+ // generalizable fields.
+ if (FLAG_track_constant_fields && FLAG_modify_map_inplace) {
+ expected_constness = kMutable;
+ }
+ if (representation.IsHeapObject() && heap_type->IsClass()) {
+ expected_heap_type = FieldType::Any(isolate_);
+ }
+ }
+ SetDataField(property_index, attributes, expected_constness,
+ expected_representation, expected_heap_type);
Handle<String> name = MakeName("prop", property_index);
return Map::CopyWithField(map, name, heap_type, attributes, constness,
@@ -1768,9 +1781,9 @@ static void TestReconfigureElementsKind_GeneralizeField(
// Ensure Map::FindElementsKindTransitionedMap() is able to find the
// transitioned map.
{
- MapHandleList map_list;
- map_list.Add(updated_map);
- Map* transitioned_map = map2->FindElementsKindTransitionedMap(&map_list);
+ MapHandles map_list;
+ map_list.push_back(updated_map);
+ Map* transitioned_map = map2->FindElementsKindTransitionedMap(map_list);
CHECK_EQ(*updated_map, transitioned_map);
}
}
@@ -1788,8 +1801,7 @@ static void TestReconfigureElementsKind_GeneralizeField(
// where "p2A" and "p2B" differ only in the representation/field type.
//
static void TestReconfigureElementsKind_GeneralizeFieldTrivial(
- const CRFTData& from, const CRFTData& to, const CRFTData& expected,
- bool expected_field_type_dependency = true) {
+ const CRFTData& from, const CRFTData& to, const CRFTData& expected) {
Isolate* isolate = CcTest::i_isolate();
Expectations expectations(isolate, FAST_SMI_ELEMENTS);
@@ -1851,7 +1863,7 @@ static void TestReconfigureElementsKind_GeneralizeFieldTrivial(
expected.representation, expected.type);
CHECK(!map->is_deprecated());
CHECK_EQ(*map, *new_map);
- CHECK_EQ(expected_field_type_dependency, dependencies.HasAborted());
+ CHECK(!dependencies.HasAborted());
dependencies.Rollback(); // Properly cleanup compilation info.
CHECK(!new_map->is_deprecated());
@@ -1863,9 +1875,9 @@ static void TestReconfigureElementsKind_GeneralizeFieldTrivial(
// Ensure Map::FindElementsKindTransitionedMap() is able to find the
// transitioned map.
{
- MapHandleList map_list;
- map_list.Add(updated_map);
- Map* transitioned_map = map2->FindElementsKindTransitionedMap(&map_list);
+ MapHandles map_list;
+ map_list.push_back(updated_map);
+ Map* transitioned_map = map2->FindElementsKindTransitionedMap(map_list);
CHECK_EQ(*updated_map, transitioned_map);
}
}
@@ -2012,7 +2024,7 @@ TEST(ReconfigureElementsKind_GeneralizeHeapObjFieldToHeapObj) {
TestReconfigureElementsKind_GeneralizeFieldTrivial(
{kConst, Representation::HeapObject(), any_type},
{kConst, Representation::HeapObject(), new_type},
- {kConst, Representation::HeapObject(), any_type}, false);
+ {kConst, Representation::HeapObject(), any_type});
if (FLAG_modify_map_inplace) {
// kConst to kMutable migration does not create a new map, therefore
@@ -2033,12 +2045,12 @@ TEST(ReconfigureElementsKind_GeneralizeHeapObjFieldToHeapObj) {
TestReconfigureElementsKind_GeneralizeFieldTrivial(
{kMutable, Representation::HeapObject(), any_type},
{kConst, Representation::HeapObject(), new_type},
- {kMutable, Representation::HeapObject(), any_type}, false);
+ {kMutable, Representation::HeapObject(), any_type});
}
TestReconfigureElementsKind_GeneralizeFieldTrivial(
{kMutable, Representation::HeapObject(), any_type},
{kMutable, Representation::HeapObject(), new_type},
- {kMutable, Representation::HeapObject(), any_type}, false);
+ {kMutable, Representation::HeapObject(), any_type});
}
TEST(ReconfigureElementsKind_GeneralizeHeapObjectFieldToTagged) {
diff --git a/deps/v8/test/cctest/test-flags.cc b/deps/v8/test/cctest/test-flags.cc
index 0abbca6909..8c4865875b 100644
--- a/deps/v8/test/cctest/test-flags.cc
+++ b/deps/v8/test/cctest/test-flags.cc
@@ -252,7 +252,7 @@ TEST(FlagsRemoveIncomplete) {
// if the list of arguments ends unexpectedly.
SetFlagsToDefault();
int argc = 3;
- const char* argv[] = {"", "--crankshaft", "--expose-natives-as"};
+ const char* argv[] = {"", "--opt", "--expose-natives-as"};
CHECK_EQ(2, FlagList::SetFlagsFromCommandLine(&argc,
const_cast<char **>(argv),
true));
diff --git a/deps/v8/test/cctest/test-heap-profiler.cc b/deps/v8/test/cctest/test-heap-profiler.cc
index 7855f75b38..b96e161566 100644
--- a/deps/v8/test/cctest/test-heap-profiler.cc
+++ b/deps/v8/test/cctest/test-heap-profiler.cc
@@ -689,7 +689,7 @@ TEST(HeapSnapshotAddressReuse) {
CompileRun(
"for (var i = 0; i < 10000; ++i)\n"
" a[i] = new A();\n");
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
const v8::HeapSnapshot* snapshot2 = heap_profiler->TakeHeapSnapshot();
CHECK(ValidateSnapshot(snapshot2));
@@ -731,7 +731,7 @@ TEST(HeapEntryIdsAndArrayShift) {
"for (var i = 0; i < 1; ++i)\n"
" a.shift();\n");
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
const v8::HeapSnapshot* snapshot2 = heap_profiler->TakeHeapSnapshot();
CHECK(ValidateSnapshot(snapshot2));
@@ -772,7 +772,7 @@ TEST(HeapEntryIdsAndGC) {
const v8::HeapSnapshot* snapshot1 = heap_profiler->TakeHeapSnapshot();
CHECK(ValidateSnapshot(snapshot1));
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
const v8::HeapSnapshot* snapshot2 = heap_profiler->TakeHeapSnapshot();
CHECK(ValidateSnapshot(snapshot2));
@@ -1101,7 +1101,7 @@ TEST(HeapSnapshotObjectsStats) {
// We have to call GC 6 times. In other case the garbage will be
// the reason of flakiness.
for (int i = 0; i < 6; ++i) {
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
}
v8::SnapshotObjectId initial_id;
@@ -2671,7 +2671,7 @@ TEST(WeakContainers) {
i::FLAG_allow_natives_syntax = true;
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
- if (!CcTest::i_isolate()->use_crankshaft()) return;
+ if (!CcTest::i_isolate()->use_optimizer()) return;
v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler();
CompileRun(
"function foo(a) { return a.x; }\n"
@@ -2905,7 +2905,7 @@ TEST(SamplingHeapProfiler) {
" eval(\"new Array(100)\");\n"
"}\n");
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
std::unique_ptr<v8::AllocationProfile> profile(
heap_profiler->GetAllocationProfile());
diff --git a/deps/v8/test/cctest/test-identity-map.cc b/deps/v8/test/cctest/test-identity-map.cc
index f57036afc9..a16298b09b 100644
--- a/deps/v8/test/cctest/test-identity-map.cc
+++ b/deps/v8/test/cctest/test-identity-map.cc
@@ -187,7 +187,6 @@ class IdentityMapTester : public HandleAndZoneScope {
void Rehash() { map.Rehash(); }
};
-
TEST(Find_smi_not_found) {
IdentityMapTester t;
for (int i = 0; i < 100; i++) {
@@ -673,7 +672,6 @@ TEST(Collisions_7) { CollisionTest(7); }
TEST(Resize) { CollisionTest(9, false, true); }
TEST(Rehash) { CollisionTest(11, true, false); }
-
TEST(ExplicitGC) {
IdentityMapTester t;
Handle<Object> num_keys[] = {t.num(2.1), t.num(2.4), t.num(3.3), t.num(4.3),
@@ -695,7 +693,6 @@ TEST(ExplicitGC) {
}
}
-
TEST(CanonicalHandleScope) {
Isolate* isolate = CcTest::i_isolate();
Heap* heap = CcTest::heap();
@@ -738,7 +735,7 @@ TEST(CanonicalHandleScope) {
Handle<String> string2(*string1);
CHECK_EQ(number1.location(), number2.location());
CHECK_EQ(string1.location(), string2.location());
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
Handle<HeapNumber> number3(*number2);
Handle<String> string3(*string2);
CHECK_EQ(number1.location(), number3.location());
@@ -775,5 +772,54 @@ TEST(CanonicalHandleScope) {
}
}
+TEST(GCShortCutting) {
+ IdentityMapTester t;
+ Isolate* isolate = CcTest::i_isolate();
+ Factory* factory = isolate->factory();
+ const int kDummyValue = 0;
+
+ for (int i = 0; i < 16; i++) {
+ // Insert a varying number of Smis as padding to ensure some tests straddle
+ // a boundary where the thin string short cutting will cause size_ to be
+ // greater to capacity_ if not corrected by IdentityMap
+ // (see crbug.com/704132).
+ for (int j = 0; j < i; j++) {
+ t.map.Set(t.smi(j), reinterpret_cast<void*>(kDummyValue));
+ }
+
+ Handle<String> thin_string =
+ factory->NewStringFromAsciiChecked("thin_string");
+ Handle<String> internalized_string =
+ factory->InternalizeString(thin_string);
+ DCHECK_IMPLIES(FLAG_thin_strings, thin_string->IsThinString());
+ DCHECK_NE(*thin_string, *internalized_string);
+
+ // Insert both keys into the map.
+ t.map.Set(thin_string, &thin_string);
+ t.map.Set(internalized_string, &internalized_string);
+
+ // Do an explicit, real GC, this should short-cut the thin string to point
+ // to the internalized string.
+ t.heap()->CollectGarbage(i::NEW_SPACE,
+ i::GarbageCollectionReason::kTesting);
+ DCHECK_IMPLIES(FLAG_thin_strings && !FLAG_optimize_for_size,
+ *thin_string == *internalized_string);
+
+ // Check that getting the object points to one of the handles.
+ void** thin_string_entry = t.map.Get(thin_string);
+ CHECK(*thin_string_entry == &thin_string ||
+ *thin_string_entry == &internalized_string);
+ void** internalized_string_entry = t.map.Get(internalized_string);
+ CHECK(*internalized_string_entry == &thin_string ||
+ *internalized_string_entry == &internalized_string);
+
+ // Trigger resize.
+ for (int j = 0; j < 16; j++) {
+ t.map.Set(t.smi(j + 16), reinterpret_cast<void*>(kDummyValue));
+ }
+ t.map.Clear();
+ }
+}
+
} // namespace internal
} // namespace v8
diff --git a/deps/v8/test/cctest/test-macro-assembler-arm.cc b/deps/v8/test/cctest/test-macro-assembler-arm.cc
index 4de4647f98..d1748b0be3 100644
--- a/deps/v8/test/cctest/test-macro-assembler-arm.cc
+++ b/deps/v8/test/cctest/test-macro-assembler-arm.cc
@@ -169,7 +169,7 @@ TEST(ExtractLane) {
__ ExtractLane(r5, q1, NeonS32, i);
__ str(r5, MemOperand(r0, offsetof(T, i32x4_low) + 4 * i));
SwVfpRegister si = SwVfpRegister::from_code(i);
- __ ExtractLane(si, q1, r4, i);
+ __ ExtractLane(si, q1, i);
__ vstr(si, r0, offsetof(T, f32x4_low) + 4 * i);
}
@@ -203,7 +203,7 @@ TEST(ExtractLane) {
__ ExtractLane(r5, q15, NeonS32, i);
__ str(r5, MemOperand(r0, offsetof(T, i32x4_high) + 4 * i));
SwVfpRegister si = SwVfpRegister::from_code(i);
- __ ExtractLane(si, q15, r4, i);
+ __ ExtractLane(si, q15, i);
__ vstr(si, r0, offsetof(T, f32x4_high) + 4 * i);
}
@@ -304,8 +304,6 @@ TEST(ReplaceLane) {
__ stm(db_w, sp, r4.bit() | r5.bit() | r6.bit() | r7.bit() | lr.bit());
- const Register kScratch = r5;
-
__ veor(q0, q0, q0); // Zero
__ veor(q1, q1, q1); // Zero
for (int i = 0; i < 4; i++) {
@@ -313,7 +311,7 @@ TEST(ReplaceLane) {
__ ReplaceLane(q0, q0, r4, NeonS32, i);
SwVfpRegister si = SwVfpRegister::from_code(i);
__ vmov(si, r4);
- __ ReplaceLane(q1, q1, si, kScratch, i);
+ __ ReplaceLane(q1, q1, si, i);
}
__ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, i32x4_low))));
__ vst1(Neon8, NeonListOperand(q0), NeonMemOperand(r4));
@@ -344,7 +342,7 @@ TEST(ReplaceLane) {
__ ReplaceLane(q14, q14, r4, NeonS32, i);
SwVfpRegister si = SwVfpRegister::from_code(i);
__ vmov(si, r4);
- __ ReplaceLane(q15, q15, si, kScratch, i);
+ __ ReplaceLane(q15, q15, si, i);
}
__ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, i32x4_high))));
__ vst1(Neon8, NeonListOperand(q14), NeonMemOperand(r4));
@@ -405,115 +403,4 @@ TEST(ReplaceLane) {
}
}
-#define CHECK_EQ_32X4(field, v0, v1, v2, v3) \
- CHECK_EQ(v0, t.field[0]); \
- CHECK_EQ(v1, t.field[1]); \
- CHECK_EQ(v2, t.field[2]); \
- CHECK_EQ(v3, t.field[3]);
-
-TEST(Swizzle) {
- if (!CpuFeatures::IsSupported(NEON)) return;
-
- // Allocate an executable page of memory.
- size_t actual_size;
- byte* buffer = static_cast<byte*>(v8::base::OS::Allocate(
- Assembler::kMinimalBufferSize, &actual_size, true));
- CHECK(buffer);
- Isolate* isolate = CcTest::i_isolate();
- HandleScope handles(isolate);
- MacroAssembler assembler(isolate, buffer, static_cast<int>(actual_size),
- v8::internal::CodeObjectRequired::kYes);
- MacroAssembler* masm = &assembler; // Create a pointer for the __ macro.
-
- typedef struct {
- int32_t _32x4_3210[4]; // identity
- int32_t _32x4_1032[4]; // high / low swap
- int32_t _32x4_0000[4]; // vdup's
- int32_t _32x4_1111[4];
- int32_t _32x4_2222[4];
- int32_t _32x4_3333[4];
- int32_t _32x4_2103[4]; // rotate left
- int32_t _32x4_0321[4]; // rotate right
- int32_t _32x4_1132[4]; // irregular
- int32_t _32x4_1132_in_place[4]; // irregular, in-place
- } T;
- T t;
-
- __ stm(db_w, sp, r4.bit() | r5.bit() | r6.bit() | r7.bit() | lr.bit());
-
- const Register kScratch = r5;
-
- // Make test vector [0, 1, 2, 3]
- __ veor(q1, q1, q1); // Zero
- for (int i = 0; i < 4; i++) {
- __ mov(r4, Operand(i));
- __ ReplaceLane(q1, q1, r4, NeonS32, i);
- }
- __ Swizzle(q0, q1, kScratch, Neon32, 0x3210);
- __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, _32x4_3210))));
- __ vst1(Neon8, NeonListOperand(q0), NeonMemOperand(r4));
-
- __ Swizzle(q0, q1, kScratch, Neon32, 0x1032);
- __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, _32x4_1032))));
- __ vst1(Neon8, NeonListOperand(q0), NeonMemOperand(r4));
-
- __ Swizzle(q0, q1, kScratch, Neon32, 0x0000);
- __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, _32x4_0000))));
- __ vst1(Neon8, NeonListOperand(q0), NeonMemOperand(r4));
-
- __ Swizzle(q0, q1, kScratch, Neon32, 0x1111);
- __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, _32x4_1111))));
- __ vst1(Neon8, NeonListOperand(q0), NeonMemOperand(r4));
-
- __ Swizzle(q0, q1, kScratch, Neon32, 0x2222);
- __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, _32x4_2222))));
- __ vst1(Neon8, NeonListOperand(q0), NeonMemOperand(r4));
-
- __ Swizzle(q0, q1, kScratch, Neon32, 0x3333);
- __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, _32x4_3333))));
- __ vst1(Neon8, NeonListOperand(q0), NeonMemOperand(r4));
-
- __ Swizzle(q0, q1, kScratch, Neon32, 0x2103);
- __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, _32x4_2103))));
- __ vst1(Neon8, NeonListOperand(q0), NeonMemOperand(r4));
-
- __ Swizzle(q0, q1, kScratch, Neon32, 0x0321);
- __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, _32x4_0321))));
- __ vst1(Neon8, NeonListOperand(q0), NeonMemOperand(r4));
-
- __ Swizzle(q0, q1, kScratch, Neon32, 0x1132);
- __ add(r4, r0, Operand(static_cast<int32_t>(offsetof(T, _32x4_1132))));
- __ vst1(Neon8, NeonListOperand(q0), NeonMemOperand(r4));
-
- __ vmov(q0, q1);
- __ Swizzle(q0, q0, kScratch, Neon32, 0x1132);
- __ add(r4, r0,
- Operand(static_cast<int32_t>(offsetof(T, _32x4_1132_in_place))));
- __ vst1(Neon8, NeonListOperand(q0), NeonMemOperand(r4));
-
- __ ldm(ia_w, sp, r4.bit() | r5.bit() | r6.bit() | r7.bit() | pc.bit());
-
- CodeDesc desc;
- masm->GetCode(&desc);
- Handle<Code> code = isolate->factory()->NewCode(
- desc, Code::ComputeFlags(Code::STUB), Handle<Code>());
-#ifdef DEBUG
- OFStream os(stdout);
- code->Print(os);
-#endif
- F3 f = FUNCTION_CAST<F3>(code->entry());
- Object* dummy = CALL_GENERATED_CODE(isolate, f, &t, 0, 0, 0, 0);
- USE(dummy);
- CHECK_EQ_32X4(_32x4_3210, 0, 1, 2, 3);
- CHECK_EQ_32X4(_32x4_1032, 2, 3, 0, 1);
- CHECK_EQ_32X4(_32x4_0000, 0, 0, 0, 0);
- CHECK_EQ_32X4(_32x4_1111, 1, 1, 1, 1);
- CHECK_EQ_32X4(_32x4_2222, 2, 2, 2, 2);
- CHECK_EQ_32X4(_32x4_3333, 3, 3, 3, 3);
- CHECK_EQ_32X4(_32x4_2103, 3, 0, 1, 2);
- CHECK_EQ_32X4(_32x4_0321, 1, 2, 3, 0);
- CHECK_EQ_32X4(_32x4_1132, 2, 3, 1, 1);
- CHECK_EQ_32X4(_32x4_1132_in_place, 2, 3, 1, 1);
-}
-
#undef __
diff --git a/deps/v8/test/cctest/test-macro-assembler-mips64.cc b/deps/v8/test/cctest/test-macro-assembler-mips64.cc
index 9527e620bd..37517d0d42 100644
--- a/deps/v8/test/cctest/test-macro-assembler-mips64.cc
+++ b/deps/v8/test/cctest/test-macro-assembler-mips64.cc
@@ -68,40 +68,40 @@ TEST(BYTESWAP) {
MacroAssembler* masm = &assembler;
- __ ld(a4, MemOperand(a0, offsetof(T, r1)));
+ __ Ld(a4, MemOperand(a0, offsetof(T, r1)));
__ nop();
__ ByteSwapSigned(a4, a4, 8);
- __ sd(a4, MemOperand(a0, offsetof(T, r1)));
+ __ Sd(a4, MemOperand(a0, offsetof(T, r1)));
- __ ld(a4, MemOperand(a0, offsetof(T, r2)));
+ __ Ld(a4, MemOperand(a0, offsetof(T, r2)));
__ nop();
__ ByteSwapSigned(a4, a4, 4);
- __ sd(a4, MemOperand(a0, offsetof(T, r2)));
+ __ Sd(a4, MemOperand(a0, offsetof(T, r2)));
- __ ld(a4, MemOperand(a0, offsetof(T, r3)));
+ __ Ld(a4, MemOperand(a0, offsetof(T, r3)));
__ nop();
__ ByteSwapSigned(a4, a4, 2);
- __ sd(a4, MemOperand(a0, offsetof(T, r3)));
+ __ Sd(a4, MemOperand(a0, offsetof(T, r3)));
- __ ld(a4, MemOperand(a0, offsetof(T, r4)));
+ __ Ld(a4, MemOperand(a0, offsetof(T, r4)));
__ nop();
__ ByteSwapSigned(a4, a4, 1);
- __ sd(a4, MemOperand(a0, offsetof(T, r4)));
+ __ Sd(a4, MemOperand(a0, offsetof(T, r4)));
- __ ld(a4, MemOperand(a0, offsetof(T, r5)));
+ __ Ld(a4, MemOperand(a0, offsetof(T, r5)));
__ nop();
__ ByteSwapUnsigned(a4, a4, 1);
- __ sd(a4, MemOperand(a0, offsetof(T, r5)));
+ __ Sd(a4, MemOperand(a0, offsetof(T, r5)));
- __ ld(a4, MemOperand(a0, offsetof(T, r6)));
+ __ Ld(a4, MemOperand(a0, offsetof(T, r6)));
__ nop();
__ ByteSwapUnsigned(a4, a4, 2);
- __ sd(a4, MemOperand(a0, offsetof(T, r6)));
+ __ Sd(a4, MemOperand(a0, offsetof(T, r6)));
- __ ld(a4, MemOperand(a0, offsetof(T, r7)));
+ __ Ld(a4, MemOperand(a0, offsetof(T, r7)));
__ nop();
__ ByteSwapUnsigned(a4, a4, 4);
- __ sd(a4, MemOperand(a0, offsetof(T, r7)));
+ __ Sd(a4, MemOperand(a0, offsetof(T, r7)));
__ jr(ra);
__ nop();
@@ -151,7 +151,7 @@ TEST(LoadConstants) {
for (int i = 0; i < 64; i++) {
// Load constant.
__ li(a5, Operand(refConstants[i]));
- __ sd(a5, MemOperand(a4));
+ __ Sd(a5, MemOperand(a4));
__ Daddu(a4, a4, Operand(kPointerSize));
}
@@ -311,7 +311,7 @@ TEST(jump_tables5) {
__ addiupc(at, 6 + 1);
__ Dlsa(at, at, a0, 3);
- __ ld(at, MemOperand(at));
+ __ Ld(at, MemOperand(at));
__ jalr(at);
__ nop(); // Branch delay slot nop.
__ bc(&done);
@@ -1502,7 +1502,7 @@ TEST(min_max_nan) {
auto handle_dnan = [masm](FPURegister dst, Label* nan, Label* back) {
__ bind(nan);
__ LoadRoot(at, Heap::kNanValueRootIndex);
- __ ldc1(dst, FieldMemOperand(at, HeapNumber::kValueOffset));
+ __ Ldc1(dst, FieldMemOperand(at, HeapNumber::kValueOffset));
__ Branch(back);
};
@@ -1517,10 +1517,10 @@ TEST(min_max_nan) {
__ push(s6);
__ InitializeRootRegister();
- __ ldc1(f4, MemOperand(a0, offsetof(TestFloat, a)));
- __ ldc1(f8, MemOperand(a0, offsetof(TestFloat, b)));
- __ lwc1(f2, MemOperand(a0, offsetof(TestFloat, e)));
- __ lwc1(f6, MemOperand(a0, offsetof(TestFloat, f)));
+ __ Ldc1(f4, MemOperand(a0, offsetof(TestFloat, a)));
+ __ Ldc1(f8, MemOperand(a0, offsetof(TestFloat, b)));
+ __ Lwc1(f2, MemOperand(a0, offsetof(TestFloat, e)));
+ __ Lwc1(f6, MemOperand(a0, offsetof(TestFloat, f)));
__ Float64Min(f10, f4, f8, &handle_mind_nan);
__ bind(&back_mind_nan);
__ Float64Max(f12, f4, f8, &handle_maxd_nan);
@@ -1529,10 +1529,10 @@ TEST(min_max_nan) {
__ bind(&back_mins_nan);
__ Float32Max(f16, f2, f6, &handle_maxs_nan);
__ bind(&back_maxs_nan);
- __ sdc1(f10, MemOperand(a0, offsetof(TestFloat, c)));
- __ sdc1(f12, MemOperand(a0, offsetof(TestFloat, d)));
- __ swc1(f14, MemOperand(a0, offsetof(TestFloat, g)));
- __ swc1(f16, MemOperand(a0, offsetof(TestFloat, h)));
+ __ Sdc1(f10, MemOperand(a0, offsetof(TestFloat, c)));
+ __ Sdc1(f12, MemOperand(a0, offsetof(TestFloat, d)));
+ __ Swc1(f14, MemOperand(a0, offsetof(TestFloat, g)));
+ __ Swc1(f16, MemOperand(a0, offsetof(TestFloat, h)));
__ pop(s6);
__ jr(ra);
__ nop();
@@ -1988,11 +1988,11 @@ static ::F4 GenerateMacroFloat32MinMax(MacroAssembler* masm) {
Label done_max_abc, done_max_aab, done_max_aba;
#define FLOAT_MIN_MAX(fminmax, res, x, y, done, ool, res_field) \
- __ lwc1(x, MemOperand(a0, offsetof(Inputs, src1_))); \
- __ lwc1(y, MemOperand(a0, offsetof(Inputs, src2_))); \
+ __ Lwc1(x, MemOperand(a0, offsetof(Inputs, src1_))); \
+ __ Lwc1(y, MemOperand(a0, offsetof(Inputs, src2_))); \
__ fminmax(res, x, y, &ool); \
__ bind(&done); \
- __ swc1(a, MemOperand(a1, offsetof(Results, res_field)))
+ __ Swc1(a, MemOperand(a1, offsetof(Results, res_field)))
// a = min(b, c);
FLOAT_MIN_MAX(Float32Min, a, b, c, done_min_abc, ool_min_abc, min_abc_);
@@ -2131,11 +2131,11 @@ static ::F4 GenerateMacroFloat64MinMax(MacroAssembler* masm) {
Label done_max_abc, done_max_aab, done_max_aba;
#define FLOAT_MIN_MAX(fminmax, res, x, y, done, ool, res_field) \
- __ ldc1(x, MemOperand(a0, offsetof(Inputs, src1_))); \
- __ ldc1(y, MemOperand(a0, offsetof(Inputs, src2_))); \
+ __ Ldc1(x, MemOperand(a0, offsetof(Inputs, src1_))); \
+ __ Ldc1(y, MemOperand(a0, offsetof(Inputs, src2_))); \
__ fminmax(res, x, y, &ool); \
__ bind(&done); \
- __ sdc1(a, MemOperand(a1, offsetof(Results, res_field)))
+ __ Sdc1(a, MemOperand(a1, offsetof(Results, res_field)))
// a = min(b, c);
FLOAT_MIN_MAX(Float64Min, a, b, c, done_min_abc, ool_min_abc, min_abc_);
diff --git a/deps/v8/test/cctest/test-mementos.cc b/deps/v8/test/cctest/test-mementos.cc
index 5c9ac2e327..af480877e2 100644
--- a/deps/v8/test/cctest/test-mementos.cc
+++ b/deps/v8/test/cctest/test-mementos.cc
@@ -46,7 +46,7 @@ static void SetUpNewSpaceWithPoisonedMementoAtTop() {
NewSpace* new_space = heap->new_space();
// Make sure we can allocate some objects without causing a GC later.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
// Allocate a string, the GC may suspect a memento behind the string.
Handle<SeqOneByteString> string =
@@ -57,7 +57,8 @@ static void SetUpNewSpaceWithPoisonedMementoAtTop() {
// site pointer.
AllocationMemento* memento =
reinterpret_cast<AllocationMemento*>(new_space->top() + kHeapObjectTag);
- memento->set_map_no_write_barrier(heap->allocation_memento_map());
+ memento->set_map_after_allocation(heap->allocation_memento_map(),
+ SKIP_WRITE_BARRIER);
memento->set_allocation_site(
reinterpret_cast<AllocationSite*>(kHeapObjectTag), SKIP_WRITE_BARRIER);
}
diff --git a/deps/v8/test/cctest/test-modules.cc b/deps/v8/test/cctest/test-modules.cc
index 9e8bf100d5..f63a04d011 100644
--- a/deps/v8/test/cctest/test-modules.cc
+++ b/deps/v8/test/cctest/test-modules.cc
@@ -27,9 +27,11 @@ ScriptOrigin ModuleOrigin(Local<v8::Value> resource_name, Isolate* isolate) {
return origin;
}
-MaybeLocal<Module> AlwaysEmptyResolveCallback(Local<Context> context,
- Local<String> specifier,
- Local<Module> referrer) {
+MaybeLocal<Module> FailAlwaysResolveCallback(Local<Context> context,
+ Local<String> specifier,
+ Local<Module> referrer) {
+ Isolate* isolate = context->GetIsolate();
+ isolate->ThrowException(v8_str("boom"));
return MaybeLocal<Module>();
}
@@ -37,18 +39,22 @@ static int g_count = 0;
MaybeLocal<Module> FailOnSecondCallResolveCallback(Local<Context> context,
Local<String> specifier,
Local<Module> referrer) {
- if (g_count++ > 0) return MaybeLocal<Module>();
+ Isolate* isolate = CcTest::isolate();
+ if (g_count++ > 0) {
+ isolate->ThrowException(v8_str("booom"));
+ return MaybeLocal<Module>();
+ }
Local<String> source_text = v8_str("");
- ScriptOrigin origin = ModuleOrigin(v8_str("module.js"), CcTest::isolate());
+ ScriptOrigin origin = ModuleOrigin(v8_str("module.js"), isolate);
ScriptCompiler::Source source(source_text, origin);
- return ScriptCompiler::CompileModule(CcTest::isolate(), &source)
- .ToLocalChecked();
+ return ScriptCompiler::CompileModule(isolate, &source).ToLocalChecked();
}
TEST(ModuleInstantiationFailures) {
Isolate* isolate = CcTest::isolate();
HandleScope scope(isolate);
LocalContext env;
+ v8::TryCatch try_catch(isolate);
Local<String> source_text = v8_str(
"import './foo.js';"
@@ -62,14 +68,26 @@ TEST(ModuleInstantiationFailures) {
CHECK(v8_str("./bar.js")->StrictEquals(module->GetModuleRequest(1)));
// Instantiation should fail.
- CHECK(!module->Instantiate(env.local(), AlwaysEmptyResolveCallback));
+ {
+ v8::TryCatch inner_try_catch(isolate);
+ CHECK(!module->Instantiate(env.local(), FailAlwaysResolveCallback));
+ CHECK(inner_try_catch.HasCaught());
+ CHECK(inner_try_catch.Exception()->StrictEquals(v8_str("boom")));
+ }
// Start over again...
module = ScriptCompiler::CompileModule(isolate, &source).ToLocalChecked();
// Instantiation should fail if a sub-module fails to resolve.
g_count = 0;
- CHECK(!module->Instantiate(env.local(), FailOnSecondCallResolveCallback));
+ {
+ v8::TryCatch inner_try_catch(isolate);
+ CHECK(!module->Instantiate(env.local(), FailOnSecondCallResolveCallback));
+ CHECK(inner_try_catch.HasCaught());
+ CHECK(inner_try_catch.Exception()->StrictEquals(v8_str("booom")));
+ }
+
+ CHECK(!try_catch.HasCaught());
}
static MaybeLocal<Module> CompileSpecifierAsModuleResolveCallback(
@@ -84,6 +102,7 @@ TEST(ModuleEvaluation) {
Isolate* isolate = CcTest::isolate();
HandleScope scope(isolate);
LocalContext env;
+ v8::TryCatch try_catch(isolate);
Local<String> source_text = v8_str(
"import 'Object.expando = 5';"
@@ -96,12 +115,15 @@ TEST(ModuleEvaluation) {
CompileSpecifierAsModuleResolveCallback));
CHECK(!module->Evaluate(env.local()).IsEmpty());
ExpectInt32("Object.expando", 10);
+
+ CHECK(!try_catch.HasCaught());
}
TEST(ModuleEvaluationCompletion1) {
Isolate* isolate = CcTest::isolate();
HandleScope scope(isolate);
LocalContext env;
+ v8::TryCatch try_catch(isolate);
const char* sources[] = {
"",
@@ -133,12 +155,15 @@ TEST(ModuleEvaluationCompletion1) {
CompileSpecifierAsModuleResolveCallback));
CHECK(module->Evaluate(env.local()).ToLocalChecked()->IsUndefined());
}
+
+ CHECK(!try_catch.HasCaught());
}
TEST(ModuleEvaluationCompletion2) {
Isolate* isolate = CcTest::isolate();
HandleScope scope(isolate);
LocalContext env;
+ v8::TryCatch try_catch(isolate);
const char* sources[] = {
"'gaga'; ",
@@ -171,6 +196,8 @@ TEST(ModuleEvaluationCompletion2) {
.ToLocalChecked()
->StrictEquals(v8_str("gaga")));
}
+
+ CHECK(!try_catch.HasCaught());
}
} // anonymous namespace
diff --git a/deps/v8/test/cctest/test-parsing.cc b/deps/v8/test/cctest/test-parsing.cc
index 196c154bae..c2ee2b2452 100644
--- a/deps/v8/test/cctest/test-parsing.cc
+++ b/deps/v8/test/cctest/test-parsing.cc
@@ -78,7 +78,7 @@ TEST(ScanKeywords) {
{
auto stream = i::ScannerStream::ForTesting(keyword, length);
i::Scanner scanner(&unicode_cache);
- scanner.Initialize(stream.get());
+ scanner.Initialize(stream.get(), false);
CHECK_EQ(key_token.token, scanner.Next());
CHECK_EQ(i::Token::EOS, scanner.Next());
}
@@ -86,7 +86,7 @@ TEST(ScanKeywords) {
{
auto stream = i::ScannerStream::ForTesting(keyword, length - 1);
i::Scanner scanner(&unicode_cache);
- scanner.Initialize(stream.get());
+ scanner.Initialize(stream.get(), false);
CHECK_EQ(i::Token::IDENTIFIER, scanner.Next());
CHECK_EQ(i::Token::EOS, scanner.Next());
}
@@ -97,7 +97,7 @@ TEST(ScanKeywords) {
buffer[length] = chars_to_append[j];
auto stream = i::ScannerStream::ForTesting(buffer, length + 1);
i::Scanner scanner(&unicode_cache);
- scanner.Initialize(stream.get());
+ scanner.Initialize(stream.get(), false);
CHECK_EQ(i::Token::IDENTIFIER, scanner.Next());
CHECK_EQ(i::Token::EOS, scanner.Next());
}
@@ -107,7 +107,7 @@ TEST(ScanKeywords) {
buffer[length - 1] = '_';
auto stream = i::ScannerStream::ForTesting(buffer, length);
i::Scanner scanner(&unicode_cache);
- scanner.Initialize(stream.get());
+ scanner.Initialize(stream.get(), false);
CHECK_EQ(i::Token::IDENTIFIER, scanner.Next());
CHECK_EQ(i::Token::EOS, scanner.Next());
}
@@ -173,7 +173,7 @@ TEST(ScanHTMLEndComments) {
const char* source = tests[i];
auto stream = i::ScannerStream::ForTesting(source);
i::Scanner scanner(CcTest::i_isolate()->unicode_cache());
- scanner.Initialize(stream.get());
+ scanner.Initialize(stream.get(), false);
i::Zone zone(CcTest::i_isolate()->allocator(), ZONE_NAME);
i::AstValueFactory ast_value_factory(
&zone, CcTest::i_isolate()->ast_string_constants(),
@@ -192,7 +192,7 @@ TEST(ScanHTMLEndComments) {
const char* source = fail_tests[i];
auto stream = i::ScannerStream::ForTesting(source);
i::Scanner scanner(CcTest::i_isolate()->unicode_cache());
- scanner.Initialize(stream.get());
+ scanner.Initialize(stream.get(), false);
i::Zone zone(CcTest::i_isolate()->allocator(), ZONE_NAME);
i::AstValueFactory ast_value_factory(
&zone, CcTest::i_isolate()->ast_string_constants(),
@@ -209,6 +209,28 @@ TEST(ScanHTMLEndComments) {
}
}
+TEST(ScanHtmlComments) {
+ const char* src = "a <!-- b --> c";
+ i::UnicodeCache unicode_cache;
+
+ // Disallow HTML comments.
+ {
+ auto stream = i::ScannerStream::ForTesting(src);
+ i::Scanner scanner(&unicode_cache);
+ scanner.Initialize(stream.get(), true);
+ CHECK_EQ(i::Token::IDENTIFIER, scanner.Next());
+ CHECK_EQ(i::Token::ILLEGAL, scanner.Next());
+ }
+
+ // Skip HTML comments:
+ {
+ auto stream = i::ScannerStream::ForTesting(src);
+ i::Scanner scanner(&unicode_cache);
+ scanner.Initialize(stream.get(), false);
+ CHECK_EQ(i::Token::IDENTIFIER, scanner.Next());
+ CHECK_EQ(i::Token::EOS, scanner.Next());
+ }
+}
class ScriptResource : public v8::String::ExternalOneByteStringResource {
public:
@@ -365,7 +387,7 @@ TEST(StandAlonePreParser) {
for (int i = 0; programs[i]; i++) {
auto stream = i::ScannerStream::ForTesting(programs[i]);
i::Scanner scanner(CcTest::i_isolate()->unicode_cache());
- scanner.Initialize(stream.get());
+ scanner.Initialize(stream.get(), false);
i::Zone zone(CcTest::i_isolate()->allocator(), ZONE_NAME);
i::AstValueFactory ast_value_factory(
@@ -401,7 +423,7 @@ TEST(StandAlonePreParserNoNatives) {
for (int i = 0; programs[i]; i++) {
auto stream = i::ScannerStream::ForTesting(programs[i]);
i::Scanner scanner(isolate->unicode_cache());
- scanner.Initialize(stream.get());
+ scanner.Initialize(stream.get(), false);
// Preparser defaults to disallowing natives syntax.
i::Zone zone(CcTest::i_isolate()->allocator(), ZONE_NAME);
@@ -471,7 +493,7 @@ TEST(RegressChromium62639) {
auto stream = i::ScannerStream::ForTesting(program);
i::Scanner scanner(CcTest::i_isolate()->unicode_cache());
- scanner.Initialize(stream.get());
+ scanner.Initialize(stream.get(), false);
i::Zone zone(CcTest::i_isolate()->allocator(), ZONE_NAME);
i::AstValueFactory ast_value_factory(
&zone, CcTest::i_isolate()->ast_string_constants(),
@@ -548,7 +570,7 @@ TEST(PreParseOverflow) {
auto stream = i::ScannerStream::ForTesting(program.get(), kProgramSize);
i::Scanner scanner(isolate->unicode_cache());
- scanner.Initialize(stream.get());
+ scanner.Initialize(stream.get(), false);
i::Zone zone(CcTest::i_isolate()->allocator(), ZONE_NAME);
i::AstValueFactory ast_value_factory(
@@ -568,7 +590,7 @@ void TestStreamScanner(i::Utf16CharacterStream* stream,
int skip_pos = 0, // Zero means not skipping.
int skip_to = 0) {
i::Scanner scanner(CcTest::i_isolate()->unicode_cache());
- scanner.Initialize(stream);
+ scanner.Initialize(stream, false);
int i = 0;
do {
@@ -646,7 +668,7 @@ void TestScanRegExp(const char* re_source, const char* expected) {
auto stream = i::ScannerStream::ForTesting(re_source);
i::HandleScope scope(CcTest::i_isolate());
i::Scanner scanner(CcTest::i_isolate()->unicode_cache());
- scanner.Initialize(stream.get());
+ scanner.Initialize(stream.get(), false);
i::Token::Value start = scanner.peek();
CHECK(start == i::Token::DIV || start == i::Token::ASSIGN_DIV);
@@ -845,8 +867,7 @@ TEST(ScopeUsesArgumentsSuperThis) {
}
}
-
-static void CheckParsesToNumber(const char* source, bool with_dot) {
+static void CheckParsesToNumber(const char* source) {
v8::V8::Initialize();
HandleAndZoneScope handles;
@@ -877,40 +898,27 @@ static void CheckParsesToNumber(const char* source, bool with_dot) {
CHECK(fun->body()->at(0)->IsReturnStatement());
i::ReturnStatement* ret = fun->body()->at(0)->AsReturnStatement();
i::Literal* lit = ret->expression()->AsLiteral();
- if (lit != NULL) {
- const i::AstValue* val = lit->raw_value();
- CHECK(with_dot == val->ContainsDot());
- } else if (with_dot) {
- i::BinaryOperation* bin = ret->expression()->AsBinaryOperation();
- CHECK(bin != NULL);
- CHECK_EQ(i::Token::MUL, bin->op());
- i::Literal* rlit = bin->right()->AsLiteral();
- const i::AstValue* val = rlit->raw_value();
- CHECK(with_dot == val->ContainsDot());
- CHECK_EQ(1.0, val->AsNumber());
- }
+ CHECK(lit->IsNumberLiteral());
}
TEST(ParseNumbers) {
- CheckParsesToNumber("1.", true);
- CheckParsesToNumber("1.34", true);
- CheckParsesToNumber("134", false);
- CheckParsesToNumber("134e44", false);
- CheckParsesToNumber("134.e44", true);
- CheckParsesToNumber("134.44e44", true);
- CheckParsesToNumber(".44", true);
-
- CheckParsesToNumber("-1.", true);
- CheckParsesToNumber("-1.0", true);
- CheckParsesToNumber("-1.34", true);
- CheckParsesToNumber("-134", false);
- CheckParsesToNumber("-134e44", false);
- CheckParsesToNumber("-134.e44", true);
- CheckParsesToNumber("-134.44e44", true);
- CheckParsesToNumber("-.44", true);
+ CheckParsesToNumber("1.");
+ CheckParsesToNumber("1.34");
+ CheckParsesToNumber("134");
+ CheckParsesToNumber("134e44");
+ CheckParsesToNumber("134.e44");
+ CheckParsesToNumber("134.44e44");
+ CheckParsesToNumber(".44");
- CheckParsesToNumber("+x", true);
+ CheckParsesToNumber("-1.");
+ CheckParsesToNumber("-1.0");
+ CheckParsesToNumber("-1.34");
+ CheckParsesToNumber("-134");
+ CheckParsesToNumber("-134e44");
+ CheckParsesToNumber("-134.e44");
+ CheckParsesToNumber("-134.44e44");
+ CheckParsesToNumber("-.44");
}
@@ -1334,7 +1342,7 @@ void TestParserSyncWithFlags(i::Handle<i::String> source,
&pending_error_handler,
isolate->counters()->runtime_call_stats());
SetParserFlags(&preparser, flags);
- scanner.Initialize(stream.get());
+ scanner.Initialize(stream.get(), is_module);
i::PreParser::PreParseResult result = preparser.PreParseProgram(is_module);
CHECK_EQ(i::PreParser::kPreParseSuccess, result);
}
@@ -3521,14 +3529,7 @@ static void TestMaybeAssigned(Input input, const char* variable, bool module,
i::Variable* var;
{
// Find the variable.
- for (auto it = input.location.begin(); it != input.location.end(); ++it) {
- unsigned n = *it;
- scope = scope->inner_scope();
- while (n-- > 0) {
- scope = scope->sibling();
- }
- }
- CHECK_NOT_NULL(scope);
+ scope = i::ScopeTestHelper::FindScope(scope, input.location);
const i::AstRawString* var_name =
info->ast_value_factory()->GetOneByteString(variable);
var = scope->Lookup(var_name);
@@ -4240,6 +4241,7 @@ TEST(ErrorsArrowFunctions) {
"(c, a.b) => {}",
"(a['b'], c) => {}",
"(c, a['b']) => {}",
+ "(...a = b) => b",
// crbug.com/582626
"(...rest - a) => b",
@@ -8967,6 +8969,10 @@ TEST(AsyncAwaitErrors) {
// v8:5148 assert that errors are still thrown for calls that may have been
// async functions
"async({ foo33 = 1 })",
+
+ "async(...a = b) => b",
+ "async(...a,) => b",
+ "async(...a, b) => b",
NULL
};
@@ -10161,3 +10167,188 @@ TEST(AsyncGeneratorErrors) {
RunParserSyncTest(context_data, statement_data, kError, NULL, 0, always_flags,
arraysize(always_flags));
}
+
+TEST(LexicalLoopVariable) {
+ i::Isolate* isolate = CcTest::i_isolate();
+ i::HandleScope scope(isolate);
+ LocalContext env;
+ typedef std::function<void(const i::ParseInfo& info, i::DeclarationScope*)>
+ TestCB;
+ auto TestProgram = [isolate](const char* program, TestCB test) {
+ i::Factory* const factory = isolate->factory();
+ i::Handle<i::String> source =
+ factory->NewStringFromUtf8(i::CStrVector(program)).ToHandleChecked();
+ i::Handle<i::Script> script = factory->NewScript(source);
+ i::ParseInfo info(script);
+
+ info.set_allow_lazy_parsing(false);
+ CHECK(i::parsing::ParseProgram(&info, isolate));
+ CHECK(i::Rewriter::Rewrite(&info, isolate));
+ i::DeclarationScope::Analyze(&info, isolate, i::AnalyzeMode::kRegular);
+ CHECK(info.literal() != NULL);
+
+ i::DeclarationScope* script_scope = info.literal()->scope();
+ CHECK(script_scope->is_script_scope());
+
+ test(info, script_scope);
+ };
+
+ // Check `let` loop variables is a stack local when not captured by an eval
+ // or closure within the area of the loop body.
+ const char* local_bindings[] = {
+ "function loop() {"
+ " for (let loop_var = 0; loop_var < 10; ++loop_var) {"
+ " }"
+ " eval('0');"
+ "}",
+
+ "function loop() {"
+ " for (let loop_var = 0; loop_var < 10; ++loop_var) {"
+ " }"
+ " function foo() {}"
+ " foo();"
+ "}",
+ };
+ for (const char* source : local_bindings) {
+ TestProgram(source, [=](const i::ParseInfo& info, i::DeclarationScope* s) {
+ i::Scope* fn = s->inner_scope();
+ CHECK(fn->is_function_scope());
+
+ i::Scope* loop_block = fn->inner_scope();
+ if (loop_block->is_function_scope()) loop_block = loop_block->sibling();
+ CHECK(loop_block->is_block_scope());
+
+ const i::AstRawString* var_name =
+ info.ast_value_factory()->GetOneByteString("loop_var");
+ i::Variable* loop_var = loop_block->LookupLocal(var_name);
+ CHECK_NOT_NULL(loop_var);
+ CHECK(loop_var->IsStackLocal());
+ CHECK_EQ(loop_block->ContextLocalCount(), 0);
+ CHECK_EQ(loop_block->inner_scope()->ContextLocalCount(), 0);
+ });
+ }
+
+ // Check `let` loop variable is not a stack local, and is duplicated in the
+ // loop body to ensure capturing can work correctly.
+ // In this version of the test, the inner loop block's duplicate `loop_var`
+ // binding is not captured, and is a local.
+ const char* context_bindings1[] = {
+ "function loop() {"
+ " for (let loop_var = eval('0'); loop_var < 10; ++loop_var) {"
+ " }"
+ "}",
+
+ "function loop() {"
+ " for (let loop_var = (() => (loop_var, 0))(); loop_var < 10;"
+ " ++loop_var) {"
+ " }"
+ "}"};
+ for (const char* source : context_bindings1) {
+ TestProgram(source, [=](const i::ParseInfo& info, i::DeclarationScope* s) {
+ i::Scope* fn = s->inner_scope();
+ CHECK(fn->is_function_scope());
+
+ i::Scope* loop_block = fn->inner_scope();
+ CHECK(loop_block->is_block_scope());
+
+ const i::AstRawString* var_name =
+ info.ast_value_factory()->GetOneByteString("loop_var");
+ i::Variable* loop_var = loop_block->LookupLocal(var_name);
+ CHECK_NOT_NULL(loop_var);
+ CHECK(loop_var->IsContextSlot());
+ CHECK_EQ(loop_block->ContextLocalCount(), 1);
+
+ i::Variable* loop_var2 = loop_block->inner_scope()->LookupLocal(var_name);
+ CHECK_NE(loop_var, loop_var2);
+ CHECK(loop_var2->IsStackLocal());
+ CHECK_EQ(loop_block->inner_scope()->ContextLocalCount(), 0);
+ });
+ }
+
+ // Check `let` loop variable is not a stack local, and is duplicated in the
+ // loop body to ensure capturing can work correctly.
+ // In this version of the test, the inner loop block's duplicate `loop_var`
+ // binding is captured, and must be context allocated.
+ const char* context_bindings2[] = {
+ "function loop() {"
+ " for (let loop_var = 0; loop_var < 10; ++loop_var) {"
+ " eval('0');"
+ " }"
+ "}",
+
+ "function loop() {"
+ " for (let loop_var = 0; loop_var < eval('10'); ++loop_var) {"
+ " }"
+ "}",
+
+ "function loop() {"
+ " for (let loop_var = 0; loop_var < 10; eval('++loop_var')) {"
+ " }"
+ "}",
+ };
+
+ for (const char* source : context_bindings2) {
+ TestProgram(source, [=](const i::ParseInfo& info, i::DeclarationScope* s) {
+ i::Scope* fn = s->inner_scope();
+ CHECK(fn->is_function_scope());
+
+ i::Scope* loop_block = fn->inner_scope();
+ CHECK(loop_block->is_block_scope());
+
+ const i::AstRawString* var_name =
+ info.ast_value_factory()->GetOneByteString("loop_var");
+ i::Variable* loop_var = loop_block->LookupLocal(var_name);
+ CHECK_NOT_NULL(loop_var);
+ CHECK(loop_var->IsContextSlot());
+ CHECK_EQ(loop_block->ContextLocalCount(), 1);
+
+ i::Variable* loop_var2 = loop_block->inner_scope()->LookupLocal(var_name);
+ CHECK_NE(loop_var, loop_var2);
+ CHECK(loop_var2->IsContextSlot());
+ CHECK_EQ(loop_block->inner_scope()->ContextLocalCount(), 1);
+ });
+ }
+
+ // Similar to the above, but the first block scope's variables are not
+ // captured due to the closure occurring in a nested scope.
+ const char* context_bindings3[] = {
+ "function loop() {"
+ " for (let loop_var = 0; loop_var < 10; ++loop_var) {"
+ " (() => loop_var)();"
+ " }"
+ "}",
+
+ "function loop() {"
+ " for (let loop_var = 0; loop_var < (() => (loop_var, 10))();"
+ " ++loop_var) {"
+ " }"
+ "}",
+
+ "function loop() {"
+ " for (let loop_var = 0; loop_var < 10; (() => ++loop_var)()) {"
+ " }"
+ "}",
+ };
+
+ for (const char* source : context_bindings3) {
+ TestProgram(source, [=](const i::ParseInfo& info, i::DeclarationScope* s) {
+ i::Scope* fn = s->inner_scope();
+ CHECK(fn->is_function_scope());
+
+ i::Scope* loop_block = fn->inner_scope();
+ CHECK(loop_block->is_block_scope());
+
+ const i::AstRawString* var_name =
+ info.ast_value_factory()->GetOneByteString("loop_var");
+ i::Variable* loop_var = loop_block->LookupLocal(var_name);
+ CHECK_NOT_NULL(loop_var);
+ CHECK(loop_var->IsStackLocal());
+ CHECK_EQ(loop_block->ContextLocalCount(), 0);
+
+ i::Variable* loop_var2 = loop_block->inner_scope()->LookupLocal(var_name);
+ CHECK_NE(loop_var, loop_var2);
+ CHECK(loop_var2->IsContextSlot());
+ CHECK_EQ(loop_block->inner_scope()->ContextLocalCount(), 1);
+ });
+ }
+}
diff --git a/deps/v8/test/cctest/test-serialize.cc b/deps/v8/test/cctest/test-serialize.cc
index c9af4182e5..058dd55d3c 100644
--- a/deps/v8/test/cctest/test-serialize.cc
+++ b/deps/v8/test/cctest/test-serialize.cc
@@ -1090,7 +1090,7 @@ TEST(CodeSerializerLargeCodeObject) {
Vector<const uint8_t> source =
ConstructSource(STATIC_CHAR_VECTOR("var j=1; if (j == 0) {"),
STATIC_CHAR_VECTOR("for (let i of Object.prototype);"),
- STATIC_CHAR_VECTOR("} j=7; j"), 1050);
+ STATIC_CHAR_VECTOR("} j=7; j"), 1100);
Handle<String> source_str =
isolate->factory()->NewStringFromOneByte(source).ToHandleChecked();
@@ -1191,7 +1191,7 @@ TEST(CodeSerializerLargeCodeObjectWithIncrementalMarking) {
// We should have missed a write barrier. Complete incremental marking
// to flush out the bug.
heap::SimulateIncrementalMarking(heap, true);
- CcTest::CollectAllGarbage(Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
Handle<JSFunction> copy_fun =
isolate->factory()->NewFunctionFromSharedFunctionInfo(
@@ -2547,51 +2547,6 @@ TEST(SnapshotCreatorIncludeGlobalProxy) {
delete[] blob.data;
}
-UNINITIALIZED_TEST(ReinitializeStringHashSeedNotRehashable) {
- DisableAlwaysOpt();
- i::FLAG_rehash_snapshot = true;
- i::FLAG_hash_seed = 42;
- i::FLAG_allow_natives_syntax = true;
- v8::StartupData blob;
- {
- v8::SnapshotCreator creator;
- v8::Isolate* isolate = creator.GetIsolate();
- {
- v8::HandleScope handle_scope(isolate);
- v8::Local<v8::Context> context = v8::Context::New(isolate);
- v8::Context::Scope context_scope(context);
- // Create dictionary mode object.
- CompileRun(
- "var a = {};"
- "a.b = 1;"
- "a.c = 2;"
- "delete a.b;");
- ExpectInt32("a.c", 2);
- creator.SetDefaultContext(context);
- }
- blob =
- creator.CreateBlob(v8::SnapshotCreator::FunctionCodeHandling::kClear);
- }
-
- i::FLAG_hash_seed = 1337;
- v8::Isolate::CreateParams create_params;
- create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
- create_params.snapshot_blob = &blob;
- v8::Isolate* isolate = v8::Isolate::New(create_params);
- {
- // Check that no rehashing has been performed.
- CHECK_EQ(42, reinterpret_cast<i::Isolate*>(isolate)->heap()->HashSeed());
- v8::Isolate::Scope isolate_scope(isolate);
- v8::HandleScope handle_scope(isolate);
- v8::Local<v8::Context> context = v8::Context::New(isolate);
- CHECK(!context.IsEmpty());
- v8::Context::Scope context_scope(context);
- ExpectInt32("a.c", 2);
- }
- isolate->Dispose();
- delete[] blob.data;
-}
-
TEST(SerializationMemoryStats) {
FLAG_profile_deserialization = true;
FLAG_always_opt = false;
diff --git a/deps/v8/test/cctest/test-strings.cc b/deps/v8/test/cctest/test-strings.cc
index 0829f25e97..615fdeb32e 100644
--- a/deps/v8/test/cctest/test-strings.cc
+++ b/deps/v8/test/cctest/test-strings.cc
@@ -1190,6 +1190,9 @@ class OneByteVectorResource : public v8::String::ExternalOneByteStringResource {
};
TEST(InternalizeExternal) {
+ // TODO(mlippautz): Remove once we add support for forwarding ThinStrings in
+ // minor MC.
+ if (FLAG_minor_mc) return;
FLAG_thin_strings = true;
CcTest::InitializeVM();
i::Isolate* isolate = CcTest::i_isolate();
diff --git a/deps/v8/test/cctest/test-symbols.cc b/deps/v8/test/cctest/test-symbols.cc
index 0d032e96ce..3f184de6a0 100644
--- a/deps/v8/test/cctest/test-symbols.cc
+++ b/deps/v8/test/cctest/test-symbols.cc
@@ -72,7 +72,7 @@ TEST(Create) {
}
CcTest::CollectGarbage(i::NEW_SPACE);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
// All symbols should be distinct.
for (int i = 0; i < kNumSymbols; ++i) {
diff --git a/deps/v8/test/cctest/test-types.cc b/deps/v8/test/cctest/test-types.cc
index 3b5f1c4511..7b89c9f693 100644
--- a/deps/v8/test/cctest/test-types.cc
+++ b/deps/v8/test/cctest/test-types.cc
@@ -631,11 +631,12 @@ struct Tests {
CheckSub(T.Object, T.Receiver);
CheckSub(T.Proxy, T.Receiver);
+ CheckSub(T.Array, T.Object);
CheckSub(T.OtherObject, T.Object);
CheckSub(T.OtherUndetectable, T.Object);
- CheckSub(T.OtherObject, T.Object);
CheckUnordered(T.Object, T.Proxy);
+ CheckUnordered(T.Array, T.Undetectable);
CheckUnordered(T.OtherObject, T.Undetectable);
// Subtyping between concrete structural types
@@ -646,7 +647,7 @@ struct Tests {
CheckSub(T.ObjectConstant1, T.Object);
CheckSub(T.ObjectConstant2, T.Object);
CheckSub(T.ArrayConstant, T.Object);
- CheckSub(T.ArrayConstant, T.OtherObject);
+ CheckSub(T.ArrayConstant, T.Array);
CheckSub(T.ArrayConstant, T.Receiver);
CheckSub(T.UninitializedConstant, T.Internal);
CheckUnordered(T.ObjectConstant1, T.ObjectConstant2);
diff --git a/deps/v8/test/cctest/test-unboxed-doubles.cc b/deps/v8/test/cctest/test-unboxed-doubles.cc
index a81fdfccd6..7911412c2d 100644
--- a/deps/v8/test/cctest/test-unboxed-doubles.cc
+++ b/deps/v8/test/cctest/test-unboxed-doubles.cc
@@ -916,6 +916,10 @@ TEST(Regress436816) {
Factory* factory = isolate->factory();
v8::HandleScope scope(CcTest::isolate());
+ // Force a GC to free up space before we allocate objects whose
+ // mid-test states would fail heap verification.
+ CcTest::CollectAllGarbage();
+
const int kPropsCount = kSmiValueSize * 3;
TestPropertyKind props[kPropsCount];
for (int i = 0; i < kPropsCount; i++) {
@@ -951,7 +955,7 @@ TEST(Regress436816) {
CHECK(object->map()->HasFastPointerLayout());
// Trigger GCs and heap verification.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
}
@@ -1010,7 +1014,7 @@ TEST(DescriptorArrayTrimming) {
// Call GC that should trim both |map|'s descriptor array and layout
// descriptor.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
// The unused tail of the layout descriptor is now "clean" again.
CHECK(map->layout_descriptor()->IsConsistentWithMap(*map, true));
diff --git a/deps/v8/test/cctest/test-weakmaps.cc b/deps/v8/test/cctest/test-weakmaps.cc
index 79edee5577..9c88456eb5 100644
--- a/deps/v8/test/cctest/test-weakmaps.cc
+++ b/deps/v8/test/cctest/test-weakmaps.cc
@@ -197,7 +197,7 @@ TEST(Regress2060a) {
// Force compacting garbage collection.
CHECK(FLAG_always_compact);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
}
@@ -239,9 +239,9 @@ TEST(Regress2060b) {
// Force compacting garbage collection. The subsequent collections are used
// to verify that key references were actually updated.
CHECK(FLAG_always_compact);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
+ CcTest::CollectAllGarbage();
+ CcTest::CollectAllGarbage();
}
@@ -259,5 +259,5 @@ TEST(Regress399527) {
// The weak map is marked black here but leaving the handle scope will make
// the object unreachable. Aborting incremental marking will clear all the
// marking bits which makes the weak map garbage.
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
}
diff --git a/deps/v8/test/cctest/test-weaksets.cc b/deps/v8/test/cctest/test-weaksets.cc
index 13e3b65886..f0d3354f4f 100644
--- a/deps/v8/test/cctest/test-weaksets.cc
+++ b/deps/v8/test/cctest/test-weaksets.cc
@@ -196,7 +196,7 @@ TEST(WeakSet_Regress2060a) {
// Force compacting garbage collection.
CHECK(FLAG_always_compact);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
}
@@ -238,7 +238,7 @@ TEST(WeakSet_Regress2060b) {
// Force compacting garbage collection. The subsequent collections are used
// to verify that key references were actually updated.
CHECK(FLAG_always_compact);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
- CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
+ CcTest::CollectAllGarbage();
+ CcTest::CollectAllGarbage();
+ CcTest::CollectAllGarbage();
}
diff --git a/deps/v8/test/cctest/wasm/test-run-wasm-64.cc b/deps/v8/test/cctest/wasm/test-run-wasm-64.cc
index dff57e8f92..06c787dba1 100644
--- a/deps/v8/test/cctest/wasm/test-run-wasm-64.cc
+++ b/deps/v8/test/cctest/wasm/test-run-wasm-64.cc
@@ -9,12 +9,12 @@
#include "src/assembler-inl.h"
#include "src/base/bits.h"
#include "src/objects-inl.h"
-#include "src/wasm/wasm-macro-gen.h"
#include "test/cctest/cctest.h"
#include "test/cctest/compiler/value-helper.h"
#include "test/cctest/wasm/wasm-run-utils.h"
#include "test/common/wasm/test-signatures.h"
+#include "test/common/wasm/wasm-macro-gen.h"
// If the target architecture is 64-bit, enable all tests.
#if !V8_TARGET_ARCH_32_BIT || V8_TARGET_ARCH_X64
@@ -1614,9 +1614,6 @@ static void Run_WasmMixedCall_N(WasmExecutionMode execution_mode, int start) {
// =========================================================================
std::vector<byte> code;
- // Load the offset for the store.
- ADD_CODE(code, WASM_ZERO);
-
// Load the arguments.
for (int i = 0; i < num_params; i++) {
int offset = (i + 1) * kElemSize;
@@ -1626,10 +1623,13 @@ static void Run_WasmMixedCall_N(WasmExecutionMode execution_mode, int start) {
// Call the selector function.
ADD_CODE(code, WASM_CALL_FUNCTION0(t.function_index()));
+ // Store the result in a local.
+ byte local_index = r.AllocateLocal(WasmOpcodes::ValueTypeFor(result));
+ ADD_CODE(code, kExprSetLocal, local_index);
+
// Store the result in memory.
ADD_CODE(code,
- static_cast<byte>(WasmOpcodes::LoadStoreOpcodeOf(result, true)),
- ZERO_ALIGNMENT, ZERO_OFFSET);
+ WASM_STORE_MEM(result, WASM_ZERO, WASM_GET_LOCAL(local_index)));
// Return the expected value.
ADD_CODE(code, WASM_I32V_2(kExpected));
diff --git a/deps/v8/test/cctest/wasm/test-run-wasm-asmjs.cc b/deps/v8/test/cctest/wasm/test-run-wasm-asmjs.cc
index 4f7c9210f9..cf022ef91d 100644
--- a/deps/v8/test/cctest/wasm/test-run-wasm-asmjs.cc
+++ b/deps/v8/test/cctest/wasm/test-run-wasm-asmjs.cc
@@ -9,12 +9,11 @@
#include "src/assembler-inl.h"
#include "src/base/platform/elapsed-timer.h"
-#include "src/wasm/wasm-macro-gen.h"
-
#include "test/cctest/cctest.h"
#include "test/cctest/compiler/value-helper.h"
#include "test/cctest/wasm/wasm-run-utils.h"
#include "test/common/wasm/test-signatures.h"
+#include "test/common/wasm/wasm-macro-gen.h"
using namespace v8::base;
using namespace v8::internal;
diff --git a/deps/v8/test/cctest/wasm/test-run-wasm-interpreter.cc b/deps/v8/test/cctest/wasm/test-run-wasm-interpreter.cc
index ccc0bb5865..66fa2c48d0 100644
--- a/deps/v8/test/cctest/wasm/test-run-wasm-interpreter.cc
+++ b/deps/v8/test/cctest/wasm/test-run-wasm-interpreter.cc
@@ -10,11 +10,11 @@
#include "src/assembler-inl.h"
#include "src/wasm/wasm-interpreter.h"
-#include "src/wasm/wasm-macro-gen.h"
#include "test/cctest/cctest.h"
#include "test/cctest/compiler/value-helper.h"
#include "test/cctest/wasm/wasm-run-utils.h"
#include "test/common/wasm/test-signatures.h"
+#include "test/common/wasm/wasm-macro-gen.h"
using namespace v8::base;
using namespace v8::internal;
@@ -325,19 +325,11 @@ TEST(GrowMemoryPreservesData) {
}
TEST(GrowMemoryInvalidSize) {
- {
- // Grow memory by an invalid amount without initial memory.
- WasmRunner<int32_t, uint32_t> r(kExecuteInterpreted);
- BUILD(r, WASM_GROW_MEMORY(WASM_GET_LOCAL(0)));
- CHECK_EQ(-1, r.Call(1048575));
- }
- {
- // Grow memory by an invalid amount without initial memory.
- WasmRunner<int32_t, uint32_t> r(kExecuteInterpreted);
- r.module().AddMemory(WasmModule::kPageSize);
- BUILD(r, WASM_GROW_MEMORY(WASM_GET_LOCAL(0)));
- CHECK_EQ(-1, r.Call(1048575));
- }
+ // Grow memory by an invalid amount without initial memory.
+ WasmRunner<int32_t, uint32_t> r(kExecuteInterpreted);
+ r.module().AddMemory(WasmModule::kPageSize);
+ BUILD(r, WASM_GROW_MEMORY(WASM_GET_LOCAL(0)));
+ CHECK_EQ(-1, r.Call(1048575));
}
TEST(TestPossibleNondeterminism) {
@@ -431,6 +423,7 @@ TEST(WasmInterpreterActivations) {
TEST(InterpreterLoadWithoutMemory) {
WasmRunner<int32_t, int32_t> r(kExecuteInterpreted);
+ r.module().AddMemory(0);
BUILD(r, WASM_LOAD_MEM(MachineType::Int32(), WASM_GET_LOCAL(0)));
CHECK_TRAP32(r.Call(0));
}
diff --git a/deps/v8/test/cctest/wasm/test-run-wasm-js.cc b/deps/v8/test/cctest/wasm/test-run-wasm-js.cc
index add2b02fd4..1ae2afb4c7 100644
--- a/deps/v8/test/cctest/wasm/test-run-wasm-js.cc
+++ b/deps/v8/test/cctest/wasm/test-run-wasm-js.cc
@@ -8,11 +8,11 @@
#include <string.h>
#include "src/assembler-inl.h"
-#include "src/wasm/wasm-macro-gen.h"
#include "test/cctest/cctest.h"
#include "test/cctest/compiler/value-helper.h"
#include "test/cctest/wasm/wasm-run-utils.h"
#include "test/common/wasm/test-signatures.h"
+#include "test/common/wasm/wasm-macro-gen.h"
using namespace v8::base;
using namespace v8::internal;
diff --git a/deps/v8/test/cctest/wasm/test-run-wasm-module.cc b/deps/v8/test/cctest/wasm/test-run-wasm-module.cc
index b023afb0b6..fac0e09f66 100644
--- a/deps/v8/test/cctest/wasm/test-run-wasm-module.cc
+++ b/deps/v8/test/cctest/wasm/test-run-wasm-module.cc
@@ -9,7 +9,6 @@
#include "src/snapshot/code-serializer.h"
#include "src/version.h"
#include "src/wasm/module-decoder.h"
-#include "src/wasm/wasm-macro-gen.h"
#include "src/wasm/wasm-module-builder.h"
#include "src/wasm/wasm-module.h"
#include "src/wasm/wasm-objects.h"
@@ -17,6 +16,7 @@
#include "test/cctest/cctest.h"
#include "test/common/wasm/test-signatures.h"
+#include "test/common/wasm/wasm-macro-gen.h"
#include "test/common/wasm/wasm-module-runner.h"
using namespace v8::base;
@@ -62,7 +62,9 @@ void TestModuleException(Zone* zone, WasmModuleBuilder* builder) {
isolate->clear_pending_exception();
}
-void ExportAsMain(WasmFunctionBuilder* f) { f->ExportAs(CStrVector("main")); }
+void ExportAsMain(WasmFunctionBuilder* f) {
+ f->builder()->AddExport(CStrVector("main"), f);
+}
#define EMIT_CODE_WITH_END(f, code) \
do { \
@@ -226,7 +228,7 @@ class WasmSerializationTest {
WasmFunctionBuilder* f = builder->AddFunction(sigs.i_i());
byte code[] = {WASM_GET_LOCAL(0), kExprI32Const, 1, kExprI32Add};
EMIT_CODE_WITH_END(f, code);
- f->ExportAs(CStrVector(kFunctionName));
+ builder->AddExport(CStrVector(kFunctionName), f);
builder->WriteTo(*buffer);
}
@@ -1098,39 +1100,38 @@ TEST(Run_WasmModule_Buffer_Externalized_GrowMem) {
ModuleOrigin::kWasmOrigin);
CHECK(!instance.is_null());
Handle<JSArrayBuffer> memory(instance->memory_buffer(), isolate);
+ void* const old_allocation_base = memory->allocation_base();
+ size_t const old_allocation_length = memory->allocation_length();
// Fake the Embedder flow by creating a memory object, externalize and grow.
Handle<WasmMemoryObject> mem_obj =
WasmMemoryObject::New(isolate, memory, 100);
- // TODO(eholk): Skipping calls to externalize when guard pages are enabled
- // for now. This will have to be dealt with when turning on guard pages as
- // currently gin assumes that it can take ownership of the ArrayBuffer.
- // Potential for crashes as this might lead to externalizing an already
- // externalized buffer.
- if (!memory->has_guard_region()) v8::Utils::ToLocal(memory)->Externalize();
- void* backing_store = memory->backing_store();
- uint64_t byte_length = NumberToSize(memory->byte_length());
+ v8::Utils::ToLocal(memory)->Externalize();
+
uint32_t result = WasmMemoryObject::Grow(isolate, mem_obj, 4);
- wasm::DetachWebAssemblyMemoryBuffer(isolate, memory, true);
+ const bool free_memory = true;
+ wasm::DetachWebAssemblyMemoryBuffer(isolate, memory, free_memory);
CHECK_EQ(16, result);
- if (!memory->has_guard_region()) {
- isolate->array_buffer_allocator()->Free(backing_store, byte_length);
- }
memory = handle(mem_obj->buffer());
- byte_length = NumberToSize(memory->byte_length());
instance->set_memory_buffer(*memory);
// Externalize should make no difference without the JS API as in this case
// the buffer is not detached.
- if (!memory->has_guard_region()) v8::Utils::ToLocal(memory)->Externalize();
+ v8::Utils::ToLocal(memory)->Externalize();
result = testing::RunWasmModuleForTesting(isolate, instance, 0, nullptr,
ModuleOrigin::kWasmOrigin);
CHECK_EQ(kExpectedValue, result);
// Free the buffer as the tracker does not know about it.
- if (!memory->has_guard_region()) {
- isolate->array_buffer_allocator()->Free(
- memory->backing_store(), NumberToSize(memory->byte_length()));
- }
+ const v8::ArrayBuffer::Allocator::AllocationMode allocation_mode =
+ memory->allocation_mode();
+ CHECK_NOT_NULL(memory->allocation_base());
+ isolate->array_buffer_allocator()->Free(memory->allocation_base(),
+ memory->allocation_length(),
+ allocation_mode);
+ isolate->array_buffer_allocator()->Free(
+ old_allocation_base, old_allocation_length, allocation_mode);
+ memory->set_allocation_base(nullptr);
+ memory->set_allocation_length(0);
}
Cleanup();
}
@@ -1142,7 +1143,8 @@ TEST(Run_WasmModule_Buffer_Externalized_GrowMemMemSize) {
void* backing_store =
isolate->array_buffer_allocator()->Allocate(16 * WasmModule::kPageSize);
Handle<JSArrayBuffer> buffer = wasm::SetupArrayBuffer(
- isolate, backing_store, 16 * WasmModule::kPageSize, false, false);
+ isolate, backing_store, 16 * WasmModule::kPageSize, backing_store,
+ 16 * WasmModule::kPageSize, false, false);
Handle<WasmMemoryObject> mem_obj =
WasmMemoryObject::New(isolate, buffer, 100);
v8::Utils::ToLocal(buffer)->Externalize();
@@ -1155,3 +1157,22 @@ TEST(Run_WasmModule_Buffer_Externalized_GrowMemMemSize) {
}
Cleanup();
}
+
+TEST(Run_WasmModule_Buffer_Externalized_Detach) {
+ {
+ // Regression test for
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=731046
+ Isolate* isolate = CcTest::InitIsolateOnce();
+ HandleScope scope(isolate);
+ void* backing_store =
+ isolate->array_buffer_allocator()->Allocate(16 * WasmModule::kPageSize);
+ Handle<JSArrayBuffer> buffer = wasm::SetupArrayBuffer(
+ isolate, backing_store, 16 * WasmModule::kPageSize, backing_store,
+ 16 * WasmModule::kPageSize, false, false);
+ v8::Utils::ToLocal(buffer)->Externalize();
+ wasm::DetachWebAssemblyMemoryBuffer(isolate, buffer, true);
+ isolate->array_buffer_allocator()->Free(backing_store,
+ 16 * WasmModule::kPageSize);
+ }
+ Cleanup();
+}
diff --git a/deps/v8/test/cctest/wasm/test-run-wasm-relocation.cc b/deps/v8/test/cctest/wasm/test-run-wasm-relocation.cc
index a0d8a07189..d10c88a584 100644
--- a/deps/v8/test/cctest/wasm/test-run-wasm-relocation.cc
+++ b/deps/v8/test/cctest/wasm/test-run-wasm-relocation.cc
@@ -10,6 +10,7 @@
#include "test/cctest/cctest.h"
#include "test/cctest/compiler/c-signature.h"
#include "test/cctest/wasm/wasm-run-utils.h"
+#include "test/common/wasm/wasm-macro-gen.h"
using namespace v8::internal;
using namespace v8::internal::compiler;
diff --git a/deps/v8/test/cctest/wasm/test-run-wasm-simd.cc b/deps/v8/test/cctest/wasm/test-run-wasm-simd.cc
index b69eefce5e..4a47248cea 100644
--- a/deps/v8/test/cctest/wasm/test-run-wasm-simd.cc
+++ b/deps/v8/test/cctest/wasm/test-run-wasm-simd.cc
@@ -3,10 +3,10 @@
// found in the LICENSE file.
#include "src/assembler-inl.h"
-#include "src/wasm/wasm-macro-gen.h"
#include "test/cctest/cctest.h"
#include "test/cctest/compiler/value-helper.h"
#include "test/cctest/wasm/wasm-run-utils.h"
+#include "test/common/wasm/wasm-macro-gen.h"
using namespace v8::base;
using namespace v8::internal;
@@ -75,7 +75,8 @@ T Maximum(T a, T b) {
}
// For float operands, Min and Max must return NaN if either operand is NaN.
-#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
+#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_MIPS || \
+ V8_TARGET_ARCH_MIPS64
template <>
float Minimum(float a, float b) {
if (std::isnan(a) || std::isnan(b))
@@ -89,7 +90,8 @@ float Maximum(float a, float b) {
return std::numeric_limits<float>::quiet_NaN();
return a >= b ? a : b;
}
-#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
+#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_MIPS ||
+ // V8_TARGET_ARCH_MIPS64
template <typename T>
T UnsignedMinimum(T a, T b) {
@@ -264,16 +266,6 @@ T RecipSqrt(T a) {
return 1.0f / std::sqrt(a);
}
-template <typename T>
-T RecipRefine(T a, T b) {
- return 2.0f - a * b;
-}
-
-template <typename T>
-T RecipSqrtRefine(T a, T b) {
- return (3.0f - a * b) * 0.5f;
-}
-
} // namespace
#define WASM_SIMD_CHECK_LANE(TYPE, value, LANE_TYPE, lane_value, lane_index) \
@@ -366,6 +358,8 @@ T RecipSqrtRefine(T a, T b) {
#define WASM_SIMD_UNOP(op, x) x, WASM_SIMD_OP(op)
#define WASM_SIMD_BINOP(op, x, y) x, y, WASM_SIMD_OP(op)
#define WASM_SIMD_SHIFT_OP(op, shift, x) x, WASM_SIMD_OP(op), TO_BYTE(shift)
+#define WASM_SIMD_CONCAT_OP(op, bytes, x, y) \
+ x, y, WASM_SIMD_OP(op), TO_BYTE(bytes)
#define WASM_SIMD_SELECT(format, x, y, z) \
x, y, z, WASM_SIMD_OP(kExprS##format##Select)
// Since boolean vectors can't be checked directly, materialize them into
@@ -399,6 +393,20 @@ T RecipSqrtRefine(T a, T b) {
#define WASM_SIMD_I8x16_REPLACE_LANE(lane, x, y) \
x, y, WASM_SIMD_OP(kExprI8x16ReplaceLane), TO_BYTE(lane)
+#define WASM_SIMD_S32x4_SHUFFLE_OP(opcode, m, x, y) \
+ x, y, WASM_SIMD_OP(opcode), TO_BYTE(m[0]), TO_BYTE(m[1]), TO_BYTE(m[2]), \
+ TO_BYTE(m[3])
+#define WASM_SIMD_S16x8_SHUFFLE_OP(opcode, m, x, y) \
+ x, y, WASM_SIMD_OP(opcode), TO_BYTE(m[0]), TO_BYTE(m[1]), TO_BYTE(m[2]), \
+ TO_BYTE(m[3]), TO_BYTE(m[4]), TO_BYTE(m[5]), TO_BYTE(m[6]), \
+ TO_BYTE(m[7])
+#define WASM_SIMD_S8x16_SHUFFLE_OP(opcode, m, x, y) \
+ x, y, WASM_SIMD_OP(opcode), TO_BYTE(m[0]), TO_BYTE(m[1]), TO_BYTE(m[2]), \
+ TO_BYTE(m[3]), TO_BYTE(m[4]), TO_BYTE(m[5]), TO_BYTE(m[6]), \
+ TO_BYTE(m[7]), TO_BYTE(m[8]), TO_BYTE(m[9]), TO_BYTE(m[10]), \
+ TO_BYTE(m[11]), TO_BYTE(m[12]), TO_BYTE(m[13]), TO_BYTE(m[14]), \
+ TO_BYTE(m[15])
+
// Skip FP tests involving extremely large or extremely small values, which
// may fail due to non-IEEE-754 SIMD arithmetic on some platforms.
bool SkipFPValue(float x) {
@@ -485,7 +493,8 @@ WASM_EXEC_COMPILED_TEST(F32x4ConvertI32x4) {
#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_MIPS ||
// V8_TARGET_ARCH_MIPS64
-#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
+#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_MIPS || \
+ V8_TARGET_ARCH_MIPS64
void RunF32x4UnOpTest(WasmOpcode simd_op, FloatUnOp expected_op,
float error = 0.0f) {
FLAG_wasm_simd_prototype = true;
@@ -510,13 +519,10 @@ void RunF32x4UnOpTest(WasmOpcode simd_op, FloatUnOp expected_op,
WASM_EXEC_COMPILED_TEST(F32x4Abs) { RunF32x4UnOpTest(kExprF32x4Abs, std::abs); }
WASM_EXEC_COMPILED_TEST(F32x4Neg) { RunF32x4UnOpTest(kExprF32x4Neg, Negate); }
-#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
-
-#if SIMD_LOWERING_TARGET
-WASM_EXEC_COMPILED_TEST(F32x4Sqrt) { RunF32x4UnOpTest(kExprF32x4Sqrt, Sqrt); }
-#endif // SIMD_LOWERING_TARGET
+#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_MIPS ||
+ // V8_TARGET_ARCH_MIPS64
-#if V8_TARGET_ARCH_ARM
+#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
static const float kApproxError = 0.01f;
WASM_EXEC_COMPILED_TEST(F32x4RecipApprox) {
@@ -526,9 +532,10 @@ WASM_EXEC_COMPILED_TEST(F32x4RecipApprox) {
WASM_EXEC_COMPILED_TEST(F32x4RecipSqrtApprox) {
RunF32x4UnOpTest(kExprF32x4RecipSqrtApprox, RecipSqrt, kApproxError);
}
-#endif // V8_TARGET_ARCH_ARM
+#endif // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
-#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
+#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_MIPS || \
+ V8_TARGET_ARCH_MIPS64
void RunF32x4BinOpTest(WasmOpcode simd_op, FloatBinOp expected_op) {
FLAG_wasm_simd_prototype = true;
WasmRunner<int32_t, float, float, float> r(kExecuteCompiled);
@@ -563,23 +570,11 @@ WASM_EXEC_COMPILED_TEST(F32x4_Min) {
WASM_EXEC_COMPILED_TEST(F32x4_Max) {
RunF32x4BinOpTest(kExprF32x4Max, Maximum);
}
-#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
-
-#if SIMD_LOWERING_TARGET
-WASM_EXEC_COMPILED_TEST(F32x4Div) { RunF32x4BinOpTest(kExprF32x4Div, Div); }
-#endif // SIMD_LOWERING_TARGET
-
-#if V8_TARGET_ARCH_ARM
-WASM_EXEC_COMPILED_TEST(F32x4RecipRefine) {
- RunF32x4BinOpTest(kExprF32x4RecipRefine, RecipRefine);
-}
-
-WASM_EXEC_COMPILED_TEST(F32x4RecipSqrtRefine) {
- RunF32x4BinOpTest(kExprF32x4RecipSqrtRefine, RecipSqrtRefine);
-}
-#endif // V8_TARGET_ARCH_ARM
+#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_MIPS ||
+ // V8_TARGET_ARCH_MIPS64
-#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
+#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_MIPS || \
+ V8_TARGET_ARCH_MIPS64
void RunF32x4CompareOpTest(WasmOpcode simd_op, FloatCompareOp expected_op) {
FLAG_wasm_simd_prototype = true;
WasmRunner<int32_t, float, float, int32_t> r(kExecuteCompiled);
@@ -626,7 +621,8 @@ WASM_EXEC_COMPILED_TEST(F32x4Lt) { RunF32x4CompareOpTest(kExprF32x4Lt, Less); }
WASM_EXEC_COMPILED_TEST(F32x4Le) {
RunF32x4CompareOpTest(kExprF32x4Le, LessEqual);
}
-#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
+#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_MIPS ||
+ // V8_TARGET_ARCH_MIPS64
WASM_EXEC_COMPILED_TEST(I32x4Splat) {
FLAG_wasm_simd_prototype = true;
@@ -678,8 +674,8 @@ WASM_EXEC_COMPILED_TEST(I32x4ReplaceLane) {
CHECK_EQ(1, r.Call(1, 2));
}
-#if V8_TARGET_ARCH_ARM
-
+#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || SIMD_LOWERING_TARGET || \
+ V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
WASM_EXEC_COMPILED_TEST(I16x8Splat) {
FLAG_wasm_simd_prototype = true;
@@ -742,7 +738,11 @@ WASM_EXEC_COMPILED_TEST(I16x8ReplaceLane) {
CHECK_EQ(1, r.Call(1, 2));
}
+#endif // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || SIMD_LOWERING_TARGET ||
+ // V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
+#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_MIPS || \
+ V8_TARGET_ARCH_MIPS64 || SIMD_LOWERING_TARGET
WASM_EXEC_COMPILED_TEST(I8x16Splat) {
FLAG_wasm_simd_prototype = true;
@@ -860,9 +860,11 @@ WASM_EXEC_COMPILED_TEST(I8x16ReplaceLane) {
CHECK_EQ(1, r.Call(1, 2));
}
-#endif // V8_TARGET_ARCH_ARM
+#endif // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_MIPS ||
+ // V8_TARGET_ARCH_MIPS64 || SIMD_LOWERING_TARGET
-#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
+#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_MIPS || \
+ V8_TARGET_ARCH_MIPS64
// Determines if conversion from float to int will be valid.
bool CanRoundToZeroAndConvert(double val, bool unsigned_integer) {
const double max_uint = static_cast<double>(0xffffffffu);
@@ -928,6 +930,8 @@ WASM_EXEC_COMPILED_TEST(I32x4ConvertF32x4) {
CHECK_EQ(1, r.Call(*i, signed_value, unsigned_value));
}
}
+#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_MIPS ||
+ // V8_TARGET_ARCH_MIPS64
#if V8_TARGET_ARCH_ARM
// Tests both signed and unsigned conversion from I16x8 (unpacking).
@@ -956,6 +960,8 @@ WASM_EXEC_COMPILED_TEST(I32x4ConvertI16x8) {
}
#endif // V8_TARGET_ARCH_ARM
+#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_MIPS || \
+ V8_TARGET_ARCH_MIPS64
void RunI32x4UnOpTest(WasmOpcode simd_op, Int32UnOp expected_op) {
FLAG_wasm_simd_prototype = true;
WasmRunner<int32_t, int32_t, int32_t> r(kExecuteCompiled);
@@ -970,7 +976,10 @@ void RunI32x4UnOpTest(WasmOpcode simd_op, Int32UnOp expected_op) {
}
WASM_EXEC_COMPILED_TEST(I32x4Neg) { RunI32x4UnOpTest(kExprI32x4Neg, Negate); }
+#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_MIPS ||
+ // V8_TARGET_ARCH_MIPS64
+#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
WASM_EXEC_COMPILED_TEST(S128Not) { RunI32x4UnOpTest(kExprS128Not, Not); }
#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
@@ -1003,13 +1012,13 @@ WASM_EXEC_COMPILED_TEST(I32x4Mul) { RunI32x4BinOpTest(kExprI32x4Mul, Mul); }
#endif // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || SIMD_LOWERING_TARGET ||
// V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
-#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
+#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_X64
WASM_EXEC_COMPILED_TEST(S128And) { RunI32x4BinOpTest(kExprS128And, And); }
WASM_EXEC_COMPILED_TEST(S128Or) { RunI32x4BinOpTest(kExprS128Or, Or); }
WASM_EXEC_COMPILED_TEST(S128Xor) { RunI32x4BinOpTest(kExprS128Xor, Xor); }
-#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
+#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_X64
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || SIMD_LOWERING_TARGET || \
V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
@@ -1058,7 +1067,8 @@ WASM_EXEC_COMPILED_TEST(I32x4Ne) {
#endif // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || SIMD_LOWERING_TARGET ||
// V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
-#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
+#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_MIPS || \
+ V8_TARGET_ARCH_MIPS64
WASM_EXEC_COMPILED_TEST(I32x4LtS) {
RunI32x4CompareOpTest(kExprI32x4LtS, Less);
}
@@ -1090,7 +1100,8 @@ WASM_EXEC_COMPILED_TEST(I32x4GtU) {
WASM_EXEC_COMPILED_TEST(I32x4GeU) {
RunI32x4CompareOpTest(kExprI32x4GeU, UnsignedGreaterEqual);
}
-#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
+#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_MIPS ||
+ // V8_TARGET_ARCH_MIPS64
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || SIMD_LOWERING_TARGET || \
V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
@@ -1148,7 +1159,10 @@ WASM_EXEC_COMPILED_TEST(I16x8ConvertI8x16) {
CHECK_EQ(1, r.Call(*i, unpacked_signed, unpacked_unsigned));
}
}
+#endif // V8_TARGET_ARCH_ARM
+#if SIMD_LOWERING_TARGET || V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS || \
+ V8_TARGET_ARCH_MIPS64
void RunI16x8UnOpTest(WasmOpcode simd_op, Int16UnOp expected_op) {
FLAG_wasm_simd_prototype = true;
WasmRunner<int32_t, int32_t, int32_t> r(kExecuteCompiled);
@@ -1163,7 +1177,10 @@ void RunI16x8UnOpTest(WasmOpcode simd_op, Int16UnOp expected_op) {
}
WASM_EXEC_COMPILED_TEST(I16x8Neg) { RunI16x8UnOpTest(kExprI16x8Neg, Negate); }
+#endif // SIMD_LOWERING_TARGET || V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS ||
+ // V8_TARGET_ARCH_MIPS64
+#if V8_TARGET_ARCH_ARM
// Tests both signed and unsigned conversion from I32x4 (packing).
WASM_EXEC_COMPILED_TEST(I16x8ConvertI32x4) {
FLAG_wasm_simd_prototype = true;
@@ -1192,7 +1209,10 @@ WASM_EXEC_COMPILED_TEST(I16x8ConvertI32x4) {
CHECK_EQ(1, r.Call(*i, packed_signed, packed_unsigned));
}
}
+#endif // V8_TARGET_ARCH_ARM
+#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || SIMD_LOWERING_TARGET || \
+ V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
void RunI16x8BinOpTest(WasmOpcode simd_op, Int16BinOp expected_op) {
FLAG_wasm_simd_prototype = true;
WasmRunner<int32_t, int32_t, int32_t, int32_t> r(kExecuteCompiled);
@@ -1223,7 +1243,11 @@ WASM_EXEC_COMPILED_TEST(I16x8Sub) { RunI16x8BinOpTest(kExprI16x8Sub, Sub); }
WASM_EXEC_COMPILED_TEST(I16x8SubSaturateS) {
RunI16x8BinOpTest(kExprI16x8SubSaturateS, SubSaturate);
}
+#endif // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || SIMD_LOWERING_TARGET ||
+ // V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
+#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || SIMD_LOWERING_TARGET || \
+ V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
WASM_EXEC_COMPILED_TEST(I16x8Mul) { RunI16x8BinOpTest(kExprI16x8Mul, Mul); }
WASM_EXEC_COMPILED_TEST(I16x8MinS) {
@@ -1276,7 +1300,11 @@ WASM_EXEC_COMPILED_TEST(I16x8Eq) { RunI16x8CompareOpTest(kExprI16x8Eq, Equal); }
WASM_EXEC_COMPILED_TEST(I16x8Ne) {
RunI16x8CompareOpTest(kExprI16x8Ne, NotEqual);
}
+#endif // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || SIMD_LOWERING_TARGET ||
+ // V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
+#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_MIPS || \
+ V8_TARGET_ARCH_MIPS64
WASM_EXEC_COMPILED_TEST(I16x8LtS) {
RunI16x8CompareOpTest(kExprI16x8LtS, Less);
}
@@ -1308,7 +1336,11 @@ WASM_EXEC_COMPILED_TEST(I16x8LtU) {
WASM_EXEC_COMPILED_TEST(I16x8LeU) {
RunI16x8CompareOpTest(kExprI16x8LeU, UnsignedLessEqual);
}
+#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_MIPS ||
+ // V8_TARGET_ARCH_MIPS64
+#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || SIMD_LOWERING_TARGET || \
+ V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
void RunI16x8ShiftOpTest(WasmOpcode simd_op, Int16ShiftOp expected_op,
int shift) {
FLAG_wasm_simd_prototype = true;
@@ -1335,7 +1367,11 @@ WASM_EXEC_COMPILED_TEST(I16x8ShrS) {
WASM_EXEC_COMPILED_TEST(I16x8ShrU) {
RunI16x8ShiftOpTest(kExprI16x8ShrU, LogicalShiftRight, 1);
}
+#endif // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || SIMD_LOWERING_TARGET ||
+ // V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
+#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 || \
+ SIMD_LOWERING_TARGET
void RunI8x16UnOpTest(WasmOpcode simd_op, Int8UnOp expected_op) {
FLAG_wasm_simd_prototype = true;
WasmRunner<int32_t, int32_t, int32_t> r(kExecuteCompiled);
@@ -1350,7 +1386,10 @@ void RunI8x16UnOpTest(WasmOpcode simd_op, Int8UnOp expected_op) {
}
WASM_EXEC_COMPILED_TEST(I8x16Neg) { RunI8x16UnOpTest(kExprI8x16Neg, Negate); }
+#endif // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 ||
+ // SIMD_LOWERING_TARGET
+#if V8_TARGET_ARCH_ARM
// Tests both signed and unsigned conversion from I16x8 (packing).
WASM_EXEC_COMPILED_TEST(I8x16ConvertI16x8) {
FLAG_wasm_simd_prototype = true;
@@ -1379,7 +1418,9 @@ WASM_EXEC_COMPILED_TEST(I8x16ConvertI16x8) {
CHECK_EQ(1, r.Call(*i, packed_signed, packed_unsigned));
}
}
+#endif // V8_TARGET_ARCH_ARM
+#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || SIMD_LOWERING_TARGET
void RunI8x16BinOpTest(WasmOpcode simd_op, Int8BinOp expected_op) {
FLAG_wasm_simd_prototype = true;
WasmRunner<int32_t, int32_t, int32_t, int32_t> r(kExecuteCompiled);
@@ -1411,8 +1452,6 @@ WASM_EXEC_COMPILED_TEST(I8x16SubSaturateS) {
RunI8x16BinOpTest(kExprI8x16SubSaturateS, SubSaturate);
}
-WASM_EXEC_COMPILED_TEST(I8x16Mul) { RunI8x16BinOpTest(kExprI8x16Mul, Mul); }
-
WASM_EXEC_COMPILED_TEST(I8x16MinS) {
RunI8x16BinOpTest(kExprI8x16MinS, Minimum);
}
@@ -1463,6 +1502,10 @@ WASM_EXEC_COMPILED_TEST(I8x16Eq) { RunI8x16CompareOpTest(kExprI8x16Eq, Equal); }
WASM_EXEC_COMPILED_TEST(I8x16Ne) {
RunI8x16CompareOpTest(kExprI8x16Ne, NotEqual);
}
+#endif // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || SIMD_LOWERING_TARGET
+
+#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
+WASM_EXEC_COMPILED_TEST(I8x16Mul) { RunI8x16BinOpTest(kExprI8x16Mul, Mul); }
WASM_EXEC_COMPILED_TEST(I8x16GtS) {
RunI8x16CompareOpTest(kExprI8x16GtS, Greater);
@@ -1495,6 +1538,7 @@ WASM_EXEC_COMPILED_TEST(I8x16LtU) {
WASM_EXEC_COMPILED_TEST(I8x16LeU) {
RunI8x16CompareOpTest(kExprI8x16LeU, UnsignedLessEqual);
}
+#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
void RunI8x16ShiftOpTest(WasmOpcode simd_op, Int8ShiftOp expected_op,
int shift) {
@@ -1511,6 +1555,8 @@ void RunI8x16ShiftOpTest(WasmOpcode simd_op, Int8ShiftOp expected_op,
FOR_INT8_INPUTS(i) { CHECK_EQ(1, r.Call(*i, expected_op(*i, shift))); }
}
+#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 || \
+ SIMD_LOWERING_TARGET
WASM_EXEC_COMPILED_TEST(I8x16Shl) {
RunI8x16ShiftOpTest(kExprI8x16Shl, LogicalShiftLeft, 1);
}
@@ -1518,11 +1564,14 @@ WASM_EXEC_COMPILED_TEST(I8x16Shl) {
WASM_EXEC_COMPILED_TEST(I8x16ShrS) {
RunI8x16ShiftOpTest(kExprI8x16ShrS, ArithmeticShiftRight, 1);
}
+#endif // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 ||
+ // SIMD_LOWERING_TARGET
+#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
WASM_EXEC_COMPILED_TEST(I8x16ShrU) {
RunI8x16ShiftOpTest(kExprI8x16ShrU, LogicalShiftRight, 1);
}
-#endif // V8_TARGET_ARCH_ARM
+#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_MIPS || \
V8_TARGET_ARCH_MIPS64
@@ -1565,9 +1614,278 @@ WASM_SIMD_SELECT_TEST(32x4)
#endif // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_MIPS ||
// V8_TARGET_ARCH_MIPS64
-#if V8_TARGET_ARCH_ARM
+#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_MIPS || \
+ V8_TARGET_ARCH_MIPS64
WASM_SIMD_SELECT_TEST(16x8)
+
WASM_SIMD_SELECT_TEST(8x16)
+#endif // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_MIPS ||
+ // V8_TARGET_ARCH_MIPS64
+
+#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64
+// Test binary ops with two lane test patterns, all lanes distinct.
+template <typename T>
+void RunBinaryLaneOpTest(
+ WasmOpcode simd_op,
+ const std::array<T, kSimd128Size / sizeof(T)>& expected) {
+ FLAG_wasm_simd_prototype = true;
+ WasmRunner<int32_t> r(kExecuteCompiled);
+ // Set up two test patterns as globals, e.g. [0, 1, 2, 3] and [4, 5, 6, 7].
+ T* src0 = r.module().AddGlobal<T>(kWasmS128);
+ T* src1 = r.module().AddGlobal<T>(kWasmS128);
+ static const int kElems = kSimd128Size / sizeof(T);
+ for (int i = 0; i < kElems; i++) {
+ src0[i] = i;
+ src1[i] = kElems + i;
+ }
+ switch (simd_op) {
+ case kExprS32x4Shuffle: {
+ BUILD(r,
+ WASM_SET_GLOBAL(0, WASM_SIMD_S32x4_SHUFFLE_OP(simd_op, expected,
+ WASM_GET_GLOBAL(0),
+ WASM_GET_GLOBAL(1))),
+ WASM_ONE);
+ break;
+ }
+ case kExprS16x8Shuffle: {
+ BUILD(r,
+ WASM_SET_GLOBAL(0, WASM_SIMD_S16x8_SHUFFLE_OP(simd_op, expected,
+ WASM_GET_GLOBAL(0),
+ WASM_GET_GLOBAL(1))),
+ WASM_ONE);
+ break;
+ }
+ case kExprS8x16Shuffle: {
+ BUILD(r,
+ WASM_SET_GLOBAL(0, WASM_SIMD_S8x16_SHUFFLE_OP(simd_op, expected,
+ WASM_GET_GLOBAL(0),
+ WASM_GET_GLOBAL(1))),
+ WASM_ONE);
+ break;
+ }
+ default: {
+ BUILD(r,
+ WASM_SET_GLOBAL(0, WASM_SIMD_BINOP(simd_op, WASM_GET_GLOBAL(0),
+ WASM_GET_GLOBAL(1))),
+ WASM_ONE);
+ break;
+ }
+ }
+
+ CHECK_EQ(1, r.Call());
+ for (size_t i = 0; i < expected.size(); i++) {
+ CHECK_EQ(src0[i], expected[i]);
+ }
+}
+
+WASM_EXEC_COMPILED_TEST(I32x4AddHoriz) {
+ RunBinaryLaneOpTest<int32_t>(kExprI32x4AddHoriz, {{1, 5, 9, 13}});
+}
+
+WASM_EXEC_COMPILED_TEST(I16x8AddHoriz) {
+ RunBinaryLaneOpTest<int16_t>(kExprI16x8AddHoriz,
+ {{1, 5, 9, 13, 17, 21, 25, 29}});
+}
+#endif // V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X64
+
+#if V8_TARGET_ARCH_ARM
+WASM_EXEC_COMPILED_TEST(F32x4AddHoriz) {
+ RunBinaryLaneOpTest<float>(kExprF32x4AddHoriz, {{1.0f, 5.0f, 9.0f, 13.0f}});
+}
+
+// Test some regular shuffles that may have special handling on some targets.
+// Test a normal and unary versions (where second operand isn't used).
+WASM_EXEC_COMPILED_TEST(S32x4ZipLeft) {
+ RunBinaryLaneOpTest<int32_t>(kExprS32x4Shuffle, {{0, 4, 1, 5}});
+ RunBinaryLaneOpTest<int32_t>(kExprS32x4Shuffle, {{0, 0, 1, 1}});
+}
+
+WASM_EXEC_COMPILED_TEST(S32x4ZipRight) {
+ RunBinaryLaneOpTest<int32_t>(kExprS32x4Shuffle, {{2, 6, 3, 7}});
+ RunBinaryLaneOpTest<int32_t>(kExprS32x4Shuffle, {{2, 2, 3, 3}});
+}
+
+WASM_EXEC_COMPILED_TEST(S32x4UnzipLeft) {
+ RunBinaryLaneOpTest<int32_t>(kExprS32x4Shuffle, {{0, 2, 4, 6}});
+ RunBinaryLaneOpTest<int32_t>(kExprS32x4Shuffle, {{0, 2, 0, 2}});
+}
+
+WASM_EXEC_COMPILED_TEST(S32x4UnzipRight) {
+ RunBinaryLaneOpTest<int32_t>(kExprS32x4Shuffle, {{1, 3, 5, 7}});
+ RunBinaryLaneOpTest<int32_t>(kExprS32x4Shuffle, {{1, 3, 1, 3}});
+}
+
+WASM_EXEC_COMPILED_TEST(S32x4TransposeLeft) {
+ RunBinaryLaneOpTest<int32_t>(kExprS32x4Shuffle, {{0, 4, 2, 6}});
+ RunBinaryLaneOpTest<int32_t>(kExprS32x4Shuffle, {{0, 0, 2, 2}});
+}
+
+WASM_EXEC_COMPILED_TEST(S32x4TransposeRight) {
+ RunBinaryLaneOpTest<int32_t>(kExprS32x4Shuffle, {{1, 5, 3, 7}});
+ RunBinaryLaneOpTest<int32_t>(kExprS32x4Shuffle, {{1, 1, 3, 3}});
+}
+
+// Reverses are only unary.
+WASM_EXEC_COMPILED_TEST(S32x2Reverse) {
+ RunBinaryLaneOpTest<int32_t>(kExprS32x4Shuffle, {{1, 0, 3, 2}});
+}
+
+// Test irregular shuffle.
+WASM_EXEC_COMPILED_TEST(S32x4Irregular) {
+ RunBinaryLaneOpTest<int32_t>(kExprS32x4Shuffle, {{0, 4, 4, 5}});
+ RunBinaryLaneOpTest<int32_t>(kExprS32x4Shuffle, {{0, 0, 0, 1}});
+}
+
+WASM_EXEC_COMPILED_TEST(S16x8ZipLeft) {
+ RunBinaryLaneOpTest<int16_t>(kExprS16x8Shuffle, {{0, 8, 1, 9, 2, 10, 3, 11}});
+ RunBinaryLaneOpTest<int16_t>(kExprS16x8Shuffle, {{0, 0, 1, 1, 2, 2, 3, 3}});
+}
+
+WASM_EXEC_COMPILED_TEST(S16x8ZipRight) {
+ RunBinaryLaneOpTest<int16_t>(kExprS16x8Shuffle,
+ {{4, 12, 5, 13, 6, 14, 7, 15}});
+ RunBinaryLaneOpTest<int16_t>(kExprS16x8Shuffle, {{4, 4, 5, 5, 6, 6, 7, 7}});
+}
+
+WASM_EXEC_COMPILED_TEST(S16x8UnzipLeft) {
+ RunBinaryLaneOpTest<int16_t>(kExprS16x8Shuffle,
+ {{0, 2, 4, 6, 8, 10, 12, 14}});
+ RunBinaryLaneOpTest<int16_t>(kExprS16x8Shuffle, {{0, 2, 4, 6, 0, 2, 4, 6}});
+}
+
+WASM_EXEC_COMPILED_TEST(S16x8UnzipRight) {
+ RunBinaryLaneOpTest<int16_t>(kExprS16x8Shuffle,
+ {{1, 3, 5, 7, 9, 11, 13, 15}});
+ RunBinaryLaneOpTest<int16_t>(kExprS16x8Shuffle, {{1, 3, 5, 7, 1, 3, 5, 7}});
+}
+
+WASM_EXEC_COMPILED_TEST(S16x8TransposeLeft) {
+ RunBinaryLaneOpTest<int16_t>(kExprS16x8Shuffle,
+ {{0, 8, 2, 10, 4, 12, 6, 14}});
+ RunBinaryLaneOpTest<int16_t>(kExprS16x8Shuffle, {{0, 0, 2, 2, 4, 4, 6, 6}});
+}
+
+WASM_EXEC_COMPILED_TEST(S16x8TransposeRight) {
+ RunBinaryLaneOpTest<int16_t>(kExprS16x8Shuffle,
+ {{1, 9, 3, 11, 5, 13, 7, 15}});
+ RunBinaryLaneOpTest<int16_t>(kExprS16x8Shuffle, {{1, 1, 3, 3, 5, 5, 7, 7}});
+}
+
+WASM_EXEC_COMPILED_TEST(S16x4Reverse) {
+ RunBinaryLaneOpTest<int16_t>(kExprS16x8Shuffle, {{3, 2, 1, 0, 7, 6, 5, 4}});
+}
+
+WASM_EXEC_COMPILED_TEST(S16x2Reverse) {
+ RunBinaryLaneOpTest<int16_t>(kExprS16x8Shuffle, {{1, 0, 3, 2, 5, 4, 7, 6}});
+}
+
+WASM_EXEC_COMPILED_TEST(S16x8Irregular) {
+ RunBinaryLaneOpTest<int16_t>(kExprS16x8Shuffle, {{0, 8, 8, 0, 2, 10, 3, 11}});
+ RunBinaryLaneOpTest<int16_t>(kExprS16x8Shuffle, {{0, 0, 0, 0, 2, 2, 3, 3}});
+}
+
+WASM_EXEC_COMPILED_TEST(S8x16ZipLeft) {
+ RunBinaryLaneOpTest<int8_t>(
+ kExprS8x16Shuffle,
+ {{0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23}});
+ RunBinaryLaneOpTest<int8_t>(
+ kExprS8x16Shuffle, {{0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7}});
+}
+
+WASM_EXEC_COMPILED_TEST(S8x16ZipRight) {
+ RunBinaryLaneOpTest<int8_t>(
+ kExprS8x16Shuffle,
+ {{8, 24, 9, 25, 10, 26, 11, 27, 12, 28, 13, 29, 14, 30, 15, 31}});
+ RunBinaryLaneOpTest<int8_t>(
+ kExprS8x16Shuffle,
+ {{8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15}});
+}
+
+WASM_EXEC_COMPILED_TEST(S8x16UnzipLeft) {
+ RunBinaryLaneOpTest<int8_t>(
+ kExprS8x16Shuffle,
+ {{0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30}});
+ RunBinaryLaneOpTest<int8_t>(kExprS8x16Shuffle, {{0, 2, 4, 6, 8, 10, 12, 14, 0,
+ 2, 4, 6, 8, 10, 12, 14}});
+}
+
+WASM_EXEC_COMPILED_TEST(S8x16UnzipRight) {
+ RunBinaryLaneOpTest<int8_t>(
+ kExprS8x16Shuffle,
+ {{1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31}});
+ RunBinaryLaneOpTest<int8_t>(kExprS8x16Shuffle, {{1, 3, 5, 7, 9, 11, 13, 15, 1,
+ 3, 5, 7, 9, 11, 13, 15}});
+}
+
+WASM_EXEC_COMPILED_TEST(S8x16TransposeLeft) {
+ RunBinaryLaneOpTest<int8_t>(
+ kExprS8x16Shuffle,
+ {{0, 16, 2, 18, 4, 20, 6, 22, 8, 24, 10, 26, 12, 28, 14, 30}});
+ RunBinaryLaneOpTest<int8_t>(kExprS8x16Shuffle, {{0, 0, 2, 2, 4, 4, 6, 6, 8, 8,
+ 10, 10, 12, 12, 14, 14}});
+}
+
+WASM_EXEC_COMPILED_TEST(S8x16TransposeRight) {
+ RunBinaryLaneOpTest<int8_t>(
+ kExprS8x16Shuffle,
+ {{1, 17, 3, 19, 5, 21, 7, 23, 9, 25, 11, 27, 13, 29, 15, 31}});
+ RunBinaryLaneOpTest<int8_t>(kExprS8x16Shuffle, {{1, 1, 3, 3, 5, 5, 7, 7, 9, 9,
+ 11, 11, 13, 13, 15, 15}});
+}
+
+WASM_EXEC_COMPILED_TEST(S8x8Reverse) {
+ RunBinaryLaneOpTest<int8_t>(kExprS8x16Shuffle, {{7, 6, 5, 4, 3, 2, 1, 0, 15,
+ 14, 13, 12, 11, 10, 9, 8}});
+}
+
+WASM_EXEC_COMPILED_TEST(S8x4Reverse) {
+ RunBinaryLaneOpTest<int8_t>(kExprS8x16Shuffle, {{3, 2, 1, 0, 7, 6, 5, 4, 11,
+ 10, 9, 8, 15, 14, 13, 12}});
+}
+
+WASM_EXEC_COMPILED_TEST(S8x2Reverse) {
+ RunBinaryLaneOpTest<int8_t>(kExprS8x16Shuffle, {{1, 0, 3, 2, 5, 4, 7, 6, 9, 8,
+ 11, 10, 13, 12, 15, 14}});
+}
+
+WASM_EXEC_COMPILED_TEST(S8x16Irregular) {
+ RunBinaryLaneOpTest<int8_t>(
+ kExprS8x16Shuffle,
+ {{0, 16, 0, 16, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23}});
+ RunBinaryLaneOpTest<int8_t>(
+ kExprS8x16Shuffle, {{0, 0, 0, 0, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7}});
+}
+
+// Test shuffles that concatenate the two vectors.
+template <typename T>
+void RunConcatOpTest(WasmOpcode simd_op) {
+ static const int kLanes = kSimd128Size / sizeof(T);
+ std::array<T, kLanes> expected;
+ for (int bias = 1; bias < kLanes; bias++) {
+ int i = 0;
+ // last kLanes - bias bytes of first vector.
+ for (int j = bias; j < kLanes; j++) {
+ expected[i++] = j;
+ }
+ // first bias lanes of second vector
+ for (int j = 0; j < bias; j++) {
+ expected[i++] = j + kLanes;
+ }
+ RunBinaryLaneOpTest<T>(simd_op, expected);
+ }
+}
+
+WASM_EXEC_COMPILED_TEST(S32x4Concat) {
+ RunConcatOpTest<int32_t>(kExprS32x4Shuffle);
+}
+
+WASM_EXEC_COMPILED_TEST(S16x8Concat) {
+ RunConcatOpTest<int16_t>(kExprS16x8Shuffle);
+}
+
+WASM_EXEC_COMPILED_TEST(S8x16Concat) {
+ RunConcatOpTest<int8_t>(kExprS8x16Shuffle);
+}
// Boolean unary operations are 'AllTrue' and 'AnyTrue', which return an integer
// result. Use relational ops on numeric vectors to create the boolean vector
@@ -1743,7 +2061,9 @@ WASM_EXEC_COMPILED_TEST(S1x16And) { RunS1x16BinOpTest(kExprS1x16And, And); }
WASM_EXEC_COMPILED_TEST(S1x16Or) { RunS1x16BinOpTest(kExprS1x16Or, Or); }
WASM_EXEC_COMPILED_TEST(S1x16Xor) { RunS1x16BinOpTest(kExprS1x16Xor, Xor); }
+#endif // !V8_TARGET_ARCH_ARM
+#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
WASM_EXEC_COMPILED_TEST(SimdI32x4ExtractWithF32x4) {
FLAG_wasm_simd_prototype = true;
WasmRunner<int32_t> r(kExecuteCompiled);
@@ -1801,7 +2121,9 @@ WASM_EXEC_COMPILED_TEST(SimdI32x4AddWithF32x4) {
WASM_I32V(1), WASM_I32V(0)));
CHECK_EQ(1, r.Call());
}
+#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
+#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_X64
WASM_EXEC_COMPILED_TEST(SimdI32x4Local) {
FLAG_wasm_simd_prototype = true;
WasmRunner<int32_t> r(kExecuteCompiled);
@@ -1858,7 +2180,9 @@ WASM_EXEC_COMPILED_TEST(SimdI32x4For) {
WASM_GET_LOCAL(0));
CHECK_EQ(1, r.Call());
}
+#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_X64
+#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
WASM_EXEC_COMPILED_TEST(SimdF32x4For) {
FLAG_wasm_simd_prototype = true;
WasmRunner<int32_t> r(kExecuteCompiled);
@@ -1883,15 +2207,40 @@ WASM_EXEC_COMPILED_TEST(SimdF32x4For) {
WASM_GET_LOCAL(0));
CHECK_EQ(1, r.Call());
}
+#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
+
+#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_X64
+
+template <typename T, int numLanes = 4>
+void SetVectorByLanes(T* v, const std::array<T, numLanes>& arr) {
+ for (int lane = 0; lane < numLanes; lane++) {
+ const T& value = arr[lane];
+#if defined(V8_TARGET_BIG_ENDIAN)
+ v[numLanes - 1 - lane] = value;
+#else
+ v[lane] = value;
+#endif
+ }
+}
+
+template <typename T>
+const T& GetScalar(T* v, int lane) {
+ constexpr int kElems = kSimd128Size / sizeof(T);
+#if defined(V8_TARGET_BIG_ENDIAN)
+ const int index = kElems - 1 - lane;
+#else
+ const int index = lane;
+#endif
+ USE(kElems);
+ DCHECK(index >= 0 && index < kElems);
+ return v[index];
+}
WASM_EXEC_COMPILED_TEST(SimdI32x4GetGlobal) {
FLAG_wasm_simd_prototype = true;
WasmRunner<int32_t, int32_t> r(kExecuteCompiled);
int32_t* global = r.module().AddGlobal<int32_t>(kWasmS128);
- *(global) = 0;
- *(global + 1) = 1;
- *(global + 2) = 2;
- *(global + 3) = 3;
+ SetVectorByLanes(global, {{0, 1, 2, 3}});
r.AllocateLocal(kWasmI32);
BUILD(
r, WASM_SET_LOCAL(1, WASM_I32V(1)),
@@ -1924,20 +2273,19 @@ WASM_EXEC_COMPILED_TEST(SimdI32x4SetGlobal) {
WASM_I32V(56))),
WASM_I32V(1));
CHECK_EQ(1, r.Call(0));
- CHECK_EQ(*global, 23);
- CHECK_EQ(*(global + 1), 34);
- CHECK_EQ(*(global + 2), 45);
- CHECK_EQ(*(global + 3), 56);
+ CHECK_EQ(GetScalar(global, 0), 23);
+ CHECK_EQ(GetScalar(global, 1), 34);
+ CHECK_EQ(GetScalar(global, 2), 45);
+ CHECK_EQ(GetScalar(global, 3), 56);
}
+#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_X64
+#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
WASM_EXEC_COMPILED_TEST(SimdF32x4GetGlobal) {
FLAG_wasm_simd_prototype = true;
WasmRunner<int32_t, int32_t> r(kExecuteCompiled);
float* global = r.module().AddGlobal<float>(kWasmS128);
- *(global) = 0.0;
- *(global + 1) = 1.5;
- *(global + 2) = 2.25;
- *(global + 3) = 3.5;
+ SetVectorByLanes<float>(global, {{0.0, 1.5, 2.25, 3.5}});
r.AllocateLocal(kWasmI32);
BUILD(
r, WASM_SET_LOCAL(1, WASM_I32V(1)),
@@ -1970,12 +2318,14 @@ WASM_EXEC_COMPILED_TEST(SimdF32x4SetGlobal) {
WASM_F32(65.0))),
WASM_I32V(1));
CHECK_EQ(1, r.Call(0));
- CHECK_EQ(*global, 13.5);
- CHECK_EQ(*(global + 1), 45.5);
- CHECK_EQ(*(global + 2), 32.25);
- CHECK_EQ(*(global + 3), 65.0);
+ CHECK_EQ(GetScalar(global, 0), 13.5f);
+ CHECK_EQ(GetScalar(global, 1), 45.5f);
+ CHECK_EQ(GetScalar(global, 2), 32.25f);
+ CHECK_EQ(GetScalar(global, 3), 65.0f);
}
+#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
+#if V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_X64
WASM_EXEC_COMPILED_TEST(SimdLoadStoreLoad) {
FLAG_wasm_simd_prototype = true;
WasmRunner<int32_t> r(kExecuteCompiled);
@@ -1993,4 +2343,4 @@ WASM_EXEC_COMPILED_TEST(SimdLoadStoreLoad) {
CHECK_EQ(expected, r.Call());
}
}
-#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET
+#endif // V8_TARGET_ARCH_ARM || SIMD_LOWERING_TARGET || V8_TARGET_ARCH_X64
diff --git a/deps/v8/test/cctest/wasm/test-run-wasm.cc b/deps/v8/test/cctest/wasm/test-run-wasm.cc
index a1eb0511ba..7596033768 100644
--- a/deps/v8/test/cctest/wasm/test-run-wasm.cc
+++ b/deps/v8/test/cctest/wasm/test-run-wasm.cc
@@ -9,11 +9,11 @@
#include "src/assembler-inl.h"
#include "src/base/platform/elapsed-timer.h"
#include "src/utils.h"
-#include "src/wasm/wasm-macro-gen.h"
#include "test/cctest/cctest.h"
#include "test/cctest/compiler/value-helper.h"
#include "test/cctest/wasm/wasm-run-utils.h"
#include "test/common/wasm/test-signatures.h"
+#include "test/common/wasm/wasm-macro-gen.h"
using namespace v8::base;
using namespace v8::internal;
@@ -1082,11 +1082,9 @@ WASM_EXEC_TEST(LoadMaxUint32Offset) {
WasmRunner<int32_t> r(execution_mode);
r.module().AddMemoryElems<int32_t>(8);
- BUILD(r, kExprI32Const, 0, // index
- static_cast<byte>(v8::internal::wasm::WasmOpcodes::LoadStoreOpcodeOf(
- MachineType::Int32(), false)), // --
- 0, // alignment
- U32V_5(0xffffffff)); // offset
+ BUILD(r, WASM_LOAD_MEM_OFFSET(MachineType::Int32(), // type
+ U32V_5(0xffffffff), // offset
+ WASM_ZERO)); // index
CHECK_TRAP32(r.Call());
}
@@ -1593,10 +1591,10 @@ WASM_EXEC_TEST(LoadMemI32_offset) {
WASM_EXEC_TEST(LoadMemI32_const_oob_misaligned) {
// TODO(eholk): Fix this test for the trap handler.
if (trap_handler::UseTrapHandler()) return;
- const int kMemSize = 12;
+ constexpr byte kMemSize = 12;
// TODO(titzer): Fix misaligned accesses on MIPS and re-enable.
- for (int offset = 0; offset < kMemSize + 5; ++offset) {
- for (int index = 0; index < kMemSize + 5; ++index) {
+ for (byte offset = 0; offset < kMemSize + 5; ++offset) {
+ for (byte index = 0; index < kMemSize + 5; ++index) {
WasmRunner<int32_t> r(execution_mode);
r.module().AddMemoryElems<byte>(kMemSize);
r.module().RandomizeMemory();
@@ -1604,7 +1602,7 @@ WASM_EXEC_TEST(LoadMemI32_const_oob_misaligned) {
BUILD(r, WASM_LOAD_MEM_OFFSET(MachineType::Int32(), offset,
WASM_I32V_2(index)));
- if ((offset + index) <= static_cast<int>((kMemSize - sizeof(int32_t)))) {
+ if (offset + index <= (kMemSize - sizeof(int32_t))) {
CHECK_EQ(r.module().raw_val_at<int32_t>(offset + index), r.Call());
} else {
CHECK_TRAP(r.Call());
@@ -1616,9 +1614,9 @@ WASM_EXEC_TEST(LoadMemI32_const_oob_misaligned) {
WASM_EXEC_TEST(LoadMemI32_const_oob) {
// TODO(eholk): Fix this test for the trap handler.
if (trap_handler::UseTrapHandler()) return;
- const int kMemSize = 24;
- for (int offset = 0; offset < kMemSize + 5; offset += 4) {
- for (int index = 0; index < kMemSize + 5; index += 4) {
+ constexpr byte kMemSize = 24;
+ for (byte offset = 0; offset < kMemSize + 5; offset += 4) {
+ for (byte index = 0; index < kMemSize + 5; index += 4) {
WasmRunner<int32_t> r(execution_mode);
r.module().AddMemoryElems<byte>(kMemSize);
r.module().RandomizeMemory();
@@ -1626,7 +1624,7 @@ WASM_EXEC_TEST(LoadMemI32_const_oob) {
BUILD(r, WASM_LOAD_MEM_OFFSET(MachineType::Int32(), offset,
WASM_I32V_2(index)));
- if ((offset + index) <= static_cast<int>((kMemSize - sizeof(int32_t)))) {
+ if (offset + index <= (kMemSize - sizeof(int32_t))) {
CHECK_EQ(r.module().raw_val_at<int32_t>(offset + index), r.Call());
} else {
CHECK_TRAP(r.Call());
@@ -2339,9 +2337,6 @@ static void Run_WasmMixedCall_N(WasmExecutionMode execution_mode, int start) {
// =========================================================================
std::vector<byte> code;
- // Load the offset for the store.
- ADD_CODE(code, WASM_ZERO);
-
// Load the arguments.
for (int i = 0; i < num_params; ++i) {
int offset = (i + 1) * kElemSize;
@@ -2351,10 +2346,13 @@ static void Run_WasmMixedCall_N(WasmExecutionMode execution_mode, int start) {
// Call the selector function.
ADD_CODE(code, WASM_CALL_FUNCTION0(t.function_index()));
+ // Store the result in a local.
+ byte local_index = r.AllocateLocal(WasmOpcodes::ValueTypeFor(result));
+ ADD_CODE(code, kExprSetLocal, local_index);
+
// Store the result in memory.
ADD_CODE(code,
- static_cast<byte>(WasmOpcodes::LoadStoreOpcodeOf(result, true)),
- ZERO_ALIGNMENT, ZERO_OFFSET);
+ WASM_STORE_MEM(result, WASM_ZERO, WASM_GET_LOCAL(local_index)));
// Return the expected value.
ADD_CODE(code, WASM_I32V_2(kExpected));
@@ -2972,3 +2970,83 @@ WASM_EXEC_TEST(Int32RemS_dead) {
CHECK_TRAP(r.Call(-1001, 0));
CHECK_TRAP(r.Call(kMin, 0));
}
+
+WASM_EXEC_TEST(BrToLoopWithValue) {
+ WasmRunner<int32_t, int32_t, int32_t> r(execution_mode);
+ // Subtracts <1> times 3 from <0> and returns the result.
+ BUILD(r,
+ // loop i32
+ kExprLoop, kLocalI32,
+ // decrement <0> by 3.
+ WASM_SET_LOCAL(0, WASM_I32_SUB(WASM_GET_LOCAL(0), WASM_I32V_1(3))),
+ // decrement <1> by 1.
+ WASM_SET_LOCAL(1, WASM_I32_SUB(WASM_GET_LOCAL(1), WASM_ONE)),
+ // load return value <0>, br_if will drop if if the branch is taken.
+ WASM_GET_LOCAL(0),
+ // continue loop if <1> is != 0.
+ WASM_BR_IF(0, WASM_GET_LOCAL(1)),
+ // end of loop, value loaded above is the return value.
+ kExprEnd);
+ CHECK_EQ(12, r.Call(27, 5));
+}
+
+WASM_EXEC_TEST(BrToLoopWithoutValue) {
+ // This was broken in the interpreter, see http://crbug.com/715454
+ WasmRunner<int32_t, int32_t> r(execution_mode);
+ BUILD(
+ r, kExprLoop, kLocalI32, // loop i32
+ WASM_SET_LOCAL(0, WASM_I32_SUB(WASM_GET_LOCAL(0), WASM_ONE)), // dec <0>
+ WASM_BR_IF(0, WASM_GET_LOCAL(0)), // br_if <0> != 0
+ kExprUnreachable, // unreachable
+ kExprEnd); // end
+ CHECK_TRAP32(r.Call(2));
+}
+
+WASM_EXEC_TEST(LoopsWithValues) {
+ WasmRunner<int32_t> r(execution_mode);
+ BUILD(r, WASM_LOOP_I(WASM_LOOP_I(WASM_ONE), WASM_ONE, kExprI32Add));
+ CHECK_EQ(2, r.Call());
+}
+
+WASM_EXEC_TEST(InvalidStackAfterUnreachable) {
+ WasmRunner<int32_t> r(execution_mode);
+ BUILD(r, kExprUnreachable, kExprI32Add);
+ CHECK_TRAP32(r.Call());
+}
+
+WASM_EXEC_TEST(InvalidStackAfterBr) {
+ WasmRunner<int32_t> r(execution_mode);
+ BUILD(r, WASM_BRV(0, WASM_I32V_1(27)), kExprI32Add);
+ CHECK_EQ(27, r.Call());
+}
+
+WASM_EXEC_TEST(InvalidStackAfterReturn) {
+ WasmRunner<int32_t> r(execution_mode);
+ BUILD(r, WASM_RETURN1(WASM_I32V_1(17)), kExprI32Add);
+ CHECK_EQ(17, r.Call());
+}
+
+WASM_EXEC_TEST(BranchOverUnreachableCode) {
+ WasmRunner<int32_t> r(execution_mode);
+ BUILD(r,
+ // Start a block which breaks in the middle (hence unreachable code
+ // afterwards) and continue execution after this block.
+ WASM_BLOCK_I(WASM_BRV(0, WASM_I32V_1(17)), kExprI32Add),
+ // Add one to the 17 returned from the block.
+ WASM_ONE, kExprI32Add);
+ CHECK_EQ(18, r.Call());
+}
+
+WASM_EXEC_TEST(BlockInsideUnreachable) {
+ WasmRunner<int32_t> r(execution_mode);
+ BUILD(r, WASM_RETURN1(WASM_I32V_1(17)), WASM_BLOCK(WASM_BR(0)));
+ CHECK_EQ(17, r.Call());
+}
+
+WASM_EXEC_TEST(IfInsideUnreachable) {
+ WasmRunner<int32_t> r(execution_mode);
+ BUILD(
+ r, WASM_RETURN1(WASM_I32V_1(17)),
+ WASM_IF_ELSE_I(WASM_ONE, WASM_BRV(0, WASM_ONE), WASM_RETURN1(WASM_ONE)));
+ CHECK_EQ(17, r.Call());
+}
diff --git a/deps/v8/test/cctest/wasm/test-wasm-breakpoints.cc b/deps/v8/test/cctest/wasm/test-wasm-breakpoints.cc
index 357f20f944..c9b9852e11 100644
--- a/deps/v8/test/cctest/wasm/test-wasm-breakpoints.cc
+++ b/deps/v8/test/cctest/wasm/test-wasm-breakpoints.cc
@@ -7,13 +7,13 @@
#include "src/frames-inl.h"
#include "src/property-descriptor.h"
#include "src/utils.h"
-#include "src/wasm/wasm-macro-gen.h"
#include "src/wasm/wasm-objects.h"
#include "test/cctest/cctest.h"
#include "test/cctest/compiler/value-helper.h"
#include "test/cctest/wasm/wasm-run-utils.h"
#include "test/common/wasm/test-signatures.h"
+#include "test/common/wasm/wasm-macro-gen.h"
using namespace v8::internal;
using namespace v8::internal::wasm;
@@ -158,6 +158,109 @@ void SetBreakpoint(WasmRunnerBase& runner, int function_index, int byte_offset,
WasmDebugInfo::SetBreakpoint(debug_info, function_index, set_byte_offset);
}
+// Wrapper with operator<<.
+struct WasmValWrapper {
+ WasmVal val;
+
+ bool operator==(const WasmValWrapper& other) const {
+ return val == other.val;
+ }
+};
+
+// Only needed in debug builds. Avoid unused warning otherwise.
+#ifdef DEBUG
+std::ostream& operator<<(std::ostream& out, const WasmValWrapper& wrapper) {
+ switch (wrapper.val.type) {
+ case kWasmI32:
+ out << "i32: " << wrapper.val.to<int32_t>();
+ break;
+ case kWasmI64:
+ out << "i64: " << wrapper.val.to<int64_t>();
+ break;
+ case kWasmF32:
+ out << "f32: " << wrapper.val.to<float>();
+ break;
+ case kWasmF64:
+ out << "f64: " << wrapper.val.to<double>();
+ break;
+ default:
+ UNIMPLEMENTED();
+ }
+ return out;
+}
+#endif
+
+class CollectValuesBreakHandler : public debug::DebugDelegate {
+ public:
+ struct BreakpointValues {
+ std::vector<WasmVal> locals;
+ std::vector<WasmVal> stack;
+ };
+
+ explicit CollectValuesBreakHandler(
+ Isolate* isolate, std::initializer_list<BreakpointValues> expected_values)
+ : isolate_(isolate), expected_values_(expected_values) {
+ v8::debug::SetDebugDelegate(reinterpret_cast<v8::Isolate*>(isolate_), this);
+ }
+ ~CollectValuesBreakHandler() {
+ v8::debug::SetDebugDelegate(reinterpret_cast<v8::Isolate*>(isolate_),
+ nullptr);
+ }
+
+ private:
+ Isolate* isolate_;
+ int count_ = 0;
+ std::vector<BreakpointValues> expected_values_;
+
+ void BreakProgramRequested(v8::Local<v8::Context> paused_context,
+ v8::Local<v8::Object> exec_state,
+ v8::Local<v8::Value> break_points_hit) override {
+ printf("Break #%d\n", count_);
+ CHECK_GT(expected_values_.size(), count_);
+ auto& expected = expected_values_[count_];
+ ++count_;
+
+ HandleScope handles(isolate_);
+
+ StackTraceFrameIterator frame_it(isolate_);
+ auto summ = FrameSummary::GetTop(frame_it.frame()).AsWasmInterpreted();
+ Handle<WasmInstanceObject> instance = summ.wasm_instance();
+
+ auto frame =
+ instance->debug_info()->GetInterpretedFrame(frame_it.frame()->fp(), 0);
+ CHECK_EQ(expected.locals.size(), frame->GetLocalCount());
+ for (int i = 0; i < frame->GetLocalCount(); ++i) {
+ CHECK_EQ(WasmValWrapper{expected.locals[i]},
+ WasmValWrapper{frame->GetLocalValue(i)});
+ }
+
+ CHECK_EQ(expected.stack.size(), frame->GetStackHeight());
+ for (int i = 0; i < frame->GetStackHeight(); ++i) {
+ CHECK_EQ(WasmValWrapper{expected.stack[i]},
+ WasmValWrapper{frame->GetStackValue(i)});
+ }
+
+ isolate_->debug()->PrepareStep(StepAction::StepIn);
+ }
+};
+
+// Special template to explicitly cast to WasmVal.
+template <typename Arg>
+WasmVal MakeWasmVal(Arg arg) {
+ return WasmVal(arg);
+}
+// Translate long to i64 (ambiguous otherwise).
+template <>
+WasmVal MakeWasmVal(long arg) { // NOLINT: allow long parameter
+ return WasmVal(static_cast<int64_t>(arg));
+}
+
+template <typename... Args>
+std::vector<WasmVal> wasmVec(Args... args) {
+ std::array<WasmVal, sizeof...(args)> arr{{MakeWasmVal(args)...}};
+ return std::vector<WasmVal>{arr.begin(), arr.end()};
+}
+
} // namespace
TEST(WasmCollectPossibleBreakpoints) {
@@ -272,3 +375,48 @@ TEST(WasmStepInAndOut) {
CHECK(!Execution::Call(isolate, main_fun_wrapper, global, 0, nullptr)
.is_null());
}
+
+TEST(WasmGetLocalsAndStack) {
+ WasmRunner<void, int> runner(kExecuteCompiled);
+ runner.AllocateLocal(ValueType::kWord64);
+ runner.AllocateLocal(ValueType::kFloat32);
+ runner.AllocateLocal(ValueType::kFloat64);
+
+ BUILD(runner,
+ // set [1] to 17
+ WASM_SET_LOCAL(1, WASM_I64V_1(17)),
+ // set [2] to <arg0> = 7
+ WASM_SET_LOCAL(2, WASM_F32_SCONVERT_I32(WASM_GET_LOCAL(0))),
+ // set [3] to <arg1>/2 = 8.5
+ WASM_SET_LOCAL(3, WASM_F64_DIV(WASM_F64_SCONVERT_I64(WASM_GET_LOCAL(1)),
+ WASM_F64(2))));
+
+ Isolate* isolate = runner.main_isolate();
+ Handle<JSFunction> main_fun_wrapper =
+ runner.module().WrapCode(runner.function_index());
+
+ // Set breakpoint at the first instruction (7 bytes for local decls: num
+ // entries + 3x<count, type>).
+ SetBreakpoint(runner, runner.function_index(), 7, 7);
+
+ CollectValuesBreakHandler break_handler(
+ isolate,
+ {
+ // params + locals stack
+ {wasmVec(7, 0L, 0.f, 0.), wasmVec()}, // 0: i64.const[17]
+ {wasmVec(7, 0L, 0.f, 0.), wasmVec(17L)}, // 1: set_local[1]
+ {wasmVec(7, 17L, 0.f, 0.), wasmVec()}, // 2: get_local[0]
+ {wasmVec(7, 17L, 0.f, 0.), wasmVec(7)}, // 3: f32.convert_s
+ {wasmVec(7, 17L, 0.f, 0.), wasmVec(7.f)}, // 4: set_local[2]
+ {wasmVec(7, 17L, 7.f, 0.), wasmVec()}, // 5: get_local[1]
+ {wasmVec(7, 17L, 7.f, 0.), wasmVec(17L)}, // 6: f64.convert_s
+ {wasmVec(7, 17L, 7.f, 0.), wasmVec(17.)}, // 7: f64.const[2]
+ {wasmVec(7, 17L, 7.f, 0.), wasmVec(17., 2.)}, // 8: f64.div
+ {wasmVec(7, 17L, 7.f, 0.), wasmVec(8.5)}, // 9: set_local[3]
+ {wasmVec(7, 17L, 7.f, 8.5), wasmVec()}, // 10: end
+ });
+
+ Handle<Object> global(isolate->context()->global_object(), isolate);
+ Handle<Object> args[]{handle(Smi::FromInt(7), isolate)};
+ CHECK(!Execution::Call(isolate, main_fun_wrapper, global, 1, args).is_null());
+}
diff --git a/deps/v8/test/cctest/wasm/test-wasm-interpreter-entry.cc b/deps/v8/test/cctest/wasm/test-wasm-interpreter-entry.cc
index 6ae806d831..d1024e62a2 100644
--- a/deps/v8/test/cctest/wasm/test-wasm-interpreter-entry.cc
+++ b/deps/v8/test/cctest/wasm/test-wasm-interpreter-entry.cc
@@ -6,11 +6,11 @@
#include "src/assembler-inl.h"
#include "src/objects-inl.h"
-#include "src/wasm/wasm-macro-gen.h"
#include "src/wasm/wasm-objects.h"
#include "test/cctest/cctest.h"
#include "test/cctest/compiler/value-helper.h"
#include "test/cctest/wasm/wasm-run-utils.h"
+#include "test/common/wasm/wasm-macro-gen.h"
using namespace v8::internal;
using namespace v8::internal::wasm;
diff --git a/deps/v8/test/cctest/wasm/test-wasm-stack.cc b/deps/v8/test/cctest/wasm/test-wasm-stack.cc
index 3dc7839667..4d64fbb67b 100644
--- a/deps/v8/test/cctest/wasm/test-wasm-stack.cc
+++ b/deps/v8/test/cctest/wasm/test-wasm-stack.cc
@@ -3,11 +3,11 @@
// found in the LICENSE file.
#include "src/assembler-inl.h"
-#include "src/wasm/wasm-macro-gen.h"
#include "test/cctest/cctest.h"
#include "test/cctest/compiler/value-helper.h"
#include "test/cctest/wasm/wasm-run-utils.h"
#include "test/common/wasm/test-signatures.h"
+#include "test/common/wasm/wasm-macro-gen.h"
using namespace v8::base;
using namespace v8::internal;
diff --git a/deps/v8/test/cctest/wasm/test-wasm-trap-position.cc b/deps/v8/test/cctest/wasm/test-wasm-trap-position.cc
index 89872c5f17..e489594ef3 100644
--- a/deps/v8/test/cctest/wasm/test-wasm-trap-position.cc
+++ b/deps/v8/test/cctest/wasm/test-wasm-trap-position.cc
@@ -4,11 +4,11 @@
#include "src/assembler-inl.h"
#include "src/trap-handler/trap-handler.h"
-#include "src/wasm/wasm-macro-gen.h"
#include "test/cctest/cctest.h"
#include "test/cctest/compiler/value-helper.h"
#include "test/cctest/wasm/wasm-run-utils.h"
#include "test/common/wasm/test-signatures.h"
+#include "test/common/wasm/wasm-macro-gen.h"
using namespace v8::base;
using namespace v8::internal;
diff --git a/deps/v8/test/cctest/wasm/wasm-run-utils.h b/deps/v8/test/cctest/wasm/wasm-run-utils.h
index d530e484a1..a97d5701a0 100644
--- a/deps/v8/test/cctest/wasm/wasm-run-utils.h
+++ b/deps/v8/test/cctest/wasm/wasm-run-utils.h
@@ -13,8 +13,7 @@
#include <memory>
#include "src/base/utils/random-number-generator.h"
-#include "src/zone/accounting-allocator.h"
-
+#include "src/code-stubs.h"
#include "src/compiler/compiler-source-position-table.h"
#include "src/compiler/graph-visualizer.h"
#include "src/compiler/int64-lowering.h"
@@ -25,10 +24,10 @@
#include "src/compiler/zone-stats.h"
#include "src/trap-handler/trap-handler.h"
#include "src/wasm/function-body-decoder.h"
+#include "src/wasm/local-decl-encoder.h"
#include "src/wasm/wasm-external-refs.h"
#include "src/wasm/wasm-interpreter.h"
#include "src/wasm/wasm-js.h"
-#include "src/wasm/wasm-macro-gen.h"
#include "src/wasm/wasm-module.h"
#include "src/wasm/wasm-objects.h"
#include "src/wasm/wasm-opcodes.h"
@@ -76,16 +75,10 @@ class TestingModule : public ModuleEnv {
public:
explicit TestingModule(Zone* zone, WasmExecutionMode mode = kExecuteCompiled)
: ModuleEnv(&module_, &instance_),
- execution_mode_(mode),
instance_(&module_),
isolate_(CcTest::InitIsolateOnce()),
global_offset(0),
- interpreter_(
- mode == kExecuteInterpreted
- ? new WasmInterpreter(
- isolate_, ModuleBytesEnv(&module_, &instance_,
- Vector<const byte>::empty()))
- : nullptr) {
+ interpreter_(nullptr) {
WasmJs::Install(isolate_);
instance->module = &module_;
instance->globals_start = global_data;
@@ -94,22 +87,10 @@ class TestingModule : public ModuleEnv {
instance->mem_size = 0;
memset(global_data, 0, sizeof(global_data));
instance_object_ = InitInstanceObject();
- }
-
- ~TestingModule() {
- if (instance->mem_start) {
- if (EnableGuardRegions() && module_.is_wasm()) {
- // See the corresponding code in AddMemory. We use a different
- // allocation path when guard regions are enabled, which means we have
- // to free it differently too.
- const size_t alloc_size =
- RoundUp(kWasmMaxHeapOffset, v8::base::OS::CommitPageSize());
- v8::base::OS::Free(instance->mem_start, alloc_size);
- } else {
- free(instance->mem_start);
- }
+ if (mode == kExecuteInterpreted) {
+ interpreter_ =
+ WasmDebugInfo::SetupForTesting(instance_object_, &instance_);
}
- if (interpreter_) delete interpreter_;
}
void ChangeOriginToAsmjs() { module_.set_origin(kAsmJsOrigin); }
@@ -118,22 +99,20 @@ class TestingModule : public ModuleEnv {
CHECK(!module_.has_memory);
CHECK_NULL(instance->mem_start);
CHECK_EQ(0, instance->mem_size);
+ DCHECK(!instance_object_->has_memory_buffer());
module_.has_memory = true;
- if (EnableGuardRegions() && module_.is_wasm()) {
- const size_t alloc_size =
- RoundUp(kWasmMaxHeapOffset, v8::base::OS::CommitPageSize());
- instance->mem_start = reinterpret_cast<byte*>(
- v8::base::OS::AllocateGuarded(alloc_size * 2));
- instance->mem_start += alloc_size;
- const size_t guard_size = RoundUp(size, v8::base::OS::CommitPageSize());
- v8::base::OS::Unprotect(instance->mem_start, guard_size);
- } else {
- instance->mem_start = reinterpret_cast<byte*>(malloc(size));
- }
+ bool enable_guard_regions = EnableGuardRegions() && module_.is_wasm();
+ uint32_t alloc_size =
+ enable_guard_regions ? RoundUp(size, OS::CommitPageSize()) : size;
+ Handle<JSArrayBuffer> new_buffer =
+ wasm::NewArrayBuffer(isolate_, alloc_size, enable_guard_regions);
+ CHECK(!new_buffer.is_null());
+ instance_object_->set_memory_buffer(*new_buffer);
+ instance->mem_start = reinterpret_cast<byte*>(new_buffer->backing_store());
CHECK(size == 0 || instance->mem_start);
memset(instance->mem_start, 0, size);
instance->mem_size = size;
- return raw_mem_start<byte>();
+ return instance->mem_start;
}
template <typename T>
@@ -289,7 +268,7 @@ class TestingModule : public ModuleEnv {
}
void PopulateIndirectFunctionTable() {
- if (execution_mode_ == kExecuteInterpreted) return;
+ if (interpret()) return;
// Initialize the fixed arrays in instance->function_tables.
for (uint32_t i = 0; i < instance->function_tables.size(); i++) {
WasmIndirectFunctionTable& table = module_.function_tables[i];
@@ -324,12 +303,11 @@ class TestingModule : public ModuleEnv {
WasmFunction* GetFunctionAt(int index) { return &module_.functions[index]; }
WasmInterpreter* interpreter() { return interpreter_; }
- WasmExecutionMode execution_mode() { return execution_mode_; }
+ bool interpret() { return interpreter_ != nullptr; }
Isolate* isolate() { return isolate_; }
Handle<WasmInstanceObject> instance_object() { return instance_object_; }
private:
- WasmExecutionMode execution_mode_;
WasmModule module_;
WasmInstance instance_;
Isolate* isolate_;
@@ -378,8 +356,9 @@ inline void TestBuildingGraph(Zone* zone, JSGraph* jsgraph, ModuleEnv* module,
FunctionSig* sig,
SourcePositionTable* source_position_table,
const byte* start, const byte* end) {
- compiler::WasmGraphBuilder builder(module, zone, jsgraph, sig,
- source_position_table);
+ compiler::WasmGraphBuilder builder(
+ module, zone, jsgraph, CEntryStub(jsgraph->isolate(), 1).GetCode(), sig,
+ source_position_table);
DecodeResult result =
BuildTFGraph(zone->allocator(), &builder, sig, start, end);
if (result.failed()) {
@@ -389,10 +368,10 @@ inline void TestBuildingGraph(Zone* zone, JSGraph* jsgraph, ModuleEnv* module,
result = BuildTFGraph(zone->allocator(), &builder, sig, start, end);
}
- uint32_t pc = result.error_offset;
+ uint32_t pc = result.error_offset();
std::ostringstream str;
str << "Verification failed; pc = +" << pc
- << ", msg = " << result.error_msg.c_str();
+ << ", msg = " << result.error_msg().c_str();
FATAL(str.str().c_str());
}
builder.Int64LoweringForTesting();
@@ -566,7 +545,6 @@ class WasmFunctionCompiler : private GraphAndBuilders {
if (interpreter_) {
// Add the code to the interpreter.
interpreter_->SetFunctionCodeForTesting(function_, start, end);
- return;
}
// Build the TurboFan graph.
@@ -714,7 +692,10 @@ class WasmRunnerBase : public HandleAndZoneScope {
uint32_t function_index() { return functions_[0]->function_index(); }
WasmFunction* function() { return functions_[0]->function_; }
- WasmInterpreter* interpreter() { return functions_[0]->interpreter_; }
+ WasmInterpreter* interpreter() {
+ DCHECK(interpret());
+ return functions_[0]->interpreter_;
+ }
bool possible_nondeterminism() { return possible_nondeterminism_; }
TestingModule& module() { return module_; }
Zone* zone() { return &zone_; }
@@ -729,6 +710,8 @@ class WasmRunnerBase : public HandleAndZoneScope {
module_.instance->context = main_isolate()->native_context();
}
+ bool interpret() { return module_.interpret(); }
+
private:
FunctionSig* CreateSig(MachineType return_type,
Vector<MachineType> param_types) {
@@ -768,8 +751,6 @@ class WasmRunnerBase : public HandleAndZoneScope {
bool compiled_ = false;
bool possible_nondeterminism_ = false;
- bool interpret() { return module_.execution_mode() == kExecuteInterpreted; }
-
public:
// This field has to be static. Otherwise, gcc complains about the use in
// the lambda context below.
diff --git a/deps/v8/test/common/wasm/wasm-macro-gen.h b/deps/v8/test/common/wasm/wasm-macro-gen.h
new file mode 100644
index 0000000000..81dc87eb66
--- /dev/null
+++ b/deps/v8/test/common/wasm/wasm-macro-gen.h
@@ -0,0 +1,587 @@
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_WASM_MACRO_GEN_H_
+#define V8_WASM_MACRO_GEN_H_
+
+#include "src/wasm/wasm-opcodes.h"
+
+#include "src/zone/zone-containers.h"
+
+#define U32_LE(v) \
+ static_cast<byte>(v), static_cast<byte>((v) >> 8), \
+ static_cast<byte>((v) >> 16), static_cast<byte>((v) >> 24)
+
+#define U16_LE(v) static_cast<byte>(v), static_cast<byte>((v) >> 8)
+
+#define WASM_MODULE_HEADER U32_LE(kWasmMagic), U32_LE(kWasmVersion)
+
+#define IMPORT_SIG_INDEX(v) U32V_1(v)
+#define FUNC_INDEX(v) U32V_1(v)
+#define TABLE_INDEX(v) U32V_1(v)
+#define NO_NAME U32V_1(0)
+#define NAME_LENGTH(v) U32V_1(v)
+#define ENTRY_COUNT(v) U32V_1(v)
+
+#define ZERO_ALIGNMENT 0
+#define ZERO_OFFSET 0
+
+#define BR_TARGET(v) U32V_1(v)
+
+#define MASK_7 ((1 << 7) - 1)
+#define MASK_14 ((1 << 14) - 1)
+#define MASK_21 ((1 << 21) - 1)
+#define MASK_28 ((1 << 28) - 1)
+
+#define U32V_1(x) static_cast<byte>((x)&MASK_7)
+#define U32V_2(x) \
+ static_cast<byte>(((x)&MASK_7) | 0x80), static_cast<byte>(((x) >> 7) & MASK_7)
+#define U32V_3(x) \
+ static_cast<byte>((((x)) & MASK_7) | 0x80), \
+ static_cast<byte>((((x) >> 7) & MASK_7) | 0x80), \
+ static_cast<byte>(((x) >> 14) & MASK_7)
+#define U32V_4(x) \
+ static_cast<byte>(((x)&MASK_7) | 0x80), \
+ static_cast<byte>((((x) >> 7) & MASK_7) | 0x80), \
+ static_cast<byte>((((x) >> 14) & MASK_7) | 0x80), \
+ static_cast<byte>(((x) >> 21) & MASK_7)
+#define U32V_5(x) \
+ static_cast<byte>(((x)&MASK_7) | 0x80), \
+ static_cast<byte>((((x) >> 7) & MASK_7) | 0x80), \
+ static_cast<byte>((((x) >> 14) & MASK_7) | 0x80), \
+ static_cast<byte>((((x) >> 21) & MASK_7) | 0x80), \
+ static_cast<byte>((((x) >> 28) & MASK_7))
+
+// Convenience macros for building Wasm bytecode directly into a byte array.
+
+//------------------------------------------------------------------------------
+// Control.
+//------------------------------------------------------------------------------
+#define WASM_NOP kExprNop
+#define WASM_END kExprEnd
+
+#define ARITY_0 0
+#define ARITY_1 1
+#define ARITY_2 2
+#define DEPTH_0 0
+#define DEPTH_1 1
+#define DEPTH_2 2
+#define ARITY_2 2
+
+#define WASM_BLOCK(...) kExprBlock, kLocalVoid, __VA_ARGS__, kExprEnd
+
+#define WASM_BLOCK_T(t, ...) \
+ kExprBlock, static_cast<byte>(WasmOpcodes::ValueTypeCodeFor(t)), \
+ __VA_ARGS__, kExprEnd
+
+#define WASM_BLOCK_TT(t1, t2, ...) \
+ kExprBlock, kMultivalBlock, 0, \
+ static_cast<byte>(WasmOpcodes::ValueTypeCodeFor(t1)), \
+ static_cast<byte>(WasmOpcodes::ValueTypeCodeFor(t2)), __VA_ARGS__, \
+ kExprEnd
+
+#define WASM_BLOCK_I(...) kExprBlock, kLocalI32, __VA_ARGS__, kExprEnd
+#define WASM_BLOCK_L(...) kExprBlock, kLocalI64, __VA_ARGS__, kExprEnd
+#define WASM_BLOCK_F(...) kExprBlock, kLocalF32, __VA_ARGS__, kExprEnd
+#define WASM_BLOCK_D(...) kExprBlock, kLocalF64, __VA_ARGS__, kExprEnd
+
+#define WASM_INFINITE_LOOP kExprLoop, kLocalVoid, kExprBr, DEPTH_0, kExprEnd
+
+#define WASM_LOOP(...) kExprLoop, kLocalVoid, __VA_ARGS__, kExprEnd
+#define WASM_LOOP_I(...) kExprLoop, kLocalI32, __VA_ARGS__, kExprEnd
+#define WASM_LOOP_L(...) kExprLoop, kLocalI64, __VA_ARGS__, kExprEnd
+#define WASM_LOOP_F(...) kExprLoop, kLocalF32, __VA_ARGS__, kExprEnd
+#define WASM_LOOP_D(...) kExprLoop, kLocalF64, __VA_ARGS__, kExprEnd
+
+#define WASM_IF(cond, tstmt) cond, kExprIf, kLocalVoid, tstmt, kExprEnd
+
+#define WASM_IF_ELSE(cond, tstmt, fstmt) \
+ cond, kExprIf, kLocalVoid, tstmt, kExprElse, fstmt, kExprEnd
+
+#define WASM_IF_ELSE_T(t, cond, tstmt, fstmt) \
+ cond, kExprIf, static_cast<byte>(WasmOpcodes::ValueTypeCodeFor(t)), tstmt, \
+ kExprElse, fstmt, kExprEnd
+
+#define WASM_IF_ELSE_TT(t1, t2, cond, tstmt, fstmt) \
+ cond, kExprIf, kMultivalBlock, 0, \
+ static_cast<byte>(WasmOpcodes::ValueTypeCodeFor(t1)), \
+ static_cast<byte>(WasmOpcodes::ValueTypeCodeFor(t2)), tstmt, kExprElse, \
+ fstmt, kExprEnd
+
+#define WASM_IF_ELSE_I(cond, tstmt, fstmt) \
+ cond, kExprIf, kLocalI32, tstmt, kExprElse, fstmt, kExprEnd
+#define WASM_IF_ELSE_L(cond, tstmt, fstmt) \
+ cond, kExprIf, kLocalI64, tstmt, kExprElse, fstmt, kExprEnd
+#define WASM_IF_ELSE_F(cond, tstmt, fstmt) \
+ cond, kExprIf, kLocalF32, tstmt, kExprElse, fstmt, kExprEnd
+#define WASM_IF_ELSE_D(cond, tstmt, fstmt) \
+ cond, kExprIf, kLocalF64, tstmt, kExprElse, fstmt, kExprEnd
+
+#define WASM_SELECT(tval, fval, cond) tval, fval, cond, kExprSelect
+
+#define WASM_RETURN0 kExprReturn
+#define WASM_RETURN1(val) val, kExprReturn
+#define WASM_RETURNN(count, ...) __VA_ARGS__, kExprReturn
+
+#define WASM_BR(depth) kExprBr, static_cast<byte>(depth)
+#define WASM_BR_IF(depth, cond) cond, kExprBrIf, static_cast<byte>(depth)
+#define WASM_BR_IFD(depth, val, cond) \
+ val, cond, kExprBrIf, static_cast<byte>(depth), kExprDrop
+#define WASM_CONTINUE(depth) kExprBr, static_cast<byte>(depth)
+#define WASM_UNREACHABLE kExprUnreachable
+
+#define WASM_BR_TABLE(key, count, ...) \
+ key, kExprBrTable, U32V_1(count), __VA_ARGS__
+
+#define WASM_CASE(x) static_cast<byte>(x), static_cast<byte>(x >> 8)
+#define WASM_CASE_BR(x) static_cast<byte>(x), static_cast<byte>(0x80 | (x) >> 8)
+
+//------------------------------------------------------------------------------
+// Misc expressions.
+//------------------------------------------------------------------------------
+#define WASM_ID(...) __VA_ARGS__
+#define WASM_ZERO kExprI32Const, 0
+#define WASM_ONE kExprI32Const, 1
+
+#define I32V_MIN(length) -(1 << (6 + (7 * ((length)-1))))
+#define I32V_MAX(length) ((1 << (6 + (7 * ((length)-1)))) - 1)
+#define I64V_MIN(length) -(1LL << (6 + (7 * ((length)-1))))
+#define I64V_MAX(length) ((1LL << (6 + 7 * ((length)-1))) - 1)
+
+#define I32V_IN_RANGE(value, length) \
+ ((value) >= I32V_MIN(length) && (value) <= I32V_MAX(length))
+#define I64V_IN_RANGE(value, length) \
+ ((value) >= I64V_MIN(length) && (value) <= I64V_MAX(length))
+
+#define WASM_NO_LOCALS 0
+
+namespace v8 {
+namespace internal {
+namespace wasm {
+
+inline void CheckI32v(int32_t value, int length) {
+ DCHECK(length >= 1 && length <= 5);
+ DCHECK(length == 5 || I32V_IN_RANGE(value, length));
+}
+
+inline void CheckI64v(int64_t value, int length) {
+ DCHECK(length >= 1 && length <= 10);
+ DCHECK(length == 10 || I64V_IN_RANGE(value, length));
+}
+
+inline WasmOpcode LoadStoreOpcodeOf(MachineType type, bool store) {
+ switch (type.representation()) {
+ case MachineRepresentation::kWord8:
+ return store ? kExprI32StoreMem8
+ : type.IsSigned() ? kExprI32LoadMem8S : kExprI32LoadMem8U;
+ case MachineRepresentation::kWord16:
+ return store ? kExprI32StoreMem16
+ : type.IsSigned() ? kExprI32LoadMem16S : kExprI32LoadMem16U;
+ case MachineRepresentation::kWord32:
+ return store ? kExprI32StoreMem : kExprI32LoadMem;
+ case MachineRepresentation::kWord64:
+ return store ? kExprI64StoreMem : kExprI64LoadMem;
+ case MachineRepresentation::kFloat32:
+ return store ? kExprF32StoreMem : kExprF32LoadMem;
+ case MachineRepresentation::kFloat64:
+ return store ? kExprF64StoreMem : kExprF64LoadMem;
+ case MachineRepresentation::kSimd128:
+ return store ? kExprS128StoreMem : kExprS128LoadMem;
+ default:
+ UNREACHABLE();
+ return kExprNop;
+ }
+}
+
+} // namespace wasm
+} // namespace internal
+} // namespace v8
+
+//------------------------------------------------------------------------------
+// Int32 Const operations
+//------------------------------------------------------------------------------
+#define WASM_I32V(val) kExprI32Const, U32V_5(val)
+
+#define WASM_I32V_1(val) \
+ static_cast<byte>(CheckI32v((val), 1), kExprI32Const), U32V_1(val)
+#define WASM_I32V_2(val) \
+ static_cast<byte>(CheckI32v((val), 2), kExprI32Const), U32V_2(val)
+#define WASM_I32V_3(val) \
+ static_cast<byte>(CheckI32v((val), 3), kExprI32Const), U32V_3(val)
+#define WASM_I32V_4(val) \
+ static_cast<byte>(CheckI32v((val), 4), kExprI32Const), U32V_4(val)
+#define WASM_I32V_5(val) \
+ static_cast<byte>(CheckI32v((val), 5), kExprI32Const), U32V_5(val)
+
+//------------------------------------------------------------------------------
+// Int64 Const operations
+//------------------------------------------------------------------------------
+#define WASM_I64V(val) \
+ kExprI64Const, \
+ static_cast<byte>((static_cast<int64_t>(val) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 7) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 14) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 21) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 28) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 35) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 42) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 49) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 56) & MASK_7) | 0x80), \
+ static_cast<byte>((static_cast<int64_t>(val) >> 63) & MASK_7)
+
+#define WASM_I64V_1(val) \
+ static_cast<byte>(CheckI64v(static_cast<int64_t>(val), 1), kExprI64Const), \
+ static_cast<byte>(static_cast<int64_t>(val) & MASK_7)
+#define WASM_I64V_2(val) \
+ static_cast<byte>(CheckI64v(static_cast<int64_t>(val), 2), kExprI64Const), \
+ static_cast<byte>((static_cast<int64_t>(val) & MASK_7) | 0x80), \
+ static_cast<byte>((static_cast<int64_t>(val) >> 7) & MASK_7)
+#define WASM_I64V_3(val) \
+ static_cast<byte>(CheckI64v(static_cast<int64_t>(val), 3), kExprI64Const), \
+ static_cast<byte>((static_cast<int64_t>(val) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 7) & MASK_7) | 0x80), \
+ static_cast<byte>((static_cast<int64_t>(val) >> 14) & MASK_7)
+#define WASM_I64V_4(val) \
+ static_cast<byte>(CheckI64v(static_cast<int64_t>(val), 4), kExprI64Const), \
+ static_cast<byte>((static_cast<int64_t>(val) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 7) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 14) & MASK_7) | 0x80), \
+ static_cast<byte>((static_cast<int64_t>(val) >> 21) & MASK_7)
+#define WASM_I64V_5(val) \
+ static_cast<byte>(CheckI64v(static_cast<int64_t>(val), 5), kExprI64Const), \
+ static_cast<byte>((static_cast<int64_t>(val) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 7) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 14) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 21) & MASK_7) | 0x80), \
+ static_cast<byte>((static_cast<int64_t>(val) >> 28) & MASK_7)
+#define WASM_I64V_6(val) \
+ static_cast<byte>(CheckI64v(static_cast<int64_t>(val), 6), kExprI64Const), \
+ static_cast<byte>((static_cast<int64_t>(val) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 7) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 14) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 21) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 28) & MASK_7) | 0x80), \
+ static_cast<byte>((static_cast<int64_t>(val) >> 35) & MASK_7)
+#define WASM_I64V_7(val) \
+ static_cast<byte>(CheckI64v(static_cast<int64_t>(val), 7), kExprI64Const), \
+ static_cast<byte>((static_cast<int64_t>(val) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 7) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 14) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 21) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 28) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 35) & MASK_7) | 0x80), \
+ static_cast<byte>((static_cast<int64_t>(val) >> 42) & MASK_7)
+#define WASM_I64V_8(val) \
+ static_cast<byte>(CheckI64v(static_cast<int64_t>(val), 8), kExprI64Const), \
+ static_cast<byte>((static_cast<int64_t>(val) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 7) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 14) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 21) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 28) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 35) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 42) & MASK_7) | 0x80), \
+ static_cast<byte>((static_cast<int64_t>(val) >> 49) & MASK_7)
+#define WASM_I64V_9(val) \
+ static_cast<byte>(CheckI64v(static_cast<int64_t>(val), 9), kExprI64Const), \
+ static_cast<byte>((static_cast<int64_t>(val) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 7) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 14) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 21) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 28) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 35) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 42) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 49) & MASK_7) | 0x80), \
+ static_cast<byte>((static_cast<int64_t>(val) >> 56) & MASK_7)
+#define WASM_I64V_10(val) \
+ static_cast<byte>(CheckI64v(static_cast<int64_t>(val), 10), kExprI64Const), \
+ static_cast<byte>((static_cast<int64_t>(val) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 7) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 14) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 21) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 28) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 35) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 42) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 49) & MASK_7) | 0x80), \
+ static_cast<byte>(((static_cast<int64_t>(val) >> 56) & MASK_7) | 0x80), \
+ static_cast<byte>((static_cast<int64_t>(val) >> 63) & MASK_7)
+
+#define WASM_F32(val) \
+ kExprF32Const, \
+ static_cast<byte>(bit_cast<int32_t>(static_cast<float>(val))), \
+ static_cast<byte>(bit_cast<uint32_t>(static_cast<float>(val)) >> 8), \
+ static_cast<byte>(bit_cast<uint32_t>(static_cast<float>(val)) >> 16), \
+ static_cast<byte>(bit_cast<uint32_t>(static_cast<float>(val)) >> 24)
+#define WASM_F64(val) \
+ kExprF64Const, \
+ static_cast<byte>(bit_cast<uint64_t>(static_cast<double>(val))), \
+ static_cast<byte>(bit_cast<uint64_t>(static_cast<double>(val)) >> 8), \
+ static_cast<byte>(bit_cast<uint64_t>(static_cast<double>(val)) >> 16), \
+ static_cast<byte>(bit_cast<uint64_t>(static_cast<double>(val)) >> 24), \
+ static_cast<byte>(bit_cast<uint64_t>(static_cast<double>(val)) >> 32), \
+ static_cast<byte>(bit_cast<uint64_t>(static_cast<double>(val)) >> 40), \
+ static_cast<byte>(bit_cast<uint64_t>(static_cast<double>(val)) >> 48), \
+ static_cast<byte>(bit_cast<uint64_t>(static_cast<double>(val)) >> 56)
+#define WASM_GET_LOCAL(index) kExprGetLocal, static_cast<byte>(index)
+#define WASM_SET_LOCAL(index, val) val, kExprSetLocal, static_cast<byte>(index)
+#define WASM_TEE_LOCAL(index, val) val, kExprTeeLocal, static_cast<byte>(index)
+#define WASM_DROP kExprDrop
+#define WASM_GET_GLOBAL(index) kExprGetGlobal, static_cast<byte>(index)
+#define WASM_SET_GLOBAL(index, val) \
+ val, kExprSetGlobal, static_cast<byte>(index)
+#define WASM_LOAD_MEM(type, index) \
+ index, \
+ static_cast<byte>(v8::internal::wasm::LoadStoreOpcodeOf(type, false)), \
+ ZERO_ALIGNMENT, ZERO_OFFSET
+#define WASM_STORE_MEM(type, index, val) \
+ index, val, \
+ static_cast<byte>(v8::internal::wasm::LoadStoreOpcodeOf(type, true)), \
+ ZERO_ALIGNMENT, ZERO_OFFSET
+#define WASM_LOAD_MEM_OFFSET(type, offset, index) \
+ index, \
+ static_cast<byte>(v8::internal::wasm::LoadStoreOpcodeOf(type, false)), \
+ ZERO_ALIGNMENT, offset
+#define WASM_STORE_MEM_OFFSET(type, offset, index, val) \
+ index, val, \
+ static_cast<byte>(v8::internal::wasm::LoadStoreOpcodeOf(type, true)), \
+ ZERO_ALIGNMENT, offset
+#define WASM_LOAD_MEM_ALIGNMENT(type, index, alignment) \
+ index, \
+ static_cast<byte>(v8::internal::wasm::LoadStoreOpcodeOf(type, false)), \
+ alignment, ZERO_OFFSET
+#define WASM_STORE_MEM_ALIGNMENT(type, index, alignment, val) \
+ index, val, \
+ static_cast<byte>(v8::internal::wasm::LoadStoreOpcodeOf(type, true)), \
+ alignment, ZERO_OFFSET
+
+#define WASM_CALL_FUNCTION0(index) kExprCallFunction, static_cast<byte>(index)
+#define WASM_CALL_FUNCTION(index, ...) \
+ __VA_ARGS__, kExprCallFunction, static_cast<byte>(index)
+
+#define TABLE_ZERO 0
+
+// TODO(titzer): change usages of these macros to put func last.
+#define WASM_CALL_INDIRECT0(index, func) \
+ func, kExprCallIndirect, static_cast<byte>(index), TABLE_ZERO
+#define WASM_CALL_INDIRECT1(index, func, a) \
+ a, func, kExprCallIndirect, static_cast<byte>(index), TABLE_ZERO
+#define WASM_CALL_INDIRECT2(index, func, a, b) \
+ a, b, func, kExprCallIndirect, static_cast<byte>(index), TABLE_ZERO
+#define WASM_CALL_INDIRECT3(index, func, a, b, c) \
+ a, b, c, func, kExprCallIndirect, static_cast<byte>(index), TABLE_ZERO
+#define WASM_CALL_INDIRECT4(index, func, a, b, c, d) \
+ a, b, c, d, func, kExprCallIndirect, static_cast<byte>(index), TABLE_ZERO
+#define WASM_CALL_INDIRECT5(index, func, a, b, c, d, e) \
+ a, b, c, d, e, func, kExprCallIndirect, static_cast<byte>(index), TABLE_ZERO
+#define WASM_CALL_INDIRECTN(arity, index, func, ...) \
+ __VA_ARGS__, func, kExprCallIndirect, static_cast<byte>(index), TABLE_ZERO
+
+#define WASM_NOT(x) x, kExprI32Eqz
+#define WASM_SEQ(...) __VA_ARGS__
+
+//------------------------------------------------------------------------------
+// Constructs that are composed of multiple bytecodes.
+//------------------------------------------------------------------------------
+#define WASM_WHILE(x, y) \
+ kExprLoop, kLocalVoid, x, kExprIf, kLocalVoid, y, kExprBr, DEPTH_1, \
+ kExprEnd, kExprEnd
+#define WASM_INC_LOCAL(index) \
+ kExprGetLocal, static_cast<byte>(index), kExprI32Const, 1, kExprI32Add, \
+ kExprTeeLocal, static_cast<byte>(index)
+#define WASM_INC_LOCAL_BYV(index, count) \
+ kExprGetLocal, static_cast<byte>(index), kExprI32Const, \
+ static_cast<byte>(count), kExprI32Add, kExprTeeLocal, \
+ static_cast<byte>(index)
+#define WASM_INC_LOCAL_BY(index, count) \
+ kExprGetLocal, static_cast<byte>(index), kExprI32Const, \
+ static_cast<byte>(count), kExprI32Add, kExprSetLocal, \
+ static_cast<byte>(index)
+#define WASM_UNOP(opcode, x) x, static_cast<byte>(opcode)
+#define WASM_BINOP(opcode, x, y) x, y, static_cast<byte>(opcode)
+
+//------------------------------------------------------------------------------
+// Int32 operations
+//------------------------------------------------------------------------------
+#define WASM_I32_ADD(x, y) x, y, kExprI32Add
+#define WASM_I32_SUB(x, y) x, y, kExprI32Sub
+#define WASM_I32_MUL(x, y) x, y, kExprI32Mul
+#define WASM_I32_DIVS(x, y) x, y, kExprI32DivS
+#define WASM_I32_DIVU(x, y) x, y, kExprI32DivU
+#define WASM_I32_REMS(x, y) x, y, kExprI32RemS
+#define WASM_I32_REMU(x, y) x, y, kExprI32RemU
+#define WASM_I32_AND(x, y) x, y, kExprI32And
+#define WASM_I32_IOR(x, y) x, y, kExprI32Ior
+#define WASM_I32_XOR(x, y) x, y, kExprI32Xor
+#define WASM_I32_SHL(x, y) x, y, kExprI32Shl
+#define WASM_I32_SHR(x, y) x, y, kExprI32ShrU
+#define WASM_I32_SAR(x, y) x, y, kExprI32ShrS
+#define WASM_I32_ROR(x, y) x, y, kExprI32Ror
+#define WASM_I32_ROL(x, y) x, y, kExprI32Rol
+#define WASM_I32_EQ(x, y) x, y, kExprI32Eq
+#define WASM_I32_NE(x, y) x, y, kExprI32Ne
+#define WASM_I32_LTS(x, y) x, y, kExprI32LtS
+#define WASM_I32_LES(x, y) x, y, kExprI32LeS
+#define WASM_I32_LTU(x, y) x, y, kExprI32LtU
+#define WASM_I32_LEU(x, y) x, y, kExprI32LeU
+#define WASM_I32_GTS(x, y) x, y, kExprI32GtS
+#define WASM_I32_GES(x, y) x, y, kExprI32GeS
+#define WASM_I32_GTU(x, y) x, y, kExprI32GtU
+#define WASM_I32_GEU(x, y) x, y, kExprI32GeU
+#define WASM_I32_CLZ(x) x, kExprI32Clz
+#define WASM_I32_CTZ(x) x, kExprI32Ctz
+#define WASM_I32_POPCNT(x) x, kExprI32Popcnt
+#define WASM_I32_EQZ(x) x, kExprI32Eqz
+
+//------------------------------------------------------------------------------
+// Asmjs Int32 operations
+//------------------------------------------------------------------------------
+#define WASM_I32_ASMJS_DIVS(x, y) x, y, kExprI32AsmjsDivS
+#define WASM_I32_ASMJS_REMS(x, y) x, y, kExprI32AsmjsRemS
+#define WASM_I32_ASMJS_DIVU(x, y) x, y, kExprI32AsmjsDivU
+#define WASM_I32_ASMJS_REMU(x, y) x, y, kExprI32AsmjsRemU
+
+//------------------------------------------------------------------------------
+// Int64 operations
+//------------------------------------------------------------------------------
+#define WASM_I64_ADD(x, y) x, y, kExprI64Add
+#define WASM_I64_SUB(x, y) x, y, kExprI64Sub
+#define WASM_I64_MUL(x, y) x, y, kExprI64Mul
+#define WASM_I64_DIVS(x, y) x, y, kExprI64DivS
+#define WASM_I64_DIVU(x, y) x, y, kExprI64DivU
+#define WASM_I64_REMS(x, y) x, y, kExprI64RemS
+#define WASM_I64_REMU(x, y) x, y, kExprI64RemU
+#define WASM_I64_AND(x, y) x, y, kExprI64And
+#define WASM_I64_IOR(x, y) x, y, kExprI64Ior
+#define WASM_I64_XOR(x, y) x, y, kExprI64Xor
+#define WASM_I64_SHL(x, y) x, y, kExprI64Shl
+#define WASM_I64_SHR(x, y) x, y, kExprI64ShrU
+#define WASM_I64_SAR(x, y) x, y, kExprI64ShrS
+#define WASM_I64_ROR(x, y) x, y, kExprI64Ror
+#define WASM_I64_ROL(x, y) x, y, kExprI64Rol
+#define WASM_I64_EQ(x, y) x, y, kExprI64Eq
+#define WASM_I64_NE(x, y) x, y, kExprI64Ne
+#define WASM_I64_LTS(x, y) x, y, kExprI64LtS
+#define WASM_I64_LES(x, y) x, y, kExprI64LeS
+#define WASM_I64_LTU(x, y) x, y, kExprI64LtU
+#define WASM_I64_LEU(x, y) x, y, kExprI64LeU
+#define WASM_I64_GTS(x, y) x, y, kExprI64GtS
+#define WASM_I64_GES(x, y) x, y, kExprI64GeS
+#define WASM_I64_GTU(x, y) x, y, kExprI64GtU
+#define WASM_I64_GEU(x, y) x, y, kExprI64GeU
+#define WASM_I64_CLZ(x) x, kExprI64Clz
+#define WASM_I64_CTZ(x) x, kExprI64Ctz
+#define WASM_I64_POPCNT(x) x, kExprI64Popcnt
+#define WASM_I64_EQZ(x) x, kExprI64Eqz
+
+//------------------------------------------------------------------------------
+// Float32 operations
+//------------------------------------------------------------------------------
+#define WASM_F32_ADD(x, y) x, y, kExprF32Add
+#define WASM_F32_SUB(x, y) x, y, kExprF32Sub
+#define WASM_F32_MUL(x, y) x, y, kExprF32Mul
+#define WASM_F32_DIV(x, y) x, y, kExprF32Div
+#define WASM_F32_MIN(x, y) x, y, kExprF32Min
+#define WASM_F32_MAX(x, y) x, y, kExprF32Max
+#define WASM_F32_ABS(x) x, kExprF32Abs
+#define WASM_F32_NEG(x) x, kExprF32Neg
+#define WASM_F32_COPYSIGN(x, y) x, y, kExprF32CopySign
+#define WASM_F32_CEIL(x) x, kExprF32Ceil
+#define WASM_F32_FLOOR(x) x, kExprF32Floor
+#define WASM_F32_TRUNC(x) x, kExprF32Trunc
+#define WASM_F32_NEARESTINT(x) x, kExprF32NearestInt
+#define WASM_F32_SQRT(x) x, kExprF32Sqrt
+#define WASM_F32_EQ(x, y) x, y, kExprF32Eq
+#define WASM_F32_NE(x, y) x, y, kExprF32Ne
+#define WASM_F32_LT(x, y) x, y, kExprF32Lt
+#define WASM_F32_LE(x, y) x, y, kExprF32Le
+#define WASM_F32_GT(x, y) x, y, kExprF32Gt
+#define WASM_F32_GE(x, y) x, y, kExprF32Ge
+
+//------------------------------------------------------------------------------
+// Float64 operations
+//------------------------------------------------------------------------------
+#define WASM_F64_ADD(x, y) x, y, kExprF64Add
+#define WASM_F64_SUB(x, y) x, y, kExprF64Sub
+#define WASM_F64_MUL(x, y) x, y, kExprF64Mul
+#define WASM_F64_DIV(x, y) x, y, kExprF64Div
+#define WASM_F64_MIN(x, y) x, y, kExprF64Min
+#define WASM_F64_MAX(x, y) x, y, kExprF64Max
+#define WASM_F64_ABS(x) x, kExprF64Abs
+#define WASM_F64_NEG(x) x, kExprF64Neg
+#define WASM_F64_COPYSIGN(x, y) x, y, kExprF64CopySign
+#define WASM_F64_CEIL(x) x, kExprF64Ceil
+#define WASM_F64_FLOOR(x) x, kExprF64Floor
+#define WASM_F64_TRUNC(x) x, kExprF64Trunc
+#define WASM_F64_NEARESTINT(x) x, kExprF64NearestInt
+#define WASM_F64_SQRT(x) x, kExprF64Sqrt
+#define WASM_F64_EQ(x, y) x, y, kExprF64Eq
+#define WASM_F64_NE(x, y) x, y, kExprF64Ne
+#define WASM_F64_LT(x, y) x, y, kExprF64Lt
+#define WASM_F64_LE(x, y) x, y, kExprF64Le
+#define WASM_F64_GT(x, y) x, y, kExprF64Gt
+#define WASM_F64_GE(x, y) x, y, kExprF64Ge
+
+//------------------------------------------------------------------------------
+// Type conversions.
+//------------------------------------------------------------------------------
+#define WASM_I32_SCONVERT_F32(x) x, kExprI32SConvertF32
+#define WASM_I32_SCONVERT_F64(x) x, kExprI32SConvertF64
+#define WASM_I32_UCONVERT_F32(x) x, kExprI32UConvertF32
+#define WASM_I32_UCONVERT_F64(x) x, kExprI32UConvertF64
+#define WASM_I32_CONVERT_I64(x) x, kExprI32ConvertI64
+#define WASM_I64_SCONVERT_F32(x) x, kExprI64SConvertF32
+#define WASM_I64_SCONVERT_F64(x) x, kExprI64SConvertF64
+#define WASM_I64_UCONVERT_F32(x) x, kExprI64UConvertF32
+#define WASM_I64_UCONVERT_F64(x) x, kExprI64UConvertF64
+#define WASM_I64_SCONVERT_I32(x) x, kExprI64SConvertI32
+#define WASM_I64_UCONVERT_I32(x) x, kExprI64UConvertI32
+#define WASM_F32_SCONVERT_I32(x) x, kExprF32SConvertI32
+#define WASM_F32_UCONVERT_I32(x) x, kExprF32UConvertI32
+#define WASM_F32_SCONVERT_I64(x) x, kExprF32SConvertI64
+#define WASM_F32_UCONVERT_I64(x) x, kExprF32UConvertI64
+#define WASM_F32_CONVERT_F64(x) x, kExprF32ConvertF64
+#define WASM_F32_REINTERPRET_I32(x) x, kExprF32ReinterpretI32
+#define WASM_F64_SCONVERT_I32(x) x, kExprF64SConvertI32
+#define WASM_F64_UCONVERT_I32(x) x, kExprF64UConvertI32
+#define WASM_F64_SCONVERT_I64(x) x, kExprF64SConvertI64
+#define WASM_F64_UCONVERT_I64(x) x, kExprF64UConvertI64
+#define WASM_F64_CONVERT_F32(x) x, kExprF64ConvertF32
+#define WASM_F64_REINTERPRET_I64(x) x, kExprF64ReinterpretI64
+#define WASM_I32_REINTERPRET_F32(x) x, kExprI32ReinterpretF32
+#define WASM_I64_REINTERPRET_F64(x) x, kExprI64ReinterpretF64
+
+//------------------------------------------------------------------------------
+// Memory Operations.
+//------------------------------------------------------------------------------
+#define WASM_GROW_MEMORY(x) x, kExprGrowMemory, 0
+#define WASM_MEMORY_SIZE kExprMemorySize, 0
+
+#define SIG_ENTRY_v_v kWasmFunctionTypeForm, 0, 0
+#define SIZEOF_SIG_ENTRY_v_v 3
+
+#define SIG_ENTRY_v_x(a) kWasmFunctionTypeForm, 1, a, 0
+#define SIG_ENTRY_v_xx(a, b) kWasmFunctionTypeForm, 2, a, b, 0
+#define SIG_ENTRY_v_xxx(a, b, c) kWasmFunctionTypeForm, 3, a, b, c, 0
+#define SIZEOF_SIG_ENTRY_v_x 4
+#define SIZEOF_SIG_ENTRY_v_xx 5
+#define SIZEOF_SIG_ENTRY_v_xxx 6
+
+#define SIG_ENTRY_x(r) kWasmFunctionTypeForm, 0, 1, r
+#define SIG_ENTRY_x_x(r, a) kWasmFunctionTypeForm, 1, a, 1, r
+#define SIG_ENTRY_x_xx(r, a, b) kWasmFunctionTypeForm, 2, a, b, 1, r
+#define SIG_ENTRY_x_xxx(r, a, b, c) kWasmFunctionTypeForm, 3, a, b, c, 1, r
+#define SIZEOF_SIG_ENTRY_x 4
+#define SIZEOF_SIG_ENTRY_x_x 5
+#define SIZEOF_SIG_ENTRY_x_xx 6
+#define SIZEOF_SIG_ENTRY_x_xxx 7
+
+#define WASM_BRV(depth, val) val, kExprBr, static_cast<byte>(depth)
+#define WASM_BRV_IF(depth, val, cond) \
+ val, cond, kExprBrIf, static_cast<byte>(depth)
+#define WASM_BRV_IFD(depth, val, cond) \
+ val, cond, kExprBrIf, static_cast<byte>(depth), kExprDrop
+#define WASM_IFB(cond, ...) cond, kExprIf, kLocalVoid, __VA_ARGS__, kExprEnd
+#define WASM_BR_TABLEV(val, key, count, ...) \
+ val, key, kExprBrTable, U32V_1(count), __VA_ARGS__
+
+#endif // V8_WASM_MACRO_GEN_H_
diff --git a/deps/v8/test/common/wasm/wasm-module-runner.cc b/deps/v8/test/common/wasm/wasm-module-runner.cc
index 6b53cdbf0c..fb2066a4bf 100644
--- a/deps/v8/test/common/wasm/wasm-module-runner.cc
+++ b/deps/v8/test/common/wasm/wasm-module-runner.cc
@@ -25,7 +25,7 @@ uint32_t GetMinModuleMemSize(const WasmModule* module) {
return WasmModule::kPageSize * module->min_mem_pages;
}
-const WasmModule* DecodeWasmModuleForTesting(
+std::unique_ptr<WasmModule> DecodeWasmModuleForTesting(
Isolate* isolate, ErrorThrower* thrower, const byte* module_start,
const byte* module_end, ModuleOrigin origin, bool verify_functions) {
// Decode the module, but don't verify function bodies, since we'll
@@ -36,14 +36,10 @@ const WasmModule* DecodeWasmModuleForTesting(
if (decoding_result.failed()) {
// Module verification failed. throw.
thrower->CompileError("WASM.compileRun() failed: %s",
- decoding_result.error_msg.c_str());
+ decoding_result.error_msg().c_str());
}
- if (thrower->error()) {
- if (decoding_result.val) delete decoding_result.val;
- return nullptr;
- }
- return decoding_result.val;
+ return std::move(decoding_result.val);
}
const Handle<WasmInstanceObject> InstantiateModuleForTesting(
@@ -78,8 +74,8 @@ const Handle<WasmInstanceObject> InstantiateModuleForTesting(
const Handle<WasmInstanceObject> CompileInstantiateWasmModuleForTesting(
Isolate* isolate, ErrorThrower* thrower, const byte* module_start,
const byte* module_end, ModuleOrigin origin) {
- std::unique_ptr<const WasmModule> module(DecodeWasmModuleForTesting(
- isolate, thrower, module_start, module_end, origin));
+ std::unique_ptr<WasmModule> module = DecodeWasmModuleForTesting(
+ isolate, thrower, module_start, module_end, origin);
if (module == nullptr) {
thrower->CompileError("Wasm module decoding failed");
diff --git a/deps/v8/test/common/wasm/wasm-module-runner.h b/deps/v8/test/common/wasm/wasm-module-runner.h
index 4d58513c14..b3d9b8f908 100644
--- a/deps/v8/test/common/wasm/wasm-module-runner.h
+++ b/deps/v8/test/common/wasm/wasm-module-runner.h
@@ -23,7 +23,7 @@ namespace wasm {
namespace testing {
// Decodes the given encoded module.
-const WasmModule* DecodeWasmModuleForTesting(
+std::unique_ptr<WasmModule> DecodeWasmModuleForTesting(
Isolate* isolate, ErrorThrower* thrower, const byte* module_start,
const byte* module_end, ModuleOrigin origin, bool verify_functions = false);
diff --git a/deps/v8/test/debugger/debug/debug-compile-optimized.js b/deps/v8/test/debugger/debug/debug-compile-optimized.js
index a9d5d6add4..c25bdfd4c0 100644
--- a/deps/v8/test/debugger/debug/debug-compile-optimized.js
+++ b/deps/v8/test/debugger/debug/debug-compile-optimized.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --crankshaft
+// Flags: --opt
Debug = debug.Debug;
diff --git a/deps/v8/test/debugger/debug/debug-evaluate-nested-let.js b/deps/v8/test/debugger/debug/debug-evaluate-nested-let.js
index 691dd2c3f2..726c28f5e5 100644
--- a/deps/v8/test/debugger/debug/debug-evaluate-nested-let.js
+++ b/deps/v8/test/debugger/debug/debug-evaluate-nested-let.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --crankshaft
+// Flags: --opt
Debug = debug.Debug
diff --git a/deps/v8/test/debugger/debug/debug-optimize.js b/deps/v8/test/debugger/debug/debug-optimize.js
index 5501b3fe93..f296816aa2 100644
--- a/deps/v8/test/debugger/debug/debug-optimize.js
+++ b/deps/v8/test/debugger/debug/debug-optimize.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --crankshaft --no-always-opt
+// Flags: --opt --no-always-opt
var Debug = debug.Debug;
diff --git a/deps/v8/test/debugger/debug/debug-scopes.js b/deps/v8/test/debugger/debug/debug-scopes.js
index b2f9e33825..7ee7a8d6e6 100644
--- a/deps/v8/test/debugger/debug/debug-scopes.js
+++ b/deps/v8/test/debugger/debug/debug-scopes.js
@@ -1144,7 +1144,7 @@ listener_delegate = function(exec_state) {
debug.ScopeType.Script,
debug.ScopeType.Global], exec_state);
CheckScopeChainPositions(
- [{start: 52, end: 111}, {start: 22, end: 145}, {}, {}], exec_state);
+ [{start: 42, end: 111}, {start: 22, end: 145}, {}, {}], exec_state);
}
eval(code3);
EndTest();
@@ -1165,7 +1165,7 @@ listener_delegate = function(exec_state) {
debug.ScopeType.Script,
debug.ScopeType.Global], exec_state);
CheckScopeChainPositions([{start: 66, end: 147},
- {start: 52, end: 147},
+ {start: 42, end: 147},
{start: 22, end: 181},
{}, {}], exec_state);
}
diff --git a/deps/v8/test/debugger/debug/debug-stepin-accessor.js b/deps/v8/test/debugger/debug/debug-stepin-accessor.js
index 14da5584f4..d0b49dd847 100644
--- a/deps/v8/test/debugger/debug/debug-stepin-accessor.js
+++ b/deps/v8/test/debugger/debug/debug-stepin-accessor.js
@@ -233,7 +233,8 @@ function testProtoSetter1_2() {
}
for (var n in this) {
- if (n.substr(0, 4) != 'test') {
+ if (n.substr(0, 4) != 'test' ||
+ n == 'testRunner') {
continue;
}
state = 1;
diff --git a/deps/v8/test/debugger/debug/debug-stepin-property-function-call.js b/deps/v8/test/debugger/debug/debug-stepin-property-function-call.js
index 0fdb94ed2b..8dd8334c9e 100644
--- a/deps/v8/test/debugger/debug/debug-stepin-property-function-call.js
+++ b/deps/v8/test/debugger/debug/debug-stepin-property-function-call.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --nocrankshaft
+// Flags: --noopt
Debug = debug.Debug
var exception = null;
diff --git a/deps/v8/test/debugger/debug/es6/debug-blockscopes.js b/deps/v8/test/debugger/debug/es6/debug-blockscopes.js
index bc00df7129..1cb279bacc 100644
--- a/deps/v8/test/debugger/debug/es6/debug-blockscopes.js
+++ b/deps/v8/test/debugger/debug/es6/debug-blockscopes.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --noanalyze-environment-liveness --crankshaft
+// Flags: --noanalyze-environment-liveness --opt
// The functions used for testing backtraces. They are at the top to make the
// testing of source line/column easier.
diff --git a/deps/v8/test/debugger/debug/harmony/modules-debug-scopes1.js b/deps/v8/test/debugger/debug/harmony/modules-debug-scopes1.js
index e67c42de61..cbecca9d6e 100644
--- a/deps/v8/test/debugger/debug/harmony/modules-debug-scopes1.js
+++ b/deps/v8/test/debugger/debug/harmony/modules-debug-scopes1.js
@@ -751,7 +751,7 @@ listener_delegate = function(exec_state) {
debug.ScopeType.Module,
debug.ScopeType.Script,
debug.ScopeType.Global], exec_state);
- CheckScopeChainPositions([{start: 52, end: 111}, {start: 22, end: 145}],
+ CheckScopeChainPositions([{start: 42, end: 111}, {start: 22, end: 145}],
exec_state);
}
eval(code3);
@@ -774,7 +774,7 @@ listener_delegate = function(exec_state) {
debug.ScopeType.Script,
debug.ScopeType.Global], exec_state);
CheckScopeChainPositions([{start: 66, end: 147},
- {start: 52, end: 147},
+ {start: 42, end: 147},
{start: 22, end: 181}], exec_state);
}
eval(code4);
diff --git a/deps/v8/test/debugger/debug/regress/regress-crbug-465298.js b/deps/v8/test/debugger/debug/regress/regress-crbug-465298.js
index 7ccdcd882f..512a9e053f 100644
--- a/deps/v8/test/debugger/debug/regress/regress-crbug-465298.js
+++ b/deps/v8/test/debugger/debug/regress/regress-crbug-465298.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --noturbo-osr --noturbo-inlining
+// Flags: --noturbo-inlining
var stdlib = this;
var buffer = new ArrayBuffer(64 * 1024);
diff --git a/deps/v8/test/debugger/debug/regress/regress-crbug-517592.js b/deps/v8/test/debugger/debug/regress/regress-crbug-517592.js
index c552cfa4f0..e4a905d7c5 100644
--- a/deps/v8/test/debugger/debug/regress/regress-crbug-517592.js
+++ b/deps/v8/test/debugger/debug/regress/regress-crbug-517592.js
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --min-preparse-length=10
-
var source =
"var foo = function foo() {\n" +
" return 1;\n" +
diff --git a/deps/v8/test/debugger/debug/regress/regress-crbug-633999.js b/deps/v8/test/debugger/debug/regress/regress-crbug-633999.js
index e5f56166d5..ebaabd7104 100644
--- a/deps/v8/test/debugger/debug/regress/regress-crbug-633999.js
+++ b/deps/v8/test/debugger/debug/regress/regress-crbug-633999.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --crankshaft --no-turbo
+// Flags: --opt --no-turbo
var Debug = debug.Debug
var exception = null;
diff --git a/deps/v8/test/debugger/debugger.status b/deps/v8/test/debugger/debugger.status
index ccb1d51f78..d76bd5017d 100644
--- a/deps/v8/test/debugger/debugger.status
+++ b/deps/v8/test/debugger/debugger.status
@@ -73,6 +73,19 @@
'*': [SKIP],
}], # variant == wasm_traps
+##############################################################################
+['arch == arm and not simulator_run', {
+ # Too slow on chromebooks.
+ 'debug/ignition/debug-step-prefix-bytecodes': [SKIP],
+}], # 'arch == arm and not simulator_run'
+
+##############################################################################
+['variant in [noturbofan, noturbofan_stress] and system == macos and asan', {
+ # Too slow for old pipeline and mac asan.
+ 'debug/*': [SKIP],
+}], # variant in [noturbofan, noturbofan_stress] and system == macos and asan
+
+##############################################################################
['arch == s390 or arch == s390x', {
# Stack manipulations in LiveEdit is not implemented for this arch.
diff --git a/deps/v8/test/default.gyp b/deps/v8/test/default.gyp
index fe4e47f29d..2c6429bada 100644
--- a/deps/v8/test/default.gyp
+++ b/deps/v8/test/default.gyp
@@ -18,6 +18,7 @@
'mjsunit/mjsunit.gyp:mjsunit_run',
'preparser/preparser.gyp:preparser_run',
'unittests/unittests.gyp:unittests_run',
+ 'wasm-spec-tests/wasm-spec-tests.gyp:wasm_spec_tests_run',
],
'includes': [
'../gypfiles/features.gypi',
diff --git a/deps/v8/test/default.isolate b/deps/v8/test/default.isolate
index 8ef69c3b15..e9104631d6 100644
--- a/deps/v8/test/default.isolate
+++ b/deps/v8/test/default.isolate
@@ -15,7 +15,9 @@
'intl/intl.isolate',
'message/message.isolate',
'mjsunit/mjsunit.isolate',
+ 'mkgrokdump/mkgrokdump.isolate',
'preparser/preparser.isolate',
'unittests/unittests.isolate',
+ 'wasm-spec-tests/wasm-spec-tests.isolate',
],
}
diff --git a/deps/v8/test/fuzzer/fuzzer.gyp b/deps/v8/test/fuzzer/fuzzer.gyp
index 3b93808533..302cea377e 100644
--- a/deps/v8/test/fuzzer/fuzzer.gyp
+++ b/deps/v8/test/fuzzer/fuzzer.gyp
@@ -169,6 +169,8 @@
'../common/wasm/test-signatures.h',
'../common/wasm/wasm-module-runner.cc',
'../common/wasm/wasm-module-runner.h',
+ 'wasm-fuzzer-common.cc',
+ 'wasm-fuzzer-common.h',
],
},
{
@@ -198,6 +200,8 @@
'../common/wasm/test-signatures.h',
'../common/wasm/wasm-module-runner.cc',
'../common/wasm/wasm-module-runner.h',
+ 'wasm-fuzzer-common.cc',
+ 'wasm-fuzzer-common.h',
],
},
{
@@ -227,6 +231,8 @@
'../common/wasm/test-signatures.h',
'../common/wasm/wasm-module-runner.cc',
'../common/wasm/wasm-module-runner.h',
+ 'wasm-fuzzer-common.cc',
+ 'wasm-fuzzer-common.h',
],
},
{
@@ -255,8 +261,8 @@
'wasm-data-section.cc',
'../common/wasm/wasm-module-runner.cc',
'../common/wasm/wasm-module-runner.h',
- 'wasm-section-fuzzers.cc',
- 'wasm-section-fuzzers.h',
+ 'wasm-fuzzer-common.cc',
+ 'wasm-fuzzer-common.h',
],
},
{
@@ -285,8 +291,8 @@
'wasm-function-sigs-section.cc',
'../common/wasm/wasm-module-runner.cc',
'../common/wasm/wasm-module-runner.h',
- 'wasm-section-fuzzers.cc',
- 'wasm-section-fuzzers.h',
+ 'wasm-fuzzer-common.cc',
+ 'wasm-fuzzer-common.h',
],
},
{
@@ -315,8 +321,8 @@
'wasm-globals-section.cc',
'../common/wasm/wasm-module-runner.cc',
'../common/wasm/wasm-module-runner.h',
- 'wasm-section-fuzzers.cc',
- 'wasm-section-fuzzers.h',
+ 'wasm-fuzzer-common.cc',
+ 'wasm-fuzzer-common.h',
],
},
{
@@ -345,8 +351,8 @@
'wasm-imports-section.cc',
'../common/wasm/wasm-module-runner.cc',
'../common/wasm/wasm-module-runner.h',
- 'wasm-section-fuzzers.cc',
- 'wasm-section-fuzzers.h',
+ 'wasm-fuzzer-common.cc',
+ 'wasm-fuzzer-common.h',
],
},
{
@@ -375,8 +381,8 @@
'wasm-memory-section.cc',
'../common/wasm/wasm-module-runner.cc',
'../common/wasm/wasm-module-runner.h',
- 'wasm-section-fuzzers.cc',
- 'wasm-section-fuzzers.h',
+ 'wasm-fuzzer-common.cc',
+ 'wasm-fuzzer-common.h',
],
},
{
@@ -405,8 +411,8 @@
'wasm-names-section.cc',
'../common/wasm/wasm-module-runner.cc',
'../common/wasm/wasm-module-runner.h',
- 'wasm-section-fuzzers.cc',
- 'wasm-section-fuzzers.h',
+ 'wasm-fuzzer-common.cc',
+ 'wasm-fuzzer-common.h',
],
},
{
@@ -435,8 +441,8 @@
'wasm-types-section.cc',
'../common/wasm/wasm-module-runner.cc',
'../common/wasm/wasm-module-runner.h',
- 'wasm-section-fuzzers.cc',
- 'wasm-section-fuzzers.h',
+ 'wasm-fuzzer-common.cc',
+ 'wasm-fuzzer-common.h',
],
},
{
diff --git a/deps/v8/test/fuzzer/parser.cc b/deps/v8/test/fuzzer/parser.cc
index e364d83149..76666e85be 100644
--- a/deps/v8/test/fuzzer/parser.cc
+++ b/deps/v8/test/fuzzer/parser.cc
@@ -14,7 +14,51 @@
#include "src/parsing/preparser.h"
#include "test/fuzzer/fuzzer-support.h"
+#include <cctype>
+#include <list>
+
+bool IsValidInput(const uint8_t* data, size_t size) {
+ std::list<char> parentheses;
+ const char* ptr = reinterpret_cast<const char*>(data);
+
+ for (size_t i = 0; i != size; ++i) {
+ // Check that all characters in the data are valid.
+ if (!(std::isspace(ptr[i]) || std::isprint(ptr[i]))) {
+ return false;
+ }
+
+ // Check balance of parentheses in the data.
+ switch (ptr[i]) {
+ case '(':
+ case '[':
+ case '{':
+ parentheses.push_back(ptr[i]);
+ break;
+ case ')':
+ if (parentheses.back() != '(') return false;
+ parentheses.pop_back();
+ break;
+ case ']':
+ if (parentheses.back() != '[') return false;
+ parentheses.pop_back();
+ break;
+ case '}':
+ if (parentheses.back() != '{') return false;
+ parentheses.pop_back();
+ break;
+ default:
+ break;
+ }
+ }
+
+ return parentheses.empty();
+}
+
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
+ if (!IsValidInput(data, size)) {
+ return 0;
+ }
+
v8_fuzzer::FuzzerSupport* support = v8_fuzzer::FuzzerSupport::Get();
v8::Isolate* isolate = support->GetIsolate();
@@ -36,7 +80,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
v8::internal::Handle<v8::internal::Script> script =
factory->NewScript(source.ToHandleChecked());
v8::internal::ParseInfo info(script);
- v8::internal::parsing::ParseProgram(&info, i_isolate);
+ if (!v8::internal::parsing::ParseProgram(&info, i_isolate)) {
+ i_isolate->OptionalRescheduleException(true);
+ }
isolate->RequestGarbageCollectionForTesting(
v8::Isolate::kFullGarbageCollection);
return 0;
diff --git a/deps/v8/test/fuzzer/testcfg.py b/deps/v8/test/fuzzer/testcfg.py
index 0e07fb574e..0732ddebe0 100644
--- a/deps/v8/test/fuzzer/testcfg.py
+++ b/deps/v8/test/fuzzer/testcfg.py
@@ -32,6 +32,9 @@ class FuzzerTestSuite(testsuite.TestSuite):
for subtest in FuzzerTestSuite.SUB_TESTS:
shell = 'v8_simple_%s_fuzzer' % subtest
for fname in os.listdir(os.path.join(self.root, subtest)):
+ if subtest in ["wasm", "wasm_asmjs"] and fname.endswith(".wasm"):
+ os.remove(os.path.join(self.root, subtest, fname))
+ continue
if not os.path.isfile(os.path.join(self.root, subtest, fname)):
continue
test = testcase.TestCase(self, '%s/%s' % (subtest, fname),
diff --git a/deps/v8/test/fuzzer/wasm-call.cc b/deps/v8/test/fuzzer/wasm-call.cc
index 3291d9eab1..42a7635d7a 100644
--- a/deps/v8/test/fuzzer/wasm-call.cc
+++ b/deps/v8/test/fuzzer/wasm-call.cc
@@ -16,176 +16,113 @@
#include "test/common/wasm/test-signatures.h"
#include "test/common/wasm/wasm-module-runner.h"
#include "test/fuzzer/fuzzer-support.h"
+#include "test/fuzzer/wasm-fuzzer-common.h"
-#define WASM_CODE_FUZZER_HASH_SEED 83
#define MAX_NUM_FUNCTIONS 3
#define MAX_NUM_PARAMS 3
+using namespace v8::internal;
using namespace v8::internal::wasm;
-
-template <typename V>
-static inline V read_value(const uint8_t** data, size_t* size, bool* ok) {
- // The status flag {ok} checks that the decoding up until now was okay, and
- // that a value of type V can be read without problems.
- *ok &= (*size > sizeof(V));
- if (!(*ok)) return 0;
- V result = v8::internal::ReadLittleEndianValue<V>(*data);
- *data += sizeof(V);
- *size -= sizeof(V);
- return result;
-}
-
-static void add_argument(
- v8::internal::Isolate* isolate, ValueType type, WasmVal* interpreter_args,
- v8::internal::Handle<v8::internal::Object>* compiled_args, int* argc,
- const uint8_t** data, size_t* size, bool* ok) {
- if (!(*ok)) return;
- switch (type) {
- case kWasmF32: {
- float value = read_value<float>(data, size, ok);
- interpreter_args[*argc] = WasmVal(value);
- compiled_args[*argc] =
- isolate->factory()->NewNumber(static_cast<double>(value));
- break;
- }
- case kWasmF64: {
- double value = read_value<double>(data, size, ok);
- interpreter_args[*argc] = WasmVal(value);
- compiled_args[*argc] = isolate->factory()->NewNumber(value);
- break;
- }
- case kWasmI32: {
- int32_t value = read_value<int32_t>(data, size, ok);
- interpreter_args[*argc] = WasmVal(value);
- compiled_args[*argc] =
- isolate->factory()->NewNumber(static_cast<double>(value));
- break;
- }
- default:
- UNREACHABLE();
+using namespace v8::internal::wasm::fuzzer;
+
+class WasmCallFuzzer : public WasmExecutionFuzzer {
+ template <typename V>
+ static inline V read_value(const uint8_t** data, size_t* size, bool* ok) {
+ // The status flag {ok} checks that the decoding up until now was okay, and
+ // that a value of type V can be read without problems.
+ *ok &= (*size > sizeof(V));
+ if (!(*ok)) return 0;
+ V result = v8::internal::ReadLittleEndianValue<V>(*data);
+ *data += sizeof(V);
+ *size -= sizeof(V);
+ return result;
}
- (*argc)++;
-}
-
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
- v8_fuzzer::FuzzerSupport* support = v8_fuzzer::FuzzerSupport::Get();
- v8::Isolate* isolate = support->GetIsolate();
- v8::internal::Isolate* i_isolate =
- reinterpret_cast<v8::internal::Isolate*>(isolate);
- // Clear any pending exceptions from a prior run.
- if (i_isolate->has_pending_exception()) {
- i_isolate->clear_pending_exception();
+ static void add_argument(
+ v8::internal::Isolate* isolate, ValueType type, WasmVal* interpreter_args,
+ v8::internal::Handle<v8::internal::Object>* compiler_args, int* argc,
+ const uint8_t** data, size_t* size, bool* ok) {
+ if (!(*ok)) return;
+ switch (type) {
+ case kWasmF32: {
+ float value = read_value<float>(data, size, ok);
+ interpreter_args[*argc] = WasmVal(value);
+ compiler_args[*argc] =
+ isolate->factory()->NewNumber(static_cast<double>(value));
+ break;
+ }
+ case kWasmF64: {
+ double value = read_value<double>(data, size, ok);
+ interpreter_args[*argc] = WasmVal(value);
+ compiler_args[*argc] = isolate->factory()->NewNumber(value);
+ break;
+ }
+ case kWasmI32: {
+ int32_t value = read_value<int32_t>(data, size, ok);
+ interpreter_args[*argc] = WasmVal(value);
+ compiler_args[*argc] =
+ isolate->factory()->NewNumber(static_cast<double>(value));
+ break;
+ }
+ default:
+ UNREACHABLE();
+ }
+ (*argc)++;
}
- v8::Isolate::Scope isolate_scope(isolate);
- v8::HandleScope handle_scope(isolate);
- v8::Context::Scope context_scope(support->GetContext());
- v8::TryCatch try_catch(isolate);
-
- v8::internal::AccountingAllocator allocator;
- v8::internal::Zone zone(&allocator, ZONE_NAME);
-
- bool ok = true;
- uint8_t num_functions =
- (read_value<uint8_t>(&data, &size, &ok) % MAX_NUM_FUNCTIONS) + 1;
-
- ValueType types[] = {kWasmF32, kWasmF64, kWasmI32, kWasmI64};
- WasmVal interpreter_args[3];
- v8::internal::Handle<v8::internal::Object> compiled_args[3];
- int argc = 0;
-
- WasmModuleBuilder builder(&zone);
- for (int fun = 0; fun < num_functions; fun++) {
- size_t num_params = static_cast<size_t>(
- (read_value<uint8_t>(&data, &size, &ok) % MAX_NUM_PARAMS) + 1);
- FunctionSig::Builder sig_builder(&zone, 1, num_params);
- sig_builder.AddReturn(kWasmI32);
- for (size_t param = 0; param < num_params; param++) {
- // The main function cannot handle int64 parameters.
- ValueType param_type = types[(read_value<uint8_t>(&data, &size, &ok) %
- (arraysize(types) - (fun == 0 ? 1 : 0)))];
- sig_builder.AddParam(param_type);
+ virtual bool GenerateModule(
+ Isolate* isolate, Zone* zone, const uint8_t* data, size_t size,
+ ZoneBuffer& buffer, int32_t& num_args,
+ std::unique_ptr<WasmVal[]>& interpreter_args,
+ std::unique_ptr<Handle<Object>[]>& compiler_args) override {
+ bool ok = true;
+ uint8_t num_functions =
+ (read_value<uint8_t>(&data, &size, &ok) % MAX_NUM_FUNCTIONS) + 1;
+
+ ValueType types[] = {kWasmF32, kWasmF64, kWasmI32, kWasmI64};
+
+ interpreter_args.reset(new WasmVal[3]);
+ compiler_args.reset(new Handle<Object>[3]);
+
+ WasmModuleBuilder builder(zone);
+ for (int fun = 0; fun < num_functions; fun++) {
+ size_t num_params = static_cast<size_t>(
+ (read_value<uint8_t>(&data, &size, &ok) % MAX_NUM_PARAMS) + 1);
+ FunctionSig::Builder sig_builder(zone, 1, num_params);
+ sig_builder.AddReturn(kWasmI32);
+ for (size_t param = 0; param < num_params; param++) {
+ // The main function cannot handle int64 parameters.
+ ValueType param_type = types[(read_value<uint8_t>(&data, &size, &ok) %
+ (arraysize(types) - (fun == 0 ? 1 : 0)))];
+ sig_builder.AddParam(param_type);
+ if (fun == 0) {
+ add_argument(isolate, param_type, interpreter_args.get(),
+ compiler_args.get(), &num_args, &data, &size, &ok);
+ }
+ }
+ v8::internal::wasm::WasmFunctionBuilder* f =
+ builder.AddFunction(sig_builder.Build());
+ uint32_t code_size = static_cast<uint32_t>(size / num_functions);
+ f->EmitCode(data, code_size);
+ uint8_t end_opcode = kExprEnd;
+ f->EmitCode(&end_opcode, 1);
+ data += code_size;
+ size -= code_size;
if (fun == 0) {
- add_argument(i_isolate, param_type, interpreter_args, compiled_args,
- &argc, &data, &size, &ok);
+ builder.AddExport(v8::internal::CStrVector("main"), f);
}
}
- v8::internal::wasm::WasmFunctionBuilder* f =
- builder.AddFunction(sig_builder.Build());
- uint32_t code_size = static_cast<uint32_t>(size / num_functions);
- f->EmitCode(data, code_size);
- uint8_t end_opcode = kExprEnd;
- f->EmitCode(&end_opcode, 1);
- data += code_size;
- size -= code_size;
- if (fun == 0) {
- f->ExportAs(v8::internal::CStrVector("main"));
- }
- }
-
- ZoneBuffer buffer(&zone);
- builder.WriteTo(buffer);
-
- if (!ok) {
- // The input data was too short.
- return 0;
- }
- v8::internal::wasm::testing::SetupIsolateForWasmModule(i_isolate);
+ builder.WriteTo(buffer);
- v8::internal::HandleScope scope(i_isolate);
-
- ErrorThrower interpreter_thrower(i_isolate, "Interpreter");
- std::unique_ptr<const WasmModule> module(testing::DecodeWasmModuleForTesting(
- i_isolate, &interpreter_thrower, buffer.begin(), buffer.end(),
- v8::internal::wasm::ModuleOrigin::kWasmOrigin, true));
-
- if (module == nullptr) {
- return 0;
- }
- ModuleWireBytes wire_bytes(buffer.begin(), buffer.end());
- int32_t result_interpreted;
- bool possible_nondeterminism = false;
- {
- result_interpreted = testing::InterpretWasmModule(
- i_isolate, &interpreter_thrower, module.get(), wire_bytes, 0,
- interpreter_args, &possible_nondeterminism);
- }
-
- ErrorThrower compiler_thrower(i_isolate, "Compiler");
- v8::internal::Handle<v8::internal::JSObject> instance =
- testing::InstantiateModuleForTesting(i_isolate, &compiler_thrower,
- module.get(), wire_bytes);
-
- if (!interpreter_thrower.error()) {
- CHECK(!instance.is_null());
- } else {
- return 0;
- }
- int32_t result_compiled;
- {
- result_compiled = testing::CallWasmFunctionForTesting(
- i_isolate, instance, &compiler_thrower, "main", argc, compiled_args,
- v8::internal::wasm::ModuleOrigin::kWasmOrigin);
- }
-
- // The WebAssembly spec allows the sign bit of NaN to be non-deterministic.
- // This sign bit may cause result_interpreted to be different than
- // result_compiled. Therefore we do not check the equality of the results
- // if the execution may have produced a NaN at some point.
- if (possible_nondeterminism) return 0;
-
- if (result_interpreted == bit_cast<int32_t>(0xdeadbeef)) {
- CHECK(i_isolate->has_pending_exception());
- i_isolate->clear_pending_exception();
- } else {
- CHECK(!i_isolate->has_pending_exception());
- if (result_interpreted != result_compiled) {
- V8_Fatal(__FILE__, __LINE__, "WasmCodeFuzzerHash=%x",
- v8::internal::StringHasher::HashSequentialString(
- data, static_cast<int>(size), WASM_CODE_FUZZER_HASH_SEED));
+ if (!ok) {
+ // The input data was too short.
+ return 0;
}
+ return true;
}
- return 0;
+};
+
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
+ return WasmCallFuzzer().FuzzWasmModule(data, size);
}
diff --git a/deps/v8/test/fuzzer/wasm-code.cc b/deps/v8/test/fuzzer/wasm-code.cc
index a80cfcfaca..ec6db6a7c6 100644
--- a/deps/v8/test/fuzzer/wasm-code.cc
+++ b/deps/v8/test/fuzzer/wasm-code.cc
@@ -5,159 +5,43 @@
#include <stddef.h>
#include <stdint.h>
-#include "include/v8.h"
#include "src/isolate.h"
#include "src/objects-inl.h"
#include "src/objects.h"
-#include "src/ostreams.h"
#include "src/wasm/wasm-interpreter.h"
#include "src/wasm/wasm-module-builder.h"
-#include "src/wasm/wasm-module.h"
#include "test/common/wasm/test-signatures.h"
-#include "test/common/wasm/wasm-module-runner.h"
-#include "test/fuzzer/fuzzer-support.h"
-
-#define WASM_CODE_FUZZER_HASH_SEED 83
+#include "test/fuzzer/wasm-fuzzer-common.h"
+using namespace v8::internal;
using namespace v8::internal::wasm;
+using namespace v8::internal::wasm::fuzzer;
+
+class WasmCodeFuzzer : public WasmExecutionFuzzer {
+ virtual bool GenerateModule(
+ Isolate* isolate, Zone* zone, const uint8_t* data, size_t size,
+ ZoneBuffer& buffer, int32_t& num_args,
+ std::unique_ptr<WasmVal[]>& interpreter_args,
+ std::unique_ptr<Handle<Object>[]>& compiler_args) override {
+ TestSignatures sigs;
+ WasmModuleBuilder builder(zone);
+ WasmFunctionBuilder* f = builder.AddFunction(sigs.i_iii());
+ f->EmitCode(data, static_cast<uint32_t>(size));
+ uint8_t end_opcode = kExprEnd;
+ f->EmitCode(&end_opcode, 1);
+ builder.AddExport(CStrVector("main"), f);
+
+ builder.WriteTo(buffer);
+ num_args = 3;
+ interpreter_args.reset(new WasmVal[3]{WasmVal(1), WasmVal(2), WasmVal(3)});
+
+ compiler_args.reset(new Handle<Object>[3]{
+ handle(Smi::FromInt(1), isolate), handle(Smi::FromInt(1), isolate),
+ handle(Smi::FromInt(1), isolate)});
+ return true;
+ }
+};
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
- // Save the flag so that we can change it and restore it later.
- bool generate_test = v8::internal::FLAG_wasm_code_fuzzer_gen_test;
- if (generate_test) {
- v8::internal::OFStream os(stdout);
-
- os << "// Copyright 2017 the V8 project authors. All rights reserved."
- << std::endl;
- os << "// Use of this source code is governed by a BSD-style license that "
- "can be"
- << std::endl;
- os << "// found in the LICENSE file." << std::endl;
- os << std::endl;
- os << "load(\"test/mjsunit/wasm/wasm-constants.js\");" << std::endl;
- os << "load(\"test/mjsunit/wasm/wasm-module-builder.js\");" << std::endl;
- os << std::endl;
- os << "(function() {" << std::endl;
- os << " var builder = new WasmModuleBuilder();" << std::endl;
- os << " builder.addMemory(16, 32, false);" << std::endl;
- os << " builder.addFunction(\"test\", kSig_i_iii)" << std::endl;
- os << " .addBodyWithEnd([" << std::endl;
- }
- v8_fuzzer::FuzzerSupport* support = v8_fuzzer::FuzzerSupport::Get();
- v8::Isolate* isolate = support->GetIsolate();
- v8::internal::Isolate* i_isolate =
- reinterpret_cast<v8::internal::Isolate*>(isolate);
-
- // Clear any pending exceptions from a prior run.
- if (i_isolate->has_pending_exception()) {
- i_isolate->clear_pending_exception();
- }
-
- v8::Isolate::Scope isolate_scope(isolate);
- v8::HandleScope handle_scope(isolate);
- v8::Context::Scope context_scope(support->GetContext());
- v8::TryCatch try_catch(isolate);
-
- v8::internal::AccountingAllocator allocator;
- v8::internal::Zone zone(&allocator, ZONE_NAME);
-
- TestSignatures sigs;
-
- WasmModuleBuilder builder(&zone);
-
- v8::internal::wasm::WasmFunctionBuilder* f =
- builder.AddFunction(sigs.i_iii());
- f->EmitCode(data, static_cast<uint32_t>(size));
- uint8_t end_opcode = kExprEnd;
- f->EmitCode(&end_opcode, 1);
- f->ExportAs(v8::internal::CStrVector("main"));
-
- ZoneBuffer buffer(&zone);
- builder.WriteTo(buffer);
-
- v8::internal::wasm::testing::SetupIsolateForWasmModule(i_isolate);
-
- v8::internal::HandleScope scope(i_isolate);
-
- ErrorThrower interpreter_thrower(i_isolate, "Interpreter");
- std::unique_ptr<const WasmModule> module(testing::DecodeWasmModuleForTesting(
- i_isolate, &interpreter_thrower, buffer.begin(), buffer.end(),
- v8::internal::wasm::ModuleOrigin::kWasmOrigin, true));
-
- // Clear the flag so that the WebAssembly code is not printed twice.
- v8::internal::FLAG_wasm_code_fuzzer_gen_test = false;
- if (module == nullptr) {
- if (generate_test) {
- v8::internal::OFStream os(stdout);
- os << " ])" << std::endl;
- os << " .exportFunc();" << std::endl;
- os << " assertThrows(function() { builder.instantiate(); });"
- << std::endl;
- os << "})();" << std::endl;
- }
- return 0;
- }
- if (generate_test) {
- v8::internal::OFStream os(stdout);
- os << " ])" << std::endl;
- os << " .exportFunc();" << std::endl;
- os << " var module = builder.instantiate();" << std::endl;
- os << " module.exports.test(1, 2, 3);" << std::endl;
- os << "})();" << std::endl;
- }
-
- ModuleWireBytes wire_bytes(buffer.begin(), buffer.end());
- int32_t result_interpreted;
- bool possible_nondeterminism = false;
- {
- WasmVal args[] = {WasmVal(1), WasmVal(2), WasmVal(3)};
- result_interpreted = testing::InterpretWasmModule(
- i_isolate, &interpreter_thrower, module.get(), wire_bytes, 0, args,
- &possible_nondeterminism);
- }
-
- ErrorThrower compiler_thrower(i_isolate, "Compiler");
- v8::internal::Handle<v8::internal::JSObject> instance =
- testing::InstantiateModuleForTesting(i_isolate, &compiler_thrower,
- module.get(), wire_bytes);
- // Restore the flag.
- v8::internal::FLAG_wasm_code_fuzzer_gen_test = generate_test;
- if (!interpreter_thrower.error()) {
- CHECK(!instance.is_null());
- } else {
- return 0;
- }
- int32_t result_compiled;
- {
- v8::internal::Handle<v8::internal::Object> arguments[] = {
- v8::internal::handle(v8::internal::Smi::FromInt(1), i_isolate),
- v8::internal::handle(v8::internal::Smi::FromInt(2), i_isolate),
- v8::internal::handle(v8::internal::Smi::FromInt(3), i_isolate)};
- result_compiled = testing::CallWasmFunctionForTesting(
- i_isolate, instance, &compiler_thrower, "main", arraysize(arguments),
- arguments, v8::internal::wasm::ModuleOrigin::kWasmOrigin);
- }
-
- // The WebAssembly spec allows the sign bit of NaN to be non-deterministic.
- // This sign bit may cause result_interpreted to be different than
- // result_compiled. Therefore we do not check the equality of the results
- // if the execution may have produced a NaN at some point.
- if (possible_nondeterminism) return 0;
-
- if (result_interpreted == bit_cast<int32_t>(0xdeadbeef)) {
- CHECK(i_isolate->has_pending_exception());
- i_isolate->clear_pending_exception();
- } else {
- CHECK(!i_isolate->has_pending_exception());
- // The WebAssembly spec allows the sign bit of NaN to be non-deterministic.
- // This sign bit may cause result_interpreted to be different than
- // result_compiled. Therefore we do not check the equality of the results
- // if the execution may have produced a NaN at some point.
- if (result_interpreted != result_compiled) {
- V8_Fatal(__FILE__, __LINE__, "WasmCodeFuzzerHash=%x",
- v8::internal::StringHasher::HashSequentialString(
- data, static_cast<int>(size), WASM_CODE_FUZZER_HASH_SEED));
- }
- }
- return 0;
+ return WasmCodeFuzzer().FuzzWasmModule(data, size);
}
diff --git a/deps/v8/test/fuzzer/wasm-compile.cc b/deps/v8/test/fuzzer/wasm-compile.cc
index 0b01ce2357..2a99d1546c 100644
--- a/deps/v8/test/fuzzer/wasm-compile.cc
+++ b/deps/v8/test/fuzzer/wasm-compile.cc
@@ -19,12 +19,13 @@
#include "test/common/wasm/test-signatures.h"
#include "test/common/wasm/wasm-module-runner.h"
#include "test/fuzzer/fuzzer-support.h"
-
-#define WASM_CODE_FUZZER_HASH_SEED 83
+#include "test/fuzzer/wasm-fuzzer-common.h"
typedef uint8_t byte;
+using namespace v8::internal;
using namespace v8::internal::wasm;
+using namespace v8::internal::wasm::fuzzer;
namespace {
@@ -104,7 +105,7 @@ class WasmGenerator {
const ValueType break_type = blocks_[target_block];
Generate(break_type, data);
- builder_->EmitWithVarInt(kExprBr, target_block);
+ builder_->EmitWithI32V(kExprBr, target_block);
builder_->Emit(kExprEnd);
blocks_.pop_back();
};
@@ -205,8 +206,7 @@ void WasmGenerator::Generate<kWasmI32>(DataRange data) {
template <>
void WasmGenerator::Generate<kWasmI64>(DataRange data) {
if (data.size() <= sizeof(uint64_t)) {
- const uint8_t bytes[] = {WASM_I64V(data.get<uint64_t>())};
- builder_->EmitCode(bytes, arraysize(bytes));
+ builder_->EmitI64Const(data.get<int64_t>());
} else {
const std::function<void(DataRange)> alternates[] = {
op<kExprI64Add, kWasmI64, kWasmI64>(),
@@ -244,10 +244,8 @@ void WasmGenerator::Generate<kWasmI64>(DataRange data) {
template <>
void WasmGenerator::Generate<kWasmF32>(DataRange data) {
- if (data.size() <= sizeof(uint32_t)) {
- const uint32_t i = data.get<uint32_t>();
- builder_->Emit(kExprF32Const);
- builder_->EmitCode(reinterpret_cast<const uint8_t*>(&i), sizeof(i));
+ if (data.size() <= sizeof(float)) {
+ builder_->EmitF32Const(data.get<float>());
} else {
const std::function<void(DataRange)> alternates[] = {
op<kExprF32Add, kWasmF32, kWasmF32>(),
@@ -266,15 +264,8 @@ void WasmGenerator::Generate<kWasmF32>(DataRange data) {
template <>
void WasmGenerator::Generate<kWasmF64>(DataRange data) {
- if (data.size() <= sizeof(uint64_t)) {
- // TODO (eholk): generate full 64-bit constants
- uint64_t i = 0;
- while (data.size() > 0) {
- i <<= 8;
- i |= data.get<uint8_t>();
- }
- builder_->Emit(kExprF64Const);
- builder_->EmitCode(reinterpret_cast<uint8_t*>(&i), sizeof(i));
+ if (data.size() <= sizeof(double)) {
+ builder_->EmitF64Const(data.get<double>());
} else {
const std::function<void(DataRange)> alternates[] = {
op<kExprF64Add, kWasmF64, kWasmF64>(),
@@ -307,141 +298,38 @@ void WasmGenerator::Generate(ValueType type, DataRange data) {
}
}
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
- // Save the flag so that we can change it and restore it later.
- bool generate_test = v8::internal::FLAG_wasm_code_fuzzer_gen_test;
- if (generate_test) {
- v8::internal::OFStream os(stdout);
-
- os << "// Copyright 2017 the V8 project authors. All rights reserved."
- << std::endl;
- os << "// Use of this source code is governed by a BSD-style license that "
- "can be"
- << std::endl;
- os << "// found in the LICENSE file." << std::endl;
- os << std::endl;
- os << "load(\"test/mjsunit/wasm/wasm-constants.js\");" << std::endl;
- os << "load(\"test/mjsunit/wasm/wasm-module-builder.js\");" << std::endl;
- os << std::endl;
- os << "(function() {" << std::endl;
- os << " var builder = new WasmModuleBuilder();" << std::endl;
- os << " builder.addMemory(16, 32, false);" << std::endl;
- os << " builder.addFunction(\"test\", kSig_i_iii)" << std::endl;
- os << " .addBodyWithEnd([" << std::endl;
- }
- v8_fuzzer::FuzzerSupport* support = v8_fuzzer::FuzzerSupport::Get();
- v8::Isolate* isolate = support->GetIsolate();
- v8::internal::Isolate* i_isolate =
- reinterpret_cast<v8::internal::Isolate*>(isolate);
-
- // Clear any pending exceptions from a prior run.
- if (i_isolate->has_pending_exception()) {
- i_isolate->clear_pending_exception();
- }
-
- v8::Isolate::Scope isolate_scope(isolate);
- v8::HandleScope handle_scope(isolate);
- v8::Context::Scope context_scope(support->GetContext());
- v8::TryCatch try_catch(isolate);
-
- v8::internal::AccountingAllocator allocator;
- v8::internal::Zone zone(&allocator, ZONE_NAME);
-
- TestSignatures sigs;
-
- WasmModuleBuilder builder(&zone);
-
- v8::internal::wasm::WasmFunctionBuilder* f =
- builder.AddFunction(sigs.i_iii());
+class WasmCompileFuzzer : public WasmExecutionFuzzer {
+ virtual bool GenerateModule(
+ Isolate* isolate, Zone* zone, const uint8_t* data, size_t size,
+ ZoneBuffer& buffer, int32_t& num_args,
+ std::unique_ptr<WasmVal[]>& interpreter_args,
+ std::unique_ptr<Handle<Object>[]>& compiler_args) override {
+ TestSignatures sigs;
- WasmGenerator gen(f);
- gen.Generate<kWasmI32>(DataRange(data, static_cast<uint32_t>(size)));
+ WasmModuleBuilder builder(zone);
- uint8_t end_opcode = kExprEnd;
- f->EmitCode(&end_opcode, 1);
- f->ExportAs(v8::internal::CStrVector("main"));
+ v8::internal::wasm::WasmFunctionBuilder* f =
+ builder.AddFunction(sigs.i_iii());
- ZoneBuffer buffer(&zone);
- builder.WriteTo(buffer);
+ WasmGenerator gen(f);
+ gen.Generate<kWasmI32>(DataRange(data, static_cast<uint32_t>(size)));
- v8::internal::wasm::testing::SetupIsolateForWasmModule(i_isolate);
+ uint8_t end_opcode = kExprEnd;
+ f->EmitCode(&end_opcode, 1);
+ builder.AddExport(v8::internal::CStrVector("main"), f);
- v8::internal::HandleScope scope(i_isolate);
+ builder.WriteTo(buffer);
- ErrorThrower interpreter_thrower(i_isolate, "Interpreter");
- std::unique_ptr<const WasmModule> module(testing::DecodeWasmModuleForTesting(
- i_isolate, &interpreter_thrower, buffer.begin(), buffer.end(),
- v8::internal::wasm::ModuleOrigin::kWasmOrigin, true));
+ num_args = 3;
+ interpreter_args.reset(new WasmVal[3]{WasmVal(1), WasmVal(2), WasmVal(3)});
- // Clear the flag so that the WebAssembly code is not printed twice.
- v8::internal::FLAG_wasm_code_fuzzer_gen_test = false;
- if (module == nullptr) {
- if (generate_test) {
- v8::internal::OFStream os(stdout);
- os << " ])" << std::endl;
- os << " .exportFunc();" << std::endl;
- os << " assertThrows(function() { builder.instantiate(); });"
- << std::endl;
- os << "})();" << std::endl;
- }
- return 0;
- }
- if (generate_test) {
- v8::internal::OFStream os(stdout);
- os << " ])" << std::endl;
- os << " .exportFunc();" << std::endl;
- os << " var module = builder.instantiate();" << std::endl;
- os << " module.exports.test(1, 2, 3);" << std::endl;
- os << "})();" << std::endl;
- }
-
- ModuleWireBytes wire_bytes(buffer.begin(), buffer.end());
- int32_t result_interpreted;
- bool possible_nondeterminism = false;
- {
- WasmVal args[] = {WasmVal(1), WasmVal(2), WasmVal(3)};
- result_interpreted = testing::InterpretWasmModule(
- i_isolate, &interpreter_thrower, module.get(), wire_bytes, 0, args,
- &possible_nondeterminism);
+ compiler_args.reset(new Handle<Object>[3]{
+ handle(Smi::FromInt(1), isolate), handle(Smi::FromInt(1), isolate),
+ handle(Smi::FromInt(1), isolate)});
+ return true;
}
+};
- ErrorThrower compiler_thrower(i_isolate, "Compiler");
- v8::internal::Handle<v8::internal::JSObject> instance =
- testing::InstantiateModuleForTesting(i_isolate, &compiler_thrower,
- module.get(), wire_bytes);
- // Restore the flag.
- v8::internal::FLAG_wasm_code_fuzzer_gen_test = generate_test;
- if (!interpreter_thrower.error()) {
- CHECK(!instance.is_null());
- } else {
- return 0;
- }
- int32_t result_compiled;
- {
- v8::internal::Handle<v8::internal::Object> arguments[] = {
- v8::internal::handle(v8::internal::Smi::FromInt(1), i_isolate),
- v8::internal::handle(v8::internal::Smi::FromInt(2), i_isolate),
- v8::internal::handle(v8::internal::Smi::FromInt(3), i_isolate)};
- result_compiled = testing::CallWasmFunctionForTesting(
- i_isolate, instance, &compiler_thrower, "main", arraysize(arguments),
- arguments, v8::internal::wasm::ModuleOrigin::kWasmOrigin);
- }
- if (result_interpreted == bit_cast<int32_t>(0xdeadbeef) &&
- !possible_nondeterminism) {
- CHECK(i_isolate->has_pending_exception());
- i_isolate->clear_pending_exception();
- } else {
- // The WebAssembly spec allows the sign bit of NaN to be non-deterministic.
- // This sign bit may cause result_interpreted to be different than
- // result_compiled. Therefore we do not check the equality of the results
- // if the execution may have produced a NaN at some point.
- if (!possible_nondeterminism && (result_interpreted != result_compiled)) {
- printf("\nInterpreter returned 0x%x but compiled code returned 0x%x\n",
- result_interpreted, result_compiled);
- V8_Fatal(__FILE__, __LINE__, "WasmCodeFuzzerHash=%x",
- v8::internal::StringHasher::HashSequentialString(
- data, static_cast<int>(size), WASM_CODE_FUZZER_HASH_SEED));
- }
- }
- return 0;
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
+ return WasmCompileFuzzer().FuzzWasmModule(data, size);
}
diff --git a/deps/v8/test/fuzzer/wasm-data-section.cc b/deps/v8/test/fuzzer/wasm-data-section.cc
index 30b702fe8d..91c3fb586e 100644
--- a/deps/v8/test/fuzzer/wasm-data-section.cc
+++ b/deps/v8/test/fuzzer/wasm-data-section.cc
@@ -3,8 +3,10 @@
// found in the LICENSE file.
#include "src/objects-inl.h"
-#include "test/fuzzer/wasm-section-fuzzers.h"
+#include "test/fuzzer/wasm-fuzzer-common.h"
+
+using namespace v8::internal::wasm::fuzzer;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
- return fuzz_wasm_section(v8::internal::wasm::kDataSectionCode, data, size);
+ return FuzzWasmSection(v8::internal::wasm::kDataSectionCode, data, size);
}
diff --git a/deps/v8/test/fuzzer/wasm-function-sigs-section.cc b/deps/v8/test/fuzzer/wasm-function-sigs-section.cc
index e621aa820e..fc1fe2b987 100644
--- a/deps/v8/test/fuzzer/wasm-function-sigs-section.cc
+++ b/deps/v8/test/fuzzer/wasm-function-sigs-section.cc
@@ -3,9 +3,10 @@
// found in the LICENSE file.
#include "src/objects-inl.h"
-#include "test/fuzzer/wasm-section-fuzzers.h"
+#include "test/fuzzer/wasm-fuzzer-common.h"
+
+using namespace v8::internal::wasm::fuzzer;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
- return fuzz_wasm_section(v8::internal::wasm::kFunctionSectionCode, data,
- size);
+ return FuzzWasmSection(v8::internal::wasm::kFunctionSectionCode, data, size);
}
diff --git a/deps/v8/test/fuzzer/wasm-fuzzer-common.cc b/deps/v8/test/fuzzer/wasm-fuzzer-common.cc
new file mode 100644
index 0000000000..136e3f25a7
--- /dev/null
+++ b/deps/v8/test/fuzzer/wasm-fuzzer-common.cc
@@ -0,0 +1,194 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "test/fuzzer/wasm-fuzzer-common.h"
+
+#include "include/v8.h"
+#include "src/isolate.h"
+#include "src/objects-inl.h"
+#include "src/wasm/wasm-module-builder.h"
+#include "src/wasm/wasm-module.h"
+#include "src/zone/accounting-allocator.h"
+#include "src/zone/zone.h"
+#include "test/common/wasm/wasm-module-runner.h"
+#include "test/fuzzer/fuzzer-support.h"
+
+#define WASM_CODE_FUZZER_HASH_SEED 83
+
+using namespace v8::internal;
+using namespace v8::internal::wasm;
+using namespace v8::internal::wasm::fuzzer;
+
+static const char* kNameString = "name";
+static const size_t kNameStringLength = 4;
+
+int v8::internal::wasm::fuzzer::FuzzWasmSection(SectionCode section,
+ const uint8_t* data,
+ size_t size) {
+ v8_fuzzer::FuzzerSupport* support = v8_fuzzer::FuzzerSupport::Get();
+ v8::Isolate* isolate = support->GetIsolate();
+ v8::internal::Isolate* i_isolate = reinterpret_cast<Isolate*>(isolate);
+
+ // Clear any pending exceptions from a prior run.
+ if (i_isolate->has_pending_exception()) {
+ i_isolate->clear_pending_exception();
+ }
+
+ v8::Isolate::Scope isolate_scope(isolate);
+ v8::HandleScope handle_scope(isolate);
+ v8::Context::Scope context_scope(support->GetContext());
+ v8::TryCatch try_catch(isolate);
+
+ AccountingAllocator allocator;
+ Zone zone(&allocator, ZONE_NAME);
+
+ ZoneBuffer buffer(&zone);
+ buffer.write_u32(kWasmMagic);
+ buffer.write_u32(kWasmVersion);
+ if (section == kNameSectionCode) {
+ buffer.write_u8(kUnknownSectionCode);
+ buffer.write_size(size + kNameStringLength + 1);
+ buffer.write_u8(kNameStringLength);
+ buffer.write(reinterpret_cast<const uint8_t*>(kNameString),
+ kNameStringLength);
+ buffer.write(data, size);
+ } else {
+ buffer.write_u8(section);
+ buffer.write_size(size);
+ buffer.write(data, size);
+ }
+
+ ErrorThrower thrower(i_isolate, "decoder");
+
+ std::unique_ptr<const WasmModule> module(testing::DecodeWasmModuleForTesting(
+ i_isolate, &thrower, buffer.begin(), buffer.end(), kWasmOrigin));
+
+ return 0;
+}
+
+int WasmExecutionFuzzer::FuzzWasmModule(
+
+ const uint8_t* data, size_t size) {
+ // Save the flag so that we can change it and restore it later.
+ bool generate_test = FLAG_wasm_code_fuzzer_gen_test;
+ if (generate_test) {
+ OFStream os(stdout);
+
+ os << "// Copyright 2017 the V8 project authors. All rights reserved."
+ << std::endl;
+ os << "// Use of this source code is governed by a BSD-style license that "
+ "can be"
+ << std::endl;
+ os << "// found in the LICENSE file." << std::endl;
+ os << std::endl;
+ os << "load(\"test/mjsunit/wasm/wasm-constants.js\");" << std::endl;
+ os << "load(\"test/mjsunit/wasm/wasm-module-builder.js\");" << std::endl;
+ os << std::endl;
+ os << "(function() {" << std::endl;
+ os << " var builder = new WasmModuleBuilder();" << std::endl;
+ os << " builder.addMemory(16, 32, false);" << std::endl;
+ os << " builder.addFunction(\"test\", kSig_i_iii)" << std::endl;
+ os << " .addBodyWithEnd([" << std::endl;
+ }
+ v8_fuzzer::FuzzerSupport* support = v8_fuzzer::FuzzerSupport::Get();
+ v8::Isolate* isolate = support->GetIsolate();
+ Isolate* i_isolate = reinterpret_cast<Isolate*>(isolate);
+
+ // Clear any pending exceptions from a prior run.
+ if (i_isolate->has_pending_exception()) {
+ i_isolate->clear_pending_exception();
+ }
+
+ v8::Isolate::Scope isolate_scope(isolate);
+ v8::HandleScope handle_scope(isolate);
+ v8::Context::Scope context_scope(support->GetContext());
+ v8::TryCatch try_catch(isolate);
+ HandleScope scope(i_isolate);
+
+ AccountingAllocator allocator;
+ Zone zone(&allocator, ZONE_NAME);
+
+ ZoneBuffer buffer(&zone);
+ int32_t num_args = 0;
+ std::unique_ptr<WasmVal[]> interpreter_args;
+ std::unique_ptr<Handle<Object>[]> compiler_args;
+ if (!GenerateModule(i_isolate, &zone, data, size, buffer, num_args,
+ interpreter_args, compiler_args)) {
+ return 0;
+ }
+
+ v8::internal::wasm::testing::SetupIsolateForWasmModule(i_isolate);
+
+ ErrorThrower interpreter_thrower(i_isolate, "Interpreter");
+ std::unique_ptr<const WasmModule> module(testing::DecodeWasmModuleForTesting(
+ i_isolate, &interpreter_thrower, buffer.begin(), buffer.end(),
+ ModuleOrigin::kWasmOrigin, true));
+
+ // Clear the flag so that the WebAssembly code is not printed twice.
+ FLAG_wasm_code_fuzzer_gen_test = false;
+ if (module == nullptr) {
+ if (generate_test) {
+ OFStream os(stdout);
+ os << " ])" << std::endl;
+ os << " .exportFunc();" << std::endl;
+ os << " assertThrows(function() { builder.instantiate(); });"
+ << std::endl;
+ os << "})();" << std::endl;
+ }
+ return 0;
+ }
+ if (generate_test) {
+ OFStream os(stdout);
+ os << " ])" << std::endl;
+ os << " .exportFunc();" << std::endl;
+ os << " var module = builder.instantiate();" << std::endl;
+ os << " module.exports.test(1, 2, 3);" << std::endl;
+ os << "})();" << std::endl;
+ }
+
+ ModuleWireBytes wire_bytes(buffer.begin(), buffer.end());
+ int32_t result_interpreted;
+ bool possible_nondeterminism = false;
+ {
+ result_interpreted = testing::InterpretWasmModule(
+ i_isolate, &interpreter_thrower, module.get(), wire_bytes, 0,
+ interpreter_args.get(), &possible_nondeterminism);
+ }
+
+ ErrorThrower compiler_thrower(i_isolate, "Compiler");
+ Handle<JSObject> instance = testing::InstantiateModuleForTesting(
+ i_isolate, &compiler_thrower, module.get(), wire_bytes);
+ // Restore the flag.
+ FLAG_wasm_code_fuzzer_gen_test = generate_test;
+ if (!interpreter_thrower.error()) {
+ CHECK(!instance.is_null());
+ } else {
+ return 0;
+ }
+ int32_t result_compiled;
+ {
+ result_compiled = testing::CallWasmFunctionForTesting(
+ i_isolate, instance, &compiler_thrower, "main", num_args,
+ compiler_args.get(), ModuleOrigin::kWasmOrigin);
+ }
+
+ // The WebAssembly spec allows the sign bit of NaN to be non-deterministic.
+ // This sign bit may cause result_interpreted to be different than
+ // result_compiled. Therefore we do not check the equality of the results
+ // if the execution may have produced a NaN at some point.
+ if (possible_nondeterminism) return 0;
+
+ if (result_interpreted == bit_cast<int32_t>(0xdeadbeef)) {
+ CHECK(i_isolate->has_pending_exception());
+ i_isolate->clear_pending_exception();
+ } else {
+ CHECK(!i_isolate->has_pending_exception());
+ if (result_interpreted != result_compiled) {
+ V8_Fatal(__FILE__, __LINE__, "WasmCodeFuzzerHash=%x",
+ StringHasher::HashSequentialString(data, static_cast<int>(size),
+ WASM_CODE_FUZZER_HASH_SEED));
+ }
+ }
+ return 0;
+}
diff --git a/deps/v8/test/fuzzer/wasm-fuzzer-common.h b/deps/v8/test/fuzzer/wasm-fuzzer-common.h
new file mode 100644
index 0000000000..c75ae74962
--- /dev/null
+++ b/deps/v8/test/fuzzer/wasm-fuzzer-common.h
@@ -0,0 +1,40 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WASM_SECTION_FUZZERS_H_
+#define WASM_SECTION_FUZZERS_H_
+
+#include <stddef.h>
+#include <stdint.h>
+
+#include "src/wasm/module-decoder.h"
+#include "src/wasm/wasm-interpreter.h"
+#include "src/wasm/wasm-module-builder.h"
+
+namespace v8 {
+namespace internal {
+namespace wasm {
+namespace fuzzer {
+
+int FuzzWasmSection(v8::internal::wasm::SectionCode section,
+ const uint8_t* data, size_t size);
+
+class WasmExecutionFuzzer {
+ public:
+ virtual ~WasmExecutionFuzzer() {}
+ int FuzzWasmModule(const uint8_t* data, size_t size);
+
+ protected:
+ virtual bool GenerateModule(
+ Isolate* isolate, Zone* zone, const uint8_t* data, size_t size,
+ ZoneBuffer& buffer, int32_t& num_args,
+ std::unique_ptr<WasmVal[]>& interpreter_args,
+ std::unique_ptr<Handle<Object>[]>& compiler_args) = 0;
+};
+
+} // namespace fuzzer
+} // namespace wasm
+} // namespace internal
+} // namespace v8
+#endif // WASM_SECTION_FUZZERS_H_
diff --git a/deps/v8/test/fuzzer/wasm-globals-section.cc b/deps/v8/test/fuzzer/wasm-globals-section.cc
index dccdc1079c..3aab373a5a 100644
--- a/deps/v8/test/fuzzer/wasm-globals-section.cc
+++ b/deps/v8/test/fuzzer/wasm-globals-section.cc
@@ -3,8 +3,10 @@
// found in the LICENSE file.
#include "src/objects-inl.h"
-#include "test/fuzzer/wasm-section-fuzzers.h"
+#include "test/fuzzer/wasm-fuzzer-common.h"
+
+using namespace v8::internal::wasm::fuzzer;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
- return fuzz_wasm_section(v8::internal::wasm::kGlobalSectionCode, data, size);
+ return FuzzWasmSection(v8::internal::wasm::kGlobalSectionCode, data, size);
}
diff --git a/deps/v8/test/fuzzer/wasm-imports-section.cc b/deps/v8/test/fuzzer/wasm-imports-section.cc
index 4690597bba..587d091417 100644
--- a/deps/v8/test/fuzzer/wasm-imports-section.cc
+++ b/deps/v8/test/fuzzer/wasm-imports-section.cc
@@ -3,8 +3,10 @@
// found in the LICENSE file.
#include "src/objects-inl.h"
-#include "test/fuzzer/wasm-section-fuzzers.h"
+#include "test/fuzzer/wasm-fuzzer-common.h"
+
+using namespace v8::internal::wasm::fuzzer;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
- return fuzz_wasm_section(v8::internal::wasm::kImportSectionCode, data, size);
+ return FuzzWasmSection(v8::internal::wasm::kImportSectionCode, data, size);
}
diff --git a/deps/v8/test/fuzzer/wasm-memory-section.cc b/deps/v8/test/fuzzer/wasm-memory-section.cc
index 4736d6e68d..261fd75b78 100644
--- a/deps/v8/test/fuzzer/wasm-memory-section.cc
+++ b/deps/v8/test/fuzzer/wasm-memory-section.cc
@@ -3,8 +3,10 @@
// found in the LICENSE file.
#include "src/objects-inl.h"
-#include "test/fuzzer/wasm-section-fuzzers.h"
+#include "test/fuzzer/wasm-fuzzer-common.h"
+
+using namespace v8::internal::wasm::fuzzer;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
- return fuzz_wasm_section(v8::internal::wasm::kMemorySectionCode, data, size);
+ return FuzzWasmSection(v8::internal::wasm::kMemorySectionCode, data, size);
}
diff --git a/deps/v8/test/fuzzer/wasm-names-section.cc b/deps/v8/test/fuzzer/wasm-names-section.cc
index 9a3797cf80..8cfbd6c903 100644
--- a/deps/v8/test/fuzzer/wasm-names-section.cc
+++ b/deps/v8/test/fuzzer/wasm-names-section.cc
@@ -3,9 +3,11 @@
// found in the LICENSE file.
#include "src/objects-inl.h"
-#include "test/fuzzer/wasm-section-fuzzers.h"
+#include "test/fuzzer/wasm-fuzzer-common.h"
+
+using namespace v8::internal::wasm::fuzzer;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
// TODO(titzer): Names section requires a preceding function section.
- return fuzz_wasm_section(v8::internal::wasm::kNameSectionCode, data, size);
+ return FuzzWasmSection(v8::internal::wasm::kNameSectionCode, data, size);
}
diff --git a/deps/v8/test/fuzzer/wasm-section-fuzzers.cc b/deps/v8/test/fuzzer/wasm-section-fuzzers.cc
deleted file mode 100644
index d883c26ec9..0000000000
--- a/deps/v8/test/fuzzer/wasm-section-fuzzers.cc
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright 2016 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "test/fuzzer/wasm-section-fuzzers.h"
-
-#include "include/v8.h"
-#include "src/isolate.h"
-#include "src/objects-inl.h"
-#include "src/wasm/wasm-module-builder.h"
-#include "src/wasm/wasm-module.h"
-#include "src/zone/accounting-allocator.h"
-#include "src/zone/zone.h"
-#include "test/common/wasm/wasm-module-runner.h"
-#include "test/fuzzer/fuzzer-support.h"
-
-using namespace v8::internal::wasm;
-
-static const char* kNameString = "name";
-static const size_t kNameStringLength = 4;
-
-int fuzz_wasm_section(SectionCode section, const uint8_t* data, size_t size) {
- v8_fuzzer::FuzzerSupport* support = v8_fuzzer::FuzzerSupport::Get();
- v8::Isolate* isolate = support->GetIsolate();
- v8::internal::Isolate* i_isolate =
- reinterpret_cast<v8::internal::Isolate*>(isolate);
-
- // Clear any pending exceptions from a prior run.
- if (i_isolate->has_pending_exception()) {
- i_isolate->clear_pending_exception();
- }
-
- v8::Isolate::Scope isolate_scope(isolate);
- v8::HandleScope handle_scope(isolate);
- v8::Context::Scope context_scope(support->GetContext());
- v8::TryCatch try_catch(isolate);
-
- v8::internal::AccountingAllocator allocator;
- v8::internal::Zone zone(&allocator, ZONE_NAME);
-
- ZoneBuffer buffer(&zone);
- buffer.write_u32(kWasmMagic);
- buffer.write_u32(kWasmVersion);
- if (section == kNameSectionCode) {
- buffer.write_u8(kUnknownSectionCode);
- buffer.write_size(size + kNameStringLength + 1);
- buffer.write_u8(kNameStringLength);
- buffer.write(reinterpret_cast<const uint8_t*>(kNameString),
- kNameStringLength);
- buffer.write(data, size);
- } else {
- buffer.write_u8(section);
- buffer.write_size(size);
- buffer.write(data, size);
- }
-
- ErrorThrower thrower(i_isolate, "decoder");
-
- std::unique_ptr<const WasmModule> module(testing::DecodeWasmModuleForTesting(
- i_isolate, &thrower, buffer.begin(), buffer.end(), kWasmOrigin));
-
- return 0;
-}
diff --git a/deps/v8/test/fuzzer/wasm-section-fuzzers.h b/deps/v8/test/fuzzer/wasm-section-fuzzers.h
deleted file mode 100644
index 5d38981cf4..0000000000
--- a/deps/v8/test/fuzzer/wasm-section-fuzzers.h
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2016 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef WASM_SECTION_FUZZERS_H_
-#define WASM_SECTION_FUZZERS_H_
-
-#include <stddef.h>
-#include <stdint.h>
-
-#include "src/wasm/module-decoder.h"
-
-int fuzz_wasm_section(v8::internal::wasm::SectionCode section,
- const uint8_t* data, size_t size);
-
-#endif // WASM_SECTION_FUZZERS_H_
diff --git a/deps/v8/test/fuzzer/wasm-types-section.cc b/deps/v8/test/fuzzer/wasm-types-section.cc
index 2d7e91e32a..cdd99067e7 100644
--- a/deps/v8/test/fuzzer/wasm-types-section.cc
+++ b/deps/v8/test/fuzzer/wasm-types-section.cc
@@ -3,8 +3,10 @@
// found in the LICENSE file.
#include "src/objects-inl.h"
-#include "test/fuzzer/wasm-section-fuzzers.h"
+#include "test/fuzzer/wasm-fuzzer-common.h"
+
+using namespace v8::internal::wasm::fuzzer;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
- return fuzz_wasm_section(v8::internal::wasm::kTypeSectionCode, data, size);
+ return FuzzWasmSection(v8::internal::wasm::kTypeSectionCode, data, size);
}
diff --git a/deps/v8/test/fuzzer/wasm.tar.gz.sha1 b/deps/v8/test/fuzzer/wasm.tar.gz.sha1
deleted file mode 100644
index 9fc4cf50d2..0000000000
--- a/deps/v8/test/fuzzer/wasm.tar.gz.sha1
+++ /dev/null
@@ -1 +0,0 @@
-43dbe4810e9b08a5add1dd4076e26410e18c828c \ No newline at end of file
diff --git a/deps/v8/test/fuzzer/wasm/foo b/deps/v8/test/fuzzer/wasm/foo
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/deps/v8/test/fuzzer/wasm/foo
diff --git a/deps/v8/test/fuzzer/wasm_asmjs.tar.gz.sha1 b/deps/v8/test/fuzzer/wasm_asmjs.tar.gz.sha1
deleted file mode 100644
index b8cf779dee..0000000000
--- a/deps/v8/test/fuzzer/wasm_asmjs.tar.gz.sha1
+++ /dev/null
@@ -1 +0,0 @@
-3a2c9658f3f644c7b8c309201b964fedc2766f9c \ No newline at end of file
diff --git a/deps/v8/test/fuzzer/wasm_asmjs/foo b/deps/v8/test/fuzzer/wasm_asmjs/foo
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/deps/v8/test/fuzzer/wasm_asmjs/foo
diff --git a/deps/v8/test/fuzzer/wasm_asmjs_corpus.tar.gz.sha1 b/deps/v8/test/fuzzer/wasm_asmjs_corpus.tar.gz.sha1
new file mode 100644
index 0000000000..865ca915f2
--- /dev/null
+++ b/deps/v8/test/fuzzer/wasm_asmjs_corpus.tar.gz.sha1
@@ -0,0 +1 @@
+cf1777646f8d4557504442e9bd59e908519ffec8 \ No newline at end of file
diff --git a/deps/v8/test/fuzzer/wasm_corpus.tar.gz.sha1 b/deps/v8/test/fuzzer/wasm_corpus.tar.gz.sha1
new file mode 100644
index 0000000000..32bfeceb0a
--- /dev/null
+++ b/deps/v8/test/fuzzer/wasm_corpus.tar.gz.sha1
@@ -0,0 +1 @@
+f6b95b7dd8300efa84b6382f16cfcae4ec9fa108 \ No newline at end of file
diff --git a/deps/v8/test/inspector/BUILD.gn b/deps/v8/test/inspector/BUILD.gn
index 5298c09a89..cffcd294bd 100644
--- a/deps/v8/test/inspector/BUILD.gn
+++ b/deps/v8/test/inspector/BUILD.gn
@@ -11,6 +11,8 @@ v8_executable("inspector-test") {
"inspector-impl.cc",
"inspector-impl.h",
"inspector-test.cc",
+ "isolate-data.cc",
+ "isolate-data.h",
"task-runner.cc",
"task-runner.h",
]
@@ -24,7 +26,7 @@ v8_executable("inspector-test") {
"../..:v8",
"../..:v8_libbase",
"../..:v8_libplatform",
- "//build/config/sanitizers:deps",
+ "//build/config:exe_and_shlib_deps",
"//build/win:default_exe_manifest",
]
diff --git a/deps/v8/test/inspector/console/destroy-context-during-log-expected.txt b/deps/v8/test/inspector/console/destroy-context-during-log-expected.txt
index c8e9293ff2..d345b1204c 100644
--- a/deps/v8/test/inspector/console/destroy-context-during-log-expected.txt
+++ b/deps/v8/test/inspector/console/destroy-context-during-log-expected.txt
@@ -1,3 +1,4 @@
+Tests that destroying context from inside of console.log does not crash
{
type : string
value : First inspector activity after attaching inspector
diff --git a/deps/v8/test/inspector/console/destroy-context-during-log.js b/deps/v8/test/inspector/console/destroy-context-during-log.js
index 9c5753ffc0..0fa7c16d7c 100644
--- a/deps/v8/test/inspector/console/destroy-context-during-log.js
+++ b/deps/v8/test/inspector/console/destroy-context-during-log.js
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests that destroying context from inside of console.log does not crash');
+
const expression = `
Object.defineProperty(Object.prototype, 'RemoteObject', {
configurable: true,
@@ -10,11 +12,11 @@ const expression = `
delete Object.prototype.RemoteObject;
this.RemoteObject = v;
- detachInspector();
+ inspector.fireContextDestroyed();
setTimeout(function() {
// Attach the inspector again for the sake of establishing a
// communication channel with the frontend test runner.
- attachInspector();
+ inspector.fireContextCreated();
console.log("End of test");
}, 0);
},
@@ -23,8 +25,8 @@ const expression = `
// Before the whole script runs, the inspector is already attached.
// Re-attach the inspector and trigger the console API to make sure that the
// injected inspector script runs again (and triggers the above setter).
- detachInspector();
- attachInspector();
+ inspector.fireContextDestroyed();
+ inspector.fireContextCreated();
console.log("First inspector activity after attaching inspector");
console.log("End of test");
`;
diff --git a/deps/v8/test/inspector/console/let-const-with-api-expected.txt b/deps/v8/test/inspector/console/let-const-with-api-expected.txt
index a5b889632d..0ea6476c4a 100644
--- a/deps/v8/test/inspector/console/let-const-with-api-expected.txt
+++ b/deps/v8/test/inspector/console/let-const-with-api-expected.txt
@@ -1,3 +1,4 @@
+Tests how let and const interact with command line api
first "let a = 1;" result: wasThrown = false
second "let a = 1;" result: wasThrown = true
exception message: Uncaught SyntaxError: Identifier 'a' has already been declared
@@ -16,4 +17,4 @@ function debug(function) { [Command Line API] }
function undebug(function) { [Command Line API] }
function monitor(function) { [Command Line API] }
function unmonitor(function) { [Command Line API] }
-function table(data, [columns]) { [Command Line API] } \ No newline at end of file
+function table(data, [columns]) { [Command Line API] }
diff --git a/deps/v8/test/inspector/console/let-const-with-api.js b/deps/v8/test/inspector/console/let-const-with-api.js
index 0280fe1174..b51572d08e 100644
--- a/deps/v8/test/inspector/console/let-const-with-api.js
+++ b/deps/v8/test/inspector/console/let-const-with-api.js
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests how let and const interact with command line api');
+
Protocol.Runtime.evaluate({ expression: "let a = 42;" }).then(step2);
function step2(response)
diff --git a/deps/v8/test/inspector/cpu-profiler/console-profile-end-parameterless-crash-expected.txt b/deps/v8/test/inspector/cpu-profiler/console-profile-end-parameterless-crash-expected.txt
index a28765a100..a2988ad4c3 100644
--- a/deps/v8/test/inspector/cpu-profiler/console-profile-end-parameterless-crash-expected.txt
+++ b/deps/v8/test/inspector/cpu-profiler/console-profile-end-parameterless-crash-expected.txt
@@ -1,3 +1,3 @@
Tests that "console.profileEnd()" does not cause crash. (webkit:105759)
SUCCESS: found 2 profile headers
-SUCCESS: titled profile found \ No newline at end of file
+SUCCESS: titled profile found
diff --git a/deps/v8/test/inspector/cpu-profiler/console-profile-end-parameterless-crash.js b/deps/v8/test/inspector/cpu-profiler/console-profile-end-parameterless-crash.js
index 415b703c36..d0d995e37e 100644
--- a/deps/v8/test/inspector/cpu-profiler/console-profile-end-parameterless-crash.js
+++ b/deps/v8/test/inspector/cpu-profiler/console-profile-end-parameterless-crash.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Tests that \"console.profileEnd()\" does not cause crash. (webkit:105759)");
+let {session, contextGroup, Protocol} = InspectorTest.start("Tests that \"console.profileEnd()\" does not cause crash. (webkit:105759)");
-InspectorTest.addScript(`
+contextGroup.addScript(`
function collectProfiles()
{
console.profile();
diff --git a/deps/v8/test/inspector/cpu-profiler/console-profile-expected.txt b/deps/v8/test/inspector/cpu-profiler/console-profile-expected.txt
index b3da7ba0c1..7bb8bc940d 100644
--- a/deps/v8/test/inspector/cpu-profiler/console-profile-expected.txt
+++ b/deps/v8/test/inspector/cpu-profiler/console-profile-expected.txt
@@ -1,3 +1,3 @@
Tests that console.profile/profileEnd will record CPU profile when inspector front-end is connected.
SUCCESS: retrieved '42' profile
-SUCCESS: found 'collectProfiles' function in the profile \ No newline at end of file
+SUCCESS: found 'collectProfiles' function in the profile
diff --git a/deps/v8/test/inspector/cpu-profiler/console-profile.js b/deps/v8/test/inspector/cpu-profiler/console-profile.js
index b8e36b6861..9aa7542cea 100644
--- a/deps/v8/test/inspector/cpu-profiler/console-profile.js
+++ b/deps/v8/test/inspector/cpu-profiler/console-profile.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Tests that console.profile/profileEnd will record CPU profile when inspector front-end is connected.");
+let {session, contextGroup, Protocol} = InspectorTest.start("Tests that console.profile/profileEnd will record CPU profile when inspector front-end is connected.");
-InspectorTest.addScript(`
+contextGroup.addScript(`
function collectProfiles()
{
console.profile("outer");
diff --git a/deps/v8/test/inspector/cpu-profiler/coverage.js b/deps/v8/test/inspector/cpu-profiler/coverage.js
index a059467b2e..ce4995fd1c 100644
--- a/deps/v8/test/inspector/cpu-profiler/coverage.js
+++ b/deps/v8/test/inspector/cpu-profiler/coverage.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --no-always-opt --crankshaft
+// Flags: --allow-natives-syntax --no-always-opt --opt
var source =
`
@@ -50,7 +50,7 @@ var f = (function outer() {
f()()();
`;
-InspectorTest.log("Test collecting code coverage data with Profiler.collectCoverage.");
+let {session, contextGroup, Protocol} = InspectorTest.start("Test collecting code coverage data with Profiler.collectCoverage.");
function ClearAndGC() {
return Protocol.Runtime.evaluate({ expression: "fib = g = f = h = is_optimized = null;" })
diff --git a/deps/v8/test/inspector/cpu-profiler/enable-disable-expected.txt b/deps/v8/test/inspector/cpu-profiler/enable-disable-expected.txt
index 05d3fd3d5f..aa3507c934 100644
--- a/deps/v8/test/inspector/cpu-profiler/enable-disable-expected.txt
+++ b/deps/v8/test/inspector/cpu-profiler/enable-disable-expected.txt
@@ -5,4 +5,4 @@ PASS: console initiated profile started
PASS: didStartConsoleProfile
PASS: didDisableProfiler
PASS: no front-end initiated profiles found
-PASS: didStopConsoleProfile \ No newline at end of file
+PASS: didStopConsoleProfile
diff --git a/deps/v8/test/inspector/cpu-profiler/enable-disable.js b/deps/v8/test/inspector/cpu-profiler/enable-disable.js
index b342a162c4..0e9b94dc5c 100644
--- a/deps/v8/test/inspector/cpu-profiler/enable-disable.js
+++ b/deps/v8/test/inspector/cpu-profiler/enable-disable.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Test that profiling can only be started when Profiler was enabled and that Profiler.disable command will stop recording all profiles.");
+let {session, contextGroup, Protocol} = InspectorTest.start("Test that profiling can only be started when Profiler was enabled and that Profiler.disable command will stop recording all profiles.");
Protocol.Profiler.start().then(didFailToStartWhenDisabled);
disallowConsoleProfiles();
@@ -31,7 +31,7 @@ function allowConsoleProfiles()
}
function didFailToStartWhenDisabled(messageObject)
{
- if (!InspectorTest.expectedError("didFailToStartWhenDisabled", messageObject))
+ if (!expectedError("didFailToStartWhenDisabled", messageObject))
return;
allowConsoleProfiles();
Protocol.Profiler.enable();
@@ -39,21 +39,21 @@ function didFailToStartWhenDisabled(messageObject)
}
function didStartFrontendProfile(messageObject)
{
- if (!InspectorTest.expectedSuccess("didStartFrontendProfile", messageObject))
+ if (!expectedSuccess("didStartFrontendProfile", messageObject))
return;
Protocol.Runtime.evaluate({expression: "console.profile('p1');"}).then(didStartConsoleProfile);
}
function didStartConsoleProfile(messageObject)
{
- if (!InspectorTest.expectedSuccess("didStartConsoleProfile", messageObject))
+ if (!expectedSuccess("didStartConsoleProfile", messageObject))
return;
Protocol.Profiler.disable().then(didDisableProfiler);
}
function didDisableProfiler(messageObject)
{
- if (!InspectorTest.expectedSuccess("didDisableProfiler", messageObject))
+ if (!expectedSuccess("didDisableProfiler", messageObject))
return;
Protocol.Profiler.enable();
Protocol.Profiler.stop().then(didStopFrontendProfile);
@@ -61,7 +61,7 @@ function didDisableProfiler(messageObject)
function didStopFrontendProfile(messageObject)
{
- if (!InspectorTest.expectedError("no front-end initiated profiles found", messageObject))
+ if (!expectedError("no front-end initiated profiles found", messageObject))
return;
disallowConsoleProfiles();
Protocol.Runtime.evaluate({expression: "console.profileEnd();"}).then(didStopConsoleProfile);
@@ -69,7 +69,21 @@ function didStopFrontendProfile(messageObject)
function didStopConsoleProfile(messageObject)
{
- if (!InspectorTest.expectedSuccess("didStopConsoleProfile", messageObject))
+ if (!expectedSuccess("didStopConsoleProfile", messageObject))
return;
InspectorTest.completeTest();
}
+
+function checkExpectation(fail, name, messageObject)
+{
+ if (fail === !!messageObject.error) {
+ InspectorTest.log("PASS: " + name);
+ return true;
+ }
+
+ InspectorTest.log("FAIL: " + name + ": " + JSON.stringify(messageObject));
+ InspectorTest.completeTest();
+ return false;
+}
+var expectedSuccess = checkExpectation.bind(null, false);
+var expectedError = checkExpectation.bind(null, true);
diff --git a/deps/v8/test/inspector/cpu-profiler/record-cpu-profile-expected.txt b/deps/v8/test/inspector/cpu-profiler/record-cpu-profile-expected.txt
index d810093968..4ff20a253d 100644
--- a/deps/v8/test/inspector/cpu-profiler/record-cpu-profile-expected.txt
+++ b/deps/v8/test/inspector/cpu-profiler/record-cpu-profile-expected.txt
@@ -4,4 +4,4 @@ PASS: startConsoleProfile
PASS: stopConsoleProfile
PASS: stoppedFrontendProfile
PASS: startFrontendProfileSecondTime
-PASS: stopFrontendProfileSecondTime \ No newline at end of file
+PASS: stopFrontendProfileSecondTime
diff --git a/deps/v8/test/inspector/cpu-profiler/record-cpu-profile.js b/deps/v8/test/inspector/cpu-profiler/record-cpu-profile.js
index c87d600124..3799cf74f5 100644
--- a/deps/v8/test/inspector/cpu-profiler/record-cpu-profile.js
+++ b/deps/v8/test/inspector/cpu-profiler/record-cpu-profile.js
@@ -2,47 +2,61 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Test that profiler is able to record a profile. Also it tests that profiler returns an error when it unable to find the profile.");
+let {session, contextGroup, Protocol} = InspectorTest.start("Test that profiler is able to record a profile. Also it tests that profiler returns an error when it unable to find the profile.");
Protocol.Profiler.enable();
Protocol.Profiler.start().then(didStartFrontendProfile);
function didStartFrontendProfile(messageObject)
{
- if (!InspectorTest.expectedSuccess("startFrontendProfile", messageObject))
+ if (!expectedSuccess("startFrontendProfile", messageObject))
return;
Protocol.Runtime.evaluate({expression: "console.profile('Profile 1');"}).then(didStartConsoleProfile);
}
function didStartConsoleProfile(messageObject)
{
- if (!InspectorTest.expectedSuccess("startConsoleProfile", messageObject))
+ if (!expectedSuccess("startConsoleProfile", messageObject))
return;
Protocol.Runtime.evaluate({expression: "console.profileEnd('Profile 1');"}).then(didStopConsoleProfile);
}
function didStopConsoleProfile(messageObject)
{
- if (!InspectorTest.expectedSuccess("stopConsoleProfile", messageObject))
+ if (!expectedSuccess("stopConsoleProfile", messageObject))
return;
Protocol.Profiler.stop().then(didStopFrontendProfile);
}
function didStopFrontendProfile(messageObject)
{
- if (!InspectorTest.expectedSuccess("stoppedFrontendProfile", messageObject))
+ if (!expectedSuccess("stoppedFrontendProfile", messageObject))
return;
Protocol.Profiler.start().then(didStartFrontendProfile2);
}
function didStartFrontendProfile2(messageObject)
{
- if (!InspectorTest.expectedSuccess("startFrontendProfileSecondTime", messageObject))
+ if (!expectedSuccess("startFrontendProfileSecondTime", messageObject))
return;
Protocol.Profiler.stop().then(didStopFrontendProfile2);
}
function didStopFrontendProfile2(messageObject)
{
- InspectorTest.expectedSuccess("stopFrontendProfileSecondTime", messageObject)
+ expectedSuccess("stopFrontendProfileSecondTime", messageObject)
InspectorTest.completeTest();
}
+
+function checkExpectation(fail, name, messageObject)
+{
+ if (fail === !!messageObject.error) {
+ InspectorTest.log("PASS: " + name);
+ return true;
+ }
+
+ InspectorTest.log("FAIL: " + name + ": " + JSON.stringify(messageObject));
+ InspectorTest.completeTest();
+ return false;
+}
+var expectedSuccess = checkExpectation.bind(null, false);
+var expectedError = checkExpectation.bind(null, true);
diff --git a/deps/v8/test/inspector/cpu-profiler/stop-without-preceeding-start-expected.txt b/deps/v8/test/inspector/cpu-profiler/stop-without-preceeding-start-expected.txt
index 91b5c9e6e2..2c6dd1e38f 100644
--- a/deps/v8/test/inspector/cpu-profiler/stop-without-preceeding-start-expected.txt
+++ b/deps/v8/test/inspector/cpu-profiler/stop-without-preceeding-start-expected.txt
@@ -1,2 +1,2 @@
Test that profiler doesn't crash when we call stop without preceeding start.
-PASS: ProfileAgent.stop \ No newline at end of file
+PASS: ProfileAgent.stop
diff --git a/deps/v8/test/inspector/cpu-profiler/stop-without-preceeding-start.js b/deps/v8/test/inspector/cpu-profiler/stop-without-preceeding-start.js
index 5fdf098fe1..5f21e653f1 100644
--- a/deps/v8/test/inspector/cpu-profiler/stop-without-preceeding-start.js
+++ b/deps/v8/test/inspector/cpu-profiler/stop-without-preceeding-start.js
@@ -2,11 +2,25 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Test that profiler doesn't crash when we call stop without preceeding start.");
+let {session, contextGroup, Protocol} = InspectorTest.start("Test that profiler doesn't crash when we call stop without preceeding start.");
Protocol.Profiler.stop().then(didStopProfile);
function didStopProfile(messageObject)
{
- InspectorTest.expectedError("ProfileAgent.stop", messageObject);
+ expectedError("ProfileAgent.stop", messageObject);
InspectorTest.completeTest();
}
+
+function checkExpectation(fail, name, messageObject)
+{
+ if (fail === !!messageObject.error) {
+ InspectorTest.log("PASS: " + name);
+ return true;
+ }
+
+ InspectorTest.log("FAIL: " + name + ": " + JSON.stringify(messageObject));
+ InspectorTest.completeTest();
+ return false;
+}
+var expectedSuccess = checkExpectation.bind(null, false);
+var expectedError = checkExpectation.bind(null, true);
diff --git a/deps/v8/test/inspector/debugger/access-obsolete-frame-expected.txt b/deps/v8/test/inspector/debugger/access-obsolete-frame-expected.txt
index 643d382f24..7093d76c2e 100644
--- a/deps/v8/test/inspector/debugger/access-obsolete-frame-expected.txt
+++ b/deps/v8/test/inspector/debugger/access-obsolete-frame-expected.txt
@@ -1,3 +1,4 @@
+Tests that accessing no longer valid call frames returns an error
Paused on 'debugger;'
resume
restartFrame
@@ -5,4 +6,4 @@ PASS, error message as expected
evaluateOnFrame
PASS, error message as expected
setVariableValue
-PASS, error message as expected \ No newline at end of file
+PASS, error message as expected
diff --git a/deps/v8/test/inspector/debugger/access-obsolete-frame.js b/deps/v8/test/inspector/debugger/access-obsolete-frame.js
index b5a96e1c3c..9d498e041d 100644
--- a/deps/v8/test/inspector/debugger/access-obsolete-frame.js
+++ b/deps/v8/test/inspector/debugger/access-obsolete-frame.js
@@ -2,7 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.addScript(`
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests that accessing no longer valid call frames returns an error');
+
+contextGroup.addScript(`
function testFunction()
{
debugger;
diff --git a/deps/v8/test/inspector/debugger/asm-js-breakpoint-before-exec.js b/deps/v8/test/inspector/debugger/asm-js-breakpoint-before-exec.js
index 78a7b8e57e..ec760ecf08 100644
--- a/deps/v8/test/inspector/debugger/asm-js-breakpoint-before-exec.js
+++ b/deps/v8/test/inspector/debugger/asm-js-breakpoint-before-exec.js
@@ -4,7 +4,7 @@
// Flags: --validate-asm --allow-natives-syntax
-InspectorTest.log(
+let {session, contextGroup, Protocol} = InspectorTest.start(
'This test runs asm.js which calls back to JS. Before executing (after ' +
'the script is parsed) we set breakpoints in the asm.js code.');
@@ -50,7 +50,7 @@ InspectorTest.runTestSuite([
function addScript(next) {
afterScriptParsedCallback = next;
- InspectorTest.addScript(testFunction.toString());
+ contextGroup.addScript(testFunction.toString());
},
function runTestFunction(next) {
diff --git a/deps/v8/test/inspector/debugger/asm-js-breakpoint-during-exec.js b/deps/v8/test/inspector/debugger/asm-js-breakpoint-during-exec.js
index 2a29dc1ea4..af3ac518b3 100644
--- a/deps/v8/test/inspector/debugger/asm-js-breakpoint-during-exec.js
+++ b/deps/v8/test/inspector/debugger/asm-js-breakpoint-during-exec.js
@@ -4,7 +4,7 @@
// Flags: --validate-asm --allow-natives-syntax
-InspectorTest.log(
+let {session, contextGroup, Protocol} = InspectorTest.start(
'This test runs asm.js which calls back to JS. JS triggers a break, on ' +
'pause we set breakpoints in the asm.js code.');
@@ -53,7 +53,7 @@ InspectorTest.runTestSuite([
function addScript(next) {
afterScriptParsedCallback = next;
- InspectorTest.addScript(testFunction.toString());
+ contextGroup.addScript(testFunction.toString());
},
function runTestFunction(next) {
diff --git a/deps/v8/test/inspector/debugger/asm-js-stack-expected.txt b/deps/v8/test/inspector/debugger/asm-js-stack-expected.txt
index f3bfd8de6a..e028f2a595 100644
--- a/deps/v8/test/inspector/debugger/asm-js-stack-expected.txt
+++ b/deps/v8/test/inspector/debugger/asm-js-stack-expected.txt
@@ -1,3 +1,4 @@
+Tests that asm-js scripts produce correct stack
Paused on 'debugger;'
Number of frames: 5
- [0] {"functionName":"call_debugger","function_lineNumber":13,"function_columnNumber":24,"lineNumber":14,"columnNumber":4}
diff --git a/deps/v8/test/inspector/debugger/asm-js-stack.js b/deps/v8/test/inspector/debugger/asm-js-stack.js
index 37db088ba1..916ac5f22a 100644
--- a/deps/v8/test/inspector/debugger/asm-js-stack.js
+++ b/deps/v8/test/inspector/debugger/asm-js-stack.js
@@ -4,6 +4,8 @@
// Flags: --validate-asm
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests that asm-js scripts produce correct stack');
+
function testFunction() {
function generateAsmJs(stdlib, foreign, heap) {
'use asm';
@@ -25,7 +27,7 @@ function testFunction() {
fun();
}
-InspectorTest.addScript(testFunction.toString());
+contextGroup.addScript(testFunction.toString());
Protocol.Debugger.enable();
Protocol.Debugger.oncePaused().then(handleDebuggerPaused);
diff --git a/deps/v8/test/inspector/debugger/async-console-count-doesnt-crash.js b/deps/v8/test/inspector/debugger/async-console-count-doesnt-crash.js
index 57c308878d..14f09b31a7 100644
--- a/deps/v8/test/inspector/debugger/async-console-count-doesnt-crash.js
+++ b/deps/v8/test/inspector/debugger/async-console-count-doesnt-crash.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("setTimeout(console.count, 0) doesn't crash with enabled async stacks.")
+let {session, contextGroup, Protocol} = InspectorTest.start("setTimeout(console.count, 0) doesn't crash with enabled async stacks.")
Protocol.Debugger.enable();
Protocol.Debugger.setAsyncCallStackDepth({ maxDepth: 1 });
Protocol.Runtime.evaluate({ expression: "setTimeout(console.count, 0)" });
-InspectorTest.completeTestAfterPendingTimeouts();
+InspectorTest.waitForPendingTasks().then(InspectorTest.completeTest);
diff --git a/deps/v8/test/inspector/debugger/async-for-await-of-promise-stack-expected.txt b/deps/v8/test/inspector/debugger/async-for-await-of-promise-stack-expected.txt
index fb1403917a..0cfa3c4349 100644
--- a/deps/v8/test/inspector/debugger/async-for-await-of-promise-stack-expected.txt
+++ b/deps/v8/test/inspector/debugger/async-for-await-of-promise-stack-expected.txt
@@ -1,57 +1,58 @@
Checks that async chains for for-await-of are correct.
Running test: testBasic
-Debugger (test.js:10:2)
-Basic (test.js:48:4)
--- async function (test.js:46:20)--
-Basic (test.js:46:20)
+Debugger (test.js:12:2)
+Basic (test.js:50:4)
+-- async function --
+Basic (test.js:48:20)
(anonymous) (testBasic.js:0:0)
Running test: testUncaughtReject
-Debugger (test.js:10:2)
--- async function (test.js:52:29)--
-UncaughtReject (test.js:52:29)
+Debugger (test.js:12:2)
+-- async function --
+UncaughtReject (test.js:54:29)
(anonymous) (testUncaughtReject.js:0:0)
Running test: testUncaughtThrow
-Debugger (test.js:10:2)
--- async function (test.js:61:28)--
-UncaughtThrow (test.js:61:28)
+Debugger (test.js:12:2)
+-- async function --
+UncaughtThrow (test.js:63:28)
(anonymous) (testUncaughtThrow.js:0:0)
Running test: testCaughtReject
-Debugger (test.js:10:2)
-CaughtReject (test.js:76:4)
--- async function (test.js:70:27)--
-CaughtReject (test.js:70:27)
+Debugger (test.js:12:2)
+CaughtReject (test.js:78:4)
+-- async function --
+CaughtReject (test.js:72:27)
(anonymous) (testCaughtReject.js:0:0)
Running test: testCaughtThrow
-Debugger (test.js:10:2)
-CaughtThrow (test.js:86:4)
--- async function (test.js:80:26)--
-CaughtThrow (test.js:80:26)
+Debugger (test.js:12:2)
+CaughtThrow (test.js:88:4)
+-- async function --
+CaughtThrow (test.js:82:26)
(anonymous) (testCaughtThrow.js:0:0)
Running test: testUncaughtRejectOnBreak
Running test: testUncaughtThrowOnBreak
-Debugger (test.js:10:2)
--- async function (test.js:99:35)--
-UncaughtThrowOnBreak (test.js:99:35)
+Debugger (test.js:12:2)
+-- async function --
+UncaughtThrowOnBreak (test.js:101:35)
(anonymous) (testUncaughtThrowOnBreak.js:0:0)
Running test: testCaughtRejectOnBreak
Running test: testCaughtThrowOnBreak
-Debugger (test.js:10:2)
-CaughtThrowOnBreak (test.js:124:4)
--- async function (test.js:118:33)--
-CaughtThrowOnBreak (test.js:118:33)
-(anonymous) (testCaughtThrowOnBreak.js:0:0) \ No newline at end of file
+Debugger (test.js:12:2)
+CaughtThrowOnBreak (test.js:126:4)
+-- async function --
+CaughtThrowOnBreak (test.js:120:33)
+(anonymous) (testCaughtThrowOnBreak.js:0:0)
+
diff --git a/deps/v8/test/inspector/debugger/async-for-await-of-promise-stack.js b/deps/v8/test/inspector/debugger/async-for-await-of-promise-stack.js
index 4e6c0bf15e..6a2f4ce972 100644
--- a/deps/v8/test/inspector/debugger/async-for-await-of-promise-stack.js
+++ b/deps/v8/test/inspector/debugger/async-for-await-of-promise-stack.js
@@ -4,9 +4,9 @@
// Flags: --harmony-async-iteration
-InspectorTest.log('Checks that async chains for for-await-of are correct.');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks that async chains for for-await-of are correct.');
-InspectorTest.addScript(`
+contextGroup.addScript(`
function Debugger(value) {
debugger;
@@ -50,7 +50,7 @@ async function Basic() {
Debugger();
}
}
-
+// TODO(kozyatinskiy): this stack trace is suspicious.
async function UncaughtReject() {
async function loop() {
for await (let x of [Reject(new Error("boop"))]) {
@@ -59,7 +59,7 @@ async function UncaughtReject() {
}
return loop().catch(Debugger);
}
-
+// TODO(kozyatinskiy): this stack trace is suspicious.
async function UncaughtThrow() {
async function loop() {
for await (let x of [Throw(new Error("boop"))]) {
@@ -88,7 +88,7 @@ async function CaughtThrow() {
Debugger(e);
}
}
-
+// TODO(kozyatinskiy): this stack trace is suspicious.
async function UncaughtRejectOnBreak() {
async function loop() {
for await (let x of RejectOnReturn(["0", "1"])) {
@@ -97,7 +97,7 @@ async function UncaughtRejectOnBreak() {
}
return loop().catch(Debugger);
}
-
+// TODO(kozyatinskiy): this stack trace is suspicious.
async function UncaughtThrowOnBreak() {
async function loop() {
for await (let x of ThrowOnReturn(["0", "1"])) {
@@ -106,7 +106,7 @@ async function UncaughtThrowOnBreak() {
}
return loop().catch(Debugger);
}
-
+// TODO(kozyatinskiy): this stack trace is suspicious.
async function CaughtRejectOnBreak() {
try {
for await (let x of RejectOnReturn(["0", "1"])) {
@@ -126,12 +126,12 @@ async function CaughtThrowOnBreak() {
Debugger(e);
}
}
-//# sourceURL=test.js`, 7, 129);
+//# sourceURL=test.js`, 9, 26);
-InspectorTest.setupScriptMap();
+session.setupScriptMap();
Protocol.Debugger.onPaused(message => {
- InspectorTest.logCallFrames(message.params.callFrames);
- InspectorTest.logAsyncStackTrace(message.params.asyncStackTrace);
+ session.logCallFrames(message.params.callFrames);
+ session.logAsyncStackTrace(message.params.asyncStackTrace);
InspectorTest.log('');
Protocol.Debugger.resume();
});
diff --git a/deps/v8/test/inspector/debugger/async-instrumentation-expected.txt b/deps/v8/test/inspector/debugger/async-instrumentation-expected.txt
index 2a538879ae..3b9f58aefc 100644
--- a/deps/v8/test/inspector/debugger/async-instrumentation-expected.txt
+++ b/deps/v8/test/inspector/debugger/async-instrumentation-expected.txt
@@ -9,12 +9,12 @@ test (test.js:21:2)
foo (test.js:10:2)
-- Promise.resolve --
-test (test.js:20:2)
+test (test.js:19:14)
(anonymous) (expr1.js:0:0)
foo (test.js:12:2)
-- Promise.resolve --
-test (test.js:20:2)
+test (test.js:19:14)
(anonymous) (expr1.js:0:0)
diff --git a/deps/v8/test/inspector/debugger/async-instrumentation.js b/deps/v8/test/inspector/debugger/async-instrumentation.js
index 6997c17ffe..6de2ce7d2f 100644
--- a/deps/v8/test/inspector/debugger/async-instrumentation.js
+++ b/deps/v8/test/inspector/debugger/async-instrumentation.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Checks async instrumentation enabled in the middle.');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks async instrumentation enabled in the middle.');
-InspectorTest.addScript(`
+contextGroup.addScript(`
function foo() {
// asyncTaskStarted
debugger;
@@ -24,15 +24,15 @@ function test() {
//# sourceURL=test.js`, 7, 26);
-InspectorTest.setupScriptMap();
+session.setupScriptMap();
Protocol.Debugger.onPaused(message => {
if (enableOnPause-- === 0)
Protocol.Debugger.setAsyncCallStackDepth({ maxDepth: 128 });
- InspectorTest.logCallFrames(message.params.callFrames);
+ session.logCallFrames(message.params.callFrames);
var asyncStackTrace = message.params.asyncStackTrace;
while (asyncStackTrace) {
InspectorTest.log(`-- ${asyncStackTrace.description} --`);
- InspectorTest.logCallFrames(asyncStackTrace.callFrames);
+ session.logCallFrames(asyncStackTrace.callFrames);
asyncStackTrace = asyncStackTrace.parent;
}
InspectorTest.log('');
diff --git a/deps/v8/test/inspector/debugger/async-promise-late-then-expected.txt b/deps/v8/test/inspector/debugger/async-promise-late-then-expected.txt
index ee91377178..dfdf81fe8c 100644
--- a/deps/v8/test/inspector/debugger/async-promise-late-then-expected.txt
+++ b/deps/v8/test/inspector/debugger/async-promise-late-then-expected.txt
@@ -1,16 +1,16 @@
Checks async stack for late .then handlers with gc
foo1 (test.js:11:2)
-- Promise.resolve --
-test (test.js:20:2)
+test (test.js:18:14)
(anonymous) (expr.js:0:0)
foo1 (test.js:11:2)
-- Promise.resolve --
-test (test.js:20:2)
+test (test.js:22:14)
(anonymous) (expr.js:0:0)
foo1 (test.js:11:2)
-- Promise.resolve --
-test (test.js:20:2)
+test (test.js:24:14)
(anonymous) (expr.js:0:0)
diff --git a/deps/v8/test/inspector/debugger/async-promise-late-then.js b/deps/v8/test/inspector/debugger/async-promise-late-then.js
index 83c610b921..cad3c7ed86 100644
--- a/deps/v8/test/inspector/debugger/async-promise-late-then.js
+++ b/deps/v8/test/inspector/debugger/async-promise-late-then.js
@@ -3,9 +3,9 @@
// found in the LICENSE file.
// Flags: --expose-gc
-InspectorTest.log('Checks async stack for late .then handlers with gc');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks async stack for late .then handlers with gc');
-InspectorTest.addScript(`
+contextGroup.addScript(`
function foo1() {
gc();
debugger;
@@ -27,13 +27,13 @@ function test() {
}
//# sourceURL=test.js`, 8, 26);
-InspectorTest.setupScriptMap();
+session.setupScriptMap();
Protocol.Debugger.onPaused(message => {
- InspectorTest.logCallFrames(message.params.callFrames);
+ session.logCallFrames(message.params.callFrames);
var asyncStackTrace = message.params.asyncStackTrace;
while (asyncStackTrace) {
InspectorTest.log(`-- ${asyncStackTrace.description} --`);
- InspectorTest.logCallFrames(asyncStackTrace.callFrames);
+ session.logCallFrames(asyncStackTrace.callFrames);
asyncStackTrace = asyncStackTrace.parent;
}
InspectorTest.log('');
diff --git a/deps/v8/test/inspector/debugger/async-set-timeout.js b/deps/v8/test/inspector/debugger/async-set-timeout.js
index 31712329d3..30096b637f 100644
--- a/deps/v8/test/inspector/debugger/async-set-timeout.js
+++ b/deps/v8/test/inspector/debugger/async-set-timeout.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Checks that async stack contains setTimeout');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks that async stack contains setTimeout');
-InspectorTest.addScript(`
+contextGroup.addScript(`
var resolveCallback;
function foo1() {
function inner1() {
@@ -29,13 +29,13 @@ function foo3() {
}
//# sourceURL=test.js`, 7, 26);
-InspectorTest.setupScriptMap();
+session.setupScriptMap();
Protocol.Debugger.onPaused(message => {
- InspectorTest.logCallFrames(message.params.callFrames);
+ session.logCallFrames(message.params.callFrames);
var asyncStackTrace = message.params.asyncStackTrace;
while (asyncStackTrace) {
InspectorTest.log(`-- ${asyncStackTrace.description} --`);
- InspectorTest.logCallFrames(asyncStackTrace.callFrames);
+ session.logCallFrames(asyncStackTrace.callFrames);
asyncStackTrace = asyncStackTrace.parent;
}
InspectorTest.log('');
diff --git a/deps/v8/test/inspector/debugger/async-stack-await-expected.txt b/deps/v8/test/inspector/debugger/async-stack-await-expected.txt
index 506b9a268a..4ebcefadad 100644
--- a/deps/v8/test/inspector/debugger/async-stack-await-expected.txt
+++ b/deps/v8/test/inspector/debugger/async-stack-await-expected.txt
@@ -1,34 +1,33 @@
Checks that async stacks works for async/await
foo2 (test.js:15:2)
--- async function (test.js:13:19)--
+-- async function --
foo2 (test.js:13:19)
test (test.js:24:8)
(anonymous) (expr.js:0:0)
foo2 (test.js:17:2)
--- async function (test.js:13:19)--
+-- async function --
foo2 (test.js:13:19)
test (test.js:24:8)
(anonymous) (expr.js:0:0)
foo1 (test.js:9:2)
foo2 (test.js:18:8)
--- async function (test.js:13:19)--
+-- async function --
foo2 (test.js:13:19)
test (test.js:24:8)
(anonymous) (expr.js:0:0)
foo1 (test.js:9:2)
--- Promise.resolve (test.js:19:43)--
--- Promise.resolve (test.js:19:16)--
-foo2 (test.js:19:30)
--- async function (test.js:13:19)--
+-- Promise.resolve --
+foo2 (test.js:19:43)
+-- async function --
foo2 (test.js:13:19)
test (test.js:24:8)
(anonymous) (expr.js:0:0)
foo2 (test.js:20:2)
--- async function (test.js:13:19)--
+-- async function --
foo2 (test.js:13:19)
test (test.js:24:8)
(anonymous) (expr.js:0:0)
diff --git a/deps/v8/test/inspector/debugger/async-stack-await.js b/deps/v8/test/inspector/debugger/async-stack-await.js
index 155ff4a978..8f4b162807 100644
--- a/deps/v8/test/inspector/debugger/async-stack-await.js
+++ b/deps/v8/test/inspector/debugger/async-stack-await.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Checks that async stacks works for async/await');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks that async stacks works for async/await');
-InspectorTest.addScript(`
+contextGroup.addScript(`
async function foo1() {
debugger;
return Promise.resolve();
@@ -25,10 +25,10 @@ async function test() {
}
//# sourceURL=test.js`, 7, 26);
-InspectorTest.setupScriptMap();
+session.setupScriptMap();
Protocol.Debugger.onPaused(message => {
- InspectorTest.logCallFrames(message.params.callFrames);
- InspectorTest.logAsyncStackTrace(message.params.asyncStackTrace);
+ session.logCallFrames(message.params.callFrames);
+ session.logAsyncStackTrace(message.params.asyncStackTrace);
InspectorTest.log('');
Protocol.Debugger.resume();
});
diff --git a/deps/v8/test/inspector/debugger/async-stack-created-frame-expected.txt b/deps/v8/test/inspector/debugger/async-stack-created-frame-expected.txt
index 6e61d1aca4..f5197a1669 100644
--- a/deps/v8/test/inspector/debugger/async-stack-created-frame-expected.txt
+++ b/deps/v8/test/inspector/debugger/async-stack-created-frame-expected.txt
@@ -2,88 +2,79 @@ Checks created frame for async call chain
Running test: testPromise
foo1 (test.js:10:2)
--- Promise.resolve (test.js:20:14)--
-promise (test.js:21:2)
+-- Promise.resolve --
+promise (test.js:20:14)
(anonymous) (expr.js:0:0)
Running test: testPromiseThen
foo1 (test.js:10:2)
--- Promise.resolve (test.js:28:14)--
-promiseThen (test.js:30:2)
+-- Promise.resolve --
+promiseThen (test.js:28:14)
(anonymous) (expr.js:0:0)
foo2 (test.js:14:2)
--- Promise.resolve (test.js:29:14)--
--- Promise.resolve (test.js:28:14)--
-promiseThen (test.js:30:2)
+-- Promise.resolve --
+promiseThen (test.js:29:14)
(anonymous) (expr.js:0:0)
Running test: testPromiseThenThen
foo1 (test.js:10:2)
--- Promise.resolve (test.js:37:14)--
-promiseThenThen (test.js:39:2)
+-- Promise.resolve --
+promiseThenThen (test.js:37:14)
(anonymous) (expr.js:0:0)
foo1 (test.js:10:2)
--- Promise.resolve (test.js:38:14)--
-promiseThenThen (test.js:39:2)
+-- Promise.resolve --
+promiseThenThen (test.js:38:14)
(anonymous) (expr.js:0:0)
foo2 (test.js:14:2)
--- Promise.resolve (test.js:37:25)--
--- Promise.resolve (test.js:37:14)--
-promiseThenThen (test.js:39:2)
+-- Promise.resolve --
+promiseThenThen (test.js:37:25)
(anonymous) (expr.js:0:0)
Running test: testPromiseResolve
foo1 (test.js:10:2)
--- Promise.resolve (test.js:44:27)--
-promiseResolve (test.js:44:17)
+-- Promise.resolve --
+promiseResolve (test.js:44:27)
(anonymous) (expr.js:0:0)
Running test: testPromiseReject
foo1 (test.js:10:2)
--- Promise.reject (test.js:48:31)--
-promiseReject (test.js:48:17)
+-- Promise.reject --
+promiseReject (test.js:48:31)
(anonymous) (expr.js:0:0)
Running test: testPromiseAll
foo1 (test.js:10:2)
--- Promise.resolve (test.js:52:44)--
--- Promise.resolve (test.js:52:17)--
-promiseAll (test.js:52:31)
+-- Promise.resolve --
+promiseAll (test.js:52:44)
(anonymous) (expr.js:0:0)
Running test: testPromiseRace
foo1 (test.js:10:2)
--- Promise.resolve (test.js:56:45)--
--- Promise.resolve (test.js:56:17)--
-promiseRace (test.js:56:32)
+-- Promise.resolve --
+promiseRace (test.js:56:45)
(anonymous) (expr.js:0:0)
Running test: testThenableJob1
foo1 (test.js:10:2)
--- Promise.resolve (test.js:60:72)--
--- Promise.resolve (test.js:60:56)--
-Promise.resolve.then (test.js:60:46)
--- Promise.resolve (test.js:60:27)--
-thenableJob1 (test.js:60:17)
+-- Promise.resolve --
+thenableJob1 (test.js:60:72)
(anonymous) (expr.js:0:0)
Running test: testThenableJob2
foo1 (test.js:10:2)
--- Promise.resolve (test.js:64:57)--
-Promise.resolve.then (test.js:64:46)
--- Promise.resolve (test.js:64:27)--
-thenableJob2 (test.js:64:17)
+-- Promise.resolve --
+thenableJob2 (test.js:64:57)
(anonymous) (expr.js:0:0)
diff --git a/deps/v8/test/inspector/debugger/async-stack-created-frame.js b/deps/v8/test/inspector/debugger/async-stack-created-frame.js
index f73591dc29..0f2c7a1e78 100644
--- a/deps/v8/test/inspector/debugger/async-stack-created-frame.js
+++ b/deps/v8/test/inspector/debugger/async-stack-created-frame.js
@@ -2,9 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Checks created frame for async call chain');
+// TODO(kozyatinskiy): fix this test.
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks created frame for async call chain');
-InspectorTest.addScript(
+contextGroup.addScript(
`
function foo1() {
debugger;
@@ -76,10 +77,10 @@ function setTimeouts() {
//# sourceURL=test.js`,
8, 4);
-InspectorTest.setupScriptMap();
+session.setupScriptMap();
Protocol.Debugger.onPaused(message => {
- InspectorTest.logCallFrames(message.params.callFrames);
- InspectorTest.logAsyncStackTrace(message.params.asyncStackTrace);
+ session.logCallFrames(message.params.callFrames);
+ session.logAsyncStackTrace(message.params.asyncStackTrace);
InspectorTest.log('');
Protocol.Debugger.resume();
});
diff --git a/deps/v8/test/inspector/debugger/async-stack-for-promise-expected.txt b/deps/v8/test/inspector/debugger/async-stack-for-promise-expected.txt
index a948803f28..81640849ec 100644
--- a/deps/v8/test/inspector/debugger/async-stack-for-promise-expected.txt
+++ b/deps/v8/test/inspector/debugger/async-stack-for-promise-expected.txt
@@ -2,173 +2,118 @@ Checks that async chains for promises are correct.
Running test: testPromise
foo1 (test.js:9:2)
--- Promise.resolve (test.js:19:14)--
-promise (test.js:20:2)
+-- Promise.resolve --
+promise (test.js:19:14)
(anonymous) (testPromise.js:0:0)
Running test: testPromiseResolvedBySetTimeout
foo1 (test.js:9:2)
--- Promise.resolve (test.js:27:14)--
--- setTimeout --
-promiseResolvedBySetTimeout (test.js:28:2)
+-- Promise.resolve --
+promiseResolvedBySetTimeout (test.js:27:14)
(anonymous) (testPromiseResolvedBySetTimeout.js:0:0)
Running test: testPromiseAll
foo1 (test.js:9:2)
--- Promise.resolve (test.js:37:35)--
--- Promise.resolve (test.js:37:19)--
-promiseAll (test.js:39:2)
+-- Promise.resolve --
+promiseAll (test.js:37:35)
(anonymous) (testPromiseAll.js:0:0)
Running test: testPromiseAllReverseOrder
foo1 (test.js:9:2)
--- Promise.resolve (test.js:48:35)--
--- Promise.resolve (test.js:48:19)--
-promiseAllReverseOrder (test.js:50:2)
+-- Promise.resolve --
+promiseAllReverseOrder (test.js:48:35)
(anonymous) (testPromiseAllReverseOrder.js:0:0)
Running test: testPromiseRace
foo1 (test.js:9:2)
--- Promise.resolve (test.js:59:36)--
--- Promise.resolve (test.js:59:19)--
-promiseRace (test.js:60:2)
+-- Promise.resolve --
+promiseRace (test.js:59:36)
(anonymous) (testPromiseRace.js:0:0)
Running test: testTwoChainedCallbacks
foo1 (test.js:9:2)
--- Promise.resolve (test.js:68:14)--
-twoChainedCallbacks (test.js:69:2)
+-- Promise.resolve --
+twoChainedCallbacks (test.js:68:14)
(anonymous) (testTwoChainedCallbacks.js:0:0)
foo2 (test.js:13:2)
--- Promise.resolve (test.js:68:25)--
--- Promise.resolve (test.js:68:14)--
-twoChainedCallbacks (test.js:69:2)
+-- Promise.resolve --
+twoChainedCallbacks (test.js:68:25)
(anonymous) (testTwoChainedCallbacks.js:0:0)
Running test: testPromiseResolve
foo1 (test.js:9:2)
--- Promise.resolve (test.js:74:27)--
-promiseResolve (test.js:74:17)
+-- Promise.resolve --
+promiseResolve (test.js:74:27)
(anonymous) (testPromiseResolve.js:0:0)
foo2 (test.js:13:2)
--- Promise.resolve (test.js:74:38)--
--- Promise.resolve (test.js:74:27)--
-promiseResolve (test.js:74:17)
+-- Promise.resolve --
+promiseResolve (test.js:74:38)
(anonymous) (testPromiseResolve.js:0:0)
Running test: testThenableJobResolvedInSetTimeout
foo1 (test.js:9:2)
--- Promise.resolve (test.js:86:40)--
--- setTimeout --
-thenableJob (test.js:81:4)
-p1.then (test.js:86:25)
--- Promise.resolve (test.js:86:14)--
-thenableJobResolvedInSetTimeout (test.js:87:2)
+-- Promise.resolve --
+thenableJobResolvedInSetTimeout (test.js:86:40)
(anonymous) (testThenableJobResolvedInSetTimeout.js:0:0)
Running test: testThenableJobResolvedInSetTimeoutWithStack
foo1 (test.js:9:2)
--- Promise.resolve (test.js:104:40)--
-inner (test.js:94:6)
--- setTimeout --
-thenableJob (test.js:99:4)
-p1.then (test.js:104:25)
--- Promise.resolve (test.js:104:14)--
-thenableJobResolvedInSetTimeoutWithStack (test.js:105:2)
+-- Promise.resolve --
+thenableJobResolvedInSetTimeoutWithStack (test.js:104:40)
(anonymous) (testThenableJobResolvedInSetTimeoutWithStack.js:0:0)
Running test: testThenableJobResolvedByPromise
foo1 (test.js:9:2)
--- Promise.resolve (test.js:118:40)--
--- Promise.resolve (test.js:113:22)--
-thenableJob (test.js:113:12)
-p1.then (test.js:118:25)
--- Promise.resolve (test.js:118:14)--
-thenableJobResolvedByPromise (test.js:119:2)
+-- Promise.resolve --
+thenableJobResolvedByPromise (test.js:118:40)
(anonymous) (testThenableJobResolvedByPromise.js:0:0)
Running test: testThenableJobResolvedByPromiseWithStack
foo1 (test.js:9:2)
--- Promise.resolve (test.js:136:40)--
-inner (test.js:126:6)
--- Promise.resolve (test.js:131:22)--
-thenableJob (test.js:131:12)
-p1.then (test.js:136:25)
--- Promise.resolve (test.js:136:14)--
-thenableJobResolvedByPromiseWithStack (test.js:137:2)
+-- Promise.resolve --
+thenableJobResolvedByPromiseWithStack (test.js:136:40)
(anonymous) (testThenableJobResolvedByPromiseWithStack.js:0:0)
Running test: testLateThenCallback
foo1 (test.js:9:2)
--- Promise.resolve (test.js:145:12)--
-lateThenCallback (test.js:144:2)
+-- Promise.resolve --
+lateThenCallback (test.js:145:12)
(anonymous) (testLateThenCallback.js:0:0)
Running test: testComplex
inner1 (test.js:154:6)
foo1 (test.js:156:4)
--- Promise.resolve (test.js:202:5)--
-inner2 (test.js:162:6)
--- Promise.resolve (test.js:165:22)--
-foo2 (test.js:165:12)
--- Promise.resolve (test.js:201:5)--
-inner3 (test.js:172:6)
--- setTimeout --
-foo3 (test.js:175:4)
--- Promise.resolve (test.js:200:5)--
--- Promise.resolve (test.js:199:5)--
--- Promise.resolve (test.js:188:7)--
--- Promise.resolve (test.js:187:19)--
-foo5 (test.js:187:52)
--- Promise.resolve (test.js:198:5)--
--- Promise.resolve (test.js:193:7)--
--- Promise.resolve (test.js:192:19)--
-foo6 (test.js:192:34)
--- Promise.resolve (test.js:197:5)--
-complex (test.js:196:18)
+-- Promise.resolve --
+complex (test.js:202:5)
(anonymous) (testComplex.js:0:0)
p.then (test.js:207:8)
--- Promise.resolve (test.js:206:8)--
--- Promise.resolve (test.js:202:5)--
-inner2 (test.js:162:6)
--- Promise.resolve (test.js:165:22)--
-foo2 (test.js:165:12)
--- Promise.resolve (test.js:201:5)--
-inner3 (test.js:172:6)
+-- Promise.resolve --
+p.then (test.js:206:8)
+-- Promise.resolve --
+setTimeout (test.js:205:6)
-- setTimeout --
-foo3 (test.js:175:4)
--- Promise.resolve (test.js:200:5)--
--- Promise.resolve (test.js:199:5)--
--- Promise.resolve (test.js:188:7)--
--- Promise.resolve (test.js:187:19)--
-foo5 (test.js:187:52)
--- Promise.resolve (test.js:198:5)--
--- Promise.resolve (test.js:193:7)--
--- Promise.resolve (test.js:192:19)--
-foo6 (test.js:192:34)
--- Promise.resolve (test.js:197:5)--
-complex (test.js:196:18)
+complex (test.js:204:2)
(anonymous) (testComplex.js:0:0)
Running test: testReject
foo1 (test.js:9:2)
--- Promise.reject (test.js:217:31)--
-reject (test.js:217:17)
+-- Promise.reject --
+reject (test.js:217:31)
(anonymous) (testReject.js:0:0)
diff --git a/deps/v8/test/inspector/debugger/async-stack-for-promise.js b/deps/v8/test/inspector/debugger/async-stack-for-promise.js
index 9865d7a767..198c971e12 100644
--- a/deps/v8/test/inspector/debugger/async-stack-for-promise.js
+++ b/deps/v8/test/inspector/debugger/async-stack-for-promise.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Checks that async chains for promises are correct.');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks that async chains for promises are correct.');
-InspectorTest.addScript(`
+contextGroup.addScript(`
function foo1() {
debugger;
}
@@ -219,10 +219,10 @@ function reject() {
//# sourceURL=test.js`, 7, 26);
-InspectorTest.setupScriptMap();
+session.setupScriptMap();
Protocol.Debugger.onPaused(message => {
- InspectorTest.logCallFrames(message.params.callFrames);
- InspectorTest.logAsyncStackTrace(message.params.asyncStackTrace);
+ session.logCallFrames(message.params.callFrames);
+ session.logAsyncStackTrace(message.params.asyncStackTrace);
InspectorTest.log('');
Protocol.Debugger.resume();
});
diff --git a/deps/v8/test/inspector/debugger/async-stacks-limit-expected.txt b/deps/v8/test/inspector/debugger/async-stacks-limit-expected.txt
deleted file mode 100644
index 8dd1456990..0000000000
--- a/deps/v8/test/inspector/debugger/async-stacks-limit-expected.txt
+++ /dev/null
@@ -1,140 +0,0 @@
-Checks that async stacks works good with different limits
-
-Running test: testZeroLimit
-foo1 (test.js:11:2)
-
-
-Running test: testTwoLimit
-foo1 (test.js:11:2)
--- Promise.resolve --
-promise (test.js:23:2)
-(anonymous) (expr.js:0:0)
-
-
-Running test: testOneLimitTwoPromises
-foo1 (test.js:11:2)
-
-foo2 (test.js:15:2)
-
-
-Running test: testFourLimitTwoPromises
-foo1 (test.js:11:2)
-
-foo2 (test.js:15:2)
-
-
-Running test: testSixLimitTwoPromises
-foo1 (test.js:11:2)
-
-foo2 (test.js:15:2)
--- Promise.resolve --
-twoPromises (test.js:35:2)
-(anonymous) (expr.js:0:0)
-
-
-Running test: testTwoLimitTwoSetTimeouts
-foo1 (test.js:11:2)
-
-foo2 (test.js:15:2)
--- setTimeout --
-twoSetTimeout (test.js:41:2)
-(anonymous) (expr.js:0:0)
-
-
-Running test: testThreeLimitTwoSetTimeouts
-foo1 (test.js:11:2)
--- setTimeout --
-twoSetTimeout (test.js:40:2)
-(anonymous) (expr.js:0:0)
-
-foo2 (test.js:15:2)
--- setTimeout --
-twoSetTimeout (test.js:41:2)
-(anonymous) (expr.js:0:0)
-
-
-Running test: testTenLimitTwentySetTimeouts
-foo1 (:0:17)
-(anonymous) (:0:28)
-
-foo2 (:0:17)
-(anonymous) (:0:28)
-
-foo3 (:0:17)
-(anonymous) (:0:28)
-
-foo4 (:0:17)
-(anonymous) (:0:28)
-
-foo5 (:0:17)
-(anonymous) (:0:28)
-
-foo6 (:0:17)
-(anonymous) (:0:28)
-
-foo7 (:0:17)
-(anonymous) (:0:28)
-
-foo8 (:0:17)
-(anonymous) (:0:28)
-
-foo9 (:0:17)
-(anonymous) (:0:28)
-
-foo10 (:0:18)
-(anonymous) (:0:29)
-
-foo11 (:0:18)
-(anonymous) (:0:29)
--- setTimeout --
-twentySetTimeout (test.js:49:4)
-(anonymous) (expr.js:0:0)
-
-foo12 (:0:18)
-(anonymous) (:0:29)
--- setTimeout --
-twentySetTimeout (test.js:49:4)
-(anonymous) (expr.js:0:0)
-
-foo13 (:0:18)
-(anonymous) (:0:29)
--- setTimeout --
-twentySetTimeout (test.js:49:4)
-(anonymous) (expr.js:0:0)
-
-foo14 (:0:18)
-(anonymous) (:0:29)
--- setTimeout --
-twentySetTimeout (test.js:49:4)
-(anonymous) (expr.js:0:0)
-
-foo15 (:0:18)
-(anonymous) (:0:29)
--- setTimeout --
-twentySetTimeout (test.js:49:4)
-(anonymous) (expr.js:0:0)
-
-foo16 (:0:18)
-(anonymous) (:0:29)
--- setTimeout --
-twentySetTimeout (test.js:49:4)
-(anonymous) (expr.js:0:0)
-
-foo17 (:0:18)
-(anonymous) (:0:29)
--- setTimeout --
-twentySetTimeout (test.js:49:4)
-(anonymous) (expr.js:0:0)
-
-foo18 (:0:18)
-(anonymous) (:0:29)
--- setTimeout --
-twentySetTimeout (test.js:49:4)
-(anonymous) (expr.js:0:0)
-
-foo19 (:0:18)
-(anonymous) (:0:29)
--- setTimeout --
-twentySetTimeout (test.js:49:4)
-(anonymous) (expr.js:0:0)
-
diff --git a/deps/v8/test/inspector/debugger/async-stacks-limit.js b/deps/v8/test/inspector/debugger/async-stacks-limit.js
deleted file mode 100644
index 62206750df..0000000000
--- a/deps/v8/test/inspector/debugger/async-stacks-limit.js
+++ /dev/null
@@ -1,164 +0,0 @@
-// Copyright 2016 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-InspectorTest.log('Checks that async stacks works good with different limits');
-
-InspectorTest.addScript(`
-var resolveTest;
-
-function foo1() {
- debugger;
-}
-
-function foo2() {
- debugger;
- if (resolveTest) resolveTest();
-}
-
-function promise() {
- var resolve1;
- var p1 = new Promise(resolve => resolve1 = resolve);
- var p2 = p1.then(foo1);
- resolve1();
- return p2;
-}
-
-function twoPromises() {
- var resolve1;
- var resolve2;
- var p1 = new Promise(resolve => resolve1 = resolve);
- var p2 = new Promise(resolve => resolve2 = resolve);
- var p3 = p1.then(foo1);
- var p4 = p2.then(foo2);
- resolve1();
- resolve2();
- return Promise.all([p3, p4]);
-}
-
-function twoSetTimeout() {
- setTimeout(foo1, 0);
- setTimeout(foo2, 0);
- return new Promise(resolve => resolveTest = resolve);
-}
-
-function twentySetTimeout() {
- var resolve1;
- var p1 = new Promise(resolve => resolve1 = resolve);
- for (var i = 1; i <= 19; ++i)
- setTimeout('(function foo' + i + '(){debugger;})()',0);
- setTimeout(resolve1, 0);
- return p1;
-}
-
-//# sourceURL=test.js`, 7, 26);
-
-InspectorTest.setupScriptMap();
-Protocol.Debugger.onPaused(message => {
- InspectorTest.logCallFrames(message.params.callFrames);
- var asyncStackTrace = message.params.asyncStackTrace;
- while (asyncStackTrace) {
- InspectorTest.log(`-- ${asyncStackTrace.description} --`);
- InspectorTest.logCallFrames(asyncStackTrace.callFrames);
- asyncStackTrace = asyncStackTrace.parent;
- }
- InspectorTest.log('');
- Protocol.Debugger.resume();
-});
-
-Protocol.Debugger.enable();
-Protocol.Debugger.setAsyncCallStackDepth({ maxDepth: 128 });
-InspectorTest.runTestSuite([
- function testZeroLimit(next) {
- Protocol.Runtime.evaluate({
- expression: 'setMaxAsyncTaskStacks(0)//# sourceURL=expr.js'})
- .then(() => Protocol.Runtime.evaluate({
- expression: 'promise()//# sourceURL=expr.js', awaitPromise: true
- }))
- .then(() => cancelAllAsyncTasks())
- .then(next);
- },
-
- function testTwoLimit(next) {
- // we need one stack for parent task and one for next task.
- Protocol.Runtime
- .evaluate({expression: 'setMaxAsyncTaskStacks(2)//# sourceURL=expr.js'})
- .then(() => Protocol.Runtime.evaluate({
- expression: 'promise()//# sourceURL=expr.js',
- awaitPromise: true
- }))
- .then(() => cancelAllAsyncTasks())
- .then(next);
- },
-
- function testOneLimitTwoPromises(next) {
- // Should be no async stacks because when first microtask is finished
- // it will resolve and schedule p3 - will remove async stack for scheduled
- // p2.
- Protocol.Runtime.evaluate({
- expression: 'setMaxAsyncTaskStacks(1)//# sourceURL=expr.js'})
- .then(() => Protocol.Runtime.evaluate({
- expression: 'twoPromises()//# sourceURL=expr.js', awaitPromise: true
- }))
- .then(() => cancelAllAsyncTasks())
- .then(next);
- },
-
- function testFourLimitTwoPromises(next) {
- Protocol.Runtime
- .evaluate({expression: 'setMaxAsyncTaskStacks(4)//# sourceURL=expr.js'})
- .then(() => Protocol.Runtime.evaluate({
- expression: 'twoPromises()//# sourceURL=expr.js',
- awaitPromise: true
- }))
- .then(() => cancelAllAsyncTasks())
- .then(next);
- },
-
- function testSixLimitTwoPromises(next) {
- Protocol.Runtime
- .evaluate({expression: 'setMaxAsyncTaskStacks(6)//# sourceURL=expr.js'})
- .then(() => Protocol.Runtime.evaluate({
- expression: 'twoPromises()//# sourceURL=expr.js',
- awaitPromise: true
- }))
- .then(() => cancelAllAsyncTasks())
- .then(next);
- },
-
- function testTwoLimitTwoSetTimeouts(next) {
- Protocol.Runtime.evaluate({
- expression: 'setMaxAsyncTaskStacks(2)//# sourceURL=expr.js'})
- .then(() => Protocol.Runtime.evaluate({
- expression: 'twoSetTimeout()//# sourceURL=expr.js', awaitPromise: true
- }))
- .then(() => cancelAllAsyncTasks())
- .then(next);
- },
-
- function testThreeLimitTwoSetTimeouts(next) {
- Protocol.Runtime.evaluate({
- expression: 'setMaxAsyncTaskStacks(3)//# sourceURL=expr.js'})
- .then(() => Protocol.Runtime.evaluate({
- expression: 'twoSetTimeout()//# sourceURL=expr.js', awaitPromise: true
- }))
- .then(() => cancelAllAsyncTasks())
- .then(next);
- },
-
- function testTenLimitTwentySetTimeouts(next) {
- Protocol.Runtime.evaluate({
- expression: 'setMaxAsyncTaskStacks(10)//# sourceURL=expr.js'})
- .then(() => Protocol.Runtime.evaluate({
- expression: 'twentySetTimeout()//# sourceURL=expr.js',
- awaitPromise: true
- }))
- .then(() => cancelAllAsyncTasks())
- .then(next);
- }
-]);
-
-function cancelAllAsyncTasks() {
- return Protocol.Debugger.setAsyncCallStackDepth({ maxDepth: 0 })
- .then(() => Protocol.Debugger.setAsyncCallStackDepth({ maxDepth: 128 }));
-}
diff --git a/deps/v8/test/inspector/debugger/break-on-exception-expected.txt b/deps/v8/test/inspector/debugger/break-on-exception-expected.txt
index 92a38f0e83..f4d70f09b9 100644
--- a/deps/v8/test/inspector/debugger/break-on-exception-expected.txt
+++ b/deps/v8/test/inspector/debugger/break-on-exception-expected.txt
@@ -9,4 +9,4 @@ Running test: breakOnCaughtException
paused in throwUncaughtException
paused in throwCaughtException
-Running test: noBreakInEvaluateInSilentMode \ No newline at end of file
+Running test: noBreakInEvaluateInSilentMode
diff --git a/deps/v8/test/inspector/debugger/break-on-exception.js b/deps/v8/test/inspector/debugger/break-on-exception.js
index d9a208dadf..6f47ec86d7 100644
--- a/deps/v8/test/inspector/debugger/break-on-exception.js
+++ b/deps/v8/test/inspector/debugger/break-on-exception.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Check that inspector correctly change break on exception state.");
+let {session, contextGroup, Protocol} = InspectorTest.start("Check that inspector correctly change break on exception state.");
-InspectorTest.addScript(`
+contextGroup.addScript(`
function scheduleUncaughtException()
{
setTimeout(throwUncaughtException, 0);
diff --git a/deps/v8/test/inspector/debugger/call-frame-function-location-expected.txt b/deps/v8/test/inspector/debugger/call-frame-function-location-expected.txt
index 8a34f45272..211352c2a2 100644
--- a/deps/v8/test/inspector/debugger/call-frame-function-location-expected.txt
+++ b/deps/v8/test/inspector/debugger/call-frame-function-location-expected.txt
@@ -1,3 +1,4 @@
+Tests that function location in call frames is correct
Paused on 'debugger;'
Top frame location: {"scriptId":"42","lineNumber":3,"columnNumber":4}
Top frame functionLocation: {"scriptId":"42","lineNumber":0,"columnNumber":21}
diff --git a/deps/v8/test/inspector/debugger/call-frame-function-location.js b/deps/v8/test/inspector/debugger/call-frame-function-location.js
index c91164a037..4775b30f6d 100644
--- a/deps/v8/test/inspector/debugger/call-frame-function-location.js
+++ b/deps/v8/test/inspector/debugger/call-frame-function-location.js
@@ -2,7 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.addScript(
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests that function location in call frames is correct');
+
+contextGroup.addScript(
`function testFunction()
{
var a = 2;
diff --git a/deps/v8/test/inspector/debugger/caught-exception-from-framework-inside-async.js b/deps/v8/test/inspector/debugger/caught-exception-from-framework-inside-async.js
index 3bc7b6efa8..f59e71fda3 100644
--- a/deps/v8/test/inspector/debugger/caught-exception-from-framework-inside-async.js
+++ b/deps/v8/test/inspector/debugger/caught-exception-from-framework-inside-async.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Async caught exception prediction and blackboxing.');
+let {session, contextGroup, Protocol} = InspectorTest.start('Async caught exception prediction and blackboxing.');
-InspectorTest.addScript(`
+contextGroup.addScript(`
function constructorThrow() {
return new Promise((resolve, reject) =>
Promise.resolve().then(() =>
@@ -18,7 +18,7 @@ function dotCatch(producer) {
}
//# sourceURL=framework.js`);
-InspectorTest.setupScriptMap();
+session.setupScriptMap();
(async function test() {
Protocol.Debugger.enable();
Protocol.Debugger.setBlackboxPatterns({patterns: ['framework\.js']});
@@ -33,6 +33,6 @@ InspectorTest.setupScriptMap();
async function waitPauseAndDumpLocation() {
var message = await Protocol.Debugger.oncePaused();
InspectorTest.log('paused at:');
- InspectorTest.logSourceLocation(message.params.callFrames[0].location);
+ session.logSourceLocation(message.params.callFrames[0].location);
return message;
}
diff --git a/deps/v8/test/inspector/debugger/caught-uncaught-exceptions.js b/deps/v8/test/inspector/debugger/caught-uncaught-exceptions.js
index d049cf0da0..38b622d3db 100644
--- a/deps/v8/test/inspector/debugger/caught-uncaught-exceptions.js
+++ b/deps/v8/test/inspector/debugger/caught-uncaught-exceptions.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Check that inspector correctly passes caught/uncaught information.");
+let {session, contextGroup, Protocol} = InspectorTest.start("Check that inspector correctly passes caught/uncaught information.");
-InspectorTest.addScript(
+contextGroup.addScript(
`function throwCaught() { try { throw new Error(); } catch (_) {} }
function throwUncaught() { throw new Error(); }
function schedule(f) { setTimeout(f, 0); }
diff --git a/deps/v8/test/inspector/debugger/collect-obsolete-async-tasks-expected.txt b/deps/v8/test/inspector/debugger/collect-obsolete-async-tasks-expected.txt
new file mode 100644
index 0000000000..c114e34012
--- /dev/null
+++ b/deps/v8/test/inspector/debugger/collect-obsolete-async-tasks-expected.txt
@@ -0,0 +1,37 @@
+Checks that we collect obsolete async tasks with async stacks.
+Async stacks count: 2
+Scheduled async tasks: 1
+Created async tasks: 1
+Async tasks with parent: 0
+Recurring async tasks: 1
+
+Async stacks count: 0
+Scheduled async tasks: 0
+Created async tasks: 0
+Async tasks with parent: 0
+Recurring async tasks: 0
+
+Async stacks count: 2
+Scheduled async tasks: 0
+Created async tasks: 2
+Async tasks with parent: 2
+Recurring async tasks: 0
+
+Async stacks count: 0
+Scheduled async tasks: 0
+Created async tasks: 0
+Async tasks with parent: 0
+Recurring async tasks: 0
+
+Async stacks count: 1
+Scheduled async tasks: 1
+Created async tasks: 0
+Async tasks with parent: 0
+Recurring async tasks: 0
+
+Async stacks count: 0
+Scheduled async tasks: 0
+Created async tasks: 0
+Async tasks with parent: 0
+Recurring async tasks: 0
+
diff --git a/deps/v8/test/inspector/debugger/collect-obsolete-async-tasks.js b/deps/v8/test/inspector/debugger/collect-obsolete-async-tasks.js
new file mode 100644
index 0000000000..cfef345d19
--- /dev/null
+++ b/deps/v8/test/inspector/debugger/collect-obsolete-async-tasks.js
@@ -0,0 +1,35 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks that we collect obsolete async tasks with async stacks.');
+
+contextGroup.addScript(`
+function test() {
+ inspector.setMaxAsyncTaskStacks(128);
+ var p = Promise.resolve();
+
+ inspector.dumpAsyncTaskStacksStateForTest();
+ inspector.setMaxAsyncTaskStacks(128);
+ inspector.dumpAsyncTaskStacksStateForTest();
+
+ p.then(() => 42).then(() => 239);
+
+ inspector.dumpAsyncTaskStacksStateForTest();
+ inspector.setMaxAsyncTaskStacks(128);
+ inspector.dumpAsyncTaskStacksStateForTest();
+
+ setTimeout(() => 42, 0);
+
+ inspector.dumpAsyncTaskStacksStateForTest();
+ inspector.setMaxAsyncTaskStacks(128);
+ inspector.dumpAsyncTaskStacksStateForTest();
+}
+`);
+
+(async function test() {
+ Protocol.Debugger.enable();
+ Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 128});
+ await Protocol.Runtime.evaluate({expression: 'test()'});
+ InspectorTest.completeTest();
+})()
diff --git a/deps/v8/test/inspector/debugger/collect-old-async-call-chains-expected.txt b/deps/v8/test/inspector/debugger/collect-old-async-call-chains-expected.txt
new file mode 100644
index 0000000000..64fef4af77
--- /dev/null
+++ b/deps/v8/test/inspector/debugger/collect-old-async-call-chains-expected.txt
@@ -0,0 +1,211 @@
+Checks that we drop old async call chains.
+
+Running test: testInfrastructure
+inspector.setMaxAsyncTaskStacks(1024)
+Run expression 'console.trace(42)' with async chain len: 1
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(1024)
+Run expression 'console.trace(42)' with async chain len: 2
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(1024)
+Run expression 'console.trace(42)' with async chain len: 5
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(1024)
+Run expression 'console.trace(42)' with async chain len: 1
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(1024)
+Run expression 'console.trace(42)' with async chain len: 2
+actual async chain len: 2
+
+inspector.setMaxAsyncTaskStacks(1024)
+Run expression 'console.trace(42)' with async chain len: 5
+actual async chain len: 5
+
+
+Running test: testZeroLimit
+inspector.setMaxAsyncTaskStacks(0)
+Run expression 'console.trace(42)' with async chain len: 1
+actual async chain len: 0
+
+inspector.setMaxAsyncTaskStacks(0)
+Run expression 'console.trace(42)' with async chain len: 2
+actual async chain len: 0
+
+inspector.setMaxAsyncTaskStacks(0)
+Run expression 'console.trace(42)' with async chain len: 1
+actual async chain len: 0
+
+inspector.setMaxAsyncTaskStacks(0)
+Run expression 'console.trace(42)' with async chain len: 2
+actual async chain len: 0
+
+
+Running test: testOneLimit
+inspector.setMaxAsyncTaskStacks(1)
+Run expression 'console.trace(42)' with async chain len: 1
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(1)
+Run expression 'console.trace(42)' with async chain len: 2
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(1)
+Run expression 'console.trace(42)' with async chain len: 1
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(1)
+Run expression 'console.trace(42)' with async chain len: 2
+actual async chain len: 1
+
+
+Running test: testTwoLimit
+inspector.setMaxAsyncTaskStacks(2)
+Run expression 'console.trace(42)' with async chain len: 1
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(2)
+Run expression 'console.trace(42)' with async chain len: 2
+actual async chain len: 0
+
+inspector.setMaxAsyncTaskStacks(2)
+Run expression 'console.trace(42)' with async chain len: 3
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(2)
+Run expression 'console.trace(42)' with async chain len: 1
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(2)
+Run expression 'console.trace(42)' with async chain len: 2
+actual async chain len: 2
+
+inspector.setMaxAsyncTaskStacks(2)
+Run expression 'console.trace(42)' with async chain len: 3
+actual async chain len: 1
+
+
+Running test: testMoreThanTwoLimit
+inspector.setMaxAsyncTaskStacks(3)
+Run expression 'console.trace(42)' with async chain len: 1
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(3)
+Run expression 'console.trace(42)' with async chain len: 2
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(3)
+Run expression 'console.trace(42)' with async chain len: 3
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(3)
+Run expression 'console.trace(42)' with async chain len: 1
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(3)
+Run expression 'console.trace(42)' with async chain len: 2
+actual async chain len: 2
+
+inspector.setMaxAsyncTaskStacks(3)
+Run expression 'console.trace(42)' with async chain len: 3
+actual async chain len: 3
+
+inspector.setMaxAsyncTaskStacks(4)
+Run expression 'console.trace(42)' with async chain len: 1
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(4)
+Run expression 'console.trace(42)' with async chain len: 2
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(4)
+Run expression 'console.trace(42)' with async chain len: 3
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(4)
+Run expression 'console.trace(42)' with async chain len: 1
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(4)
+Run expression 'console.trace(42)' with async chain len: 2
+actual async chain len: 2
+
+inspector.setMaxAsyncTaskStacks(4)
+Run expression 'console.trace(42)' with async chain len: 3
+actual async chain len: 3
+
+inspector.setMaxAsyncTaskStacks(5)
+Run expression 'console.trace(42)' with async chain len: 1
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(5)
+Run expression 'console.trace(42)' with async chain len: 2
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(5)
+Run expression 'console.trace(42)' with async chain len: 3
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(5)
+Run expression 'console.trace(42)' with async chain len: 1
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(5)
+Run expression 'console.trace(42)' with async chain len: 2
+actual async chain len: 2
+
+inspector.setMaxAsyncTaskStacks(5)
+Run expression 'console.trace(42)' with async chain len: 3
+actual async chain len: 3
+
+inspector.setMaxAsyncTaskStacks(6)
+Run expression 'console.trace(42)' with async chain len: 1
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(6)
+Run expression 'console.trace(42)' with async chain len: 2
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(6)
+Run expression 'console.trace(42)' with async chain len: 3
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(6)
+Run expression 'console.trace(42)' with async chain len: 1
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(6)
+Run expression 'console.trace(42)' with async chain len: 2
+actual async chain len: 2
+
+inspector.setMaxAsyncTaskStacks(6)
+Run expression 'console.trace(42)' with async chain len: 3
+actual async chain len: 3
+
+inspector.setMaxAsyncTaskStacks(7)
+Run expression 'console.trace(42)' with async chain len: 1
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(7)
+Run expression 'console.trace(42)' with async chain len: 2
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(7)
+Run expression 'console.trace(42)' with async chain len: 3
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(7)
+Run expression 'console.trace(42)' with async chain len: 1
+actual async chain len: 1
+
+inspector.setMaxAsyncTaskStacks(7)
+Run expression 'console.trace(42)' with async chain len: 2
+actual async chain len: 2
+
+inspector.setMaxAsyncTaskStacks(7)
+Run expression 'console.trace(42)' with async chain len: 3
+actual async chain len: 3
+
diff --git a/deps/v8/test/inspector/debugger/collect-old-async-call-chains.js b/deps/v8/test/inspector/debugger/collect-old-async-call-chains.js
new file mode 100644
index 0000000000..7ac822534b
--- /dev/null
+++ b/deps/v8/test/inspector/debugger/collect-old-async-call-chains.js
@@ -0,0 +1,171 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks that we drop old async call chains.');
+
+Protocol.Debugger.enable();
+Protocol.Runtime.enable();
+InspectorTest.runAsyncTestSuite([
+ async function testInfrastructure() {
+ Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 128});
+ await setMaxAsyncTaskStacks(1024);
+ runWithAsyncChainPromise(1, 'console.trace(42)');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ await setMaxAsyncTaskStacks(1024);
+ runWithAsyncChainPromise(2, 'console.trace(42)');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ await setMaxAsyncTaskStacks(1024);
+ runWithAsyncChainPromise(5, 'console.trace(42)');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ await setMaxAsyncTaskStacks(1024);
+ runWithAsyncChainSetTimeout(1, 'console.trace(42)');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ await setMaxAsyncTaskStacks(1024);
+ runWithAsyncChainSetTimeout(2, 'console.trace(42)');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ await setMaxAsyncTaskStacks(1024);
+ runWithAsyncChainSetTimeout(5, 'console.trace(42)');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+ },
+
+ async function testZeroLimit() {
+ const limit = 0;
+ Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 128});
+
+ await setMaxAsyncTaskStacks(limit);
+ runWithAsyncChainPromise(1, 'console.trace(42)');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ await setMaxAsyncTaskStacks(limit);
+ runWithAsyncChainPromise(2, 'console.trace(42)');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ await setMaxAsyncTaskStacks(limit);
+ runWithAsyncChainSetTimeout(1, 'console.trace(42)');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ await setMaxAsyncTaskStacks(limit);
+ runWithAsyncChainSetTimeout(2, 'console.trace(42)');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+ },
+
+ async function testOneLimit() {
+ const limit = 1;
+ Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 128});
+
+ await setMaxAsyncTaskStacks(limit);
+ runWithAsyncChainPromise(1, 'console.trace(42)');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ await setMaxAsyncTaskStacks(limit);
+ runWithAsyncChainPromise(2, 'console.trace(42)');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ await setMaxAsyncTaskStacks(limit);
+ runWithAsyncChainSetTimeout(1, 'console.trace(42)');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ await setMaxAsyncTaskStacks(limit);
+ runWithAsyncChainSetTimeout(2, 'console.trace(42)');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+ },
+
+ async function testTwoLimit() {
+ const limit = 2;
+ Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 128});
+
+ await setMaxAsyncTaskStacks(limit);
+ runWithAsyncChainPromise(1, 'console.trace(42)');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ await setMaxAsyncTaskStacks(limit);
+ runWithAsyncChainPromise(2, 'console.trace(42)');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ await setMaxAsyncTaskStacks(limit);
+ runWithAsyncChainPromise(3, 'console.trace(42)');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ await setMaxAsyncTaskStacks(limit);
+ runWithAsyncChainSetTimeout(1, 'console.trace(42)');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ await setMaxAsyncTaskStacks(limit);
+ runWithAsyncChainSetTimeout(2, 'console.trace(42)');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ await setMaxAsyncTaskStacks(limit);
+ runWithAsyncChainSetTimeout(3, 'console.trace(42)');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+ },
+
+ async function testMoreThanTwoLimit() {
+ for (let limit = 3; limit <= 7; ++limit) {
+ Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 128});
+
+ await setMaxAsyncTaskStacks(limit);
+ runWithAsyncChainPromise(1, 'console.trace(42)');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ await setMaxAsyncTaskStacks(limit);
+ runWithAsyncChainPromise(2, 'console.trace(42)');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ await setMaxAsyncTaskStacks(limit);
+ runWithAsyncChainPromise(3, 'console.trace(42)');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ await setMaxAsyncTaskStacks(limit);
+ runWithAsyncChainSetTimeout(1, 'console.trace(42)');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ await setMaxAsyncTaskStacks(limit);
+ runWithAsyncChainSetTimeout(2, 'console.trace(42)');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ await setMaxAsyncTaskStacks(limit);
+ runWithAsyncChainSetTimeout(3, 'console.trace(42)');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+ }
+ },
+]);
+
+function runWithAsyncChainPromise(len, source) {
+ InspectorTest.log(`Run expression '${source}' with async chain len: ${len}`);
+ let then = '.then(() => 1)';
+ let pause = `.then(() => { ${source} })`;
+ Protocol.Runtime.evaluate({
+ expression: `Promise.resolve()${then.repeat(len - 1)}${pause}`
+ });
+}
+
+function runWithAsyncChainSetTimeout(len, source) {
+ InspectorTest.log(`Run expression '${source}' with async chain len: ${len}`);
+ let setTimeoutPrefix = '() => setTimeout(';
+ let setTimeoutSuffix = ', 0)';
+ Protocol.Runtime.evaluate({
+ expression: `setTimeout(${setTimeoutPrefix.repeat(len - 1)}'${source}'${setTimeoutSuffix.repeat(len - 1)}, 0)`
+ });
+}
+
+function dumpAsyncChainLength(message) {
+ let stackTrace = message.params.asyncStackTrace || message.params.stackTrace.parent;
+ let asyncChainCount = 0;
+ while (stackTrace) {
+ ++asyncChainCount;
+ stackTrace = stackTrace.parent;
+ }
+ InspectorTest.log(`actual async chain len: ${asyncChainCount}\n`);
+}
+
+async function setMaxAsyncTaskStacks(max) {
+ let expression = `inspector.setMaxAsyncTaskStacks(${max})`;
+ InspectorTest.log(expression);
+ await Protocol.Runtime.evaluate({expression});
+}
diff --git a/deps/v8/test/inspector/debugger/command-line-api-with-bound-function-expected.txt b/deps/v8/test/inspector/debugger/command-line-api-with-bound-function-expected.txt
index 821ce46cd3..338b136c8f 100644
--- a/deps/v8/test/inspector/debugger/command-line-api-with-bound-function-expected.txt
+++ b/deps/v8/test/inspector/debugger/command-line-api-with-bound-function-expected.txt
@@ -20,4 +20,4 @@ paused in boo
function boo called
> debug and unmonitor bar
> call bar
-paused in boo \ No newline at end of file
+paused in boo
diff --git a/deps/v8/test/inspector/debugger/command-line-api-with-bound-function.js b/deps/v8/test/inspector/debugger/command-line-api-with-bound-function.js
index d857d4191d..3c00585d21 100644
--- a/deps/v8/test/inspector/debugger/command-line-api-with-bound-function.js
+++ b/deps/v8/test/inspector/debugger/command-line-api-with-bound-function.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Check that debug and monitor methods from Command Line API works with bound function.");
+let {session, contextGroup, Protocol} = InspectorTest.start("Check that debug and monitor methods from Command Line API works with bound function.");
-InspectorTest.addScript(`
+contextGroup.addScript(`
function foo() {}
function boo() {}
var bar = boo.bind(null);
diff --git a/deps/v8/test/inspector/debugger/continue-to-location-expected.txt b/deps/v8/test/inspector/debugger/continue-to-location-expected.txt
index d0c6ce715a..948edd85fb 100644
--- a/deps/v8/test/inspector/debugger/continue-to-location-expected.txt
+++ b/deps/v8/test/inspector/debugger/continue-to-location-expected.txt
@@ -1,3 +1,4 @@
+Tests Debugger.continueToLocation
Paused on debugger statement
Paused after continueToLocation
Stopped on line 8, expected 8, requested 8, (0-based numbers).
@@ -28,4 +29,3 @@ Paused after continueToLocation
Stopped on line 17, expected 17, requested 17, (0-based numbers).
Control parameter 'step' calculation result: 6, expected: 6
SUCCESS
-
diff --git a/deps/v8/test/inspector/debugger/continue-to-location-target-call-frames-expected.txt b/deps/v8/test/inspector/debugger/continue-to-location-target-call-frames-expected.txt
new file mode 100644
index 0000000000..1f41dcfc6d
--- /dev/null
+++ b/deps/v8/test/inspector/debugger/continue-to-location-target-call-frames-expected.txt
@@ -0,0 +1,81 @@
+Check that continue-to-location works with different strategies.
+
+Running test: testAwaitAny
+(anonymous) (expr.js:0:0)
+
+asyncFact (test.js:9:2)
+(anonymous) (expr.js:0:0)
+
+asyncFact (test.js:11:2)
+-- async function --
+asyncFact (test.js:8:24)
+asyncFact (test.js:10:20)
+asyncFact (test.js:10:20)
+asyncFact (test.js:10:20)
+(anonymous) (expr.js:0:0)
+
+
+Running test: testAwaitCurrent
+(anonymous) (expr.js:0:0)
+
+asyncFact (test.js:9:2)
+(anonymous) (expr.js:0:0)
+
+asyncFact (test.js:11:2)
+-- async function --
+asyncFact (test.js:8:24)
+(anonymous) (expr.js:0:0)
+
+
+Running test: testAny
+(anonymous) (expr.js:0:0)
+
+fact (test.js:16:2)
+(anonymous) (expr.js:0:0)
+
+fact (test.js:18:2)
+fact (test.js:17:14)
+fact (test.js:17:14)
+fact (test.js:17:14)
+(anonymous) (expr.js:0:0)
+
+
+Running test: testCurrent
+(anonymous) (expr.js:0:0)
+
+fact (test.js:16:2)
+(anonymous) (expr.js:0:0)
+
+fact (test.js:18:2)
+(anonymous) (expr.js:0:0)
+
+
+Running test: testTopLevelAny
+(anonymous) (expr.js:0:0)
+
+topLevel (test.js:23:2)
+(anonymous) (expr.js:0:0)
+
+(anonymous) (:1:10)
+topLevel (test.js:23:2)
+(anonymous) (expr.js:0:0)
+
+(anonymous) (:4:10)
+topLevel (test.js:23:2)
+(anonymous) (expr.js:0:0)
+
+
+Running test: testTopLevelCurrent
+(anonymous) (expr.js:0:0)
+
+topLevel (test.js:23:2)
+(anonymous) (expr.js:0:0)
+
+(anonymous) (:1:10)
+topLevel (test.js:23:2)
+(anonymous) (expr.js:0:0)
+
+(anonymous) (:4:10)
+topLevel (test.js:23:2)
+(anonymous) (expr.js:0:0)
+
diff --git a/deps/v8/test/inspector/debugger/continue-to-location-target-call-frames.js b/deps/v8/test/inspector/debugger/continue-to-location-target-call-frames.js
new file mode 100644
index 0000000000..c33ff6b93c
--- /dev/null
+++ b/deps/v8/test/inspector/debugger/continue-to-location-target-call-frames.js
@@ -0,0 +1,139 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let {session, contextGroup, Protocol} = InspectorTest.start('Check that continue-to-location works with different strategies.');
+
+contextGroup.addScript(`
+async function asyncFact(n) {
+ if (n == 0) return 1;
+ let r = n * await asyncFact(n - 1);
+ console.log(r);
+ return r;
+}
+
+function fact(n) {
+ if (n == 0) return 1;
+ let r = n * fact(n - 1);
+ console.log(r);
+ return r;
+}
+
+function topLevel() {
+ eval(` + '`' + `
+ var a = 1;
+ var b = 2;
+ fact(3);
+ console.log(a + b);
+ ` + '`' + `);
+}
+
+//# sourceURL=test.js`, 7, 26);
+
+session.setupScriptMap();
+InspectorTest.runAsyncTestSuite([
+ async function testAwaitAny() {
+ Protocol.Debugger.enable();
+ Protocol.Debugger.setAsyncCallStackDepth({ maxDepth: 128 });
+ Protocol.Debugger.pause();
+ Protocol.Runtime.evaluate({expression: 'asyncFact(4)//# sourceURL=expr.js'});
+ await pausedAndDumpStack();
+ Protocol.Debugger.stepInto();
+ let message = await pausedAndDumpStack();
+ let location = message.params.callFrames[0].location;
+ location.lineNumber = 11;
+ Protocol.Debugger.continueToLocation({location, targetCallFrames: 'any'});
+ await pausedAndDumpStack();
+ Protocol.Debugger.disable();
+ },
+
+ async function testAwaitCurrent() {
+ Protocol.Debugger.enable();
+ Protocol.Debugger.setAsyncCallStackDepth({ maxDepth: 128 });
+ Protocol.Debugger.pause();
+ Protocol.Runtime.evaluate({expression: 'asyncFact(4)//# sourceURL=expr.js'});
+ await pausedAndDumpStack();
+ Protocol.Debugger.stepInto();
+ let message = await pausedAndDumpStack();
+ let location = message.params.callFrames[0].location;
+ location.lineNumber = 11;
+ Protocol.Debugger.continueToLocation({location, targetCallFrames: 'current'});
+ await pausedAndDumpStack();
+ await Protocol.Debugger.resume();
+ Protocol.Debugger.disable();
+ },
+
+ async function testAny() {
+ Protocol.Debugger.enable();
+ Protocol.Debugger.setAsyncCallStackDepth({ maxDepth: 128 });
+ Protocol.Debugger.pause();
+ Protocol.Runtime.evaluate({expression: 'fact(4)//# sourceURL=expr.js'});
+ await pausedAndDumpStack();
+ Protocol.Debugger.stepInto();
+ let message = await pausedAndDumpStack();
+ let location = message.params.callFrames[0].location;
+ location.lineNumber = 18;
+ Protocol.Debugger.continueToLocation({location, targetCallFrames: 'any'});
+ await pausedAndDumpStack();
+ Protocol.Debugger.disable();
+ },
+
+ async function testCurrent() {
+ Protocol.Debugger.enable();
+ Protocol.Debugger.setAsyncCallStackDepth({ maxDepth: 128 });
+ Protocol.Debugger.pause();
+ Protocol.Runtime.evaluate({expression: 'fact(4)//# sourceURL=expr.js'});
+ await pausedAndDumpStack();
+ Protocol.Debugger.stepInto();
+ let message = await pausedAndDumpStack();
+ let location = message.params.callFrames[0].location;
+ location.lineNumber = 18;
+ Protocol.Debugger.continueToLocation({location, targetCallFrames: 'current'});
+ await pausedAndDumpStack();
+ await Protocol.Debugger.resume();
+ Protocol.Debugger.disable();
+ },
+
+ async function testTopLevelAny() {
+ Protocol.Debugger.enable();
+ Protocol.Debugger.setAsyncCallStackDepth({ maxDepth: 128 });
+ Protocol.Debugger.pause();
+ Protocol.Runtime.evaluate({expression: 'topLevel()//# sourceURL=expr.js'});
+ await pausedAndDumpStack();
+ Protocol.Debugger.stepInto();
+ await pausedAndDumpStack();
+ Protocol.Debugger.stepInto();
+ let message = await pausedAndDumpStack();
+ let location = message.params.callFrames[0].location;
+ location.lineNumber = 4;
+ Protocol.Debugger.continueToLocation({location, targetCallFrames: 'any'});
+ await pausedAndDumpStack();
+ Protocol.Debugger.disable();
+ },
+
+ async function testTopLevelCurrent() {
+ Protocol.Debugger.enable();
+ Protocol.Debugger.setAsyncCallStackDepth({ maxDepth: 128 });
+ Protocol.Debugger.pause();
+ Protocol.Runtime.evaluate({expression: 'topLevel()//# sourceURL=expr.js'});
+ await pausedAndDumpStack();
+ Protocol.Debugger.stepInto();
+ await pausedAndDumpStack();
+ Protocol.Debugger.stepInto();
+ let message = await pausedAndDumpStack();
+ let location = message.params.callFrames[0].location;
+ location.lineNumber = 4;
+ Protocol.Debugger.continueToLocation({location, targetCallFrames: 'current'});
+ await pausedAndDumpStack();
+ await Protocol.Debugger.resume();
+ Protocol.Debugger.disable();
+ }
+]);
+
+async function pausedAndDumpStack() {
+ let message = await Protocol.Debugger.oncePaused();
+ session.logCallFrames(message.params.callFrames);
+ session.logAsyncStackTrace(message.params.asyncStackTrace);
+ InspectorTest.log('');
+ return message;
+}
diff --git a/deps/v8/test/inspector/debugger/continue-to-location.js b/deps/v8/test/inspector/debugger/continue-to-location.js
index b72c8585e6..878499d1fe 100644
--- a/deps/v8/test/inspector/debugger/continue-to-location.js
+++ b/deps/v8/test/inspector/debugger/continue-to-location.js
@@ -2,7 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.addScript(
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests Debugger.continueToLocation');
+
+contextGroup.addScript(
`function statementsExample()
{
var self = arguments.callee;
diff --git a/deps/v8/test/inspector/debugger/destory-in-break-program-expected.txt b/deps/v8/test/inspector/debugger/destory-in-break-program-expected.txt
new file mode 100644
index 0000000000..c0ce88ecbc
--- /dev/null
+++ b/deps/v8/test/inspector/debugger/destory-in-break-program-expected.txt
@@ -0,0 +1 @@
+Check destroying agent inside of breakProgram
diff --git a/deps/v8/test/inspector/debugger/destory-in-break-program.js b/deps/v8/test/inspector/debugger/destory-in-break-program.js
new file mode 100644
index 0000000000..e002328aa1
--- /dev/null
+++ b/deps/v8/test/inspector/debugger/destory-in-break-program.js
@@ -0,0 +1,13 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let {session, contextGroup, Protocol} = InspectorTest.start('Check destroying agent inside of breakProgram');
+
+(async function test(){
+ await Protocol.Debugger.enable();
+ Protocol.Runtime.evaluate({expression: 'inspector.breakProgram(\'\', \'{}\')'});
+ await Protocol.Debugger.oncePaused();
+ session.disconnect();
+ InspectorTest.quitImmediately();
+})();
diff --git a/deps/v8/test/inspector/debugger/doesnt-step-into-injected-script.js b/deps/v8/test/inspector/debugger/doesnt-step-into-injected-script.js
index 45ca0ee0dd..98c7bf2cff 100644
--- a/deps/v8/test/inspector/debugger/doesnt-step-into-injected-script.js
+++ b/deps/v8/test/inspector/debugger/doesnt-step-into-injected-script.js
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Check that stepInto at then end of the script go to next user script instead InjectedScriptSource.js.');
+let {session, contextGroup, Protocol} = InspectorTest.start('Check that stepInto at then end of the script go to next user script instead InjectedScriptSource.js.');
(async function test() {
- InspectorTest.setupScriptMap();
+ session.setupScriptMap();
await Protocol.Debugger.enable();
Protocol.Runtime.evaluate({expression: '(function boo() { setTimeout(() => 239, 0); debugger; })()\n'});
await waitPauseAndDumpLocation();
@@ -22,6 +22,6 @@ InspectorTest.log('Check that stepInto at then end of the script go to next user
async function waitPauseAndDumpLocation() {
var message = await Protocol.Debugger.oncePaused();
InspectorTest.log('paused at:');
- InspectorTest.logSourceLocation(message.params.callFrames[0].location);
+ session.logSourceLocation(message.params.callFrames[0].location);
return message;
}
diff --git a/deps/v8/test/inspector/debugger/es6-module-script-parsed.js b/deps/v8/test/inspector/debugger/es6-module-script-parsed.js
index e8fd8c69d1..94b623d0e9 100644
--- a/deps/v8/test/inspector/debugger/es6-module-script-parsed.js
+++ b/deps/v8/test/inspector/debugger/es6-module-script-parsed.js
@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Debugger.scriptParsed and Debugger.scriptFailedToParse with ES6 module');
+let {session, contextGroup, Protocol} = InspectorTest.start('Debugger.scriptParsed and Debugger.scriptFailedToParse with ES6 module');
let moduleSource = `
export function foo() {
return 42;
}`;
-InspectorTest.addModule(moduleSource, 'module1.js');
-InspectorTest.addModule('}', 'module-with-syntax-error-1.js');
+contextGroup.addModule(moduleSource, 'module1.js');
+contextGroup.addModule('}', 'module-with-syntax-error-1.js');
Protocol.Debugger.onScriptParsed(InspectorTest.logMessage);
Protocol.Debugger.onScriptFailedToParse(InspectorTest.logMessage);
@@ -21,8 +21,8 @@ InspectorTest.runTestSuite([
},
function testScriptEventsWhenDebuggerIsEnabled(next) {
- InspectorTest.addModule(moduleSource, 'module2.js');
- InspectorTest.addModule('}', 'module-with-syntax-error-2.js');
- InspectorTest.waitPendingTasks().then(next);
+ contextGroup.addModule(moduleSource, 'module2.js');
+ contextGroup.addModule('}', 'module-with-syntax-error-2.js');
+ InspectorTest.waitForPendingTasks().then(next);
}
]);
diff --git a/deps/v8/test/inspector/debugger/es6-module-set-script-source.js b/deps/v8/test/inspector/debugger/es6-module-set-script-source.js
index 5e191ca8a8..81d97b6d78 100644
--- a/deps/v8/test/inspector/debugger/es6-module-set-script-source.js
+++ b/deps/v8/test/inspector/debugger/es6-module-set-script-source.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Checks that Debugger.setScriptSource doesn\'t crash with modules');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks that Debugger.setScriptSource doesn\'t crash with modules');
var module1 = `
export function foo() {
@@ -25,9 +25,9 @@ Protocol.Debugger.onScriptParsed(message => {
module1Id = message.params.scriptId;
});
Protocol.Debugger.enable()
- .then(() => InspectorTest.addModule(module1, 'module1'))
- .then(() => InspectorTest.addModule(module2, 'module2'))
- .then(() => InspectorTest.waitPendingTasks())
+ .then(() => contextGroup.addModule(module1, 'module1'))
+ .then(() => contextGroup.addModule(module2, 'module2'))
+ .then(() => InspectorTest.waitForPendingTasks())
.then(() => Protocol.Debugger.setScriptSource({ scriptId: module1Id, scriptSource: editedModule1 }))
.then(InspectorTest.logMessage)
.then(InspectorTest.completeTest);
diff --git a/deps/v8/test/inspector/debugger/eval-scopes-expected.txt b/deps/v8/test/inspector/debugger/eval-scopes-expected.txt
index af27f113ec..71d6618c8e 100644
--- a/deps/v8/test/inspector/debugger/eval-scopes-expected.txt
+++ b/deps/v8/test/inspector/debugger/eval-scopes-expected.txt
@@ -1,3 +1,4 @@
+Tests that variables introduced in eval scopes are accessible
{
id : <messageId>
result : {
@@ -16,4 +17,4 @@
}
]
}
-} \ No newline at end of file
+}
diff --git a/deps/v8/test/inspector/debugger/eval-scopes.js b/deps/v8/test/inspector/debugger/eval-scopes.js
index 46e0c4b5a7..e5a0f131b4 100644
--- a/deps/v8/test/inspector/debugger/eval-scopes.js
+++ b/deps/v8/test/inspector/debugger/eval-scopes.js
@@ -2,7 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.addScript(
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests that variables introduced in eval scopes are accessible');
+
+contextGroup.addScript(
`function testNonEmptyEvalScope() {
eval("'use strict'; var hest = 420; debugger;");
}
diff --git a/deps/v8/test/inspector/debugger/framework-break-expected.txt b/deps/v8/test/inspector/debugger/framework-break-expected.txt
index 4339645cc8..e858e836e8 100644
--- a/deps/v8/test/inspector/debugger/framework-break-expected.txt
+++ b/deps/v8/test/inspector/debugger/framework-break-expected.txt
@@ -43,13 +43,13 @@ Running test: testDebuggerStatement
Running test: testSyncDOMBreakpoint
> all frames in framework:
> mixed, top frame in framework:
-syncDOMBreakpoint (framework.js:33:2)
+syncDOMBreakpoint (framework.js:33:12)
(anonymous) (user.js:0:0)
Running test: testSyncDOMBreakpointWithInlinedUserFrame
> mixed, top frame in framework:
-syncDOMBreakpoint (framework.js:33:2)
+syncDOMBreakpoint (framework.js:33:12)
userFunction (user.js:70:2)
inlinedWrapper (framework.js:64:4)
syncDOMBreakpointWithInlinedUserFrame (framework.js:67:2)
diff --git a/deps/v8/test/inspector/debugger/framework-break.js b/deps/v8/test/inspector/debugger/framework-break.js
index 1566c264a2..9b9fee6f3e 100644
--- a/deps/v8/test/inspector/debugger/framework-break.js
+++ b/deps/v8/test/inspector/debugger/framework-break.js
@@ -3,9 +3,9 @@
// found in the LICENSE file.
// Flags: --allow-natives-syntax
-InspectorTest.log('Checks that breaks in framework code correctly processed.');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks that breaks in framework code correctly processed.');
-InspectorTest.addScript(`
+contextGroup.addScript(`
function frameworkAssert() {
console.assert(false);
}
@@ -30,7 +30,7 @@ function debuggerStatement() {
}
function syncDOMBreakpoint() {
- breakProgram('', '');
+ inspector.breakProgram('', '');
}
function asyncDOMBreakpoint() {
@@ -69,7 +69,7 @@ function syncDOMBreakpointWithInlinedUserFrame() {
//# sourceURL=framework.js`, 8, 26);
-InspectorTest.addScript(`
+contextGroup.addScript(`
function throwUserException() {
throw new Error();
}
@@ -80,9 +80,9 @@ function userFunction() {
//# sourceURL=user.js`, 64, 26)
-InspectorTest.setupScriptMap();
+session.setupScriptMap();
Protocol.Debugger.onPaused(message => {
- InspectorTest.logCallFrames(message.params.callFrames);
+ session.logCallFrames(message.params.callFrames);
InspectorTest.log('');
Protocol.Debugger.resume();
});
@@ -188,16 +188,16 @@ InspectorTest.runTestSuite([
},
function testAsyncDOMBreakpoint(next) {
- utils.schedulePauseOnNextStatement('', '');
+ contextGroup.schedulePauseOnNextStatement('', '');
InspectorTest.log('> all frames in framework:');
Protocol.Runtime
.evaluate(
{expression: 'asyncDOMBreakpoint()//# sourceURL=framework.js'})
- .then(() => utils.cancelPauseOnNextStatement())
+ .then(() => contextGroup.cancelPauseOnNextStatement())
.then(
() => Protocol.Runtime.evaluate(
{expression: '42//# sourceURL=user.js'}))
- .then(() => utils.schedulePauseOnNextStatement('', ''))
+ .then(() => contextGroup.schedulePauseOnNextStatement('', ''))
.then(
() => Protocol.Runtime.evaluate(
{expression: 'asyncDOMBreakpoint()//# sourceURL=user.js'}))
diff --git a/deps/v8/test/inspector/debugger/framework-nested-scheduled-break-expected.txt b/deps/v8/test/inspector/debugger/framework-nested-scheduled-break-expected.txt
index a7ab22229e..f9901f099b 100644
--- a/deps/v8/test/inspector/debugger/framework-nested-scheduled-break-expected.txt
+++ b/deps/v8/test/inspector/debugger/framework-nested-scheduled-break-expected.txt
@@ -3,10 +3,10 @@ break reason: framework-break
break aux data: {
"data": "data for framework-break"
}
-doFrameworkBreak (framework.js:20:2)
-doFrameworkWork (framework.js:15:2)
-frameworkCall (framework.js:9:2)
-testFunction (user.js:27:2)
+doFrameworkBreak (framework.js:20:12)
+doFrameworkWork (framework.js:15:12)
+frameworkCall (framework.js:9:12)
+testFunction (user.js:27:12)
(anonymous) (expr.js:0:0)
break reason: ambiguous
@@ -25,17 +25,17 @@ break aux data: {
}
callback (user.js:31:17)
doFrameworkWork (framework.js:16:2)
-frameworkCall (framework.js:9:2)
-testFunction (user.js:27:2)
+frameworkCall (framework.js:9:12)
+testFunction (user.js:27:12)
(anonymous) (expr.js:0:0)
break reason: user-break
break aux data: {
"data": "data for user-break"
}
-callback (user.js:32:2)
+callback (user.js:32:12)
doFrameworkWork (framework.js:16:2)
-frameworkCall (framework.js:9:2)
-testFunction (user.js:27:2)
+frameworkCall (framework.js:9:12)
+testFunction (user.js:27:12)
(anonymous) (expr.js:0:0)
diff --git a/deps/v8/test/inspector/debugger/framework-nested-scheduled-break.js b/deps/v8/test/inspector/debugger/framework-nested-scheduled-break.js
index bb1e47199c..3e6299154d 100644
--- a/deps/v8/test/inspector/debugger/framework-nested-scheduled-break.js
+++ b/deps/v8/test/inspector/debugger/framework-nested-scheduled-break.js
@@ -2,44 +2,44 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Checks nested scheduled break in framework code.');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks nested scheduled break in framework code.');
-InspectorTest.addScript(`
+contextGroup.addScript(`
function frameworkCall(callback) {
- callWithScheduledBreak(doFrameworkWork.bind(null, callback),
+ inspector.callWithScheduledBreak(doFrameworkWork.bind(null, callback),
'top-framework-scheduled-break',
JSON.stringify({ data: 'data for top-framework-scheduled-break' }));
}
function doFrameworkWork(callback) {
- callWithScheduledBreak(doFrameworkBreak, 'should-not-be-a-reason', '');
+ inspector.callWithScheduledBreak(doFrameworkBreak, 'should-not-be-a-reason', '');
callback();
}
function doFrameworkBreak() {
- breakProgram('framework-break', JSON.stringify({ data: 'data for framework-break' }));
+ inspector.breakProgram('framework-break', JSON.stringify({ data: 'data for framework-break' }));
}
//# sourceURL=framework.js`, 7, 26);
-InspectorTest.addScript(`
+contextGroup.addScript(`
function testFunction() {
- callWithScheduledBreak(frameworkCall.bind(null, callback),
+ inspector.callWithScheduledBreak(frameworkCall.bind(null, callback),
'top-scheduled-break', '');
}
function callback() {
- breakProgram('user-break', JSON.stringify({ data: 'data for user-break' }));
+ inspector.breakProgram('user-break', JSON.stringify({ data: 'data for user-break' }));
return 42;
}
//# sourceURL=user.js`, 25, 26);
-InspectorTest.setupScriptMap();
+session.setupScriptMap();
Protocol.Debugger.onPaused(message => {
InspectorTest.log('break reason: ' + message.params.reason);
InspectorTest.log('break aux data: ' + JSON.stringify(message.params.data || {}, null, ' '));
- InspectorTest.logCallFrames(message.params.callFrames);
+ session.logCallFrames(message.params.callFrames);
InspectorTest.log('');
Protocol.Debugger.resume();
});
diff --git a/deps/v8/test/inspector/debugger/framework-precise-ranges.js b/deps/v8/test/inspector/debugger/framework-precise-ranges.js
index 3b23cf50df..4f76033a96 100644
--- a/deps/v8/test/inspector/debugger/framework-precise-ranges.js
+++ b/deps/v8/test/inspector/debugger/framework-precise-ranges.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Checks framework debugging with blackboxed ranges.');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks framework debugging with blackboxed ranges.');
-InspectorTest.addScript(
+contextGroup.addScript(
`
function foo() {
return boo();
@@ -18,9 +18,9 @@ function testFunction() {
//# sourceURL=test.js`,
7, 26);
-InspectorTest.setupScriptMap();
+session.setupScriptMap();
Protocol.Debugger.onPaused(message => {
- InspectorTest.logCallFrames(message.params.callFrames);
+ session.logCallFrames(message.params.callFrames);
InspectorTest.log('');
Protocol.Debugger.stepInto();
});
@@ -64,7 +64,7 @@ var testSuite = [
];
function testPositions(positions) {
- utils.schedulePauseOnNextStatement('', '');
+ contextGroup.schedulePauseOnNextStatement('', '');
return Protocol.Debugger
.setBlackboxedRanges({scriptId: scriptId, positions: positions})
.then(InspectorTest.logMessage)
diff --git a/deps/v8/test/inspector/debugger/framework-stepping-expected.txt b/deps/v8/test/inspector/debugger/framework-stepping-expected.txt
index aee4bf3eaf..fa2bb35f5a 100644
--- a/deps/v8/test/inspector/debugger/framework-stepping-expected.txt
+++ b/deps/v8/test/inspector/debugger/framework-stepping-expected.txt
@@ -67,7 +67,7 @@ testStepFromUser (user.js:31:2)
Executing resume...
Running test: testStepIntoFromFramework
-frameworkBreakAndCall (framework.js:14:2)
+frameworkBreakAndCall (framework.js:14:12)
testStepFromFramework (user.js:35:2)
(anonymous) (expr.js:0:0)
@@ -80,7 +80,7 @@ testStepFromFramework (user.js:35:2)
Executing resume...
Running test: testStepOverFromFramework
-frameworkBreakAndCall (framework.js:14:2)
+frameworkBreakAndCall (framework.js:14:12)
testStepFromFramework (user.js:35:2)
(anonymous) (expr.js:0:0)
@@ -91,7 +91,7 @@ testStepFromFramework (user.js:36:0)
Executing resume...
Running test: testStepOutFromFramework
-frameworkBreakAndCall (framework.js:14:2)
+frameworkBreakAndCall (framework.js:14:12)
testStepFromFramework (user.js:35:2)
(anonymous) (expr.js:0:0)
diff --git a/deps/v8/test/inspector/debugger/framework-stepping.js b/deps/v8/test/inspector/debugger/framework-stepping.js
index 6c6ae9caa0..f91c06ba52 100644
--- a/deps/v8/test/inspector/debugger/framework-stepping.js
+++ b/deps/v8/test/inspector/debugger/framework-stepping.js
@@ -2,22 +2,22 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Checks stepping with blackboxed frames on stack');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks stepping with blackboxed frames on stack');
-InspectorTest.addScript(
+contextGroup.addScript(
`
function frameworkCall(funcs) {
for (var f of funcs) f();
}
function frameworkBreakAndCall(funcs) {
- breakProgram('', '');
+ inspector.breakProgram('', '');
for (var f of funcs) f();
}
//# sourceURL=framework.js`,
8, 4);
-InspectorTest.addScript(
+contextGroup.addScript(
`
function userFoo() {
return 1;
@@ -37,7 +37,7 @@ function testStepFromFramework() {
//# sourceURL=user.js`,
21, 4);
-InspectorTest.setupScriptMap();
+session.setupScriptMap();
Protocol.Debugger.enable()
.then(
@@ -47,7 +47,7 @@ Protocol.Debugger.enable()
var testSuite = [
function testStepIntoFromUser(next) {
- utils.schedulePauseOnNextStatement('', '');
+ contextGroup.schedulePauseOnNextStatement('', '');
test('testStepFromUser()', [
'print', // before testStepFromUser call
'stepInto', 'stepInto', 'print', // userFoo
@@ -57,7 +57,7 @@ var testSuite = [
},
function testStepOverFromUser(next) {
- utils.schedulePauseOnNextStatement('', '');
+ contextGroup.schedulePauseOnNextStatement('', '');
test('testStepFromUser()', [
'print', // before testStepFromUser call
'stepInto', 'stepInto', 'print', // userFoo
@@ -67,7 +67,7 @@ var testSuite = [
},
function testStepOutFromUser(next) {
- utils.schedulePauseOnNextStatement('', '');
+ contextGroup.schedulePauseOnNextStatement('', '');
test('testStepFromUser()', [
'print', // before testStepFromUser call
'stepInto', 'stepInto', 'print', // userFoo
@@ -101,7 +101,7 @@ function test(entryExpression, actions) {
Protocol.Debugger.onPaused(message => {
var action = actions.shift() || 'resume';
if (action === 'print') {
- InspectorTest.logCallFrames(message.params.callFrames);
+ session.logCallFrames(message.params.callFrames);
InspectorTest.log('');
action = actions.shift() || 'resume';
}
diff --git a/deps/v8/test/inspector/debugger/get-possible-breakpoints-array-literal-expected.txt b/deps/v8/test/inspector/debugger/get-possible-breakpoints-array-literal-expected.txt
index eff9225d66..c5d8c2466c 100644
--- a/deps/v8/test/inspector/debugger/get-possible-breakpoints-array-literal-expected.txt
+++ b/deps/v8/test/inspector/debugger/get-possible-breakpoints-array-literal-expected.txt
@@ -1,3 +1,4 @@
+Tests possible breakpoints in array literal
{
id : <messageId>
result : {
diff --git a/deps/v8/test/inspector/debugger/get-possible-breakpoints-array-literal.js b/deps/v8/test/inspector/debugger/get-possible-breakpoints-array-literal.js
index 13e2920cc7..a5aeeff34b 100644
--- a/deps/v8/test/inspector/debugger/get-possible-breakpoints-array-literal.js
+++ b/deps/v8/test/inspector/debugger/get-possible-breakpoints-array-literal.js
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests possible breakpoints in array literal');
+
Protocol.Debugger.enable();
Protocol.Debugger.onceScriptParsed().then(message => message.params.scriptId)
@@ -9,4 +11,4 @@ Protocol.Debugger.onceScriptParsed().then(message => message.params.scriptId)
.then(InspectorTest.logMessage)
.then(InspectorTest.completeTest);
-InspectorTest.addScript("() => []");
+contextGroup.addScript("() => []");
diff --git a/deps/v8/test/inspector/debugger/get-possible-breakpoints-lazy-error-expected.txt b/deps/v8/test/inspector/debugger/get-possible-breakpoints-lazy-error-expected.txt
new file mode 100644
index 0000000000..9c65ba2325
--- /dev/null
+++ b/deps/v8/test/inspector/debugger/get-possible-breakpoints-lazy-error-expected.txt
@@ -0,0 +1,26 @@
+getPossibleBreakpoints should not crash during lazy compilation (crbug.com/715334)
+{
+ method : Debugger.scriptParsed
+ params : {
+ endColumn : 21
+ endLine : 2
+ executionContextId : <executionContextId>
+ hasSourceURL : true
+ hash : FA2A959297747012766FE9C5006E7F522D88FA72
+ isLiveEdit : false
+ isModule : false
+ length : 52
+ scriptId : <scriptId>
+ sourceMapURL :
+ startColumn : 0
+ startLine : 0
+ url : test.js
+ }
+}
+{
+ id : <messageId>
+ result : {
+ locations : [
+ ]
+ }
+}
diff --git a/deps/v8/test/inspector/debugger/get-possible-breakpoints-lazy-error.js b/deps/v8/test/inspector/debugger/get-possible-breakpoints-lazy-error.js
new file mode 100644
index 0000000000..d1326e967f
--- /dev/null
+++ b/deps/v8/test/inspector/debugger/get-possible-breakpoints-lazy-error.js
@@ -0,0 +1,28 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let {session, contextGroup, Protocol} = InspectorTest.start('getPossibleBreakpoints should not crash during lazy compilation (crbug.com/715334)');
+
+contextGroup.addScript(`
+function test() { continue; }
+//# sourceURL=test.js`);
+
+(async function test() {
+ Protocol.Debugger.enable();
+ let script = await Protocol.Debugger.onceScriptParsed();
+ InspectorTest.logMessage(script);
+ let scriptId = script.params.scriptId;
+ Protocol.Debugger.onScriptFailedToParse(msg => {
+ InspectorTest.logMessage(msg);
+ if (msg.params.scriptId !== script.params.scriptId) {
+ InspectorTest.log('Failed script to parse event has different scriptId');
+ } else {
+ InspectorTest.log('One script is reported twice');
+ }
+ });
+ let response = await Protocol.Debugger.getPossibleBreakpoints({
+ start: {scriptId, lineNumber: 0, columnNumber: 0}});
+ InspectorTest.logMessage(response);
+ InspectorTest.completeTest();
+})();
diff --git a/deps/v8/test/inspector/debugger/get-possible-breakpoints-master-expected.txt b/deps/v8/test/inspector/debugger/get-possible-breakpoints-master-expected.txt
index 7a118e6c3d..d83a4aa137 100644
--- a/deps/v8/test/inspector/debugger/get-possible-breakpoints-master-expected.txt
+++ b/deps/v8/test/inspector/debugger/get-possible-breakpoints-master-expected.txt
@@ -183,7 +183,7 @@ function testCaughtException() {
|R|}
function testClasses() {
- |_|class Cat {
+ class Cat {
constructor(name) {
|_|this.name = name;
|R|}
@@ -191,7 +191,7 @@ function testClasses() {
speak() {
|R|}
}
- |_|class Lion extends Cat {
+ class Lion extends Cat {
constructor(name) {
|C|super(name);
|R|}
@@ -204,17 +204,17 @@ function testClasses() {
|R|}
async function asyncFoo() {
- |_|await Promise.resolve().then(v => v |_|* 2|R|);
+ |_|await Promise.|C|resolve().|C|then(v => v |_|* 2|R|);
|C|return42();
|_|await |C|asyncBoo();
|R|}
async function asyncBoo() {
- |_|await Promise.resolve();
+ |_|await Promise.|C|resolve();
|R|}
async function testAsyncAwait() {
- |_|await asyncFoo();
+ |_|await |C|asyncFoo();
|_|await |C|awaitBoo();
|R|}
@@ -247,7 +247,7 @@ async function testPromiseComplex() {
var testPromise = |C|new Promise(resolve => nextTest |_|= resolve|R|);
async function main() {
async function foo() {
- |_|await Promise.resolve();
+ |_|await Promise.|C|resolve();
|_|return 42;
|R|}
var x = |_|1;
diff --git a/deps/v8/test/inspector/debugger/get-possible-breakpoints-master.js b/deps/v8/test/inspector/debugger/get-possible-breakpoints-master.js
index 482f68f87f..07f90e7a25 100644
--- a/deps/v8/test/inspector/debugger/get-possible-breakpoints-master.js
+++ b/deps/v8/test/inspector/debugger/get-possible-breakpoints-master.js
@@ -4,10 +4,10 @@
// Flags: --turbo
-InspectorTest.log('Checks Debugger.getPossibleBreakpoints');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks Debugger.getPossibleBreakpoints');
var source = utils.read('test/inspector/debugger/resources/break-locations.js');
-InspectorTest.addScript(source);
+contextGroup.addScript(source);
Protocol.Debugger.onceScriptParsed()
.then(message => Protocol.Debugger.getPossibleBreakpoints({ start: { lineNumber: 0, columnNumber : 0, scriptId: message.params.scriptId }}))
diff --git a/deps/v8/test/inspector/debugger/get-possible-breakpoints-restrict-to-function.js b/deps/v8/test/inspector/debugger/get-possible-breakpoints-restrict-to-function.js
index f5020eb64b..27c65fe290 100644
--- a/deps/v8/test/inspector/debugger/get-possible-breakpoints-restrict-to-function.js
+++ b/deps/v8/test/inspector/debugger/get-possible-breakpoints-restrict-to-function.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Checks Debugger.getPossibleBreakpoints with ignoreNestedFunctions');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks Debugger.getPossibleBreakpoints with ignoreNestedFunctions');
var source = `
function test() {
@@ -17,7 +17,7 @@ function test() {
nested2();
}
//# sourceURL=test.js`;
-InspectorTest.addScript(source);
+contextGroup.addScript(source);
var scriptId;
Protocol.Debugger.onceScriptParsed().then(message => {
@@ -25,7 +25,7 @@ Protocol.Debugger.onceScriptParsed().then(message => {
scriptId = message.params.scriptId;
}).then(() => InspectorTest.runTestSuite(tests));
-InspectorTest.setupScriptMap();
+session.setupScriptMap();
Protocol.Debugger.onPaused(dumpBreakLocationInSourceAndResume);
Protocol.Debugger.enable();
@@ -103,7 +103,7 @@ function dumpAllLocations(message) {
}
function dumpBreakLocationInSourceAndResume(message) {
- InspectorTest.logCallFrames([ message.params.callFrames[0] ]);
+ session.logCallFrames([ message.params.callFrames[0] ]);
var location = message.params.callFrames[0].location;
var sourceLines = source.split('\n')
diff --git a/deps/v8/test/inspector/debugger/get-possible-breakpoints.js b/deps/v8/test/inspector/debugger/get-possible-breakpoints.js
index ef996e910b..3232d59574 100644
--- a/deps/v8/test/inspector/debugger/get-possible-breakpoints.js
+++ b/deps/v8/test/inspector/debugger/get-possible-breakpoints.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Test for Debugger.getPossibleBreakpoints');
+let {session, contextGroup, Protocol} = InspectorTest.start('Test for Debugger.getPossibleBreakpoints');
Protocol.Runtime.enable();
Protocol.Debugger.enable();
@@ -153,7 +153,7 @@ function foo6() { Promise.resolve().then(() => 42) }`;
function compileScript(source, origin) {
var promise = Protocol.Debugger.onceScriptParsed().then(message => message.params.scriptId);
if (!origin) origin = { name: '', line_offset: 0, column_offset: 0 };
- utils.compileAndRunWithOrigin(source, origin.name, origin.line_offset, origin.column_offset, false);
+ contextGroup.addScript(source, origin.line_offset, origin.column_offset, origin.name);
return promise;
}
diff --git a/deps/v8/test/inspector/debugger/inspector-break-api-expected.txt b/deps/v8/test/inspector/debugger/inspector-break-api-expected.txt
index f3b019d058..1677b5923a 100644
--- a/deps/v8/test/inspector/debugger/inspector-break-api-expected.txt
+++ b/deps/v8/test/inspector/debugger/inspector-break-api-expected.txt
@@ -2,7 +2,7 @@ Checks breakProgram,(schedule|cancel)PauseOnNextStatement test API
Running test: testBreakProgram
Stack:
-callBreakProgram (:9:2)
+callBreakProgram (:9:12)
(anonymous) (:0:0)
Other data:
{
diff --git a/deps/v8/test/inspector/debugger/inspector-break-api.js b/deps/v8/test/inspector/debugger/inspector-break-api.js
index 009bf717a4..dc39924200 100644
--- a/deps/v8/test/inspector/debugger/inspector-break-api.js
+++ b/deps/v8/test/inspector/debugger/inspector-break-api.js
@@ -2,21 +2,21 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Checks breakProgram,(schedule|cancel)PauseOnNextStatement test API");
+let {session, contextGroup, Protocol} = InspectorTest.start("Checks breakProgram,(schedule|cancel)PauseOnNextStatement test API");
-InspectorTest.addScript(`
+contextGroup.addScript(`
function callBreakProgram() {
- breakProgram('reason', JSON.stringify({a: 42}));
+ inspector.breakProgram('reason', JSON.stringify({a: 42}));
}
function foo() {
return 42;
}`, 7, 26);
-InspectorTest.setupScriptMap();
+session.setupScriptMap();
Protocol.Debugger.onPaused(message => {
InspectorTest.log('Stack:');
- InspectorTest.logCallFrames(message.params.callFrames);
+ session.logCallFrames(message.params.callFrames);
delete message.params.callFrames;
InspectorTest.log('Other data:');
InspectorTest.logMessage(message);
@@ -33,17 +33,17 @@ InspectorTest.runTestSuite([
},
function testSchedulePauseOnNextStatement(next) {
- utils.schedulePauseOnNextStatement('reason', JSON.stringify({a: 42}));
+ contextGroup.schedulePauseOnNextStatement('reason', JSON.stringify({a: 42}));
Protocol.Runtime.evaluate({ expression: 'foo()//# sourceURL=expr1.js'})
.then(() => Protocol.Runtime.evaluate({
expression: 'foo()//# sourceURL=expr2.js'}))
- .then(() => utils.cancelPauseOnNextStatement())
+ .then(() => contextGroup.cancelPauseOnNextStatement())
.then(next);
},
function testCancelPauseOnNextStatement(next) {
- utils.schedulePauseOnNextStatement('reason', JSON.stringify({a: 42}));
- utils.cancelPauseOnNextStatement();
+ contextGroup.schedulePauseOnNextStatement('reason', JSON.stringify({a: 42}));
+ contextGroup.cancelPauseOnNextStatement();
Protocol.Runtime.evaluate({ expression: 'foo()'})
.then(next);
}
diff --git a/deps/v8/test/inspector/debugger/max-async-call-chain-depth-expected.txt b/deps/v8/test/inspector/debugger/max-async-call-chain-depth-expected.txt
new file mode 100644
index 0000000000..0c421da607
--- /dev/null
+++ b/deps/v8/test/inspector/debugger/max-async-call-chain-depth-expected.txt
@@ -0,0 +1,91 @@
+Checks that we trim async call chains correctly.
+set async chain depth to 8
+
+Running test: testDebuggerPaused
+Run expression 'debugger;' with async chain len: 4
+actual async chain len: 1
+Run expression 'debugger;' with async chain len: 8
+actual async chain len: 1
+Run expression 'debugger;' with async chain len: 9
+actual async chain len: 1
+Run expression 'debugger;' with async chain len: 32
+actual async chain len: 1
+
+Running test: testConsoleTrace
+Run expression 'console.trace(42);' with async chain len: 4
+actual async chain len: 1
+Run expression 'console.trace(42);' with async chain len: 8
+actual async chain len: 1
+Run expression 'console.trace(42);' with async chain len: 9
+actual async chain len: 1
+Run expression 'console.trace(42);' with async chain len: 32
+actual async chain len: 1
+
+Running test: testDebuggerPausedSetTimeout
+Run expression 'debugger;' with async chain len: 4
+actual async chain len: 4
+Run expression 'debugger;' with async chain len: 8
+actual async chain len: 8
+Run expression 'debugger;' with async chain len: 9
+actual async chain len: 8
+Run expression 'debugger;' with async chain len: 32
+actual async chain len: 8
+
+Running test: testConsoleTraceSetTimeout
+Run expression 'console.trace(42);' with async chain len: 4
+actual async chain len: 4
+Run expression 'console.trace(42);' with async chain len: 8
+actual async chain len: 8
+Run expression 'console.trace(42);' with async chain len: 9
+actual async chain len: 8
+Run expression 'console.trace(42);' with async chain len: 32
+actual async chain len: 8
+
+Running test: testConsoleTraceWithEmptySync
+{
+ callFrames : [
+ [0] : {
+ columnNumber : 66
+ functionName : Promise.then
+ lineNumber : 0
+ scriptId : <scriptId>
+ url :
+ }
+ ]
+ parent : {
+ callFrames : [
+ [0] : {
+ columnNumber : 47
+ functionName :
+ lineNumber : 0
+ scriptId : <scriptId>
+ url :
+ }
+ ]
+ description : Promise.resolve
+ }
+}
+
+Running test: testDebuggerPausedThenableJob
+Run expression 'debugger;' with async chain len: 4
+actual async chain len: 1
+Run expression 'debugger;' with async chain len: 8
+actual async chain len: 1
+Run expression 'debugger;' with async chain len: 9
+actual async chain len: 1
+Run expression 'debugger;' with async chain len: 32
+actual async chain len: 1
+
+Running test: testConsoleTraceThenableJob
+Run expression 'console.trace(42);' with async chain len: 4
+actual async chain len: 1
+Run expression 'console.trace(42);' with async chain len: 8
+actual async chain len: 1
+Run expression 'console.trace(42);' with async chain len: 9
+actual async chain len: 1
+Run expression 'console.trace(42);' with async chain len: 32
+actual async chain len: 1
+
+Running test: twoConsoleAssert
+actual async chain len: 1
+actual async chain len: 2
diff --git a/deps/v8/test/inspector/debugger/max-async-call-chain-depth.js b/deps/v8/test/inspector/debugger/max-async-call-chain-depth.js
new file mode 100644
index 0000000000..ae98f55037
--- /dev/null
+++ b/deps/v8/test/inspector/debugger/max-async-call-chain-depth.js
@@ -0,0 +1,162 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// TODO(kozyatinskiy): fix or remove it later.
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks that we trim async call chains correctly.');
+
+Protocol.Debugger.enable();
+InspectorTest.log('set async chain depth to 8');
+Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 8});
+InspectorTest.runAsyncTestSuite([
+ async function testDebuggerPaused() {
+ runWithAsyncChain(4, 'debugger;');
+ dumpAsyncChainLength(await Protocol.Debugger.oncePaused());
+ await Protocol.Debugger.resume();
+
+ runWithAsyncChain(8, 'debugger;');
+ dumpAsyncChainLength(await Protocol.Debugger.oncePaused());
+ await Protocol.Debugger.resume();
+
+ runWithAsyncChain(9, 'debugger;');
+ dumpAsyncChainLength(await Protocol.Debugger.oncePaused());
+ await Protocol.Debugger.resume();
+
+ runWithAsyncChain(32, 'debugger;');
+ dumpAsyncChainLength(await Protocol.Debugger.oncePaused());
+ await Protocol.Debugger.resume();
+ },
+
+ async function testConsoleTrace() {
+ Protocol.Runtime.enable();
+ runWithAsyncChain(4, 'console.trace(42);');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ runWithAsyncChain(8, 'console.trace(42);');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ runWithAsyncChain(9, 'console.trace(42);');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ runWithAsyncChain(32, 'console.trace(42);');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+ },
+
+ async function testDebuggerPausedSetTimeout() {
+ runWithAsyncChainSetTimeout(4, 'debugger;');
+ dumpAsyncChainLength(await Protocol.Debugger.oncePaused());
+ await Protocol.Debugger.resume();
+
+ runWithAsyncChainSetTimeout(8, 'debugger;');
+ dumpAsyncChainLength(await Protocol.Debugger.oncePaused());
+ await Protocol.Debugger.resume();
+
+ runWithAsyncChainSetTimeout(9, 'debugger;');
+ dumpAsyncChainLength(await Protocol.Debugger.oncePaused());
+ await Protocol.Debugger.resume();
+
+ runWithAsyncChainSetTimeout(32, 'debugger;');
+ dumpAsyncChainLength(await Protocol.Debugger.oncePaused());
+ await Protocol.Debugger.resume();
+ },
+
+ async function testConsoleTraceSetTimeout() {
+ runWithAsyncChainSetTimeout(4, 'console.trace(42);');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ runWithAsyncChainSetTimeout(8, 'console.trace(42);');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ runWithAsyncChainSetTimeout(9, 'console.trace(42);');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ runWithAsyncChainSetTimeout(32, 'console.trace(42);');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+ },
+
+ async function testConsoleTraceWithEmptySync() {
+ Protocol.Runtime.evaluate({
+ expression: 'new Promise(resolve => setTimeout(resolve, 0)).then(() => console.trace(42))'
+ });
+ InspectorTest.logMessage((await Protocol.Runtime.onceConsoleAPICalled()).params.stackTrace);
+ },
+
+ async function testDebuggerPausedThenableJob() {
+ runWithThenableJob(4, 'debugger;');
+ dumpAsyncChainLength(await Protocol.Debugger.oncePaused());
+ await Protocol.Debugger.resume();
+
+ runWithThenableJob(8, 'debugger;');
+ dumpAsyncChainLength(await Protocol.Debugger.oncePaused());
+ await Protocol.Debugger.resume();
+
+ runWithThenableJob(9, 'debugger;');
+ dumpAsyncChainLength(await Protocol.Debugger.oncePaused());
+ await Protocol.Debugger.resume();
+
+ runWithThenableJob(32, 'debugger;');
+ dumpAsyncChainLength(await Protocol.Debugger.oncePaused());
+ await Protocol.Debugger.resume();
+ },
+
+ async function testConsoleTraceThenableJob() {
+ runWithThenableJob(4, 'console.trace(42);');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ runWithThenableJob(8, 'console.trace(42);');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ runWithThenableJob(9, 'console.trace(42);');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+
+ runWithThenableJob(32, 'console.trace(42);');
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+ },
+
+ async function twoConsoleAssert() {
+ Protocol.Runtime.evaluate({
+ expression: 'setTimeout(' +
+ 'setTimeout.bind(null, ' +
+ 'setTimeout.bind(null, () => { console.assert(); setTimeout(console.assert, 0) }, 0), 0), 0)'
+ });
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+ dumpAsyncChainLength(await Protocol.Runtime.onceConsoleAPICalled());
+ }
+]);
+
+function runWithAsyncChain(len, source) {
+ InspectorTest.log(`Run expression '${source}' with async chain len: ${len}`);
+ let then = '.then(() => 1)';
+ let pause = `.then(() => { ${source} })`;
+ Protocol.Runtime.evaluate({
+ expression: `Promise.resolve()${then.repeat(len - 1)}${pause}`
+ });
+}
+
+function runWithAsyncChainSetTimeout(len, source) {
+ InspectorTest.log(`Run expression '${source}' with async chain len: ${len}`);
+ let setTimeout = 'setTimeout(() => {';
+ let suffix = '}, 0)';
+ Protocol.Runtime.evaluate({
+ expression: `${setTimeout.repeat(len)}${source}${suffix.repeat(len)}`
+ });
+}
+
+function runWithThenableJob(len, source) {
+ InspectorTest.log(`Run expression '${source}' with async chain len: ${len}`);
+ let then = '.then(Promise.resolve.bind(Promise, 0))';
+ let pause = `.then(() => { ${source} })`;
+ Protocol.Runtime.evaluate({
+ expression: `Promise.resolve()${then.repeat(len - 1)}${pause}`
+ });
+}
+
+function dumpAsyncChainLength(message) {
+ let stackTrace = message.params.asyncStackTrace || message.params.stackTrace.parent;
+ let asyncChainCount = 0;
+ while (stackTrace) {
+ ++asyncChainCount;
+ stackTrace = stackTrace.parent;
+ }
+ InspectorTest.log(`actual async chain len: ${asyncChainCount}`);
+}
diff --git a/deps/v8/test/inspector/debugger/object-preview-internal-properties.js b/deps/v8/test/inspector/debugger/object-preview-internal-properties.js
index 78d4d8326e..442ca8149a 100644
--- a/deps/v8/test/inspector/debugger/object-preview-internal-properties.js
+++ b/deps/v8/test/inspector/debugger/object-preview-internal-properties.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Check internal properties reported in object preview.");
+let {session, contextGroup, Protocol} = InspectorTest.start("Check internal properties reported in object preview.");
Protocol.Debugger.enable();
Protocol.Runtime.enable();
diff --git a/deps/v8/test/inspector/debugger/pause-expected.txt b/deps/v8/test/inspector/debugger/pause-expected.txt
index 29b7e14082..a51bc8d0bc 100644
--- a/deps/v8/test/inspector/debugger/pause-expected.txt
+++ b/deps/v8/test/inspector/debugger/pause-expected.txt
@@ -19,6 +19,9 @@ Running test: testSkipOtherContext2
paused at:
#var a = 239;
+paused at:
+var a = #239;
+
Running test: testWithNativeBreakpoint
paused at:
diff --git a/deps/v8/test/inspector/debugger/pause-on-oom.js b/deps/v8/test/inspector/debugger/pause-on-oom.js
index e36d251b26..fe5d61b492 100644
--- a/deps/v8/test/inspector/debugger/pause-on-oom.js
+++ b/deps/v8/test/inspector/debugger/pause-on-oom.js
@@ -4,9 +4,9 @@
// Flags: --max-old-space-size=8
-InspectorTest.log('Check pause on OOM');
+let {session, contextGroup, Protocol} = InspectorTest.start('Check pause on OOM');
-InspectorTest.addScript(`
+contextGroup.addScript(`
var arr = [];
var stop = false;
function generateGarbage() {
diff --git a/deps/v8/test/inspector/debugger/pause.js b/deps/v8/test/inspector/debugger/pause.js
index 33f76f9dce..33ebeb830c 100644
--- a/deps/v8/test/inspector/debugger/pause.js
+++ b/deps/v8/test/inspector/debugger/pause.js
@@ -3,87 +3,99 @@
// found in the LICENSE file.
InspectorTest.log('Checks Debugger.pause');
+let contextGroup1 = new InspectorTest.ContextGroup();
+let session1 = contextGroup1.connect();
+let Protocol1 = session1.Protocol;
-InspectorTest.setupScriptMap();
-Protocol.Debugger.enable();
+session1.setupScriptMap();
+Protocol1.Debugger.enable();
InspectorTest.runAsyncTestSuite([
async function testPause() {
- Protocol.Debugger.pause();
- Protocol.Runtime.evaluate({expression: 'var a = 42;'});
- await waitPauseAndDumpLocation();
- await Protocol.Debugger.resume();
+ Protocol1.Debugger.pause();
+ Protocol1.Runtime.evaluate({expression: 'var a = 42;'});
+ await waitPauseAndDumpLocation(session1);
+ await Protocol1.Debugger.resume();
},
async function testSkipFrameworks() {
- Protocol.Debugger.setBlackboxPatterns({patterns: ['framework\.js']});
- Protocol.Debugger.pause();
- Protocol.Runtime.evaluate({expression: 'var a = 42; //# sourceURL=framework.js'});
- Protocol.Runtime.evaluate({expression: 'var a = 239;'});
- await waitPauseAndDumpLocation();
- await Protocol.Debugger.resume();
+ Protocol1.Debugger.setBlackboxPatterns({patterns: ['framework\.js']});
+ Protocol1.Debugger.pause();
+ Protocol1.Runtime.evaluate({expression: 'var a = 42; //# sourceURL=framework.js'});
+ Protocol1.Runtime.evaluate({expression: 'var a = 239;'});
+ await waitPauseAndDumpLocation(session1);
+ await Protocol1.Debugger.resume();
},
async function testSkipOtherContext1() {
- let contextGroupId = utils.createContextGroup();
- Protocol.Debugger.enable({}, contextGroupId);
- Protocol.Debugger.pause();
- Protocol.Runtime.evaluate({expression: 'var a = 42; //# sourceURL=framework.js'});
- Protocol.Runtime.evaluate({expression: 'var a = 239;'}, contextGroupId);
- Protocol.Runtime.evaluate({expression: 'var a = 1;'});
- await waitPauseAndDumpLocation();
- await Protocol.Debugger.resume();
- await Protocol.Debugger.disable({}, contextGroupId);
+ let contextGroup2 = new InspectorTest.ContextGroup();
+ let session2 = contextGroup2.connect();
+ let Protocol2 = session2.Protocol;
+ Protocol2.Debugger.enable({});
+ Protocol1.Debugger.pause();
+ Protocol1.Runtime.evaluate({expression: 'var a = 42; //# sourceURL=framework.js'});
+ Protocol2.Runtime.evaluate({expression: 'var a = 239;'});
+ Protocol1.Runtime.evaluate({expression: 'var a = 1;'});
+ await waitPauseAndDumpLocation(session1);
+ await Protocol1.Debugger.resume();
+ await Protocol2.Debugger.disable({});
},
async function testSkipOtherContext2() {
- let contextGroupId = utils.createContextGroup();
- Protocol.Debugger.enable({}, contextGroupId);
- Protocol.Debugger.pause({}, contextGroupId);
- Protocol.Runtime.evaluate({expression: 'var a = 42; //# sourceURL=framework.js'});
- Protocol.Runtime.evaluate({expression: 'var a = 239;'}, contextGroupId);
- Protocol.Runtime.evaluate({expression: 'var a = 1;'});
- await waitPauseAndDumpLocation();
- await Protocol.Debugger.resume();
- await Protocol.Debugger.disable({}, contextGroupId);
+ let contextGroup2 = new InspectorTest.ContextGroup();
+ let session2 = contextGroup2.connect();
+ let Protocol2 = session2.Protocol;
+ session2.setupScriptMap();
+ Protocol2.Debugger.enable({});
+ Protocol2.Debugger.pause({});
+ Protocol1.Runtime.evaluate({expression: 'var a = 42; //# sourceURL=framework.js'});
+ Protocol2.Runtime.evaluate({expression: 'var a = 239;'});
+ Protocol1.Runtime.evaluate({expression: 'var a = 1;'});
+ await waitPauseAndDumpLocation(session2);
+ // should not resume pause from different context group id.
+ Protocol1.Debugger.resume();
+ Protocol2.Debugger.stepOver({});
+ await waitPauseAndDumpLocation(session2);
+ await Protocol2.Debugger.resume({});
+ await Protocol2.Debugger.disable({});
},
async function testWithNativeBreakpoint() {
- utils.schedulePauseOnNextStatement('', '');
- await Protocol.Debugger.pause();
- utils.cancelPauseOnNextStatement();
- Protocol.Runtime.evaluate({expression: 'var a = 42;'});
- await waitPauseAndDumpLocation();
- await Protocol.Debugger.resume();
+ contextGroup1.schedulePauseOnNextStatement('', '');
+ await Protocol1.Debugger.pause();
+ contextGroup1.cancelPauseOnNextStatement();
+ Protocol1.Runtime.evaluate({expression: 'var a = 42;'});
+ await waitPauseAndDumpLocation(session1);
+ await Protocol1.Debugger.resume();
- await Protocol.Debugger.pause();
- utils.schedulePauseOnNextStatement('', '');
- utils.cancelPauseOnNextStatement();
- Protocol.Runtime.evaluate({expression: 'var a = 42;'});
- await waitPauseAndDumpLocation();
- await Protocol.Debugger.resume();
+ await Protocol1.Debugger.pause();
+ contextGroup1.schedulePauseOnNextStatement('', '');
+ contextGroup1.cancelPauseOnNextStatement();
+ Protocol1.Runtime.evaluate({expression: 'var a = 42;'});
+ await waitPauseAndDumpLocation(session1);
+ await Protocol1.Debugger.resume();
- utils.schedulePauseOnNextStatement('', '');
- utils.cancelPauseOnNextStatement();
- await Protocol.Debugger.pause();
- Protocol.Runtime.evaluate({expression: 'var a = 42;'});
- await waitPauseAndDumpLocation();
- await Protocol.Debugger.resume();
+ contextGroup1.schedulePauseOnNextStatement('', '');
+ contextGroup1.cancelPauseOnNextStatement();
+ await Protocol1.Debugger.pause();
+ Protocol1.Runtime.evaluate({expression: 'var a = 42;'});
+ await waitPauseAndDumpLocation(session1);
+ await Protocol1.Debugger.resume();
},
async function testDisableBreaksShouldCancelPause() {
- await Protocol.Debugger.pause();
- await Protocol.Debugger.setBreakpointsActive({active: false});
- Protocol.Runtime.evaluate({expression: 'var a = 42;'})
- .then(() => Protocol.Debugger.setBreakpointsActive({active: true}))
- .then(() => Protocol.Runtime.evaluate({expression: 'debugger'}));
- await waitPauseAndDumpLocation();
- await Protocol.Debugger.resume();
+ await Protocol1.Debugger.pause();
+ await Protocol1.Debugger.setBreakpointsActive({active: false});
+ Protocol1.Runtime.evaluate({expression: 'var a = 42;'})
+ .then(() => Protocol1.Debugger.setBreakpointsActive({active: true}))
+ .then(() => Protocol1.Runtime.evaluate({expression: 'debugger'}));
+ await waitPauseAndDumpLocation(session1);
+ await Protocol1.Debugger.resume();
}
]);
-async function waitPauseAndDumpLocation() {
- var message = await Protocol.Debugger.oncePaused();
+async function waitPauseAndDumpLocation(session) {
+ var message = await session.Protocol.Debugger.oncePaused();
InspectorTest.log('paused at:');
- await InspectorTest.logSourceLocation(message.params.callFrames[0].location);
+ await session.logSourceLocation(message.params.callFrames[0].location);
return message;
}
diff --git a/deps/v8/test/inspector/debugger/promise-chain-when-limit-hit-expected.txt b/deps/v8/test/inspector/debugger/promise-chain-when-limit-hit-expected.txt
new file mode 100644
index 0000000000..57357ab15a
--- /dev/null
+++ b/deps/v8/test/inspector/debugger/promise-chain-when-limit-hit-expected.txt
@@ -0,0 +1,235 @@
+Tests how async promise chains behave when reaching the limit of stacks
+Checks correctness of promise chains when limit hit
+inspector.setMaxAsyncTaskStacks(3)
+Run expression 'console.trace()' with async chain len: 3
+{
+ method : Runtime.consoleAPICalled
+ params : {
+ args : [
+ [0] : {
+ type : string
+ value : console.trace
+ }
+ ]
+ executionContextId : <executionContextId>
+ stackTrace : {
+ callFrames : [
+ [0] : {
+ columnNumber : 67
+ functionName : Promise.resolve.then.then.then
+ lineNumber : 0
+ scriptId : <scriptId>
+ url :
+ }
+ ]
+ parent : {
+ callFrames : [
+ [0] : {
+ columnNumber : 46
+ functionName :
+ lineNumber : 0
+ scriptId : <scriptId>
+ url :
+ }
+ ]
+ }
+ }
+ timestamp : <timestamp>
+ type : trace
+ }
+}
+inspector.setMaxAsyncTaskStacks(4)
+Run expression 'console.trace()' with async chain len: 3
+{
+ method : Runtime.consoleAPICalled
+ params : {
+ args : [
+ [0] : {
+ type : string
+ value : console.trace
+ }
+ ]
+ executionContextId : <executionContextId>
+ stackTrace : {
+ callFrames : [
+ [0] : {
+ columnNumber : 67
+ functionName : Promise.resolve.then.then.then
+ lineNumber : 0
+ scriptId : <scriptId>
+ url :
+ }
+ ]
+ parent : {
+ callFrames : [
+ [0] : {
+ columnNumber : 46
+ functionName :
+ lineNumber : 0
+ scriptId : <scriptId>
+ url :
+ }
+ ]
+ description : Promise.resolve
+ }
+ }
+ timestamp : <timestamp>
+ type : trace
+ }
+}
+inspector.setMaxAsyncTaskStacks(5)
+Run expression 'console.trace()' with async chain len: 3
+{
+ method : Runtime.consoleAPICalled
+ params : {
+ args : [
+ [0] : {
+ type : string
+ value : console.trace
+ }
+ ]
+ executionContextId : <executionContextId>
+ stackTrace : {
+ callFrames : [
+ [0] : {
+ columnNumber : 67
+ functionName : Promise.resolve.then.then.then
+ lineNumber : 0
+ scriptId : <scriptId>
+ url :
+ }
+ ]
+ parent : {
+ callFrames : [
+ [0] : {
+ columnNumber : 46
+ functionName :
+ lineNumber : 0
+ scriptId : <scriptId>
+ url :
+ }
+ ]
+ description : Promise.resolve
+ }
+ }
+ timestamp : <timestamp>
+ type : trace
+ }
+}
+inspector.setMaxAsyncTaskStacks(6)
+Run expression 'console.trace()' with async chain len: 3
+{
+ method : Runtime.consoleAPICalled
+ params : {
+ args : [
+ [0] : {
+ type : string
+ value : console.trace
+ }
+ ]
+ executionContextId : <executionContextId>
+ stackTrace : {
+ callFrames : [
+ [0] : {
+ columnNumber : 67
+ functionName : Promise.resolve.then.then.then
+ lineNumber : 0
+ scriptId : <scriptId>
+ url :
+ }
+ ]
+ parent : {
+ callFrames : [
+ [0] : {
+ columnNumber : 46
+ functionName :
+ lineNumber : 0
+ scriptId : <scriptId>
+ url :
+ }
+ ]
+ description : Promise.resolve
+ }
+ }
+ timestamp : <timestamp>
+ type : trace
+ }
+}
+inspector.setMaxAsyncTaskStacks(7)
+Run expression 'console.trace()' with async chain len: 3
+{
+ method : Runtime.consoleAPICalled
+ params : {
+ args : [
+ [0] : {
+ type : string
+ value : console.trace
+ }
+ ]
+ executionContextId : <executionContextId>
+ stackTrace : {
+ callFrames : [
+ [0] : {
+ columnNumber : 67
+ functionName : Promise.resolve.then.then.then
+ lineNumber : 0
+ scriptId : <scriptId>
+ url :
+ }
+ ]
+ parent : {
+ callFrames : [
+ [0] : {
+ columnNumber : 46
+ functionName :
+ lineNumber : 0
+ scriptId : <scriptId>
+ url :
+ }
+ ]
+ description : Promise.resolve
+ }
+ }
+ timestamp : <timestamp>
+ type : trace
+ }
+}
+inspector.setMaxAsyncTaskStacks(8)
+Run expression 'console.trace()' with async chain len: 3
+{
+ method : Runtime.consoleAPICalled
+ params : {
+ args : [
+ [0] : {
+ type : string
+ value : console.trace
+ }
+ ]
+ executionContextId : <executionContextId>
+ stackTrace : {
+ callFrames : [
+ [0] : {
+ columnNumber : 67
+ functionName : Promise.resolve.then.then.then
+ lineNumber : 0
+ scriptId : <scriptId>
+ url :
+ }
+ ]
+ parent : {
+ callFrames : [
+ [0] : {
+ columnNumber : 46
+ functionName :
+ lineNumber : 0
+ scriptId : <scriptId>
+ url :
+ }
+ ]
+ description : Promise.resolve
+ }
+ }
+ timestamp : <timestamp>
+ type : trace
+ }
+}
diff --git a/deps/v8/test/inspector/debugger/promise-chain-when-limit-hit.js b/deps/v8/test/inspector/debugger/promise-chain-when-limit-hit.js
new file mode 100644
index 0000000000..072af732c4
--- /dev/null
+++ b/deps/v8/test/inspector/debugger/promise-chain-when-limit-hit.js
@@ -0,0 +1,54 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// TODO(kozyatinskiy): fix or remove it later.
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests how async promise chains behave when reaching the limit of stacks');
+
+(async function test(){
+ InspectorTest.log('Checks correctness of promise chains when limit hit');
+ await Protocol.Runtime.enable();
+ await Protocol.Debugger.enable();
+ Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 128});
+
+ await setMaxAsyncTaskStacks(3);
+ runWithAsyncChainPromise(3, 'console.trace()');
+ InspectorTest.logMessage(await Protocol.Runtime.onceConsoleAPICalled());
+
+ await setMaxAsyncTaskStacks(4);
+ runWithAsyncChainPromise(3, 'console.trace()');
+ InspectorTest.logMessage(await Protocol.Runtime.onceConsoleAPICalled());
+
+ await setMaxAsyncTaskStacks(5);
+ runWithAsyncChainPromise(3, 'console.trace()');
+ InspectorTest.logMessage(await Protocol.Runtime.onceConsoleAPICalled());
+
+ await setMaxAsyncTaskStacks(6);
+ runWithAsyncChainPromise(3, 'console.trace()');
+ InspectorTest.logMessage(await Protocol.Runtime.onceConsoleAPICalled());
+
+ await setMaxAsyncTaskStacks(7);
+ runWithAsyncChainPromise(3, 'console.trace()');
+ InspectorTest.logMessage(await Protocol.Runtime.onceConsoleAPICalled());
+
+ await setMaxAsyncTaskStacks(8);
+ runWithAsyncChainPromise(3, 'console.trace()');
+ InspectorTest.logMessage(await Protocol.Runtime.onceConsoleAPICalled());
+
+ InspectorTest.completeTest();
+})();
+
+function runWithAsyncChainPromise(len, source) {
+ InspectorTest.log(`Run expression '${source}' with async chain len: ${len}`);
+ let then = '.then(() => 1)';
+ let pause = `.then(() => { ${source} })`;
+ Protocol.Runtime.evaluate({
+ expression: `Promise.resolve()${then.repeat(len - 1)}${pause}`
+ });
+}
+
+async function setMaxAsyncTaskStacks(max) {
+ let expression = `inspector.setMaxAsyncTaskStacks(${max})`;
+ InspectorTest.log(expression);
+ await Protocol.Runtime.evaluate({expression});
+}
diff --git a/deps/v8/test/inspector/debugger/protocol-string-to-double-locale-expected.txt b/deps/v8/test/inspector/debugger/protocol-string-to-double-locale-expected.txt
new file mode 100644
index 0000000000..52919c1d18
--- /dev/null
+++ b/deps/v8/test/inspector/debugger/protocol-string-to-double-locale-expected.txt
@@ -0,0 +1,8 @@
+Tests that double numbers are parsed and serialized correctly on different locales
+This test verifies that we correctly parse doubles with non-US locale
+{
+ a : 0.5
+}
+{
+ a : 1
+}
diff --git a/deps/v8/test/inspector/debugger/protocol-string-to-double-locale.js b/deps/v8/test/inspector/debugger/protocol-string-to-double-locale.js
new file mode 100644
index 0000000000..89b6d826ff
--- /dev/null
+++ b/deps/v8/test/inspector/debugger/protocol-string-to-double-locale.js
@@ -0,0 +1,24 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests that double numbers are parsed and serialized correctly on different locales');
+
+(async function() {
+ InspectorTest.log('This test verifies that we correctly parse doubles with non-US locale');
+ utils.setlocale("fr_CA.UTF-8");
+ Protocol.Debugger.enable();
+ Protocol.Runtime.evaluate({
+ expression: 'inspector.breakProgram(\'\', JSON.stringify({a: 0.5}))'});
+ let message = await Protocol.Debugger.oncePaused();
+ InspectorTest.logObject(message.params.data || {});
+ Protocol.Debugger.resume();
+
+ Protocol.Runtime.evaluate({
+ expression: 'inspector.breakProgram(\'\', JSON.stringify({a: 1}))'});
+ message = await Protocol.Debugger.oncePaused();
+ InspectorTest.logObject(message.params.data || {});
+ Protocol.Debugger.resume();
+
+ InspectorTest.completeTest();
+})();
diff --git a/deps/v8/test/inspector/debugger/restore-breakpoint.js b/deps/v8/test/inspector/debugger/restore-breakpoint.js
index 3a10f5378e..e0d2b84766 100644
--- a/deps/v8/test/inspector/debugger/restore-breakpoint.js
+++ b/deps/v8/test/inspector/debugger/restore-breakpoint.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Checks that debugger agent uses source content to restore breakpoints.');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks that debugger agent uses source content to restore breakpoints.');
Protocol.Debugger.enable();
InspectorTest.runTestSuite([
diff --git a/deps/v8/test/inspector/debugger/return-break-locations.js b/deps/v8/test/inspector/debugger/return-break-locations.js
index 73e0416b0d..b253b88417 100644
--- a/deps/v8/test/inspector/debugger/return-break-locations.js
+++ b/deps/v8/test/inspector/debugger/return-break-locations.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Return break locations within function');
+let {session, contextGroup, Protocol} = InspectorTest.start('Return break locations within function');
-InspectorTest.addScript(`
+contextGroup.addScript(`
function fib(x) {
if (x < 0) return;
if (x === 0) return 1;
diff --git a/deps/v8/test/inspector/debugger/schedule-step-into-async-set-timeout.js b/deps/v8/test/inspector/debugger/schedule-step-into-async-set-timeout.js
index f6ffe6e0a7..f2171a5037 100644
--- a/deps/v8/test/inspector/debugger/schedule-step-into-async-set-timeout.js
+++ b/deps/v8/test/inspector/debugger/schedule-step-into-async-set-timeout.js
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Checks Debugger.scheduleStepIntoAsync with setTimeout.');
-InspectorTest.setupScriptMap();
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks Debugger.scheduleStepIntoAsync with setTimeout.');
+session.setupScriptMap();
Protocol.Debugger.enable();
InspectorTest.runAsyncTestSuite([
async function testSetTimeout() {
@@ -42,7 +42,7 @@ InspectorTest.runAsyncTestSuite([
Protocol.Debugger.stepOver();
await waitPauseAndDumpLocation();
await Protocol.Debugger.resume();
- await InspectorTest.waitPendingTasks();
+ await InspectorTest.waitForPendingTasks();
},
async function testSetTimeoutWithoutJS() {
@@ -70,6 +70,6 @@ InspectorTest.runAsyncTestSuite([
async function waitPauseAndDumpLocation() {
var message = await Protocol.Debugger.oncePaused();
InspectorTest.log('paused at:');
- await InspectorTest.logSourceLocation(message.params.callFrames[0].location);
+ await session.logSourceLocation(message.params.callFrames[0].location);
return message;
}
diff --git a/deps/v8/test/inspector/debugger/schedule-step-into-async.js b/deps/v8/test/inspector/debugger/schedule-step-into-async.js
index 1556e8a55a..c4dfb73992 100644
--- a/deps/v8/test/inspector/debugger/schedule-step-into-async.js
+++ b/deps/v8/test/inspector/debugger/schedule-step-into-async.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Checks Debugger.scheduleStepIntoAsync.');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks Debugger.scheduleStepIntoAsync.');
-InspectorTest.addScript(`
+contextGroup.addScript(`
function testNoScheduledTask() {
debugger;
return 42;
@@ -47,7 +47,7 @@ function testBlackboxedCreatePromise() {
}
//# sourceURL=test.js`);
-InspectorTest.addScript(`
+contextGroup.addScript(`
function createPromise() {
return Promise.resolve().then(v => v * 3).then(v => v * 4);
@@ -55,7 +55,7 @@ function createPromise() {
//# sourceURL=framework.js`)
-InspectorTest.setupScriptMap();
+session.setupScriptMap();
Protocol.Debugger.enable();
InspectorTest.runAsyncTestSuite([
@@ -154,6 +154,6 @@ InspectorTest.runAsyncTestSuite([
async function waitPauseAndDumpLocation() {
var message = await Protocol.Debugger.oncePaused();
InspectorTest.log('paused at:');
- InspectorTest.logSourceLocation(message.params.callFrames[0].location);
+ session.logSourceLocation(message.params.callFrames[0].location);
return message;
}
diff --git a/deps/v8/test/inspector/debugger/scope-skip-variables-with-empty-name-expected.txt b/deps/v8/test/inspector/debugger/scope-skip-variables-with-empty-name-expected.txt
index b3dce305d8..626f9787c3 100644
--- a/deps/v8/test/inspector/debugger/scope-skip-variables-with-empty-name-expected.txt
+++ b/deps/v8/test/inspector/debugger/scope-skip-variables-with-empty-name-expected.txt
@@ -1,3 +1,4 @@
+Tests that scopes do not report variables with empty names
{
id : <messageId>
result : {
@@ -16,4 +17,4 @@
}
]
}
-} \ No newline at end of file
+}
diff --git a/deps/v8/test/inspector/debugger/scope-skip-variables-with-empty-name.js b/deps/v8/test/inspector/debugger/scope-skip-variables-with-empty-name.js
index e2b38d8ec9..72cbeeefcb 100644
--- a/deps/v8/test/inspector/debugger/scope-skip-variables-with-empty-name.js
+++ b/deps/v8/test/inspector/debugger/scope-skip-variables-with-empty-name.js
@@ -2,7 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.addScript(
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests that scopes do not report variables with empty names');
+
+contextGroup.addScript(
`function testFunction()
{
for (var a of [1]) {
diff --git a/deps/v8/test/inspector/debugger/script-end-location.js b/deps/v8/test/inspector/debugger/script-end-location.js
index cdfff8cda6..57d12350e0 100644
--- a/deps/v8/test/inspector/debugger/script-end-location.js
+++ b/deps/v8/test/inspector/debugger/script-end-location.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Checks that we report correct endLine, endColumn and source for scripts.');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks that we report correct endLine, endColumn and source for scripts.');
var sources = [
'',
@@ -27,7 +27,7 @@ var sources = [
(async function test() {
Protocol.Debugger.enable();
for (let source of sources) {
- InspectorTest.addScript(source);
+ contextGroup.addScript(source);
var message = await Protocol.Debugger.onceScriptParsed();
var inspectorSource = (await Protocol.Debugger.getScriptSource({ scriptId: message.params.scriptId })).result.scriptSource;
var lines = source.split('\n');
diff --git a/deps/v8/test/inspector/debugger/script-on-after-compile.js b/deps/v8/test/inspector/debugger/script-on-after-compile.js
index 6a5a55b5ff..544dbaaae2 100644
--- a/deps/v8/test/inspector/debugger/script-on-after-compile.js
+++ b/deps/v8/test/inspector/debugger/script-on-after-compile.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Checks that inspector correctly process compiled scripts");
+let {session, contextGroup, Protocol} = InspectorTest.start("Checks that inspector correctly process compiled scripts");
function addScripts() {
// sourceURL in the same line
diff --git a/deps/v8/test/inspector/debugger/script-parsed-for-runtime-evaluate.js b/deps/v8/test/inspector/debugger/script-parsed-for-runtime-evaluate.js
index 300821baa3..bebf64bddc 100644
--- a/deps/v8/test/inspector/debugger/script-parsed-for-runtime-evaluate.js
+++ b/deps/v8/test/inspector/debugger/script-parsed-for-runtime-evaluate.js
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Checks that inspector reports script compiled in Runtime.evaluate, " +
+let {session, contextGroup, Protocol} = InspectorTest.start("Checks that inspector reports script compiled in Runtime.evaluate, " +
"Runtime.callFunctionOn and Runtime.compileScript");
-InspectorTest.addScript(`
+contextGroup.addScript(`
function fooTop() {
eval(\`
function foo() {
@@ -15,7 +15,7 @@ function fooTop() {
}
//# sourceURL=top-frame.js`, 8, 26);
-InspectorTest.addScript(`
+contextGroup.addScript(`
function fooTopFail() {
eval(\`
function fooFail() {
diff --git a/deps/v8/test/inspector/debugger/script-parsed-hash-expected.txt b/deps/v8/test/inspector/debugger/script-parsed-hash-expected.txt
index 20fdb859fd..8836266f77 100644
--- a/deps/v8/test/inspector/debugger/script-parsed-hash-expected.txt
+++ b/deps/v8/test/inspector/debugger/script-parsed-hash-expected.txt
@@ -1,3 +1,4 @@
+Tests scripts hasing
Hash received: 1C6D2E82E4E4F1BA4CB5762843D429DC872EBA18
Hash received: EBF1ECD351E7A3294CB5762843D429DC872EBA18
-Hash received: 86A31E7131896CF01BA837945C2894385F369F24 \ No newline at end of file
+Hash received: 86A31E7131896CF01BA837945C2894385F369F24
diff --git a/deps/v8/test/inspector/debugger/script-parsed-hash.js b/deps/v8/test/inspector/debugger/script-parsed-hash.js
index 5dd1dfacee..15c82ad7a8 100644
--- a/deps/v8/test/inspector/debugger/script-parsed-hash.js
+++ b/deps/v8/test/inspector/debugger/script-parsed-hash.js
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests scripts hasing');
+
var hashes = new Set(["1C6D2E82E4E4F1BA4CB5762843D429DC872EBA18",
"EBF1ECD351E7A3294CB5762843D429DC872EBA18",
"86A31E7131896CF01BA837945C2894385F369F24"]);
diff --git a/deps/v8/test/inspector/debugger/script-with-negative-offset-expected.txt b/deps/v8/test/inspector/debugger/script-with-negative-offset-expected.txt
new file mode 100644
index 0000000000..ebdf8f3ee1
--- /dev/null
+++ b/deps/v8/test/inspector/debugger/script-with-negative-offset-expected.txt
@@ -0,0 +1,19 @@
+Locations in script with negative offset.
+[
+ [0] : {
+ columnNumber : 16
+ lineNumber : 0
+ scriptId : <scriptId>
+ type : debuggerStatement
+ }
+ [1] : {
+ columnNumber : 26
+ lineNumber : 0
+ scriptId : <scriptId>
+ type : return
+ }
+]
+foo (:-1:16)
+(anonymous) (:0:0)
+boo (:0:16)
+(anonymous) (:0:0)
diff --git a/deps/v8/test/inspector/debugger/script-with-negative-offset.js b/deps/v8/test/inspector/debugger/script-with-negative-offset.js
new file mode 100644
index 0000000000..fbc0b34302
--- /dev/null
+++ b/deps/v8/test/inspector/debugger/script-with-negative-offset.js
@@ -0,0 +1,31 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let {session, contextGroup, Protocol} =
+ InspectorTest.start('Locations in script with negative offset.');
+
+(async function test() {
+ contextGroup.addScript(`function foo() { debugger; }
+function boo(){ debugger; }
+`, -1, -1);
+ session.setupScriptMap();
+ Protocol.Debugger.enable();
+ let {params:{scriptId}} = await Protocol.Debugger.onceScriptParsed();
+ let {result:{locations}} = await Protocol.Debugger.getPossibleBreakpoints({
+ start: {scriptId, lineNumber: 0, columnNumber: 0}
+ });
+ InspectorTest.logMessage(locations);
+
+ Protocol.Runtime.evaluate({expression: 'foo()'});
+ var {params:{callFrames}} = await Protocol.Debugger.oncePaused();
+ session.logCallFrames(callFrames);
+ await Protocol.Debugger.resume();
+
+ Protocol.Runtime.evaluate({expression: 'boo()'});
+ var {params:{callFrames}} = await Protocol.Debugger.oncePaused();
+ session.logCallFrames(callFrames);
+ await Protocol.Debugger.resume();
+
+ InspectorTest.completeTest();
+})();
diff --git a/deps/v8/test/inspector/debugger/set-async-call-stack-depth-expected.txt b/deps/v8/test/inspector/debugger/set-async-call-stack-depth-expected.txt
new file mode 100644
index 0000000000..98fccebe68
--- /dev/null
+++ b/deps/v8/test/inspector/debugger/set-async-call-stack-depth-expected.txt
@@ -0,0 +1,37 @@
+Checks that we report not more then maxDepth call chains.
+
+Running test: testPaused
+Actual call chain length: 8
+setAsyncCallStackDepth(maxDepth): 16
+reported: 1
+
+Actual call chain length: 8
+setAsyncCallStackDepth(maxDepth): 8
+reported: 1
+
+Actual call chain length: 8
+setAsyncCallStackDepth(maxDepth): 7
+reported: 1
+
+Actual call chain length: 8
+setAsyncCallStackDepth(maxDepth): 0
+reported: 0
+
+
+Running test: testConsoleTrace
+Actual call chain length: 8
+setAsyncCallStackDepth(maxDepth): 16
+reported: 1
+
+Actual call chain length: 8
+setAsyncCallStackDepth(maxDepth): 8
+reported: 1
+
+Actual call chain length: 8
+setAsyncCallStackDepth(maxDepth): 7
+reported: 1
+
+Actual call chain length: 8
+setAsyncCallStackDepth(maxDepth): 0
+reported: 0
+
diff --git a/deps/v8/test/inspector/debugger/set-async-call-stack-depth.js b/deps/v8/test/inspector/debugger/set-async-call-stack-depth.js
new file mode 100644
index 0000000000..0c7567f499
--- /dev/null
+++ b/deps/v8/test/inspector/debugger/set-async-call-stack-depth.js
@@ -0,0 +1,79 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// TODO(kozyatinskiy): fix or remove it later with new stack traces it's almost
+// imposible to hit limit.
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks that we report not more then maxDepth call chains.');
+
+contextGroup.addScript(`
+function promisesChain(num) {
+ var p = Promise.resolve();
+ for (var i = 0; i < num - 1; ++i) {
+ p = p.then(() => 42);
+ }
+ return p;
+}
+`);
+
+Protocol.Debugger.enable();
+InspectorTest.runAsyncTestSuite([
+ async function testPaused() {
+ let callback = '() => { debugger; }';
+ startTest({ generated: 8, limit: 16, callback});
+ dumpCaptured((await Protocol.Debugger.oncePaused()).params.asyncStackTrace);
+ await Protocol.Debugger.resume();
+
+ startTest({ generated: 8, limit: 8, callback});
+ dumpCaptured((await Protocol.Debugger.oncePaused()).params.asyncStackTrace);
+ await Protocol.Debugger.resume();
+
+ startTest({ generated: 8, limit: 7, callback});
+ dumpCaptured((await Protocol.Debugger.oncePaused()).params.asyncStackTrace);
+ await Protocol.Debugger.resume();
+
+ startTest({ generated: 8, limit: 0, callback});
+ dumpCaptured((await Protocol.Debugger.oncePaused()).params.asyncStackTrace);
+ await Protocol.Debugger.resume();
+ },
+
+ async function testConsoleTrace() {
+ await Protocol.Runtime.enable();
+ let callback = '() => { console.trace(42); }';
+ startTest({ generated: 8, limit: 16, callback});
+ let msg = await Protocol.Runtime.onceConsoleAPICalled();
+ dumpCaptured(msg.params.stackTrace.parent);
+
+ startTest({ generated: 8, limit: 8, callback});
+ msg = await Protocol.Runtime.onceConsoleAPICalled();
+ dumpCaptured(msg.params.stackTrace.parent);
+
+ startTest({ generated: 8, limit: 7, callback});
+ msg = await Protocol.Runtime.onceConsoleAPICalled();
+ dumpCaptured(msg.params.stackTrace.parent);
+
+ startTest({ generated: 8, limit: 0, callback});
+ msg = await Protocol.Runtime.onceConsoleAPICalled();
+ dumpCaptured(msg.params.stackTrace.parent);
+
+ await Protocol.Runtime.disable();
+ }
+]);
+
+function startTest(params) {
+ InspectorTest.log('Actual call chain length: ' + params.generated);
+ InspectorTest.log('setAsyncCallStackDepth(maxDepth): ' + params.limit);
+
+ Protocol.Debugger.setAsyncCallStackDepth({maxDepth: params.limit});
+ Protocol.Runtime.evaluate({expression:
+ `promisesChain(${params.generated}).then(${params.callback})`});
+}
+
+function dumpCaptured(stack) {
+ let count = 0;
+ while (stack) {
+ ++count;
+ stack = stack.parent;
+ }
+ InspectorTest.log('reported: ' + count + '\n');
+}
diff --git a/deps/v8/test/inspector/debugger/set-blackbox-patterns-expected.txt b/deps/v8/test/inspector/debugger/set-blackbox-patterns-expected.txt
index fb54163107..bb3055a62d 100644
--- a/deps/v8/test/inspector/debugger/set-blackbox-patterns-expected.txt
+++ b/deps/v8/test/inspector/debugger/set-blackbox-patterns-expected.txt
@@ -1,3 +1,4 @@
+Tests blackboxing by patterns
Pattern parser error: Uncaught SyntaxError: Invalid regular expression: /(foo([)/: Unterminated character class
Paused in
(...):1
diff --git a/deps/v8/test/inspector/debugger/set-blackbox-patterns.js b/deps/v8/test/inspector/debugger/set-blackbox-patterns.js
index 12e9e214d3..d060c90a9d 100644
--- a/deps/v8/test/inspector/debugger/set-blackbox-patterns.js
+++ b/deps/v8/test/inspector/debugger/set-blackbox-patterns.js
@@ -2,13 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.addScript(
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests blackboxing by patterns');
+
+contextGroup.addScript(
`function bar()
{
return 42;
}`);
-InspectorTest.addScript(
+contextGroup.addScript(
`function foo()
{
var a = bar();
@@ -16,7 +18,7 @@ InspectorTest.addScript(
}
//# sourceURL=foo.js`);
-InspectorTest.addScript(
+contextGroup.addScript(
`function qwe()
{
var a = foo();
@@ -24,7 +26,7 @@ InspectorTest.addScript(
}
//# sourceURL=qwe.js`);
-InspectorTest.addScript(
+contextGroup.addScript(
`function baz()
{
var a = qwe();
diff --git a/deps/v8/test/inspector/debugger/set-breakpoint-before-enabling-expected.txt b/deps/v8/test/inspector/debugger/set-breakpoint-before-enabling-expected.txt
index e4fdd95d5f..26017349ef 100644
--- a/deps/v8/test/inspector/debugger/set-breakpoint-before-enabling-expected.txt
+++ b/deps/v8/test/inspector/debugger/set-breakpoint-before-enabling-expected.txt
@@ -1,3 +1,4 @@
+Tests that setting breakpoint before enabling debugger produces an error
setBreakpointByUrl error: undefined
setBreakpoint error: {
"code": -32602,
diff --git a/deps/v8/test/inspector/debugger/set-breakpoint-before-enabling.js b/deps/v8/test/inspector/debugger/set-breakpoint-before-enabling.js
index 8480aa6f75..84541be37d 100644
--- a/deps/v8/test/inspector/debugger/set-breakpoint-before-enabling.js
+++ b/deps/v8/test/inspector/debugger/set-breakpoint-before-enabling.js
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests that setting breakpoint before enabling debugger produces an error');
+
Protocol.Debugger.setBreakpointByUrl({ url: "http://example.com", lineNumber: 10 }).then(didSetBreakpointByUrlBeforeEnable);
function didSetBreakpointByUrlBeforeEnable(message)
diff --git a/deps/v8/test/inspector/debugger/set-script-source-exception.js b/deps/v8/test/inspector/debugger/set-script-source-exception.js
index d3082789f2..627aa7ec1e 100644
--- a/deps/v8/test/inspector/debugger/set-script-source-exception.js
+++ b/deps/v8/test/inspector/debugger/set-script-source-exception.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Check that setScriptSource completes correctly when an exception is thrown.');
+let {session, contextGroup, Protocol} = InspectorTest.start('Check that setScriptSource completes correctly when an exception is thrown.');
Protocol.Debugger.enable();
@@ -18,6 +18,6 @@ InspectorTest.runTestSuite([
.then(message => Protocol.Debugger.setScriptSource({ scriptId: message.params.scriptId, scriptSource: 'a # b' }))
.then(InspectorTest.logMessage)
.then(next);
- InspectorTest.addScript('function foo() {}');
+ contextGroup.addScript('function foo() {}');
}
]);
diff --git a/deps/v8/test/inspector/debugger/set-script-source-expected.txt b/deps/v8/test/inspector/debugger/set-script-source-expected.txt
index 1b76ec5f95..e77aafd690 100644
--- a/deps/v8/test/inspector/debugger/set-script-source-expected.txt
+++ b/deps/v8/test/inspector/debugger/set-script-source-expected.txt
@@ -1,3 +1,4 @@
+Tests Debugger.setScriptSource
Function evaluate: {"type":"number","value":6,"description":"6"}
PASS, result value: 6
Function evaluate: {"type":"number","value":8,"description":"8"}
@@ -5,4 +6,3 @@ PASS, result value: 8
Has error reported: PASS
Reported error is a compile error: PASS
PASS, result value: 1
-
diff --git a/deps/v8/test/inspector/debugger/set-script-source.js b/deps/v8/test/inspector/debugger/set-script-source.js
index 36944cca6c..f13a3a39bb 100644
--- a/deps/v8/test/inspector/debugger/set-script-source.js
+++ b/deps/v8/test/inspector/debugger/set-script-source.js
@@ -2,7 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.addScript(
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests Debugger.setScriptSource');
+
+contextGroup.addScript(
`function TestExpression(a, b) {
return a + b;
}`);
diff --git a/deps/v8/test/inspector/debugger/side-effect-free-debug-evaluate-expected.txt b/deps/v8/test/inspector/debugger/side-effect-free-debug-evaluate-expected.txt
index d77870e737..6d113861dd 100644
--- a/deps/v8/test/inspector/debugger/side-effect-free-debug-evaluate-expected.txt
+++ b/deps/v8/test/inspector/debugger/side-effect-free-debug-evaluate-expected.txt
@@ -1,3 +1,4 @@
+Tests side-effect-free evaluation
Paused on 'debugger;'
f() returns 1
g() returns 2
diff --git a/deps/v8/test/inspector/debugger/side-effect-free-debug-evaluate.js b/deps/v8/test/inspector/debugger/side-effect-free-debug-evaluate.js
index 705901ad78..34e3a25981 100644
--- a/deps/v8/test/inspector/debugger/side-effect-free-debug-evaluate.js
+++ b/deps/v8/test/inspector/debugger/side-effect-free-debug-evaluate.js
@@ -3,8 +3,9 @@
// found in the LICENSE file.
// Flags: --ignition --turbo
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests side-effect-free evaluation');
-InspectorTest.addScript(`
+contextGroup.addScript(`
function testFunction()
{
var o = 0;
diff --git a/deps/v8/test/inspector/debugger/step-into-expected.txt b/deps/v8/test/inspector/debugger/step-into-expected.txt
index b912b82fa2..8be36948b2 100644
--- a/deps/v8/test/inspector/debugger/step-into-expected.txt
+++ b/deps/v8/test/inspector/debugger/step-into-expected.txt
@@ -747,16 +747,6 @@ break at:
Running test: testClasses
break at:
-function testClasses() {
- #class Cat {
- constructor(name) {
-
-break at:
- }
- #class Lion extends Cat {
- constructor(name) {
-
-break at:
}
#new Lion().speak();
}
@@ -810,11 +800,21 @@ break at:
Running test: testAsyncAwait
break at:
async function testAsyncAwait() {
+ #await asyncFoo();
+ await awaitBoo();
+
+break at:
+async function testAsyncAwait() {
await #asyncFoo();
await awaitBoo();
break at:
async function asyncFoo() {
+ #await Promise.resolve().then(v => v * 2);
+ return42();
+
+break at:
+async function asyncFoo() {
await Promise.resolve().#then(v => v * 2);
return42();
@@ -845,6 +845,11 @@ break at:
break at:
async function asyncBoo() {
+ #await Promise.resolve();
+}
+
+break at:
+async function asyncBoo() {
await Promise.#resolve();
}
@@ -882,6 +887,11 @@ break at:
break at:
setTimeout(returnCall, 0);
+ #await foo();
+ await foo();
+
+break at:
+ setTimeout(returnCall, 0);
await #foo();
await foo();
@@ -907,6 +917,11 @@ break at:
break at:
setTimeout(resolveNested, 0);
+ #await p;
+ }
+
+break at:
+ setTimeout(resolveNested, 0);
await #p;
}
@@ -937,6 +952,11 @@ break at:
break at:
setTimeout(resolveNested, 0);
+ #await p;
+ }
+
+break at:
+ setTimeout(resolveNested, 0);
await #p;
}
@@ -1064,6 +1084,11 @@ break at:
break at:
async function foo() {
+ #await Promise.resolve();
+ return 42;
+
+break at:
+ async function foo() {
await Promise.#resolve();
return 42;
diff --git a/deps/v8/test/inspector/debugger/step-into-nested-arrow.js b/deps/v8/test/inspector/debugger/step-into-nested-arrow.js
index 0b0307a5e6..305796754a 100644
--- a/deps/v8/test/inspector/debugger/step-into-nested-arrow.js
+++ b/deps/v8/test/inspector/debugger/step-into-nested-arrow.js
@@ -2,18 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log(
+let {session, contextGroup, Protocol} = InspectorTest.start(
'Checks that stepInto nested arrow function doesn\'t produce crash.');
-InspectorTest.setupScriptMap();
-InspectorTest.addScript(`
+session.setupScriptMap();
+contextGroup.addScript(`
const rec = (x) => (y) =>
rec();
//# sourceURL=test.js`);
Protocol.Debugger.onPaused(message => {
InspectorTest.log("paused");
- InspectorTest.logCallFrames(message.params.callFrames);
+ session.logCallFrames(message.params.callFrames);
Protocol.Debugger.stepInto();
})
diff --git a/deps/v8/test/inspector/debugger/step-into-next-script.js b/deps/v8/test/inspector/debugger/step-into-next-script.js
index 37436be1d5..80e9a9180f 100644
--- a/deps/v8/test/inspector/debugger/step-into-next-script.js
+++ b/deps/v8/test/inspector/debugger/step-into-next-script.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Debugger breaks in next script after stepOut from previous one.');
+let {session, contextGroup, Protocol} = InspectorTest.start('Debugger breaks in next script after stepOut from previous one.');
-InspectorTest.addScript(`
+contextGroup.addScript(`
function test() {
setTimeout('var a = 1;//# sourceURL=timeout1.js', 0);
setTimeout(foo, 0);
@@ -13,16 +13,16 @@ function test() {
}
//# sourceURL=foo.js`, 7, 26);
-InspectorTest.addScript(`
+contextGroup.addScript(`
function foo() {
return 42;
}
//# sourceURL=timeout2.js`)
-InspectorTest.setupScriptMap();
+session.setupScriptMap();
var stepAction;
Protocol.Debugger.onPaused(message => {
- InspectorTest.logCallFrames(message.params.callFrames);
+ session.logCallFrames(message.params.callFrames);
InspectorTest.log('');
Protocol.Debugger[stepAction]();
});
@@ -31,21 +31,21 @@ InspectorTest.runTestSuite([
function testStepOut(next) {
stepAction = 'stepOut';
Protocol.Runtime.evaluate({ expression: 'test()' })
- .then(() => InspectorTest.waitPendingTasks())
+ .then(() => InspectorTest.waitForPendingTasks())
.then(next);
},
function testStepOver(next) {
stepAction = 'stepOver';
Protocol.Runtime.evaluate({ expression: 'test()' })
- .then(() => InspectorTest.waitPendingTasks())
+ .then(() => InspectorTest.waitForPendingTasks())
.then(next);
},
function testStepInto(next) {
stepAction = 'stepInto';
Protocol.Runtime.evaluate({ expression: 'test()' })
- .then(() => InspectorTest.waitPendingTasks())
+ .then(() => InspectorTest.waitForPendingTasks())
.then(next);
}
]);
diff --git a/deps/v8/test/inspector/debugger/step-into.js b/deps/v8/test/inspector/debugger/step-into.js
index e08707c9fc..b0b83b3d59 100644
--- a/deps/v8/test/inspector/debugger/step-into.js
+++ b/deps/v8/test/inspector/debugger/step-into.js
@@ -4,9 +4,9 @@
// Flags: --turbo
-InspectorTest.log('Checks possible break locations.');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks possible break locations.');
-InspectorTest.setupScriptMap();
+session.setupScriptMap();
Protocol.Debugger.onPaused(message => {
var frames = message.params.callFrames;
if (frames.length === 1) {
@@ -15,11 +15,11 @@ Protocol.Debugger.onPaused(message => {
}
var scriptId = frames[0].location.scriptId;
InspectorTest.log('break at:');
- InspectorTest.logSourceLocation(frames[0].location)
+ session.logSourceLocation(frames[0].location)
.then(() => Protocol.Debugger.stepInto());
});
-InspectorTest.loadScript('test/inspector/debugger/resources/break-locations.js');
+contextGroup.loadScript('test/inspector/debugger/resources/break-locations.js');
Protocol.Debugger.enable();
Protocol.Runtime.evaluate({ expression: 'Object.keys(this).filter(name => name.indexOf(\'test\') === 0)', returnByValue: true })
diff --git a/deps/v8/test/inspector/debugger/step-out-async-await.js b/deps/v8/test/inspector/debugger/step-out-async-await.js
index 3b249dc7f3..ff83b82e78 100644
--- a/deps/v8/test/inspector/debugger/step-out-async-await.js
+++ b/deps/v8/test/inspector/debugger/step-out-async-await.js
@@ -6,9 +6,9 @@
// of async generator we should break at next instruction of resumed generator
// instead of next scheduled microtask.
-InspectorTest.log('StepOut from return position of async function.');
+let {session, contextGroup, Protocol} = InspectorTest.start('StepOut from return position of async function.');
-InspectorTest.addScript(`
+contextGroup.addScript(`
async function testFunction() {
async function foo() {
var p = Promise.resolve();
@@ -21,7 +21,7 @@ InspectorTest.addScript(`
}
`);
-InspectorTest.setupScriptMap();
+session.setupScriptMap();
Protocol.Debugger.enable();
InspectorTest.runAsyncTestSuite([
async function testStepInto() {
@@ -68,5 +68,5 @@ InspectorTest.runAsyncTestSuite([
]);
function logPauseLocation(message) {
- return InspectorTest.logSourceLocation(message.params.callFrames[0].location);
+ return session.logSourceLocation(message.params.callFrames[0].location);
}
diff --git a/deps/v8/test/inspector/debugger/step-over-another-context-group.js b/deps/v8/test/inspector/debugger/step-over-another-context-group.js
index c860ef9f46..758ff84697 100644
--- a/deps/v8/test/inspector/debugger/step-over-another-context-group.js
+++ b/deps/v8/test/inspector/debugger/step-over-another-context-group.js
@@ -4,27 +4,33 @@
InspectorTest.log('Checks stepping with more then one context group.');
+var contextGroup1 = new InspectorTest.ContextGroup();
+var session1 = contextGroup1.connect();
+session1.setupScriptMap();
+
+let contextGroup2 = new InspectorTest.ContextGroup();
+let session2 = contextGroup2.connect();
+session2.setupScriptMap();
+
(async function test() {
- InspectorTest.setupScriptMap();
- await Protocol.Debugger.enable();
- let contextGroupId = utils.createContextGroup();
- await Protocol.Debugger.enable({}, contextGroupId);
- Protocol.Runtime.evaluate({expression: 'debugger'});
- Protocol.Runtime.evaluate({expression: 'setTimeout(() => { debugger }, 0)'}, contextGroupId);
- Protocol.Runtime.evaluate({expression: 'setTimeout(() => 42, 0)'});
- await waitPauseAndDumpLocation();
- Protocol.Debugger.stepOver();
- await Protocol.Debugger.oncePaused();
- Protocol.Debugger.stepOver();
- await waitPauseAndDumpLocation();
- await Protocol.Debugger.disable({}, contextGroupId);
- await Protocol.Debugger.disable();
+ await session1.Protocol.Debugger.enable();
+ await session2.Protocol.Debugger.enable({});
+ session1.Protocol.Runtime.evaluate({expression: 'debugger'});
+ session2.Protocol.Runtime.evaluate({expression: 'setTimeout(() => { debugger }, 0)'});
+ session1.Protocol.Runtime.evaluate({expression: 'setTimeout(() => 42, 0)'});
+ await waitPauseAndDumpLocation(session1);
+ session1.Protocol.Debugger.stepOver();
+ await session1.Protocol.Debugger.oncePaused();
+ session1.Protocol.Debugger.stepOver();
+ await waitPauseAndDumpLocation(session1);
+ await session2.Protocol.Debugger.disable({});
+ await session1.Protocol.Debugger.disable();
InspectorTest.completeTest();
})();
-async function waitPauseAndDumpLocation() {
- var message = await Protocol.Debugger.oncePaused();
+async function waitPauseAndDumpLocation(session) {
+ var message = await session.Protocol.Debugger.oncePaused();
InspectorTest.log('paused at:');
- await InspectorTest.logSourceLocation(message.params.callFrames[0].location);
+ await session.logSourceLocation(message.params.callFrames[0].location);
return message;
}
diff --git a/deps/v8/test/inspector/debugger/step-over-caught-exception-expected.txt b/deps/v8/test/inspector/debugger/step-over-caught-exception-expected.txt
index a18b0934cb..5b72d4cce0 100644
--- a/deps/v8/test/inspector/debugger/step-over-caught-exception-expected.txt
+++ b/deps/v8/test/inspector/debugger/step-over-caught-exception-expected.txt
@@ -1,4 +1,5 @@
+Tests that stepping over caught exception will pause when asked for
testFunction:9
testFunction:11
testFunction:9
-testFunction:11 \ No newline at end of file
+testFunction:11
diff --git a/deps/v8/test/inspector/debugger/step-over-caught-exception.js b/deps/v8/test/inspector/debugger/step-over-caught-exception.js
index e00dcf27dc..c8e711b0be 100644
--- a/deps/v8/test/inspector/debugger/step-over-caught-exception.js
+++ b/deps/v8/test/inspector/debugger/step-over-caught-exception.js
@@ -2,7 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.addScript(
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests that stepping over caught exception will pause when asked for');
+
+contextGroup.addScript(
`function testFunction()
{
function foo()
diff --git a/deps/v8/test/inspector/debugger/step-snapshot-expected.txt b/deps/v8/test/inspector/debugger/step-snapshot-expected.txt
new file mode 100644
index 0000000000..7853ed7370
--- /dev/null
+++ b/deps/v8/test/inspector/debugger/step-snapshot-expected.txt
@@ -0,0 +1,35 @@
+Embedding script 'function c(f, ...args) { return f(...args); }'
+Tests that stepping works on snapshotted function
+paused
+ }
+ #debugger;
+ c(f, 2);
+
+paused
+ debugger;
+ #c(f, 2);
+}
+
+paused
+function c(f, ...args) { #return f(...args); }
+
+paused
+ function f(x) {
+ #return x * 2;
+ }
+
+paused
+ return x * 2;
+ #}
+ debugger;
+
+paused
+function c(f, ...args) { return f(...args); #}
+
+paused
+ c(f, 2);
+#}
+
+paused
+test(#)
+
diff --git a/deps/v8/test/inspector/debugger/step-snapshot.js b/deps/v8/test/inspector/debugger/step-snapshot.js
new file mode 100644
index 0000000000..a4ecbf2f28
--- /dev/null
+++ b/deps/v8/test/inspector/debugger/step-snapshot.js
@@ -0,0 +1,31 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Embed a user function in the snapshot and step through it.
+
+// Flags: --embed 'function c(f, ...args) { return f(...args); }'
+
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests that stepping works on snapshotted function');
+session.setupScriptMap();
+
+contextGroup.addScript(`
+function test() {
+ function f(x) {
+ return x * 2;
+ }
+ debugger;
+ c(f, 2);
+}
+//# sourceURL=test.js`);
+
+Protocol.Debugger.onPaused(message => {
+ InspectorTest.log("paused");
+ var frames = message.params.callFrames;
+ session.logSourceLocation(frames[0].location);
+ Protocol.Debugger.stepInto();
+})
+
+Protocol.Debugger.enable()
+ .then(() => Protocol.Runtime.evaluate({ expression: 'test()' }))
+ .then(InspectorTest.completeTest);
diff --git a/deps/v8/test/inspector/debugger/stepping-after-get-possible-breakpoints-expected.txt b/deps/v8/test/inspector/debugger/stepping-after-get-possible-breakpoints-expected.txt
index abe85f5c80..67f38301fd 100644
--- a/deps/v8/test/inspector/debugger/stepping-after-get-possible-breakpoints-expected.txt
+++ b/deps/v8/test/inspector/debugger/stepping-after-get-possible-breakpoints-expected.txt
@@ -1,3 +1,4 @@
+Tests that stepping works after calling getPossibleBreakpoints
-- call boo:
(top)
(top)
diff --git a/deps/v8/test/inspector/debugger/stepping-after-get-possible-breakpoints.js b/deps/v8/test/inspector/debugger/stepping-after-get-possible-breakpoints.js
index 7d6577b82a..c36a36cb07 100644
--- a/deps/v8/test/inspector/debugger/stepping-after-get-possible-breakpoints.js
+++ b/deps/v8/test/inspector/debugger/stepping-after-get-possible-breakpoints.js
@@ -2,7 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.addScript(`
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests that stepping works after calling getPossibleBreakpoints');
+
+contextGroup.addScript(`
function boo() {}
boo();
function foo() {}
diff --git a/deps/v8/test/inspector/debugger/stepping-and-break-program-api-expected.txt b/deps/v8/test/inspector/debugger/stepping-and-break-program-api-expected.txt
index cd7c214b75..438177ade6 100644
--- a/deps/v8/test/inspector/debugger/stepping-and-break-program-api-expected.txt
+++ b/deps/v8/test/inspector/debugger/stepping-and-break-program-api-expected.txt
@@ -2,16 +2,16 @@ Checks that stepping is cleared after breakProgram.
paused at:
function callBreakProgram() {
#debugger;
- breakProgram('reason', '');
+ inspector.breakProgram('reason', '');
paused at:
debugger;
- #breakProgram('reason', '');
+ #inspector.breakProgram('reason', '');
}
paused at:
debugger;
- #breakProgram('reason', '');
+ inspector.#breakProgram('reason', '');
}
paused at:
diff --git a/deps/v8/test/inspector/debugger/stepping-and-break-program-api.js b/deps/v8/test/inspector/debugger/stepping-and-break-program-api.js
index 4900843fc5..f54bad827c 100644
--- a/deps/v8/test/inspector/debugger/stepping-and-break-program-api.js
+++ b/deps/v8/test/inspector/debugger/stepping-and-break-program-api.js
@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Checks that stepping is cleared after breakProgram.');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks that stepping is cleared after breakProgram.');
-InspectorTest.addScript(`
+contextGroup.addScript(`
function callBreakProgram() {
debugger;
- breakProgram('reason', '');
+ inspector.breakProgram('reason', '');
}`);
-InspectorTest.setupScriptMap();
+session.setupScriptMap();
(async function test() {
Protocol.Debugger.enable();
Protocol.Runtime.evaluate({expression: 'callBreakProgram();'});
@@ -29,6 +29,6 @@ InspectorTest.setupScriptMap();
async function waitPauseAndDumpLocation() {
var message = await Protocol.Debugger.oncePaused();
InspectorTest.log('paused at:');
- InspectorTest.logSourceLocation(message.params.callFrames[0].location);
+ session.logSourceLocation(message.params.callFrames[0].location);
return message;
}
diff --git a/deps/v8/test/inspector/debugger/stepping-ignores-injected-script-expected.txt b/deps/v8/test/inspector/debugger/stepping-ignores-injected-script-expected.txt
index e4557d5cf7..5a63493dc7 100644
--- a/deps/v8/test/inspector/debugger/stepping-ignores-injected-script-expected.txt
+++ b/deps/v8/test/inspector/debugger/stepping-ignores-injected-script-expected.txt
@@ -1 +1,2 @@
+Tests that stepping ignores injected script
InjectedSciptSource was not reached
diff --git a/deps/v8/test/inspector/debugger/stepping-ignores-injected-script.js b/deps/v8/test/inspector/debugger/stepping-ignores-injected-script.js
index 31c958084a..9021664a96 100644
--- a/deps/v8/test/inspector/debugger/stepping-ignores-injected-script.js
+++ b/deps/v8/test/inspector/debugger/stepping-ignores-injected-script.js
@@ -2,8 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests that stepping ignores injected script');
+
Protocol.Debugger.onPaused(message => {
- let url = InspectorTest._scriptMap.get(message.params.callFrames[0].location.scriptId).url;
+ let url = session._scriptMap.get(message.params.callFrames[0].location.scriptId).url;
if (url !== 'test.js') {
InspectorTest.log('InjectedSciptSource on stack.');
InspectorTest.completeTest();
@@ -11,7 +13,7 @@ Protocol.Debugger.onPaused(message => {
Protocol.Debugger.stepInto();
});
-InspectorTest.setupScriptMap();
+session.setupScriptMap();
Protocol.Debugger.enable();
Protocol.Debugger.pause();
Protocol.Runtime.evaluate({expression: 'console.log(42)//# sourceURL=test.js'})
diff --git a/deps/v8/test/inspector/debugger/stepping-tail-call.js b/deps/v8/test/inspector/debugger/stepping-tail-call.js
index 763b23b8a6..797df7d675 100644
--- a/deps/v8/test/inspector/debugger/stepping-tail-call.js
+++ b/deps/v8/test/inspector/debugger/stepping-tail-call.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Checks stepping over tail calls.');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks stepping over tail calls.');
-InspectorTest.setupScriptMap();
+session.setupScriptMap();
InspectorTest.logProtocolCommandCalls('Debugger.pause');
InspectorTest.logProtocolCommandCalls('Debugger.stepInto');
InspectorTest.logProtocolCommandCalls('Debugger.stepOver');
@@ -76,6 +76,6 @@ InspectorTest.runAsyncTestSuite([
]);
function logPauseLocation(message) {
- InspectorTest.logCallFrames(message.params.callFrames);
- return InspectorTest.logSourceLocation(message.params.callFrames[0].location);
+ session.logCallFrames(message.params.callFrames);
+ return session.logSourceLocation(message.params.callFrames[0].location);
}
diff --git a/deps/v8/test/inspector/debugger/stepping-with-blackboxed-ranges-expected.txt b/deps/v8/test/inspector/debugger/stepping-with-blackboxed-ranges-expected.txt
index acea22fd5f..7e23082c4b 100644
--- a/deps/v8/test/inspector/debugger/stepping-with-blackboxed-ranges-expected.txt
+++ b/deps/v8/test/inspector/debugger/stepping-with-blackboxed-ranges-expected.txt
@@ -1,3 +1,4 @@
+Tests that blackboxed ranges are respected while stepping
foo: 8:4
blackboxedBoo: 3:12
notBlackboxedFoo: 3:12
@@ -52,3 +53,4 @@ notBlackboxedFoo: 3:12
blackboxedFoo: 10:12
notBlackboxedBoo: 17:12
testFunction: 3:4
+
diff --git a/deps/v8/test/inspector/debugger/stepping-with-blackboxed-ranges.js b/deps/v8/test/inspector/debugger/stepping-with-blackboxed-ranges.js
index 65b694b566..c1029a8785 100644
--- a/deps/v8/test/inspector/debugger/stepping-with-blackboxed-ranges.js
+++ b/deps/v8/test/inspector/debugger/stepping-with-blackboxed-ranges.js
@@ -2,7 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.addScript(
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests that blackboxed ranges are respected while stepping');
+
+contextGroup.addScript(
`function blackboxedBoo()
{
var a = 42;
@@ -11,7 +13,7 @@ InspectorTest.addScript(
}
//# sourceURL=blackboxed-script.js`);
-InspectorTest.addScript(
+contextGroup.addScript(
`function notBlackboxedFoo()
{
var a = 42;
@@ -34,7 +36,7 @@ function notBlackboxedBoo()
}
//# sourceURL=mixed-source.js`);
-InspectorTest.addScript(
+contextGroup.addScript(
`function testFunction()
{
notBlackboxedBoo(); // for setup ranges and stepOut
diff --git a/deps/v8/test/inspector/debugger/stepping-with-exposed-injected-script-expected.txt b/deps/v8/test/inspector/debugger/stepping-with-exposed-injected-script-expected.txt
index 8fa52f1916..65c32c3ec9 100644
--- a/deps/v8/test/inspector/debugger/stepping-with-exposed-injected-script-expected.txt
+++ b/deps/v8/test/inspector/debugger/stepping-with-exposed-injected-script-expected.txt
@@ -1 +1,2 @@
+Tests that stepping does not ignore injected script when passed a flag
InjectedSciptSource on stack.
diff --git a/deps/v8/test/inspector/debugger/stepping-with-exposed-injected-script.js b/deps/v8/test/inspector/debugger/stepping-with-exposed-injected-script.js
index 499611c897..d608137c81 100644
--- a/deps/v8/test/inspector/debugger/stepping-with-exposed-injected-script.js
+++ b/deps/v8/test/inspector/debugger/stepping-with-exposed-injected-script.js
@@ -3,8 +3,10 @@
// found in the LICENSE file.
// Flags: --expose-inspector-scripts
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests that stepping does not ignore injected script when passed a flag');
+
Protocol.Debugger.onPaused(message => {
- let url = InspectorTest._scriptMap.get(message.params.callFrames[0].location.scriptId).url;
+ let url = session._scriptMap.get(message.params.callFrames[0].location.scriptId).url;
if (url !== 'test.js') {
InspectorTest.log('InjectedSciptSource on stack.');
InspectorTest.completeTest();
@@ -12,7 +14,7 @@ Protocol.Debugger.onPaused(message => {
Protocol.Debugger.stepInto();
});
-InspectorTest.setupScriptMap();
+session.setupScriptMap();
Protocol.Debugger.enable();
Protocol.Debugger.pause();
Protocol.Runtime.evaluate({expression: 'console.log(42)//# sourceURL=test.js'})
diff --git a/deps/v8/test/inspector/debugger/stepping-with-natives-and-frameworks.js b/deps/v8/test/inspector/debugger/stepping-with-natives-and-frameworks.js
index 1be1acdd28..c6648ec932 100644
--- a/deps/v8/test/inspector/debugger/stepping-with-natives-and-frameworks.js
+++ b/deps/v8/test/inspector/debugger/stepping-with-natives-and-frameworks.js
@@ -2,16 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Stepping with natives and frameworks.');
+let {session, contextGroup, Protocol} = InspectorTest.start('Stepping with natives and frameworks.');
-InspectorTest.addScript(`
+contextGroup.addScript(`
function callAll() {
for (var f of arguments)
f();
}
//# sourceURL=framework.js`);
-InspectorTest.setupScriptMap();
+session.setupScriptMap();
InspectorTest.logProtocolCommandCalls('Debugger.pause');
InspectorTest.logProtocolCommandCalls('Debugger.stepInto');
InspectorTest.logProtocolCommandCalls('Debugger.stepOver');
@@ -296,5 +296,5 @@ InspectorTest.runAsyncTestSuite([
]);
function logPauseLocation(message) {
- return InspectorTest.logSourceLocation(message.params.callFrames[0].location);
+ return session.logSourceLocation(message.params.callFrames[0].location);
}
diff --git a/deps/v8/test/inspector/debugger/suspended-generator-scopes-expected.txt b/deps/v8/test/inspector/debugger/suspended-generator-scopes-expected.txt
index ed60c3e43c..f529c7ee24 100644
--- a/deps/v8/test/inspector/debugger/suspended-generator-scopes-expected.txt
+++ b/deps/v8/test/inspector/debugger/suspended-generator-scopes-expected.txt
@@ -1,3 +1,5 @@
+Tests that suspended generators produce scopes
+
Running test: testScopesPaused
{
id : <messageId>
diff --git a/deps/v8/test/inspector/debugger/suspended-generator-scopes.js b/deps/v8/test/inspector/debugger/suspended-generator-scopes.js
index edce5951ff..f7d389072a 100644
--- a/deps/v8/test/inspector/debugger/suspended-generator-scopes.js
+++ b/deps/v8/test/inspector/debugger/suspended-generator-scopes.js
@@ -2,7 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.addScript(
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests that suspended generators produce scopes');
+
+contextGroup.addScript(
`function *gen(a) {
var b = 42;
yield a;
diff --git a/deps/v8/test/inspector/debugger/update-call-frame-scopes-expected.txt b/deps/v8/test/inspector/debugger/update-call-frame-scopes-expected.txt
index ed52d231c2..acad9cea39 100644
--- a/deps/v8/test/inspector/debugger/update-call-frame-scopes-expected.txt
+++ b/deps/v8/test/inspector/debugger/update-call-frame-scopes-expected.txt
@@ -1,7 +1,7 @@
+Tests updating call frame scopes
Paused on 'debugger;'
Variable value changed
Stacktrace re-read again
Scope variables downloaded anew
New variable is 55, expected is 55, old was: 2
SUCCESS
-
diff --git a/deps/v8/test/inspector/debugger/update-call-frame-scopes.js b/deps/v8/test/inspector/debugger/update-call-frame-scopes.js
index f4a0f12397..e0b7307b92 100644
--- a/deps/v8/test/inspector/debugger/update-call-frame-scopes.js
+++ b/deps/v8/test/inspector/debugger/update-call-frame-scopes.js
@@ -2,7 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.addScript(
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests updating call frame scopes');
+
+contextGroup.addScript(
`function TestFunction()
{
var a = 2;
diff --git a/deps/v8/test/inspector/debugger/wasm-get-breakable-locations-expected.txt b/deps/v8/test/inspector/debugger/wasm-get-breakable-locations-expected.txt
index 7f869bf040..96c7a64bd4 100644
--- a/deps/v8/test/inspector/debugger/wasm-get-breakable-locations-expected.txt
+++ b/deps/v8/test/inspector/debugger/wasm-get-breakable-locations-expected.txt
@@ -1,3 +1,4 @@
+Tests breakable locations in wasm
Running testFunction...
Script nr 0 parsed. URL: v8://test/setup
Script nr 1 parsed. URL: v8://test/runTestFunction
diff --git a/deps/v8/test/inspector/debugger/wasm-get-breakable-locations.js b/deps/v8/test/inspector/debugger/wasm-get-breakable-locations.js
index eb70b29a82..ea2a116be5 100644
--- a/deps/v8/test/inspector/debugger/wasm-get-breakable-locations.js
+++ b/deps/v8/test/inspector/debugger/wasm-get-breakable-locations.js
@@ -4,6 +4,8 @@
// Flags: --expose-wasm
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests breakable locations in wasm');
+
utils.load('test/mjsunit/wasm/wasm-constants.js');
utils.load('test/mjsunit/wasm/wasm-module-builder.js');
diff --git a/deps/v8/test/inspector/debugger/wasm-imports-expected.txt b/deps/v8/test/inspector/debugger/wasm-imports-expected.txt
index 0a53bdc521..a98b9d29b4 100644
--- a/deps/v8/test/inspector/debugger/wasm-imports-expected.txt
+++ b/deps/v8/test/inspector/debugger/wasm-imports-expected.txt
@@ -1,3 +1,4 @@
+Tests imports in wasm
Installing code and global variable.
Calling instantiate function for module A.
Waiting for wasm script to be parsed.
diff --git a/deps/v8/test/inspector/debugger/wasm-imports.js b/deps/v8/test/inspector/debugger/wasm-imports.js
index e2a87867e3..dbe96ce671 100644
--- a/deps/v8/test/inspector/debugger/wasm-imports.js
+++ b/deps/v8/test/inspector/debugger/wasm-imports.js
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests imports in wasm');
+
utils.load('test/mjsunit/wasm/wasm-constants.js');
utils.load('test/mjsunit/wasm/wasm-module-builder.js');
@@ -39,7 +41,7 @@ function instantiate(bytes, imp) {
var evalWithUrl = (code, url) => Protocol.Runtime.evaluate(
{'expression': code + '\n//# sourceURL=v8://test/' + url});
-InspectorTest.setupScriptMap();
+session.setupScriptMap();
// Main promise chain:
Protocol.Debugger.enable()
@@ -61,7 +63,7 @@ Protocol.Debugger.enable()
url =>
Protocol.Debugger.setBreakpointByUrl({lineNumber: 1, url: url}))
.then(printFailure)
- .then(msg => InspectorTest.logSourceLocations(msg.result.locations))
+ .then(msg => session.logSourceLocations(msg.result.locations))
.then(() => InspectorTest.log('Calling instantiate function for module B.'))
.then(
() =>
@@ -84,7 +86,7 @@ Protocol.Debugger.oncePaused()
(InspectorTest.log(
'Paused at ' + loc.lineNumber + ':' + loc.columnNumber + '.'),
loc))
- .then(InspectorTest.logSourceLocation)
+ .then(session.logSourceLocation.bind(session))
.then(
() => InspectorTest.log(
'Getting current stack trace via "new Error().stack".'))
diff --git a/deps/v8/test/inspector/debugger/wasm-scripts-expected.txt b/deps/v8/test/inspector/debugger/wasm-scripts-expected.txt
index 41d2c0b380..5d23605566 100644
--- a/deps/v8/test/inspector/debugger/wasm-scripts-expected.txt
+++ b/deps/v8/test/inspector/debugger/wasm-scripts-expected.txt
@@ -1,3 +1,4 @@
+Tests how wasm scripts are reported
Check that inspector gets two wasm scripts at module creation time.
Script #0 parsed. URL: v8://test/testFunction
Script #1 parsed. URL: v8://test/runTestRunction
diff --git a/deps/v8/test/inspector/debugger/wasm-scripts.js b/deps/v8/test/inspector/debugger/wasm-scripts.js
index 9fe8c26e6a..0993f11b53 100644
--- a/deps/v8/test/inspector/debugger/wasm-scripts.js
+++ b/deps/v8/test/inspector/debugger/wasm-scripts.js
@@ -4,6 +4,8 @@
// Flags: --expose-wasm
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests how wasm scripts are reported');
+
utils.load('test/mjsunit/wasm/wasm-constants.js');
utils.load('test/mjsunit/wasm/wasm-module-builder.js');
@@ -27,9 +29,8 @@ function testFunction(bytes) {
new WebAssembly.Module(buffer);
}
-InspectorTest.addScriptWithUrl(
- testFunction.toString(), 'v8://test/testFunction');
-InspectorTest.addScript('var module_bytes = ' + JSON.stringify(module_bytes));
+contextGroup.addScript(testFunction.toString(), 0, 0, 'v8://test/testFunction');
+contextGroup.addScript('var module_bytes = ' + JSON.stringify(module_bytes));
Protocol.Debugger.enable();
Protocol.Debugger.onScriptParsed(handleScriptParsed);
diff --git a/deps/v8/test/inspector/debugger/wasm-source-expected.txt b/deps/v8/test/inspector/debugger/wasm-source-expected.txt
index 8e2c125676..b140be0876 100644
--- a/deps/v8/test/inspector/debugger/wasm-source-expected.txt
+++ b/deps/v8/test/inspector/debugger/wasm-source-expected.txt
@@ -1,3 +1,4 @@
+Tests how wasm scrips report the source
Check that inspector gets disassembled wasm code
Paused on debugger!
Number of frames: 5
diff --git a/deps/v8/test/inspector/debugger/wasm-source.js b/deps/v8/test/inspector/debugger/wasm-source.js
index cadd44f909..bf7bab735c 100644
--- a/deps/v8/test/inspector/debugger/wasm-source.js
+++ b/deps/v8/test/inspector/debugger/wasm-source.js
@@ -4,6 +4,8 @@
// Flags: --expose-wasm
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests how wasm scrips report the source');
+
utils.load('test/mjsunit/wasm/wasm-constants.js');
utils.load('test/mjsunit/wasm/wasm-module-builder.js');
@@ -45,8 +47,8 @@ function testFunction(bytes) {
instance.exports.main();
}
-InspectorTest.addScript(testFunction.toString());
-InspectorTest.addScript('var module_bytes = ' + JSON.stringify(module_bytes));
+contextGroup.addScript(testFunction.toString());
+contextGroup.addScript('var module_bytes = ' + JSON.stringify(module_bytes));
Protocol.Debugger.enable();
Protocol.Debugger.onPaused(handleDebuggerPaused);
diff --git a/deps/v8/test/inspector/debugger/wasm-stack-expected.txt b/deps/v8/test/inspector/debugger/wasm-stack-expected.txt
index df7d3a3f5a..c3226f5631 100644
--- a/deps/v8/test/inspector/debugger/wasm-stack-expected.txt
+++ b/deps/v8/test/inspector/debugger/wasm-stack-expected.txt
@@ -1,3 +1,4 @@
+Tests call stack in wasm scripts
Running testFunction with generated WASM bytes...
Paused on 'debugger;'
Number of frames: 5
diff --git a/deps/v8/test/inspector/debugger/wasm-stack.js b/deps/v8/test/inspector/debugger/wasm-stack.js
index 45ab6097f7..2603c31784 100644
--- a/deps/v8/test/inspector/debugger/wasm-stack.js
+++ b/deps/v8/test/inspector/debugger/wasm-stack.js
@@ -4,6 +4,8 @@
// Flags: --expose-wasm
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests call stack in wasm scripts');
+
utils.load('test/mjsunit/wasm/wasm-constants.js');
utils.load('test/mjsunit/wasm/wasm-module-builder.js');
@@ -40,7 +42,7 @@ function testFunction(bytes) {
instance.exports.main();
}
-InspectorTest.addScript(testFunction.toString());
+contextGroup.addScript(testFunction.toString());
Protocol.Debugger.enable();
Protocol.Debugger.onPaused(handleDebuggerPaused);
diff --git a/deps/v8/test/inspector/debugger/wasm-stepping-expected.txt b/deps/v8/test/inspector/debugger/wasm-stepping-expected.txt
index a2df3e47b9..793552f7f5 100644
--- a/deps/v8/test/inspector/debugger/wasm-stepping-expected.txt
+++ b/deps/v8/test/inspector/debugger/wasm-stepping-expected.txt
@@ -1,3 +1,4 @@
+Tests stepping through wasm scripts
Installing code an global variable.
Calling instantiate function.
Waiting for two wasm scripts to be parsed.
@@ -32,52 +33,298 @@ Setting breakpoint on line 7 (on the setlocal before the call), url wasm://wasm/
scriptId : <scriptId>
}
Paused at wasm://wasm/wasm-0c10a5fe/wasm-0c10a5fe-1:7:6: >set_local 0
-Step action: stepInto
+at wasm_B (7:6):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ param#0: 4 (number)
+ stack: {"0":3} (Object)
+at (anonymous) (0:17):
+ - scope (global):
+ -- skipped
+Debugger.stepInto called
Paused at wasm://wasm/wasm-0c10a5fe/wasm-0c10a5fe-1:8:6: >call 0
-Step action: stepInto
+at wasm_B (8:6):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ param#0: 3 (number)
+ stack: {} (Object)
+at (anonymous) (0:17):
+ - scope (global):
+ -- skipped
+Debugger.stepInto called
Paused at wasm://wasm/wasm-0c10a5fe/wasm-0c10a5fe-0:1:2: >nop
-Step action: stepOver
+at wasm_A (1:2):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ stack: {} (Object)
+at wasm_B (8:6):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ param#0: 3 (number)
+ stack: {} (Object)
+at (anonymous) (0:17):
+ - scope (global):
+ -- skipped
+Debugger.stepOver called
Paused at wasm://wasm/wasm-0c10a5fe/wasm-0c10a5fe-0:2:2: >nop
-Step action: stepOut
+at wasm_A (2:2):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ stack: {} (Object)
+at wasm_B (8:6):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ param#0: 3 (number)
+ stack: {} (Object)
+at (anonymous) (0:17):
+ - scope (global):
+ -- skipped
+Debugger.stepOut called
Paused at wasm://wasm/wasm-0c10a5fe/wasm-0c10a5fe-1:9:6: >br 1
-Step action: stepOut
+at wasm_B (9:6):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ param#0: 3 (number)
+ stack: {} (Object)
+at (anonymous) (0:17):
+ - scope (global):
+ -- skipped
+Debugger.stepOut called
Paused at wasm://wasm/wasm-0c10a5fe/wasm-0c10a5fe-1:7:6: >set_local 0
-Step action: stepOver
+at wasm_B (7:6):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ param#0: 3 (number)
+ stack: {"0":2} (Object)
+at (anonymous) (0:17):
+ - scope (global):
+ -- skipped
+Debugger.stepOver called
Paused at wasm://wasm/wasm-0c10a5fe/wasm-0c10a5fe-1:8:6: >call 0
-Step action: stepOver
+at wasm_B (8:6):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ param#0: 2 (number)
+ stack: {} (Object)
+at (anonymous) (0:17):
+ - scope (global):
+ -- skipped
+Debugger.stepOver called
Paused at wasm://wasm/wasm-0c10a5fe/wasm-0c10a5fe-1:9:6: >br 1
-Step action: resume
+at wasm_B (9:6):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ param#0: 2 (number)
+ stack: {} (Object)
+at (anonymous) (0:17):
+ - scope (global):
+ -- skipped
+Debugger.resume called
Paused at wasm://wasm/wasm-0c10a5fe/wasm-0c10a5fe-1:7:6: >set_local 0
-Step action: stepInto
+at wasm_B (7:6):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ param#0: 2 (number)
+ stack: {"0":1} (Object)
+at (anonymous) (0:17):
+ - scope (global):
+ -- skipped
+Debugger.stepInto called
Paused at wasm://wasm/wasm-0c10a5fe/wasm-0c10a5fe-1:8:6: >call 0
-Step action: stepInto
+at wasm_B (8:6):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ param#0: 1 (number)
+ stack: {} (Object)
+at (anonymous) (0:17):
+ - scope (global):
+ -- skipped
+Debugger.stepInto called
Paused at wasm://wasm/wasm-0c10a5fe/wasm-0c10a5fe-0:1:2: >nop
-Step action: stepOut
+at wasm_A (1:2):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ stack: {} (Object)
+at wasm_B (8:6):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ param#0: 1 (number)
+ stack: {} (Object)
+at (anonymous) (0:17):
+ - scope (global):
+ -- skipped
+Debugger.stepOut called
Paused at wasm://wasm/wasm-0c10a5fe/wasm-0c10a5fe-1:9:6: >br 1
-Step action: stepInto
+at wasm_B (9:6):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ param#0: 1 (number)
+ stack: {} (Object)
+at (anonymous) (0:17):
+ - scope (global):
+ -- skipped
+Debugger.stepInto called
Paused at wasm://wasm/wasm-0c10a5fe/wasm-0c10a5fe-1:1:2: >loop
-Step action: stepInto
+at wasm_B (1:2):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ param#0: 1 (number)
+ stack: {} (Object)
+at (anonymous) (0:17):
+ - scope (global):
+ -- skipped
+Debugger.stepInto called
Paused at wasm://wasm/wasm-0c10a5fe/wasm-0c10a5fe-1:2:4: >get_local 0
-Step action: stepInto
+at wasm_B (2:4):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ param#0: 1 (number)
+ stack: {} (Object)
+at (anonymous) (0:17):
+ - scope (global):
+ -- skipped
+Debugger.stepInto called
Paused at wasm://wasm/wasm-0c10a5fe/wasm-0c10a5fe-1:3:4: >if
-Step action: stepInto
+at wasm_B (3:4):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ param#0: 1 (number)
+ stack: {"0":1} (Object)
+at (anonymous) (0:17):
+ - scope (global):
+ -- skipped
+Debugger.stepInto called
Paused at wasm://wasm/wasm-0c10a5fe/wasm-0c10a5fe-1:4:6: >get_local 0
-Step action: stepInto
+at wasm_B (4:6):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ param#0: 1 (number)
+ stack: {} (Object)
+at (anonymous) (0:17):
+ - scope (global):
+ -- skipped
+Debugger.stepInto called
Paused at wasm://wasm/wasm-0c10a5fe/wasm-0c10a5fe-1:5:6: >i32.const 1
-Step action: stepInto
+at wasm_B (5:6):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ param#0: 1 (number)
+ stack: {"0":1} (Object)
+at (anonymous) (0:17):
+ - scope (global):
+ -- skipped
+Debugger.stepInto called
Paused at wasm://wasm/wasm-0c10a5fe/wasm-0c10a5fe-1:6:6: >i32.sub
-Step action: stepInto
+at wasm_B (6:6):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ param#0: 1 (number)
+ stack: {"0":1,"1":1} (Object)
+at (anonymous) (0:17):
+ - scope (global):
+ -- skipped
+Debugger.stepInto called
Paused at wasm://wasm/wasm-0c10a5fe/wasm-0c10a5fe-1:7:6: >set_local 0
-Step action: stepInto
+at wasm_B (7:6):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ param#0: 1 (number)
+ stack: {"0":0} (Object)
+at (anonymous) (0:17):
+ - scope (global):
+ -- skipped
+Debugger.stepInto called
Paused at wasm://wasm/wasm-0c10a5fe/wasm-0c10a5fe-1:8:6: >call 0
-Step action: stepInto
+at wasm_B (8:6):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ param#0: 0 (number)
+ stack: {} (Object)
+at (anonymous) (0:17):
+ - scope (global):
+ -- skipped
+Debugger.stepInto called
Paused at wasm://wasm/wasm-0c10a5fe/wasm-0c10a5fe-0:1:2: >nop
-Step action: stepInto
+at wasm_A (1:2):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ stack: {} (Object)
+at wasm_B (8:6):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ param#0: 0 (number)
+ stack: {} (Object)
+at (anonymous) (0:17):
+ - scope (global):
+ -- skipped
+Debugger.stepInto called
Paused at wasm://wasm/wasm-0c10a5fe/wasm-0c10a5fe-0:2:2: >nop
-Step action: stepInto
+at wasm_A (2:2):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ stack: {} (Object)
+at wasm_B (8:6):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ param#0: 0 (number)
+ stack: {} (Object)
+at (anonymous) (0:17):
+ - scope (global):
+ -- skipped
+Debugger.stepInto called
Paused at wasm://wasm/wasm-0c10a5fe/wasm-0c10a5fe-0:3:0: >end
-Step action: stepInto
+at wasm_A (3:0):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ stack: {} (Object)
+at wasm_B (8:6):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ param#0: 0 (number)
+ stack: {} (Object)
+at (anonymous) (0:17):
+ - scope (global):
+ -- skipped
+Debugger.stepInto called
Paused at wasm://wasm/wasm-0c10a5fe/wasm-0c10a5fe-1:9:6: >br 1
-Step action: resume
+at wasm_B (9:6):
+ - scope (global):
+ -- skipped
+ - scope (local):
+ param#0: 0 (number)
+ stack: {} (Object)
+at (anonymous) (0:17):
+ - scope (global):
+ -- skipped
+Debugger.resume called
exports.main returned!
Finished!
diff --git a/deps/v8/test/inspector/debugger/wasm-stepping.js b/deps/v8/test/inspector/debugger/wasm-stepping.js
index 5f132df3ba..d3a2c64048 100644
--- a/deps/v8/test/inspector/debugger/wasm-stepping.js
+++ b/deps/v8/test/inspector/debugger/wasm-stepping.js
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests stepping through wasm scripts');
+
utils.load('test/mjsunit/wasm/wasm-constants.js');
utils.load('test/mjsunit/wasm/wasm-module-builder.js');
@@ -68,6 +70,9 @@ var step_actions = [
// then just resume.
'resume'
];
+for (var action of step_actions) {
+ InspectorTest.logProtocolCommandCalls('Debugger.' + action)
+}
var sources = {};
var urls = {};
var afterTwoSourcesCallback;
@@ -151,10 +156,48 @@ function printPauseLocation(scriptId, lineNr, columnNr) {
line);
}
+async function getValueString(value) {
+ if (value.type == 'object') {
+ var msg = await Protocol.Runtime.callFunctionOn({
+ objectId: value.objectId,
+ functionDeclaration: 'function () { return JSON.stringify(this); }'
+ });
+ printFailure(msg);
+ return msg.result.result.value + ' (' + value.description + ')';
+ }
+ return value.value + ' (' + value.type + ')';
+}
+
+async function dumpProperties(message) {
+ printFailure(message);
+ for (var value of message.result.result) {
+ var value_str = await getValueString(value.value);
+ InspectorTest.log(' ' + value.name + ': ' + value_str);
+ }
+}
+
+async function dumpScopeChainsOnPause(message) {
+ for (var frame of message.params.callFrames) {
+ var functionName = frame.functionName || '(anonymous)';
+ var lineNumber = frame.location ? frame.location.lineNumber : frame.lineNumber;
+ var columnNumber = frame.location ? frame.location.columnNumber : frame.columnNumber;
+ InspectorTest.log(`at ${functionName} (${lineNumber}:${columnNumber}):`);
+ for (var scope of frame.scopeChain) {
+ InspectorTest.logObject(' - scope (' + scope.type + '):');
+ if (scope.type == 'global') {
+ InspectorTest.logObject(' -- skipped');
+ } else {
+ var properties = await Protocol.Runtime.getProperties(
+ {'objectId': scope.object.objectId});
+ await dumpProperties(properties);
+ }
+ }
+ }
+}
+
function handlePaused(msg) {
var loc = msg.params.callFrames[0].location;
printPauseLocation(loc.scriptId, loc.lineNumber, loc.columnNumber);
- var action = step_actions.shift();
- InspectorTest.log('Step action: ' + action);
- Protocol.Debugger[action]();
+ dumpScopeChainsOnPause(msg)
+ .then(Protocol.Debugger[step_actions.shift() || 'resume']);
}
diff --git a/deps/v8/test/inspector/heap-profiler/take-heap-snapshot-on-pause.js b/deps/v8/test/inspector/heap-profiler/take-heap-snapshot-on-pause.js
index bb8c211d5f..4e4bc400b5 100644
--- a/deps/v8/test/inspector/heap-profiler/take-heap-snapshot-on-pause.js
+++ b/deps/v8/test/inspector/heap-profiler/take-heap-snapshot-on-pause.js
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Checks that takeHeapSnapshot uses empty accessing_context for access \
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks that takeHeapSnapshot uses empty accessing_context for access \
checks.');
-InspectorTest.addScript(`
+contextGroup.addScript(`
function testFunction() {
- var array = [ createObjectWithStrictCheck() ];
+ var array = [ inspector.createObjectWithStrictCheck() ];
debugger;
}
//# sourceURL=test.js`);
diff --git a/deps/v8/test/inspector/inspector-impl.cc b/deps/v8/test/inspector/inspector-impl.cc
index aa3b1447ff..664fdf8366 100644
--- a/deps/v8/test/inspector/inspector-impl.cc
+++ b/deps/v8/test/inspector/inspector-impl.cc
@@ -7,41 +7,35 @@
#include "include/v8.h"
#include "src/vector.h"
+#include "test/inspector/isolate-data.h"
+#include "test/inspector/task-runner.h"
namespace {
-const int kInspectorClientIndex = v8::Context::kDebugIdIndex + 1;
-
class ChannelImpl final : public v8_inspector::V8Inspector::Channel {
public:
- explicit ChannelImpl(InspectorClientImpl::FrontendChannel* frontend_channel)
- : frontend_channel_(frontend_channel) {}
+ ChannelImpl(InspectorClientImpl::FrontendChannel* frontend_channel,
+ int session_id)
+ : frontend_channel_(frontend_channel), session_id_(session_id) {}
virtual ~ChannelImpl() = default;
private:
void sendResponse(
int callId,
std::unique_ptr<v8_inspector::StringBuffer> message) override {
- frontend_channel_->SendMessageToFrontend(message->string());
+ frontend_channel_->SendMessageToFrontend(session_id_, message->string());
}
void sendNotification(
std::unique_ptr<v8_inspector::StringBuffer> message) override {
- frontend_channel_->SendMessageToFrontend(message->string());
+ frontend_channel_->SendMessageToFrontend(session_id_, message->string());
}
void flushProtocolNotifications() override {}
InspectorClientImpl::FrontendChannel* frontend_channel_;
+ int session_id_;
DISALLOW_COPY_AND_ASSIGN(ChannelImpl);
};
-InspectorClientImpl* InspectorClientFromContext(
- v8::Local<v8::Context> context) {
- InspectorClientImpl* inspector_client = static_cast<InspectorClientImpl*>(
- context->GetAlignedPointerFromEmbedderData(kInspectorClientIndex));
- CHECK(inspector_client);
- return inspector_client;
-}
-
v8::internal::Vector<uint16_t> ToVector(v8::Local<v8::String> str) {
v8::internal::Vector<uint16_t> buffer =
v8::internal::Vector<uint16_t>::New(str->Length());
@@ -55,7 +49,7 @@ void MessageHandler(v8::Local<v8::Message> message,
v8::Local<v8::Context> context = isolate->GetEnteredContext();
if (context.IsEmpty()) return;
v8_inspector::V8Inspector* inspector =
- InspectorClientImpl::InspectorFromContext(context);
+ IsolateData::FromContext(context)->inspector()->inspector();
v8::Local<v8::StackTrace> stack = message->GetStackTrace();
int script_id =
@@ -85,164 +79,111 @@ void MessageHandler(v8::Local<v8::Message> message,
inspector->createStackTrace(stack), script_id);
}
-} // namespace
-
-class ConnectTask : public TaskRunner::Task {
- public:
- ConnectTask(InspectorClientImpl* client, v8::base::Semaphore* ready_semaphore)
- : client_(client), ready_semaphore_(ready_semaphore) {}
- virtual ~ConnectTask() = default;
-
- bool is_inspector_task() final { return true; }
-
- void Run(v8::Isolate* isolate,
- const v8::Global<v8::Context>& global_context) {
- v8::HandleScope handle_scope(isolate);
- v8::Local<v8::Context> context = global_context.Get(isolate);
- client_->connect(context);
- if (ready_semaphore_) ready_semaphore_->Signal();
- }
-
- private:
- InspectorClientImpl* client_;
- v8::base::Semaphore* ready_semaphore_;
-};
-
-class DisconnectTask : public TaskRunner::Task {
- public:
- explicit DisconnectTask(InspectorClientImpl* client, bool reset_inspector,
- v8::base::Semaphore* ready_semaphore)
- : client_(client),
- reset_inspector_(reset_inspector),
- ready_semaphore_(ready_semaphore) {}
- virtual ~DisconnectTask() = default;
-
- bool is_inspector_task() final { return true; }
-
- void Run(v8::Isolate* isolate,
- const v8::Global<v8::Context>& global_context) {
- client_->disconnect(reset_inspector_);
- if (ready_semaphore_) ready_semaphore_->Signal();
- }
-
- private:
- InspectorClientImpl* client_;
- bool reset_inspector_;
- v8::base::Semaphore* ready_semaphore_;
-};
-
-class CreateContextGroupTask : public TaskRunner::Task {
- public:
- CreateContextGroupTask(InspectorClientImpl* client,
- v8::ExtensionConfiguration* extensions,
- v8::base::Semaphore* ready_semaphore,
- int* context_group_id)
- : client_(client),
- extensions_(extensions),
- ready_semaphore_(ready_semaphore),
- context_group_id_(context_group_id) {}
- virtual ~CreateContextGroupTask() = default;
-
- bool is_inspector_task() final { return true; }
-
- void Run(v8::Isolate* isolate,
- const v8::Global<v8::Context>& global_context) {
- *context_group_id_ = client_->createContextGroup(extensions_);
- if (ready_semaphore_) ready_semaphore_->Signal();
- }
+v8::Local<v8::String> ToString(v8::Isolate* isolate,
+ const v8_inspector::StringView& string) {
+ if (string.is8Bit())
+ return v8::String::NewFromOneByte(isolate, string.characters8(),
+ v8::NewStringType::kNormal,
+ static_cast<int>(string.length()))
+ .ToLocalChecked();
+ else
+ return v8::String::NewFromTwoByte(isolate, string.characters16(),
+ v8::NewStringType::kNormal,
+ static_cast<int>(string.length()))
+ .ToLocalChecked();
+}
- private:
- InspectorClientImpl* client_;
- v8::ExtensionConfiguration* extensions_;
- v8::base::Semaphore* ready_semaphore_;
- int* context_group_id_;
-};
+void Print(v8::Isolate* isolate, const v8_inspector::StringView& string) {
+ v8::Local<v8::String> v8_string = ToString(isolate, string);
+ v8::String::Utf8Value utf8_string(v8_string);
+ fwrite(*utf8_string, sizeof(**utf8_string), utf8_string.length(), stdout);
+}
+} // namespace
-InspectorClientImpl::InspectorClientImpl(TaskRunner* task_runner,
- FrontendChannel* frontend_channel,
- v8::base::Semaphore* ready_semaphore)
- : isolate_(nullptr),
- task_runner_(task_runner),
+InspectorClientImpl::InspectorClientImpl(v8::Isolate* isolate,
+ TaskRunner* task_runner,
+ FrontendChannel* frontend_channel)
+ : task_runner_(task_runner),
+ isolate_(isolate),
frontend_channel_(frontend_channel) {
- task_runner_->Append(new ConnectTask(this, ready_semaphore));
+ isolate_->AddMessageListener(MessageHandler);
+ inspector_ = v8_inspector::V8Inspector::create(isolate_, this);
}
InspectorClientImpl::~InspectorClientImpl() {}
-void InspectorClientImpl::connect(v8::Local<v8::Context> context) {
- isolate_ = context->GetIsolate();
- isolate_->AddMessageListener(MessageHandler);
- channel_.reset(new ChannelImpl(frontend_channel_));
- inspector_ = v8_inspector::V8Inspector::create(isolate_, this);
-
- if (states_.empty()) {
- int context_group_id = TaskRunner::GetContextGroupId(context);
- v8_inspector::StringView state;
- sessions_[context_group_id] =
- inspector_->connect(context_group_id, channel_.get(), state);
- context->SetAlignedPointerInEmbedderData(kInspectorClientIndex, this);
- v8_inspector::V8ContextInfo info(context, context_group_id,
- v8_inspector::StringView());
- info.hasMemoryOnConsole = true;
- inspector_->contextCreated(info);
- } else {
- for (const auto& it : states_) {
- int context_group_id = it.first;
- v8::Local<v8::Context> context =
- task_runner_->GetContext(context_group_id);
- v8_inspector::StringView state = it.second->string();
- sessions_[context_group_id] =
- inspector_->connect(context_group_id, channel_.get(), state);
- context->SetAlignedPointerInEmbedderData(kInspectorClientIndex, this);
- v8_inspector::V8ContextInfo info(context, context_group_id,
- v8_inspector::StringView());
- info.hasMemoryOnConsole = true;
- inspector_->contextCreated(info);
- }
+int InspectorClientImpl::ConnectSession(int context_group_id,
+ const v8_inspector::StringView& state) {
+ int session_id = ++last_session_id_;
+ channels_[session_id].reset(new ChannelImpl(frontend_channel_, session_id));
+ sessions_[session_id] =
+ inspector_->connect(context_group_id, channels_[session_id].get(), state);
+ context_group_by_session_[sessions_[session_id].get()] = context_group_id;
+ return session_id;
+}
+
+std::unique_ptr<v8_inspector::StringBuffer>
+InspectorClientImpl::DisconnectSession(int session_id) {
+ auto it = sessions_.find(session_id);
+ CHECK(it != sessions_.end());
+ context_group_by_session_.erase(it->second.get());
+ std::unique_ptr<v8_inspector::StringBuffer> result = it->second->stateJSON();
+ sessions_.erase(it);
+ channels_.erase(session_id);
+ return result;
+}
+
+void InspectorClientImpl::SendMessage(int session_id,
+ const v8_inspector::StringView& message) {
+ auto it = sessions_.find(session_id);
+ if (it != sessions_.end()) it->second->dispatchProtocolMessage(message);
+}
+
+void InspectorClientImpl::BreakProgram(
+ int context_group_id, const v8_inspector::StringView& reason,
+ const v8_inspector::StringView& details) {
+ for (int session_id : GetSessionIds(context_group_id)) {
+ auto it = sessions_.find(session_id);
+ if (it != sessions_.end()) it->second->breakProgram(reason, details);
}
- states_.clear();
}
-void InspectorClientImpl::scheduleReconnect(
- v8::base::Semaphore* ready_semaphore) {
- task_runner_->Append(
- new DisconnectTask(this, /* reset_inspector */ true, nullptr));
- task_runner_->Append(new ConnectTask(this, ready_semaphore));
+void InspectorClientImpl::SchedulePauseOnNextStatement(
+ int context_group_id, const v8_inspector::StringView& reason,
+ const v8_inspector::StringView& details) {
+ for (int session_id : GetSessionIds(context_group_id)) {
+ auto it = sessions_.find(session_id);
+ if (it != sessions_.end())
+ it->second->schedulePauseOnNextStatement(reason, details);
+ }
}
-void InspectorClientImpl::scheduleDisconnect(
- v8::base::Semaphore* ready_semaphore) {
- task_runner_->Append(
- new DisconnectTask(this, /* reset_inspector */ false, ready_semaphore));
+void InspectorClientImpl::CancelPauseOnNextStatement(int context_group_id) {
+ for (int session_id : GetSessionIds(context_group_id)) {
+ auto it = sessions_.find(session_id);
+ if (it != sessions_.end()) it->second->cancelPauseOnNextStatement();
+ }
}
-void InspectorClientImpl::disconnect(bool reset_inspector) {
- for (const auto& it : sessions_) {
- states_[it.first] = it.second->stateJSON();
- }
- sessions_.clear();
- if (reset_inspector) inspector_.reset();
+void InspectorClientImpl::ContextCreated(v8::Local<v8::Context> context,
+ int context_group_id) {
+ v8_inspector::V8ContextInfo info(context, context_group_id,
+ v8_inspector::StringView());
+ info.hasMemoryOnConsole = true;
+ inspector_->contextCreated(info);
}
-void InspectorClientImpl::scheduleCreateContextGroup(
- v8::ExtensionConfiguration* extensions,
- v8::base::Semaphore* ready_semaphore, int* context_group_id) {
- task_runner_->Append(new CreateContextGroupTask(
- this, extensions, ready_semaphore, context_group_id));
+void InspectorClientImpl::ContextDestroyed(v8::Local<v8::Context> context) {
+ inspector_->contextDestroyed(context);
}
-int InspectorClientImpl::createContextGroup(
- v8::ExtensionConfiguration* extensions) {
- v8::HandleScope handle_scope(isolate_);
- v8::Local<v8::Context> context = task_runner_->NewContextGroup();
- context->SetAlignedPointerInEmbedderData(kInspectorClientIndex, this);
- int context_group_id = TaskRunner::GetContextGroupId(context);
- v8_inspector::StringView state;
- sessions_[context_group_id] =
- inspector_->connect(context_group_id, channel_.get(), state);
- inspector_->contextCreated(v8_inspector::V8ContextInfo(
- context, context_group_id, v8_inspector::StringView()));
- return context_group_id;
+std::vector<int> InspectorClientImpl::GetSessionIds(int context_group_id) {
+ std::vector<int> result;
+ for (auto& it : sessions_) {
+ if (context_group_by_session_[it.second.get()] == context_group_id)
+ result.push_back(it.first);
+ }
+ return result;
}
bool InspectorClientImpl::formatAccessorsAsProperties(
@@ -262,10 +203,10 @@ bool InspectorClientImpl::formatAccessorsAsProperties(
v8::Local<v8::Context> InspectorClientImpl::ensureDefaultContextInGroup(
int context_group_id) {
CHECK(isolate_);
- return task_runner_->GetContext(context_group_id);
+ return task_runner_->data()->GetContext(context_group_id);
}
-void InspectorClientImpl::setCurrentTimeMSForTest(double time) {
+void InspectorClientImpl::SetCurrentTimeMSForTest(double time) {
current_time_ = time;
current_time_set_for_test_ = true;
}
@@ -275,11 +216,15 @@ double InspectorClientImpl::currentTimeMS() {
return v8::base::OS::TimeCurrentMillis();
}
-void InspectorClientImpl::setMemoryInfoForTest(
+void InspectorClientImpl::SetMemoryInfoForTest(
v8::Local<v8::Value> memory_info) {
memory_info_.Reset(isolate_, memory_info);
}
+void InspectorClientImpl::SetLogConsoleApiMessageCalls(bool log) {
+ log_console_api_message_calls_ = log;
+}
+
v8::MaybeLocal<v8::Value> InspectorClientImpl::memoryInfo(
v8::Isolate* isolate, v8::Local<v8::Context>) {
if (memory_info_.IsEmpty()) return v8::MaybeLocal<v8::Value>();
@@ -294,72 +239,16 @@ void InspectorClientImpl::quitMessageLoopOnPause() {
task_runner_->QuitMessageLoop();
}
-v8_inspector::V8Inspector* InspectorClientImpl::InspectorFromContext(
- v8::Local<v8::Context> context) {
- return InspectorClientFromContext(context)->inspector_.get();
-}
-
-v8_inspector::V8InspectorSession* InspectorClientImpl::SessionFromContext(
- v8::Local<v8::Context> context) {
- int context_group_id = TaskRunner::GetContextGroupId(context);
- return InspectorClientFromContext(context)->sessions_[context_group_id].get();
-}
-
-v8_inspector::V8InspectorSession* InspectorClientImpl::session(
- int context_group_id) {
- if (context_group_id) {
- return sessions_[context_group_id].get();
- } else {
- return sessions_.begin()->second.get();
- }
-}
-
-class SendMessageToBackendTask : public TaskRunner::Task {
- public:
- explicit SendMessageToBackendTask(
- const v8::internal::Vector<uint16_t>& message, int context_group_id)
- : message_(message), context_group_id_(context_group_id) {}
-
- bool is_inspector_task() final { return true; }
-
- void Run(v8::Isolate* isolate,
- const v8::Global<v8::Context>& global_context) override {
- v8_inspector::V8InspectorSession* session = nullptr;
- {
- v8::HandleScope handle_scope(isolate);
- v8::Local<v8::Context> context = global_context.Get(isolate);
- if (!context_group_id_) {
- session = InspectorClientImpl::SessionFromContext(context);
- } else {
- session = InspectorClientFromContext(context)
- ->sessions_[context_group_id_]
- .get();
- }
- if (!session) return;
- }
- v8_inspector::StringView message_view(message_.start(), message_.length());
- session->dispatchProtocolMessage(message_view);
- }
-
- private:
- v8::internal::Vector<uint16_t> message_;
- int context_group_id_;
-};
-
-TaskRunner* SendMessageToBackendExtension::backend_task_runner_ = nullptr;
-
-v8::Local<v8::FunctionTemplate>
-SendMessageToBackendExtension::GetNativeFunctionTemplate(
- v8::Isolate* isolate, v8::Local<v8::String> name) {
- return v8::FunctionTemplate::New(
- isolate, SendMessageToBackendExtension::SendMessageToBackend);
-}
-
-void SendMessageToBackendExtension::SendMessageToBackend(
- const v8::FunctionCallbackInfo<v8::Value>& args) {
- CHECK(backend_task_runner_);
- CHECK(args.Length() == 2 && args[0]->IsString() && args[1]->IsInt32());
- v8::Local<v8::String> message = args[0].As<v8::String>();
- backend_task_runner_->Append(new SendMessageToBackendTask(
- ToVector(message), args[1].As<v8::Int32>()->Value()));
+void InspectorClientImpl::consoleAPIMessage(
+ int contextGroupId, v8::Isolate::MessageErrorLevel level,
+ const v8_inspector::StringView& message,
+ const v8_inspector::StringView& url, unsigned lineNumber,
+ unsigned columnNumber, v8_inspector::V8StackTrace* stack) {
+ if (!log_console_api_message_calls_) return;
+ Print(isolate_, message);
+ fprintf(stdout, " (");
+ Print(isolate_, url);
+ fprintf(stdout, ":%d:%d)", lineNumber, columnNumber);
+ Print(isolate_, stack->toString()->string());
+ fprintf(stdout, "\n");
}
diff --git a/deps/v8/test/inspector/inspector-impl.h b/deps/v8/test/inspector/inspector-impl.h
index 89dd002e1c..edbec72cfb 100644
--- a/deps/v8/test/inspector/inspector-impl.h
+++ b/deps/v8/test/inspector/inspector-impl.h
@@ -5,11 +5,15 @@
#ifndef V8_TEST_INSPECTOR_PROTOCOL_INSPECTOR_IMPL_H_
#define V8_TEST_INSPECTOR_PROTOCOL_INSPECTOR_IMPL_H_
+#include <map>
+#include <vector>
+
#include "include/v8-inspector.h"
#include "include/v8.h"
#include "src/base/macros.h"
#include "src/base/platform/platform.h"
-#include "test/inspector/task-runner.h"
+
+class TaskRunner;
class InspectorClientImpl : public v8_inspector::V8InspectorClient {
public:
@@ -17,30 +21,30 @@ class InspectorClientImpl : public v8_inspector::V8InspectorClient {
public:
virtual ~FrontendChannel() = default;
virtual void SendMessageToFrontend(
- const v8_inspector::StringView& message) = 0;
+ int session_id, const v8_inspector::StringView& message) = 0;
};
- InspectorClientImpl(TaskRunner* task_runner,
- FrontendChannel* frontend_channel,
- v8::base::Semaphore* ready_semaphore);
+ InspectorClientImpl(v8::Isolate* isolate, TaskRunner* task_runner,
+ FrontendChannel* frontend_channel);
virtual ~InspectorClientImpl();
- void scheduleReconnect(v8::base::Semaphore* ready_semaphore);
- void scheduleDisconnect(v8::base::Semaphore* ready_semaphore);
- void scheduleCreateContextGroup(v8::ExtensionConfiguration* extensions,
- v8::base::Semaphore* ready_semaphore,
- int* context_group_id);
-
- static v8_inspector::V8Inspector* InspectorFromContext(
- v8::Local<v8::Context> context);
- static v8_inspector::V8InspectorSession* SessionFromContext(
- v8::Local<v8::Context> context);
-
- // context_group_id = 0 means default context group.
- v8_inspector::V8InspectorSession* session(int context_group_id = 0);
-
- void setCurrentTimeMSForTest(double time);
- void setMemoryInfoForTest(v8::Local<v8::Value> memory_info);
+ v8_inspector::V8Inspector* inspector() const { return inspector_.get(); }
+ int ConnectSession(int context_group_id,
+ const v8_inspector::StringView& state);
+ std::unique_ptr<v8_inspector::StringBuffer> DisconnectSession(int session_id);
+ void SendMessage(int session_id, const v8_inspector::StringView& message);
+ void BreakProgram(int context_group_id,
+ const v8_inspector::StringView& reason,
+ const v8_inspector::StringView& details);
+ void SchedulePauseOnNextStatement(int context_group_id,
+ const v8_inspector::StringView& reason,
+ const v8_inspector::StringView& details);
+ void CancelPauseOnNextStatement(int context_group_id);
+ void SetCurrentTimeMSForTest(double time);
+ void SetMemoryInfoForTest(v8::Local<v8::Value> memory_info);
+ void SetLogConsoleApiMessageCalls(bool log);
+ void ContextCreated(v8::Local<v8::Context> context, int context_group_id);
+ void ContextDestroyed(v8::Local<v8::Context> context);
private:
// V8InspectorClient implementation.
@@ -52,51 +56,29 @@ class InspectorClientImpl : public v8_inspector::V8InspectorClient {
v8::Local<v8::Context>) override;
void runMessageLoopOnPause(int context_group_id) override;
void quitMessageLoopOnPause() override;
+ void consoleAPIMessage(int contextGroupId,
+ v8::Isolate::MessageErrorLevel level,
+ const v8_inspector::StringView& message,
+ const v8_inspector::StringView& url,
+ unsigned lineNumber, unsigned columnNumber,
+ v8_inspector::V8StackTrace*) override;
- friend class SendMessageToBackendTask;
-
- friend class ConnectTask;
- void connect(v8::Local<v8::Context> context);
- friend class DisconnectTask;
- void disconnect(bool reset_inspector);
- friend class CreateContextGroupTask;
- int createContextGroup(v8::ExtensionConfiguration* extensions);
+ std::vector<int> GetSessionIds(int context_group_id);
std::unique_ptr<v8_inspector::V8Inspector> inspector_;
- std::unique_ptr<v8_inspector::V8Inspector::Channel> channel_;
-
+ int last_session_id_ = 0;
std::map<int, std::unique_ptr<v8_inspector::V8InspectorSession>> sessions_;
- std::map<int, std::unique_ptr<v8_inspector::StringBuffer>> states_;
-
+ std::map<v8_inspector::V8InspectorSession*, int> context_group_by_session_;
+ std::map<int, std::unique_ptr<v8_inspector::V8Inspector::Channel>> channels_;
+ TaskRunner* task_runner_;
v8::Isolate* isolate_;
v8::Global<v8::Value> memory_info_;
-
- TaskRunner* task_runner_;
FrontendChannel* frontend_channel_;
-
bool current_time_set_for_test_ = false;
double current_time_ = 0.0;
+ bool log_console_api_message_calls_ = false;
DISALLOW_COPY_AND_ASSIGN(InspectorClientImpl);
};
-class SendMessageToBackendExtension : public v8::Extension {
- public:
- SendMessageToBackendExtension()
- : v8::Extension("v8_inspector/frontend",
- "native function sendMessageToBackend();") {}
- virtual v8::Local<v8::FunctionTemplate> GetNativeFunctionTemplate(
- v8::Isolate* isolate, v8::Local<v8::String> name);
-
- static void set_backend_task_runner(TaskRunner* task_runner) {
- backend_task_runner_ = task_runner;
- }
-
- private:
- static void SendMessageToBackend(
- const v8::FunctionCallbackInfo<v8::Value>& args);
-
- static TaskRunner* backend_task_runner_;
-};
-
#endif // V8_TEST_INSPECTOR_PROTOCOL_INSPECTOR_IMPL_H_
diff --git a/deps/v8/test/inspector/inspector-test.cc b/deps/v8/test/inspector/inspector-test.cc
index b2dd6474bf..2e105c54d9 100644
--- a/deps/v8/test/inspector/inspector-test.cc
+++ b/deps/v8/test/inspector/inspector-test.cc
@@ -46,125 +46,256 @@ v8::internal::Vector<uint16_t> ToVector(v8::Local<v8::String> str) {
return buffer;
}
-class UtilsExtension : public v8::Extension {
+v8::Local<v8::String> ToV8String(v8::Isolate* isolate, const char* str) {
+ return v8::String::NewFromUtf8(isolate, str, v8::NewStringType::kNormal)
+ .ToLocalChecked();
+}
+
+v8::internal::Vector<uint16_t> ToVector(
+ const v8_inspector::StringView& string) {
+ v8::internal::Vector<uint16_t> buffer =
+ v8::internal::Vector<uint16_t>::New(static_cast<int>(string.length()));
+ for (size_t i = 0; i < string.length(); i++) {
+ if (string.is8Bit())
+ buffer[i] = string.characters8()[i];
+ else
+ buffer[i] = string.characters16()[i];
+ }
+ return buffer;
+}
+
+class CreateContextGroupTask : public TaskRunner::Task {
public:
- UtilsExtension()
- : v8::Extension("v8_inspector/utils",
- "native function print();"
- "native function quit();"
- "native function setlocale();"
- "native function read();"
- "native function load();"
- "native function compileAndRunWithOrigin();"
- "native function setCurrentTimeMSForTest();"
- "native function setMemoryInfoForTest();"
- "native function schedulePauseOnNextStatement();"
- "native function cancelPauseOnNextStatement();"
- "native function reconnect();"
- "native function disconnect();"
- "native function createContextGroup();") {}
- virtual v8::Local<v8::FunctionTemplate> GetNativeFunctionTemplate(
- v8::Isolate* isolate, v8::Local<v8::String> name) {
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
- if (name->Equals(context, v8::String::NewFromUtf8(
- isolate, "print", v8::NewStringType::kNormal)
- .ToLocalChecked())
- .FromJust()) {
- return v8::FunctionTemplate::New(isolate, UtilsExtension::Print);
- } else if (name->Equals(context,
- v8::String::NewFromUtf8(isolate, "quit",
- v8::NewStringType::kNormal)
- .ToLocalChecked())
- .FromJust()) {
- return v8::FunctionTemplate::New(isolate, UtilsExtension::Quit);
- } else if (name->Equals(context,
- v8::String::NewFromUtf8(isolate, "setlocale",
- v8::NewStringType::kNormal)
- .ToLocalChecked())
- .FromJust()) {
- return v8::FunctionTemplate::New(isolate, UtilsExtension::SetLocale);
- } else if (name->Equals(context,
- v8::String::NewFromUtf8(isolate, "read",
- v8::NewStringType::kNormal)
- .ToLocalChecked())
- .FromJust()) {
- return v8::FunctionTemplate::New(isolate, UtilsExtension::Read);
- } else if (name->Equals(context,
- v8::String::NewFromUtf8(isolate, "load",
- v8::NewStringType::kNormal)
- .ToLocalChecked())
- .FromJust()) {
- return v8::FunctionTemplate::New(isolate, UtilsExtension::Load);
- } else if (name->Equals(context, v8::String::NewFromUtf8(
- isolate, "compileAndRunWithOrigin",
- v8::NewStringType::kNormal)
- .ToLocalChecked())
- .FromJust()) {
- return v8::FunctionTemplate::New(isolate,
- UtilsExtension::CompileAndRunWithOrigin);
- } else if (name->Equals(context, v8::String::NewFromUtf8(
- isolate, "setCurrentTimeMSForTest",
- v8::NewStringType::kNormal)
- .ToLocalChecked())
- .FromJust()) {
- return v8::FunctionTemplate::New(isolate,
- UtilsExtension::SetCurrentTimeMSForTest);
- } else if (name->Equals(context, v8::String::NewFromUtf8(
- isolate, "setMemoryInfoForTest",
- v8::NewStringType::kNormal)
- .ToLocalChecked())
- .FromJust()) {
- return v8::FunctionTemplate::New(isolate,
- UtilsExtension::SetMemoryInfoForTest);
- } else if (name->Equals(context,
- v8::String::NewFromUtf8(
- isolate, "schedulePauseOnNextStatement",
- v8::NewStringType::kNormal)
- .ToLocalChecked())
- .FromJust()) {
- return v8::FunctionTemplate::New(
- isolate, UtilsExtension::SchedulePauseOnNextStatement);
- } else if (name->Equals(context, v8::String::NewFromUtf8(
- isolate, "cancelPauseOnNextStatement",
- v8::NewStringType::kNormal)
- .ToLocalChecked())
- .FromJust()) {
- return v8::FunctionTemplate::New(
- isolate, UtilsExtension::CancelPauseOnNextStatement);
- } else if (name->Equals(context,
- v8::String::NewFromUtf8(isolate, "reconnect",
- v8::NewStringType::kNormal)
- .ToLocalChecked())
- .FromJust()) {
- return v8::FunctionTemplate::New(isolate, UtilsExtension::Reconnect);
- } else if (name->Equals(context,
- v8::String::NewFromUtf8(isolate, "disconnect",
- v8::NewStringType::kNormal)
- .ToLocalChecked())
- .FromJust()) {
- return v8::FunctionTemplate::New(isolate, UtilsExtension::Disconnect);
- } else if (name->Equals(context, v8::String::NewFromUtf8(
- isolate, "createContextGroup",
- v8::NewStringType::kNormal)
- .ToLocalChecked())
- .FromJust()) {
- return v8::FunctionTemplate::New(isolate,
- UtilsExtension::CreateContextGroup);
- }
- return v8::Local<v8::FunctionTemplate>();
+ CreateContextGroupTask(v8::base::Semaphore* ready_semaphore,
+ int* context_group_id)
+ : ready_semaphore_(ready_semaphore),
+ context_group_id_(context_group_id) {}
+ virtual ~CreateContextGroupTask() = default;
+ bool is_inspector_task() final { return true; }
+
+ private:
+ void Run() override {
+ *context_group_id_ = data()->CreateContextGroup();
+ if (ready_semaphore_) ready_semaphore_->Signal();
}
- static void set_backend_task_runner(TaskRunner* runner) {
- backend_runner_ = runner;
+ v8::base::Semaphore* ready_semaphore_;
+ int* context_group_id_;
+};
+
+class ConnectSessionTask : public TaskRunner::Task {
+ public:
+ ConnectSessionTask(v8::base::Semaphore* ready_semaphore, int context_group_id,
+ const v8::internal::Vector<uint16_t>& state,
+ int* session_id)
+ : ready_semaphore_(ready_semaphore),
+ context_group_id_(context_group_id),
+ state_(state),
+ session_id_(session_id) {}
+ virtual ~ConnectSessionTask() = default;
+ bool is_inspector_task() final { return true; }
+
+ private:
+ void Run() override {
+ v8_inspector::StringView state(state_.start(), state_.length());
+ *session_id_ =
+ data()->inspector()->ConnectSession(context_group_id_, state);
+ if (ready_semaphore_) ready_semaphore_->Signal();
+ }
+
+ v8::base::Semaphore* ready_semaphore_;
+ int context_group_id_;
+ const v8::internal::Vector<uint16_t>& state_;
+ int* session_id_;
+};
+
+class DisconnectSessionTask : public TaskRunner::Task {
+ public:
+ DisconnectSessionTask(v8::base::Semaphore* ready_semaphore, int session_id,
+ v8::internal::Vector<uint16_t>* state)
+ : ready_semaphore_(ready_semaphore),
+ session_id_(session_id),
+ state_(state) {}
+ virtual ~DisconnectSessionTask() = default;
+ bool is_inspector_task() final { return true; }
+
+ private:
+ void Run() override {
+ std::unique_ptr<v8_inspector::StringBuffer> state =
+ data()->inspector()->DisconnectSession(session_id_);
+ *state_ = ToVector(state->string());
+ if (ready_semaphore_) ready_semaphore_->Signal();
+ }
+
+ v8::base::Semaphore* ready_semaphore_;
+ int session_id_;
+ v8::internal::Vector<uint16_t>* state_;
+};
+
+class SendMessageToBackendTask : public TaskRunner::Task {
+ public:
+ explicit SendMessageToBackendTask(
+ int session_id, const v8::internal::Vector<uint16_t>& message)
+ : session_id_(session_id), message_(message) {}
+ bool is_inspector_task() final { return true; }
+
+ private:
+ void Run() override {
+ v8_inspector::StringView message_view(message_.start(), message_.length());
+ data()->inspector()->SendMessage(session_id_, message_view);
+ }
+
+ int session_id_;
+ v8::internal::Vector<uint16_t> message_;
+};
+
+class SchedulePauseOnNextStatementTask : public TaskRunner::Task {
+ public:
+ SchedulePauseOnNextStatementTask(
+ v8::base::Semaphore* ready_semaphore, int context_group_id,
+ const v8::internal::Vector<uint16_t>& reason,
+ const v8::internal::Vector<uint16_t>& details)
+ : ready_semaphore_(ready_semaphore),
+ context_group_id_(context_group_id),
+ reason_(reason),
+ details_(details) {}
+ virtual ~SchedulePauseOnNextStatementTask() = default;
+ bool is_inspector_task() final { return true; }
+
+ private:
+ void Run() override {
+ v8_inspector::StringView reason(reason_.start(), reason_.length());
+ v8_inspector::StringView details(details_.start(), details_.length());
+ data()->inspector()->SchedulePauseOnNextStatement(context_group_id_, reason,
+ details);
+ if (ready_semaphore_) ready_semaphore_->Signal();
}
- static void set_inspector_client(InspectorClientImpl* client) {
- inspector_client_ = client;
+ v8::base::Semaphore* ready_semaphore_;
+ int context_group_id_;
+ const v8::internal::Vector<uint16_t>& reason_;
+ const v8::internal::Vector<uint16_t>& details_;
+};
+
+class CancelPauseOnNextStatementTask : public TaskRunner::Task {
+ public:
+ CancelPauseOnNextStatementTask(v8::base::Semaphore* ready_semaphore,
+ int context_group_id)
+ : ready_semaphore_(ready_semaphore),
+ context_group_id_(context_group_id) {}
+ virtual ~CancelPauseOnNextStatementTask() = default;
+ bool is_inspector_task() final { return true; }
+
+ private:
+ void Run() override {
+ data()->inspector()->CancelPauseOnNextStatement(context_group_id_);
+ if (ready_semaphore_) ready_semaphore_->Signal();
+ }
+
+ v8::base::Semaphore* ready_semaphore_;
+ int context_group_id_;
+};
+
+class SendMessageToFrontendTask : public TaskRunner::Task {
+ public:
+ SendMessageToFrontendTask(int context_group_id, int session_id,
+ const v8::internal::Vector<uint16_t>& message)
+ : context_group_id_(context_group_id),
+ session_id_(session_id),
+ message_(message) {}
+ virtual ~SendMessageToFrontendTask() {}
+
+ bool is_inspector_task() final { return false; }
+
+ static void Register(int session_id, v8::Isolate* isolate,
+ v8::Local<v8::Function> dispatcher) {
+ dispatchers_[session_id].Reset(isolate, dispatcher);
+ }
+
+ static void Unregister(int session_id) { dispatchers_.erase(session_id); }
+
+ private:
+ void Run() override {
+ v8::MicrotasksScope microtasks_scope(isolate(),
+ v8::MicrotasksScope::kRunMicrotasks);
+ v8::HandleScope handle_scope(isolate());
+ v8::Local<v8::Context> context = data()->GetContext(context_group_id_);
+ v8::Context::Scope context_scope(context);
+
+ if (dispatchers_.find(session_id_) == dispatchers_.end()) return;
+ v8::Local<v8::Function> function = dispatchers_[session_id_].Get(isolate());
+ v8::Local<v8::Value> message =
+ v8::String::NewFromTwoByte(isolate(), message_.start(),
+ v8::NewStringType::kNormal,
+ static_cast<int>(message_.size()))
+ .ToLocalChecked();
+ v8::MaybeLocal<v8::Value> result;
+ result = function->Call(context, context->Global(), 1, &message);
+ }
+
+ static std::map<int, v8::Global<v8::Function>> dispatchers_;
+ int context_group_id_;
+ int session_id_;
+ v8::internal::Vector<uint16_t> message_;
+};
+
+std::map<int, v8::Global<v8::Function>> SendMessageToFrontendTask::dispatchers_;
+
+class UtilsExtension : public IsolateData::SetupGlobalTask {
+ public:
+ ~UtilsExtension() override = default;
+ void Run(v8::Isolate* isolate,
+ v8::Local<v8::ObjectTemplate> global) override {
+ v8::Local<v8::ObjectTemplate> utils = v8::ObjectTemplate::New(isolate);
+ utils->Set(ToV8String(isolate, "print"),
+ v8::FunctionTemplate::New(isolate, &UtilsExtension::Print));
+ utils->Set(ToV8String(isolate, "quit"),
+ v8::FunctionTemplate::New(isolate, &UtilsExtension::Quit));
+ utils->Set(ToV8String(isolate, "setlocale"),
+ v8::FunctionTemplate::New(isolate, &UtilsExtension::Setlocale));
+ utils->Set(ToV8String(isolate, "read"),
+ v8::FunctionTemplate::New(isolate, &UtilsExtension::Read));
+ utils->Set(ToV8String(isolate, "load"),
+ v8::FunctionTemplate::New(isolate, &UtilsExtension::Load));
+ utils->Set(ToV8String(isolate, "compileAndRunWithOrigin"),
+ v8::FunctionTemplate::New(
+ isolate, &UtilsExtension::CompileAndRunWithOrigin));
+ utils->Set(ToV8String(isolate, "setCurrentTimeMSForTest"),
+ v8::FunctionTemplate::New(
+ isolate, &UtilsExtension::SetCurrentTimeMSForTest));
+ utils->Set(ToV8String(isolate, "setMemoryInfoForTest"),
+ v8::FunctionTemplate::New(
+ isolate, &UtilsExtension::SetMemoryInfoForTest));
+ utils->Set(ToV8String(isolate, "schedulePauseOnNextStatement"),
+ v8::FunctionTemplate::New(
+ isolate, &UtilsExtension::SchedulePauseOnNextStatement));
+ utils->Set(ToV8String(isolate, "cancelPauseOnNextStatement"),
+ v8::FunctionTemplate::New(
+ isolate, &UtilsExtension::CancelPauseOnNextStatement));
+ utils->Set(ToV8String(isolate, "setLogConsoleApiMessageCalls"),
+ v8::FunctionTemplate::New(
+ isolate, &UtilsExtension::SetLogConsoleApiMessageCalls));
+ utils->Set(ToV8String(isolate, "createContextGroup"),
+ v8::FunctionTemplate::New(isolate,
+ &UtilsExtension::CreateContextGroup));
+ utils->Set(
+ ToV8String(isolate, "connectSession"),
+ v8::FunctionTemplate::New(isolate, &UtilsExtension::ConnectSession));
+ utils->Set(
+ ToV8String(isolate, "disconnectSession"),
+ v8::FunctionTemplate::New(isolate, &UtilsExtension::DisconnectSession));
+ utils->Set(ToV8String(isolate, "sendMessageToBackend"),
+ v8::FunctionTemplate::New(
+ isolate, &UtilsExtension::SendMessageToBackend));
+ global->Set(ToV8String(isolate, "utils"), utils);
+ }
+
+ static void set_backend_task_runner(TaskRunner* runner) {
+ backend_runner_ = runner;
}
private:
static TaskRunner* backend_runner_;
- static InspectorClientImpl* inspector_client_;
static void Print(const v8::FunctionCallbackInfo<v8::Value>& args) {
for (int i = 0; i < args.Length(); i++) {
@@ -201,7 +332,7 @@ class UtilsExtension : public v8::Extension {
static void Quit(const v8::FunctionCallbackInfo<v8::Value>& args) { Exit(); }
- static void SetLocale(const v8::FunctionCallbackInfo<v8::Value>& args) {
+ static void Setlocale(const v8::FunctionCallbackInfo<v8::Value>& args) {
if (args.Length() != 1 || !args[0]->IsString()) {
fprintf(stderr, "Internal error: setlocale get one string argument.");
Exit();
@@ -248,27 +379,31 @@ class UtilsExtension : public v8::Extension {
}
v8::internal::Vector<const char> chars;
v8::Isolate* isolate = args.GetIsolate();
+ v8::Local<v8::Context> context = isolate->GetCurrentContext();
+ IsolateData* data = IsolateData::FromContext(context);
+ int context_group_id = data->GetContextGroupId(context);
if (ReadFile(isolate, args[0], &chars)) {
- ExecuteStringTask task(chars);
- v8::Global<v8::Context> context(isolate, isolate->GetCurrentContext());
- task.Run(isolate, context);
+ ExecuteStringTask(chars, context_group_id).RunOnIsolate(data);
}
}
static void CompileAndRunWithOrigin(
const v8::FunctionCallbackInfo<v8::Value>& args) {
- if (args.Length() != 5 || !args[0]->IsString() || !args[1]->IsString() ||
- !args[2]->IsInt32() || !args[3]->IsInt32() || !args[4]->IsBoolean()) {
+ if (args.Length() != 6 || !args[0]->IsInt32() || !args[1]->IsString() ||
+ !args[2]->IsString() || !args[3]->IsInt32() || !args[4]->IsInt32() ||
+ !args[5]->IsBoolean()) {
fprintf(stderr,
- "Internal error: compileAndRunWithOrigin(source, name, line, "
+ "Internal error: compileAndRunWithOrigin(context_group_id, "
+ "source, name, line, "
"column, is_module).");
Exit();
}
backend_runner_->Append(new ExecuteStringTask(
- ToVector(args[0].As<v8::String>()), args[1].As<v8::String>(),
- args[2].As<v8::Int32>(), args[3].As<v8::Int32>(),
- args[4].As<v8::Boolean>(), nullptr, nullptr));
+ nullptr, args[0].As<v8::Int32>()->Value(), nullptr,
+ ToVector(args[1].As<v8::String>()), args[2].As<v8::String>(),
+ args[3].As<v8::Int32>(), args[4].As<v8::Int32>(),
+ args[5].As<v8::Boolean>()));
}
static void SetCurrentTimeMSForTest(
@@ -277,7 +412,7 @@ class UtilsExtension : public v8::Extension {
fprintf(stderr, "Internal error: setCurrentTimeMSForTest(time).");
Exit();
}
- inspector_client_->setCurrentTimeMSForTest(
+ backend_runner_->data()->inspector()->SetCurrentTimeMSForTest(
args[0].As<v8::Number>()->Value());
}
@@ -287,112 +422,153 @@ class UtilsExtension : public v8::Extension {
fprintf(stderr, "Internal error: setMemoryInfoForTest(value).");
Exit();
}
- inspector_client_->setMemoryInfoForTest(args[0]);
+ backend_runner_->data()->inspector()->SetMemoryInfoForTest(args[0]);
}
static void SchedulePauseOnNextStatement(
const v8::FunctionCallbackInfo<v8::Value>& args) {
- if (args.Length() != 2 || !args[0]->IsString() || !args[1]->IsString()) {
- fprintf(
- stderr,
- "Internal error: schedulePauseOnNextStatement('reason', 'details').");
+ if (args.Length() != 3 || !args[0]->IsInt32() || !args[1]->IsString() ||
+ !args[2]->IsString()) {
+ fprintf(stderr,
+ "Internal error: schedulePauseOnNextStatement(context_group_id, "
+ "'reason', 'details').");
Exit();
}
- v8::internal::Vector<uint16_t> reason = ToVector(args[0].As<v8::String>());
- v8_inspector::StringView reason_view(reason.start(), reason.length());
- v8::internal::Vector<uint16_t> details = ToVector(args[1].As<v8::String>());
- v8_inspector::StringView details_view(details.start(), details.length());
- inspector_client_->session()->schedulePauseOnNextStatement(reason_view,
- details_view);
+ v8::internal::Vector<uint16_t> reason = ToVector(args[1].As<v8::String>());
+ v8::internal::Vector<uint16_t> details = ToVector(args[2].As<v8::String>());
+ v8::base::Semaphore ready_semaphore(0);
+ backend_runner_->Append(new SchedulePauseOnNextStatementTask(
+ &ready_semaphore, args[0].As<v8::Int32>()->Value(), reason, details));
+ ready_semaphore.Wait();
}
static void CancelPauseOnNextStatement(
const v8::FunctionCallbackInfo<v8::Value>& args) {
- if (args.Length() != 0) {
- fprintf(stderr, "Internal error: cancelPauseOnNextStatement().");
+ if (args.Length() != 1 || !args[0]->IsInt32()) {
+ fprintf(stderr,
+ "Internal error: cancelPauseOnNextStatement(context_group_id).");
+ Exit();
+ }
+ v8::base::Semaphore ready_semaphore(0);
+ backend_runner_->Append(new CancelPauseOnNextStatementTask(
+ &ready_semaphore, args[0].As<v8::Int32>()->Value()));
+ ready_semaphore.Wait();
+ }
+
+ static void SetLogConsoleApiMessageCalls(
+ const v8::FunctionCallbackInfo<v8::Value>& args) {
+ if (args.Length() != 1 || !args[0]->IsBoolean()) {
+ fprintf(stderr, "Internal error: setLogConsoleApiMessageCalls(bool).");
Exit();
}
- inspector_client_->session()->cancelPauseOnNextStatement();
+ backend_runner_->data()->inspector()->SetLogConsoleApiMessageCalls(
+ args[0].As<v8::Boolean>()->Value());
}
- static void Reconnect(const v8::FunctionCallbackInfo<v8::Value>& args) {
+ static void CreateContextGroup(
+ const v8::FunctionCallbackInfo<v8::Value>& args) {
if (args.Length() != 0) {
- fprintf(stderr, "Internal error: reconnect().");
+ fprintf(stderr, "Internal error: createContextGroup().");
Exit();
}
v8::base::Semaphore ready_semaphore(0);
- inspector_client_->scheduleReconnect(&ready_semaphore);
+ int context_group_id = 0;
+ backend_runner_->Append(
+ new CreateContextGroupTask(&ready_semaphore, &context_group_id));
ready_semaphore.Wait();
+ args.GetReturnValue().Set(
+ v8::Int32::New(args.GetIsolate(), context_group_id));
}
- static void Disconnect(const v8::FunctionCallbackInfo<v8::Value>& args) {
- if (args.Length() != 0) {
- fprintf(stderr, "Internal error: disconnect().");
+ static void ConnectSession(const v8::FunctionCallbackInfo<v8::Value>& args) {
+ if (args.Length() != 3 || !args[0]->IsInt32() || !args[1]->IsString() ||
+ !args[2]->IsFunction()) {
+ fprintf(stderr,
+ "Internal error: connectionSession(context_group_id, state, "
+ "dispatch).");
Exit();
}
+ v8::internal::Vector<uint16_t> state = ToVector(args[1].As<v8::String>());
v8::base::Semaphore ready_semaphore(0);
- inspector_client_->scheduleDisconnect(&ready_semaphore);
+ int session_id = 0;
+ backend_runner_->Append(new ConnectSessionTask(
+ &ready_semaphore, args[0].As<v8::Int32>()->Value(), state,
+ &session_id));
ready_semaphore.Wait();
+ SendMessageToFrontendTask::Register(session_id, args.GetIsolate(),
+ args[2].As<v8::Function>());
+ args.GetReturnValue().Set(v8::Int32::New(args.GetIsolate(), session_id));
}
- static void CreateContextGroup(
+ static void DisconnectSession(
const v8::FunctionCallbackInfo<v8::Value>& args) {
- if (args.Length() != 0) {
- fprintf(stderr, "Internal error: createContextGroup().");
+ if (args.Length() != 1 || !args[0]->IsInt32()) {
+ fprintf(stderr, "Internal error: disconnectionSession(session_id).");
Exit();
}
- const char* backend_extensions[] = {"v8_inspector/setTimeout",
- "v8_inspector/inspector"};
- v8::ExtensionConfiguration backend_configuration(
- arraysize(backend_extensions), backend_extensions);
+ int session_id = args[0].As<v8::Int32>()->Value();
+ SendMessageToFrontendTask::Unregister(session_id);
v8::base::Semaphore ready_semaphore(0);
- int context_group_id = 0;
- inspector_client_->scheduleCreateContextGroup(
- &backend_configuration, &ready_semaphore, &context_group_id);
+ v8::internal::Vector<uint16_t> state;
+ backend_runner_->Append(
+ new DisconnectSessionTask(&ready_semaphore, session_id, &state));
ready_semaphore.Wait();
args.GetReturnValue().Set(
- v8::Int32::New(args.GetIsolate(), context_group_id));
+ v8::String::NewFromTwoByte(args.GetIsolate(), state.start(),
+ v8::NewStringType::kNormal,
+ static_cast<int>(state.size()))
+ .ToLocalChecked());
+ }
+
+ static void SendMessageToBackend(
+ const v8::FunctionCallbackInfo<v8::Value>& args) {
+ if (args.Length() != 2 || !args[0]->IsInt32() || !args[1]->IsString()) {
+ fprintf(stderr,
+ "Internal error: sendMessageToBackend(session_id, message).");
+ Exit();
+ }
+ backend_runner_->Append(new SendMessageToBackendTask(
+ args[0].As<v8::Int32>()->Value(), ToVector(args[1].As<v8::String>())));
}
};
TaskRunner* UtilsExtension::backend_runner_ = nullptr;
-InspectorClientImpl* UtilsExtension::inspector_client_ = nullptr;
class SetTimeoutTask : public AsyncTask {
public:
- SetTimeoutTask(v8::Isolate* isolate, v8::Local<v8::Function> function,
- const char* task_name, v8_inspector::V8Inspector* inspector)
- : AsyncTask(task_name, inspector), function_(isolate, function) {}
+ SetTimeoutTask(IsolateData* data, int context_group_id, const char* task_name,
+ v8::Local<v8::Function> function)
+ : AsyncTask(data, task_name),
+ function_(data->isolate(), function),
+ context_group_id_(context_group_id) {}
virtual ~SetTimeoutTask() {}
bool is_inspector_task() final { return false; }
- void AsyncRun(v8::Isolate* isolate,
- const v8::Global<v8::Context>& global_context) override {
- v8::MicrotasksScope microtasks_scope(isolate,
+ private:
+ void AsyncRun() override {
+ v8::MicrotasksScope microtasks_scope(isolate(),
v8::MicrotasksScope::kRunMicrotasks);
- v8::HandleScope handle_scope(isolate);
- v8::Local<v8::Context> context = global_context.Get(isolate);
+ v8::HandleScope handle_scope(isolate());
+ v8::Local<v8::Context> context = data()->GetContext(context_group_id_);
v8::Context::Scope context_scope(context);
- v8::Local<v8::Function> function = function_.Get(isolate);
+ v8::Local<v8::Function> function = function_.Get(isolate());
v8::MaybeLocal<v8::Value> result;
result = function->Call(context, context->Global(), 0, nullptr);
}
- private:
v8::Global<v8::Function> function_;
+ int context_group_id_;
};
-class SetTimeoutExtension : public v8::Extension {
+class SetTimeoutExtension : public IsolateData::SetupGlobalTask {
public:
- SetTimeoutExtension()
- : v8::Extension("v8_inspector/setTimeout",
- "native function setTimeout();") {}
-
- virtual v8::Local<v8::FunctionTemplate> GetNativeFunctionTemplate(
- v8::Isolate* isolate, v8::Local<v8::String> name) {
- return v8::FunctionTemplate::New(isolate, SetTimeoutExtension::SetTimeout);
+ void Run(v8::Isolate* isolate,
+ v8::Local<v8::ObjectTemplate> global) override {
+ global->Set(
+ ToV8String(isolate, "setTimeout"),
+ v8::FunctionTemplate::New(isolate, &SetTimeoutExtension::SetTimeout));
}
private:
@@ -400,26 +576,27 @@ class SetTimeoutExtension : public v8::Extension {
if (args.Length() != 2 || !args[1]->IsNumber() ||
(!args[0]->IsFunction() && !args[0]->IsString()) ||
args[1].As<v8::Number>()->Value() != 0.0) {
- fprintf(stderr,
- "Internal error: only setTimeout(function, 0) is supported.");
+ fprintf(
+ stderr,
+ "Internal error: only setTimeout(function|code, 0) is supported.");
Exit();
}
v8::Isolate* isolate = args.GetIsolate();
v8::Local<v8::Context> context = isolate->GetCurrentContext();
+ IsolateData* data = IsolateData::FromContext(context);
+ int context_group_id = data->GetContextGroupId(context);
std::unique_ptr<TaskRunner::Task> task;
- v8_inspector::V8Inspector* inspector =
- InspectorClientImpl::InspectorFromContext(context);
if (args[0]->IsFunction()) {
- task.reset(new SetTimeoutTask(isolate,
- v8::Local<v8::Function>::Cast(args[0]),
- "setTimeout", inspector));
+ task.reset(new SetTimeoutTask(data, context_group_id, "setTimeout",
+ v8::Local<v8::Function>::Cast(args[0])));
} else {
task.reset(new ExecuteStringTask(
+ data, context_group_id, "setTimeout",
ToVector(args[0].As<v8::String>()), v8::String::Empty(isolate),
v8::Integer::New(isolate, 0), v8::Integer::New(isolate, 0),
- v8::Boolean::New(isolate, false), "setTimeout", inspector));
+ v8::Boolean::New(isolate, false)));
}
- TaskRunner::FromContext(context)->Append(task.release());
+ data->task_runner()->Append(task.release());
}
};
@@ -430,96 +607,55 @@ bool StrictAccessCheck(v8::Local<v8::Context> accessing_context,
return accessing_context.IsEmpty();
}
-class InspectorExtension : public v8::Extension {
+class InspectorExtension : public IsolateData::SetupGlobalTask {
public:
- InspectorExtension()
- : v8::Extension("v8_inspector/inspector",
- "native function attachInspector();"
- "native function detachInspector();"
- "native function setMaxAsyncTaskStacks();"
- "native function breakProgram();"
- "native function createObjectWithStrictCheck();"
- "native function callWithScheduledBreak();"
- "native function allowAccessorFormatting();") {}
-
- virtual v8::Local<v8::FunctionTemplate> GetNativeFunctionTemplate(
- v8::Isolate* isolate, v8::Local<v8::String> name) {
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
- if (name->Equals(context,
- v8::String::NewFromUtf8(isolate, "attachInspector",
- v8::NewStringType::kNormal)
- .ToLocalChecked())
- .FromJust()) {
- return v8::FunctionTemplate::New(isolate, InspectorExtension::Attach);
- } else if (name->Equals(context,
- v8::String::NewFromUtf8(isolate, "detachInspector",
- v8::NewStringType::kNormal)
- .ToLocalChecked())
- .FromJust()) {
- return v8::FunctionTemplate::New(isolate, InspectorExtension::Detach);
- } else if (name->Equals(context, v8::String::NewFromUtf8(
- isolate, "setMaxAsyncTaskStacks",
- v8::NewStringType::kNormal)
- .ToLocalChecked())
- .FromJust()) {
- return v8::FunctionTemplate::New(
- isolate, InspectorExtension::SetMaxAsyncTaskStacks);
- } else if (name->Equals(context,
- v8::String::NewFromUtf8(isolate, "breakProgram",
- v8::NewStringType::kNormal)
- .ToLocalChecked())
- .FromJust()) {
- return v8::FunctionTemplate::New(isolate,
- InspectorExtension::BreakProgram);
- } else if (name->Equals(context, v8::String::NewFromUtf8(
- isolate, "createObjectWithStrictCheck",
- v8::NewStringType::kNormal)
- .ToLocalChecked())
- .FromJust()) {
- return v8::FunctionTemplate::New(
- isolate, InspectorExtension::CreateObjectWithStrictCheck);
- } else if (name->Equals(context, v8::String::NewFromUtf8(
- isolate, "callWithScheduledBreak",
- v8::NewStringType::kNormal)
- .ToLocalChecked())
- .FromJust()) {
- return v8::FunctionTemplate::New(
- isolate, InspectorExtension::CallWithScheduledBreak);
- } else if (name->Equals(context, v8::String::NewFromUtf8(
- isolate, "allowAccessorFormatting",
- v8::NewStringType::kNormal)
- .ToLocalChecked())
- .FromJust()) {
- return v8::FunctionTemplate::New(
- isolate, InspectorExtension::AllowAccessorFormatting);
- }
- return v8::Local<v8::FunctionTemplate>();
+ ~InspectorExtension() override = default;
+ void Run(v8::Isolate* isolate,
+ v8::Local<v8::ObjectTemplate> global) override {
+ v8::Local<v8::ObjectTemplate> inspector = v8::ObjectTemplate::New(isolate);
+ inspector->Set(ToV8String(isolate, "fireContextCreated"),
+ v8::FunctionTemplate::New(
+ isolate, &InspectorExtension::FireContextCreated));
+ inspector->Set(ToV8String(isolate, "fireContextDestroyed"),
+ v8::FunctionTemplate::New(
+ isolate, &InspectorExtension::FireContextDestroyed));
+ inspector->Set(ToV8String(isolate, "setMaxAsyncTaskStacks"),
+ v8::FunctionTemplate::New(
+ isolate, &InspectorExtension::SetMaxAsyncTaskStacks));
+ inspector->Set(
+ ToV8String(isolate, "dumpAsyncTaskStacksStateForTest"),
+ v8::FunctionTemplate::New(
+ isolate, &InspectorExtension::DumpAsyncTaskStacksStateForTest));
+ inspector->Set(
+ ToV8String(isolate, "breakProgram"),
+ v8::FunctionTemplate::New(isolate, &InspectorExtension::BreakProgram));
+ inspector->Set(
+ ToV8String(isolate, "createObjectWithStrictCheck"),
+ v8::FunctionTemplate::New(
+ isolate, &InspectorExtension::CreateObjectWithStrictCheck));
+ inspector->Set(ToV8String(isolate, "callWithScheduledBreak"),
+ v8::FunctionTemplate::New(
+ isolate, &InspectorExtension::CallWithScheduledBreak));
+ inspector->Set(ToV8String(isolate, "allowAccessorFormatting"),
+ v8::FunctionTemplate::New(
+ isolate, &InspectorExtension::AllowAccessorFormatting));
+ global->Set(ToV8String(isolate, "inspector"), inspector);
}
private:
- static void Attach(const v8::FunctionCallbackInfo<v8::Value>& args) {
- v8::Isolate* isolate = args.GetIsolate();
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
- v8_inspector::V8Inspector* inspector =
- InspectorClientImpl::InspectorFromContext(context);
- if (!inspector) {
- fprintf(stderr, "Inspector client not found - cannot attach!");
- Exit();
- }
- inspector->contextCreated(
- v8_inspector::V8ContextInfo(context, 1, v8_inspector::StringView()));
+ static void FireContextCreated(
+ const v8::FunctionCallbackInfo<v8::Value>& args) {
+ v8::Local<v8::Context> context = args.GetIsolate()->GetCurrentContext();
+ IsolateData* data = IsolateData::FromContext(context);
+ data->inspector()->ContextCreated(context,
+ data->GetContextGroupId(context));
}
- static void Detach(const v8::FunctionCallbackInfo<v8::Value>& args) {
- v8::Isolate* isolate = args.GetIsolate();
- v8::Local<v8::Context> context = isolate->GetCurrentContext();
- v8_inspector::V8Inspector* inspector =
- InspectorClientImpl::InspectorFromContext(context);
- if (!inspector) {
- fprintf(stderr, "Inspector client not found - cannot detach!");
- Exit();
- }
- inspector->contextDestroyed(context);
+ static void FireContextDestroyed(
+ const v8::FunctionCallbackInfo<v8::Value>& args) {
+ v8::Local<v8::Context> context = args.GetIsolate()->GetCurrentContext();
+ IsolateData* data = IsolateData::FromContext(context);
+ data->inspector()->ContextDestroyed(context);
}
static void SetMaxAsyncTaskStacks(
@@ -528,12 +664,23 @@ class InspectorExtension : public v8::Extension {
fprintf(stderr, "Internal error: setMaxAsyncTaskStacks(max).");
Exit();
}
- v8_inspector::V8Inspector* inspector =
- InspectorClientImpl::InspectorFromContext(
- args.GetIsolate()->GetCurrentContext());
- CHECK(inspector);
v8_inspector::SetMaxAsyncTaskStacksForTest(
- inspector, args[0].As<v8::Int32>()->Value());
+ IsolateData::FromContext(args.GetIsolate()->GetCurrentContext())
+ ->inspector()
+ ->inspector(),
+ args[0].As<v8::Int32>()->Value());
+ }
+
+ static void DumpAsyncTaskStacksStateForTest(
+ const v8::FunctionCallbackInfo<v8::Value>& args) {
+ if (args.Length() != 0) {
+ fprintf(stderr, "Internal error: dumpAsyncTaskStacksStateForTest().");
+ Exit();
+ }
+ v8_inspector::DumpAsyncTaskStacksStateForTest(
+ IsolateData::FromContext(args.GetIsolate()->GetCurrentContext())
+ ->inspector()
+ ->inspector());
}
static void BreakProgram(const v8::FunctionCallbackInfo<v8::Value>& args) {
@@ -541,16 +688,14 @@ class InspectorExtension : public v8::Extension {
fprintf(stderr, "Internal error: breakProgram('reason', 'details').");
Exit();
}
- v8_inspector::V8InspectorSession* session =
- InspectorClientImpl::SessionFromContext(
- args.GetIsolate()->GetCurrentContext());
- CHECK(session);
-
+ v8::Local<v8::Context> context = args.GetIsolate()->GetCurrentContext();
+ IsolateData* data = IsolateData::FromContext(context);
v8::internal::Vector<uint16_t> reason = ToVector(args[0].As<v8::String>());
v8_inspector::StringView reason_view(reason.start(), reason.length());
v8::internal::Vector<uint16_t> details = ToVector(args[1].As<v8::String>());
v8_inspector::StringView details_view(details.start(), details.length());
- session->breakProgram(reason_view, details_view);
+ data->inspector()->BreakProgram(data->GetContextGroupId(context),
+ reason_view, details_view);
}
static void CreateObjectWithStrictCheck(
@@ -571,24 +716,23 @@ class InspectorExtension : public v8::Extension {
const v8::FunctionCallbackInfo<v8::Value>& args) {
if (args.Length() != 3 || !args[0]->IsFunction() || !args[1]->IsString() ||
!args[2]->IsString()) {
- fprintf(stderr, "Internal error: breakProgram('reason', 'details').");
+ fprintf(stderr,
+ "Internal error: callWithScheduledBreak('reason', 'details').");
Exit();
}
- v8_inspector::V8InspectorSession* session =
- InspectorClientImpl::SessionFromContext(
- args.GetIsolate()->GetCurrentContext());
- CHECK(session);
-
v8::internal::Vector<uint16_t> reason = ToVector(args[1].As<v8::String>());
v8_inspector::StringView reason_view(reason.start(), reason.length());
v8::internal::Vector<uint16_t> details = ToVector(args[2].As<v8::String>());
v8_inspector::StringView details_view(details.start(), details.length());
- session->schedulePauseOnNextStatement(reason_view, details_view);
v8::Local<v8::Context> context = args.GetIsolate()->GetCurrentContext();
+ IsolateData* data = IsolateData::FromContext(context);
+ int context_group_id = data->GetContextGroupId(context);
+ data->inspector()->SchedulePauseOnNextStatement(context_group_id,
+ reason_view, details_view);
v8::MaybeLocal<v8::Value> result;
result = args[0].As<v8::Function>()->Call(context, context->Global(), 0,
nullptr);
- session->cancelPauseOnNextStatement();
+ data->inspector()->CancelPauseOnNextStatement(context_group_id);
}
static void AllowAccessorFormatting(
@@ -610,50 +754,22 @@ class InspectorExtension : public v8::Extension {
}
};
-v8::Local<v8::String> ToString(v8::Isolate* isolate,
- const v8_inspector::StringView& string) {
- if (string.is8Bit())
- return v8::String::NewFromOneByte(isolate, string.characters8(),
- v8::NewStringType::kNormal,
- static_cast<int>(string.length()))
- .ToLocalChecked();
- else
- return v8::String::NewFromTwoByte(isolate, string.characters16(),
- v8::NewStringType::kNormal,
- static_cast<int>(string.length()))
- .ToLocalChecked();
-}
-
class FrontendChannelImpl : public InspectorClientImpl::FrontendChannel {
public:
- explicit FrontendChannelImpl(TaskRunner* frontend_task_runner)
- : frontend_task_runner_(frontend_task_runner) {}
+ FrontendChannelImpl(TaskRunner* frontend_task_runner, int context_group_id)
+ : frontend_task_runner_(frontend_task_runner),
+ context_group_id_(context_group_id) {}
virtual ~FrontendChannelImpl() {}
- void SendMessageToFrontend(const v8_inspector::StringView& message) final {
- v8::Isolate* isolate = v8::Isolate::GetCurrent();
- v8::HandleScope scope(v8::Isolate::GetCurrent());
-
- v8::Local<v8::String> prefix =
- v8::String::NewFromUtf8(isolate, "InspectorTest._dispatchMessage(",
- v8::NewStringType::kInternalized)
- .ToLocalChecked();
- v8::Local<v8::String> message_string = ToString(isolate, message);
- v8::Local<v8::String> suffix =
- v8::String::NewFromUtf8(isolate, ")", v8::NewStringType::kInternalized)
- .ToLocalChecked();
-
- v8::Local<v8::String> result = v8::String::Concat(prefix, message_string);
- result = v8::String::Concat(result, suffix);
-
- frontend_task_runner_->Append(new ExecuteStringTask(
- ToVector(result), v8::String::Empty(isolate),
- v8::Integer::New(isolate, 0), v8::Integer::New(isolate, 0),
- v8::Boolean::New(isolate, false), nullptr, nullptr));
+ void SendMessageToFrontend(int session_id,
+ const v8_inspector::StringView& message) final {
+ frontend_task_runner_->Append(new SendMessageToFrontendTask(
+ context_group_id_, session_id, ToVector(message)));
}
private:
TaskRunner* frontend_task_runner_;
+ int context_group_id_;
};
} // namespace
@@ -666,45 +782,46 @@ int main(int argc, char* argv[]) {
v8::V8::InitializeExternalStartupData(argv[0]);
v8::V8::Initialize();
- SetTimeoutExtension set_timeout_extension;
- v8::RegisterExtension(&set_timeout_extension);
- InspectorExtension inspector_extension;
- v8::RegisterExtension(&inspector_extension);
- UtilsExtension utils_extension;
- v8::RegisterExtension(&utils_extension);
- SendMessageToBackendExtension send_message_to_backend_extension;
- v8::RegisterExtension(&send_message_to_backend_extension);
-
v8::base::Semaphore ready_semaphore(0);
- const char* backend_extensions[] = {"v8_inspector/setTimeout",
- "v8_inspector/inspector"};
- v8::ExtensionConfiguration backend_configuration(
- arraysize(backend_extensions), backend_extensions);
- TaskRunner backend_runner(&backend_configuration, false, &ready_semaphore);
+ v8::StartupData startup_data = {nullptr, 0};
+ for (int i = 1; i < argc; ++i) {
+ if (strcmp(argv[i], "--embed") == 0) {
+ argv[i++] = nullptr;
+ printf("Embedding script '%s'\n", argv[i]);
+ startup_data = v8::V8::CreateSnapshotDataBlob(argv[i]);
+ argv[i] = nullptr;
+ }
+ }
+
+ IsolateData::SetupGlobalTasks frontend_extensions;
+ frontend_extensions.emplace_back(new UtilsExtension());
+ TaskRunner frontend_runner(std::move(frontend_extensions), true,
+ &ready_semaphore, nullptr, nullptr);
ready_semaphore.Wait();
- SendMessageToBackendExtension::set_backend_task_runner(&backend_runner);
- UtilsExtension::set_backend_task_runner(&backend_runner);
- const char* frontend_extensions[] = {"v8_inspector/utils",
- "v8_inspector/frontend"};
- v8::ExtensionConfiguration frontend_configuration(
- arraysize(frontend_extensions), frontend_extensions);
- TaskRunner frontend_runner(&frontend_configuration, true, &ready_semaphore);
+ int frontend_context_group_id = 0;
+ frontend_runner.Append(
+ new CreateContextGroupTask(&ready_semaphore, &frontend_context_group_id));
ready_semaphore.Wait();
- FrontendChannelImpl frontend_channel(&frontend_runner);
- InspectorClientImpl inspector_client(&backend_runner, &frontend_channel,
- &ready_semaphore);
+ IsolateData::SetupGlobalTasks backend_extensions;
+ backend_extensions.emplace_back(new SetTimeoutExtension());
+ backend_extensions.emplace_back(new InspectorExtension());
+ FrontendChannelImpl frontend_channel(&frontend_runner,
+ frontend_context_group_id);
+ TaskRunner backend_runner(
+ std::move(backend_extensions), false, &ready_semaphore,
+ startup_data.data ? &startup_data : nullptr, &frontend_channel);
ready_semaphore.Wait();
- UtilsExtension::set_inspector_client(&inspector_client);
+ UtilsExtension::set_backend_task_runner(&backend_runner);
task_runners.push_back(&frontend_runner);
task_runners.push_back(&backend_runner);
for (int i = 1; i < argc; ++i) {
// Ignore unknown flags.
- if (argv[i][0] == '-') continue;
+ if (argv[i] == nullptr || argv[i][0] == '-') continue;
bool exists = false;
v8::internal::Vector<const char> chars =
@@ -714,10 +831,13 @@ int main(int argc, char* argv[]) {
argv[i]);
Exit();
}
- frontend_runner.Append(new ExecuteStringTask(chars));
+ frontend_runner.Append(
+ new ExecuteStringTask(chars, frontend_context_group_id));
}
frontend_runner.Join();
backend_runner.Join();
+
+ delete startup_data.data;
return 0;
}
diff --git a/deps/v8/test/inspector/inspector.gyp b/deps/v8/test/inspector/inspector.gyp
index 8c96ae5d75..26f44d4812 100644
--- a/deps/v8/test/inspector/inspector.gyp
+++ b/deps/v8/test/inspector/inspector.gyp
@@ -23,9 +23,19 @@
'inspector-impl.cc',
'inspector-impl.h',
'inspector-test.cc',
+ 'isolate-data.cc',
+ 'isolate-data.h',
'task-runner.cc',
'task-runner.h',
],
+ 'conditions': [
+ ['v8_enable_i18n_support==1', {
+ 'dependencies': [
+ '<(icu_gyp_path):icui18n',
+ '<(icu_gyp_path):icuuc',
+ ],
+ }],
+ ],
},
],
'conditions': [
diff --git a/deps/v8/test/inspector/inspector.status b/deps/v8/test/inspector/inspector.status
index cec99e0779..5eb0a30ec6 100644
--- a/deps/v8/test/inspector/inspector.status
+++ b/deps/v8/test/inspector/inspector.status
@@ -21,6 +21,12 @@
}], # variant != default
##############################################################################
+['variant == noturbofan', {
+ # Crashes due to missing source position in ToBooleanICStub?
+ 'runtime/command-line-api': [SKIP],
+}], # variant == noturbofan
+
+##############################################################################
['variant == wasm_traps', {
'*': [SKIP],
}], # variant == wasm_traps
diff --git a/deps/v8/test/inspector/isolate-data.cc b/deps/v8/test/inspector/isolate-data.cc
new file mode 100644
index 0000000000..927bd31ef4
--- /dev/null
+++ b/deps/v8/test/inspector/isolate-data.cc
@@ -0,0 +1,95 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "test/inspector/isolate-data.h"
+
+#include "test/inspector/inspector-impl.h"
+#include "test/inspector/task-runner.h"
+
+namespace {
+
+const int kIsolateDataIndex = 2;
+const int kContextGroupIdIndex = 3;
+
+v8::internal::Vector<uint16_t> ToVector(v8::Local<v8::String> str) {
+ v8::internal::Vector<uint16_t> buffer =
+ v8::internal::Vector<uint16_t>::New(str->Length());
+ str->Write(buffer.start(), 0, str->Length());
+ return buffer;
+}
+
+} // namespace
+
+IsolateData::IsolateData(TaskRunner* task_runner,
+ IsolateData::SetupGlobalTasks setup_global_tasks,
+ v8::StartupData* startup_data,
+ InspectorClientImpl::FrontendChannel* channel)
+ : task_runner_(task_runner),
+ setup_global_tasks_(std::move(setup_global_tasks)) {
+ v8::Isolate::CreateParams params;
+ params.array_buffer_allocator =
+ v8::ArrayBuffer::Allocator::NewDefaultAllocator();
+ params.snapshot_blob = startup_data;
+ isolate_ = v8::Isolate::New(params);
+ isolate_->SetMicrotasksPolicy(v8::MicrotasksPolicy::kScoped);
+ if (channel)
+ inspector_.reset(new InspectorClientImpl(isolate_, task_runner, channel));
+}
+
+IsolateData* IsolateData::FromContext(v8::Local<v8::Context> context) {
+ return static_cast<IsolateData*>(
+ context->GetAlignedPointerFromEmbedderData(kIsolateDataIndex));
+}
+
+int IsolateData::CreateContextGroup() {
+ v8::HandleScope handle_scope(isolate_);
+ v8::Local<v8::ObjectTemplate> global_template =
+ v8::ObjectTemplate::New(isolate_);
+ for (auto it = setup_global_tasks_.begin(); it != setup_global_tasks_.end();
+ ++it) {
+ (*it)->Run(isolate_, global_template);
+ }
+ v8::Local<v8::Context> context =
+ v8::Context::New(isolate_, nullptr, global_template);
+ context->SetAlignedPointerInEmbedderData(kIsolateDataIndex, this);
+ int context_group_id = ++last_context_group_id_;
+ // Should be 2-byte aligned.
+ context->SetAlignedPointerInEmbedderData(
+ kContextGroupIdIndex, reinterpret_cast<void*>(context_group_id * 2));
+ contexts_[context_group_id].Reset(isolate_, context);
+ if (inspector_) inspector_->ContextCreated(context, context_group_id);
+ return context_group_id;
+}
+
+v8::Local<v8::Context> IsolateData::GetContext(int context_group_id) {
+ return contexts_[context_group_id].Get(isolate_);
+}
+
+int IsolateData::GetContextGroupId(v8::Local<v8::Context> context) {
+ return static_cast<int>(
+ reinterpret_cast<intptr_t>(
+ context->GetAlignedPointerFromEmbedderData(kContextGroupIdIndex)) /
+ 2);
+}
+
+void IsolateData::RegisterModule(v8::Local<v8::Context> context,
+ v8::internal::Vector<uint16_t> name,
+ v8::ScriptCompiler::Source* source) {
+ v8::Local<v8::Module> module;
+ if (!v8::ScriptCompiler::CompileModule(isolate(), source).ToLocal(&module))
+ return;
+ if (!module->Instantiate(context, &IsolateData::ModuleResolveCallback))
+ return;
+ v8::Local<v8::Value> result;
+ if (!module->Evaluate(context).ToLocal(&result)) return;
+ modules_[name] = v8::Global<v8::Module>(isolate_, module);
+}
+
+v8::MaybeLocal<v8::Module> IsolateData::ModuleResolveCallback(
+ v8::Local<v8::Context> context, v8::Local<v8::String> specifier,
+ v8::Local<v8::Module> referrer) {
+ std::string str = *v8::String::Utf8Value(specifier);
+ IsolateData* data = IsolateData::FromContext(context);
+ return data->modules_[ToVector(specifier)].Get(data->isolate_);
+}
diff --git a/deps/v8/test/inspector/isolate-data.h b/deps/v8/test/inspector/isolate-data.h
new file mode 100644
index 0000000000..34f0ae8308
--- /dev/null
+++ b/deps/v8/test/inspector/isolate-data.h
@@ -0,0 +1,67 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_TEST_INSPECTOR_PROTOCOL_ISOLATE_DATA_H_
+#define V8_TEST_INSPECTOR_PROTOCOL_ISOLATE_DATA_H_
+
+#include <map>
+
+#include "include/v8-inspector.h"
+#include "include/v8-platform.h"
+#include "include/v8.h"
+#include "src/vector.h"
+#include "test/inspector/inspector-impl.h"
+
+class TaskRunner;
+
+class IsolateData {
+ public:
+ class SetupGlobalTask {
+ public:
+ virtual ~SetupGlobalTask() = default;
+ virtual void Run(v8::Isolate* isolate,
+ v8::Local<v8::ObjectTemplate> global) = 0;
+ };
+ using SetupGlobalTasks = std::vector<std::unique_ptr<SetupGlobalTask>>;
+
+ IsolateData(TaskRunner* task_runner, SetupGlobalTasks setup_global_tasks,
+ v8::StartupData* startup_data,
+ InspectorClientImpl::FrontendChannel* channel);
+ static IsolateData* FromContext(v8::Local<v8::Context> context);
+
+ v8::Isolate* isolate() const { return isolate_; }
+ InspectorClientImpl* inspector() const { return inspector_.get(); }
+ TaskRunner* task_runner() const { return task_runner_; }
+ int CreateContextGroup();
+ v8::Local<v8::Context> GetContext(int context_group_id);
+ int GetContextGroupId(v8::Local<v8::Context> context);
+ void RegisterModule(v8::Local<v8::Context> context,
+ v8::internal::Vector<uint16_t> name,
+ v8::ScriptCompiler::Source* source);
+
+ private:
+ struct VectorCompare {
+ bool operator()(const v8::internal::Vector<uint16_t>& lhs,
+ const v8::internal::Vector<uint16_t>& rhs) const {
+ for (int i = 0; i < lhs.length() && i < rhs.length(); ++i) {
+ if (lhs[i] != rhs[i]) return lhs[i] < rhs[i];
+ }
+ return false;
+ }
+ };
+ static v8::MaybeLocal<v8::Module> ModuleResolveCallback(
+ v8::Local<v8::Context> context, v8::Local<v8::String> specifier,
+ v8::Local<v8::Module> referrer);
+
+ TaskRunner* task_runner_;
+ SetupGlobalTasks setup_global_tasks_;
+ v8::Isolate* isolate_;
+ std::unique_ptr<InspectorClientImpl> inspector_;
+ int last_context_group_id_ = 0;
+ std::map<int, v8::Global<v8::Context>> contexts_;
+ std::map<v8::internal::Vector<uint16_t>, v8::Global<v8::Module>,
+ VectorCompare>
+ modules_;
+};
+#endif // V8_TEST_INSPECTOR_PROTOCOL_ISOLATE_DATA_H_
diff --git a/deps/v8/test/inspector/json-parse-expected.txt b/deps/v8/test/inspector/json-parse-expected.txt
index b11d6e2ee0..80d80ab12c 100644
--- a/deps/v8/test/inspector/json-parse-expected.txt
+++ b/deps/v8/test/inspector/json-parse-expected.txt
@@ -1,3 +1,4 @@
+Tests that json parser on backend correctly works with unicode
{
id : 1
result : {
diff --git a/deps/v8/test/inspector/json-parse.js b/deps/v8/test/inspector/json-parse.js
index 2d88fea0f0..92ec84bc5e 100644
--- a/deps/v8/test/inspector/json-parse.js
+++ b/deps/v8/test/inspector/json-parse.js
@@ -2,9 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-const id = ++InspectorTest._requestId;
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests that json parser on backend correctly works with unicode');
+
+const id = 100500;
var command = { "method": "Runtime.evaluate", "params": { expression: "\"!!!\"" }, "id": id };
-InspectorTest.sendRawCommand(id, JSON.stringify(command).replace("!!!", "\\u041F\\u0440\\u0438\\u0432\\u0435\\u0442 \\u043C\\u0438\\u0440"), step2);
+session.sendRawCommand(id, JSON.stringify(command).replace("!!!", "\\u041F\\u0440\\u0438\\u0432\\u0435\\u0442 \\u043C\\u0438\\u0440"), step2);
function step2(msg)
{
diff --git a/deps/v8/test/inspector/protocol-test.js b/deps/v8/test/inspector/protocol-test.js
index c91055b670..a99a9f536d 100644
--- a/deps/v8/test/inspector/protocol-test.js
+++ b/deps/v8/test/inspector/protocol-test.js
@@ -3,70 +3,36 @@
// found in the LICENSE file.
InspectorTest = {};
-InspectorTest._dispatchTable = new Map();
-InspectorTest._requestId = 0;
InspectorTest._dumpInspectorProtocolMessages = false;
-InspectorTest._eventHandler = {};
InspectorTest._commandsForLogging = new Set();
+InspectorTest._sessions = new Set();
-Protocol = new Proxy({}, {
- get: function(target, agentName, receiver) {
- return new Proxy({}, {
- get: function(target, methodName, receiver) {
- const eventPattern = /^on(ce)?([A-Z][A-Za-z0-9]+)/;
- var match = eventPattern.exec(methodName);
- if (!match) {
- return (args, contextGroupId) => InspectorTest._sendCommandPromise(`${agentName}.${methodName}`, args || {}, contextGroupId);
- } else {
- var eventName = match[2];
- eventName = eventName.charAt(0).toLowerCase() + eventName.slice(1);
- if (match[1])
- return () => InspectorTest._waitForEventPromise(
- `${agentName}.${eventName}`);
- else
- return (listener) => { InspectorTest._eventHandler[`${agentName}.${eventName}`] = listener };
- }
- }
- });
- }
-});
-
-InspectorTest.logProtocolCommandCalls = (command) => InspectorTest._commandsForLogging.add(command);
-
-var utils = {};
-(function setupUtils() {
- utils.load = load;
- this.load = null;
- utils.read = read;
- this.read = null;
- utils.compileAndRunWithOrigin = compileAndRunWithOrigin;
- this.compileAndRunWithOrigin = null;
- utils.quit = quit;
- this.quit = null;
- utils.print = print;
- this.print = null;
- utils.setlocale = setlocale;
- this.setlocale = null;
- utils.setCurrentTimeMSForTest = setCurrentTimeMSForTest;
- this.setCurrentTimeMSForTest = null;
- utils.setMemoryInfoForTest = setMemoryInfoForTest;
- this.setMemoryInfoForTest = null;
- utils.schedulePauseOnNextStatement = schedulePauseOnNextStatement;
- this.schedulePauseOnNextStatement = null;
- utils.cancelPauseOnNextStatement = cancelPauseOnNextStatement;
- this.cancelPauseOnNextStatement = null;
- utils.reconnect = reconnect;
- this.reconnect = null;
- utils.disconnect = disconnect;
- this.disconnect = null;
- utils.createContextGroup = createContextGroup;
- this.createContextGroup = null;
-})();
-
-InspectorTest.log = utils.print.bind(null);
-
-InspectorTest.logMessage = function(originalMessage)
-{
+InspectorTest.log = utils.print.bind(utils);
+InspectorTest.quitImmediately = utils.quit.bind(utils);
+
+InspectorTest.logProtocolCommandCalls = function(command) {
+ InspectorTest._commandsForLogging.add(command);
+}
+
+InspectorTest.completeTest = function() {
+ var promises = [];
+ for (var session of InspectorTest._sessions)
+ promises.push(session.Protocol.Debugger.disable());
+ Promise.all(promises).then(() => utils.quit());
+}
+
+InspectorTest.waitForPendingTasks = function() {
+ var promises = [];
+ for (var session of InspectorTest._sessions)
+ promises.push(session.Protocol.Runtime.evaluate({ expression: "new Promise(r => setTimeout(r, 0))//# sourceURL=wait-for-pending-tasks.js", awaitPromise: true }));
+ return Promise.all(promises);
+}
+
+InspectorTest.startDumpingProtocolMessages = function() {
+ InspectorTest._dumpInspectorProtocolMessages = true;
+}
+
+InspectorTest.logMessage = function(originalMessage) {
var message = JSON.parse(JSON.stringify(originalMessage));
if (message.id)
message.id = "<messageId>";
@@ -90,12 +56,10 @@ InspectorTest.logMessage = function(originalMessage)
return originalMessage;
}
-InspectorTest.logObject = function(object, title)
-{
+InspectorTest.logObject = function(object, title) {
var lines = [];
- function dumpValue(value, prefix, prefixWithName)
- {
+ function dumpValue(value, prefix, prefixWithName) {
if (typeof value === "object" && value !== null) {
if (value instanceof Array)
dumpItems(value, prefix, prefixWithName);
@@ -106,8 +70,7 @@ InspectorTest.logObject = function(object, title)
}
}
- function dumpProperties(object, prefix, firstLinePrefix)
- {
+ function dumpProperties(object, prefix, firstLinePrefix) {
prefix = prefix || "";
firstLinePrefix = firstLinePrefix || prefix;
lines.push(firstLinePrefix + "{");
@@ -124,8 +87,7 @@ InspectorTest.logObject = function(object, title)
lines.push(prefix + "}");
}
- function dumpItems(object, prefix, firstLinePrefix)
- {
+ function dumpItems(object, prefix, firstLinePrefix) {
prefix = prefix || "";
firstLinePrefix = firstLinePrefix || prefix;
lines.push(firstLinePrefix + "[");
@@ -138,118 +100,222 @@ InspectorTest.logObject = function(object, title)
InspectorTest.log(lines.join("\n"));
}
-InspectorTest.logCallFrames = function(callFrames)
-{
- for (var frame of callFrames) {
- var functionName = frame.functionName || '(anonymous)';
- var url = frame.url ? frame.url : InspectorTest._scriptMap.get(frame.location.scriptId).url;
- var lineNumber = frame.location ? frame.location.lineNumber : frame.lineNumber;
- var columnNumber = frame.location ? frame.location.columnNumber : frame.columnNumber;
- InspectorTest.log(`${functionName} (${url}:${lineNumber}:${columnNumber})`);
+InspectorTest.ContextGroup = class {
+ constructor() {
+ this.id = utils.createContextGroup();
}
-}
-InspectorTest.logSourceLocation = function(location)
-{
- var scriptId = location.scriptId;
- if (!InspectorTest._scriptMap || !InspectorTest._scriptMap.has(scriptId)) {
- InspectorTest.log("InspectorTest.setupScriptMap should be called before Protocol.Debugger.enable.");
- InspectorTest.completeTest();
+ schedulePauseOnNextStatement(reason, details) {
+ utils.schedulePauseOnNextStatement(this.id, reason, details);
}
- var script = InspectorTest._scriptMap.get(scriptId);
- if (!script.scriptSource) {
- // TODO(kozyatinskiy): doesn't assume that contextId == contextGroupId.
- return Protocol.Debugger.getScriptSource({ scriptId }, script.executionContextId)
- .then(message => script.scriptSource = message.result.scriptSource)
- .then(dumpSourceWithLocation);
+
+ cancelPauseOnNextStatement() {
+ utils.cancelPauseOnNextStatement(this.id);
}
- return Promise.resolve().then(dumpSourceWithLocation);
-
- function dumpSourceWithLocation() {
- var lines = script.scriptSource.split('\n');
- var line = lines[location.lineNumber];
- line = line.slice(0, location.columnNumber) + '#' + (line.slice(location.columnNumber) || '');
- lines[location.lineNumber] = line;
- lines = lines.filter(line => line.indexOf('//# sourceURL=') === -1);
- InspectorTest.log(lines.slice(Math.max(location.lineNumber - 1, 0), location.lineNumber + 2).join('\n'));
- InspectorTest.log('');
+
+ addScript(string, lineOffset, columnOffset, url) {
+ utils.compileAndRunWithOrigin(this.id, string, url || '', lineOffset || 0, columnOffset || 0, false);
}
-}
-InspectorTest.logSourceLocations = function(locations) {
- if (locations.length == 0) return Promise.resolve();
- return InspectorTest.logSourceLocation(locations[0])
- .then(() => InspectorTest.logSourceLocations(locations.splice(1)));
-}
+ addModule(string, url, lineOffset, columnOffset) {
+ utils.compileAndRunWithOrigin(this.id, string, url, lineOffset || 0, columnOffset || 0, true);
+ }
-InspectorTest.logAsyncStackTrace = function(asyncStackTrace)
-{
- while (asyncStackTrace) {
- if (asyncStackTrace.promiseCreationFrame) {
- var frame = asyncStackTrace.promiseCreationFrame;
- InspectorTest.log(`-- ${asyncStackTrace.description} (${frame.url
- }:${frame.lineNumber}:${frame.columnNumber})--`);
- } else {
- InspectorTest.log(`-- ${asyncStackTrace.description} --`);
+ loadScript(fileName) {
+ this.addScript(utils.read(fileName));
+ }
+
+ connect() {
+ return new InspectorTest.Session(this);
+ }
+
+ setupInjectedScriptEnvironment(debug) {
+ let scriptSource = '';
+ // First define all getters on Object.prototype.
+ let injectedScriptSource = utils.read('src/inspector/injected-script-source.js');
+ let getterRegex = /\.[a-zA-Z0-9]+/g;
+ let match;
+ let getters = new Set();
+ while (match = getterRegex.exec(injectedScriptSource)) {
+ getters.add(match[0].substr(1));
+ }
+ scriptSource += `(function installSettersAndGetters() {
+ let defineProperty = Object.defineProperty;
+ let ObjectPrototype = Object.prototype;\n`;
+ scriptSource += Array.from(getters).map(getter => `
+ defineProperty(ObjectPrototype, '${getter}', {
+ set() { debugger; throw 42; }, get() { debugger; throw 42; },
+ __proto__: null
+ });
+ `).join('\n') + '})();';
+ this.addScript(scriptSource);
+
+ if (debug) {
+ InspectorTest.log('WARNING: setupInjectedScriptEnvironment with debug flag for debugging only and should not be landed.');
+ InspectorTest.log('WARNING: run test with --expose-inspector-scripts flag to get more details.');
+ InspectorTest.log('WARNING: you can additionally comment rjsmin in xxd.py to get unminified injected-script-source.js.');
+ var session = InspectorTest._sessions.next().vale;
+ session.setupScriptMap();
+ sesison.Protocol.Debugger.enable();
+ session.Protocol.Debugger.onPaused(message => {
+ let callFrames = message.params.callFrames;
+ session.logSourceLocations(callFrames.map(frame => frame.location));
+ })
}
- InspectorTest.logCallFrames(asyncStackTrace.callFrames);
- asyncStackTrace = asyncStackTrace.parent;
}
-}
+};
+
+InspectorTest.Session = class {
+ constructor(contextGroup) {
+ this.contextGroup = contextGroup;
+ this._dispatchTable = new Map();
+ this._eventHandlers = new Map();
+ this._requestId = 0;
+ this.Protocol = this._setupProtocol();
+ InspectorTest._sessions.add(this);
+ this.id = utils.connectSession(contextGroup.id, '', this._dispatchMessage.bind(this));
+ }
-InspectorTest.completeTest = () => Protocol.Debugger.disable().then(() => utils.quit());
+ disconnect() {
+ InspectorTest._sessions.delete(this);
+ utils.disconnectSession(this.id);
+ }
-InspectorTest.completeTestAfterPendingTimeouts = function()
-{
- InspectorTest.waitPendingTasks().then(InspectorTest.completeTest);
-}
+ reconnect() {
+ var state = utils.disconnectSession(this.id);
+ this.id = utils.connectSession(this.contextGroup.id, state, this._dispatchMessage.bind(this));
+ }
-InspectorTest.waitPendingTasks = function()
-{
- return Protocol.Runtime.evaluate({ expression: "new Promise(r => setTimeout(r, 0))//# sourceURL=wait-pending-tasks.js", awaitPromise: true });
-}
+ sendRawCommand(requestId, command, handler) {
+ if (InspectorTest._dumpInspectorProtocolMessages)
+ utils.print("frontend: " + command);
+ this._dispatchTable.set(requestId, handler);
+ utils.sendMessageToBackend(this.id, command);
+ }
-InspectorTest.addScript = (string, lineOffset, columnOffset) => utils.compileAndRunWithOrigin(string, "", lineOffset || 0, columnOffset || 0, false);
-InspectorTest.addScriptWithUrl = (string, url) => utils.compileAndRunWithOrigin(string, url, 0, 0, false);
-InspectorTest.addModule = (string, url, lineOffset, columnOffset) => utils.compileAndRunWithOrigin(string, url, lineOffset || 0, columnOffset || 0, true);
+ setupScriptMap() {
+ if (this._scriptMap)
+ return;
+ this._scriptMap = new Map();
+ }
-InspectorTest.startDumpingProtocolMessages = function()
-{
- InspectorTest._dumpInspectorProtocolMessages = true;
-}
+ logCallFrames(callFrames) {
+ for (var frame of callFrames) {
+ var functionName = frame.functionName || '(anonymous)';
+ var url = frame.url ? frame.url : this._scriptMap.get(frame.location.scriptId).url;
+ var lineNumber = frame.location ? frame.location.lineNumber : frame.lineNumber;
+ var columnNumber = frame.location ? frame.location.columnNumber : frame.columnNumber;
+ InspectorTest.log(`${functionName} (${url}:${lineNumber}:${columnNumber})`);
+ }
+ }
-InspectorTest.sendRawCommand = function(requestId, command, handler, contextGroupId)
-{
- if (InspectorTest._dumpInspectorProtocolMessages)
- utils.print("frontend: " + command);
- InspectorTest._dispatchTable.set(requestId, handler);
- sendMessageToBackend(command, contextGroupId || 0);
-}
+ logSourceLocation(location) {
+ var scriptId = location.scriptId;
+ if (!this._scriptMap || !this._scriptMap.has(scriptId)) {
+ InspectorTest.log("setupScriptMap should be called before Protocol.Debugger.enable.");
+ InspectorTest.completeTest();
+ }
+ var script = this._scriptMap.get(scriptId);
+ if (!script.scriptSource) {
+ return this.Protocol.Debugger.getScriptSource({ scriptId })
+ .then(message => script.scriptSource = message.result.scriptSource)
+ .then(dumpSourceWithLocation);
+ }
+ return Promise.resolve().then(dumpSourceWithLocation);
+
+ function dumpSourceWithLocation() {
+ var lines = script.scriptSource.split('\n');
+ var line = lines[location.lineNumber];
+ line = line.slice(0, location.columnNumber) + '#' + (line.slice(location.columnNumber) || '');
+ lines[location.lineNumber] = line;
+ lines = lines.filter(line => line.indexOf('//# sourceURL=') === -1);
+ InspectorTest.log(lines.slice(Math.max(location.lineNumber - 1, 0), location.lineNumber + 2).join('\n'));
+ InspectorTest.log('');
+ }
+ }
-InspectorTest.checkExpectation = function(fail, name, messageObject)
-{
- if (fail === !!messageObject.error) {
- InspectorTest.log("PASS: " + name);
- return true;
+ logSourceLocations(locations) {
+ if (locations.length == 0) return Promise.resolve();
+ return this.logSourceLocation(locations[0]).then(() => this.logSourceLocations(locations.splice(1)));
}
- InspectorTest.log("FAIL: " + name + ": " + JSON.stringify(messageObject));
- InspectorTest.completeTest();
- return false;
-}
-InspectorTest.expectedSuccess = InspectorTest.checkExpectation.bind(null, false);
-InspectorTest.expectedError = InspectorTest.checkExpectation.bind(null, true);
+ logAsyncStackTrace(asyncStackTrace) {
+ while (asyncStackTrace) {
+ if (asyncStackTrace.promiseCreationFrame) {
+ var frame = asyncStackTrace.promiseCreationFrame;
+ InspectorTest.log(`-- ${asyncStackTrace.description} (${frame.url}:${frame.lineNumber}:${frame.columnNumber})--`);
+ } else {
+ InspectorTest.log(`-- ${asyncStackTrace.description} --`);
+ }
+ this.logCallFrames(asyncStackTrace.callFrames);
+ asyncStackTrace = asyncStackTrace.parent;
+ }
+ }
-InspectorTest.setupScriptMap = function() {
- if (InspectorTest._scriptMap)
- return;
- InspectorTest._scriptMap = new Map();
-}
+ _sendCommandPromise(method, params) {
+ if (InspectorTest._commandsForLogging.has(method))
+ utils.print(method + ' called');
+ var requestId = ++this._requestId;
+ var messageObject = { "id": requestId, "method": method, "params": params };
+ return new Promise(fulfill => this.sendRawCommand(requestId, JSON.stringify(messageObject), fulfill));
+ }
+
+ _setupProtocol() {
+ return new Proxy({}, { get: (target, agentName, receiver) => new Proxy({}, {
+ get: (target, methodName, receiver) => {
+ const eventPattern = /^on(ce)?([A-Z][A-Za-z0-9]+)/;
+ var match = eventPattern.exec(methodName);
+ if (!match)
+ return args => this._sendCommandPromise(`${agentName}.${methodName}`, args || {});
+ var eventName = match[2];
+ eventName = eventName.charAt(0).toLowerCase() + eventName.slice(1);
+ if (match[1])
+ return () => this._waitForEventPromise(`${agentName}.${eventName}`);
+ return listener => this._eventHandlers.set(`${agentName}.${eventName}`, listener);
+ }
+ })});
+ }
+
+ _dispatchMessage(messageString) {
+ var messageObject = JSON.parse(messageString);
+ if (InspectorTest._dumpInspectorProtocolMessages)
+ utils.print("backend: " + JSON.stringify(messageObject));
+ try {
+ var messageId = messageObject["id"];
+ if (typeof messageId === "number") {
+ var handler = this._dispatchTable.get(messageId);
+ if (handler) {
+ handler(messageObject);
+ this._dispatchTable.delete(messageId);
+ }
+ } else {
+ var eventName = messageObject["method"];
+ var eventHandler = this._eventHandlers.get(eventName);
+ if (this._scriptMap && eventName === "Debugger.scriptParsed")
+ this._scriptMap.set(messageObject.params.scriptId, JSON.parse(JSON.stringify(messageObject.params)));
+ if (eventName === "Debugger.scriptParsed" && messageObject.params.url === "wait-for-pending-tasks.js")
+ return;
+ if (eventHandler)
+ eventHandler(messageObject);
+ }
+ } catch (e) {
+ InspectorTest.log("Exception when dispatching message: " + e + "\n" + e.stack + "\n message = " + JSON.stringify(messageObject, null, 2));
+ InspectorTest.completeTest();
+ }
+ };
+
+ _waitForEventPromise(eventName) {
+ return new Promise(fulfill => {
+ this._eventHandlers.set(eventName, result => {
+ delete this._eventHandlers.delete(eventName);
+ fulfill(result);
+ });
+ });
+ }
+};
-InspectorTest.runTestSuite = function(testSuite)
-{
- function nextTest()
- {
+InspectorTest.runTestSuite = function(testSuite) {
+ function nextTest() {
if (!testSuite.length) {
InspectorTest.completeTest();
return;
@@ -264,97 +330,22 @@ InspectorTest.runTestSuite = function(testSuite)
InspectorTest.runAsyncTestSuite = async function(testSuite) {
for (var test of testSuite) {
InspectorTest.log("\nRunning test: " + test.name);
- await test();
+ try {
+ await test();
+ } catch (e) {
+ utils.print(e.stack);
+ }
}
InspectorTest.completeTest();
}
-InspectorTest._sendCommandPromise = function(method, params, contextGroupId)
-{
- var requestId = ++InspectorTest._requestId;
- var messageObject = { "id": requestId, "method": method, "params": params };
- var fulfillCallback;
- var promise = new Promise(fulfill => fulfillCallback = fulfill);
- if (InspectorTest._commandsForLogging.has(method)) {
- utils.print(method + ' called');
- }
- InspectorTest.sendRawCommand(requestId, JSON.stringify(messageObject), fulfillCallback, contextGroupId);
- return promise;
-}
-
-InspectorTest._waitForEventPromise = function(eventName)
-{
- return new Promise(fulfill => InspectorTest._eventHandler[eventName] = fullfillAndClearListener.bind(null, fulfill));
-
- function fullfillAndClearListener(fulfill, result)
- {
- delete InspectorTest._eventHandler[eventName];
- fulfill(result);
- }
-}
-
-InspectorTest._dispatchMessage = function(messageObject)
-{
- if (InspectorTest._dumpInspectorProtocolMessages)
- utils.print("backend: " + JSON.stringify(messageObject));
+InspectorTest.start = function(description) {
try {
- var messageId = messageObject["id"];
- if (typeof messageId === "number") {
- var handler = InspectorTest._dispatchTable.get(messageId);
- if (handler) {
- handler(messageObject);
- InspectorTest._dispatchTable.delete(messageId);
- }
- } else {
- var eventName = messageObject["method"];
- var eventHandler = InspectorTest._eventHandler[eventName];
- if (InspectorTest._scriptMap && eventName === "Debugger.scriptParsed")
- InspectorTest._scriptMap.set(messageObject.params.scriptId, JSON.parse(JSON.stringify(messageObject.params)));
- if (eventName === "Debugger.scriptParsed" && messageObject.params.url === "wait-pending-tasks.js")
- return;
- if (eventHandler)
- eventHandler(messageObject);
- }
+ InspectorTest.log(description);
+ var contextGroup = new InspectorTest.ContextGroup();
+ var session = contextGroup.connect();
+ return { session: session, contextGroup: contextGroup, Protocol: session.Protocol };
} catch (e) {
- InspectorTest.log("Exception when dispatching message: " + e + "\n" + e.stack + "\n message = " + JSON.stringify(messageObject, null, 2));
- InspectorTest.completeTest();
- }
-}
-
-InspectorTest.loadScript = function(fileName) {
- InspectorTest.addScript(utils.read(fileName));
-}
-
-InspectorTest.setupInjectedScriptEnvironment = function(debug) {
- let scriptSource = '';
- // First define all getters on Object.prototype.
- let injectedScriptSource = utils.read('src/inspector/injected-script-source.js');
- let getterRegex = /\.[a-zA-Z0-9]+/g;
- let match;
- let getters = new Set();
- while (match = getterRegex.exec(injectedScriptSource)) {
- getters.add(match[0].substr(1));
- }
- scriptSource += `(function installSettersAndGetters() {
- let defineProperty = Object.defineProperty;
- let ObjectPrototype = Object.prototype;\n`;
- scriptSource += Array.from(getters).map(getter => `
- defineProperty(ObjectPrototype, '${getter}', {
- set() { debugger; throw 42; }, get() { debugger; throw 42; },
- __proto__: null
- });
- `).join('\n') + '})();';
- InspectorTest.addScript(scriptSource);
-
- if (debug) {
- InspectorTest.log('WARNING: InspectorTest.setupInjectedScriptEnvironment with debug flag for debugging only and should not be landed.');
- InspectorTest.log('WARNING: run test with --expose-inspector-scripts flag to get more details.');
- InspectorTest.log('WARNING: you can additionally comment rjsmin in xxd.py to get unminified injected-script-source.js.');
- InspectorTest.setupScriptMap();
- Protocol.Debugger.enable();
- Protocol.Debugger.onPaused(message => {
- let callFrames = message.params.callFrames;
- InspectorTest.logSourceLocations(callFrames.map(frame => frame.location));
- })
+ utils.print(e.stack);
}
}
diff --git a/deps/v8/test/inspector/runtime/await-promise.js b/deps/v8/test/inspector/runtime/await-promise.js
index a09eb05a4c..042a1332bf 100644
--- a/deps/v8/test/inspector/runtime/await-promise.js
+++ b/deps/v8/test/inspector/runtime/await-promise.js
@@ -3,9 +3,9 @@
// found in the LICENSE file.
// Flags: --expose_gc
-InspectorTest.log("Tests that Runtime.awaitPromise works.");
+let {session, contextGroup, Protocol} = InspectorTest.start("Tests that Runtime.awaitPromise works.");
-InspectorTest.addScript(
+contextGroup.addScript(
`
var resolveCallback;
var rejectCallback;
diff --git a/deps/v8/test/inspector/runtime/call-function-on-async-expected.txt b/deps/v8/test/inspector/runtime/call-function-on-async-expected.txt
index 2d558b85dd..f396b0540e 100644
--- a/deps/v8/test/inspector/runtime/call-function-on-async-expected.txt
+++ b/deps/v8/test/inspector/runtime/call-function-on-async-expected.txt
@@ -125,10 +125,6 @@ Running test: testFunctionReturnRejectedPromise
}
exceptionId : <exceptionId>
lineNumber : 0
- stackTrace : {
- callFrames : [
- ]
- }
text : Uncaught (in promise)
}
result : {
@@ -138,4 +134,4 @@ Running test: testFunctionReturnRejectedPromise
}
}
}
-} \ No newline at end of file
+}
diff --git a/deps/v8/test/inspector/runtime/call-function-on-async.js b/deps/v8/test/inspector/runtime/call-function-on-async.js
index e6cf5f9edf..cce28565c1 100644
--- a/deps/v8/test/inspector/runtime/call-function-on-async.js
+++ b/deps/v8/test/inspector/runtime/call-function-on-async.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Tests that Runtime.callFunctionOn works with awaitPromise flag.");
+let {session, contextGroup, Protocol} = InspectorTest.start("Tests that Runtime.callFunctionOn works with awaitPromise flag.");
InspectorTest.runTestSuite([
function testArguments(next)
diff --git a/deps/v8/test/inspector/runtime/clear-of-command-line-api-expected.txt b/deps/v8/test/inspector/runtime/clear-of-command-line-api-expected.txt
index 142989b731..f63b91859a 100644
--- a/deps/v8/test/inspector/runtime/clear-of-command-line-api-expected.txt
+++ b/deps/v8/test/inspector/runtime/clear-of-command-line-api-expected.txt
@@ -174,4 +174,4 @@ redefineGetOwnPropertyDescriptors()
value : 42
}
}
-} \ No newline at end of file
+}
diff --git a/deps/v8/test/inspector/runtime/clear-of-command-line-api.js b/deps/v8/test/inspector/runtime/clear-of-command-line-api.js
index e8e8513204..d67a1c5447 100644
--- a/deps/v8/test/inspector/runtime/clear-of-command-line-api.js
+++ b/deps/v8/test/inspector/runtime/clear-of-command-line-api.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Tests that CommandLineAPI is presented only while evaluation.");
+let {session, contextGroup, Protocol} = InspectorTest.start("Tests that CommandLineAPI is presented only while evaluation.");
-InspectorTest.addScript(
+contextGroup.addScript(
`
var methods = ["dir","dirxml","profile","profileEnd","clear","table","keys","values","debug","undebug","monitor","unmonitor","inspect","copy"];
var window = this;
diff --git a/deps/v8/test/inspector/runtime/client-console-api-message-expected.txt b/deps/v8/test/inspector/runtime/client-console-api-message-expected.txt
new file mode 100644
index 0000000000..699b390a8d
--- /dev/null
+++ b/deps/v8/test/inspector/runtime/client-console-api-message-expected.txt
@@ -0,0 +1,8 @@
+Checks that we passed correct arguments in V8InspectorClient::consoleAPIMessage. Note: lines and columns are 1-based.
+42 (:1:9)
+ at (anonymous function) (:1:9)
+239 (:13:15)
+ at b (:13:15)
+ at a (:15:5)
+ at consoleTrace (:17:3)
+ at (anonymous function) (:1:1)
diff --git a/deps/v8/test/inspector/runtime/client-console-api-message.js b/deps/v8/test/inspector/runtime/client-console-api-message.js
new file mode 100644
index 0000000000..15838fa489
--- /dev/null
+++ b/deps/v8/test/inspector/runtime/client-console-api-message.js
@@ -0,0 +1,28 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks that we passed correct arguments in ' +
+ 'V8InspectorClient::consoleAPIMessage. Note: lines and columns are 1-based.');
+
+contextGroup.addScript(`
+function consoleTrace() {
+ function a() {
+ function b() {
+ console.trace(239);
+ }
+ b();
+ }
+ a();
+}
+`, 8, 26);
+
+Protocol.Runtime.enable();
+utils.setLogConsoleApiMessageCalls(true);
+(async function test() {
+ Protocol.Runtime.evaluate({expression: 'console.log(42)'});
+ await Protocol.Runtime.onceConsoleAPICalled()
+ Protocol.Runtime.evaluate({expression: 'consoleTrace()'});
+ await Protocol.Runtime.onceConsoleAPICalled()
+ InspectorTest.completeTest();
+})();
diff --git a/deps/v8/test/inspector/runtime/command-line-api.js b/deps/v8/test/inspector/runtime/command-line-api.js
index 3a6080898b..16abde45e9 100644
--- a/deps/v8/test/inspector/runtime/command-line-api.js
+++ b/deps/v8/test/inspector/runtime/command-line-api.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Checks command line API.');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks command line API.');
InspectorTest.runAsyncTestSuite([
async function testKeys() {
@@ -46,7 +46,7 @@ InspectorTest.runAsyncTestSuite([
},
async function testDebug() {
- InspectorTest.setupScriptMap();
+ session.setupScriptMap();
await Protocol.Debugger.enable();
InspectorTest.logMessage(await Protocol.Runtime.evaluate({expression: 'debug', includeCommandLineAPI: true}));
InspectorTest.logMessage(await Protocol.Runtime.evaluate({expression: 'undebug', includeCommandLineAPI: true}));
@@ -54,7 +54,7 @@ InspectorTest.runAsyncTestSuite([
await Protocol.Runtime.evaluate({expression: 'debug(foo)', includeCommandLineAPI: true});
Protocol.Runtime.evaluate({ expression: 'foo()'});
let message = await Protocol.Debugger.oncePaused();
- InspectorTest.logCallFrames(message.params.callFrames);
+ session.logCallFrames(message.params.callFrames);
InspectorTest.logMessage(message.params.hitBreakpoints);
await Protocol.Debugger.resume();
await Protocol.Runtime.evaluate({expression: 'undebug(foo)', includeCommandLineAPI: true});
@@ -65,7 +65,7 @@ InspectorTest.runAsyncTestSuite([
await Protocol.Runtime.evaluate({expression: 'this.debug(foo)'});
Protocol.Runtime.evaluate({ expression: 'foo()'});
message = await Protocol.Debugger.oncePaused();
- InspectorTest.logCallFrames(message.params.callFrames);
+ session.logCallFrames(message.params.callFrames);
InspectorTest.logMessage(message.params.hitBreakpoints);
await Protocol.Debugger.resume();
await Protocol.Runtime.evaluate({expression: 'this.undebug(foo)'});
diff --git a/deps/v8/test/inspector/runtime/compile-script-expected.txt b/deps/v8/test/inspector/runtime/compile-script-expected.txt
index 3d6d580487..23e6a64dc5 100644
--- a/deps/v8/test/inspector/runtime/compile-script-expected.txt
+++ b/deps/v8/test/inspector/runtime/compile-script-expected.txt
@@ -1,3 +1,4 @@
+Tests Runtime.compileScript
Compiling script: foo1.js
persist: false
compilation result:
@@ -63,4 +64,4 @@ compilation result:
}
}
}
------ \ No newline at end of file
+-----
diff --git a/deps/v8/test/inspector/runtime/compile-script.js b/deps/v8/test/inspector/runtime/compile-script.js
index 4f1c6468e1..6452e07a26 100644
--- a/deps/v8/test/inspector/runtime/compile-script.js
+++ b/deps/v8/test/inspector/runtime/compile-script.js
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests Runtime.compileScript');
+
var executionContextId;
Protocol.Debugger.enable().then(onDebuggerEnabled);
diff --git a/deps/v8/test/inspector/runtime/console-api-repeated-in-console-expected.txt b/deps/v8/test/inspector/runtime/console-api-repeated-in-console-expected.txt
index 04d2d90265..3ec657bfff 100644
--- a/deps/v8/test/inspector/runtime/console-api-repeated-in-console-expected.txt
+++ b/deps/v8/test/inspector/runtime/console-api-repeated-in-console-expected.txt
@@ -3,4 +3,3 @@ api call: 42
api call: abc
console message: 42
console message: abc
-
diff --git a/deps/v8/test/inspector/runtime/console-api-repeated-in-console.js b/deps/v8/test/inspector/runtime/console-api-repeated-in-console.js
index f7de071654..aafdbdefd9 100644
--- a/deps/v8/test/inspector/runtime/console-api-repeated-in-console.js
+++ b/deps/v8/test/inspector/runtime/console-api-repeated-in-console.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Check that console.log is reported through Console domain as well.");
+let {session, contextGroup, Protocol} = InspectorTest.start("Check that console.log is reported through Console domain as well.");
var expectedMessages = 4;
var messages = [];
diff --git a/deps/v8/test/inspector/runtime/console-assert.js b/deps/v8/test/inspector/runtime/console-assert.js
index 64be5e23d3..355149b2e8 100644
--- a/deps/v8/test/inspector/runtime/console-assert.js
+++ b/deps/v8/test/inspector/runtime/console-assert.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Checks that console.assert works and points to correct call frame.");
+let {session, contextGroup, Protocol} = InspectorTest.start("Checks that console.assert works and points to correct call frame.");
-InspectorTest.addScript(`
+contextGroup.addScript(`
function testFunction() {
Function.prototype.apply = () => console.error('Should never call this');
console.assert(true);
diff --git a/deps/v8/test/inspector/runtime/console-deprecated-methods-expected.txt b/deps/v8/test/inspector/runtime/console-deprecated-methods-expected.txt
index 1b8e4aa2ce..4c1e26518c 100644
--- a/deps/v8/test/inspector/runtime/console-deprecated-methods-expected.txt
+++ b/deps/v8/test/inspector/runtime/console-deprecated-methods-expected.txt
@@ -2,4 +2,3 @@ Tests checks that deprecation messages for console.
'console.timeline' is deprecated. Please use 'console.time' instead.
'console.timelineEnd' is deprecated. Please use 'console.timeEnd' instead.
'console.markTimeline' is deprecated. Please use 'console.timeStamp' instead.
-
diff --git a/deps/v8/test/inspector/runtime/console-deprecated-methods.js b/deps/v8/test/inspector/runtime/console-deprecated-methods.js
index ac13672977..e8ccd2a2fd 100644
--- a/deps/v8/test/inspector/runtime/console-deprecated-methods.js
+++ b/deps/v8/test/inspector/runtime/console-deprecated-methods.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Tests checks that deprecation messages for console.")
+let {session, contextGroup, Protocol} = InspectorTest.start("Tests checks that deprecation messages for console.")
Protocol.Runtime.onConsoleAPICalled(messageAdded);
Protocol.Runtime.enable();
diff --git a/deps/v8/test/inspector/runtime/console-line-and-column-expected.txt b/deps/v8/test/inspector/runtime/console-line-and-column-expected.txt
index 4eab60af0d..4e3ce1e441 100644
--- a/deps/v8/test/inspector/runtime/console-line-and-column-expected.txt
+++ b/deps/v8/test/inspector/runtime/console-line-and-column-expected.txt
@@ -1,3 +1,4 @@
+Tests line and column numbers in console messages
{
method : Runtime.consoleAPICalled
params : {
@@ -49,4 +50,4 @@
timestamp : <timestamp>
type : log
}
-} \ No newline at end of file
+}
diff --git a/deps/v8/test/inspector/runtime/console-line-and-column.js b/deps/v8/test/inspector/runtime/console-line-and-column.js
index fe5c24f27c..e7011ebb19 100644
--- a/deps/v8/test/inspector/runtime/console-line-and-column.js
+++ b/deps/v8/test/inspector/runtime/console-line-and-column.js
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests line and column numbers in console messages');
+
Protocol.Runtime.enable();
addConsoleMessagePromise("console.log(239)")
diff --git a/deps/v8/test/inspector/runtime/console-log-doesnt-run-microtasks-expected.txt b/deps/v8/test/inspector/runtime/console-log-doesnt-run-microtasks-expected.txt
index 5a234ec78c..d1268b9695 100644
--- a/deps/v8/test/inspector/runtime/console-log-doesnt-run-microtasks-expected.txt
+++ b/deps/v8/test/inspector/runtime/console-log-doesnt-run-microtasks-expected.txt
@@ -18,4 +18,3 @@ Check that console.log doesn't run microtasks.
type : string
value : finished
}
-
diff --git a/deps/v8/test/inspector/runtime/console-log-doesnt-run-microtasks.js b/deps/v8/test/inspector/runtime/console-log-doesnt-run-microtasks.js
index 8320868469..c24e92876c 100644
--- a/deps/v8/test/inspector/runtime/console-log-doesnt-run-microtasks.js
+++ b/deps/v8/test/inspector/runtime/console-log-doesnt-run-microtasks.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Check that console.log doesn't run microtasks.");
+let {session, contextGroup, Protocol} = InspectorTest.start("Check that console.log doesn't run microtasks.");
-InspectorTest.addScript(
+contextGroup.addScript(
`
function testFunction()
{
diff --git a/deps/v8/test/inspector/runtime/console-memory.js b/deps/v8/test/inspector/runtime/console-memory.js
index e756dec794..45f86c035c 100644
--- a/deps/v8/test/inspector/runtime/console-memory.js
+++ b/deps/v8/test/inspector/runtime/console-memory.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Checks console.memory');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks console.memory');
InspectorTest.runAsyncTestSuite([
async function testWithoutMemory() {
diff --git a/deps/v8/test/inspector/runtime/console-messages-limits.js b/deps/v8/test/inspector/runtime/console-messages-limits.js
index a6a8ccefae..4a8159072e 100644
--- a/deps/v8/test/inspector/runtime/console-messages-limits.js
+++ b/deps/v8/test/inspector/runtime/console-messages-limits.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Checks that console message storage doesn\'t exceed limits');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks that console message storage doesn\'t exceed limits');
-InspectorTest.addScript(`
+contextGroup.addScript(`
function generateEmptyMessages(n) {
for (var i = 0; i < n; ++i) {
console.log('');
diff --git a/deps/v8/test/inspector/runtime/console-methods.js b/deps/v8/test/inspector/runtime/console-methods.js
index bd24776fbe..38ab5bd83f 100644
--- a/deps/v8/test/inspector/runtime/console-methods.js
+++ b/deps/v8/test/inspector/runtime/console-methods.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Checks console methods');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks console methods');
-InspectorTest.addScript(`
+contextGroup.addScript(`
function testFunction() {
console.debug('debug');
console.error('error');
diff --git a/deps/v8/test/inspector/runtime/console-spec-expected.txt b/deps/v8/test/inspector/runtime/console-spec-expected.txt
new file mode 100644
index 0000000000..48cbc70fe2
--- /dev/null
+++ b/deps/v8/test/inspector/runtime/console-spec-expected.txt
@@ -0,0 +1,30 @@
+Tests console object and it's prototype
+
+Running test: consoleExistsOnGlobal
+true
+
+Running test: consoleHasRightPropertyDescriptor
+{
+ configurable : true
+ enumerable : false
+ value : <value>
+ writable : true
+}
+
+Running test: ConsoleNotExistsOnGlobal
+false
+
+Running test: prototypeChainMustBeCorrect
+true
+
+Running test: consoleToString
+[object Object]
+
+Running test: consoleMethodPropertyDescriptor
+{
+ configurable : true
+ enumerable : true
+ value : {
+ }
+ writable : true
+}
diff --git a/deps/v8/test/inspector/runtime/console-spec.js b/deps/v8/test/inspector/runtime/console-spec.js
new file mode 100644
index 0000000000..f37898fbab
--- /dev/null
+++ b/deps/v8/test/inspector/runtime/console-spec.js
@@ -0,0 +1,60 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests console object and it\'s prototype');
+
+contextGroup.addScript(`
+var self = this;
+function checkPrototype() {
+ const prototype1 = Object.getPrototypeOf(console);
+ const prototype2 = Object.getPrototypeOf(prototype1);
+ if (Object.getOwnPropertyNames(prototype1).length !== 0)
+ return "false: The [[Prototype]] must have no properties";
+ if (prototype2 !== Object.prototype)
+ return "false: The [[Prototype]]'s [[Prototype]] must be %ObjectPrototype%";
+ return "true";
+}
+`);
+
+InspectorTest.runAsyncTestSuite([
+ async function consoleExistsOnGlobal() {
+ let message = await Protocol.Runtime.evaluate({
+ expression: 'self.hasOwnProperty(\'console\')', returnByValue: true});
+ InspectorTest.log(message.result.result.value);
+ },
+
+ async function consoleHasRightPropertyDescriptor() {
+ let message = await Protocol.Runtime.evaluate({
+ expression: 'Object.getOwnPropertyDescriptor(self, \'console\')',
+ returnByValue: true});
+ let result = message.result.result.value;
+ result.value = '<value>';
+ InspectorTest.logObject(result);
+ },
+
+ async function ConsoleNotExistsOnGlobal() {
+ let message = await Protocol.Runtime.evaluate({
+ expression: '\'Console\' in self', returnByValue: true})
+ InspectorTest.log(message.result.result.value);
+ },
+
+ async function prototypeChainMustBeCorrect() {
+ let message = await Protocol.Runtime.evaluate({
+ expression: "checkPrototype()", returnByValue: true });
+ InspectorTest.log(message.result.result.value);
+ },
+
+ async function consoleToString() {
+ let message = await Protocol.Runtime.evaluate({
+ expression: 'console.toString()', returnByValue: true})
+ InspectorTest.log(message.result.result.value);
+ },
+
+ async function consoleMethodPropertyDescriptor() {
+ let message = await Protocol.Runtime.evaluate({
+ expression: 'Object.getOwnPropertyDescriptor(console, \'log\')',
+ returnByValue: true});
+ InspectorTest.logObject(message.result.result.value);
+ }
+]);
diff --git a/deps/v8/test/inspector/runtime/console-time-end-format.js b/deps/v8/test/inspector/runtime/console-time-end-format.js
index c87f672e2c..7e4ff788b4 100644
--- a/deps/v8/test/inspector/runtime/console-time-end-format.js
+++ b/deps/v8/test/inspector/runtime/console-time-end-format.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Checks format of console.timeEnd output');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks format of console.timeEnd output');
Protocol.Runtime.enable();
Protocol.Runtime.onConsoleAPICalled(message => {
diff --git a/deps/v8/test/inspector/runtime/console-timestamp-expected.txt b/deps/v8/test/inspector/runtime/console-timestamp-expected.txt
index 5e4d7b5ada..5710530d1f 100644
--- a/deps/v8/test/inspector/runtime/console-timestamp-expected.txt
+++ b/deps/v8/test/inspector/runtime/console-timestamp-expected.txt
@@ -1,3 +1,4 @@
+Tests timestamps in console
Message has timestamp: true
Message timestamp doesn't differ too much from current time (one minute interval): true
Message 1 has non-decreasing timestamp: true
@@ -6,4 +7,3 @@ Message timestamp doesn't differ too much from current time (one minute interval
Message 2 has non-decreasing timestamp: true
Message has timestamp: true
Message timestamp doesn't differ too much from current time (one minute interval): true
-
diff --git a/deps/v8/test/inspector/runtime/console-timestamp.js b/deps/v8/test/inspector/runtime/console-timestamp.js
index 0dceaed23f..46ee76f925 100644
--- a/deps/v8/test/inspector/runtime/console-timestamp.js
+++ b/deps/v8/test/inspector/runtime/console-timestamp.js
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests timestamps in console');
+
var messages = [];
function messageAdded(data)
diff --git a/deps/v8/test/inspector/runtime/create-context.js b/deps/v8/test/inspector/runtime/create-context.js
index 4f86e6ec34..105bb59255 100644
--- a/deps/v8/test/inspector/runtime/create-context.js
+++ b/deps/v8/test/inspector/runtime/create-context.js
@@ -4,39 +4,48 @@
InspectorTest.log('Checks createContext().');
-InspectorTest.setupScriptMap();
-Protocol.Runtime.onExecutionContextCreated(InspectorTest.logMessage);
-Protocol.Debugger.onPaused((message) => {
- InspectorTest.logSourceLocation(message.params.callFrames[0].location);
- Protocol.Debugger.stepOut();
-});
var executionContextIds = new Set();
-Protocol.Debugger.onScriptParsed(message => executionContextIds.add(message.params.executionContextId));
-var contextGroupId;
-Protocol.Runtime.enable()
- .then(() => contextGroupId = utils.createContextGroup())
- .then(() => Protocol.Runtime.enable({}, contextGroupId))
- .then(() => Protocol.Debugger.enable())
- .then(() => Protocol.Debugger.enable({}, contextGroupId))
+var contextGroup1 = new InspectorTest.ContextGroup();
+var session1 = contextGroup1.connect();
+setup(session1);
+var contextGroup2 = new InspectorTest.ContextGroup();
+var session2 = contextGroup2.connect();
+setup(session2);
+
+session1.Protocol.Runtime.enable()
+ .then(() => session2.Protocol.Runtime.enable({}))
+ .then(() => session1.Protocol.Debugger.enable())
+ .then(() => session2.Protocol.Debugger.enable({}))
.then(InspectorTest.logMessage)
.then(() => {
- Protocol.Runtime.evaluate({ expression: 'debugger;' })
- Protocol.Runtime.evaluate({ expression: 'setTimeout(x => x * 2, 0)' }, contextGroupId);
- Protocol.Runtime.evaluate({ expression: 'setTimeout(x => x * 3, 0)' });
+ session1.Protocol.Runtime.evaluate({ expression: 'debugger;' });
+ session2.Protocol.Runtime.evaluate({expression: 'setTimeout(x => x * 2, 0)'});
+ session1.Protocol.Runtime.evaluate({ expression: 'setTimeout(x => x * 3, 0)' });
})
- .then(() => InspectorTest.waitPendingTasks())
+ .then(() => InspectorTest.waitForPendingTasks())
.then(() => {
InspectorTest.log(`Reported script's execution id: ${executionContextIds.size}`);
executionContextIds.clear();
})
- .then(() => utils.reconnect())
+ .then(() => session1.reconnect())
+ .then(() => session2.reconnect())
.then(() => {
- Protocol.Runtime.evaluate({ expression: 'debugger;' })
- Protocol.Runtime.evaluate({ expression: 'setTimeout(x => x * 2, 0)' }, contextGroupId);
- Protocol.Runtime.evaluate({ expression: 'setTimeout(x => x * 3, 0)' });
+ session1.Protocol.Runtime.evaluate({ expression: 'debugger;' })
+ session2.Protocol.Runtime.evaluate({ expression: 'setTimeout(x => x * 2, 0)' });
+ session1.Protocol.Runtime.evaluate({ expression: 'setTimeout(x => x * 3, 0)' });
})
- .then(() => InspectorTest.waitPendingTasks())
- .then(() => Protocol.Debugger.disable({}, contextGroupId))
- .then(() => Protocol.Debugger.disable({}))
+ .then(() => InspectorTest.waitForPendingTasks())
+ .then(() => session2.Protocol.Debugger.disable({}))
+ .then(() => session1.Protocol.Debugger.disable({}))
.then(() => InspectorTest.log(`Reported script's execution id: ${executionContextIds.size}`))
.then(InspectorTest.completeTest);
+
+function setup(session) {
+ session.Protocol.Runtime.onExecutionContextCreated(InspectorTest.logMessage);
+ session.setupScriptMap();
+ session.Protocol.Debugger.onPaused((message) => {
+ session.logSourceLocation(message.params.callFrames[0].location);
+ session.Protocol.Debugger.stepOut();
+ });
+ session.Protocol.Debugger.onScriptParsed(message => executionContextIds.add(message.params.executionContextId));
+}
diff --git a/deps/v8/test/inspector/runtime/es6-module-expected.txt b/deps/v8/test/inspector/runtime/es6-module-expected.txt
index 2c812b12bc..cbe63fe718 100644
--- a/deps/v8/test/inspector/runtime/es6-module-expected.txt
+++ b/deps/v8/test/inspector/runtime/es6-module-expected.txt
@@ -232,10 +232,6 @@ console.log(239)
executionContextId : <executionContextId>
lineNumber : 0
scriptId : <scriptId>
- stackTrace : {
- callFrames : [
- ]
- }
text : Uncaught SyntaxError: Unexpected token }
url : module4
}
diff --git a/deps/v8/test/inspector/runtime/es6-module.js b/deps/v8/test/inspector/runtime/es6-module.js
index 76ee91b83f..6d9e43486b 100644
--- a/deps/v8/test/inspector/runtime/es6-module.js
+++ b/deps/v8/test/inspector/runtime/es6-module.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Checks basic ES6 modules support.');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks basic ES6 modules support.');
var module1 = `
export function foo() {
@@ -30,7 +30,7 @@ debugger;
var module4 = '}';
-InspectorTest.setupScriptMap();
+session.setupScriptMap();
// We get scriptParsed events for modules ..
Protocol.Debugger.onScriptParsed(InspectorTest.logMessage);
// .. scriptFailed to parse for modules with syntax error ..
@@ -38,7 +38,7 @@ Protocol.Debugger.onScriptFailedToParse(InspectorTest.logMessage);
// .. API messages from modules contain correct stack trace ..
Protocol.Runtime.onConsoleAPICalled(message => {
InspectorTest.log(`console.log(${message.params.args[0].value})`);
- InspectorTest.logCallFrames(message.params.stackTrace.callFrames);
+ session.logCallFrames(message.params.stackTrace.callFrames);
InspectorTest.log('');
});
// .. we could break inside module and scope contains correct list of variables ..
@@ -53,9 +53,9 @@ Protocol.Runtime.onExceptionThrown(InspectorTest.logMessage);
Protocol.Runtime.enable();
Protocol.Debugger.enable()
- .then(() => InspectorTest.addModule(module1, "module1"))
- .then(() => InspectorTest.addModule(module2, "module2"))
- .then(() => InspectorTest.addModule(module3, "module3"))
- .then(() => InspectorTest.addModule(module4, "module4"))
- .then(() => InspectorTest.waitPendingTasks())
+ .then(() => contextGroup.addModule(module1, "module1"))
+ .then(() => contextGroup.addModule(module2, "module2"))
+ .then(() => contextGroup.addModule(module3, "module3"))
+ .then(() => contextGroup.addModule(module4, "module4"))
+ .then(() => InspectorTest.waitForPendingTasks())
.then(InspectorTest.completeTest);
diff --git a/deps/v8/test/inspector/runtime/evaluate-async-expected.txt b/deps/v8/test/inspector/runtime/evaluate-async-expected.txt
index c03dd7a409..c521648f7b 100644
--- a/deps/v8/test/inspector/runtime/evaluate-async-expected.txt
+++ b/deps/v8/test/inspector/runtime/evaluate-async-expected.txt
@@ -25,10 +25,6 @@ Running test: testRejectedPromise
}
exceptionId : <exceptionId>
lineNumber : 0
- stackTrace : {
- callFrames : [
- ]
- }
text : Uncaught (in promise)
}
result : {
diff --git a/deps/v8/test/inspector/runtime/evaluate-async-with-wrap-error.js b/deps/v8/test/inspector/runtime/evaluate-async-with-wrap-error.js
index 676b843a97..43b71ada32 100644
--- a/deps/v8/test/inspector/runtime/evaluate-async-with-wrap-error.js
+++ b/deps/v8/test/inspector/runtime/evaluate-async-with-wrap-error.js
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Test that Runtime.evaluate correctly process errors during wrapping \
-async result.");
+let {session, contextGroup, Protocol} = InspectorTest.start("Test that " +
+ "Runtime.evaluate correctly process errors during wrapping async result.");
var evaluateArguments = {
expression: "Promise.resolve(Symbol(123))",
diff --git a/deps/v8/test/inspector/runtime/evaluate-async.js b/deps/v8/test/inspector/runtime/evaluate-async.js
index c7ccc17f62..db02d9c150 100644
--- a/deps/v8/test/inspector/runtime/evaluate-async.js
+++ b/deps/v8/test/inspector/runtime/evaluate-async.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Tests that Runtime.evaluate works with awaitPromise flag.");
+let {session, contextGroup, Protocol} = InspectorTest.start("Tests that Runtime.evaluate works with awaitPromise flag.");
-InspectorTest.addScript(`
+contextGroup.addScript(`
function createPromiseAndScheduleResolve()
{
var resolveCallback;
diff --git a/deps/v8/test/inspector/runtime/evaluate-empty-stack.js b/deps/v8/test/inspector/runtime/evaluate-empty-stack.js
index 0147401112..c09dfd18b8 100644
--- a/deps/v8/test/inspector/runtime/evaluate-empty-stack.js
+++ b/deps/v8/test/inspector/runtime/evaluate-empty-stack.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Tests that Runtime.evaluate works with an empty stack");
+let {session, contextGroup, Protocol} = InspectorTest.start("Tests that Runtime.evaluate works with an empty stack");
-InspectorTest.addScript("var text = [48116210, 34460128, 1406661984071834]");
+contextGroup.addScript("var text = [48116210, 34460128, 1406661984071834]");
var message = { expression: "text.map(x => x.toString(36)).join(' ')" };
diff --git a/deps/v8/test/inspector/runtime/evaluate-with-context-id-equal-zero-expected.txt b/deps/v8/test/inspector/runtime/evaluate-with-context-id-equal-zero-expected.txt
index 9521a06c06..5e26aa9b46 100644
--- a/deps/v8/test/inspector/runtime/evaluate-with-context-id-equal-zero-expected.txt
+++ b/deps/v8/test/inspector/runtime/evaluate-with-context-id-equal-zero-expected.txt
@@ -6,4 +6,3 @@ Tests that DevTools doesn't crash on Runtime.evaluate with contextId equals 0.
}
id : <messageId>
}
-
diff --git a/deps/v8/test/inspector/runtime/evaluate-with-context-id-equal-zero.js b/deps/v8/test/inspector/runtime/evaluate-with-context-id-equal-zero.js
index c55284ae55..272c820115 100644
--- a/deps/v8/test/inspector/runtime/evaluate-with-context-id-equal-zero.js
+++ b/deps/v8/test/inspector/runtime/evaluate-with-context-id-equal-zero.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Tests that DevTools doesn't crash on Runtime.evaluate with contextId equals 0.");
+let {session, contextGroup, Protocol} = InspectorTest.start("Tests that DevTools doesn't crash on Runtime.evaluate with contextId equals 0.");
Protocol.Runtime.evaluate({ "contextId": 0, "expression": "" })
.then(message => InspectorTest.logMessage(message))
diff --git a/deps/v8/test/inspector/runtime/evaluate-with-generate-preview.js b/deps/v8/test/inspector/runtime/evaluate-with-generate-preview.js
index 1387413344..8ea0ea4faf 100644
--- a/deps/v8/test/inspector/runtime/evaluate-with-generate-preview.js
+++ b/deps/v8/test/inspector/runtime/evaluate-with-generate-preview.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Tests that Runtime.evaluate will generate correct previews.");
+let {session, contextGroup, Protocol} = InspectorTest.start("Tests that Runtime.evaluate will generate correct previews.");
-InspectorTest.addScript(
+contextGroup.addScript(
`
var f1 = function(){};
@@ -62,10 +62,10 @@ Object.defineProperty(parentObj, 'propNotNamedProto', {
set: function() {}
});
var objInheritsGetterProperty = {__proto__: parentObj};
-allowAccessorFormatting(objInheritsGetterProperty);
+inspector.allowAccessorFormatting(objInheritsGetterProperty);
`);
-InspectorTest.setupInjectedScriptEnvironment();
+contextGroup.setupInjectedScriptEnvironment();
InspectorTest.runTestSuite([
function testObjectPropertiesPreview(next)
diff --git a/deps/v8/test/inspector/runtime/exception-thrown-expected.txt b/deps/v8/test/inspector/runtime/exception-thrown-expected.txt
index 228c348298..fb4cf70ae0 100644
--- a/deps/v8/test/inspector/runtime/exception-thrown-expected.txt
+++ b/deps/v8/test/inspector/runtime/exception-thrown-expected.txt
@@ -77,10 +77,6 @@ Check that exceptionThrown is supported by test runner.
executionContextId : <executionContextId>
lineNumber : 0
scriptId : <scriptId>
- stackTrace : {
- callFrames : [
- ]
- }
text : Uncaught SyntaxError: Unexpected token }
}
timestamp : <timestamp>
diff --git a/deps/v8/test/inspector/runtime/exception-thrown.js b/deps/v8/test/inspector/runtime/exception-thrown.js
index da437fc158..91f48bc0a8 100644
--- a/deps/v8/test/inspector/runtime/exception-thrown.js
+++ b/deps/v8/test/inspector/runtime/exception-thrown.js
@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Check that exceptionThrown is supported by test runner.")
+let {session, contextGroup, Protocol} = InspectorTest.start("Check that exceptionThrown is supported by test runner.")
Protocol.Runtime.enable();
Protocol.Runtime.onExceptionThrown(message => InspectorTest.logMessage(message));
Protocol.Runtime.evaluate({ expression: "setTimeout(() => { \n throw new Error() }, 0)" });
Protocol.Runtime.evaluate({ expression: "setTimeout(\" }\", 0)" });
Protocol.Runtime.evaluate({ expression: "setTimeout(() => { \n throw 239; }, 0)" });
-InspectorTest.completeTestAfterPendingTimeouts();
+InspectorTest.waitForPendingTasks().then(InspectorTest.completeTest);
diff --git a/deps/v8/test/inspector/runtime/get-properties-on-proxy-expected.txt b/deps/v8/test/inspector/runtime/get-properties-on-proxy-expected.txt
index b36c811771..339595608a 100644
--- a/deps/v8/test/inspector/runtime/get-properties-on-proxy-expected.txt
+++ b/deps/v8/test/inspector/runtime/get-properties-on-proxy-expected.txt
@@ -8,4 +8,4 @@ Check that while Runtime.getProperties call on proxy object no user defined trap
value : 0
}
}
-} \ No newline at end of file
+}
diff --git a/deps/v8/test/inspector/runtime/get-properties-on-proxy.js b/deps/v8/test/inspector/runtime/get-properties-on-proxy.js
index 71bbdc1878..b2981df290 100644
--- a/deps/v8/test/inspector/runtime/get-properties-on-proxy.js
+++ b/deps/v8/test/inspector/runtime/get-properties-on-proxy.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Check that while Runtime.getProperties call on proxy object no user defined trap will be executed.");
+let {session, contextGroup, Protocol} = InspectorTest.start("Check that while Runtime.getProperties call on proxy object no user defined trap will be executed.");
-InspectorTest.addScript(`
+contextGroup.addScript(`
var self = this;
function testFunction()
{
diff --git a/deps/v8/test/inspector/runtime/get-properties-preview-expected.txt b/deps/v8/test/inspector/runtime/get-properties-preview-expected.txt
index fd1f31a4c2..a3f4eb40f9 100644
--- a/deps/v8/test/inspector/runtime/get-properties-preview-expected.txt
+++ b/deps/v8/test/inspector/runtime/get-properties-preview-expected.txt
@@ -1,3 +1,4 @@
+Tests generated previews in Runtime.getProperties
p1 : Object
p2 : Object
p1 : {
@@ -29,4 +30,3 @@ p2 : {
}
]
}
-
diff --git a/deps/v8/test/inspector/runtime/get-properties-preview.js b/deps/v8/test/inspector/runtime/get-properties-preview.js
index 62d853a48d..92c6e56426 100644
--- a/deps/v8/test/inspector/runtime/get-properties-preview.js
+++ b/deps/v8/test/inspector/runtime/get-properties-preview.js
@@ -2,7 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.setupInjectedScriptEnvironment();
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests generated previews in Runtime.getProperties');
+
+contextGroup.setupInjectedScriptEnvironment();
Protocol.Runtime.evaluate({ "expression": "({p1: {a:1}, p2: {b:'foo', bb:'bar'}})" }).then(callbackEvaluate);
diff --git a/deps/v8/test/inspector/runtime/get-properties.js b/deps/v8/test/inspector/runtime/get-properties.js
index 2c1222b581..56a4c4be0b 100644
--- a/deps/v8/test/inspector/runtime/get-properties.js
+++ b/deps/v8/test/inspector/runtime/get-properties.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Checks Runtime.getProperties method');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks Runtime.getProperties method');
InspectorTest.runAsyncTestSuite([
async function testObject5() {
diff --git a/deps/v8/test/inspector/runtime/internal-properties-entries.js b/deps/v8/test/inspector/runtime/internal-properties-entries.js
index 4897bd139d..9555ae5558 100644
--- a/deps/v8/test/inspector/runtime/internal-properties-entries.js
+++ b/deps/v8/test/inspector/runtime/internal-properties-entries.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Checks internal [[Entries]] in Runtime.getProperties output');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks internal [[Entries]] in Runtime.getProperties output');
Protocol.Runtime.enable();
diff --git a/deps/v8/test/inspector/runtime/internal-properties.js b/deps/v8/test/inspector/runtime/internal-properties.js
index 2ee4c459fa..1e42f917ea 100644
--- a/deps/v8/test/inspector/runtime/internal-properties.js
+++ b/deps/v8/test/inspector/runtime/internal-properties.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Checks internal properties in Runtime.getProperties output');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks internal properties in Runtime.getProperties output');
-InspectorTest.addScript(`
+contextGroup.addScript(`
function* foo() {
yield 1;
}
diff --git a/deps/v8/test/inspector/runtime/length-or-size-description.js b/deps/v8/test/inspector/runtime/length-or-size-description.js
index ec3ed6d263..0006bfb61d 100644
--- a/deps/v8/test/inspector/runtime/length-or-size-description.js
+++ b/deps/v8/test/inspector/runtime/length-or-size-description.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Test that descriptions for arrays, maps, and sets include the correct length or size.")
+let {session, contextGroup, Protocol} = InspectorTest.start("Test that descriptions for arrays, maps, and sets include the correct length or size.")
-InspectorTest.setupInjectedScriptEnvironment();
+contextGroup.setupInjectedScriptEnvironment();
Promise.all([
testExpression("new Set()"),
diff --git a/deps/v8/test/inspector/runtime/property-on-console-proto-expected.txt b/deps/v8/test/inspector/runtime/property-on-console-proto-expected.txt
index 6e75294e82..f64914a2d0 100644
--- a/deps/v8/test/inspector/runtime/property-on-console-proto-expected.txt
+++ b/deps/v8/test/inspector/runtime/property-on-console-proto-expected.txt
@@ -9,4 +9,3 @@ Tests that property defined on console.__proto__ doesn't observable on other Obj
}
}
}
-
diff --git a/deps/v8/test/inspector/runtime/property-on-console-proto.js b/deps/v8/test/inspector/runtime/property-on-console-proto.js
index 29a206d210..c7ee6c2d14 100644
--- a/deps/v8/test/inspector/runtime/property-on-console-proto.js
+++ b/deps/v8/test/inspector/runtime/property-on-console-proto.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Tests that property defined on console.__proto__ doesn't observable on other Objects.");
+let {session, contextGroup, Protocol} = InspectorTest.start("Tests that property defined on console.__proto__ doesn't observable on other Objects.");
-InspectorTest.addScript(`
+contextGroup.addScript(`
function testFunction()
{
var amountOfProperties = 0;
diff --git a/deps/v8/test/inspector/runtime/protocol-works-with-different-locale-expected.txt b/deps/v8/test/inspector/runtime/protocol-works-with-different-locale-expected.txt
index ee70e94c2a..da9eccc694 100644
--- a/deps/v8/test/inspector/runtime/protocol-works-with-different-locale-expected.txt
+++ b/deps/v8/test/inspector/runtime/protocol-works-with-different-locale-expected.txt
@@ -1,3 +1,4 @@
+Tests that protocol works with different locales
Running test: consoleLogWithDefaultLocale
{
diff --git a/deps/v8/test/inspector/runtime/protocol-works-with-different-locale.js b/deps/v8/test/inspector/runtime/protocol-works-with-different-locale.js
index 950bfdbf6b..833b927c16 100644
--- a/deps/v8/test/inspector/runtime/protocol-works-with-different-locale.js
+++ b/deps/v8/test/inspector/runtime/protocol-works-with-different-locale.js
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests that protocol works with different locales');
+
Protocol.Runtime.enable();
Protocol.Runtime.onConsoleAPICalled(InspectorTest.logMessage);
diff --git a/deps/v8/test/inspector/runtime/run-script-async-expected.txt b/deps/v8/test/inspector/runtime/run-script-async-expected.txt
index c6a53caee6..fc1ce0eb97 100644
--- a/deps/v8/test/inspector/runtime/run-script-async-expected.txt
+++ b/deps/v8/test/inspector/runtime/run-script-async-expected.txt
@@ -175,10 +175,6 @@ Running test: testAwaitRejectedPromise
}
exceptionId : <exceptionId>
lineNumber : 0
- stackTrace : {
- callFrames : [
- ]
- }
text : Uncaught (in promise)
}
result : {
@@ -188,4 +184,4 @@ Running test: testAwaitRejectedPromise
}
}
}
-} \ No newline at end of file
+}
diff --git a/deps/v8/test/inspector/runtime/run-script-async.js b/deps/v8/test/inspector/runtime/run-script-async.js
index a99d1efc3e..484ad37ef9 100644
--- a/deps/v8/test/inspector/runtime/run-script-async.js
+++ b/deps/v8/test/inspector/runtime/run-script-async.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Tests that Runtime.compileScript and Runtime.runScript work with awaitPromise flag.");
+let {session, contextGroup, Protocol} = InspectorTest.start("Tests that Runtime.compileScript and Runtime.runScript work with awaitPromise flag.");
InspectorTest.runTestSuite([
function testRunAndCompileWithoutAgentEnable(next)
diff --git a/deps/v8/test/inspector/runtime/runtime-evaluate-with-dirty-context.js b/deps/v8/test/inspector/runtime/runtime-evaluate-with-dirty-context.js
index 32c2e325cc..5f42d49abd 100644
--- a/deps/v8/test/inspector/runtime/runtime-evaluate-with-dirty-context.js
+++ b/deps/v8/test/inspector/runtime/runtime-evaluate-with-dirty-context.js
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log('Checks that Runtime.evaluate works with dirty context.');
-InspectorTest.setupInjectedScriptEnvironment();
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks that Runtime.evaluate works with dirty context.');
+contextGroup.setupInjectedScriptEnvironment();
Protocol.Runtime.enable();
Protocol.Runtime.onConsoleAPICalled(InspectorTest.logMessage);
Protocol.Runtime.evaluate({expression: 'console.log(42)'})
diff --git a/deps/v8/test/inspector/runtime/runtime-restore.js b/deps/v8/test/inspector/runtime/runtime-restore.js
index 5c2fea5768..09e44677e5 100644
--- a/deps/v8/test/inspector/runtime/runtime-restore.js
+++ b/deps/v8/test/inspector/runtime/runtime-restore.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.v8
-InspectorTest.log('Checks that Runtime agent correctly restore its state.');
+let {session, contextGroup, Protocol} = InspectorTest.start('Checks that Runtime agent correctly restore its state.');
-InspectorTest.addScript(`
+contextGroup.addScript(`
var formatter = {
header: function(x)
{
@@ -56,9 +56,9 @@ InspectorTest.runTestSuite([
function testSetCustomObjectFormatterEnabled(next) {
Protocol.Runtime.onConsoleAPICalled(InspectorTest.logMessage);
- // cleanup console message storage
- reconnect();
- Protocol.Runtime.enable()
+ Protocol.Runtime.discardConsoleEntries()
+ .then(reconnect)
+ .then(() => Protocol.Runtime.enable())
.then(() => Protocol.Runtime.setCustomObjectFormatterEnabled({ enabled: true }))
.then(reconnect)
.then(() => Protocol.Runtime.evaluate({ expression: 'console.log({ name: 42 })'}))
@@ -73,5 +73,5 @@ InspectorTest.runTestSuite([
function reconnect() {
InspectorTest.logMessage('will reconnect..');
- utils.reconnect();
+ session.reconnect();
}
diff --git a/deps/v8/test/inspector/runtime/set-or-map-entries.js b/deps/v8/test/inspector/runtime/set-or-map-entries.js
index 300b842154..4206c87de3 100644
--- a/deps/v8/test/inspector/runtime/set-or-map-entries.js
+++ b/deps/v8/test/inspector/runtime/set-or-map-entries.js
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-InspectorTest.log("Test that Runtime.getProperties doesn't truncate set and map entries in internalProperties.")
+let {session, contextGroup, Protocol} = InspectorTest.start("Test that Runtime.getProperties doesn't truncate set and map entries in internalProperties.")
-InspectorTest.addScript(`
+contextGroup.addScript(`
function createSet(size) {
var s = new Set();
var a = {};
@@ -22,7 +22,7 @@ InspectorTest.addScript(`
}
`);
-InspectorTest.setupInjectedScriptEnvironment();
+contextGroup.setupInjectedScriptEnvironment();
Protocol.Debugger.enable();
Protocol.Runtime.enable();
diff --git a/deps/v8/test/inspector/task-runner.cc b/deps/v8/test/inspector/task-runner.cc
index 577ab306c7..79ccc8a8ec 100644
--- a/deps/v8/test/inspector/task-runner.cc
+++ b/deps/v8/test/inspector/task-runner.cc
@@ -12,15 +12,20 @@
namespace {
-const int kTaskRunnerIndex = 2;
-const int kContextGroupIdIndex = 3;
-
void ReportUncaughtException(v8::Isolate* isolate,
const v8::TryCatch& try_catch) {
CHECK(try_catch.HasCaught());
v8::HandleScope handle_scope(isolate);
std::string message = *v8::String::Utf8Value(try_catch.Message()->Get());
- fprintf(stderr, "Unhandle exception: %s\n", message.data());
+ int line = try_catch.Message()
+ ->GetLineNumber(isolate->GetCurrentContext())
+ .FromJust();
+ std::string source_line =
+ *v8::String::Utf8Value(try_catch.Message()
+ ->GetSourceLine(isolate->GetCurrentContext())
+ .ToLocalChecked());
+ fprintf(stderr, "Unhandle exception: %s @%s[%d]\n", message.data(),
+ source_line.data(), line);
}
v8::internal::Vector<uint16_t> ToVector(v8::Local<v8::String> str) {
@@ -32,14 +37,18 @@ v8::internal::Vector<uint16_t> ToVector(v8::Local<v8::String> str) {
} // namespace
-TaskRunner::TaskRunner(v8::ExtensionConfiguration* extensions,
+TaskRunner::TaskRunner(IsolateData::SetupGlobalTasks setup_global_tasks,
bool catch_exceptions,
- v8::base::Semaphore* ready_semaphore)
+ v8::base::Semaphore* ready_semaphore,
+ v8::StartupData* startup_data,
+ InspectorClientImpl::FrontendChannel* channel)
: Thread(Options("Task Runner")),
- extensions_(extensions),
+ setup_global_tasks_(std::move(setup_global_tasks)),
+ startup_data_(startup_data),
+ channel_(channel),
catch_exceptions_(catch_exceptions),
ready_semaphore_(ready_semaphore),
- isolate_(nullptr),
+ data_(nullptr),
process_queue_semaphore_(0),
nested_loop_count_(0) {
Start();
@@ -47,45 +56,10 @@ TaskRunner::TaskRunner(v8::ExtensionConfiguration* extensions,
TaskRunner::~TaskRunner() { Join(); }
-void TaskRunner::InitializeIsolate() {
- v8::Isolate::CreateParams params;
- params.array_buffer_allocator =
- v8::ArrayBuffer::Allocator::NewDefaultAllocator();
- isolate_ = v8::Isolate::New(params);
- isolate_->SetMicrotasksPolicy(v8::MicrotasksPolicy::kScoped);
- v8::Isolate::Scope isolate_scope(isolate_);
- v8::HandleScope handle_scope(isolate_);
- NewContextGroup();
- if (ready_semaphore_) ready_semaphore_->Signal();
-}
-
-v8::Local<v8::Context> TaskRunner::NewContextGroup() {
- v8::Local<v8::ObjectTemplate> global_template =
- v8::ObjectTemplate::New(isolate_);
- v8::Local<v8::Context> context =
- v8::Context::New(isolate_, extensions_, global_template);
- context->SetAlignedPointerInEmbedderData(kTaskRunnerIndex, this);
- intptr_t context_group_id = ++last_context_group_id_;
- // Should be 2-byte aligned.
- context->SetAlignedPointerInEmbedderData(
- kContextGroupIdIndex, reinterpret_cast<void*>(context_group_id * 2));
- contexts_[context_group_id].Reset(isolate_, context);
- return context;
-}
-
-v8::Local<v8::Context> TaskRunner::GetContext(int context_group_id) {
- return contexts_[context_group_id].Get(isolate_);
-}
-
-int TaskRunner::GetContextGroupId(v8::Local<v8::Context> context) {
- return static_cast<int>(
- reinterpret_cast<intptr_t>(
- context->GetAlignedPointerFromEmbedderData(kContextGroupIdIndex)) /
- 2);
-}
-
void TaskRunner::Run() {
- InitializeIsolate();
+ data_.reset(new IsolateData(this, std::move(setup_global_tasks_),
+ startup_data_, channel_));
+ if (ready_semaphore_) ready_semaphore_->Signal();
RunMessageLoop(false);
}
@@ -94,19 +68,19 @@ void TaskRunner::RunMessageLoop(bool only_protocol) {
while (nested_loop_count_ == loop_number && !is_terminated_.Value()) {
TaskRunner::Task* task = GetNext(only_protocol);
if (!task) return;
- v8::Isolate::Scope isolate_scope(isolate_);
+ v8::Isolate::Scope isolate_scope(isolate());
if (catch_exceptions_) {
- v8::TryCatch try_catch(isolate_);
- task->Run(isolate_, contexts_.begin()->second);
+ v8::TryCatch try_catch(isolate());
+ task->RunOnIsolate(data_.get());
delete task;
if (try_catch.HasCaught()) {
- ReportUncaughtException(isolate_, try_catch);
+ ReportUncaughtException(isolate(), try_catch);
fflush(stdout);
fflush(stderr);
_exit(0);
}
} else {
- task->Run(isolate_, contexts_.begin()->second);
+ task->RunOnIsolate(data_.get());
delete task;
}
}
@@ -127,19 +101,6 @@ void TaskRunner::Terminate() {
process_queue_semaphore_.Signal();
}
-void TaskRunner::RegisterModule(v8::internal::Vector<uint16_t> name,
- v8::Local<v8::Module> module) {
- modules_[name] = v8::Global<v8::Module>(isolate_, module);
-}
-
-v8::MaybeLocal<v8::Module> TaskRunner::ModuleResolveCallback(
- v8::Local<v8::Context> context, v8::Local<v8::String> specifier,
- v8::Local<v8::Module> referrer) {
- std::string str = *v8::String::Utf8Value(specifier);
- TaskRunner* runner = TaskRunner::FromContext(context);
- return runner->modules_[ToVector(specifier)].Get(runner->isolate_);
-}
-
TaskRunner::Task* TaskRunner::GetNext(bool only_protocol) {
for (;;) {
if (is_terminated_.Value()) return nullptr;
@@ -159,60 +120,55 @@ TaskRunner::Task* TaskRunner::GetNext(bool only_protocol) {
return nullptr;
}
-TaskRunner* TaskRunner::FromContext(v8::Local<v8::Context> context) {
- return static_cast<TaskRunner*>(
- context->GetAlignedPointerFromEmbedderData(kTaskRunnerIndex));
+AsyncTask::AsyncTask(IsolateData* data, const char* task_name)
+ : instrumenting_(data && task_name) {
+ if (!instrumenting_) return;
+ data->inspector()->inspector()->asyncTaskScheduled(
+ v8_inspector::StringView(reinterpret_cast<const uint8_t*>(task_name),
+ strlen(task_name)),
+ this, false);
}
-AsyncTask::AsyncTask(const char* task_name,
- v8_inspector::V8Inspector* inspector)
- : inspector_(task_name ? inspector : nullptr) {
- if (inspector_) {
- inspector_->asyncTaskScheduled(
- v8_inspector::StringView(reinterpret_cast<const uint8_t*>(task_name),
- strlen(task_name)),
- this, false);
- }
-}
-
-void AsyncTask::Run(v8::Isolate* isolate,
- const v8::Global<v8::Context>& context) {
- if (inspector_) inspector_->asyncTaskStarted(this);
- AsyncRun(isolate, context);
- if (inspector_) inspector_->asyncTaskFinished(this);
+void AsyncTask::Run() {
+ if (instrumenting_) data()->inspector()->inspector()->asyncTaskStarted(this);
+ AsyncRun();
+ if (instrumenting_) data()->inspector()->inspector()->asyncTaskFinished(this);
}
ExecuteStringTask::ExecuteStringTask(
+ IsolateData* data, int context_group_id, const char* task_name,
const v8::internal::Vector<uint16_t>& expression,
v8::Local<v8::String> name, v8::Local<v8::Integer> line_offset,
- v8::Local<v8::Integer> column_offset, v8::Local<v8::Boolean> is_module,
- const char* task_name, v8_inspector::V8Inspector* inspector)
- : AsyncTask(task_name, inspector),
+ v8::Local<v8::Integer> column_offset, v8::Local<v8::Boolean> is_module)
+ : AsyncTask(data, task_name),
expression_(expression),
name_(ToVector(name)),
line_offset_(line_offset.As<v8::Int32>()->Value()),
column_offset_(column_offset.As<v8::Int32>()->Value()),
- is_module_(is_module->Value()) {}
+ is_module_(is_module->Value()),
+ context_group_id_(context_group_id) {}
ExecuteStringTask::ExecuteStringTask(
- const v8::internal::Vector<const char>& expression)
- : AsyncTask(nullptr, nullptr), expression_utf8_(expression) {}
+ const v8::internal::Vector<const char>& expression, int context_group_id)
+ : AsyncTask(nullptr, nullptr),
+ expression_utf8_(expression),
+ context_group_id_(context_group_id) {}
-void ExecuteStringTask::AsyncRun(v8::Isolate* isolate,
- const v8::Global<v8::Context>& context) {
- v8::MicrotasksScope microtasks_scope(isolate,
+void ExecuteStringTask::AsyncRun() {
+ v8::MicrotasksScope microtasks_scope(isolate(),
v8::MicrotasksScope::kRunMicrotasks);
- v8::HandleScope handle_scope(isolate);
- v8::Local<v8::Context> local_context = context.Get(isolate);
- v8::Context::Scope context_scope(local_context);
+ v8::HandleScope handle_scope(isolate());
+ v8::Local<v8::Context> context = data()->GetContext(context_group_id_);
+ v8::Context::Scope context_scope(context);
v8::Local<v8::String> name =
- v8::String::NewFromTwoByte(isolate, name_.start(),
+ v8::String::NewFromTwoByte(isolate(), name_.start(),
v8::NewStringType::kNormal, name_.length())
.ToLocalChecked();
- v8::Local<v8::Integer> line_offset = v8::Integer::New(isolate, line_offset_);
+ v8::Local<v8::Integer> line_offset =
+ v8::Integer::New(isolate(), line_offset_);
v8::Local<v8::Integer> column_offset =
- v8::Integer::New(isolate, column_offset_);
+ v8::Integer::New(isolate(), column_offset_);
v8::ScriptOrigin origin(
name, line_offset, column_offset,
@@ -221,15 +177,15 @@ void ExecuteStringTask::AsyncRun(v8::Isolate* isolate,
/* source_map_url */ v8::Local<v8::Value>(),
/* resource_is_opaque */ v8::Local<v8::Boolean>(),
/* is_wasm */ v8::Local<v8::Boolean>(),
- v8::Boolean::New(isolate, is_module_));
+ v8::Boolean::New(isolate(), is_module_));
v8::Local<v8::String> source;
if (expression_.length()) {
- source = v8::String::NewFromTwoByte(isolate, expression_.start(),
+ source = v8::String::NewFromTwoByte(isolate(), expression_.start(),
v8::NewStringType::kNormal,
expression_.length())
.ToLocalChecked();
} else {
- source = v8::String::NewFromUtf8(isolate, expression_utf8_.start(),
+ source = v8::String::NewFromUtf8(isolate(), expression_utf8_.start(),
v8::NewStringType::kNormal,
expression_utf8_.length())
.ToLocalChecked();
@@ -238,22 +194,11 @@ void ExecuteStringTask::AsyncRun(v8::Isolate* isolate,
v8::ScriptCompiler::Source scriptSource(source, origin);
if (!is_module_) {
v8::Local<v8::Script> script;
- if (!v8::ScriptCompiler::Compile(local_context, &scriptSource)
- .ToLocal(&script))
+ if (!v8::ScriptCompiler::Compile(context, &scriptSource).ToLocal(&script))
return;
v8::MaybeLocal<v8::Value> result;
- result = script->Run(local_context);
+ result = script->Run(context);
} else {
- v8::Local<v8::Module> module;
- if (!v8::ScriptCompiler::CompileModule(isolate, &scriptSource)
- .ToLocal(&module)) {
- return;
- }
- if (!module->Instantiate(local_context, &TaskRunner::ModuleResolveCallback))
- return;
- v8::Local<v8::Value> result;
- if (!module->Evaluate(local_context).ToLocal(&result)) return;
- TaskRunner* runner = TaskRunner::FromContext(local_context);
- runner->RegisterModule(name_, module);
+ data()->RegisterModule(context, name_, &scriptSource);
}
}
diff --git a/deps/v8/test/inspector/task-runner.h b/deps/v8/test/inspector/task-runner.h
index 9bb135efb9..c99bc6c95a 100644
--- a/deps/v8/test/inspector/task-runner.h
+++ b/deps/v8/test/inspector/task-runner.h
@@ -15,16 +15,7 @@
#include "src/base/platform/platform.h"
#include "src/locked-queue-inl.h"
#include "src/vector.h"
-
-struct VectorCompare {
- bool operator()(const v8::internal::Vector<uint16_t>& lhs,
- const v8::internal::Vector<uint16_t>& rhs) const {
- for (int i = 0; i < lhs.length() && i < rhs.length(); ++i) {
- if (lhs[i] != rhs[i]) return lhs[i] < rhs[i];
- }
- return false;
- }
-};
+#include "test/inspector/isolate-data.h"
class TaskRunner : public v8::base::Thread {
public:
@@ -32,13 +23,27 @@ class TaskRunner : public v8::base::Thread {
public:
virtual ~Task() {}
virtual bool is_inspector_task() = 0;
- virtual void Run(v8::Isolate* isolate,
- const v8::Global<v8::Context>& context) = 0;
+ void RunOnIsolate(IsolateData* data) {
+ data_ = data;
+ Run();
+ data_ = nullptr;
+ }
+
+ protected:
+ virtual void Run() = 0;
+ v8::Isolate* isolate() const { return data_->isolate(); }
+ IsolateData* data() const { return data_; }
+
+ private:
+ IsolateData* data_ = nullptr;
};
- TaskRunner(v8::ExtensionConfiguration* extensions, bool catch_exceptions,
- v8::base::Semaphore* ready_semaphore);
+ TaskRunner(IsolateData::SetupGlobalTasks setup_global_tasks,
+ bool catch_exceptions, v8::base::Semaphore* ready_semaphore,
+ v8::StartupData* startup_data,
+ InspectorClientImpl::FrontendChannel* channel);
virtual ~TaskRunner();
+ IsolateData* data() const { return data_.get(); }
// Thread implementation.
void Run() override;
@@ -50,31 +55,18 @@ class TaskRunner : public v8::base::Thread {
// TaskRunner takes ownership.
void Append(Task* task);
- static TaskRunner* FromContext(v8::Local<v8::Context>);
-
- v8::Local<v8::Context> NewContextGroup();
- v8::Local<v8::Context> GetContext(int context_group_id);
- static int GetContextGroupId(v8::Local<v8::Context> context);
-
void Terminate();
- void RegisterModule(v8::internal::Vector<uint16_t> name,
- v8::Local<v8::Module> module);
- static v8::MaybeLocal<v8::Module> ModuleResolveCallback(
- v8::Local<v8::Context> context, v8::Local<v8::String> specifier,
- v8::Local<v8::Module> referrer);
-
private:
- void InitializeIsolate();
Task* GetNext(bool only_protocol);
+ v8::Isolate* isolate() const { return data_->isolate(); }
- v8::ExtensionConfiguration* extensions_;
+ IsolateData::SetupGlobalTasks setup_global_tasks_;
+ v8::StartupData* startup_data_;
+ InspectorClientImpl::FrontendChannel* channel_;
bool catch_exceptions_;
v8::base::Semaphore* ready_semaphore_;
-
- v8::Isolate* isolate_;
- intptr_t last_context_group_id_ = 0;
- std::map<intptr_t, v8::Global<v8::Context>> contexts_;
+ std::unique_ptr<IsolateData> data_;
// deferred_queue_ combined with queue_ (in this order) have all tasks in the
// correct order. Sometimes we skip non-protocol tasks by moving them from
@@ -83,10 +75,6 @@ class TaskRunner : public v8::base::Thread {
v8::internal::LockedQueue<Task*> deffered_queue_;
v8::base::Semaphore process_queue_semaphore_;
- std::map<v8::internal::Vector<uint16_t>, v8::Global<v8::Module>,
- VectorCompare>
- modules_;
-
int nested_loop_count_;
v8::base::AtomicNumber<int> is_terminated_;
@@ -96,40 +84,39 @@ class TaskRunner : public v8::base::Thread {
class AsyncTask : public TaskRunner::Task {
public:
- AsyncTask(const char* task_name, v8_inspector::V8Inspector* inspector);
+ AsyncTask(IsolateData* data, const char* task_name);
virtual ~AsyncTask() = default;
- void Run(v8::Isolate* isolate,
- const v8::Global<v8::Context>& context) override;
- virtual void AsyncRun(v8::Isolate* isolate,
- const v8::Global<v8::Context>& context) = 0;
-
protected:
- v8_inspector::V8Inspector* inspector_;
+ virtual void AsyncRun() = 0;
+ void Run() override;
+
+ bool instrumenting_;
};
class ExecuteStringTask : public AsyncTask {
public:
- ExecuteStringTask(const v8::internal::Vector<uint16_t>& expression,
+ ExecuteStringTask(IsolateData* data, int context_group_id,
+ const char* task_name,
+ const v8::internal::Vector<uint16_t>& expression,
v8::Local<v8::String> name,
v8::Local<v8::Integer> line_offset,
v8::Local<v8::Integer> column_offset,
- v8::Local<v8::Boolean> is_module, const char* task_name,
- v8_inspector::V8Inspector* inspector);
- explicit ExecuteStringTask(
- const v8::internal::Vector<const char>& expression);
+ v8::Local<v8::Boolean> is_module);
+ ExecuteStringTask(const v8::internal::Vector<const char>& expression,
+ int context_group_id);
bool is_inspector_task() override { return false; }
- void AsyncRun(v8::Isolate* isolate,
- const v8::Global<v8::Context>& context) override;
-
private:
+ void AsyncRun() override;
+
v8::internal::Vector<uint16_t> expression_;
v8::internal::Vector<const char> expression_utf8_;
v8::internal::Vector<uint16_t> name_;
int32_t line_offset_ = 0;
int32_t column_offset_ = 0;
bool is_module_ = false;
+ int context_group_id_;
DISALLOW_COPY_AND_ASSIGN(ExecuteStringTask);
};
diff --git a/deps/v8/test/inspector/testcfg.py b/deps/v8/test/inspector/testcfg.py
index 8dea3c96e8..9c943d9848 100644
--- a/deps/v8/test/inspector/testcfg.py
+++ b/deps/v8/test/inspector/testcfg.py
@@ -5,6 +5,7 @@
import itertools
import os
import re
+import shlex
from testrunner.local import testsuite
from testrunner.local import utils
@@ -43,7 +44,7 @@ class InspectorProtocolTestSuite(testsuite.TestSuite):
flags = [] + context.mode_flags
flags_match = re.findall(FLAGS_PATTERN, source)
for match in flags_match:
- flags += match.strip().split()
+ flags += shlex.split(match.strip())
testname = testcase.path.split(os.path.sep)[-1]
testfilename = os.path.join(self.root, testcase.path + self.suffix())
protocoltestfilename = os.path.join(self.root, PROTOCOL_TEST_JS)
diff --git a/deps/v8/test/intl/date-format/date-format-to-parts.js b/deps/v8/test/intl/date-format/date-format-to-parts.js
index cd954acc79..fd04dc5bd0 100644
--- a/deps/v8/test/intl/date-format/date-format-to-parts.js
+++ b/deps/v8/test/intl/date-format/date-format-to-parts.js
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --datetime-format-to-parts
-
var d = new Date(2016, 11, 15, 14, 10, 34);
var df = Intl.DateTimeFormat("ja",
{hour: 'numeric', minute: 'numeric', second: 'numeric', year: 'numeric',
diff --git a/deps/v8/test/intl/general/case-mapping.js b/deps/v8/test/intl/general/case-mapping.js
index feb0ff54f6..0028c4150f 100644
--- a/deps/v8/test/intl/general/case-mapping.js
+++ b/deps/v8/test/intl/general/case-mapping.js
@@ -128,6 +128,8 @@ assertEquals("abci\u0307", "aBcI\u0307".toLowerCase());
assertEquals("abci\u0307", "aBcI\u0307".toLocaleLowerCase("fil"));
assertEquals("abci\u0307", "aBcI\u0307".toLocaleLowerCase("zh-Hant-TW"));
assertEquals("abci\u0307", "aBcI\u0307".toLocaleLowerCase("i-klingon"));
+assertEquals("abci\u0307", "aBcI\u0307".toLocaleLowerCase("i-enochian"));
+assertEquals("abci\u0307", "aBcI\u0307".toLocaleLowerCase("x-foobar"));
// Up to 8 chars are allowed for the primary language tag in BCP 47.
assertEquals("abci\u0307", "aBcI\u0307".toLocaleLowerCase("longlang"));
diff --git a/deps/v8/test/js-perf-test/BytecodeHandlers/compare.js b/deps/v8/test/js-perf-test/BytecodeHandlers/compare.js
new file mode 100644
index 0000000000..ea12ff4b21
--- /dev/null
+++ b/deps/v8/test/js-perf-test/BytecodeHandlers/compare.js
@@ -0,0 +1,157 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function addBenchmark(name, test) {
+ new BenchmarkSuite(name, [1000],
+ [
+ new Benchmark(name, false, false, 0, test)
+ ]);
+}
+
+addBenchmark('Smi-StrictEquals-True', SmiStrictEqualsTrue);
+addBenchmark('Smi-StrictEquals-False', SmiStrictEqualsFalse);
+addBenchmark('Number-StrictEquals-True', NumberStrictEqualsTrue);
+addBenchmark('Number-StrictEquals-False', NumberStrictEqualsFalse);
+addBenchmark('String-StrictEquals-True', StringStrictEqualsTrue);
+addBenchmark('String-StrictEquals-False', StringStrictEqualsFalse);
+addBenchmark('SmiString-StrictEquals', MixedStrictEquals);
+addBenchmark('Smi-Equals-True', SmiEqualsTrue);
+addBenchmark('Smi-Equals-False', SmiEqualsFalse);
+addBenchmark('Number-Equals-True', NumberEqualsTrue);
+addBenchmark('Number-Equals-False', NumberEqualsFalse);
+addBenchmark('String-Equals-True', StringEqualsTrue);
+addBenchmark('String-Equals-False', StringEqualsFalse);
+addBenchmark('SmiString-Equals', MixedEquals);
+addBenchmark('ObjectNull-Equals', ObjectEqualsNull);
+addBenchmark('Smi-RelationalCompare', SmiRelationalCompare);
+addBenchmark('Number-RelationalCompare', NumberRelationalCompare);
+addBenchmark('String-RelationalCompare', StringRelationalCompare);
+addBenchmark('SmiString-RelationalCompare', MixedRelationalCompare);
+
+var null_object;
+
+function strictEquals(a, b) {
+ for (var i = 0; i < 1000; ++i) {
+ a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b;
+ a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b;
+ a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b;
+ a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b;
+ a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b;
+ a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b;
+ a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b;
+ a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b;
+ a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b;
+ a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b; a === b;
+ }
+}
+
+function equals(a, b) {
+ for (var i = 0; i < 1000; ++i) {
+ a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b;
+ a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b;
+ a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b;
+ a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b;
+ a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b;
+ a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b;
+ a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b;
+ a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b;
+ a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b;
+ a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b; a == b;
+ }
+}
+
+// Relational comparison handlers are similar, so use one benchmark to measure
+// all of them.
+function relationalCompare(a, b) {
+ for (var i = 0; i < 1000; ++i) {
+ a > b; a > b; a > b; a > b; a > b; a > b; a > b; a > b; a > b; a > b;
+ a > b; a > b; a > b; a > b; a > b; a > b; a > b; a > b; a > b; a > b;
+ a > b; a > b; a > b; a > b; a > b; a > b; a > b; a > b; a > b; a > b;
+ a >= b; a >= b; a >= b; a >= b; a >= b; a >= b; a >= b; a >= b; a >= b; a >= b;
+ a >= b; a >= b; a >= b; a >= b; a >= b; a >= b; a >= b; a >= b; a >= b; a >= b;
+ a >= b; a >= b; a >= b; a >= b; a >= b; a >= b; a >= b; a >= b; a >= b; a >= b;
+ a < b; a < b; a < b; a < b; a < b; a < b; a < b; a < b; a < b; a < b;
+ a < b; a < b; a < b; a < b; a < b; a < b; a < b; a < b; a < b; a < b;
+ a < b; a < b; a < b; a < b; a < b; a < b; a < b; a < b; a < b; a < b;
+ a <= b; a <= b; a <= b; a <= b; a <= b; a <= b; a <= b; a <= b; a <= b; a <= b;
+ a <= b; a <= b; a <= b; a <= b; a <= b; a <= b; a <= b; a <= b; a <= b; a <= b;
+ a <= b; a <= b; a <= b; a <= b; a <= b; a <= b; a <= b; a <= b; a <= b; a <= b;
+ }
+}
+
+function SmiStrictEqualsFalse() {
+ strictEquals(10, 20);
+}
+
+function SmiStrictEqualsTrue() {
+ strictEquals(10, 10);
+}
+
+function NumberStrictEqualsFalse() {
+ strictEquals(0.3333, 0.3334);
+}
+
+function NumberStrictEqualsTrue() {
+ strictEquals(0.3333, 0.3333);
+}
+
+function StringStrictEqualsFalse() {
+ strictEquals("abc", "def");
+}
+
+function StringStrictEqualsTrue() {
+ strictEquals("abc", "abc");
+}
+
+function MixedStrictEquals() {
+ strictEquals(10, "10");
+}
+
+function SmiEqualsFalse() {
+ equals(10, 20);
+}
+
+function SmiEqualsTrue() {
+ equals(10, 10);
+}
+
+function NumberEqualsFalse() {
+ equals(0.3333, 0.3334);
+}
+
+function NumberEqualsTrue() {
+ equals(0.3333, 0.3333);
+}
+
+function StringEqualsFalse() {
+ equals("abc", "def");
+}
+
+function StringEqualsTrue() {
+ equals("abc", "abc");
+}
+
+function MixedEquals() {
+ equals(10, "10");
+}
+
+function ObjectEqualsNull(null_object) {
+ equals(null_object, null);
+}
+
+function SmiRelationalCompare() {
+ relationalCompare(10, 20);
+}
+
+function NumberRelationalCompare() {
+ relationalCompare(0.3333, 0.3334);
+}
+
+function StringRelationalCompare() {
+ relationalCompare("abc", "def");
+}
+
+function MixedRelationalCompare() {
+ relationalCompare(10, "10");
+}
diff --git a/deps/v8/test/js-perf-test/BytecodeHandlers/run.js b/deps/v8/test/js-perf-test/BytecodeHandlers/run.js
new file mode 100644
index 0000000000..9333e9313e
--- /dev/null
+++ b/deps/v8/test/js-perf-test/BytecodeHandlers/run.js
@@ -0,0 +1,29 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+
+load('../base.js');
+
+load('compare.js');
+
+var success = true;
+
+function PrintResult(name, result) {
+ print(name + '-BytecodeHandler(Score): ' + result);
+}
+
+function PrintStep(name) {}
+
+function PrintError(name, error) {
+ PrintResult(name, error);
+ success = false;
+}
+
+
+BenchmarkSuite.config.doWarmup = undefined;
+BenchmarkSuite.config.doDeterministic = undefined;
+
+BenchmarkSuite.RunSuites({ NotifyResult: PrintResult,
+ NotifyError: PrintError,
+ NotifyStep: PrintStep });
diff --git a/deps/v8/test/js-perf-test/ForLoops/for_loop.js b/deps/v8/test/js-perf-test/ForLoops/for_loop.js
new file mode 100644
index 0000000000..a7324b0c10
--- /dev/null
+++ b/deps/v8/test/js-perf-test/ForLoops/for_loop.js
@@ -0,0 +1,42 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+new BenchmarkSuite('Let-Standard', [1000], [
+ new Benchmark('Let-Standard', false, false, 0, LetLoop),
+]);
+
+new BenchmarkSuite('Var-Standard', [1000], [
+ new Benchmark('Var-Standard', false, false, 0, VarLoop),
+]);
+
+var x = [-1, 1, 4];
+var y = [-11, -1, 1, 2, 3, 4, 5, 6, 20, 44, 87, 99, 100];
+
+function LetLoop() {
+ "use strict";
+ const ret = [];
+ for (let i = 0; i < x.length; i++) {
+ for (let z = 0; z < y.length; z++) {
+ if (x[i] == y[z]) {
+ ret.push(x[i]);
+ break;
+ }
+ }
+ }
+ return ret;
+}
+
+function VarLoop() {
+ "use strict";
+ const ret = [];
+ for (var i = 0; i < x.length; i++) {
+ for (var z = 0; z < y.length; z++) {
+ if (x[i] == y[z]) {
+ ret.push(x[i]);
+ break;
+ }
+ }
+ }
+ return ret;
+}
diff --git a/deps/v8/test/js-perf-test/ForLoops/run.js b/deps/v8/test/js-perf-test/ForLoops/run.js
new file mode 100644
index 0000000000..3894d64ae9
--- /dev/null
+++ b/deps/v8/test/js-perf-test/ForLoops/run.js
@@ -0,0 +1,25 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+load('../base.js');
+load('for_loop.js');
+
+var success = true;
+
+function PrintResult(name, result) {
+ print(name + '-ForLoop(Score): ' + result);
+}
+
+
+function PrintError(name, error) {
+ PrintResult(name, error);
+ success = false;
+}
+
+
+BenchmarkSuite.config.doWarmup = undefined;
+BenchmarkSuite.config.doDeterministic = undefined;
+
+BenchmarkSuite.RunSuites({ NotifyResult: PrintResult,
+ NotifyError: PrintError });
diff --git a/deps/v8/test/js-perf-test/JSTests.json b/deps/v8/test/js-perf-test/JSTests.json
index 2911ea36ca..1b80626b28 100644
--- a/deps/v8/test/js-perf-test/JSTests.json
+++ b/deps/v8/test/js-perf-test/JSTests.json
@@ -34,30 +34,6 @@
"results_regexp": "^Generators\\-Generators\\(Score\\): (.+)$"
},
{
- "name": "GeneratorsIgnition",
- "path": ["Generators"],
- "main": "run.js",
- "resources": ["generators.js"],
- "flags": [
- "--harmony-function-sent",
- "--ignition"
- ],
- "results_regexp": "^Generators\\-Generators\\(Score\\): (.+)$"
- },
- {
- "name": "GeneratorsIgnitionTurbofan",
- "path": ["Generators"],
- "main": "run.js",
- "resources": ["generators.js"],
- "flags": [
- "--harmony-function-sent",
- "--ignition",
- "--turbo",
- "--turbo-from-bytecode"
- ],
- "results_regexp": "^Generators\\-Generators\\(Score\\): (.+)$"
- },
- {
"name": "RestParameters",
"path": ["RestParameters"],
"main": "run.js",
@@ -65,7 +41,9 @@
"units": "score",
"results_regexp": "^%s\\-RestParameters\\(Score\\): (.+)$",
"tests": [
- {"name": "Basic1"}
+ {"name": "Basic1"},
+ {"name": "ReturnArgsBabel"},
+ {"name": "ReturnArgsNative"}
]
},
{
@@ -382,6 +360,64 @@
{"name": "FastMap"},
{"name": "ObjectMap"}
]
+ },
+ {
+ "name": "ForLoops",
+ "path": ["ForLoops"],
+ "main": "run.js",
+ "resources": [
+ "for_loop.js"
+ ],
+ "results_regexp": "^%s\\-ForLoop\\(Score\\): (.+)$",
+ "tests": [
+ {"name": "Let-Standard"},
+ {"name": "Var-Standard"}
+ ]
+ },
+ {
+ "name": "Modules",
+ "path": ["Modules"],
+ "main": "run.js",
+ "resources": ["basic-export.js", "basic-import.js", "basic-namespace.js", "value.js"],
+ "flags": [
+ "--allow-natives-syntax",
+ "--harmony-dynamic-import"
+ ],
+ "results_regexp": "^%s\\-Modules\\(Score\\): (.+)$",
+ "tests": [
+ {"name": "BasicExport"},
+ {"name": "BasicImport"},
+ {"name": "BasicNamespace"}
+ ]
+ },
+ {
+ "name": "BytecodeHandlers",
+ "path": ["BytecodeHandlers"],
+ "main": "run.js",
+ "resources": [ "compare.js" ],
+ "flags": [ "--no-opt" ],
+ "results_regexp": "^%s\\-BytecodeHandler\\(Score\\): (.+)$",
+ "tests": [
+ {"name": "Smi-StrictEquals-True"},
+ {"name": "Smi-StrictEquals-False"},
+ {"name": "Number-StrictEquals-True"},
+ {"name": "Number-StrictEquals-False"},
+ {"name": "String-StrictEquals-True"},
+ {"name": "String-StrictEquals-False"},
+ {"name": "SmiString-StrictEquals"},
+ {"name": "Smi-Equals-True"},
+ {"name": "Smi-Equals-False"},
+ {"name": "Number-Equals-True"},
+ {"name": "Number-Equals-False"},
+ {"name": "String-Equals-True"},
+ {"name": "String-Equals-False"},
+ {"name": "ObjectNull-Equals"},
+ {"name": "SmiString-Equals"},
+ {"name": "Smi-RelationalCompare"},
+ {"name": "Number-RelationalCompare"},
+ {"name": "String-RelationalCompare"},
+ {"name": "SmiString-RelationalCompare"}
+ ]
}
]
}
diff --git a/deps/v8/test/js-perf-test/Modules/basic-export.js b/deps/v8/test/js-perf-test/Modules/basic-export.js
new file mode 100644
index 0000000000..3b889747af
--- /dev/null
+++ b/deps/v8/test/js-perf-test/Modules/basic-export.js
@@ -0,0 +1,7 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+export let value = 0;
+for (let i = 0; i < iterations; ++i) ++value;
+if (value != iterations) throw value;
diff --git a/deps/v8/test/js-perf-test/Modules/basic-import.js b/deps/v8/test/js-perf-test/Modules/basic-import.js
new file mode 100644
index 0000000000..be7be0f34c
--- /dev/null
+++ b/deps/v8/test/js-perf-test/Modules/basic-import.js
@@ -0,0 +1,8 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+import {value, set} from "value.js";
+for (let i = 0; i < iterations; ++i) set(value + 1);
+if (value != iterations) throw value;
+set(0);
diff --git a/deps/v8/test/js-perf-test/Modules/basic-namespace.js b/deps/v8/test/js-perf-test/Modules/basic-namespace.js
new file mode 100644
index 0000000000..4fcdcb5fd9
--- /dev/null
+++ b/deps/v8/test/js-perf-test/Modules/basic-namespace.js
@@ -0,0 +1,8 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+import * as m from "value.js";
+for (let i = 0; i < iterations; ++i) m.set(m.value + 1);
+if (m.value != iterations) throw m.value;
+m.set(0);
diff --git a/deps/v8/test/js-perf-test/Modules/run.js b/deps/v8/test/js-perf-test/Modules/run.js
new file mode 100644
index 0000000000..81174d2aa7
--- /dev/null
+++ b/deps/v8/test/js-perf-test/Modules/run.js
@@ -0,0 +1,63 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+
+load('../base.js');
+
+
+new BenchmarkSuite('BasicExport', [100], [
+ new Benchmark('BasicExport', false, false, 0, BasicExport)
+]);
+
+new BenchmarkSuite('BasicImport', [100], [
+ new Benchmark('BasicImport', false, false, 0, BasicImport)
+]);
+
+new BenchmarkSuite('BasicNamespace', [100], [
+ new Benchmark('BasicNamespace', false, false, 0, BasicNamespace)
+]);
+
+
+const iterations = 3000000;
+
+
+function BasicExport() {
+ let success = false;
+ import("basic-export.js").then(_ => success = true);
+ %RunMicrotasks();
+ if (!success) throw new Error(666);
+}
+
+function BasicImport() {
+ let success = false;
+ import("basic-import.js").then(_ => success = true);
+ %RunMicrotasks();
+ if (!success) throw new Error(666);
+}
+
+function BasicNamespace() {
+ let success = false;
+ import("basic-namespace.js").then(_ => success = true);
+ %RunMicrotasks();
+ if (!success) throw new Error(666);
+}
+
+
+var success = true;
+
+function PrintResult(name, result) {
+ print(name + '-Modules(Score): ' + result);
+}
+
+function PrintError(name, error) {
+ PrintResult(name, error);
+ success = false;
+}
+
+
+BenchmarkSuite.config.doWarmup = undefined;
+BenchmarkSuite.config.doDeterministic = undefined;
+
+BenchmarkSuite.RunSuites({ NotifyResult: PrintResult,
+ NotifyError: PrintError });
diff --git a/deps/v8/test/js-perf-test/Modules/value.js b/deps/v8/test/js-perf-test/Modules/value.js
new file mode 100644
index 0000000000..8c6a88e7d1
--- /dev/null
+++ b/deps/v8/test/js-perf-test/Modules/value.js
@@ -0,0 +1,6 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+export let value = 0;
+export function set(x) { value = x };
diff --git a/deps/v8/test/js-perf-test/PropertyQueries/property-queries.js b/deps/v8/test/js-perf-test/PropertyQueries/property-queries.js
index f763d262d4..06146c752a 100644
--- a/deps/v8/test/js-perf-test/PropertyQueries/property-queries.js
+++ b/deps/v8/test/js-perf-test/PropertyQueries/property-queries.js
@@ -71,7 +71,10 @@ function IntArray(size) {
// Switch object's properties and elements to dictionary mode.
function MakeDictionaryMode(obj) {
obj.foo = 0;
+ obj.bar = 0;
+ // Delete the second-to-last property first to force normalization.
delete obj.foo;
+ delete obj.bar;
obj[1e9] = 0;
return obj;
}
diff --git a/deps/v8/test/js-perf-test/RestParameters/rest.js b/deps/v8/test/js-perf-test/RestParameters/rest.js
index cf52f5f45f..1e5f67a362 100644
--- a/deps/v8/test/js-perf-test/RestParameters/rest.js
+++ b/deps/v8/test/js-perf-test/RestParameters/rest.js
@@ -7,6 +7,18 @@ new BenchmarkSuite('Basic1', [1000], [
BasicRest1, BasicRest1Setup, BasicRest1TearDown)
]);
+new BenchmarkSuite('ReturnArgsBabel', [10000], [
+ new Benchmark('ReturnArgsBabel', false, false, 0,
+ ReturnArgsBabel, ReturnArgsBabelSetup,
+ ReturnArgsBabelTearDown)
+]);
+
+new BenchmarkSuite('ReturnArgsNative', [10000], [
+ new Benchmark('ReturnArgsNative', false, false, 0,
+ ReturnArgsNative, ReturnArgsNativeSetup,
+ ReturnArgsNativeTearDown)
+]);
+
// ----------------------------------------------------------------------------
var result;
@@ -28,3 +40,57 @@ function BasicRest1() {
function BasicRest1TearDown() {
return result == 550;
}
+
+// ----------------------------------------------------------------------------
+
+var length = 50;
+var numbers = Array.apply(null, {length}).map(Number.call, Number);
+var strings = numbers.map(String.call, String);
+
+function ReturnArgsBabelFunction(unused) {
+ "use strict";
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0),
+ _key = 1;
+ _key < _len; _key++) {
+ args[_key - 1] = arguments[_key];
+ }
+ return args;
+}
+
+function ReturnArgsBabelSetup() {
+ // Warm up with FAST_HOLEY_ELEMENTS
+ result = ReturnArgsBabelFunction(...strings);
+ // Warm up with FAST_HOLEY_SMI_ELEMENTS
+ result = ReturnArgsBabelFunction(...numbers);
+}
+
+function ReturnArgsBabel() {
+ result = ReturnArgsBabelFunction(...strings);
+ result = ReturnArgsBabelFunction(...numbers);
+}
+
+function ReturnArgsBabelTearDown() {
+ return result.indexOf(0) === 0;
+}
+
+// ----------------------------------------------------------------------------
+
+function ReturnArgsNativeFunction(unused, ...args) {
+ return args;
+}
+
+function ReturnArgsNativeSetup() {
+ // Warm up with FAST_HOLEY_ELEMENTS
+ result = ReturnArgsNativeFunction(...strings);
+ // Warm up with FAST_HOLEY_SMI_ELEMENTS
+ result = ReturnArgsNativeFunction(...numbers);
+}
+
+function ReturnArgsNative() {
+ result = ReturnArgsNativeFunction(...strings);
+ result = ReturnArgsNativeFunction(...numbers);
+}
+
+function ReturnArgsNativeTearDown() {
+ return result.indexOf(0) === 0;
+}
diff --git a/deps/v8/test/js-perf-test/SixSpeed.json b/deps/v8/test/js-perf-test/SixSpeed.json
index 0a0dcc024a..15a2792c6a 100644
--- a/deps/v8/test/js-perf-test/SixSpeed.json
+++ b/deps/v8/test/js-perf-test/SixSpeed.json
@@ -28,6 +28,31 @@
]
},
{
+ "name": "Classes",
+ "path": ["SixSpeed"],
+ "results_regexp": "^%s\\(Score\\): (.+)$",
+ "tests": [
+ {
+ "name": "ES5",
+ "main": "run.js",
+ "resources": ["classes/es5.js"],
+ "test_flags": ["classes/es5"]
+ },
+ {
+ "name": "Babel",
+ "main": "run.js",
+ "resources": ["classes/babel.js"],
+ "test_flags": ["classes/babel"]
+ },
+ {
+ "name": "ES6",
+ "main": "run.js",
+ "resources": ["classes/es6.js"],
+ "test_flags": ["classes/es6"]
+ }
+ ]
+ },
+ {
"name": "Computed property names in object literals",
"path": ["SixSpeed"],
"results_regexp": "^%s\\(Score\\): (.+)$",
@@ -92,6 +117,31 @@
]
},
{
+ "name": "Super",
+ "path": ["SixSpeed"],
+ "results_regexp": "^%s\\(Score\\): (.+)$",
+ "tests": [
+ {
+ "name": "ES5",
+ "main": "run.js",
+ "resources": ["super/es5.js"],
+ "test_flags": ["super/es5"]
+ },
+ {
+ "name": "Babel",
+ "main": "run.js",
+ "resources": ["super/babel.js"],
+ "test_flags": ["super/babel"]
+ },
+ {
+ "name": "ES6",
+ "main": "run.js",
+ "resources": ["super/es6.js"],
+ "test_flags": ["super/es6"]
+ }
+ ]
+ },
+ {
"name": "SuperSpread",
"path": ["SixSpeed"],
"flags": ["--future"],
@@ -142,6 +192,82 @@
"test_flags": ["spread_literal/es6"]
}
]
+ },
+ {
+ "name": "Map-Set has",
+ "path": ["SixSpeed"],
+ "results_regexp": "^%s\\(Score\\): (.+)$",
+ "tests": [
+ {
+ "name": "ES5",
+ "main": "run.js",
+ "resources": ["map_set_lookup/es5.js"],
+ "test_flags": ["map_set_lookup/es5"]
+ },
+ {
+ "name": "ES6",
+ "main": "run.js",
+ "resources": ["map_set_lookup/es6.js"],
+ "test_flags": ["map_set_lookup/es6"]
+ }
+ ]
+ },
+ {
+ "name": "Map-Set add-set-has",
+ "path": ["SixSpeed"],
+ "results_regexp": "^%s\\(Score\\): (.+)$",
+ "tests": [
+ {
+ "name": "ES5",
+ "main": "run.js",
+ "resources": ["map_set_add/es5.js"],
+ "test_flags": ["map_set_add/es5"]
+ },
+ {
+ "name": "ES6",
+ "main": "run.js",
+ "resources": ["map_set_add/es6.js"],
+ "test_flags": ["map_set_add/es6"]
+ }
+ ]
+ },
+ {
+ "name": "Map-Set add-set-has object",
+ "path": ["SixSpeed"],
+ "results_regexp": "^%s\\(Score\\): (.+)$",
+ "tests": [
+ {
+ "name": "ES5",
+ "main": "run.js",
+ "resources": ["map_set_object/es5.js"],
+ "test_flags": ["map_set_object/es5"]
+ },
+ {
+ "name": "ES6",
+ "main": "run.js",
+ "resources": ["map_set_object/es6.js"],
+ "test_flags": ["map_set_object/es6"]
+ }
+ ]
+ },
+ {
+ "name": "Map get string",
+ "path": ["SixSpeed"],
+ "results_regexp": "^%s\\(Score\\): (.+)$",
+ "tests": [
+ {
+ "name": "ES5",
+ "main": "run.js",
+ "resources": ["map_set_add/es5.js"],
+ "test_flags": ["map_set_add/es5"]
+ },
+ {
+ "name": "ES6",
+ "main": "run.js",
+ "resources": ["map_set_add/es6.js"],
+ "test_flags": ["map_set_add/es6"]
+ }
+ ]
}
]
}
diff --git a/deps/v8/test/js-perf-test/SixSpeed/classes/babel.js b/deps/v8/test/js-perf-test/SixSpeed/classes/babel.js
new file mode 100644
index 0000000000..e73ec1ae0c
--- /dev/null
+++ b/deps/v8/test/js-perf-test/SixSpeed/classes/babel.js
@@ -0,0 +1,51 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This benchmark is based on the six-speed benchmark build output.
+// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
+
+'use strict';
+
+new BenchmarkSuite('Babel', [1000], [
+ new Benchmark('Babel', false, false, 0, Babel),
+]);
+
+var _createClass = function() {
+ function defineProperties(target, props) {
+ for (var i = 0; i < props.length; i++) {
+ var descriptor = props[i];
+ descriptor.enumerable = descriptor.enumerable || false;
+ descriptor.configurable = true;
+ if ('value' in descriptor) descriptor.writable = true;
+ Object.defineProperty(target, descriptor.key, descriptor);
+ }
+ }
+ return function(Constructor, protoProps, staticProps) {
+ if (protoProps) defineProperties(Constructor.prototype, protoProps);
+ if (staticProps) defineProperties(Constructor, staticProps);
+ return Constructor;
+ };
+}();
+
+function _classCallCheck(instance, Constructor) {
+ if (!(instance instanceof Constructor)) {
+ throw new TypeError('Cannot call a class as a function');
+ }
+}
+
+var C = function() {
+ function C() {
+ _classCallCheck(this, C);
+
+ this.foo = 'bar';
+ }
+
+ _createClass(C, [{key: 'bar', value: function bar() {}}]);
+
+ return C;
+}();
+
+function Babel() {
+ return new C();
+}
diff --git a/deps/v8/test/js-perf-test/SixSpeed/classes/es5.js b/deps/v8/test/js-perf-test/SixSpeed/classes/es5.js
new file mode 100644
index 0000000000..410aa33b8d
--- /dev/null
+++ b/deps/v8/test/js-perf-test/SixSpeed/classes/es5.js
@@ -0,0 +1,20 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This benchmark is based on the six-speed benchmark build output.
+// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
+
+new BenchmarkSuite('ES5', [1000], [
+ new Benchmark('ES5', false, false, 0, ES5),
+]);
+
+function C() {
+ this.foo = 'bar';
+}
+
+C.prototype.bar = function() {};
+
+function ES5() {
+ return new C();
+};
diff --git a/deps/v8/test/js-perf-test/SixSpeed/classes/es6.js b/deps/v8/test/js-perf-test/SixSpeed/classes/es6.js
new file mode 100644
index 0000000000..d7ccc87e22
--- /dev/null
+++ b/deps/v8/test/js-perf-test/SixSpeed/classes/es6.js
@@ -0,0 +1,21 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This benchmark is based on the six-speed benchmark build output.
+// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
+
+new BenchmarkSuite('ES6', [1000], [
+ new Benchmark('ES6', false, false, 0, ES6),
+]);
+
+class C {
+ constructor() {
+ this.foo = 'bar';
+ }
+ bar() {}
+}
+
+function ES6() {
+ return new C();
+}
diff --git a/deps/v8/test/js-perf-test/SixSpeed/map_set_add/es5.js b/deps/v8/test/js-perf-test/SixSpeed/map_set_add/es5.js
new file mode 100644
index 0000000000..69f2907565
--- /dev/null
+++ b/deps/v8/test/js-perf-test/SixSpeed/map_set_add/es5.js
@@ -0,0 +1,21 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This benchmark is based on the six-speed benchmark build output.
+// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
+
+new BenchmarkSuite("ES5", [1000], [new Benchmark("ES5", false, false, 0, ES5)]);
+
+function ES5() {
+ var map = {}, set = [];
+
+ for (var i = 0; i < 250; i++) {
+ map[i] = i;
+ set.push(i);
+ }
+
+ map.foo = "bar";
+ set.push("bar");
+ return "foo" in map && set.indexOf("bar") >= 0;
+}
diff --git a/deps/v8/test/js-perf-test/SixSpeed/map_set_add/es6.js b/deps/v8/test/js-perf-test/SixSpeed/map_set_add/es6.js
new file mode 100644
index 0000000000..8ea533c5f9
--- /dev/null
+++ b/deps/v8/test/js-perf-test/SixSpeed/map_set_add/es6.js
@@ -0,0 +1,22 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This benchmark is based on the six-speed benchmark build output.
+// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
+
+new BenchmarkSuite("ES6", [1000], [new Benchmark("ES6", false, false, 0, ES6)]);
+
+function ES6() {
+ var map = new Map(), set = new Set();
+
+ for (var i = 0; i < 250; i++) {
+ map.set(i, i);
+ set.add(i);
+ }
+
+ map.set("foo", "bar");
+ set.add("bar");
+
+ return map.has("foo") && set.has("bar");
+}
diff --git a/deps/v8/test/js-perf-test/SixSpeed/map_set_lookup/es5.js b/deps/v8/test/js-perf-test/SixSpeed/map_set_lookup/es5.js
new file mode 100644
index 0000000000..ddc4ebad89
--- /dev/null
+++ b/deps/v8/test/js-perf-test/SixSpeed/map_set_lookup/es5.js
@@ -0,0 +1,32 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This benchmark is based on the six-speed benchmark build output.
+// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
+
+new BenchmarkSuite(
+ "ES5",
+ [1000],
+ [new Benchmark("ES5", false, false, 0, ES5, Setup)]
+);
+
+var keys, values, set, key;
+
+function Setup() {
+ (keys = []), (values = []), (set = []), (key = {});
+
+ for (var i = 0; i < 500; i++) {
+ keys.push(i);
+ values.push(i);
+ set.push(i);
+ }
+
+ keys.push(key);
+ values.push("bar");
+ set.push(key);
+}
+
+function ES5() {
+ return set.indexOf(key) >= 0 && keys.indexOf(key) >= 0;
+}
diff --git a/deps/v8/test/js-perf-test/SixSpeed/map_set_lookup/es6.js b/deps/v8/test/js-perf-test/SixSpeed/map_set_lookup/es6.js
new file mode 100644
index 0000000000..c12b4abf59
--- /dev/null
+++ b/deps/v8/test/js-perf-test/SixSpeed/map_set_lookup/es6.js
@@ -0,0 +1,30 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This benchmark is based on the six-speed benchmark build output.
+// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
+
+new BenchmarkSuite(
+ "ES6",
+ [1000],
+ [new Benchmark("ES6", false, false, 0, ES6, Setup)]
+);
+
+var map, set, key;
+
+function Setup() {
+ (map = new Map()), (set = new Set()), (key = {});
+
+ for (var i = 0; i < 500; i++) {
+ map.set(i, i);
+ set.add(i);
+ }
+
+ map.set(key, "bar");
+ set.add(key);
+}
+
+function ES6() {
+ return map.has(key) && set.has(key);
+}
diff --git a/deps/v8/test/js-perf-test/SixSpeed/map_set_object/es5.js b/deps/v8/test/js-perf-test/SixSpeed/map_set_object/es5.js
new file mode 100644
index 0000000000..9eba1fb2fc
--- /dev/null
+++ b/deps/v8/test/js-perf-test/SixSpeed/map_set_object/es5.js
@@ -0,0 +1,24 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This benchmark is based on the six-speed benchmark build output.
+// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
+
+new BenchmarkSuite("ES5", [1000], [new Benchmark("ES5", false, false, 0, ES5)]);
+
+function ES5() {
+ var keys = [], values = [], set = [], key = {};
+
+ for (var i = 0; i < 500; i++) {
+ keys.push(i);
+ values.push(i);
+ set.push(i);
+ }
+
+ keys.push(key);
+ values.push("bar");
+ set.push(key);
+
+ return set.indexOf(key) >= 0 && keys.indexOf(key) >= 0;
+}
diff --git a/deps/v8/test/js-perf-test/SixSpeed/map_set_object/es6.js b/deps/v8/test/js-perf-test/SixSpeed/map_set_object/es6.js
new file mode 100644
index 0000000000..ed24e16e3f
--- /dev/null
+++ b/deps/v8/test/js-perf-test/SixSpeed/map_set_object/es6.js
@@ -0,0 +1,22 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This benchmark is based on the six-speed benchmark build output.
+// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
+
+new BenchmarkSuite("ES6", [1000], [new Benchmark("ES6", false, false, 0, ES6)]);
+
+function ES6() {
+ var map = new Map(), set = new Set(), key = {};
+
+ for (var i = 0; i < 500; i++) {
+ map.set(i, i);
+ set.add(i);
+ }
+
+ map.set(key, "bar");
+ set.add(key);
+
+ return map.has(key) && set.has(key);
+}
diff --git a/deps/v8/test/js-perf-test/SixSpeed/map_string/es5.js b/deps/v8/test/js-perf-test/SixSpeed/map_string/es5.js
new file mode 100644
index 0000000000..98411082ef
--- /dev/null
+++ b/deps/v8/test/js-perf-test/SixSpeed/map_string/es5.js
@@ -0,0 +1,26 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This benchmark is based on the six-speed benchmark build output.
+// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
+
+new BenchmarkSuite(
+ "ES5",
+ [1000],
+ [new Benchmark("ES5", false, false, 0, ES5, Setup)]
+);
+
+var map;
+
+function Setup() {
+ map = {};
+
+ for (var i = 0; i < 500; i++) {
+ map[i] = i;
+ }
+}
+
+function ES5() {
+ return map["499"] === 499;
+}
diff --git a/deps/v8/test/js-perf-test/SixSpeed/map_string/es6.js b/deps/v8/test/js-perf-test/SixSpeed/map_string/es6.js
new file mode 100644
index 0000000000..5fa9c269f7
--- /dev/null
+++ b/deps/v8/test/js-perf-test/SixSpeed/map_string/es6.js
@@ -0,0 +1,26 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This benchmark is based on the six-speed benchmark build output.
+// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
+
+new BenchmarkSuite(
+ "ES6",
+ [1000],
+ [new Benchmark("ES6", false, false, 0, ES6, Setup)]
+);
+
+var map;
+
+function Setup() {
+ map = new Map();
+
+ for (var i = 0; i < 500; i++) {
+ map.set(i + "", i);
+ }
+}
+
+function ES6() {
+ return map.get("499") === 499;
+}
diff --git a/deps/v8/test/js-perf-test/SixSpeed/super/babel.js b/deps/v8/test/js-perf-test/SixSpeed/super/babel.js
new file mode 100644
index 0000000000..02ca7203aa
--- /dev/null
+++ b/deps/v8/test/js-perf-test/SixSpeed/super/babel.js
@@ -0,0 +1,135 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This benchmark is based on the six-speed benchmark build output.
+// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
+
+'use strict';
+
+new BenchmarkSuite('Babel', [1000], [
+ new Benchmark('Babel', false, false, 0, Babel),
+]);
+
+var _get = function get(object, property, receiver) {
+ if (object === null) object = Function.prototype;
+ var desc = Object.getOwnPropertyDescriptor(object, property);
+ if (desc === undefined) {
+ var parent = Object.getPrototypeOf(object);
+ if (parent === null) {
+ return undefined;
+ } else {
+ return get(parent, property, receiver);
+ }
+ } else if ('value' in desc) {
+ return desc.value;
+ } else {
+ var getter = desc.get;
+ if (getter === undefined) {
+ return undefined;
+ }
+ return getter.call(receiver);
+ }
+};
+
+var _createClass = function() {
+ function defineProperties(target, props) {
+ for (var i = 0; i < props.length; i++) {
+ var descriptor = props[i];
+ descriptor.enumerable = descriptor.enumerable || false;
+ descriptor.configurable = true;
+ if ('value' in descriptor) descriptor.writable = true;
+ Object.defineProperty(target, descriptor.key, descriptor);
+ }
+ }
+ return function(Constructor, protoProps, staticProps) {
+ if (protoProps) defineProperties(Constructor.prototype, protoProps);
+ if (staticProps) defineProperties(Constructor, staticProps);
+ return Constructor;
+ };
+}();
+
+function _possibleConstructorReturn(self, call) {
+ if (!self) {
+ throw new ReferenceError(
+ 'this hasn\'t been initialised - super() hasn\'t been called');
+ }
+ return call && (typeof call === 'object' || typeof call === 'function') ?
+ call :
+ self;
+}
+
+function _inherits(subClass, superClass) {
+ if (typeof superClass !== 'function' && superClass !== null) {
+ throw new TypeError(
+ 'Super expression must either be null or a function, not ' +
+ typeof superClass);
+ }
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
+ constructor: {
+ value: subClass,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+ if (superClass)
+ Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) :
+ subClass.__proto__ = superClass;
+}
+
+function _classCallCheck(instance, Constructor) {
+ if (!(instance instanceof Constructor)) {
+ throw new TypeError('Cannot call a class as a function');
+ }
+}
+
+var C = function() {
+ function C() {
+ _classCallCheck(this, C);
+
+ this.foo = 'bar';
+ }
+
+ _createClass(C, [{
+ key: 'bar',
+ value: function bar() {
+ return 41;
+ }
+ }]);
+
+ return C;
+}();
+
+var D = function(_C) {
+ _inherits(D, _C);
+
+ function D() {
+ _classCallCheck(this, D);
+
+ var _this = _possibleConstructorReturn(
+ this, (D.__proto__ || Object.getPrototypeOf(D)).call(this));
+
+ _this.baz = 'bat';
+ return _this;
+ }
+
+ _createClass(D, [{
+ key: 'bar',
+ value: function bar() {
+ return _get(
+ D.prototype.__proto__ ||
+ Object.getPrototypeOf(D.prototype),
+ 'bar', this)
+ .call(this) +
+ 1;
+ }
+ }]);
+
+ return D;
+}(C);
+
+function Babel() {
+ var d = new D();
+ return d.bar();
+}
diff --git a/deps/v8/test/js-perf-test/SixSpeed/super/es5.js b/deps/v8/test/js-perf-test/SixSpeed/super/es5.js
new file mode 100644
index 0000000000..5986fd19cc
--- /dev/null
+++ b/deps/v8/test/js-perf-test/SixSpeed/super/es5.js
@@ -0,0 +1,34 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This benchmark is based on the six-speed benchmark build output.
+// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
+
+new BenchmarkSuite('ES5', [1000], [
+ new Benchmark('ES5', false, false, 0, ES5),
+]);
+
+function C() {
+ this.foo = 'bar';
+}
+
+C.prototype.bar = function() {
+ return 41;
+};
+
+function D() {
+ C.call(this);
+ this.baz = 'bat';
+}
+
+D.prototype = Object.create(C.prototype);
+
+D.prototype.bar = function() {
+ return C.prototype.bar.call(this) + 1;
+};
+
+function ES5() {
+ var d = new D();
+ return d.bar();
+}
diff --git a/deps/v8/test/js-perf-test/SixSpeed/super/es6.js b/deps/v8/test/js-perf-test/SixSpeed/super/es6.js
new file mode 100644
index 0000000000..4855a4d684
--- /dev/null
+++ b/deps/v8/test/js-perf-test/SixSpeed/super/es6.js
@@ -0,0 +1,34 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This benchmark is based on the six-speed benchmark build output.
+// Copyright 2014 Kevin Decker <https://github.com/kpdecker/six-speed/>
+
+new BenchmarkSuite('ES6', [1000], [
+ new Benchmark('ES6', false, false, 0, ES6),
+]);
+
+class C {
+ constructor() {
+ this.foo = 'bar';
+ }
+ bar() {
+ return 41;
+ }
+}
+
+class D extends C {
+ constructor() {
+ super();
+ this.baz = 'bat';
+ }
+ bar() {
+ return super.bar() + 1;
+ }
+}
+
+function ES6() {
+ var d = new D();
+ return d.bar();
+}
diff --git a/deps/v8/test/message/arrow-invalid-rest-2.out b/deps/v8/test/message/arrow-invalid-rest-2.out
index ad6bcb034d..aef0fb0041 100644
--- a/deps/v8/test/message/arrow-invalid-rest-2.out
+++ b/deps/v8/test/message/arrow-invalid-rest-2.out
@@ -1,4 +1,4 @@
-*%(basename)s:7: SyntaxError: Unexpected token =
+*%(basename)s:7: SyntaxError: Rest parameter may not have a default initializer
var f = (a, ...x = 10) => x;
- ^
-SyntaxError: Unexpected token =
+ ^
+SyntaxError: Rest parameter may not have a default initializer
diff --git a/deps/v8/test/message/arrow-invalid-rest.out b/deps/v8/test/message/arrow-invalid-rest.out
index 99a8557f1e..520c67393f 100644
--- a/deps/v8/test/message/arrow-invalid-rest.out
+++ b/deps/v8/test/message/arrow-invalid-rest.out
@@ -1,4 +1,4 @@
-*%(basename)s:7: SyntaxError: Unexpected token =
+*%(basename)s:7: SyntaxError: Rest parameter may not have a default initializer
var f = (...x = 10) => x;
- ^
-SyntaxError: Unexpected token =
+ ^
+SyntaxError: Rest parameter may not have a default initializer
diff --git a/deps/v8/test/message/asm-assignment-undeclared.js b/deps/v8/test/message/asm-assignment-undeclared.js
index 61454c77e2..f7f530b5a2 100644
--- a/deps/v8/test/message/asm-assignment-undeclared.js
+++ b/deps/v8/test/message/asm-assignment-undeclared.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages --fast-validate-asm
+// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
function Module() {
"use asm"
diff --git a/deps/v8/test/message/asm-function-mismatch-def.js b/deps/v8/test/message/asm-function-mismatch-def.js
index bb570ba8db..84b46af397 100644
--- a/deps/v8/test/message/asm-function-mismatch-def.js
+++ b/deps/v8/test/message/asm-function-mismatch-def.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages --fast-validate-asm
+// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
// Violates asm.js because use of {g} in {f} has return type different from {g}.
diff --git a/deps/v8/test/message/asm-function-mismatch-use.js b/deps/v8/test/message/asm-function-mismatch-use.js
index 9aab940d7d..0f0935af88 100644
--- a/deps/v8/test/message/asm-function-mismatch-use.js
+++ b/deps/v8/test/message/asm-function-mismatch-use.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages --fast-validate-asm
+// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
// Violates asm.js because {g} has return type different from use of {g} in {f}.
diff --git a/deps/v8/test/message/asm-function-redefined.js b/deps/v8/test/message/asm-function-redefined.js
index 5281b057ed..77f6aac4d5 100644
--- a/deps/v8/test/message/asm-function-redefined.js
+++ b/deps/v8/test/message/asm-function-redefined.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages --fast-validate-asm
+// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
// Violates asm.js because symbol {f} is defined as module function twice.
diff --git a/deps/v8/test/message/asm-function-undefined.js b/deps/v8/test/message/asm-function-undefined.js
index 052ca7163b..ce39409963 100644
--- a/deps/v8/test/message/asm-function-undefined.js
+++ b/deps/v8/test/message/asm-function-undefined.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages --fast-validate-asm
+// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
function Module() {
"use asm"
diff --git a/deps/v8/test/message/asm-function-variable-collision.js b/deps/v8/test/message/asm-function-variable-collision.js
index 44c1c835fe..fbea44b1ad 100644
--- a/deps/v8/test/message/asm-function-variable-collision.js
+++ b/deps/v8/test/message/asm-function-variable-collision.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages --fast-validate-asm
+// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
// Violates asm.js because symbol {f} is used as module variable and function.
diff --git a/deps/v8/test/message/asm-import-wrong-annotation.js b/deps/v8/test/message/asm-import-wrong-annotation.js
new file mode 100644
index 0000000000..0b57c1a986
--- /dev/null
+++ b/deps/v8/test/message/asm-import-wrong-annotation.js
@@ -0,0 +1,11 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
+
+function Module(stdlib, foreign, heap) {
+ "use asm"
+ var x = foreign.x | 1;
+}
+Module(this, { x:0 });
diff --git a/deps/v8/test/message/asm-import-wrong-annotation.out b/deps/v8/test/message/asm-import-wrong-annotation.out
new file mode 100644
index 0000000000..dec52ddb49
--- /dev/null
+++ b/deps/v8/test/message/asm-import-wrong-annotation.out
@@ -0,0 +1,5 @@
+# Copyright 2017 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+*%(basename)s:9: Invalid asm.js: Expected |0 type annotation for foreign integer import
diff --git a/deps/v8/test/message/asm-import-wrong-object.js b/deps/v8/test/message/asm-import-wrong-object.js
new file mode 100644
index 0000000000..d077e04d91
--- /dev/null
+++ b/deps/v8/test/message/asm-import-wrong-object.js
@@ -0,0 +1,11 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
+
+function Module(stdlib, foreign, heap) {
+ "use asm"
+ var x = +stdlib.x;
+}
+Module(this, { x:0 });
diff --git a/deps/v8/test/message/asm-import-wrong-object.out b/deps/v8/test/message/asm-import-wrong-object.out
new file mode 100644
index 0000000000..f72d0863f9
--- /dev/null
+++ b/deps/v8/test/message/asm-import-wrong-object.out
@@ -0,0 +1,5 @@
+# Copyright 2017 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+*%(basename)s:9: Invalid asm.js: Unexpected token
diff --git a/deps/v8/test/message/asm-linking-bogus-heap.js b/deps/v8/test/message/asm-linking-bogus-heap.js
new file mode 100644
index 0000000000..a520dfb282
--- /dev/null
+++ b/deps/v8/test/message/asm-linking-bogus-heap.js
@@ -0,0 +1,15 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
+
+function Module(stdlib, foreign, heap) {
+ "use asm"
+ var a = new stdlib.Int8Array(heap);
+ function f() {
+ return a[0] | 0;
+ }
+ return { f:f };
+}
+Module(this, {}, new ArrayBuffer(1)).f();
diff --git a/deps/v8/test/message/asm-linking-bogus-heap.out b/deps/v8/test/message/asm-linking-bogus-heap.out
new file mode 100644
index 0000000000..5a324c1fea
--- /dev/null
+++ b/deps/v8/test/message/asm-linking-bogus-heap.out
@@ -0,0 +1,5 @@
+# Copyright 2017 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+*%(basename)s:7: Linking failure in asm.js: Unexpected heap size
diff --git a/deps/v8/test/message/asm-linking-bogus-stdlib.js b/deps/v8/test/message/asm-linking-bogus-stdlib.js
new file mode 100644
index 0000000000..0a64422440
--- /dev/null
+++ b/deps/v8/test/message/asm-linking-bogus-stdlib.js
@@ -0,0 +1,15 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
+
+function Module(stdlib, foreign, heap) {
+ "use asm"
+ var pi = stdlib.Math.PI;
+ function f() {
+ return +pi;
+ }
+ return { f:f };
+}
+Module({ Math: { PI:23 }}).f();
diff --git a/deps/v8/test/message/asm-linking-bogus-stdlib.out b/deps/v8/test/message/asm-linking-bogus-stdlib.out
new file mode 100644
index 0000000000..5f3021ece8
--- /dev/null
+++ b/deps/v8/test/message/asm-linking-bogus-stdlib.out
@@ -0,0 +1,5 @@
+# Copyright 2017 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+*%(basename)s:7: Linking failure in asm.js: Unexpected stdlib member
diff --git a/deps/v8/test/message/asm-linking-missing-heap.js b/deps/v8/test/message/asm-linking-missing-heap.js
new file mode 100644
index 0000000000..a33b59ad19
--- /dev/null
+++ b/deps/v8/test/message/asm-linking-missing-heap.js
@@ -0,0 +1,15 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
+
+function Module(stdlib, foreign, heap) {
+ "use asm"
+ var a = new stdlib.Int8Array(heap);
+ function f() {
+ return a[0] | 0;
+ }
+ return { f:f };
+}
+Module(this).f();
diff --git a/deps/v8/test/message/asm-linking-missing-heap.out b/deps/v8/test/message/asm-linking-missing-heap.out
new file mode 100644
index 0000000000..7bded84dec
--- /dev/null
+++ b/deps/v8/test/message/asm-linking-missing-heap.out
@@ -0,0 +1,5 @@
+# Copyright 2017 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+*%(basename)s:7: Linking failure in asm.js: Requires heap buffer
diff --git a/deps/v8/test/message/asm-missing-parameter-annotation.js b/deps/v8/test/message/asm-missing-parameter-annotation.js
index a9ab782b47..64a57a0c03 100644
--- a/deps/v8/test/message/asm-missing-parameter-annotation.js
+++ b/deps/v8/test/message/asm-missing-parameter-annotation.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages --fast-validate-asm
+// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
function Module() {
"use asm"
diff --git a/deps/v8/test/message/asm-missing-return-annotation.js b/deps/v8/test/message/asm-missing-return-annotation.js
index 48bfdd1366..0f57df8c27 100644
--- a/deps/v8/test/message/asm-missing-return-annotation.js
+++ b/deps/v8/test/message/asm-missing-return-annotation.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages --fast-validate-asm
+// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
function Module() {
"use asm"
diff --git a/deps/v8/test/message/asm-table-mismatch-def.js b/deps/v8/test/message/asm-table-mismatch-def.js
index 179f1925b3..47e692cc38 100644
--- a/deps/v8/test/message/asm-table-mismatch-def.js
+++ b/deps/v8/test/message/asm-table-mismatch-def.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages --fast-validate-asm
+// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
// Violates asm.js {funTable} definition doesn't match the use in {f}.
diff --git a/deps/v8/test/message/asm-table-mismatch-use.js b/deps/v8/test/message/asm-table-mismatch-use.js
index 85889f1466..7615ee4456 100644
--- a/deps/v8/test/message/asm-table-mismatch-use.js
+++ b/deps/v8/test/message/asm-table-mismatch-use.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages --fast-validate-asm
+// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
// Violates asm.js {funTable} use in {f} doesn't match its use in {g}.
diff --git a/deps/v8/test/message/asm-table-redefined.js b/deps/v8/test/message/asm-table-redefined.js
index 73b22860ee..bac6d67e5a 100644
--- a/deps/v8/test/message/asm-table-redefined.js
+++ b/deps/v8/test/message/asm-table-redefined.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages --fast-validate-asm
+// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
function Module() {
"use asm"
diff --git a/deps/v8/test/message/asm-table-undefined.js b/deps/v8/test/message/asm-table-undefined.js
index bef600a3a0..8092f56657 100644
--- a/deps/v8/test/message/asm-table-undefined.js
+++ b/deps/v8/test/message/asm-table-undefined.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages --fast-validate-asm
+// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
function Module() {
"use asm"
diff --git a/deps/v8/test/message/asm-table-variable-collision.js b/deps/v8/test/message/asm-table-variable-collision.js
index 7162b3a55b..da8e6195b8 100644
--- a/deps/v8/test/message/asm-table-variable-collision.js
+++ b/deps/v8/test/message/asm-table-variable-collision.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages --fast-validate-asm
+// Flags: --validate-asm --no-stress-opt --no-stress-validate-asm --no-suppress-asm-messages
function Module() {
"use asm"
diff --git a/deps/v8/test/message/async-arrow-invalid-rest-2.js b/deps/v8/test/message/async-arrow-invalid-rest-2.js
new file mode 100644
index 0000000000..ff5245f457
--- /dev/null
+++ b/deps/v8/test/message/async-arrow-invalid-rest-2.js
@@ -0,0 +1,8 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+//
+
+var f = async (a, ...x = 10) => x;
+f(1, 2, 3, 4, 5);
diff --git a/deps/v8/test/message/async-arrow-invalid-rest-2.out b/deps/v8/test/message/async-arrow-invalid-rest-2.out
new file mode 100644
index 0000000000..ff90771fbb
--- /dev/null
+++ b/deps/v8/test/message/async-arrow-invalid-rest-2.out
@@ -0,0 +1,4 @@
+*%(basename)s:7: SyntaxError: Rest parameter may not have a default initializer
+var f = async (a, ...x = 10) => x;
+ ^^
+SyntaxError: Rest parameter may not have a default initializer
diff --git a/deps/v8/test/message/async-arrow-invalid-rest.js b/deps/v8/test/message/async-arrow-invalid-rest.js
new file mode 100644
index 0000000000..c77a7eb4b4
--- /dev/null
+++ b/deps/v8/test/message/async-arrow-invalid-rest.js
@@ -0,0 +1,8 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+//
+
+var f = async (...x = 10) => x;
+f(1, 2, 3, 4, 5);
diff --git a/deps/v8/test/message/async-arrow-invalid-rest.out b/deps/v8/test/message/async-arrow-invalid-rest.out
new file mode 100644
index 0000000000..31fd1ab0e1
--- /dev/null
+++ b/deps/v8/test/message/async-arrow-invalid-rest.out
@@ -0,0 +1,4 @@
+*%(basename)s:7: SyntaxError: Rest parameter may not have a default initializer
+var f = async (...x = 10) => x;
+ ^^
+SyntaxError: Rest parameter may not have a default initializer
diff --git a/deps/v8/test/message/async-arrow-param-after-rest.js b/deps/v8/test/message/async-arrow-param-after-rest.js
new file mode 100644
index 0000000000..a050749a13
--- /dev/null
+++ b/deps/v8/test/message/async-arrow-param-after-rest.js
@@ -0,0 +1,7 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+//
+
+async (...x, y) => 10
diff --git a/deps/v8/test/message/async-arrow-param-after-rest.out b/deps/v8/test/message/async-arrow-param-after-rest.out
new file mode 100644
index 0000000000..51d8c879b2
--- /dev/null
+++ b/deps/v8/test/message/async-arrow-param-after-rest.out
@@ -0,0 +1,5 @@
+*%(basename)s:7: SyntaxError: Rest parameter must be last formal parameter
+async (...x, y) => 10
+ ^
+SyntaxError: Rest parameter must be last formal parameter
+
diff --git a/deps/v8/test/message/class-spread-property.js b/deps/v8/test/message/class-spread-property.js
new file mode 100644
index 0000000000..5887df538b
--- /dev/null
+++ b/deps/v8/test/message/class-spread-property.js
@@ -0,0 +1,5 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+class C { ...[] }
diff --git a/deps/v8/test/message/class-spread-property.out b/deps/v8/test/message/class-spread-property.out
new file mode 100644
index 0000000000..df15e50262
--- /dev/null
+++ b/deps/v8/test/message/class-spread-property.out
@@ -0,0 +1,4 @@
+*%(basename)s:5: SyntaxError: Unexpected token ...
+class C { ...[] }
+ ^^^
+SyntaxError: Unexpected token ... \ No newline at end of file
diff --git a/deps/v8/test/message/console.js b/deps/v8/test/message/console.js
new file mode 100644
index 0000000000..f49ce4c608
--- /dev/null
+++ b/deps/v8/test/message/console.js
@@ -0,0 +1,25 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --no-stress-opt
+
+console.time();
+console.timeEnd();
+
+console.time("abcd");
+console.timeEnd({ toString: () => "ab" + "cd" });
+
+console.time("a");
+console.timeEnd("b");
+
+console.time("a", "b");
+console.timeEnd("a", "b");
+
+console.log("log", "more");
+console.warn("warn", { toString: () => 2 });
+console.error("error");
+console.debug("debug");
+console.info("info");
+
+console.info({ toString: () => {throw new Error("exception");} })
diff --git a/deps/v8/test/message/console.out b/deps/v8/test/message/console.out
new file mode 100644
index 0000000000..7813ccd025
--- /dev/null
+++ b/deps/v8/test/message/console.out
@@ -0,0 +1,15 @@
+default: {NUMBER}
+abcd: {NUMBER}
+b: 0.000000
+a: {NUMBER}
+log more
+warn 2
+debug
+info
+*%(basename)s:25: Error: exception
+console.info({ toString: () => {throw new Error("exception");} })
+ ^
+Error: exception
+ at Object.toString (*%(basename)s:25:39)
+ at console.info (<anonymous>)
+ at *%(basename)s:25:9
diff --git a/deps/v8/test/message/function-param-after-rest.js b/deps/v8/test/message/function-param-after-rest.js
new file mode 100644
index 0000000000..3fe79a8f27
--- /dev/null
+++ b/deps/v8/test/message/function-param-after-rest.js
@@ -0,0 +1,7 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+//
+
+function f(...x, y) { }
diff --git a/deps/v8/test/message/function-param-after-rest.out b/deps/v8/test/message/function-param-after-rest.out
new file mode 100644
index 0000000000..58633fddca
--- /dev/null
+++ b/deps/v8/test/message/function-param-after-rest.out
@@ -0,0 +1,5 @@
+*%(basename)s:7: SyntaxError: Rest parameter must be last formal parameter
+function f(...x, y) { }
+ ^
+SyntaxError: Rest parameter must be last formal parameter
+
diff --git a/deps/v8/test/message/testcfg.py b/deps/v8/test/message/testcfg.py
index 620328e90d..0576458af2 100644
--- a/deps/v8/test/message/testcfg.py
+++ b/deps/v8/test/message/testcfg.py
@@ -107,6 +107,7 @@ class MessageTestSuite(testsuite.TestSuite):
expected_lines, actual_lines, fillvalue=''):
pattern = re.escape(expected.rstrip() % env)
pattern = pattern.replace("\\*", ".*")
+ pattern = pattern.replace("\\{NUMBER\\}", "\d(?:\.\d*)?")
pattern = "^%s$" % pattern
if not re.match(pattern, actual):
return True
diff --git a/deps/v8/test/mjsunit/allocation-site-info.js b/deps/v8/test/mjsunit/allocation-site-info.js
index ba4ae17cf0..c7184af6f2 100644
--- a/deps/v8/test/mjsunit/allocation-site-info.js
+++ b/deps/v8/test/mjsunit/allocation-site-info.js
@@ -26,7 +26,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --expose-gc
-// Flags: --crankshaft --no-always-opt
+// Flags: --opt --no-always-opt
var elements_kind = {
fast_smi_only : 'fast smi only elements',
@@ -136,7 +136,7 @@ assertKind(elements_kind.fast, obj);
obj = fastliteralcase(get_standard_literal(), 3);
assertKind(elements_kind.fast, obj);
-// Make sure this works in crankshafted code too.
+// Make sure this works in optimized code too.
%OptimizeFunctionOnNextCall(get_standard_literal);
get_standard_literal();
obj = get_standard_literal();
@@ -347,7 +347,7 @@ instanceof_check(realmBArray);
assertOptimized(instanceof_check);
// Try to optimize again, but first clear all type feedback, and allow it
-// to be monomorphic on first call. Only after crankshafting do we introduce
+// to be monomorphic on first call. Only after optimizing do we introduce
// realmBArray. This should deopt the method.
%DeoptimizeFunction(instanceof_check);
%ClearFunctionFeedback(instanceof_check);
@@ -360,6 +360,12 @@ assertOptimized(instanceof_check);
instanceof_check(realmBArray);
assertUnoptimized(instanceof_check);
+// Perform a gc because without it the test below can experience an
+// allocation failure at an inconvenient point. Allocation mementos get
+// cleared on gc, and they can't deliver elements kind feedback when that
+// happens.
+gc();
+
// Case: make sure nested arrays benefit from allocation site feedback as
// well.
(function() {
diff --git a/deps/v8/test/mjsunit/arguments.js b/deps/v8/test/mjsunit/arguments.js
index 97ec7cca6d..8c6186e1b9 100644
--- a/deps/v8/test/mjsunit/arguments.js
+++ b/deps/v8/test/mjsunit/arguments.js
@@ -248,26 +248,107 @@ assertEquals(117, arg_set(0xFFFFFFFF));
return arguments
};
var args = f(1, 2);
+ %HeapObjectVerify(args);
assertEquals(1, args[0]);
assertEquals(2, args[1]);
assertEquals(key, args[key]);
assertEquals(2, args.length);
delete args[0];
+ %HeapObjectVerify(args);
assertEquals(undefined, args[0]);
assertEquals(2, args[1]);
assertEquals(key, args[key]);
assertEquals(2, args.length);
delete args[1];
+ %HeapObjectVerify(args);
assertEquals(undefined, args[0]);
assertEquals(undefined, args[1]);
assertEquals(key, args[key]);
assertEquals(2, args.length);
delete args[key];
+ %HeapObjectVerify(args);
assertEquals(undefined, args[0]);
assertEquals(undefined, args[1]);
assertEquals(undefined, args[key]);
assertEquals(2, args.length);
})();
+
+(function testDeleteSlowSloppyArguments2() {
+ function f(a) {
+ return arguments
+ };
+ var args = f(1, 2);
+ %HeapObjectVerify(args);
+ assertEquals(1, args[0]);
+ assertEquals(2, args[1]);
+ assertEquals(2, args.length);
+
+ delete args[1];
+ %HeapObjectVerify(args);
+ assertEquals(1, args[0]);
+ assertEquals(undefined, args[1]);
+ assertEquals(undefined, args[2]);
+ assertEquals(2, args.length);
+
+ delete args[0];
+ %HeapObjectVerify(args);
+ assertEquals(undefined, args[0]);
+ assertEquals(undefined, args[1]);
+ assertEquals(undefined, args[2]);
+ assertEquals(2, args.length);
+})();
+
+(function testSloppyArgumentProperties() {
+ function f(a, b) { return arguments }
+ let args = f(1, 2, 3, 4);
+ %HeapObjectVerify(args);
+ assertEquals(4, args.length);
+ args.foo = "foo";
+ %HeapObjectVerify(args);
+ assertEquals("foo", args.foo);
+ assertEquals(4, args.length);
+
+ delete args.foo;
+ %HeapObjectVerify(args);
+ assertEquals(undefined, args.foo);
+ assertEquals(4, args.length);
+})();
+
+
+(function testSloppyArgumentsLengthMapChange() {
+ function f(a) { return arguments };
+ let args1 = f(1);
+ let args2 = f(1,2);
+ assertTrue(%HaveSameMap(args1, args2));
+ args2.length = 12;
+ assertTrue(%HaveSameMap(args1, args2));
+ args2.length = "aa"
+ assertTrue(%HaveSameMap(args1, args2));
+
+ let args3 = f(1);
+ let args4 = f(1,2);
+ // Creating holes causes map transitions.
+ assertTrue(%HaveSameMap(args1, args3));
+ assertTrue(%HaveSameMap(args1, args4));
+ delete args3[0];
+ assertFalse(%HaveSameMap(args1, args3));
+ delete args4[1];
+ assertFalse(%HaveSameMap(args1, args4));
+})();
+
+(function testSloppyArgumentsLengthMapChange() {
+ function f(a) { return arguments };
+ let args1 = f(1);
+ let args2 = f(1,2);
+ assertTrue(%HaveSameMap(args1, args2));
+ // Changing the length type doesn't causes a map transition.
+ args2.length = 12;
+ assertTrue(%HaveSameMap(args1, args2));
+ args2.length = 12.0;
+ assertTrue(%HaveSameMap(args1, args2));
+ args2.length = "aa"
+ assertTrue(%HaveSameMap(args1, args2));
+})();
diff --git a/deps/v8/test/mjsunit/array-constructor-feedback.js b/deps/v8/test/mjsunit/array-constructor-feedback.js
index 45ea0d53e1..d5715f6d2d 100644
--- a/deps/v8/test/mjsunit/array-constructor-feedback.js
+++ b/deps/v8/test/mjsunit/array-constructor-feedback.js
@@ -26,7 +26,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --expose-gc
-// Flags: --no-always-opt --crankshaft
+// Flags: --no-always-opt --opt
// Test element kind of objects.
@@ -119,10 +119,13 @@ function assertKind(expected, obj, name_opt) {
return new Array(one, two, three);
}
- barn(1, 2, 3);
- barn(1, 2, 3);
+ a = barn(1, 2, 3);
+ a[1] = "a string";
+ a = barn(1, 2, 3);
+ assertKind(elements_kind.fast, a);
%OptimizeFunctionOnNextCall(barn);
- barn(1, 2, 3);
+ a = barn(1, 2, 3);
+ assertKind(elements_kind.fast, a);
assertOptimized(barn);
a = barn(1, "oops", 3);
assertOptimized(barn);
diff --git a/deps/v8/test/mjsunit/array-feedback.js b/deps/v8/test/mjsunit/array-feedback.js
index c585920df1..01856c57d0 100644
--- a/deps/v8/test/mjsunit/array-feedback.js
+++ b/deps/v8/test/mjsunit/array-feedback.js
@@ -26,7 +26,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --expose-gc
-// Flags: --crankshaft --no-always-opt
+// Flags: --opt --no-always-opt
var elements_kind = {
fast_smi_only : 'fast smi only elements',
diff --git a/deps/v8/test/mjsunit/array-literal-feedback.js b/deps/v8/test/mjsunit/array-literal-feedback.js
index d27f089c22..f3e39ddf4e 100644
--- a/deps/v8/test/mjsunit/array-literal-feedback.js
+++ b/deps/v8/test/mjsunit/array-literal-feedback.js
@@ -26,7 +26,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --expose-gc
-// Flags: --crankshaft --no-always-opt
+// Flags: --opt --no-always-opt
var elements_kind = {
fast_smi_only : 'fast smi only elements',
diff --git a/deps/v8/test/mjsunit/array-literal-transitions.js b/deps/v8/test/mjsunit/array-literal-transitions.js
index ce46cb7a7c..2db6fd35c5 100644
--- a/deps/v8/test/mjsunit/array-literal-transitions.js
+++ b/deps/v8/test/mjsunit/array-literal-transitions.js
@@ -26,7 +26,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --expose-gc --ignition-osr --no-always-opt
-// Flags: --crankshaft
+// Flags: --opt
// IC and Crankshaft support for smi-only elements in dynamic array literals.
function get(foo) { return foo; } // Used to generate dynamic values.
diff --git a/deps/v8/test/mjsunit/array-push5.js b/deps/v8/test/mjsunit/array-push5.js
index 4d75dc8b7c..9961ff98c3 100644
--- a/deps/v8/test/mjsunit/array-push5.js
+++ b/deps/v8/test/mjsunit/array-push5.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft --no-always-opt
+// Flags: --allow-natives-syntax --opt --no-always-opt
var v = 0;
diff --git a/deps/v8/test/mjsunit/array-shift4.js b/deps/v8/test/mjsunit/array-shift4.js
index aa0c546233..5d28fd306a 100644
--- a/deps/v8/test/mjsunit/array-shift4.js
+++ b/deps/v8/test/mjsunit/array-shift4.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
// Inlining shift with holey smi arrays shouldn't deopt just because it
// encounters the hole on the copy step.
diff --git a/deps/v8/test/mjsunit/array-slice.js b/deps/v8/test/mjsunit/array-slice.js
index b017dd506a..1fe1418459 100644
--- a/deps/v8/test/mjsunit/array-slice.js
+++ b/deps/v8/test/mjsunit/array-slice.js
@@ -25,7 +25,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// Flags: --allow-natives-syntax
+
// Check that slicing array of holes keeps it as array of holes
+
(function() {
var array = new Array(10);
for (var i = 0; i < 7; i++) {
@@ -222,7 +225,10 @@
// Check slicing on arguments object.
(function() {
function func(expected, a0, a1, a2) {
- assertEquals(expected, Array.prototype.slice.call(arguments, 1));
+ let result = Array.prototype.slice.call(arguments, 1);
+ %HeapObjectVerify(result);
+ %HeapObjectVerify(arguments);
+ assertEquals(expected, result);
}
func([]);
@@ -240,7 +246,10 @@
assertEquals(undefined, y);
y = 239;
assertEquals(1, arguments.length); // arguments length is the same.
- assertEquals([x], Array.prototype.slice.call(arguments, 0));
+ let result = Array.prototype.slice.call(arguments, 0);
+ %HeapObjectVerify(result);
+ %HeapObjectVerify(arguments);
+ assertEquals([x], result);
}
func('a');
@@ -251,7 +260,10 @@
function func(x, y) {
assertEquals(1, arguments.length);
arguments.length = 7;
- assertEquals([x,,,,,,,], Array.prototype.slice.call(arguments, 0));
+ let result = Array.prototype.slice.call(arguments, 0);
+ assertEquals([x,,,,,,,], result);
+ %HeapObjectVerify(result);
+ %HeapObjectVerify(arguments);
}
func('a');
@@ -263,7 +275,10 @@
function func(x, y) {
assertEquals(1, arguments.length);
arguments.length = 'foobar';
- assertEquals([], Array.prototype.slice.call(arguments, 0));
+ let result = Array.prototype.slice.call(arguments, 0);
+ assertEquals([], result);
+ %HeapObjectVerify(result);
+ %HeapObjectVerify(arguments);
}
func('a');
@@ -275,7 +290,10 @@
function func(x, y) {
assertEquals(1, arguments.length);
arguments[3] = 239;
- assertEquals([x], Array.prototype.slice.call(arguments, 0));
+ let result = Array.prototype.slice.call(arguments, 0);
+ assertEquals([x], result);
+ %HeapObjectVerify(result);
+ %HeapObjectVerify(arguments);
}
func('a');
@@ -286,7 +304,10 @@
function func(x, y, z) {
assertEquals(3, arguments.length);
delete arguments[1];
- assertEquals([x,,z], Array.prototype.slice.call(arguments, 0));
+ let result = Array.prototype.slice.call(arguments, 0);
+ assertEquals([x,,z], result);
+ %HeapObjectVerify(result);
+ %HeapObjectVerify(arguments);
}
func('a', 'b', 'c');
@@ -300,6 +321,8 @@
var result = Array.prototype.slice.call(arguments);
delete arguments.__proto__[1];
assertEquals([1,5,3], result);
+ %HeapObjectVerify(result);
+ %HeapObjectVerify(arguments);
}
f(1,2,3);
})();
diff --git a/deps/v8/test/mjsunit/array-store-and-grow.js b/deps/v8/test/mjsunit/array-store-and-grow.js
index 4de7a376e3..ee831ad061 100644
--- a/deps/v8/test/mjsunit/array-store-and-grow.js
+++ b/deps/v8/test/mjsunit/array-store-and-grow.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --crankshaft --no-always-opt
+// Flags: --allow-natives-syntax --opt --no-always-opt
// Verifies that the KeyedStoreIC correctly handles out-of-bounds stores
// to an array that grow it by a single element. Test functions are
diff --git a/deps/v8/test/mjsunit/asm/asm-memory.js b/deps/v8/test/mjsunit/asm/asm-memory.js
new file mode 100644
index 0000000000..6f9b2fe639
--- /dev/null
+++ b/deps/v8/test/mjsunit/asm/asm-memory.js
@@ -0,0 +1,55 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+(function TestUnalignedMemory() {
+ // Test that a buffer whose length is not a multiple of the element size of a
+ // heap view throws the proper {RangeError} during instantiation.
+ function Module(stdlib, foreign, heap) {
+ "use asm";
+ var a = new stdlib.Int32Array(heap);
+ function f() {}
+ return { f:f };
+ }
+ assertThrows(() => Module(this, {}, new ArrayBuffer(2)), RangeError);
+ assertThrows(() => Module(this, {}, new ArrayBuffer(10)), RangeError);
+ assertDoesNotThrow(() => Module(this, {}, new ArrayBuffer(4)));
+ assertDoesNotThrow(() => Module(this, {}, new ArrayBuffer(16)));
+ assertFalse(%IsAsmWasmCode(Module));
+})();
+
+(function TestMissingMemory() {
+ // Test that a buffer is required for instantiation of modules containing any
+ // heap views. JavaScript needs to create individual buffers for each view.
+ function Module(stdlib, foreign, heap) {
+ "use asm";
+ var a = new stdlib.Int16Array(heap);
+ var b = new stdlib.Int32Array(heap);
+ function f() {
+ a[0] = 0x1234;
+ return b[0] | 0;
+ }
+ return { f:f };
+ }
+ var m = Module(this, {}, undefined);
+ assertFalse(%IsAsmWasmCode(Module));
+ assertEquals(0, m.f());
+})();
+
+(function TestNonBufferMemory() {
+ // Test that a buffer has to be an instance of {ArrayBuffer} in order to be
+ // valid. JavaScript will also accept any other array-like object.
+ function Module(stdlib, foreign, heap) {
+ "use asm";
+ var a = new stdlib.Int32Array(heap);
+ function f() {
+ return a[0] | 0;
+ }
+ return { f:f };
+ }
+ var m = Module(this, {}, [ 23, 42 ]);
+ assertFalse(%IsAsmWasmCode(Module));
+ assertEquals(23, m.f());
+})();
diff --git a/deps/v8/test/mjsunit/asm/asm-stdlib.js b/deps/v8/test/mjsunit/asm/asm-stdlib.js
new file mode 100644
index 0000000000..65d0b76ff7
--- /dev/null
+++ b/deps/v8/test/mjsunit/asm/asm-stdlib.js
@@ -0,0 +1,46 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+(function FailProxyAsStdlib() {
+ // Test that passing a proxy as "stdlib" will cause module instantiation to
+ // fail while still only triggering one observable property load.
+ function Module(stdlib, foreign, heap) {
+ "use asm";
+ var a = stdlib.Math.PI;
+ function f() { return a }
+ return { f:f };
+ }
+ var trap_was_called = 0;
+ var proxy = new Proxy(this, { get:function(target, property, receiver) {
+ trap_was_called++;
+ if (property == "Math") return { PI:23 };
+ return Reflect.get(target, property, receiver);
+ }});
+ var m = Module(proxy);
+ assertFalse(%IsAsmWasmCode(Module));
+ assertEquals(1, trap_was_called);
+ assertEquals(23, m.f());
+})();
+
+(function FailGetterInStdlib() {
+ // Test that accessors as part of "stdlib" will cause module instantiation to
+ // fail while still only triggering one observable property load.
+ function Module(stdlib, foreign, heap) {
+ "use asm";
+ var a = new stdlib.Int8Array(heap);
+ function f() { return a[0] | 0 }
+ return { f:f };
+ }
+ var trap_was_called = 0;
+ var observer = { get Int8Array() {
+ trap_was_called++;
+ return function() { return [ 23 ] };
+ }};
+ var m = Module(observer);
+ assertFalse(%IsAsmWasmCode(Module));
+ assertEquals(1, trap_was_called);
+ assertEquals(23, m.f());
+})();
diff --git a/deps/v8/test/mjsunit/asm/asm-validation.js b/deps/v8/test/mjsunit/asm/asm-validation.js
index 0925d103ea..ed5b748aad 100644
--- a/deps/v8/test/mjsunit/asm/asm-validation.js
+++ b/deps/v8/test/mjsunit/asm/asm-validation.js
@@ -474,8 +474,26 @@ function assertValidAsm(func) {
assertFalse(o instanceof WebAssembly.Instance);
assertTrue(o instanceof Object);
assertTrue(o.__proto__ === Object.prototype);
+ var p = Object.getOwnPropertyDescriptor(o, "x")
+ assertTrue(p.writable);
+ assertTrue(p.enumerable);
+ assertTrue(p.configurable);
+ assertTrue(typeof o.x === 'function');
o.x = 5;
assertTrue(typeof o.x === 'number');
assertTrue(o.__single_function__ === undefined);
assertTrue(o.__foreign_init__ === undefined);
})();
+
+(function TestAsmExportOrderPreserved() {
+ function Module() {
+ "use asm";
+ function f() {}
+ function g() {}
+ return { a:f, b:g, x:f, c:g, d:f };
+ }
+ var m = Module();
+ assertValidAsm(Module);
+ var props = Object.getOwnPropertyNames(m);
+ assertEquals(["a","b","x","c","d"], props);
+})();
diff --git a/deps/v8/test/mjsunit/asm/call-annotation.js b/deps/v8/test/mjsunit/asm/call-annotation.js
new file mode 100644
index 0000000000..e2260441e0
--- /dev/null
+++ b/deps/v8/test/mjsunit/asm/call-annotation.js
@@ -0,0 +1,179 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --validate-asm
+
+// This file contains test cases that are particularly interesting for a single
+// pass asm.js parsing and validation implementation in regards to the return
+// type annotation via the "|0" operation.
+
+var g_was_called = 0;
+function g() {
+ g_was_called++;
+ return "23.4";
+}
+
+(function SuccessExternCoercion() {
+ function Module(stdlib, imports, heap) {
+ "use asm";
+ var g = imports.g;
+ function f(a) {
+ a = a | 0;
+ a = a + (g() | 0) | 0;
+ return a | 0;
+ }
+ return { f:f };
+ }
+ g_was_called = 0;
+ var m = Module(this, { g:g });
+ assertTrue(%IsAsmWasmCode(Module));
+ assertEquals(24, m.f(1));
+ assertEquals(1, g_was_called);
+})();
+
+(function FailPrecedenceLeftStronger() {
+ function Module(stdlib, imports, heap) {
+ "use asm";
+ var g = imports.g;
+ function f(a) {
+ a = a | 0;
+ a = a + g() | 0;
+ return a | 0;
+ }
+ return { f:f };
+ }
+ g_was_called = 0;
+ var m = Module(this, { g:g });
+ assertFalse(%IsAsmWasmCode(Module));
+ assertEquals(123, m.f(1));
+ assertEquals(1, g_was_called);
+})();
+
+(function FailPrecedenceRightStronger() {
+ function Module(stdlib, imports, heap) {
+ "use asm";
+ var g = imports.g;
+ function f(a) {
+ a = a | 0;
+ a = (g() | 0 + a) | 0;
+ return a | 0;
+ }
+ return { f:f };
+ }
+ g_was_called = 0;
+ var m = Module(this, { g:g });
+ assertFalse(%IsAsmWasmCode(Module));
+ assertEquals(127, m.f(127));
+ assertEquals(1, g_was_called);
+})();
+
+(function FailParenthesizedAnnotation() {
+ function Module(stdlib, imports, heap) {
+ "use asm";
+ var g = imports.g;
+ function f(a) {
+ a = a | 0;
+ a = (g()) | 0;
+ return a | 0;
+ }
+ return { f:f };
+ }
+ g_was_called = 0;
+ var m = Module(this, { g:g });
+ // TODO(6127): Only properly rejected by "new" parser.
+ // assertFalse(%IsAsmWasmCode(Module));
+ assertEquals(23, m.f(1));
+ assertEquals(1, g_was_called);
+})();
+
+(function FailNonZeroAnnotation() {
+ function Module(stdlib, imports, heap) {
+ "use asm";
+ var g = imports.g;
+ function f(a) {
+ a = a | 0;
+ a = g() | 127;
+ return a | 0;
+ }
+ return { f:f };
+ }
+ g_was_called = 0;
+ var m = Module(this, { g:g });
+ assertFalse(%IsAsmWasmCode(Module));
+ assertEquals(127, m.f(1));
+ assertEquals(1, g_was_called);
+})();
+
+(function FailNestedAnnotation1() {
+ function Module(stdlib, imports, heap) {
+ "use asm";
+ var g = imports.g;
+ function f(a) {
+ a = a | 0;
+ a = g() | g() | 0;
+ return a | 0;
+ }
+ return { f:f };
+ }
+ g_was_called = 0;
+ var m = Module(this, { g:g });
+ assertFalse(%IsAsmWasmCode(Module));
+ assertEquals(23, m.f(1));
+ assertEquals(2, g_was_called);
+})();
+
+(function FailNestedAnnotation2() {
+ function Module(stdlib, imports, heap) {
+ "use asm";
+ var g = imports.g;
+ function f(a) {
+ a = a | 0;
+ a = g() | 0 | g() | 0;
+ return a | 0;
+ }
+ return { f:f };
+ }
+ g_was_called = 0;
+ var m = Module(this, { g:g });
+ assertFalse(%IsAsmWasmCode(Module));
+ assertEquals(23, m.f(1));
+ assertEquals(2, g_was_called);
+})();
+
+(function SuccessMixedWithDoubleAnnotation() {
+ function Module(stdlib, imports, heap) {
+ "use asm";
+ var g = imports.g;
+ function f(a) {
+ a = +a;
+ a = a + +(g() | 0);
+ return +a;
+ }
+ return { f:f };
+ }
+ g_was_called = 0;
+ var m = Module(this, { g:g });
+ assertTrue(%IsAsmWasmCode(Module));
+ assertEquals(23.5, m.f(0.5));
+ assertEquals(1, g_was_called);
+})();
+
+(function SuccessMixedWithFloatAnnotation() {
+ function Module(stdlib, imports, heap) {
+ "use asm";
+ var g = imports.g;
+ var fround = stdlib.Math.fround;
+ function f(a) {
+ a = fround(a);
+ a = fround(a + fround(g() | 0));
+ return fround(a);
+ }
+ return { f:f };
+ }
+ g_was_called = 0;
+ var m = Module(this, { g:g });
+ assertTrue(%IsAsmWasmCode(Module));
+ assertEquals(23.5, m.f(0.5));
+ assertEquals(1, g_was_called);
+})();
diff --git a/deps/v8/test/mjsunit/asm/call-stdlib.js b/deps/v8/test/mjsunit/asm/call-stdlib.js
new file mode 100644
index 0000000000..5d883f324a
--- /dev/null
+++ b/deps/v8/test/mjsunit/asm/call-stdlib.js
@@ -0,0 +1,85 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --validate-asm
+
+// This file contains test cases that are particularly interesting because they
+// omit the usual call-site coercion of function calls that target well-known
+// stdlib functions.
+
+(function SuccessStdlibWithoutAnnotation() {
+ function Module(stdlib, imports, heap) {
+ "use asm";
+ var imul = stdlib.Math.imul;
+ function f(a, b) {
+ a = a | 0;
+ b = b | 0;
+ var r = 0;
+ r = imul(a, b);
+ return r | 0;
+ }
+ return { f:f };
+ }
+ var m = Module(this);
+ assertTrue(%IsAsmWasmCode(Module));
+ assertEquals(966, m.f(23, 42));
+ assertEquals(-0x0fffffff, m.f(0x7ffffff, 0x7ffffff));
+})();
+
+(function SuccessStdlibWithoutAnnotationThenRound() {
+ function Module(stdlib, imports, heap) {
+ "use asm";
+ var fround = stdlib.Math.fround;
+ var imul = stdlib.Math.imul;
+ function f(a, b) {
+ a = a | 0;
+ b = b | 0;
+ var r = fround(0);
+ r = fround(imul(a, b));
+ return fround(r);
+ }
+ return { f:f };
+ }
+ var m = Module(this);
+ assertTrue(%IsAsmWasmCode(Module));
+ assertEquals(966, m.f(23, 42));
+ assertEquals(-0x0fffffff - 1, m.f(0x7ffffff, 0x7ffffff));
+})();
+
+(function FailureStdlibWithoutAnnotationMismatch() {
+ function Module(stdlib, imports, heap) {
+ "use asm";
+ var fround = stdlib.Math.fround;
+ var imul = stdlib.Math.imul;
+ function f(a, b) {
+ a = a | 0;
+ b = b | 0;
+ var r = fround(0);
+ r = imul(a, b);
+ return r | 0;
+ }
+ return { f:f };
+ }
+ var m = Module(this);
+ assertFalse(%IsAsmWasmCode(Module));
+ assertEquals(966, m.f(23, 42));
+ assertEquals(-0x0fffffff, m.f(0x7ffffff, 0x7ffffff));
+})();
+
+(function SuccessStdlibWithoutAnnotationUsedInReturn() {
+ function Module(stdlib, imports, heap) {
+ "use asm";
+ var imul = stdlib.Math.imul;
+ function f(a, b) {
+ a = a | 0;
+ b = b | 0;
+ return imul(a, b);
+ }
+ return { f:f };
+ }
+ var m = Module(this);
+ assertTrue(%IsAsmWasmCode(Module));
+ assertEquals(966, m.f(23, 42));
+ assertEquals(-0x0fffffff, m.f(0x7ffffff, 0x7ffffff));
+})();
diff --git a/deps/v8/test/mjsunit/asm/global-imports.js b/deps/v8/test/mjsunit/asm/global-imports.js
new file mode 100644
index 0000000000..60c0930fa8
--- /dev/null
+++ b/deps/v8/test/mjsunit/asm/global-imports.js
@@ -0,0 +1,74 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --validate-asm
+
+function MODULE_TEMPLATE(stdlib, foreign, buffer) {
+ "use asm";
+ var fround = stdlib.Math.fround;
+ IMPORT;
+ function f(int, flt, dbl) {
+ int = int | 0;
+ flt = fround(flt);
+ dbl = +dbl;
+ return EXPRESSION;
+ }
+ return { f:f };
+}
+
+var throws = {};
+var test_count = 0;
+const stdlib = this;
+const buffer = new ArrayBuffer(1024);
+function p(x) { return x * x; }
+
+function assertThrowsOrEquals(result, fun) {
+ if (result === throws) {
+ assertThrows(fun, TypeError);
+ } else {
+ assertEquals(result, fun(1, 2.3, 4.2));
+ }
+}
+
+function RunAsmJsTest(asm_source, imports, result, valid) {
+ var nonasm_source = asm_source.replace(new RegExp("use asm"), "");
+
+ var js_module = eval("(" + nonasm_source + ")")
+ var js_instance = js_module(stdlib, imports, buffer);
+ assertThrowsOrEquals(result, js_instance.f);
+
+ var asm_module = eval("(" + asm_source + ")");
+ var asm_instance = asm_module(stdlib, imports, buffer);
+ assertEquals(valid, %IsAsmWasmCode(asm_module));
+ assertThrowsOrEquals(result, asm_instance.f);
+}
+
+function Run(imp, exp, imports, result, valid) {
+ var name = "test" + (++test_count);
+ var src = MODULE_TEMPLATE.toString();
+ src = src.replace("IMPORT", imp);
+ src = src.replace("EXPRESSION", exp);
+ src = src.replace("MODULE_TEMPLATE", name);
+ RunAsmJsTest(src, imports, result, valid);
+}
+
+// Imports of values from foreign.
+Run("var x = foreign.x | 0", "(x + int) | 0", {x:12}, 13, true);
+Run("var x = foreign.x | 0", "(x = int) | 0", {x:12}, 1, true);
+Run("var x = foreign.x | 0", "+(x + dbl)", {x:12}, 16.2, false);
+Run("var x = +foreign.x", "+(x + dbl)", {x:1.2}, 5.4, true);
+Run("var x = +foreign.x", "+(x = dbl)", {x:1.2}, 4.2, true);
+Run("var x = +foreign.x", "(x + int) | 0", {x:1.2}, 2, false);
+Run("const x = foreign.x | 0", "(x + int) | 0", {x:12}, 13, true);
+Run("const x = foreign.x | 0", "(x = int) | 0", {x:12}, throws, false);
+Run("const x = foreign.x | 0", "+(x + dbl)", {x:12}, 16.2, false);
+Run("const x = +foreign.x", "+(x + dbl)", {x:1.2}, 5.4, true);
+Run("const x = +foreign.x", "+(x = dbl)", {x:1.2}, throws, false);
+Run("const x = +foreign.x", "(x + int) | 0", {x:1.2}, 2, false);
+
+// Imports of functions and values from stdlib and foreign.
+Run("var x = foreign.x", "x(dbl) | 0", { x:p }, 17, true);
+Run("var x = foreign.x", "(x = fround, x(dbl)) | 0", { x:p }, 4, false);
+Run("var x = stdlib.Math.E", "(x = 3.1415, 1) | 0", {}, 1, false);
+Run("var x = stdlib.Math.imul", "(x = fround, 1) | 0", {}, 1, false);
diff --git a/deps/v8/test/mjsunit/asm/immutable.js b/deps/v8/test/mjsunit/asm/immutable.js
new file mode 100644
index 0000000000..29c15cc7d9
--- /dev/null
+++ b/deps/v8/test/mjsunit/asm/immutable.js
@@ -0,0 +1,48 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+(function FailImmutableFunction() {
+ function Module(stdlib, imports, heap) {
+ "use asm";
+ function f(a) {
+ a = a | 0;
+ if (a) {
+ a = f((a - 1) | 0) | 0;
+ f = 0;
+ return (a + 1) | 0;
+ }
+ return 23;
+ }
+ return { f:f };
+ }
+ var m = Module(this);
+ assertFalse(%IsAsmWasmCode(Module));
+ assertEquals(23, m.f(0));
+ assertEquals(24, m.f(1));
+ assertThrows(() => m.f(2));
+})();
+
+(function FailImmutableFunctionTable() {
+ function Module(stdlib, imports, heap) {
+ "use asm";
+ function f(a) {
+ a = a | 0;
+ if (a) {
+ a = funTable[a & 0]((a - 1) | 0) | 0;
+ funTable = 0;
+ return (a + 1) | 0;
+ }
+ return 23;
+ }
+ var funTable = [ f ];
+ return { f:f };
+ }
+ var m = Module(this);
+ assertFalse(%IsAsmWasmCode(Module));
+ assertEquals(23, m.f(0));
+ assertEquals(24, m.f(1));
+ assertThrows(() => m.f(2));
+})();
diff --git a/deps/v8/test/mjsunit/asm/int32-mul.js b/deps/v8/test/mjsunit/asm/int32-mul.js
index 4c5e38668a..1f2066b78b 100644
--- a/deps/v8/test/mjsunit/asm/int32-mul.js
+++ b/deps/v8/test/mjsunit/asm/int32-mul.js
@@ -6,7 +6,7 @@ function Module(stdlib, foreign, heap) {
"use asm";
function f1(i) {
i = i|0;
- return (i | 0) * 3 | 0;
+ return (i | 0) * -3 | 0;
}
function f2(i) {
i = i|0;
@@ -26,7 +26,7 @@ function Module(stdlib, foreign, heap) {
var m = Module(this, {}, new ArrayBuffer(1024));
for (var i = -2147483648; i < 2147483648; i += 3999771) {
- assertEquals(i * 3 | 0, m.f1(i));
+ assertEquals(i * -3 | 0, m.f1(i));
assertEquals(i * 7 | 0, m.f2(i));
assertEquals(i * 1024 | 0, m.f3(i));
assertEquals(i * 333339 | 0, m.f4(i));
diff --git a/deps/v8/test/mjsunit/asm/regress-718745.js b/deps/v8/test/mjsunit/asm/regress-718745.js
new file mode 100644
index 0000000000..eb5416808b
--- /dev/null
+++ b/deps/v8/test/mjsunit/asm/regress-718745.js
@@ -0,0 +1,13 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function Module(stdlib) {
+ "use asm";
+ var fround = stdlib.Math.fround;
+ function f(a) {
+ a = (fround(a));
+ }
+ return { f:f };
+}
+Module(this).f();
diff --git a/deps/v8/test/mjsunit/asm/return-types.js b/deps/v8/test/mjsunit/asm/return-types.js
new file mode 100644
index 0000000000..7ecdd4267e
--- /dev/null
+++ b/deps/v8/test/mjsunit/asm/return-types.js
@@ -0,0 +1,123 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --validate-asm
+
+(function SuccessReturnTypesMatch() {
+ function Module(stdlib, imports, heap) {
+ "use asm";
+ function f(a) {
+ a = a | 0;
+ if ((a | 0) == 1) return 2.3;
+ if ((a | 0) == 2) return 4.2;
+ return 6.5;
+ }
+ return { f:f };
+ }
+ var m = Module(this);
+ assertTrue(%IsAsmWasmCode(Module));
+ assertEquals(2.3, m.f(1));
+ assertEquals(4.2, m.f(2));
+ assertEquals(6.5, m.f(3));
+})();
+
+(function FailReturnTypesMismatch() {
+ function Module(stdlib, imports, heap) {
+ "use asm";
+ function f(a) {
+ a = a | 0;
+ if ((a | 0) == 1) return 2.3;
+ if ((a | 0) == 2) return 123;
+ return 4.2;
+ }
+ return { f:f };
+ }
+ var m = Module(this);
+ assertFalse(%IsAsmWasmCode(Module));
+ assertEquals(2.3, m.f(1));
+ assertEquals(123, m.f(2));
+ assertEquals(4.2, m.f(3));
+})();
+
+(function FailFallOffNonVoidFunction() {
+ function Module(stdlib, imports, heap) {
+ "use asm";
+ function f(a) {
+ a = a | 0;
+ if ((a | 0) == 1) return 2.3;
+ if ((a | 0) == 2) return 4.2;
+ }
+ return { f:f };
+ }
+ var m = Module(this);
+ assertFalse(%IsAsmWasmCode(Module));
+ assertEquals(2.3, m.f(1));
+ assertEquals(4.2, m.f(2));
+ assertEquals(undefined, m.f(3));
+})();
+
+(function FailNonVoidVoidMismatch() {
+ function Module(stdlib, imports, heap) {
+ "use asm";
+ function f(a) {
+ a = a | 0;
+ if ((a | 0) == 1) return 2.3;
+ if ((a | 0) == 2) return;
+ }
+ return { f:f };
+ }
+ var m = Module(this);
+ assertFalse(%IsAsmWasmCode(Module));
+ assertEquals(2.3, m.f(1));
+ assertEquals(undefined, m.f(2));
+ assertEquals(undefined, m.f(3));
+})();
+
+(function FailVoidNonVoidMismatch() {
+ function Module(stdlib, imports, heap) {
+ "use asm";
+ function f(a) {
+ a = a | 0;
+ if ((a | 0) == 1) return;
+ if ((a | 0) == 2) return 2.3;
+ }
+ return { f:f };
+ }
+ var m = Module(this);
+ assertFalse(%IsAsmWasmCode(Module));
+ assertEquals(undefined, m.f(1));
+ assertEquals(2.3, m.f(2));
+ assertEquals(undefined, m.f(3));
+})();
+
+(function SuccessVoidFunction() {
+ function Module(stdlib, imports, heap) {
+ "use asm";
+ function f(a) {
+ a = a | 0;
+ if ((a | 0) == 1) return;
+ return;
+ }
+ return { f:f };
+ }
+ var m = Module(this);
+ assertTrue(%IsAsmWasmCode(Module));
+ assertEquals(undefined, m.f(1));
+ assertEquals(undefined, m.f(2));
+})();
+
+(function SuccessFallOffVoidFunction() {
+ function Module(stdlib, imports, heap) {
+ "use asm";
+ function f(a) {
+ a = a | 0;
+ if ((a | 0) == 1) return;
+ }
+ return { f:f };
+ }
+ var m = Module(this);
+ assertTrue(%IsAsmWasmCode(Module));
+ assertEquals(undefined, m.f(1));
+ assertEquals(undefined, m.f(2));
+})();
diff --git a/deps/v8/test/mjsunit/basic-promise.js b/deps/v8/test/mjsunit/basic-promise.js
index 9905fa475f..da12f28198 100644
--- a/deps/v8/test/mjsunit/basic-promise.js
+++ b/deps/v8/test/mjsunit/basic-promise.js
@@ -8,14 +8,6 @@
// exceptions which are swallowed in a then clause.
failWithMessage = (msg) => %AbortJS(msg);
-let decrement = () => { %DecrementWaitCount(); }
-let increment = () => { %IncrementWaitCount(); }
-
-function WaitForPromise(p) {
- increment();
- p.then(decrement, decrement);
-}
-
function newPromise() {
var outerResolve;
var outerReject;
@@ -23,7 +15,7 @@ function newPromise() {
outerResolve = resolve;
outerReject = reject;
});
- WaitForPromise(promise); // explicitly wait for promise to resolve.
+ Promise.resolve(promise);
return {
resolve: outerResolve,
reject: outerReject,
diff --git a/deps/v8/test/mjsunit/compiler/array-constructor.js b/deps/v8/test/mjsunit/compiler/array-constructor.js
new file mode 100644
index 0000000000..583817b7d8
--- /dev/null
+++ b/deps/v8/test/mjsunit/compiler/array-constructor.js
@@ -0,0 +1,89 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+// Test Array call with known Boolean.
+(() => {
+ function foo(x) { return Array(!!x); }
+
+ assertEquals([true], foo(true));
+ assertEquals([false], foo(false));
+ %OptimizeFunctionOnNextCall(foo);
+ assertEquals([true], foo(true));
+ assertEquals([false], foo(false));
+})();
+
+// Test Array construct with known Boolean.
+(() => {
+ function foo(x) { return new Array(!!x); }
+
+ assertEquals([true], foo(true));
+ assertEquals([false], foo(false));
+ %OptimizeFunctionOnNextCall(foo);
+ assertEquals([true], foo(true));
+ assertEquals([false], foo(false));
+})();
+
+// Test Array call with known String.
+(() => {
+ function foo(x) { return Array("" + x); }
+
+ assertEquals(["a"], foo("a"));
+ assertEquals(["b"], foo("b"));
+ %OptimizeFunctionOnNextCall(foo);
+ assertEquals(["a"], foo("a"));
+ assertEquals(["b"], foo("b"));
+})();
+
+// Test Array construct with known String.
+(() => {
+ function foo(x) { return new Array("" + x); }
+
+ assertEquals(["a"], foo("a"));
+ assertEquals(["b"], foo("b"));
+ %OptimizeFunctionOnNextCall(foo);
+ assertEquals(["a"], foo("a"));
+ assertEquals(["b"], foo("b"));
+})();
+
+// Test Array call with known fixed small integer.
+(() => {
+ function foo() { return Array(2); }
+
+ assertEquals(2, foo().length);
+ assertEquals(2, foo().length);
+ %OptimizeFunctionOnNextCall(foo);
+ assertEquals(2, foo().length);
+})();
+
+// Test Array construct with known fixed small integer.
+(() => {
+ function foo() { return new Array(2); }
+
+ assertEquals(2, foo().length);
+ assertEquals(2, foo().length);
+ %OptimizeFunctionOnNextCall(foo);
+ assertEquals(2, foo().length);
+})();
+
+// Test Array call with multiple parameters.
+(() => {
+ function foo(x, y, z) { return Array(x, y, z); }
+
+ assertEquals([1, 2, 3], foo(1, 2, 3));
+ assertEquals([1, 2, 3], foo(1, 2, 3));
+ %OptimizeFunctionOnNextCall(foo);
+ assertEquals([1, 2, 3], foo(1, 2, 3));
+})();
+
+// Test Array construct with multiple parameters.
+(() => {
+ function foo(x, y, z) { return new Array(x, y, z); }
+
+ assertEquals([1, 2, 3], foo(1, 2, 3));
+ assertEquals([1, 2, 3], foo(1, 2, 3));
+ %OptimizeFunctionOnNextCall(foo);
+ assertEquals([1, 2, 3], foo(1, 2, 3));
+})();
diff --git a/deps/v8/test/mjsunit/compiler/constructor-inlining-no-harmony-restrict-constructor-return.js b/deps/v8/test/mjsunit/compiler/constructor-inlining-no-harmony-restrict-constructor-return.js
new file mode 100644
index 0000000000..6dbaf6bf3f
--- /dev/null
+++ b/deps/v8/test/mjsunit/compiler/constructor-inlining-no-harmony-restrict-constructor-return.js
@@ -0,0 +1,12 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --no-harmony-restrict-constructor-return --max-deopt-count 200
+
+this.FLAG_harmony_restrict_constructor_return = false;
+try {
+ load('mjsunit/compiler/constructor-inlining.js');
+} catch(e) {
+ load('test/mjsunit/compiler/constructor-inlining.js');
+}
diff --git a/deps/v8/test/mjsunit/compiler/constructor-inlining.js b/deps/v8/test/mjsunit/compiler/constructor-inlining.js
new file mode 100644
index 0000000000..b01885d8ba
--- /dev/null
+++ b/deps/v8/test/mjsunit/compiler/constructor-inlining.js
@@ -0,0 +1,128 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --harmony-restrict-constructor-return --max-deopt-count 200
+
+if (this.FLAG_harmony_restrict_constructor_return === undefined)
+ this.FLAG_harmony_restrict_constructor_return = true;
+var counter = 0;
+var deopt_at = -1;
+
+class Base {
+ constructor(use, x){
+ if (deopt_at-- == 0) {
+ %_DeoptimizeNow();
+ %DeoptimizeFunction(testConstructorInlining);
+ }
+ counter++;
+ this.x = x;
+ if (use) {
+ return x;
+ }
+ }
+}
+
+class Derived extends Base {
+ constructor(use, x, y, deopt = false) {
+ super(use, x);
+ counter++;
+ if (deopt_at-- == 0) %_DeoptimizeNow();
+ this.y = y;
+ if (use) {
+ return y;
+ }
+ }
+}
+
+var DerivedDeoptCreate = new Proxy(Derived, {
+ get: function(target, name) {
+ if (name=='prototype') {
+ counter++;
+ if (deopt_at-- == 0) %DeoptimizeFunction(Derived);
+ }
+ return target[name];
+ }
+});
+
+function Constr(use, x){
+ counter++;
+ if (deopt_at-- == 0) %_DeoptimizeNow();
+ this.x = x;
+ if (use) {
+ return x;
+ }
+}
+
+%SetForceInlineFlag(Base);
+%SetForceInlineFlag(Derived);
+%SetForceInlineFlag(Constr);
+
+var a = {};
+var b = {};
+
+function testConstructorInlining(){
+ assertEquals(a, new Constr(true, a));
+ assertEquals(7, new Constr(false, 7).x);
+ assertEquals(5, new Constr(true, 5).x);
+
+ assertEquals(a, new Base(true, a));
+ assertEquals(7, new Base(false, 7).x);
+ if (FLAG_harmony_restrict_constructor_return) {
+ // not using assertThrows to ensure proper inlining
+ try {
+ new Base(true, 5);
+ assertTrue(false);
+ } catch (e) {
+ if (!(e instanceof TypeError)) throw e;
+ }
+ } else {
+ assertEquals(5, new Base(true, 5).x);
+ }
+
+ assertEquals(b, new Derived(true, a, b));
+ assertEquals(a, new Derived(true, a, undefined));
+ assertEquals(5, new Derived(false, 5, 7).x);
+ assertEquals(7, new Derived(false, 5, 7).y);
+ try {
+ new Derived(true, a, 7)
+ assertTrue(false);
+ } catch (e) {
+ if (!(e instanceof TypeError)) throw e;
+ }
+ if (FLAG_harmony_restrict_constructor_return) {
+ try {
+ new Derived(true, 5, a)
+ assertTrue(false);
+ } catch (e) {
+ if (!(e instanceof TypeError)) throw e;
+ }
+ } else {
+ assertEquals(a, new Derived(true, 5, a));
+ }
+
+ %OptimizeFunctionOnNextCall(Derived);
+ assertEquals(b, new DerivedDeoptCreate(true, a, b));
+ %OptimizeFunctionOnNextCall(Derived);
+ assertEquals(a, new DerivedDeoptCreate(true, a, undefined));
+ %OptimizeFunctionOnNextCall(Derived);
+ assertEquals(5, new DerivedDeoptCreate(false, 5, 7).x);
+ %OptimizeFunctionOnNextCall(Derived);
+ assertEquals(7, new DerivedDeoptCreate(false, 5, 7).y);
+}
+
+testConstructorInlining();
+%OptimizeFunctionOnNextCall(testConstructorInlining);
+testConstructorInlining();
+
+var last = undefined;
+for(var i = 0; deopt_at < 0; ++i) {
+ deopt_at = i;
+ counter = 0;
+ %OptimizeFunctionOnNextCall(testConstructorInlining);
+ testConstructorInlining();
+ if (last !== undefined) {
+ assertEquals(counter, last)
+ }
+ last = counter;
+}
diff --git a/deps/v8/test/mjsunit/compiler/deopt-inlined-from-call.js b/deps/v8/test/mjsunit/compiler/deopt-inlined-from-call.js
index db9eb96824..8fa8af5a9b 100644
--- a/deps/v8/test/mjsunit/compiler/deopt-inlined-from-call.js
+++ b/deps/v8/test/mjsunit/compiler/deopt-inlined-from-call.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --crankshaft --no-always-opt
+// Flags: --allow-natives-syntax --opt --no-always-opt
var global = this;
diff --git a/deps/v8/test/mjsunit/compiler/deopt-numberoroddball-binop.js b/deps/v8/test/mjsunit/compiler/deopt-numberoroddball-binop.js
index d14c8471bc..2c6473d15f 100644
--- a/deps/v8/test/mjsunit/compiler/deopt-numberoroddball-binop.js
+++ b/deps/v8/test/mjsunit/compiler/deopt-numberoroddball-binop.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
(function() {
function foo(x, y) { return x << y; }
diff --git a/deps/v8/test/mjsunit/compiler/deopt-string-outofbounds.js b/deps/v8/test/mjsunit/compiler/deopt-string-outofbounds.js
index ef85eee2b2..ebdcc6cce5 100644
--- a/deps/v8/test/mjsunit/compiler/deopt-string-outofbounds.js
+++ b/deps/v8/test/mjsunit/compiler/deopt-string-outofbounds.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft --no-always-opt
+// Flags: --allow-natives-syntax --opt --no-always-opt
var s = "12345";
diff --git a/deps/v8/test/mjsunit/compiler/escape-analysis-16.js b/deps/v8/test/mjsunit/compiler/escape-analysis-16.js
new file mode 100644
index 0000000000..4cd9ae43fd
--- /dev/null
+++ b/deps/v8/test/mjsunit/compiler/escape-analysis-16.js
@@ -0,0 +1,18 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --no-turbo-loop-peeling --turbo-escape
+
+function foo(){
+ var o = {a : 5}
+ for (var i = 0; i < 100; ++i) {
+ o.a = 5;
+ o.a = 7;
+ }
+}
+
+foo();
+foo();
+%OptimizeFunctionOnNextCall(foo)
+foo();
diff --git a/deps/v8/test/mjsunit/compiler/escape-analysis-phi-type-2.js b/deps/v8/test/mjsunit/compiler/escape-analysis-phi-type-2.js
new file mode 100644
index 0000000000..2c2135b6da
--- /dev/null
+++ b/deps/v8/test/mjsunit/compiler/escape-analysis-phi-type-2.js
@@ -0,0 +1,41 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --turbo-escape
+
+function f(x) {
+ var o = {a : 0, b: 0};
+ if (x == 0) {
+ o.a = 1
+ } else {
+ if (x <= 1) {
+ if (x == 2) {
+ o.a = 2;
+ } else {
+ o.a = 1
+ }
+ o.a = 2;
+ } else {
+ if (x == 2) {
+ o.a = "x";
+ } else {
+ o.a = "x";
+ }
+ o.b = 22;
+ }
+ o.b = 22;
+ }
+ return o.a + 1;
+}
+
+f(0,0);
+f(1,0);
+f(2,0);
+f(3,0);
+f(0,1);
+f(1,1);
+f(2,1);
+f(3,1);
+%OptimizeFunctionOnNextCall(f);
+assertEquals(f(2), "x1");
diff --git a/deps/v8/test/mjsunit/compiler/escape-analysis-phi-type.js b/deps/v8/test/mjsunit/compiler/escape-analysis-phi-type.js
new file mode 100644
index 0000000000..806b09b3de
--- /dev/null
+++ b/deps/v8/test/mjsunit/compiler/escape-analysis-phi-type.js
@@ -0,0 +1,24 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --turbo-escape --turbo-experimental --no-turbo-loop-peeling
+
+function f(x) {
+ var o = {a : 0};
+ var l = [1,2,3,4];
+ var res;
+ for (var i = 0; i < 3; ++i) {
+ if (x%2 == 0) { o.a = 1; b = false}
+ res = l[o.a];
+ o.a = x;
+ }
+ return res;
+}
+
+f(0);
+f(1);
+f(0);
+f(1);
+%OptimizeFunctionOnNextCall(f);
+assertEquals(undefined, f(101));
diff --git a/deps/v8/test/mjsunit/compiler/escape-analysis-representation.js b/deps/v8/test/mjsunit/compiler/escape-analysis-representation.js
index 127d92ea7d..1c7cae76c9 100644
--- a/deps/v8/test/mjsunit/compiler/escape-analysis-representation.js
+++ b/deps/v8/test/mjsunit/compiler/escape-analysis-representation.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --use-escape-analysis --max-opt-count=100
+// Flags: --allow-natives-syntax --use-escape-analysis
// This tests that captured objects materialized through the deoptimizer
// have field descriptors with a representation matching the values that
diff --git a/deps/v8/test/mjsunit/compiler/increment-typefeedback.js b/deps/v8/test/mjsunit/compiler/increment-typefeedback.js
index dca488b13f..53e5ed678f 100644
--- a/deps/v8/test/mjsunit/compiler/increment-typefeedback.js
+++ b/deps/v8/test/mjsunit/compiler/increment-typefeedback.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
function f(x) {
x++;
diff --git a/deps/v8/test/mjsunit/compiler/inline-accessors.js b/deps/v8/test/mjsunit/compiler/inline-accessors.js
index 90e0263b42..b3985bf9dc 100644
--- a/deps/v8/test/mjsunit/compiler/inline-accessors.js
+++ b/deps/v8/test/mjsunit/compiler/inline-accessors.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --inline-accessors --max-opt-count=100
+// Flags: --allow-natives-syntax --inline-accessors
var accessorCallCount, setterArgument, setterValue, obj, forceDeopt;
diff --git a/deps/v8/test/mjsunit/compiler/inline-arguments.js b/deps/v8/test/mjsunit/compiler/inline-arguments.js
index 1579926e24..13f4a33e7b 100644
--- a/deps/v8/test/mjsunit/compiler/inline-arguments.js
+++ b/deps/v8/test/mjsunit/compiler/inline-arguments.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --max-opt-count=100
+// Flags: --allow-natives-syntax
function A() {
}
diff --git a/deps/v8/test/mjsunit/compiler/inlined-array-pop-opt.js b/deps/v8/test/mjsunit/compiler/inlined-array-pop-opt.js
index 8263fc2f37..08cbdbef8c 100644
--- a/deps/v8/test/mjsunit/compiler/inlined-array-pop-opt.js
+++ b/deps/v8/test/mjsunit/compiler/inlined-array-pop-opt.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
(function() {
function foo(a) { return a.pop(); }
diff --git a/deps/v8/test/mjsunit/compiler/inlined-call.js b/deps/v8/test/mjsunit/compiler/inlined-call.js
index 97f2514387..772dcbee8b 100644
--- a/deps/v8/test/mjsunit/compiler/inlined-call.js
+++ b/deps/v8/test/mjsunit/compiler/inlined-call.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
var global = this;
diff --git a/deps/v8/test/mjsunit/compiler/instanceof.js b/deps/v8/test/mjsunit/compiler/instanceof.js
index cb88e7c284..f6a364e607 100644
--- a/deps/v8/test/mjsunit/compiler/instanceof.js
+++ b/deps/v8/test/mjsunit/compiler/instanceof.js
@@ -131,3 +131,15 @@ F.__proto__ = null;
assertFalse(foo(new A()));
assertTrue(foo(new F()));
})();
+
+(function() {
+ function foo() {
+ var a = new A();
+ return a instanceof A;
+ }
+
+ assertTrue(foo());
+ assertTrue(foo());
+ %OptimizeFunctionOnNextCall(foo);
+ assertTrue(foo());
+})();
diff --git a/deps/v8/test/mjsunit/compiler/integral32-add-sub.js b/deps/v8/test/mjsunit/compiler/integral32-add-sub.js
index c85397cc8a..16515d3990 100644
--- a/deps/v8/test/mjsunit/compiler/integral32-add-sub.js
+++ b/deps/v8/test/mjsunit/compiler/integral32-add-sub.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
(function() {
function foo(x) {
diff --git a/deps/v8/test/mjsunit/compiler/manual-concurrent-recompile.js b/deps/v8/test/mjsunit/compiler/manual-concurrent-recompile.js
index 094c338dcd..19b4d2a0f1 100644
--- a/deps/v8/test/mjsunit/compiler/manual-concurrent-recompile.js
+++ b/deps/v8/test/mjsunit/compiler/manual-concurrent-recompile.js
@@ -27,7 +27,7 @@
// Flags: --allow-natives-syntax --expose-gc
// Flags: --concurrent-recompilation --block-concurrent-recompilation
-// Flags: --crankshaft --no-always-opt
+// Flags: --opt --no-always-opt
if (!%IsConcurrentRecompilationSupported()) {
print("Concurrent recompilation is disabled. Skipping this test.");
diff --git a/deps/v8/test/mjsunit/compiler/object-getprototypeof.js b/deps/v8/test/mjsunit/compiler/object-getprototypeof.js
new file mode 100644
index 0000000000..ac172dbeb2
--- /dev/null
+++ b/deps/v8/test/mjsunit/compiler/object-getprototypeof.js
@@ -0,0 +1,15 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+var prototype = Object.create(null);
+var object = Object.create(prototype);
+
+function foo() { return Object.getPrototypeOf(object); }
+
+assertSame(prototype, foo());
+assertSame(prototype, foo());
+%OptimizeFunctionOnNextCall(foo);
+assertSame(prototype, foo());
diff --git a/deps/v8/test/mjsunit/compiler/opt-next-call-turbo.js b/deps/v8/test/mjsunit/compiler/opt-next-call-turbo.js
index 39f29c9e5c..eb8df4b50c 100644
--- a/deps/v8/test/mjsunit/compiler/opt-next-call-turbo.js
+++ b/deps/v8/test/mjsunit/compiler/opt-next-call-turbo.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft --turbo-filter=*
+// Flags: --allow-natives-syntax --opt --turbo-filter=*
function foo() {
with ({ value:"fooed" }) { return value; }
diff --git a/deps/v8/test/mjsunit/compiler/opt-next-call.js b/deps/v8/test/mjsunit/compiler/opt-next-call.js
index f1ae5bda09..2878efefe9 100644
--- a/deps/v8/test/mjsunit/compiler/opt-next-call.js
+++ b/deps/v8/test/mjsunit/compiler/opt-next-call.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
function foo() {
return "fooed";
diff --git a/deps/v8/test/mjsunit/compiler/optimized-float32array-length.js b/deps/v8/test/mjsunit/compiler/optimized-float32array-length.js
index 6fde8d6daf..6e08e4a57f 100644
--- a/deps/v8/test/mjsunit/compiler/optimized-float32array-length.js
+++ b/deps/v8/test/mjsunit/compiler/optimized-float32array-length.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
var a = new Float32Array(1);
function len(a) { return a.length; }
diff --git a/deps/v8/test/mjsunit/compiler/optimized-float64array-length.js b/deps/v8/test/mjsunit/compiler/optimized-float64array-length.js
index 13a7539054..7d48d09c68 100644
--- a/deps/v8/test/mjsunit/compiler/optimized-float64array-length.js
+++ b/deps/v8/test/mjsunit/compiler/optimized-float64array-length.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
var a = new Float64Array(1);
function len(a) { return a.length; }
diff --git a/deps/v8/test/mjsunit/compiler/optimized-int32array-length.js b/deps/v8/test/mjsunit/compiler/optimized-int32array-length.js
index cd1b7a775a..00bf8d12a4 100644
--- a/deps/v8/test/mjsunit/compiler/optimized-int32array-length.js
+++ b/deps/v8/test/mjsunit/compiler/optimized-int32array-length.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
var a = new Int32Array(1);
function len(a) { return a.length; }
diff --git a/deps/v8/test/mjsunit/compiler/optimized-uint32array-length.js b/deps/v8/test/mjsunit/compiler/optimized-uint32array-length.js
index fe56e68cb5..3a88ed7d25 100644
--- a/deps/v8/test/mjsunit/compiler/optimized-uint32array-length.js
+++ b/deps/v8/test/mjsunit/compiler/optimized-uint32array-length.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
var a = new Uint32Array(1);
function len(a) { return a.length; }
diff --git a/deps/v8/test/mjsunit/compiler/reflect-getprototypeof.js b/deps/v8/test/mjsunit/compiler/reflect-getprototypeof.js
new file mode 100644
index 0000000000..a5ea89140e
--- /dev/null
+++ b/deps/v8/test/mjsunit/compiler/reflect-getprototypeof.js
@@ -0,0 +1,15 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+var prototype = Object.create(null);
+var object = Object.create(prototype);
+
+function foo() { return Reflect.getPrototypeOf(object); }
+
+assertSame(prototype, foo());
+assertSame(prototype, foo());
+%OptimizeFunctionOnNextCall(foo);
+assertSame(prototype, foo());
diff --git a/deps/v8/test/mjsunit/compiler/regress-5320.js b/deps/v8/test/mjsunit/compiler/regress-5320.js
index 026a51e7cb..e2fa65de31 100644
--- a/deps/v8/test/mjsunit/compiler/regress-5320.js
+++ b/deps/v8/test/mjsunit/compiler/regress-5320.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
function OptimizeTruncatingBinaryOp(func) {
func(42, -2);
diff --git a/deps/v8/test/mjsunit/compiler/regress-715204.js b/deps/v8/test/mjsunit/compiler/regress-715204.js
new file mode 100644
index 0000000000..65f97c0ee3
--- /dev/null
+++ b/deps/v8/test/mjsunit/compiler/regress-715204.js
@@ -0,0 +1,13 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+var global = true;
+global = false;
+
+function f() {
+ global = 1;
+ return !global;
+}
+
+f();
diff --git a/deps/v8/test/mjsunit/compiler/regress-715651.js b/deps/v8/test/mjsunit/compiler/regress-715651.js
new file mode 100644
index 0000000000..a75adc8ae7
--- /dev/null
+++ b/deps/v8/test/mjsunit/compiler/regress-715651.js
@@ -0,0 +1,38 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function f() {
+ this.x = 1;
+}
+
+var a = [];
+
+// Create enough objects to trigger slack tracking.
+for (let i = 0; i < 100; i++) {
+ new f();
+}
+
+function h() {
+ // Create a new object and add an out-of-object property 'y'.
+ var o = new f();
+ o.y = 1.5;
+ return o;
+}
+
+function g(o) {
+ // Add more properties so that we trigger extension of out-ot-object
+ // property store.
+ o.u = 1.1;
+ o.v = 1.2;
+ o.z = 1.3;
+ // Return a field from the out-of-object-property store.
+ return o.y;
+}
+
+g(h());
+g(h());
+%OptimizeFunctionOnNextCall(g);
+assertEquals(1.5, g(h()));
diff --git a/deps/v8/test/mjsunit/compiler/regress-compare-negate.js b/deps/v8/test/mjsunit/compiler/regress-compare-negate.js
index 3ae2cc284c..5591af1b32 100644
--- a/deps/v8/test/mjsunit/compiler/regress-compare-negate.js
+++ b/deps/v8/test/mjsunit/compiler/regress-compare-negate.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --turbo --crankshaft
+// Flags: --allow-natives-syntax --turbo --opt
function CompareNegate(a,b) {
a = a|0;
diff --git a/deps/v8/test/mjsunit/compiler/regress-string-to-number-add.js b/deps/v8/test/mjsunit/compiler/regress-string-to-number-add.js
index e872401c0b..0d524d20fd 100644
--- a/deps/v8/test/mjsunit/compiler/regress-string-to-number-add.js
+++ b/deps/v8/test/mjsunit/compiler/regress-string-to-number-add.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --turbo-type-feedback
+// Flags: --allow-natives-syntax
function f(x) {
var s = x ? "0" : "1";
diff --git a/deps/v8/test/mjsunit/compiler/turbo-number-feedback.js b/deps/v8/test/mjsunit/compiler/turbo-number-feedback.js
index 8dcc42c8a1..8875b8c0c3 100644
--- a/deps/v8/test/mjsunit/compiler/turbo-number-feedback.js
+++ b/deps/v8/test/mjsunit/compiler/turbo-number-feedback.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --turbo-type-feedback
+// Flags: --allow-natives-syntax
(function AddSubtractSmis() {
function f0(a, b, c) {
diff --git a/deps/v8/test/mjsunit/compiler/uint8-clamped-array.js b/deps/v8/test/mjsunit/compiler/uint8-clamped-array.js
index 17a0ad400e..21cc5bbc36 100644
--- a/deps/v8/test/mjsunit/compiler/uint8-clamped-array.js
+++ b/deps/v8/test/mjsunit/compiler/uint8-clamped-array.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
(function() {
function foo(a, v) {
diff --git a/deps/v8/test/mjsunit/const-field-tracking.js b/deps/v8/test/mjsunit/const-field-tracking.js
index ab1dbc1b23..3da6d29bf6 100644
--- a/deps/v8/test/mjsunit/const-field-tracking.js
+++ b/deps/v8/test/mjsunit/const-field-tracking.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft --no-always-opt
+// Flags: --allow-natives-syntax --opt --no-always-opt
var global = this;
diff --git a/deps/v8/test/mjsunit/constant-folding-2.js b/deps/v8/test/mjsunit/constant-folding-2.js
index e9bea0aab5..e2d334b2f2 100644
--- a/deps/v8/test/mjsunit/constant-folding-2.js
+++ b/deps/v8/test/mjsunit/constant-folding-2.js
@@ -27,7 +27,7 @@
// Flags: --nodead-code-elimination --fold-constants
-// Flags: --allow-natives-syntax --nostress-opt --crankshaft
+// Flags: --allow-natives-syntax --nostress-opt --opt
function test(f) {
f();
diff --git a/deps/v8/test/mjsunit/deopt-minus-zero.js b/deps/v8/test/mjsunit/deopt-minus-zero.js
index 47d46cd0f4..38795afa33 100644
--- a/deps/v8/test/mjsunit/deopt-minus-zero.js
+++ b/deps/v8/test/mjsunit/deopt-minus-zero.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --expose-gc --crankshaft
+// Flags: --allow-natives-syntax --expose-gc --opt
function mul (a, b) {
return a * b;
diff --git a/deps/v8/test/mjsunit/deopt-recursive-eager-once.js b/deps/v8/test/mjsunit/deopt-recursive-eager-once.js
index 0c044694b2..ba88b01b1a 100644
--- a/deps/v8/test/mjsunit/deopt-recursive-eager-once.js
+++ b/deps/v8/test/mjsunit/deopt-recursive-eager-once.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft --turbo --no-always-opt
+// Flags: --allow-natives-syntax --opt --turbo --no-always-opt
function foo(i, deopt = false) {
if (i == 0) {
diff --git a/deps/v8/test/mjsunit/deopt-recursive-lazy-once.js b/deps/v8/test/mjsunit/deopt-recursive-lazy-once.js
index ace7bdfda6..f0eec59a4b 100644
--- a/deps/v8/test/mjsunit/deopt-recursive-lazy-once.js
+++ b/deps/v8/test/mjsunit/deopt-recursive-lazy-once.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft --turbo --no-always-opt
+// Flags: --allow-natives-syntax --opt --turbo --no-always-opt
function foo(i, deopt = false) {
if (i == 0) {
diff --git a/deps/v8/test/mjsunit/deopt-recursive-soft-once.js b/deps/v8/test/mjsunit/deopt-recursive-soft-once.js
index af1eb731f4..9338ff553b 100644
--- a/deps/v8/test/mjsunit/deopt-recursive-soft-once.js
+++ b/deps/v8/test/mjsunit/deopt-recursive-soft-once.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft --turbo --no-always-opt
+// Flags: --allow-natives-syntax --opt --turbo --no-always-opt
function foo(i, deopt = false, deoptobj = null) {
diff --git a/deps/v8/test/mjsunit/deopt-unlinked.js b/deps/v8/test/mjsunit/deopt-unlinked.js
index a1f8e72ddb..e7374da543 100644
--- a/deps/v8/test/mjsunit/deopt-unlinked.js
+++ b/deps/v8/test/mjsunit/deopt-unlinked.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft --turbo --no-always-opt
+// Flags: --allow-natives-syntax --opt --turbo --no-always-opt
function foo() {}
diff --git a/deps/v8/test/mjsunit/deopt-with-fp-regs.js b/deps/v8/test/mjsunit/deopt-with-fp-regs.js
index 7591f0358d..bdb08053ae 100644
--- a/deps/v8/test/mjsunit/deopt-with-fp-regs.js
+++ b/deps/v8/test/mjsunit/deopt-with-fp-regs.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --crankshaft --no-always-opt
+// Flags: --allow-natives-syntax --opt --no-always-opt
deopt_trigger = 0;
side_effect = 0;
diff --git a/deps/v8/test/mjsunit/deserialize-optimize-inner.js b/deps/v8/test/mjsunit/deserialize-optimize-inner.js
index bbd3875b55..ca78b8a4b0 100644
--- a/deps/v8/test/mjsunit/deserialize-optimize-inner.js
+++ b/deps/v8/test/mjsunit/deserialize-optimize-inner.js
@@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --cache=code --no-lazy --serialize-inner
-// Flags: --crankshaft
+// Flags: --allow-natives-syntax --cache=code --no-lazy --opt
function f(x, y) { return x + y; }
diff --git a/deps/v8/test/mjsunit/dictionary-properties.js b/deps/v8/test/mjsunit/dictionary-properties.js
index 33360d7f52..cffa48547e 100644
--- a/deps/v8/test/mjsunit/dictionary-properties.js
+++ b/deps/v8/test/mjsunit/dictionary-properties.js
@@ -11,6 +11,7 @@ function SlowObject() {
this.foo = 1;
this.bar = 2;
this.qux = 3;
+ this.z = 4;
delete this.qux;
assertFalse(%HasFastProperties(this));
}
@@ -38,6 +39,7 @@ function SlowPrototype() {
}
SlowPrototype.prototype.bar = 2;
SlowPrototype.prototype.baz = 3;
+SlowPrototype.prototype.z = 4;
delete SlowPrototype.prototype.baz;
assertFalse(%HasFastProperties(SlowPrototype.prototype));
var slow_proto = new SlowPrototype;
diff --git a/deps/v8/test/mjsunit/div-mul-minus-one.js b/deps/v8/test/mjsunit/div-mul-minus-one.js
index c7643ae262..71ad299610 100644
--- a/deps/v8/test/mjsunit/div-mul-minus-one.js
+++ b/deps/v8/test/mjsunit/div-mul-minus-one.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
function div(g) {
return (g/-1) ^ 1
diff --git a/deps/v8/test/mjsunit/element-read-only.js b/deps/v8/test/mjsunit/element-read-only.js
index 9ec027f6cc..dcc7e421b6 100644
--- a/deps/v8/test/mjsunit/element-read-only.js
+++ b/deps/v8/test/mjsunit/element-read-only.js
@@ -2,17 +2,23 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// Flags: --allow-natives-syntax
+
function f(a, b, c, d) { return arguments; }
// Ensure non-configurable argument elements stay non-configurable.
(function () {
var args = f(1);
Object.defineProperty(args, "0", {value: 10, configurable: false});
+ %HeapObjectVerify(args);
assertFalse(Object.getOwnPropertyDescriptor(args, "0").configurable);
+ %HeapObjectVerify(args);
for (var i = 0; i < 10; i++) {
args[i] = 1;
}
+ %HeapObjectVerify(args);
assertFalse(Object.getOwnPropertyDescriptor(args, "0").configurable);
+ %HeapObjectVerify(args);
})();
// Ensure read-only properties on the prototype chain cause TypeError.
@@ -27,7 +33,11 @@ function f(a, b, c, d) { return arguments; }
for (var i = 0; i < index; i++) {
store(o, i, 0);
}
+ %HeapObjectVerify(proto);
+ %HeapObjectVerify(o);
Object.defineProperty(proto, index, {value: 100, writable: false});
+ %HeapObjectVerify(proto);
+ %HeapObjectVerify(o);
assertThrows(function() { store(o, index, 0); });
assertEquals(100, o[index]);
})();
@@ -42,7 +52,11 @@ function f(a, b, c, d) { return arguments; }
for (var i = 0; i < index; i++) {
store(o, i, 0);
}
+ %HeapObjectVerify(proto);
+ %HeapObjectVerify(o);
Object.defineProperty(proto, index, {value: 100, writable: false});
+ %HeapObjectVerify(proto);
+ %HeapObjectVerify(o);
assertThrows(function() { store(o, index, 0); });
assertEquals(100, o[index]);
})();
@@ -57,7 +71,11 @@ function f(a, b, c, d) { return arguments; }
for (var i = 0; i < index; i++) {
store(o, i, 0);
}
+ %HeapObjectVerify(proto);
+ %HeapObjectVerify(o);
Object.defineProperty(proto, index, {value: 100, writable: false});
+ %HeapObjectVerify(proto);
+ %HeapObjectVerify(o);
assertThrows(function() { store(o, index, 0); });
assertEquals(100, o[index]);
})();
@@ -72,7 +90,11 @@ function f(a, b, c, d) { return arguments; }
for (var i = 0; i < index; i++) {
store(o, i, 0);
}
+ %HeapObjectVerify(proto);
+ %HeapObjectVerify(o);
Object.defineProperty(proto, index, {value: 100, writable: false});
+ %HeapObjectVerify(proto);
+ %HeapObjectVerify(o);
assertThrows(function() { store(o, index, 0); });
assertEquals(100, o[index]);
})();
@@ -87,12 +109,17 @@ function f(a, b, c, d) { return arguments; }
for (var i = 0; i < index; i++) {
store(o, i, 0);
}
+ %HeapObjectVerify(proto);
+ %HeapObjectVerify(o);
Object.preventExtensions(proto);
+ %HeapObjectVerify(proto);
+ %HeapObjectVerify(o);
Object.defineProperty(proto, index, {value: 100, writable: false});
+ %HeapObjectVerify(proto);
+ %HeapObjectVerify(o);
assertThrows(function() { store(o, index, 0); });
assertEquals(100, o[index]);
})();
-
// Extensions prevented arguments object.
(function () {
var o = [];
@@ -103,8 +130,14 @@ function f(a, b, c, d) { return arguments; }
for (var i = 0; i < index; i++) {
store(o, i, 0);
}
+ %HeapObjectVerify(proto);
+ %HeapObjectVerify(o);
Object.preventExtensions(proto);
+ %HeapObjectVerify(proto);
+ %HeapObjectVerify(o);
Object.defineProperty(proto, index, {value: 100, writable: false});
+ %HeapObjectVerify(proto);
+ %HeapObjectVerify(o);
assertThrows(function() { store(o, index, 0); });
assertEquals(100, o[index]);
})();
@@ -120,7 +153,11 @@ function f(a, b, c, d) { return arguments; }
store(o, i, 0);
}
proto[1 << 30] = 1;
+ %HeapObjectVerify(proto);
+ %HeapObjectVerify(o);
Object.defineProperty(proto, index, {value: 100, writable: false});
+ %HeapObjectVerify(proto);
+ %HeapObjectVerify(o);
assertThrows(function() { store(o, index, 0); });
assertEquals(100, o[index]);
})();
@@ -134,7 +171,11 @@ function f(a, b, c, d) { return arguments; }
for (var i = 0; i < 3; i++) {
store(o, i, 0);
}
+ %HeapObjectVerify(proto);
+ %HeapObjectVerify(o);
Object.freeze(proto);
+ %HeapObjectVerify(proto);
+ %HeapObjectVerify(o);
assertThrows(function() { store(o, 3, 0); });
assertEquals(3, o[3]);
})();
@@ -148,7 +189,11 @@ function f(a, b, c, d) { return arguments; }
for (var i = 0; i < 3; i++) {
store(o, i, 0);
}
+ %HeapObjectVerify(proto);
+ %HeapObjectVerify(o);
Object.freeze(proto);
+ %HeapObjectVerify(proto);
+ %HeapObjectVerify(o);
assertThrows(function() { store(o, 3, 0); });
assertEquals(3, o[3]);
})();
diff --git a/deps/v8/test/mjsunit/elements-transition-hoisting.js b/deps/v8/test/mjsunit/elements-transition-hoisting.js
index db5b24f6a0..2b67b62b92 100644
--- a/deps/v8/test/mjsunit/elements-transition-hoisting.js
+++ b/deps/v8/test/mjsunit/elements-transition-hoisting.js
@@ -26,7 +26,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax
-// Flags: --nostress-opt --crankshaft
+// Flags: --nostress-opt --opt
// Ensure that ElementsKind transitions in various situations are hoisted (or
// not hoisted) correctly, don't change the semantics programs and don't trigger
diff --git a/deps/v8/test/mjsunit/ensure-growing-store-learns.js b/deps/v8/test/mjsunit/ensure-growing-store-learns.js
index 659ff0d66e..7cb8aaa8ba 100644
--- a/deps/v8/test/mjsunit/ensure-growing-store-learns.js
+++ b/deps/v8/test/mjsunit/ensure-growing-store-learns.js
@@ -3,7 +3,7 @@
// found in the LICENSE file.
// Flags: --allow-natives-syntax --noverify-heap --noenable-slow-asserts
-// Flags: --crankshaft --no-always-opt
+// Flags: --opt --no-always-opt
// --noverify-heap and --noenable-slow-asserts are set because the test is too
// slow with it on.
@@ -65,11 +65,11 @@
assertTrue(%HasFastSmiElements(a));
// Grow a large array into large object space through the keyed store
- // without deoptimizing. Grow by 10s. If we set elements too sparsely, the
+ // without deoptimizing. Grow by 9s. If we set elements too sparsely, the
// array will convert to dictionary mode.
a = new Array(99999);
assertTrue(%HasFastSmiElements(a));
- for (var i = 0; i < 263000; i += 10) {
+ for (var i = 0; i < 263000; i += 9) {
foo2(a, i);
}
diff --git a/deps/v8/test/mjsunit/es6/array-iterator-turbo.js b/deps/v8/test/mjsunit/es6/array-iterator-turbo.js
index def018eea2..c9182f89e0 100644
--- a/deps/v8/test/mjsunit/es6/array-iterator-turbo.js
+++ b/deps/v8/test/mjsunit/es6/array-iterator-turbo.js
@@ -3,7 +3,7 @@
// found in the LICENSE file.
// Flags: --turbo --turbo-escape --allow-natives-syntax --no-always-opt
-// Flags: --crankshaft --turbo-filter=*
+// Flags: --opt --turbo-filter=*
"use strict";
@@ -43,13 +43,15 @@ let tests = {
return sum;
},
- FAST_HOLEY_DOUBLE_ELEMENTS(array) {
+ // TODO(6587): Re-enable the below test case once we no longer deopt due
+ // to non-truncating uses of {CheckFloat64Hole} nodes.
+ /*FAST_HOLEY_DOUBLE_ELEMENTS(array) {
let sum = 0.0;
for (let x of array) {
if (x) sum += x;
}
return sum;
- }
+ }*/
};
let tests = {
@@ -84,12 +86,14 @@ let tests = {
array2: [0.6, 0.4, 0.2],
expected2: 1.2
},
- FAST_HOLEY_DOUBLE_ELEMENTS: {
+ // TODO(6587): Re-enable the below test case once we no longer deopt due
+ // to non-truncating uses of {CheckFloat64Hole} nodes.
+ /*FAST_HOLEY_DOUBLE_ELEMENTS: {
array: [0.1, , 0.3, , 0.5, , 0.7, , 0.9, ,],
expected: 2.5,
array2: [0.1, , 0.3],
expected2: 0.4
- }
+ }*/
};
for (let key of Object.keys(runners)) {
@@ -102,29 +106,13 @@ let tests = {
%OptimizeFunctionOnNextCall(fn);
fn(array);
- // TODO(bmeurer): FAST_HOLEY_DOUBLE_ELEMENTS maps generally deopt when
- // a hole is encountered. Test should be fixed once that is corrected.
- let expect_deopt = /HOLEY_DOUBLE/.test(key);
-
- if (expect_deopt) {
- assertUnoptimized(fn, '', key);
- } else {
- assertOptimized(fn, '', key);
- }
+ assertOptimized(fn, '', key);
assertEquals(expected, fn(array), key);
- if (expect_deopt) {
- assertUnoptimized(fn, '', key);
- } else {
- assertOptimized(fn, '', key);
- }
+ assertOptimized(fn, '', key);
// Check no deopt when another array with the same map is used
assertTrue(%HaveSameMap(array, array2), key);
- if (expect_deopt) {
- assertUnoptimized(fn, '', key);
- } else {
- assertOptimized(fn, '', key);
- }
+ assertOptimized(fn, '', key);
assertEquals(expected2, fn(array2), key);
// CheckMaps bailout
@@ -231,6 +219,10 @@ let tests = {
let clone = new array.constructor(array);
%ArrayBufferNeuter(clone.buffer);
assertThrows(() => sum(clone), TypeError);
+
+ // Clear the slate for the next iteration.
+ %DeoptimizeFunction(sum);
+ %ClearFunctionFeedback(sum);
}
}
};
diff --git a/deps/v8/test/mjsunit/es6/block-let-crankshaft-sloppy.js b/deps/v8/test/mjsunit/es6/block-let-crankshaft-sloppy.js
index d06153ed8a..5711ac270e 100644
--- a/deps/v8/test/mjsunit/es6/block-let-crankshaft-sloppy.js
+++ b/deps/v8/test/mjsunit/es6/block-let-crankshaft-sloppy.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
// Check that the following functions are optimizable.
var functions = [ f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14,
diff --git a/deps/v8/test/mjsunit/es6/block-let-crankshaft.js b/deps/v8/test/mjsunit/es6/block-let-crankshaft.js
index 99a8b52968..97de765c8a 100644
--- a/deps/v8/test/mjsunit/es6/block-let-crankshaft.js
+++ b/deps/v8/test/mjsunit/es6/block-let-crankshaft.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
"use strict";
diff --git a/deps/v8/test/mjsunit/es6/block-scoping-sloppy.js b/deps/v8/test/mjsunit/es6/block-scoping-sloppy.js
index 29eadb17d1..d86eb0794f 100644
--- a/deps/v8/test/mjsunit/es6/block-scoping-sloppy.js
+++ b/deps/v8/test/mjsunit/es6/block-scoping-sloppy.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
// Test functionality of block scopes.
// Hoisting of var declarations.
diff --git a/deps/v8/test/mjsunit/es6/block-scoping.js b/deps/v8/test/mjsunit/es6/block-scoping.js
index ec13592977..9fa22cddc3 100644
--- a/deps/v8/test/mjsunit/es6/block-scoping.js
+++ b/deps/v8/test/mjsunit/es6/block-scoping.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
// Test functionality of block scopes.
"use strict";
diff --git a/deps/v8/test/mjsunit/es6/destructuring-assignment.js b/deps/v8/test/mjsunit/es6/destructuring-assignment.js
index df9bb0e8c6..579c87718b 100644
--- a/deps/v8/test/mjsunit/es6/destructuring-assignment.js
+++ b/deps/v8/test/mjsunit/es6/destructuring-assignment.js
@@ -478,3 +478,93 @@ assertEquals(oz, [1, 2, 3, 4, 5]);
{ firstLetter: "B", rest: ["p", "u", "p", "p", "y"] },
], log);
})();
+
+(function testNewTarget() {
+ assertThrows("(function() { [...new.target] = []; })", SyntaxError);
+ assertThrows("(function() { [a] = [...new.target] = []; })", SyntaxError);
+ assertThrows("(function() { [new.target] = []; })", SyntaxError);
+ assertThrows("(function() { [a] = [new.target] = []; })", SyntaxError);
+ assertThrows("(function() { ({ a: new.target] = {a: 0}); })", SyntaxError);
+ assertThrows("(function() { ({ a } = { a: new.target } = {}); })",
+ SyntaxError);
+
+ function ReturnNewTarget1() {
+ var result;
+ [result = new.target] = [];
+ return result;
+ }
+
+ function ReturnNewTarget2() {
+ var result;
+ [result] = [new.target];
+ return result;
+ }
+
+ function ReturnNewTarget3() {
+ var result;
+ ({ result = new.target } = {});
+ return result;
+ }
+
+ function ReturnNewTarget4() {
+ var result;
+ ({ result } = { result: new.target });
+ return result;
+ }
+
+ function FakeNewTarget() {}
+ assertEquals(undefined, ReturnNewTarget1());
+ assertEquals(ReturnNewTarget1, new ReturnNewTarget1());
+ assertEquals(FakeNewTarget,
+ Reflect.construct(ReturnNewTarget1, [], FakeNewTarget));
+
+ assertEquals(undefined, ReturnNewTarget2());
+ assertEquals(ReturnNewTarget2, new ReturnNewTarget2());
+ assertEquals(FakeNewTarget,
+ Reflect.construct(ReturnNewTarget2, [], FakeNewTarget));
+
+ assertEquals(undefined, ReturnNewTarget3());
+ assertEquals(ReturnNewTarget3, new ReturnNewTarget3());
+ assertEquals(FakeNewTarget,
+ Reflect.construct(ReturnNewTarget3, [], FakeNewTarget));
+
+ assertEquals(undefined, ReturnNewTarget4());
+ assertEquals(ReturnNewTarget4, new ReturnNewTarget4());
+ assertEquals(FakeNewTarget,
+ Reflect.construct(ReturnNewTarget4, [], FakeNewTarget));
+})();
+
+(function testSuperCall() {
+ function ctor(body) {
+ return () => eval("(class extends Object { \n" +
+ " constructor() {\n" +
+ body +
+ "\n }\n" +
+ "})");
+ }
+ assertThrows(ctor("({ new: super() } = {})"), SyntaxError);
+ assertThrows(ctor("({ new: x } = { new: super() } = {})"), SyntaxError);
+ assertThrows(ctor("[super()] = []"), SyntaxError);
+ assertThrows(ctor("[x] = [super()] = []"), SyntaxError);
+ assertThrows(ctor("[...super()] = []"), SyntaxError);
+ assertThrows(ctor("[x] = [...super()] = []"), SyntaxError);
+
+ class Base { get foo() { return 1; } }
+ function ext(body) {
+ return eval("new (class extends Base {\n" +
+ " constructor() {\n" +
+ body + ";\n" +
+ " return { x: super.foo }" +
+ "\n }\n" +
+ "})");
+ }
+ assertEquals(1, ext("let x; [x = super()] = []").x);
+ assertEquals(1, ext("let x, y; [y] = [x = super()] = []").x);
+ assertEquals(1, ext("let x; [x] = [super()]").x);
+ assertEquals(1, ext("let x, y; [y] = [x] = [super()]").x);
+
+ assertEquals(1, ext("let x; ({x = super()} = {})").x);
+ assertEquals(1, ext("let x, y; ({ x: y } = { x = super() } = {})").x);
+ assertEquals(1, ext("let x; ({x} = { x: super() })").x);
+ assertEquals(1, ext("let x, y; ({ x: y } = { x } = { x: super() })").x);
+})();
diff --git a/deps/v8/test/mjsunit/es6/regress/regress-6322.js b/deps/v8/test/mjsunit/es6/regress/regress-6322.js
new file mode 100644
index 0000000000..41f66171ed
--- /dev/null
+++ b/deps/v8/test/mjsunit/es6/regress/regress-6322.js
@@ -0,0 +1,6 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Crash with --verify-heap
+(function*() { for (let { a = class b { } } of [{}]) { } })().next();
diff --git a/deps/v8/test/mjsunit/es6/rest-params-lazy-parsing.js b/deps/v8/test/mjsunit/es6/rest-params-lazy-parsing.js
index c9b81661dc..271ddf3c4a 100644
--- a/deps/v8/test/mjsunit/es6/rest-params-lazy-parsing.js
+++ b/deps/v8/test/mjsunit/es6/rest-params-lazy-parsing.js
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --min-preparse-length=0
-
function variadic(co, ...values) {
var sum = 0;
while (values.length) {
diff --git a/deps/v8/test/mjsunit/es6/string-replace.js b/deps/v8/test/mjsunit/es6/string-replace.js
index 0beb57a536..16cadc5369 100644
--- a/deps/v8/test/mjsunit/es6/string-replace.js
+++ b/deps/v8/test/mjsunit/es6/string-replace.js
@@ -3,7 +3,8 @@
// found in the LICENSE file.
var pattern = {
- [Symbol.replace]: (string, newValue) => string + newValue
+ [Symbol.replace]: (string, newValue) => string + newValue,
+ toString: () => "c"
};
// Check object coercible fails.
assertThrows(() => String.prototype.replace.call(null, pattern, "x"),
@@ -13,5 +14,8 @@ assertEquals("abcdex", "abcde".replace(pattern, "x"));
// Non-callable override.
pattern[Symbol.replace] = "dumdidum";
assertThrows(() => "abcde".replace(pattern, "x"), TypeError);
+// Null override.
+pattern[Symbol.replace] = null;
+assertEquals("abXde", "abcde".replace(pattern, "X"));
assertEquals("[Symbol.replace]", RegExp.prototype[Symbol.replace].name);
diff --git a/deps/v8/test/mjsunit/es6/string-split.js b/deps/v8/test/mjsunit/es6/string-split.js
index 8ca655cad9..c21f9d3d94 100644
--- a/deps/v8/test/mjsunit/es6/string-split.js
+++ b/deps/v8/test/mjsunit/es6/string-split.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-var pattern = {};
+var pattern = {toString: () => ""};
var limit = { value: 3 };
pattern[Symbol.split] = function(string, limit) {
return string.length * limit.value;
@@ -15,5 +15,8 @@ assertEquals(15, "abcde".split(pattern, limit));
// Non-callable override.
pattern[Symbol.split] = "dumdidum";
assertThrows(() => "abcde".split(pattern, limit), TypeError);
+// Null override.
+pattern[Symbol.split] = null;
+assertEquals(["a", "b", "c", "d", "e"], "abcde".split(pattern));
assertEquals("[Symbol.split]", RegExp.prototype[Symbol.split].name);
diff --git a/deps/v8/test/mjsunit/es6/typedarray-construct-by-array-like-prototype-element-added.js b/deps/v8/test/mjsunit/es6/typedarray-construct-by-array-like-prototype-element-added.js
new file mode 100644
index 0000000000..edcba43b52
--- /dev/null
+++ b/deps/v8/test/mjsunit/es6/typedarray-construct-by-array-like-prototype-element-added.js
@@ -0,0 +1,32 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+(function() {
+ var arr = [0, 1, , 3];
+ Array.prototype[2] = 2;
+
+ var constructors = [
+ Uint8Array,
+ Int8Array,
+ Uint16Array,
+ Int16Array,
+ Uint32Array,
+ Int32Array,
+ Float32Array,
+ Float64Array,
+ Uint8ClampedArray
+ ];
+
+ for (var constr of constructors) {
+ var ta = new constr(arr);
+ assertArrayEquals([0, 1, 2, 3], ta);
+ }
+})();
+
+(function testTypedArrayConstructByArrayLikeInvalidArrayProtector() {
+ Array.prototype[2] = undefined;
+ load("test/mjsunit/es6/typedarray-construct-by-array-like.js");
+})();
diff --git a/deps/v8/test/mjsunit/es6/typedarray-construct-by-array-like.js b/deps/v8/test/mjsunit/es6/typedarray-construct-by-array-like.js
index 6f3e961a27..7d17812a8d 100644
--- a/deps/v8/test/mjsunit/es6/typedarray-construct-by-array-like.js
+++ b/deps/v8/test/mjsunit/es6/typedarray-construct-by-array-like.js
@@ -4,7 +4,11 @@
// Flags: --allow-natives-syntax
-function TestConstructSmallObject(constr) {
+var tests = [];
+
+// Tests that will be called with each TypedArray constructor.
+
+tests.push(function TestConstructSmallObject(constr) {
var myObject = { 0: 5, 1: 6, length: 2 };
arr = new constr(myObject);
@@ -12,9 +16,9 @@ function TestConstructSmallObject(constr) {
assertEquals(2, arr.length);
assertEquals(5, arr[0]);
assertEquals(6, arr[1]);
-};
+});
-function TestConstructLargeObject(constr) {
+tests.push(function TestConstructLargeObject(constr) {
var myObject = {};
const n = 128;
for (var i = 0; i < n; i++) {
@@ -28,18 +32,18 @@ function TestConstructLargeObject(constr) {
for (var i = 0; i < n; i++) {
assertEquals(i, arr[i]);
}
-}
+});
-function TestConstructFromArrayWithSideEffects(constr) {
+tests.push(function TestConstructFromArrayWithSideEffects(constr) {
var arr = [{ valueOf() { arr[1] = 20; return 1; }}, 2];
var ta = new constr(arr);
assertEquals(1, ta[0]);
assertEquals(2, ta[1]);
-}
+});
-function TestConstructFromArrayWithSideEffectsHoley(constr) {
+tests.push(function TestConstructFromArrayWithSideEffectsHoley(constr) {
var arr = [{ valueOf() { arr[1] = 20; return 1; }}, 2, , 4];
var ta = new constr(arr);
@@ -48,10 +52,75 @@ function TestConstructFromArrayWithSideEffectsHoley(constr) {
assertEquals(2, ta[1]);
// ta[2] will be the default value, but we aren't testing that here.
assertEquals(4, ta[3]);
-}
+});
+
+tests.push(function TestConstructFromArrayHoleySmi(constr) {
+ var arr = [0, 1, , 3];
+
+ var ta = new constr(arr);
+
+ assertArrayEquals([0, 1, defaultValue(constr), 3], ta);
+});
+
+tests.push(function TestConstructFromArrayHoleyDouble(constr) {
+ var arr = [0.0, 1.0, , 3.0];
+
+ var ta = new constr(arr);
+
+ assertArrayEquals([0, 1, defaultValue(constr), 3], ta);
+});
+
+tests.push(function TestConstructFromArrayHoleySmiWithOtherPrototype(constr) {
+ var arr = [0, 1, , 3];
+ Object.setPrototypeOf(arr, { 2: 2 });
+
+ var ta = new constr(arr);
+
+ assertArrayEquals([0, 1, 2, 3], ta);
+});
+tests.push(function TestConstructFromArrayWithProxyPrototype(constr) {
+ var arr = [0, 1, , 3];
+ var proxy = new Proxy([], {
+ get: function(target, name) {
+ if (name === Symbol.iterator) return undefined;
+ if (name == 2) return 2;
+ return target[name];
+ }
+ });
+ Object.setPrototypeOf(arr, proxy);
-function TestConstructFromArray(constr) {
+ var ta = new constr(arr);
+
+ assertArrayEquals([0, 1, 2, 3], ta);
+});
+
+tests.push(function TestConstructFromArrayHoleySmiWithSubclass(constr) {
+ class SubArray extends Array {}
+ var arr = new SubArray(0, 1);
+ arr[3] = 3;
+
+ var ta = new constr(arr);
+
+ assertArrayEquals([0, 1, defaultValue(constr), 3], ta);
+});
+
+tests.push(function TestConstructFromArrayNoIteratorWithGetter(constr) {
+ var arr = [1, 2, 3];
+ arr[Symbol.iterator] = undefined;
+
+ Object.defineProperty(arr, "2", {
+ get() {
+ return 22;
+ }
+ });
+
+ var ta = new constr(arr);
+
+ assertArrayEquals([1, 2, 22], ta);
+});
+
+tests.push(function TestConstructFromArray(constr) {
var n = 64;
var jsArray = [];
for (var i = 0; i < n; i++) {
@@ -64,9 +133,9 @@ function TestConstructFromArray(constr) {
for (var i = 0; i < n; i++) {
assertEquals(i, arr[i]);
}
-}
+});
-function TestConstructFromTypedArray(constr) {
+tests.push(function TestConstructFromTypedArray(constr) {
var n = 64;
var ta = new constr(n);
for (var i = 0; i < ta.length; i++) {
@@ -79,15 +148,55 @@ function TestConstructFromTypedArray(constr) {
for (var i = 0; i < n; i++) {
assertEquals(i, arr[i]);
}
-}
+});
-function TestLengthIsMaxSmi(constr) {
+tests.push(function TestLengthIsMaxSmi(constr) {
var myObject = { 0: 5, 1: 6, length: %_MaxSmi() + 1 };
assertThrows(function() {
new constr(myObject);
}, RangeError);
-}
+});
+
+tests.push(function TestProxyHoleConverted(constr) {
+ var source = {0: 0, 2: 2, length: 3};
+ var proxy = new Proxy(source, {});
+
+ var converted = new constr(proxy);
+
+ assertArrayEquals([0, defaultValue(constr), 2], converted);
+});
+
+tests.push(function TestProxyToObjectValueOfCalled(constr) {
+ var thrower = { valueOf: function() { throw new TypeError(); } };
+ var source = {0: 0, 1: thrower, length: 2};
+ var proxy = new Proxy(source, {});
+
+ assertThrows(() => new constr(proxy), TypeError);
+});
+
+tests.push(function TestObjectValueOfCalled(constr) {
+ var thrower = { valueOf: function() { throw new TypeError(); } };
+
+ var obj = {0: 0, 1: thrower, length: 2};
+ assertThrows(() => new constr(obj), TypeError);
+});
+
+tests.push(function TestSmiPackedArray(constr) {
+ var ta = new constr([1, 2, 3, 4, 127]);
+
+ assertEquals(5 * constr.BYTES_PER_ELEMENT, ta.byteLength);
+ assertArrayEquals([1, 2, 3, 4, 127], ta);
+});
+
+tests.push(function TestOffsetIsUsed(constr) {
+ TestOffsetIsUsedRunner(constr, 4);
+ TestOffsetIsUsedRunner(constr, 16);
+ TestOffsetIsUsedRunner(constr, 32);
+ TestOffsetIsUsedRunner(constr, 128);
+});
+
+// Helpers for above tests.
function TestOffsetIsUsedRunner(constr, n) {
var buffer = new ArrayBuffer(constr.BYTES_PER_ELEMENT * n);
@@ -109,21 +218,13 @@ function TestOffsetIsUsedRunner(constr, n) {
}
}
-function TestOffsetIsUsed(constr, n) {
- TestOffsetIsUsedRunner(constr, 4);
- TestOffsetIsUsedRunner(constr, 16);
- TestOffsetIsUsedRunner(constr, 32);
- TestOffsetIsUsedRunner(constr, 128);
+function defaultValue(constr) {
+ if (constr == Float32Array || constr == Float64Array) return NaN;
+ return 0;
}
-Test(TestConstructSmallObject);
-Test(TestConstructLargeObject);
-Test(TestConstructFromArrayWithSideEffects);
-Test(TestConstructFromArrayWithSideEffectsHoley);
-Test(TestConstructFromArray);
-Test(TestConstructFromTypedArray);
-Test(TestLengthIsMaxSmi);
-Test(TestOffsetIsUsed);
+tests.forEach(f => Test(f));
+
function Test(func) {
func(Uint8Array);
@@ -136,3 +237,43 @@ function Test(func) {
func(Float64Array);
func(Uint8ClampedArray);
}
+
+// Other, standalone tests.
+
+(function TestUint8ClampedIsNotBitCopied() {
+ var arr = new Int8Array([-1.0, 0, 1.1, 255, 256]);
+ assertArrayEquals([-1, 0, 1, -1, 0], arr);
+ var expected = new Uint8ClampedArray([0, 0, 1, 0, 0]);
+
+ var converted = new Uint8ClampedArray(arr);
+
+ assertArrayEquals([0, 0, 1, 0, 0], converted);
+})();
+
+(function TestInt8ArrayCopying() {
+ var source = new Uint8Array([0, 1, 127, 128, 255, 256]);
+ assertArrayEquals([0, 1, 127, 128, 255, 0], source);
+
+ var converted = new Int8Array(source);
+
+ assertArrayEquals([0, 1, 127, -128, -1, 0], converted);
+})();
+
+(function TestInt16ArrayCopying() {
+ var source = new Uint16Array([0, 1, 32767, 32768, 65535, 65536]);
+ assertArrayEquals([0, 1, 32767, 32768, 65535, 0], source);
+
+ var converted = new Int16Array(source);
+
+ assertArrayEquals([0, 1, 32767, -32768, -1, 0], converted);
+})();
+
+(function TestInt32ArrayCopying() {
+ var source =
+ new Uint32Array([0, 1, 2147483647, 2147483648, 4294967295, 4294967296]);
+ assertArrayEquals([0, 1, 2147483647, 2147483648, 4294967295, 0], source);
+
+ var converted = new Int32Array(source);
+
+ assertArrayEquals([0, 1, 2147483647, -2147483648, -1, 0], converted);
+})();
diff --git a/deps/v8/test/mjsunit/es6/typedarray-construct-offset-not-smi.js b/deps/v8/test/mjsunit/es6/typedarray-construct-offset-not-smi.js
index 27beb762dc..0a267bc64b 100644
--- a/deps/v8/test/mjsunit/es6/typedarray-construct-offset-not-smi.js
+++ b/deps/v8/test/mjsunit/es6/typedarray-construct-offset-not-smi.js
@@ -2,18 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax
+// Flags: --allow-natives-syntax --mock-arraybuffer-allocator
(function TestBufferByteLengthNonSmi() {
var non_smi_byte_length = %_MaxSmi() + 1;
- try {
- var buffer = new ArrayBuffer(non_smi_byte_length);
- } catch (e) {
- // The ArrayBuffer allocation can fail on 32-bit archs, so no need to try to
- // construct the typed array.
- return;
- }
+ var buffer = new ArrayBuffer(non_smi_byte_length);
+
var arr = new Uint16Array(buffer);
assertEquals(non_smi_byte_length, arr.byteLength);
@@ -26,33 +21,17 @@
(function TestByteOffsetNonSmi() {
var non_smi_byte_length = %_MaxSmi() + 11;
- try {
- var buffer = new ArrayBuffer(non_smi_byte_length);
- } catch (e) {
- // The ArrayBuffer allocation can fail on 32-bit archs, so no need to try to
- // construct the typed array.
- return;
- }
- print(buffer.byteLength);
+
+ var buffer = new ArrayBuffer(non_smi_byte_length);
+
var whole = new Uint16Array(buffer);
- whole[non_smi_byte_length / 2 - 1] = 1;
- whole[non_smi_byte_length / 2 - 2] = 2;
- whole[non_smi_byte_length / 2 - 3] = 3;
- whole[non_smi_byte_length / 2 - 4] = 4;
- whole[non_smi_byte_length / 2 - 5] = 5;
+ assertEquals(non_smi_byte_length, whole.byteLength);
assertEquals(non_smi_byte_length / 2, whole.length);
- assertEquals(1, whole[non_smi_byte_length / 2 - 1]);
var arr = new Uint16Array(buffer, non_smi_byte_length - 10, 5);
assertEquals(non_smi_byte_length, arr.buffer.byteLength);
assertEquals(10, arr.byteLength);
assertEquals(5, arr.length);
-
- assertEquals(5, arr[0]);
- assertEquals(4, arr[1]);
- assertEquals(3, arr[2]);
- assertEquals(2, arr[3]);
- assertEquals(1, arr[4]);
})();
diff --git a/deps/v8/test/mjsunit/es6/typedarray-copywithin.js b/deps/v8/test/mjsunit/es6/typedarray-copywithin.js
index 1e63508393..c52a38625b 100644
--- a/deps/v8/test/mjsunit/es6/typedarray-copywithin.js
+++ b/deps/v8/test/mjsunit/es6/typedarray-copywithin.js
@@ -240,8 +240,6 @@ CheckEachTypedArray(function parametersNotCalledIfDetached(constructor) {
var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
%ArrayBufferNeuter(array.buffer);
- // TODO(caitp): this should throw due to being invoked on a TypedArray with a
- // detached buffer (per v8:4648).
- array.copyWithin(tmp, tmp, tmp);
+ assertThrows(() => array.copyWithin(tmp, tmp, tmp), TypeError);
assertEquals(0, array.length, "array.[[ViewedArrayBuffer]] is detached");
});
diff --git a/deps/v8/test/mjsunit/es6/typedarray-every.js b/deps/v8/test/mjsunit/es6/typedarray-every.js
index 4ceee5f3aa..a3498f5786 100644
--- a/deps/v8/test/mjsunit/es6/typedarray-every.js
+++ b/deps/v8/test/mjsunit/es6/typedarray-every.js
@@ -159,6 +159,11 @@ function TestTypedArrayForEach(constructor) {
assertEquals(Array.prototype.every.call(a,
function(elt) { x += elt; return true; }), true);
assertEquals(x, 4);
+
+ // Detached Operation
+ var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
+ %ArrayBufferNeuter(array.buffer);
+ assertThrows(() => array.every(() => true), TypeError);
}
for (i = 0; i < typedArrayConstructors.length; i++) {
diff --git a/deps/v8/test/mjsunit/es6/typedarray-fill.js b/deps/v8/test/mjsunit/es6/typedarray-fill.js
index 260e5ab08a..9ed220373b 100644
--- a/deps/v8/test/mjsunit/es6/typedarray-fill.js
+++ b/deps/v8/test/mjsunit/es6/typedarray-fill.js
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// Flags: --allow-natives-syntax
+
var intArrayConstructors = [
Uint8Array,
Int8Array,
@@ -67,6 +69,18 @@ for (var constructor of typedArrayConstructors) {
assertArrayEquals([3, 3], [a[0], a[1]]);
Array.prototype.fill.call(a, 4);
assertArrayEquals([4, 3], [a[0], a[1]]);
+
+ // Detached Operation
+ var tmp = {
+ [Symbol.toPrimitive]() {
+ assertUnreachable("Parameter should not be processed when " +
+ "array.[[ViewedArrayBuffer]] is neutered.");
+ return 0;
+ }
+ };
+ var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
+ %ArrayBufferNeuter(array.buffer);
+ assertThrows(() => array.fill(tmp), TypeError);
}
for (var constructor of intArrayConstructors) {
diff --git a/deps/v8/test/mjsunit/es6/typedarray-find.js b/deps/v8/test/mjsunit/es6/typedarray-find.js
index 69ceedc8b5..6f646e5c80 100644
--- a/deps/v8/test/mjsunit/es6/typedarray-find.js
+++ b/deps/v8/test/mjsunit/es6/typedarray-find.js
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// Flags: --allow-natives-syntax
+
var typedArrayConstructors = [
Uint8Array,
Int8Array,
@@ -184,4 +186,17 @@ assertEquals(Array.prototype.find.call(a,
function(elt) { x += elt; return false; }), undefined);
assertEquals(x, 4);
+// Detached Operation
+var tmp = {
+ [Symbol.toPrimitive]() {
+ assertUnreachable("Parameter should not be processed when " +
+ "array.[[ViewedArrayBuffer]] is neutered.");
+ return 0;
+ }
+};
+
+var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
+%ArrayBufferNeuter(array.buffer);
+
+assertThrows(() => array.find(tmp), TypeError);
}
diff --git a/deps/v8/test/mjsunit/es6/typedarray-findindex.js b/deps/v8/test/mjsunit/es6/typedarray-findindex.js
index 51c439203d..7447395e77 100644
--- a/deps/v8/test/mjsunit/es6/typedarray-findindex.js
+++ b/deps/v8/test/mjsunit/es6/typedarray-findindex.js
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// Flags: --allow-natives-syntax
+
var typedArrayConstructors = [
Uint8Array,
Int8Array,
@@ -184,4 +186,15 @@ assertEquals(Array.prototype.findIndex.call(a,
function(elt) { x += elt; return false; }), -1);
assertEquals(x, 4);
+// Detached Operation
+ var tmp = {
+ [Symbol.toPrimitive]() {
+ assertUnreachable("Parameter should not be processed when " +
+ "array.[[ViewedArrayBuffer]] is neutered.");
+ return 0;
+ }
+ };
+ var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
+ %ArrayBufferNeuter(array.buffer);
+ assertThrows(() => array.findIndex(tmp), TypeError);
}
diff --git a/deps/v8/test/mjsunit/es6/typedarray-foreach.js b/deps/v8/test/mjsunit/es6/typedarray-foreach.js
index b9789805f6..7a846b1ac7 100644
--- a/deps/v8/test/mjsunit/es6/typedarray-foreach.js
+++ b/deps/v8/test/mjsunit/es6/typedarray-foreach.js
@@ -148,6 +148,11 @@ function TestTypedArrayForEach(constructor) {
assertEquals(Array.prototype.forEach.call(a,
function(elt) { x += elt; }), undefined);
assertEquals(x, 4);
+
+ // Detached Operation
+ var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
+ %ArrayBufferNeuter(array.buffer);
+ assertThrows(() => array.forEach(() => true), TypeError);
}
for (i = 0; i < typedArrayConstructors.length; i++) {
diff --git a/deps/v8/test/mjsunit/es6/typedarray-indexing.js b/deps/v8/test/mjsunit/es6/typedarray-indexing.js
index 1c439f9dda..d12a1570c2 100644
--- a/deps/v8/test/mjsunit/es6/typedarray-indexing.js
+++ b/deps/v8/test/mjsunit/es6/typedarray-indexing.js
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// Flags: --allow-natives-syntax
+
var typedArrayConstructors = [
Uint8Array,
Int8Array,
@@ -14,6 +16,14 @@ var typedArrayConstructors = [
Float64Array
];
+var tmp = {
+ [Symbol.toPrimitive]() {
+ assertUnreachable("Parameter should not be processed when " +
+ "array.[[ViewedArrayBuffer]] is neutered.");
+ return 0;
+ }
+};
+
for (var constructor of typedArrayConstructors) {
var array = new constructor([1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3]);
@@ -53,6 +63,11 @@ for (var constructor of typedArrayConstructors) {
}
assertEquals(-1, array.indexOf(NaN));
+ // Detached Operation
+ var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
+ %ArrayBufferNeuter(array.buffer);
+ assertThrows(() => array.indexOf(tmp), TypeError);
+
// ----------------------------------------------------------------------
// %TypedArray%.prototype.lastIndexOf.
// ----------------------------------------------------------------------
@@ -89,4 +104,9 @@ for (var constructor of typedArrayConstructors) {
assertEquals(-1, array.lastIndexOf(-Infinity));
}
assertEquals(-1, array.lastIndexOf(NaN));
+
+ // Detached Operation
+ var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
+ %ArrayBufferNeuter(array.buffer);
+ assertThrows(() => array.lastIndexOf(tmp), TypeError);
}
diff --git a/deps/v8/test/mjsunit/es6/typedarray-iteration.js b/deps/v8/test/mjsunit/es6/typedarray-iteration.js
index 9560cbc5df..b423ed0f04 100644
--- a/deps/v8/test/mjsunit/es6/typedarray-iteration.js
+++ b/deps/v8/test/mjsunit/es6/typedarray-iteration.js
@@ -4,6 +4,8 @@
// Tests for standard TypedArray array iteration functions.
+// Flags: --allow-natives-syntax
+
var typedArrayConstructors = [
Uint8Array,
Int8Array,
@@ -77,6 +79,11 @@ for (var constructor of typedArrayConstructors) {
assertArrayLikeEquals([2], a.filter(function(elt) {
return elt == 2;
}), constructor);
+
+ // Detached Operation
+ var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
+ %ArrayBufferNeuter(array.buffer);
+ assertThrows(() => array.filter(() => false), TypeError);
})();
(function TypedArrayMapTest() {
@@ -130,6 +137,11 @@ for (var constructor of typedArrayConstructors) {
return NaN;
}), constructor);
}
+
+ // Detached Operation
+ var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
+ %ArrayBufferNeuter(array.buffer);
+ assertThrows(() => array.map((v) => v), TypeError);
})();
//
@@ -189,6 +201,11 @@ for (var constructor of typedArrayConstructors) {
assertEquals(false, Array.prototype.some.call(a, function(elt) {
return elt == 2;
}));
+
+ // Detached Operation
+ var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
+ %ArrayBufferNeuter(array.buffer);
+ assertThrows(() => array.some((v) => false), TypeError);
})();
}
diff --git a/deps/v8/test/mjsunit/es6/typedarray-map.js b/deps/v8/test/mjsunit/es6/typedarray-map.js
new file mode 100644
index 0000000000..54b535fd30
--- /dev/null
+++ b/deps/v8/test/mjsunit/es6/typedarray-map.js
@@ -0,0 +1,49 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+var typedArrayConstructors = [
+ Uint8Array,
+ Int8Array,
+ Uint16Array,
+ Int16Array,
+ Uint32Array,
+ Int32Array,
+ Uint8ClampedArray,
+ Float32Array,
+ Float64Array];
+
+function TestTypedArrayMap(constructor) {
+ assertEquals(1, constructor.prototype.map.length);
+
+ var target;
+
+ class EscapingArray extends constructor {
+ constructor(...args) {
+ super(...args);
+ target = this;
+ }
+ }
+
+ class DetachingArray extends constructor {
+ static get [Symbol.species]() {
+ return EscapingArray;
+ }
+ }
+
+ assertThrows(function(){
+ new DetachingArray(5).map(function(v,i,a){
+ print(i);
+ if (i == 1) {
+ %ArrayBufferNeuter(target.buffer);
+ }
+ })
+ }, TypeError);
+
+}
+
+for (i = 0; i < typedArrayConstructors.length; i++) {
+ TestTypedArrayMap(typedArrayConstructors[i]);
+}
diff --git a/deps/v8/test/mjsunit/es6/typedarray-reduce.js b/deps/v8/test/mjsunit/es6/typedarray-reduce.js
index 1fddeca0bc..ba5d7f7a20 100644
--- a/deps/v8/test/mjsunit/es6/typedarray-reduce.js
+++ b/deps/v8/test/mjsunit/es6/typedarray-reduce.js
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// Flags: --allow-natives-syntax
+
var typedArrayConstructors = [
Uint8Array,
Int8Array,
@@ -247,4 +249,18 @@ for (var constructor of typedArrayConstructors) {
assertEquals(1, constructor.prototype.reduce.length);
assertEquals(1, constructor.prototype.reduceRight.length);
+
+ // Detached Operation
+ var tmp = {
+ [Symbol.toPrimitive]() {
+ assertUnreachable("Parameter should not be processed when " +
+ "array.[[ViewedArrayBuffer]] is neutered.");
+ return 0;
+ }
+ };
+
+ var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
+ %ArrayBufferNeuter(array.buffer);
+ assertThrows(() => array.reduce(sum, tmp), TypeError);
+ assertThrows(() => array.reduceRight(sum, tmp), TypeError);
}
diff --git a/deps/v8/test/mjsunit/es6/typedarray-reverse.js b/deps/v8/test/mjsunit/es6/typedarray-reverse.js
index f32813e155..bfeb227c5c 100644
--- a/deps/v8/test/mjsunit/es6/typedarray-reverse.js
+++ b/deps/v8/test/mjsunit/es6/typedarray-reverse.js
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// Flags: --allow-natives-syntax
+
function ArrayMaker(x) {
return x;
}
@@ -51,4 +53,11 @@ for (var constructor of arrayConstructors) {
}
assertEquals(0, a.reverse.length);
+
+ // Detached Operation
+ if (constructor != ArrayMaker) {
+ var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
+ %ArrayBufferNeuter(array.buffer);
+ assertThrows(() => array.reverse(), TypeError);
+ }
}
diff --git a/deps/v8/test/mjsunit/es6/typedarray-slice.js b/deps/v8/test/mjsunit/es6/typedarray-slice.js
index cddc5bbdec..4fa3b9f21f 100644
--- a/deps/v8/test/mjsunit/es6/typedarray-slice.js
+++ b/deps/v8/test/mjsunit/es6/typedarray-slice.js
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// Flags: --allow-natives-syntax
+
var typedArrayConstructors = [
Uint8Array,
Int8Array,
@@ -67,6 +69,18 @@ for (var constructor of typedArrayConstructors) {
assertEquals(3, slice[1]);
assertTrue(slice instanceof constructor);
+ // Detached Operation
+ var tmp = {
+ [Symbol.toPrimitive]() {
+ assertUnreachable("Parameter should not be processed when " +
+ "array.[[ViewedArrayBuffer]] is neutered.");
+ return 0;
+ }
+ };
+ var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
+ %ArrayBufferNeuter(array.buffer);
+ assertThrows(() => array.slice(tmp, tmp), TypeError);
+
// Check that the species array must be a typed array
class MyTypedArray extends constructor {
static get[Symbol.species]() {
diff --git a/deps/v8/test/mjsunit/es6/typedarray-sort.js b/deps/v8/test/mjsunit/es6/typedarray-sort.js
index 9051a775d0..b69009b22d 100644
--- a/deps/v8/test/mjsunit/es6/typedarray-sort.js
+++ b/deps/v8/test/mjsunit/es6/typedarray-sort.js
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// Flags: --allow-natives-syntax
+
var typedArrayConstructors = [
Uint8Array,
Int8Array,
@@ -60,4 +62,9 @@ for (var constructor of typedArrayConstructors) {
b[0] = 3; b[1] = 2; b[2] = 1;
a.sort();
assertArrayLikeEquals(a, [1, 2], constructor);
+
+ // Detached Operation
+ var array = new constructor([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
+ %ArrayBufferNeuter(array.buffer);
+ assertThrows(() => array.sort(), TypeError);
}
diff --git a/deps/v8/test/mjsunit/es6/typedarray-tostring.js b/deps/v8/test/mjsunit/es6/typedarray-tostring.js
index 9d49cb1cc9..a1fa9c7665 100644
--- a/deps/v8/test/mjsunit/es6/typedarray-tostring.js
+++ b/deps/v8/test/mjsunit/es6/typedarray-tostring.js
@@ -5,6 +5,8 @@
// Array's toString should call the object's own join method, if one exists and
// is callable. Otherwise, just use the original Object.toString function.
+// Flags: --allow-natives-syntax
+
var typedArrayConstructors = [
Uint8Array,
Int8Array,
@@ -96,4 +98,11 @@ for (var constructor of typedArrayConstructors) {
Number.prototype.toLocaleString = NumberToLocaleString;
})();
+
+ // Detached Operation
+ var array = new constructor([1, 2, 3]);
+ %ArrayBufferNeuter(array.buffer);
+ assertThrows(() => array.join(), TypeError);
+ assertThrows(() => array.toLocalString(), TypeError);
+ assertThrows(() => array.toString(), TypeError);
}
diff --git a/deps/v8/test/mjsunit/es6/typedarray.js b/deps/v8/test/mjsunit/es6/typedarray.js
index a483e551a9..dcfc9caa30 100644
--- a/deps/v8/test/mjsunit/es6/typedarray.js
+++ b/deps/v8/test/mjsunit/es6/typedarray.js
@@ -496,6 +496,16 @@ function TestTypedArraySet() {
}
}
+ a = new Uint32Array();
+ a.set('');
+ assertEquals(0, a.length);
+
+ assertThrows(() => a.set('abc'), RangeError);
+
+ a = new Uint8Array(3);
+ a.set('123');
+ assertArrayEquals([1, 2, 3], a);
+
var a11 = new Int16Array([1, 2, 3, 4, 0, -1])
var a12 = new Uint16Array(15)
a12.set(a11, 3)
@@ -579,6 +589,21 @@ function TestTypedArraySet() {
assertThrows(function() { a.set(0, 1); }, TypeError);
assertEquals(1, a.set.length);
+
+ // Shared buffer that does not overlap.
+ var buf = new ArrayBuffer(32);
+ var a101 = new Int8Array(buf, 0, 16);
+ var b101 = new Uint8Array(buf, 16);
+ b101[0] = 42;
+ a101.set(b101);
+ assertArrayPrefix([42], a101);
+
+ buf = new ArrayBuffer(32);
+ var a101 = new Int8Array(buf, 0, 16);
+ var b101 = new Uint8Array(buf, 16);
+ a101[0] = 42;
+ b101.set(a101);
+ assertArrayPrefix([42], b101);
}
TestTypedArraySet();
diff --git a/deps/v8/test/mjsunit/es8/constructor-returning-primitive.js b/deps/v8/test/mjsunit/es8/constructor-returning-primitive.js
new file mode 100644
index 0000000000..1c0e7725be
--- /dev/null
+++ b/deps/v8/test/mjsunit/es8/constructor-returning-primitive.js
@@ -0,0 +1,318 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --harmony-restrict-constructor-return
+
+assertThrows(
+ () => {
+ new class {
+ constructor() {
+ return 1;
+ }
+ }();
+ },
+ TypeError,
+ "Class constructors may only return object or undefined"
+);
+
+assertThrows(
+ () => {
+ new class {
+ constructor() {
+ return 2147483649;
+ }
+ }();
+ },
+ TypeError,
+ "Class constructors may only return object or undefined"
+);
+
+assertThrows(
+ () => {
+ new class {
+ constructor() {
+ return true;
+ }
+ }();
+ },
+ TypeError,
+ "Class constructors may only return object or undefined"
+);
+
+assertThrows(
+ () => {
+ new class {
+ constructor() {
+ return null;
+ }
+ }();
+ },
+ TypeError,
+ "Class constructors may only return object or undefined"
+);
+
+assertThrows(
+ () => {
+ new class {
+ constructor() {
+ return "wat";
+ }
+ }();
+ },
+ TypeError,
+ "Class constructors may only return object or undefined"
+);
+
+assertThrows(
+ () => {
+ new class {
+ constructor() {
+ return Symbol();
+ }
+ }();
+ },
+ TypeError,
+ "Class constructors may only return object or undefined"
+);
+
+assertThrows(
+ () => {
+ new class {
+ constructor() {
+ return 2.2;
+ }
+ }();
+ },
+ TypeError,
+ "Class constructors may only return object or undefined"
+);
+
+assertThrows(
+ () => {
+ new class extends Object {
+ constructor() {
+ return 1;
+ }
+ }();
+ },
+ TypeError,
+ "Class constructors may only return object or undefined"
+);
+
+assertThrows(
+ () => {
+ new class extends Object {
+ constructor() {
+ return 2147483649;
+ }
+ }();
+ },
+ TypeError,
+ "Class constructors may only return object or undefined"
+);
+
+assertThrows(
+ () => {
+ new class extends Object {
+ constructor() {
+ return true;
+ }
+ }();
+ },
+ TypeError,
+ "Class constructors may only return object or undefined"
+);
+
+assertThrows(
+ () => {
+ new class extends Object {
+ constructor() {
+ return null;
+ }
+ }();
+ },
+ TypeError,
+ "Class constructors may only return object or undefined"
+);
+
+assertThrows(
+ () => {
+ new class extends Object {
+ constructor() {
+ return "wat";
+ }
+ }();
+ },
+ TypeError,
+ "Class constructors may only return object or undefined"
+);
+
+assertThrows(
+ () => {
+ new class extends Object {
+ constructor() {
+ return Symbol();
+ }
+ }();
+ },
+ TypeError,
+ "Class constructors may only return object or undefined"
+);
+
+assertThrows(
+ () => {
+ new class extends Object {
+ constructor() {
+ return 2.2;
+ }
+ }();
+ },
+ TypeError,
+ "Class constructors may only return object or undefined"
+);
+
+assertThrows(
+ () => {
+ new class extends Object {
+ constructor() {}
+ }();
+ },
+ ReferenceError,
+ "Must call super constructor in derived class before accessing " +
+ "'this' or returning from derived constructor"
+);
+
+(function() {
+ let ret_val = { x: 1 };
+ let x = new class {
+ constructor() {
+ return ret_val;
+ }
+ }();
+ assertSame(ret_val, x);
+})();
+
+(function() {
+ class Foo {
+ constructor() {}
+ }
+ let x = new Foo();
+ assertTrue(x instanceof Foo);
+})();
+
+(function() {
+ class Foo {
+ constructor() {
+ return undefined;
+ }
+ }
+ let x = new Foo();
+ assertTrue(x instanceof Foo);
+})();
+
+(function() {
+ let ret_val = { x: 1 };
+ let x = new class extends Object {
+ constructor() {
+ return ret_val;
+ }
+ }();
+ assertSame(ret_val, x);
+})();
+
+(function() {
+ class Foo extends Object {
+ constructor() {
+ super();
+ return undefined;
+ }
+ }
+
+ let x = new Foo();
+ assertTrue(x instanceof Foo);
+})();
+
+(function() {
+ class Foo extends Object {
+ constructor() {
+ super();
+ }
+ }
+
+ let x = new Foo();
+ assertTrue(x instanceof Foo);
+})();
+
+(function() {
+ function foo() {
+ return 1;
+ }
+ let x = new foo();
+ assertTrue(x instanceof foo);
+})();
+
+(function() {
+ function foo() {
+ return 2147483649;
+ }
+ let x = new foo();
+ assertTrue(x instanceof foo);
+})();
+
+(function() {
+ function foo() {
+ return true;
+ }
+ let x = new foo();
+ assertTrue(x instanceof foo);
+})();
+
+(function() {
+ function foo() {
+ return undefined;
+ }
+ let x = new foo();
+ assertTrue(x instanceof foo);
+})();
+
+(function() {
+ function foo() {
+ return null;
+ }
+ let x = new foo();
+ assertTrue(x instanceof foo);
+})();
+
+(function() {
+ function foo() {
+ return "wat";
+ }
+ let x = new foo();
+ assertTrue(x instanceof foo);
+})();
+
+(function() {
+ function foo() {
+ return Symbol();
+ }
+ let x = new foo();
+ assertTrue(x instanceof foo);
+})();
+
+(function() {
+ function foo() {
+ return 2.2;
+ }
+ let x = new foo();
+ assertTrue(x instanceof foo);
+})();
+
+(function() {
+ var ret_val = { x: 1 };
+ function foo() {
+ return ret_val;
+ }
+ let x = new foo();
+ assertSame(x, ret_val);
+})();
diff --git a/deps/v8/test/mjsunit/field-type-tracking.js b/deps/v8/test/mjsunit/field-type-tracking.js
index e6b19b9bbc..2e0cb8bd6f 100644
--- a/deps/v8/test/mjsunit/field-type-tracking.js
+++ b/deps/v8/test/mjsunit/field-type-tracking.js
@@ -3,7 +3,7 @@
// found in the LICENSE file.
// Flags: --allow-natives-syntax --nostress-opt --track-field-types
-// Flags: --crankshaft --no-always-opt
+// Flags: --opt --no-always-opt
(function() {
var o = { text: "Hello World!" };
diff --git a/deps/v8/test/mjsunit/fixed-context-shapes-when-recompiling.js b/deps/v8/test/mjsunit/fixed-context-shapes-when-recompiling.js
index b78b5562bf..8221665ccb 100644
--- a/deps/v8/test/mjsunit/fixed-context-shapes-when-recompiling.js
+++ b/deps/v8/test/mjsunit/fixed-context-shapes-when-recompiling.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --min-preparse-length=1 --allow-natives-syntax --lazy-inner-functions
+// Flags: --allow-natives-syntax --lazy-inner-functions
// Test that the information on which variables to allocate in context doesn't
// change when recompiling.
diff --git a/deps/v8/test/mjsunit/function-arguments-duplicate.js b/deps/v8/test/mjsunit/function-arguments-duplicate.js
index 80f03a106b..a0ec37ca10 100644
--- a/deps/v8/test/mjsunit/function-arguments-duplicate.js
+++ b/deps/v8/test/mjsunit/function-arguments-duplicate.js
@@ -27,10 +27,14 @@
// Execises ArgumentsAccessStub::GenerateNewNonStrictSlow.
+// Flags: --allow-natives-syntax
+
function f(a, a) {
assertEquals(2, a);
assertEquals(1, arguments[0]);
assertEquals(2, arguments[1]);
+ assertEquals(2, arguments.length);
+ %HeapObjectVerify(arguments);
}
f(1, 2);
diff --git a/deps/v8/test/mjsunit/getters-on-elements.js b/deps/v8/test/mjsunit/getters-on-elements.js
index 85525f8466..c80cdb3f86 100644
--- a/deps/v8/test/mjsunit/getters-on-elements.js
+++ b/deps/v8/test/mjsunit/getters-on-elements.js
@@ -25,17 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --max-opt-count=100 --noalways-opt
-// Flags: --nocollect-maps --crankshaft
-
-// We specify max-opt-count because we opt/deopt the same function many
-// times.
-
-// We specify nocollect-maps because in gcstress we can end up deoptimizing
-// a function in a gc in the stack guard at the beginning of the (optimized)
-// function due to leftover map clearing work that results in deoptimizing
-// dependent code from those maps. The choice is to insert strategic gc()
-// calls or specify this flag.
+// Flags: --allow-natives-syntax --noalways-opt --opt
// It's nice to run this in other browsers too.
var standalone = false;
@@ -88,17 +78,38 @@ function base_getter_test(create_func) {
foo(a);
assertUnoptimized(foo);
+ // Smi and Double elements transition the KeyedLoadIC to Generic state
+ // here, because they miss twice with the same map when loading the hole.
+ // For FAST_HOLEY_ELEMENTS, however, the IC knows how to convert the hole
+ // to undefined if the prototype is the original array prototype, so it
+ // stays monomorphic for now...
foo(a);
foo(a);
delete a[0];
assertEquals(0, calls);
a.__proto__ = ap;
+ // ...and later becomes polymorphic when it sees a second map. Optimized
+ // code will therefore inline the elements access, and deopt right away
+ // when it loads the hole from index [0].
+ // Possible solutions:
+ // - remove the convert_hole_to_undefined flag from the IC, to force it
+ // into generic state for all elements kinds. Cost: slower ICs in code
+ // that doesn't get optimized.
+ // - teach Turbofan about the same trick: for holey elements with the
+ // original array prototype, convert hole to undefined inline. Cost:
+ // larger optimized code size, because the loads for different maps with
+ // the same elements kind can no longer be consolidated if they handle
+ // the hole differently.
+ // - call "foo" twice after setting a.__proto__ and before optimizing it;
+ // this is the simplest fix so let's do that for now.
foo(a);
assertEquals(1, calls);
- optimize(foo);
foo(a);
assertEquals(2, calls);
+ optimize(foo);
+ foo(a);
+ assertEquals(3, calls);
assertOptimized(foo);
// Testcase: getter "deep" in prototype chain.
diff --git a/deps/v8/test/mjsunit/global-accessors.js b/deps/v8/test/mjsunit/global-accessors.js
index 47f4328b0e..00658f43a5 100644
--- a/deps/v8/test/mjsunit/global-accessors.js
+++ b/deps/v8/test/mjsunit/global-accessors.js
@@ -26,6 +26,8 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Test accessors on the global object.
+//
+// Flags: --no-harmony-strict-legacy-accessor-builtins
var x_ = 0;
diff --git a/deps/v8/test/mjsunit/harmony/async-generators-basic.js b/deps/v8/test/mjsunit/harmony/async-generators-basic.js
index 6d41aada60..29441b119b 100644
--- a/deps/v8/test/mjsunit/harmony/async-generators-basic.js
+++ b/deps/v8/test/mjsunit/harmony/async-generators-basic.js
@@ -1658,3 +1658,73 @@ assertEqualsAsync({ value: undefined, done: true }, () => it.next("x"));
assertEqualsAsync({ value: "nores", done: true },
() => it.return("nores"));
assertThrowsAsync(() => it.throw(new MyError("nores")), MyError, "nores");
+
+// ----------------------------------------------------------------------------
+// Simple yield*:
+
+log = [];
+async function* asyncGeneratorYieldStar1() {
+ yield* {
+ get [Symbol.asyncIterator]() {
+ log.push({ name: "get @@asyncIterator" });
+ return (...args) => {
+ log.push({ name: "call @@asyncIterator", args });
+ return this;
+ };
+ },
+ get [Symbol.iterator]() {
+ log.push({ name: "get @@iterator" });
+ return (...args) => {
+ log.push({ name: "call @@iterator", args });
+ return this;
+ }
+ },
+ get next() {
+ log.push({ name: "get next" });
+ return (...args) => {
+ log.push({ name: "call next", args });
+ return {
+ get then() {
+ log.push({ name: "get then" });
+ return null;
+ },
+ get value() {
+ log.push({ name: "get value" });
+ throw (exception = new MyError("AbruptValue!"));
+ },
+ get done() {
+ log.push({ name: "get done" });
+ return false;
+ }
+ };
+ }
+ },
+ get return() {
+ log.push({ name: "get return" });
+ return (...args) => {
+ log.push({ name: "call return", args });
+ return { value: args[0], done: true };
+ }
+ },
+ get throw() {
+ log.push({ name: "get throw" });
+ return (...args) => {
+ log.push({ name: "call throw", args });
+ throw args[0];
+ };
+ },
+ };
+}
+
+it = asyncGeneratorYieldStar1();
+assertThrowsAsync(() => it.next(), MyError);
+assertEquals([
+ { name: "get @@asyncIterator" },
+ { name: "call @@asyncIterator", args: [] },
+ { name: "get next" },
+ { name: "call next", args: [undefined] },
+ { name: "get then" },
+ { name: "get done" },
+ { name: "get value" },
+], log);
+assertEqualsAsync({ value: undefined, done: true }, () => it.next());
diff --git a/deps/v8/test/mjsunit/harmony/atomics.js b/deps/v8/test/mjsunit/harmony/atomics.js
index 840d00e78b..ef90076103 100644
--- a/deps/v8/test/mjsunit/harmony/atomics.js
+++ b/deps/v8/test/mjsunit/harmony/atomics.js
@@ -62,9 +62,9 @@ var IntegerTypedArrayConstructors = [
var si32a = new Int32Array(sab);
var si32a2 = new Int32Array(sab, 4);
- // Non-integer indexes should throw RangeError.
- var nonInteger = [1.4, '1.4', NaN, -Infinity, Infinity, undefined, 'hi', {}];
- nonInteger.forEach(function(i) {
+ // Indexes that are out of bounds when coerced via ToIndex should throw
+ // RangeError.
+ [-Infinity, Infinity].forEach(function(i) {
assertThrows(function() { Atomics.compareExchange(si32a, i, 0); },
RangeError);
assertThrows(function() { Atomics.load(si32a, i, 0); }, RangeError);
@@ -140,7 +140,8 @@ var IntegerTypedArrayConstructors = [
};
// These values all map to index 0
- [-0, 0, 0.0, null, false].forEach(function(i) {
+ [-0, 0, 0.0, null, false, NaN, {}, '0.2', 'hi', undefined].forEach(
+ function(i) {
var name = String(i);
[si32a, si32a2].forEach(function(array) {
testOp(Atomics.compareExchange, array, i, 0, name);
@@ -564,3 +565,33 @@ function clearArray(sab) {
});
})();
+
+(function TestValidateIndexBeforeValue() {
+ var testOp = function(op, sta, name) {
+ var valueof_has_been_called = 0;
+ var value = {valueOf: function() { valueof_has_been_called = 1; return 0;}};
+ var index = -1;
+
+ // The index should be checked before calling ToInteger on the value, so
+ // valueof_has_been_called should not be modified.
+ sta[0] = 0;
+ assertThrows(function() { op(sta, index, value, value); }, RangeError);
+ assertEquals(0, valueof_has_been_called);
+ };
+
+ IntegerTypedArrayConstructors.forEach(function(t) {
+ var sab = new SharedArrayBuffer(10 * t.constr.BYTES_PER_ELEMENT);
+ var sta = new t.constr(sab);
+ var name = Object.prototype.toString.call(sta);
+
+ testOp(Atomics.compareExchange, sta, name);
+ testOp(Atomics.load, sta, name);
+ testOp(Atomics.store, sta, name);
+ testOp(Atomics.add, sta, name);
+ testOp(Atomics.sub, sta, name);
+ testOp(Atomics.and, sta, name);
+ testOp(Atomics.or, sta, name);
+ testOp(Atomics.xor, sta, name);
+ testOp(Atomics.exchange, sta, name);
+ });
+})();
diff --git a/deps/v8/test/mjsunit/harmony/do-expressions.js b/deps/v8/test/mjsunit/harmony/do-expressions.js
index 5adf1545a5..ea0ed2b04e 100644
--- a/deps/v8/test/mjsunit/harmony/do-expressions.js
+++ b/deps/v8/test/mjsunit/harmony/do-expressions.js
@@ -3,7 +3,7 @@
// found in the LICENSE file.
// Flags: --harmony-do-expressions --allow-natives-syntax --no-always-opt
-// Flags: --crankshaft
+// Flags: --opt
function returnValue(v) { return v; }
function MyError() {}
diff --git a/deps/v8/test/mjsunit/harmony/global-accessors-strict.js b/deps/v8/test/mjsunit/harmony/global-accessors-strict.js
new file mode 100644
index 0000000000..15a581e795
--- /dev/null
+++ b/deps/v8/test/mjsunit/harmony/global-accessors-strict.js
@@ -0,0 +1,54 @@
+// Copyright 2010 the V8 project authors. All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Test accessors on the global object.
+//
+// Flags: --harmony-strict-legacy-accessor-builtins
+
+var x_ = 0;
+
+this.__defineSetter__('x', function(x) { x_ = x; });
+this.__defineGetter__('x', function() { return x_; });
+
+this.__defineSetter__('y', function(x) { });
+this.__defineGetter__('y', function() { return 7; });
+
+function f(a) {
+ x = x + a;
+ return x;
+}
+
+function g(a) {
+ y = y + a;
+ return y;
+}
+
+assertEquals(1, f(1));
+assertEquals(3, f(2));
+
+assertEquals(7, g(1));
+assertEquals(7, g(2));
diff --git a/deps/v8/test/mjsunit/harmony/regexp-dotall.js b/deps/v8/test/mjsunit/harmony/regexp-dotall.js
index 9bf78431a9..eed5d26f05 100644
--- a/deps/v8/test/mjsunit/harmony/regexp-dotall.js
+++ b/deps/v8/test/mjsunit/harmony/regexp-dotall.js
@@ -56,6 +56,12 @@ function toSlowMode(re) {
assertFalse(re.dotAll);
}
+// Different construction variants with all flags.
+{
+ assertEquals("gimsuy", new RegExp("", "yusmig").flags);
+ assertEquals("gimsuy", new RegExp().compile("", "yusmig").flags);
+}
+
// Default '.' behavior.
{
let re = /^.$/;
diff --git a/deps/v8/test/mjsunit/harmony/regexp-named-captures.js b/deps/v8/test/mjsunit/harmony/regexp-named-captures.js
index 42dbe0f74f..be90427cfa 100644
--- a/deps/v8/test/mjsunit/harmony/regexp-named-captures.js
+++ b/deps/v8/test/mjsunit/harmony/regexp-named-captures.js
@@ -147,7 +147,7 @@ assertThrows('/(?<𐒤>a)/u', SyntaxError); // ID_Continue but not ID_Start.
assertEquals("a", /(?<π>a)/.exec("bab").groups.π);
assertEquals("a", /(?<$>a)/.exec("bab").groups.$);
assertEquals("a", /(?<_>a)/.exec("bab").groups._);
-assertEquals("a", /(?<$𐒤>a)/.exec("bab").groups.$𐒤);
+assertThrows("/(?<$𐒤>a)/", SyntaxError);
assertEquals("a", /(?<ಠ_ಠ>a)/.exec("bab").groups.ಠ_ಠ);
assertThrows('/(?<❤>a)/', SyntaxError);
assertThrows('/(?<𐒤>a)/', SyntaxError); // ID_Continue but not ID_Start.
@@ -195,10 +195,15 @@ assertTrue(/(?<\u0041>.)/u.test("a")); // \u NonSurrogate
assertTrue(/(?<\u{0041}>.)/u.test("a")); // \u{ Non-surrogate }
assertTrue(/(?<a\u{104A4}>.)/u.test("a")); // \u{ Surrogate, ID_Continue }
assertThrows("/(?<a\\u{110000}>.)/u", SyntaxError); // \u{ Out-of-bounds }
+assertThrows("/(?<a\\uD801>.)/u", SyntaxError); // Lead
+assertThrows("/(?<a\\uDCA4>.)/u", SyntaxError); // Trail
assertThrows("/(?<a\uD801>.)/u", SyntaxError); // Lead
assertThrows("/(?<a\uDCA4>.)/u", SyntaxError); // Trail
+assertTrue(RegExp("(?<\\u{0041}>.)", "u").test("a")); // Non-surrogate
+assertTrue(RegExp("(?<a\\u{104A4}>.)", "u").test("a")); // Surrogate,ID_Continue
assertTrue(RegExp("(?<\u{0041}>.)", "u").test("a")); // Non-surrogate
assertTrue(RegExp("(?<a\u{104A4}>.)", "u").test("a")); // Surrogate,ID_Continue
+assertTrue(RegExp("(?<\\u0041>.)", "u").test("a")); // Non-surrogate
assertThrows("/(?<a\\uD801\uDCA4>.)/", SyntaxError);
assertThrows("/(?<a\\uD801>.)/", SyntaxError);
@@ -207,10 +212,15 @@ assertTrue(/(?<\u0041>.)/.test("a"));
assertThrows("/(?<\\u{0041}>.)/", SyntaxError);
assertThrows("/(?<a\\u{104A4}>.)/", SyntaxError);
assertThrows("/(?<a\\u{10FFFF}>.)/", SyntaxError);
+assertThrows("/(?<a\\uD801>.)/", SyntaxError); // Lead
+assertThrows("/(?<a\\uDCA4>.)/", SyntaxError); // Trail;
assertThrows("/(?<a\uD801>.)/", SyntaxError); // Lead
assertThrows("/(?<a\uDCA4>.)/", SyntaxError); // Trail
+assertThrows("/(?<\\u{0041}>.)/", SyntaxError); // Non-surrogate
+assertThrows("/(?<a\\u{104A4}>.)/", SyntaxError); // Surrogate, ID_Continue
assertTrue(RegExp("(?<\u{0041}>.)").test("a")); // Non-surrogate
-assertTrue(RegExp("(?<a\u{104A4}>.)").test("a")); // Surrogate, ID_Continue
+assertThrows("(?<a\u{104A4}>.)", SyntaxError); // Surrogate, ID_Continue
+assertTrue(RegExp("(?<\\u0041>.)").test("a")); // Non-surrogate
// @@replace with a callable replacement argument (no named captures).
{
diff --git a/deps/v8/test/mjsunit/harmony/regexp-property-binary.js b/deps/v8/test/mjsunit/harmony/regexp-property-binary.js
index e1daf08568..8ab3f19329 100644
--- a/deps/v8/test/mjsunit/harmony/regexp-property-binary.js
+++ b/deps/v8/test/mjsunit/harmony/regexp-property-binary.js
@@ -13,6 +13,19 @@ assertThrows("/\\p{Bidi_C=False}/u");
assertThrows("/\\P{Bidi_Control=Y}/u");
assertThrows("/\\p{AHex=Yes}/u");
+assertThrows("/\\p{Composition_Exclusion}/u");
+assertThrows("/\\p{CE}/u");
+assertThrows("/\\p{Full_Composition_Exclusion}/u");
+assertThrows("/\\p{Comp_Ex}/u");
+assertThrows("/\\p{Grapheme_Link}/u");
+assertThrows("/\\p{Gr_Link}/u");
+assertThrows("/\\p{Hyphen}/u");
+assertThrows("/\\p{NFD_Inert}/u");
+assertThrows("/\\p{NFDK_Inert}/u");
+assertThrows("/\\p{NFC_Inert}/u");
+assertThrows("/\\p{NFKC_Inert}/u");
+assertThrows("/\\p{Segment_Starter}/u");
+
t(/\p{Alphabetic}/u, "æ");
f(/\p{Alpha}/u, "1");
@@ -43,9 +56,6 @@ f(/\p{CWT}/u, "1");
t(/\p{Changes_When_Uppercased}/u, "b");
f(/\p{CWU}/u, "1");
-//t(/\p{Composition_Exclusion}/u, "\u0958");
-//f(/\p{CE}/u, "1");
-
t(/\p{Dash}/u, "-");
f(/\p{Dash}/u, "1");
@@ -76,9 +86,6 @@ f(/\p{Emoji_Presentation}/u, "x");
t(/\p{Extender}/u, "\u3005");
f(/\p{Ext}/u, "x");
-t(/\p{Full_Composition_Exclusion}/u, "\uFB1F");
-f(/\p{Comp_Ex}/u, "x");
-
t(/\p{Grapheme_Base}/u, " ");
f(/\p{Gr_Base}/u, "\u0010");
@@ -124,9 +131,6 @@ f(/\p{NChar}/u, "A");
t(/\p{Pattern_White_Space}/u, "\u0009");
f(/\p{Pat_Syn}/u, "A");
-// t(/\p{Prepended_Concatenation_Mark}/u, "\uFDD0");
-// f(/\p{PCM}/u, "A");
-
t(/\p{Quotation_Mark}/u, "'");
f(/\p{QMark}/u, "A");
diff --git a/deps/v8/test/mjsunit/indexed-accessors.js b/deps/v8/test/mjsunit/indexed-accessors.js
index b69695a99f..534a6c95c3 100644
--- a/deps/v8/test/mjsunit/indexed-accessors.js
+++ b/deps/v8/test/mjsunit/indexed-accessors.js
@@ -101,7 +101,7 @@ assertEquals(q1.b, 17);
// Reported by nth10sd.
a = function() {};
-__defineSetter__("0", function() {});
+this.__defineSetter__("0", function() {});
if (a |= '') {};
assertThrows('this[a].__parent__');
assertEquals(a, 0);
diff --git a/deps/v8/test/mjsunit/keyed-load-hole-to-undefined.js b/deps/v8/test/mjsunit/keyed-load-hole-to-undefined.js
index 9366458a5f..47dc65b0a0 100644
--- a/deps/v8/test/mjsunit/keyed-load-hole-to-undefined.js
+++ b/deps/v8/test/mjsunit/keyed-load-hole-to-undefined.js
@@ -3,7 +3,7 @@
// found in the LICENSE file.
// Flags: --allow-natives-syntax
-// Flags: --no-stress-opt --crankshaft --no-always-opt
+// Flags: --no-stress-opt --opt --no-always-opt
// --nostress-opt is specified because the test corrupts the "pristine"
// array prototype chain by storing an element, and this is tracked
diff --git a/deps/v8/test/mjsunit/keyed-load-with-string-key.js b/deps/v8/test/mjsunit/keyed-load-with-string-key.js
index 2d5f0200d0..ee055e4790 100644
--- a/deps/v8/test/mjsunit/keyed-load-with-string-key.js
+++ b/deps/v8/test/mjsunit/keyed-load-with-string-key.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
var o = {
diff --git a/deps/v8/test/mjsunit/keyed-load-with-symbol-key.js b/deps/v8/test/mjsunit/keyed-load-with-symbol-key.js
index 2c818a84ae..d0be0a0545 100644
--- a/deps/v8/test/mjsunit/keyed-load-with-symbol-key.js
+++ b/deps/v8/test/mjsunit/keyed-load-with-symbol-key.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --crankshaft --no-always-opt
+// Flags: --allow-natives-syntax --opt --no-always-opt
var s = Symbol("foo");
diff --git a/deps/v8/test/mjsunit/keyed-store-generic.js b/deps/v8/test/mjsunit/keyed-store-generic.js
new file mode 100644
index 0000000000..c2c48dd96d
--- /dev/null
+++ b/deps/v8/test/mjsunit/keyed-store-generic.js
@@ -0,0 +1,22 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --no-stress-opt
+
+function f(a, i, v) { a[i] = v; }
+f("make it generic", 0, 0);
+
+(function TestIsConcatSpreadableProtector() {
+ var o = {length: 1, '0': 99};
+ %OptimizeObjectForAddingMultipleProperties(o, 0);
+ f(o, Symbol.isConcatSpreadable, true);
+ assertEquals([99], [].concat(o));
+})();
+
+(function TestSpeciesProtector() {
+ function MyArray() {}
+ assertTrue(%SpeciesProtector());
+ f(Array.prototype, "constructor", MyArray);
+ assertFalse(%SpeciesProtector());
+})();
diff --git a/deps/v8/test/mjsunit/math-floor-of-div-minus-zero.js b/deps/v8/test/mjsunit/math-floor-of-div-minus-zero.js
index 9a24231ae6..7418a4e257 100644
--- a/deps/v8/test/mjsunit/math-floor-of-div-minus-zero.js
+++ b/deps/v8/test/mjsunit/math-floor-of-div-minus-zero.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --nouse-inlining --crankshaft
+// Flags: --allow-natives-syntax --nouse-inlining --opt
// Test for negative zero that doesn't need bail out
diff --git a/deps/v8/test/mjsunit/math-imul.js b/deps/v8/test/mjsunit/math-imul.js
index c24f6a3970..e05c000c64 100644
--- a/deps/v8/test/mjsunit/math-imul.js
+++ b/deps/v8/test/mjsunit/math-imul.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --max-opt-count=1000
+// Flags: --allow-natives-syntax
var imul_func = Math.imul;
function imul_polyfill(a, b) {
diff --git a/deps/v8/test/mjsunit/messages.js b/deps/v8/test/mjsunit/messages.js
index 9c25004861..ff91185a72 100644
--- a/deps/v8/test/mjsunit/messages.js
+++ b/deps/v8/test/mjsunit/messages.js
@@ -192,33 +192,33 @@ test(function() {
}, "this is not a Date object.", TypeError);
// kNotGeneric
-test(function() {
- String.prototype.toString.call(1);
-}, "String.prototype.toString is not generic", TypeError);
+test(() => String.prototype.toString.call(1),
+ "String.prototype.toString requires that 'this' be a String",
+ TypeError);
-test(function() {
- String.prototype.valueOf.call(1);
-}, "String.prototype.valueOf is not generic", TypeError);
+test(() => String.prototype.valueOf.call(1),
+ "String.prototype.valueOf requires that 'this' be a String",
+ TypeError);
-test(function() {
- Boolean.prototype.toString.call(1);
-}, "Boolean.prototype.toString is not generic", TypeError);
+test(() => Boolean.prototype.toString.call(1),
+ "Boolean.prototype.toString requires that 'this' be a Boolean",
+ TypeError);
-test(function() {
- Boolean.prototype.valueOf.call(1);
-}, "Boolean.prototype.valueOf is not generic", TypeError);
+test(() => Boolean.prototype.valueOf.call(1),
+ "Boolean.prototype.valueOf requires that 'this' be a Boolean",
+ TypeError);
-test(function() {
- Number.prototype.toString.call({});
-}, "Number.prototype.toString is not generic", TypeError);
+test(() => Number.prototype.toString.call({}),
+ "Number.prototype.toString requires that 'this' be a Number",
+ TypeError);
-test(function() {
- Number.prototype.valueOf.call({});
-}, "Number.prototype.valueOf is not generic", TypeError);
+test(() => Number.prototype.valueOf.call({}),
+ "Number.prototype.valueOf requires that 'this' be a Number",
+ TypeError);
-test(function() {
- Function.prototype.toString.call(1);
-}, "Function.prototype.toString is not generic", TypeError);
+test(() => Function.prototype.toString.call(1),
+ "Function.prototype.toString requires that 'this' be a Function",
+ TypeError);
// kNotTypedArray
test(function() {
diff --git a/deps/v8/test/mjsunit/mjsunit.js b/deps/v8/test/mjsunit/mjsunit.js
index bef1b0b59f..754dcbb3de 100644
--- a/deps/v8/test/mjsunit/mjsunit.js
+++ b/deps/v8/test/mjsunit/mjsunit.js
@@ -123,6 +123,9 @@ var assertMatches;
// Assert the result of a promise.
var assertPromiseResult;
+var promiseTestChain;
+var promiseTestCount = 0;
+
// These bits must be in sync with bits defined in Runtime_GetOptimizationStatus
var V8OptimizationStatus = {
kIsFunction: 1 << 0,
@@ -134,7 +137,7 @@ var V8OptimizationStatus = {
kInterpreted: 1 << 6
};
-// Returns true if --no-crankshaft mode is on.
+// Returns true if --no-opt mode is on.
var isNeverOptimize;
// Returns true if --always-opt mode is on.
@@ -499,21 +502,35 @@ var failWithMessage;
// We have to patch mjsunit because normal assertion failures just throw
// exceptions which are swallowed in a then clause.
// We use eval here to avoid parsing issues with the natives syntax.
+ if (!success) success = () => {};
+
failWithMessage = (msg) => eval("%AbortJS(msg)");
- if (!fail)
+ if (!fail) {
fail = result => failWithMessage("assertPromiseResult failed: " + result);
+ }
- eval("%IncrementWaitCount()");
- promise.then(
- result => {
- eval("%DecrementWaitCount()");
- success(result);
- },
- result => {
- eval("%DecrementWaitCount()");
- fail(result);
- }
- );
+ var test_promise =
+ promise.then(
+ result => {
+ try {
+ success(result);
+ } catch (e) {
+ failWithMessage(e);
+ }
+ },
+ result => {
+ fail(result);
+ }
+ )
+ .then((x)=> {
+ if (--promiseTestCount == 0) testRunner.notifyDone();
+ });
+
+ if (!promiseTestChain) promiseTestChain = Promise.resolve();
+ // waitUntilDone is idempotent.
+ testRunner.waitUntilDone();
+ ++promiseTestCount;
+ return promiseTestChain.then(test_promise);
};
var OptimizationStatusImpl = undefined;
@@ -550,10 +567,10 @@ var failWithMessage;
assertOptimized = function assertOptimized(fun, sync_opt, name_opt) {
if (sync_opt === undefined) sync_opt = "";
var opt_status = OptimizationStatus(fun, sync_opt);
- // Tests that use assertOptimized() do not make sense if --no-crankshaft
- // option is provided. Such tests must add --crankshaft to flags comment.
+ // Tests that use assertOptimized() do not make sense if --no-opt
+ // option is provided. Such tests must add --opt to flags comment.
assertFalse((opt_status & V8OptimizationStatus.kNeverOptimize) !== 0,
- "test does not make sense with --no-crankshaft");
+ "test does not make sense with --no-opt");
assertTrue((opt_status & V8OptimizationStatus.kIsFunction) !== 0, name_opt);
if ((opt_status & V8OptimizationStatus.kMaybeDeopted) !== 0) {
// When --deopt-every-n-times flag is specified it's no longer guaranteed
diff --git a/deps/v8/test/mjsunit/mjsunit.status b/deps/v8/test/mjsunit/mjsunit.status
index c8c3c4e927..bb1630aad6 100644
--- a/deps/v8/test/mjsunit/mjsunit.status
+++ b/deps/v8/test/mjsunit/mjsunit.status
@@ -65,6 +65,7 @@
# Too slow in debug mode for validation of elements.
'regress/regress-430201': [PASS, ['mode == debug', SKIP]],
'regress/regress-430201b': [PASS, ['mode == debug', SKIP]],
+ 'regress/regress-716044': [PASS, ['mode == debug', SKIP]],
##############################################################################
# Too slow in debug mode for GC stress mode.
@@ -130,9 +131,6 @@
'compiler/alloc-number-debug': [PASS, ['mode == release', SKIP]],
'regress/regress-634-debug': [PASS, ['mode == release', SKIP]],
- # BUG(336820). TODO(bmeurer): Investigate.
- 'regress/regress-336820': [PASS, FAIL],
-
# BUG(v8:2989). PASS/FAIL on linux32 because crankshaft is turned off for
# nosse2. Also for arm novfp3.
'regress/regress-2989': [FAIL, NO_VARIANTS, ['system == linux and arch == x87 or arch == arm and simulator == True', PASS]],
@@ -148,7 +146,7 @@
# Slow tests.
'copy-on-write-assert': [PASS, SLOW],
'es6/tail-call-megatest*': [PASS, SLOW, FAST_VARIANTS, ['tsan', SKIP]],
- 'es6/typedarray-construct-offset-not-smi': [PASS, SLOW, NO_VARIANTS],
+ 'es6/typedarray-construct-offset-not-smi': [PASS, SLOW],
'harmony/regexp-property-script-extensions': [PASS, SLOW],
'numops-fuzz-part*': [PASS, ['mode == debug', SLOW]],
'readonly': [PASS, SLOW],
@@ -186,15 +184,8 @@
# which makes the test useless.
'big-object-literal': [PASS, ['mode == debug', SKIP]],
- # BUG(v8:5778): These fail with --future, which we are about to turn on.
- # Investigate.
- 'regress/regress-105': [SKIP],
-
- # BUG(v8:6101): This fails because of a hole deopt, need to investigate.
- 'getters-on-elements': [SKIP],
-
- # BUG(v8:6113).
- 'es6/array-iterator-turbo': [SKIP],
+ # BUG(v8:6306).
+ 'wasm/huge-memory': [SKIP],
}], # ALWAYS
['novfp3 == True', {
@@ -342,7 +333,7 @@
'whitespaces': [PASS, TIMEOUT, SLOW],
}], # 'arch == arm64'
-['arch == arm64 and mode == debug and simulator_run == True', {
+['arch == arm64 and mode == debug and simulator_run', {
# Pass but take too long with the simulator in debug mode.
'array-sort': [PASS, TIMEOUT],
@@ -354,7 +345,7 @@
'unicodelctest-no-optimization': [PASS, TIMEOUT],
# Issue 3219:
'getters-on-elements': [PASS, ['gc_stress == True', FAIL]],
-}], # 'arch == arm64 and mode == debug and simulator_run == True'
+}], # 'arch == arm64 and mode == debug and simulator_run'
##############################################################################
['asan == True', {
@@ -369,6 +360,10 @@
# Exception thrown during bootstrapping on ASAN builds, see issue 4236.
'regress/regress-1132': [SKIP],
+
+ # Flaky on ASAN builds: https://bugs.chromium.org/p/v8/issues/detail?id=6305
+ 'regress/regress-430201': [SKIP],
+ 'regress/regress-430201b': [SKIP],
}], # 'asan == True'
##############################################################################
@@ -387,7 +382,7 @@
# Flaky with baseline?
'regress/regress-2185-2': [SKIP],
- # Slow tests with --nocrankshaft.
+ # Slow tests with --noopt.
'compiler/osr-one': [PASS, SLOW],
'compiler/osr-two': [PASS, SLOW],
'wasm/grow-memory': [PASS, SLOW],
@@ -551,6 +546,7 @@
# Setting the timezone and locale with environment variables unavailable
'icu-date-to-string': [SKIP],
'icu-date-lord-howe': [SKIP],
+ 'regress/regress-6288': [SKIP],
}], # 'system == windows'
##############################################################################
@@ -601,11 +597,11 @@
}], # 'predictable == True'
##############################################################################
-['arch == ppc and simulator_run == True or arch == ppc64 and simulator_run == True', {
+['arch == ppc and simulator_run or arch == ppc64 and simulator_run', {
# take too long with the simulator.
'regress/regress-1132': [SKIP],
-}], # 'arch == ppc and simulator_run == True'
+}], # 'arch == ppc and simulator_run'
##############################################################################
['arch == ppc64', {
@@ -646,6 +642,13 @@
}], # variant == nooptimization
##############################################################################
+['variant == noturbofan and no_snap', {
+ # Too slow for old pipeline and nosnap.
+ 'regress/regress-2249': [SKIP],
+ 'harmony/futex': [SKIP],
+}], # variant == noturbofan and no_snap
+
+##############################################################################
['variant == turbofan_opt', {
'es6/array-iterator-turbo': [SKIP],
@@ -669,11 +672,6 @@
}], # 'gcov_coverage'
##############################################################################
-['variant == asm_wasm', {
- # Issue 6127: Currently {StashCode} breaks the source position table.
- 'wasm/asm-wasm-expr': [SKIP],
-}], # variant == asm_wasm
-
['variant == wasm_traps', {
# Skip stuff uninteresting for wasm traps
'bugs/*': [SKIP],
@@ -692,13 +690,4 @@
'whitespaces': [SKIP],
}], # variant == wasm_traps
-##############################################################################
-# This test allocates a 2G block of memory and if there are multiple
-# varients this leads kills by the OOM killer, crashes or messages
-# indicating the OS cannot allocate memory, exclude for Node.js runs
-# re-evalute when we move up to v8 5.1
-[ALWAYS, {
-'regress/regress-crbug-514081': [PASS, NO_VARIANTS],
-}], # ALWAYS
-
]
diff --git a/deps/v8/test/mjsunit/modules-turbo1.js b/deps/v8/test/mjsunit/modules-turbo1.js
index ce688e1dad..c8877d1f06 100644
--- a/deps/v8/test/mjsunit/modules-turbo1.js
+++ b/deps/v8/test/mjsunit/modules-turbo1.js
@@ -3,7 +3,7 @@
// found in the LICENSE file.
// MODULE
-// Flags: --allow-natives-syntax --turbo --crankshaft --turbo-filter=*
+// Flags: --allow-natives-syntax --turbo --opt --turbo-filter=*
export let x = 0;
function foo() { x++ };
diff --git a/deps/v8/test/mjsunit/never-optimize.js b/deps/v8/test/mjsunit/never-optimize.js
index 2949f06268..5efaa47de3 100644
--- a/deps/v8/test/mjsunit/never-optimize.js
+++ b/deps/v8/test/mjsunit/never-optimize.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --crankshaft --no-always-opt
+// Flags: --allow-natives-syntax --opt --no-always-opt
function o1() {
}
diff --git a/deps/v8/test/mjsunit/object-keys.js b/deps/v8/test/mjsunit/object-keys.js
new file mode 100644
index 0000000000..29eb85d6aa
--- /dev/null
+++ b/deps/v8/test/mjsunit/object-keys.js
@@ -0,0 +1,34 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+// Ensure that mutation of the Object.keys result doesn't affect the
+// enumeration cache for fast-mode objects.
+(function() {
+ const a = {x:1, y:2};
+ let k = Object.keys(a);
+ %HeapObjectVerify(k);
+ assertEquals(2, k.length);
+ assertEquals("x", k[0]);
+ assertEquals("y", k[1]);
+ k[0] = "y";
+ k[1] = "x";
+ k = Object.keys(a);
+ assertEquals(2, k.length);
+ assertEquals("x", k[0]);
+ assertEquals("y", k[1]);
+})();
+
+// Ensure that the copy-on-write keys are handled properly, even in
+// the presence of Symbols.
+(function() {
+ const s = Symbol();
+ const a = {[s]: 1};
+ let k = Object.keys(a);
+ %HeapObjectVerify(k);
+ assertEquals(0, k.length);
+ k.shift();
+ assertEquals(0, k.length);
+})();
diff --git a/deps/v8/test/mjsunit/object-literal.js b/deps/v8/test/mjsunit/object-literal.js
index 8fdf68d42e..5717837e34 100644
--- a/deps/v8/test/mjsunit/object-literal.js
+++ b/deps/v8/test/mjsunit/object-literal.js
@@ -25,55 +25,81 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-var obj = {
- a: 7,
- b: { x: 12, y: 24 },
- c: 'Zebra'
-}
-
-assertEquals(7, obj.a);
-assertEquals(12, obj.b.x);
-assertEquals(24, obj.b.y);
-assertEquals('Zebra', obj.c);
+// Flags: --allow-natives-syntax
-var z = 24;
+function testBasicPrototype() {
+ var obj = {
+ a: 7,
+ b: { x: 12, y: 24 },
+ c: 'Zebra'
+ }
-var obj2 = {
- a: 7,
- b: { x: 12, y: z },
- c: 'Zebra'
-}
+ assertEquals(7, obj.a);
+ assertEquals(12, obj.b.x);
+ assertEquals(24, obj.b.y);
+ assertEquals('Zebra', obj.c);
+ assertEquals(Object.getPrototypeOf(obj), Object.prototype);
+ assertEquals(Object.getPrototypeOf(obj.b), Object.prototype);
+};
+testBasicPrototype();
+testBasicPrototype();
-assertEquals(7, obj2.a);
-assertEquals(12, obj2.b.x);
-assertEquals(24, obj2.b.y);
-assertEquals('Zebra', obj2.c);
+function testDynamicValue() {
+ var z = 24;
-var arr = [];
-for (var i = 0; i < 2; i++) {
- arr[i] = {
+ var obj2 = {
a: 7,
- b: { x: 12, y: 24 },
+ b: { x: 12, y: z },
c: 'Zebra'
}
+
+ assertEquals(7, obj2.a);
+ assertEquals(12, obj2.b.x);
+ assertEquals(24, obj2.b.y);
+ assertEquals('Zebra', obj2.c);
}
+testDynamicValue();
+testDynamicValue();
+
+(function testMultipleInstatiations() {
+ var arr = [];
+ for (var i = 0; i < 2; i++) {
+ arr[i] = {
+ a: 7,
+ b: { x: 12, y: 24 },
+ c: 'Zebra'
+ }
+ }
-arr[0].b.x = 2;
-assertEquals(2, arr[0].b.x);
-assertEquals(12, arr[1].b.x);
+ arr[0].b.x = 2;
+ assertEquals(2, arr[0].b.x);
+ assertEquals(12, arr[1].b.x);
+})();
+function testSparseElements() {
+ let sa1 = {
+ '0': { x: 12, y: 24 },
+ '1000000': { x: 1, y: 2 }
+ };
-function makeSparseArray() {
- return {
- '0': { x: 12, y: 24 },
- '1000000': { x: 0, y: 0 }
- };
+ assertEquals(['0', '1000000'], Object.keys(sa1));
+ assertEquals(12, sa1[0].x);
+ assertEquals(24, sa1[0].y);
+ assertEquals(['x', 'y'], Object.keys(sa1[0]));
+ assertEquals(1, sa1[1000000].x);
+ assertEquals(2, sa1[1000000].y);
+ assertEquals(['x', 'y'], Object.keys(sa1[1000000]));
+ assertEquals(Object.prototype, Object.getPrototypeOf(sa1));
+ assertEquals(Object.prototype, Object.getPrototypeOf(sa1[0]));
+ assertEquals(Object.prototype, Object.getPrototypeOf(sa1[1000000]));
+ return sa1;
}
-var sa1 = makeSparseArray();
-sa1[0].x = 0;
-var sa2 = makeSparseArray();
-assertEquals(12, sa2[0].x);
+let object = testSparseElements();
+// modify the object and rerun the test, ensuring the literal didn't change.
+object[1] = "a";
+object[0].x = -12;
+testSparseElements();
// Test that non-constant literals work.
var n = new Object();
@@ -81,12 +107,19 @@ var n = new Object();
function makeNonConstantArray() { return [ [ n ] ]; }
var a = makeNonConstantArray();
+var b = makeNonConstantArray();
+assertTrue(a[0][0] === n);
+assertTrue(b[0][0] === n);
+assertFalse(a[0] === b[0]);
a[0][0].foo = "bar";
assertEquals("bar", n.foo);
function makeNonConstantObject() { return { a: { b: n } }; }
a = makeNonConstantObject();
+b = makeNonConstantObject();
+assertFalse(a.a === b.a);
+assertTrue(a.a.b === b.a.b);
a.a.b.bar = "foo";
assertEquals("foo", n.bar);
@@ -94,15 +127,23 @@ assertEquals("foo", n.bar);
function makeRegexpInArray() { return [ [ /a*/, {} ] ]; }
a = makeRegexpInArray();
-var b = makeRegexpInArray();
+b = makeRegexpInArray();
assertFalse(a[0][0] === b[0][0]);
assertFalse(a[0][1] === b[0][1]);
+assertEquals(Array.prototype, Object.getPrototypeOf(a));
+assertEquals(Array.prototype, Object.getPrototypeOf(b));
+assertEquals(Array.prototype, Object.getPrototypeOf(a[0]));
+assertEquals(Array.prototype, Object.getPrototypeOf(b[0]));
+assertEquals(RegExp.prototype, Object.getPrototypeOf(a[0][0]));
+assertEquals(RegExp.prototype, Object.getPrototypeOf(b[0][0]));
function makeRegexpInObject() { return { a: { b: /b*/, c: {} } }; }
a = makeRegexpInObject();
b = makeRegexpInObject();
assertFalse(a.a.b === b.a.b);
assertFalse(a.a.c === b.a.c);
+assertEquals(RegExp.prototype, Object.getPrototypeOf(a.a.b));
+assertEquals(RegExp.prototype, Object.getPrototypeOf(b.a.b));
// Test keywords are valid as property names in initializers and dot-access.
@@ -191,8 +232,16 @@ for (var i = 0; i < keywords.length; i++) {
testKeywordProperty(keywords[i]);
}
+function TestSimpleElements() {
+ var o = { 0:"zero", 1:"one", 2:"two" };
+ assertEquals({0:"zero", 1:"one", 2:"two"}, o);
+ o[0] = 0;
+ assertEquals({0:0, 1:"one", 2:"two"}, o);
+}
+TestSimpleElements();
+TestSimpleElements();
-(function TestNumericNames() {
+function TestNumericNames() {
var o = {
1: 1,
2.: 2,
@@ -211,55 +260,1224 @@ for (var i = 0; i < keywords.length; i++) {
1.30: 1.3
};
assertEquals(['1.2', '1.3'], Object.keys(o));
-})();
+}
+TestNumericNames();
+TestNumericNames();
+
+function TestNonNumberElementValues() {
+ var o = {
+ 1: true,
+ 2: false,
+ 3: undefined,
+ 4: ""
+ };
+ assertEquals(['1', '2', '3', '4'], Object.keys(o));
+ var o2 = {
+ 1: true,
+ 2: false,
+ 3: undefined,
+ 4: "",
+ a: 'a',
+ b: 'b'
+ };
+ assertEquals(['1', '2', '3', '4', 'a', 'b'], Object.keys(o2));
+ var o3 = {
+ __proto__:null,
+ 1: true,
+ 2: false,
+ 3: undefined,
+ 4: ""
+ };
+ assertEquals(['1', '2', '3', '4'], Object.keys(o3));
+ var o4 = {
+ __proto__:null,
+ 1: true,
+ 2: false,
+ 3: undefined,
+ 4: "",
+ a: 'a',
+ b: 'b'
+ };
+ assertEquals(['1', '2', '3', '4', 'a', 'b'], Object.keys(o4));
+}
+TestNonNumberElementValues();
+TestNonNumberElementValues();
+%OptimizeFunctionOnNextCall(TestNonNumberElementValues);
+TestNonNumberElementValues();
-function TestNumericNamesGetter(expectedKeys, object) {
- assertEquals(expectedKeys, Object.keys(object));
- expectedKeys.forEach(function(key) {
- var descr = Object.getOwnPropertyDescriptor(object, key);
- assertEquals('get ' + key, descr.get.name);
+function numericGetters() {
+ function TestNumericNamesGetter(expectedKeys, object) {
+ assertEquals(expectedKeys, Object.keys(object));
+ expectedKeys.forEach(function(key) {
+ var descr = Object.getOwnPropertyDescriptor(object, key);
+ assertEquals('get ' + key, descr.get.name);
+ });
+ }
+ TestNumericNamesGetter(['1', '2', '3', '4', '5', '6', '7', '8', '9'], {
+ get 1() {},
+ get 2.() {},
+ get 3.0() {},
+ get 4e0() {},
+ get 5E0() {},
+ get 6e-0() {},
+ get 7E-0() {},
+ get 0x8() {},
+ get 0X9() {},
+ });
+ TestNumericNamesGetter(['1.2', '1.3'], {
+ get 1.2() {},
+ get 1.30() {}
});
}
-TestNumericNamesGetter(['1', '2', '3', '4', '5', '6', '7', '8', '9'], {
- get 1() {},
- get 2.() {},
- get 3.0() {},
- get 4e0() {},
- get 5E0() {},
- get 6e-0() {},
- get 7E-0() {},
- get 0x8() {},
- get 0X9() {},
-});
-TestNumericNamesGetter(['1.2', '1.3'], {
- get 1.2() {},
- get 1.30() {}
-});
-
-
-function TestNumericNamesSetter(expectedKeys, object) {
- assertEquals(expectedKeys, Object.keys(object));
- expectedKeys.forEach(function(key) {
- var descr = Object.getOwnPropertyDescriptor(object, key);
- assertEquals('set ' + key, descr.set.name);
+numericGetters();
+numericGetters();
+
+function numericSetters() {
+ function TestNumericNamesSetter(expectedKeys, object) {
+ assertEquals(expectedKeys, Object.keys(object));
+ expectedKeys.forEach(function(key) {
+ var descr = Object.getOwnPropertyDescriptor(object, key);
+ assertEquals('set ' + key, descr.set.name);
+ });
+ }
+ TestNumericNamesSetter(['1', '2', '3', '4', '5', '6', '7', '8', '9'], {
+ set 1(_) {},
+ set 2.(_) {},
+ set 3.0(_) {},
+ set 4e0(_) {},
+ set 5E0(_) {},
+ set 6e-0(_) {},
+ set 7E-0(_) {},
+ set 0x8(_) {},
+ set 0X9(_) {},
});
+ TestNumericNamesSetter(['1.2', '1.3'], {
+ set 1.2(_) {; },
+ set 1.30(_) {; }
+ });
+};
+
+numericSetters();
+numericSetters();
+
+function TestProxyWithDefinitionInObjectLiteral() {
+ // Trap for set should not be used if the definition
+ // happens in the object literal.
+ var handler = {
+ set: function(target, name, value) {
+ }
+ };
+
+ const prop = 'a';
+
+ var p = new Proxy({}, handler);
+ p[prop] = 'my value';
+ assertEquals(undefined, p[prop]);
+
+
+ var l = new Proxy({[prop]: 'my value'}, handler);
+ assertEquals('my value', l[prop]);
+};
+TestProxyWithDefinitionInObjectLiteral();
+TestProxyWithDefinitionInObjectLiteral();
+
+(function TestLiteralWithNullProto() {
+ // Assume dictionary usage for simple null prototype literal objects,
+ // this is equivalent to Object.create(null). Note that on the first call
+ // the literal boilerplate is initialized, and from then on we use a the
+ // fast clone stub.
+ function testDictModeNullProtoLiteral(fn) {
+ let obj = fn();
+ assertFalse(%HasFastProperties(obj));
+ assertEquals(Object.getPrototypeOf(obj), null);
+ let next = fn();
+ assertFalse(obj === next);
+ obj = next;
+ assertFalse(%HasFastProperties(obj));
+ assertEquals(Object.getPrototypeOf(obj), null);
+ next = fn();
+ assertFalse(obj === next);
+ obj = next;
+ assertFalse(%HasFastProperties(obj));
+ assertEquals(Object.getPrototypeOf(obj), null);
+ }
+ testDictModeNullProtoLiteral(() => ({__proto__:null}));
+ testDictModeNullProtoLiteral(() => ({__proto__:null, a:1, b:2}));
+ testDictModeNullProtoLiteral(() => ({__proto__: null, ["a"]: 1}));
+ testDictModeNullProtoLiteral(() => ({__proto__: null, a: Object}));
+ testDictModeNullProtoLiteral(() => ({a:1, b:2, __proto__:null}));
+ testDictModeNullProtoLiteral(() => ({["a"]: 1, __proto__: null}));
+ testDictModeNullProtoLiteral(() => ({a: Object, __proto__: null}));
+})();
+
+function testNestedNullProtoLiteral() {
+ let obj;
+ obj = { foo: { __proto__:Math, bar:"barValue"}};
+ assertTrue(%HasFastProperties(obj));
+ assertTrue(%HasFastProperties(obj.foo));
+ assertEquals(Object.prototype, Object.getPrototypeOf(obj));
+ assertEquals(Math, Object.getPrototypeOf(obj.foo));
+ assertEquals(["foo"], Object.keys(obj));
+ assertEquals(["bar"], Object.keys(obj.foo));
+ assertEquals("barValue", obj.foo.bar);
+ obj.foo.bar = "barValue2";
+ assertEquals("barValue2", obj.foo.bar);
+
+ obj = { foo: { __proto__:null, bar:"barValue"}};
+ assertTrue(%HasFastProperties(obj));
+ assertFalse(%HasFastProperties(obj.foo));
+ assertEquals(Object.prototype, Object.getPrototypeOf(obj));
+ assertEquals(null, Object.getPrototypeOf(obj.foo));
+ assertEquals(["foo"], Object.keys(obj));
+ assertEquals(["bar"], Object.keys(obj.foo));
+ assertEquals("barValue", obj.foo.bar);
+ obj.foo.bar = "barValue2";
+ assertEquals("barValue2", obj.foo.bar);
}
-TestNumericNamesSetter(['1', '2', '3', '4', '5', '6', '7', '8', '9'], {
- set 1(_) {},
- set 2.(_) {},
- set 3.0(_) {},
- set 4e0(_) {},
- set 5E0(_) {},
- set 6e-0(_) {},
- set 7E-0(_) {},
- set 0x8(_) {},
- set 0X9(_) {},
-});
-TestNumericNamesSetter(['1.2', '1.3'], {
- set 1.2(_) {; },
- set 1.30(_) {; }
-});
+testNestedNullProtoLiteral();
+testNestedNullProtoLiteral();
+
+
+function TestSlowLiteralOptimized() {
+ function f() {
+ return {__proto__:null, bar:"barValue"};
+ }
+ let obj = f();
+ assertFalse(%HasFastProperties(obj));
+ assertEquals(Object.getPrototypeOf(obj), null);
+ assertEquals(["bar"], Object.keys(obj));
+ assertEquals("barValue", obj.bar);
+ obj.bar = "barValue2";
+ assertEquals("barValue2", obj.bar);
+
+ %OptimizeFunctionOnNextCall(f);
+ obj = f();
+ assertFalse(%HasFastProperties(obj));
+ assertEquals(Object.getPrototypeOf(obj), null);
+ assertEquals(["bar"], Object.keys(obj));
+ assertEquals("barValue", obj.bar);
+ obj.bar = "barValue2";
+ assertEquals("barValue2", obj.bar);
+};
+TestSlowLiteralOptimized();
+TestSlowLiteralOptimized();
+
+(function TestLargeDictionaryLiteral() {
+ // Create potential large-space object literal.
+ function createObject() {
+ // This literal has least kMaxRegularHeapObjectSize / 64 number of
+ // properties, forcing the backing store to be in large object space.
+ return { __proto__:null,
+ p1:'',p2:'',p3:'',p4:'',p5:'',p6:'',p7:'',p8:'',
+ p9:'',pa:'',pb:'',pc:'',pd:'',pe:'',pf:'',p10:'',
+ p11:'',p12:'',p13:'',p14:'',p15:'',p16:'',p17:'',p18:'',
+ p19:'',p1a:'',p1b:'',p1c:'',p1d:'',p1e:'',p1f:'',p20:'',
+ p21:'',p22:'',p23:'',p24:'',p25:'',p26:'',p27:'',p28:'',
+ p29:'',p2a:'',p2b:'',p2c:'',p2d:'',p2e:'',p2f:'',p30:'',
+ p31:'',p32:'',p33:'',p34:'',p35:'',p36:'',p37:'',p38:'',
+ p39:'',p3a:'',p3b:'',p3c:'',p3d:'',p3e:'',p3f:'',p40:'',
+ p41:'',p42:'',p43:'',p44:'',p45:'',p46:'',p47:'',p48:'',
+ p49:'',p4a:'',p4b:'',p4c:'',p4d:'',p4e:'',p4f:'',p50:'',
+ p51:'',p52:'',p53:'',p54:'',p55:'',p56:'',p57:'',p58:'',
+ p59:'',p5a:'',p5b:'',p5c:'',p5d:'',p5e:'',p5f:'',p60:'',
+ p61:'',p62:'',p63:'',p64:'',p65:'',p66:'',p67:'',p68:'',
+ p69:'',p6a:'',p6b:'',p6c:'',p6d:'',p6e:'',p6f:'',p70:'',
+ p71:'',p72:'',p73:'',p74:'',p75:'',p76:'',p77:'',p78:'',
+ p79:'',p7a:'',p7b:'',p7c:'',p7d:'',p7e:'',p7f:'',p80:'',
+ p81:'',p82:'',p83:'',p84:'',p85:'',p86:'',p87:'',p88:'',
+ p89:'',p8a:'',p8b:'',p8c:'',p8d:'',p8e:'',p8f:'',p90:'',
+ p91:'',p92:'',p93:'',p94:'',p95:'',p96:'',p97:'',p98:'',
+ p99:'',p9a:'',p9b:'',p9c:'',p9d:'',p9e:'',p9f:'',pa0:'',
+ pa1:'',pa2:'',pa3:'',pa4:'',pa5:'',pa6:'',pa7:'',pa8:'',
+ pa9:'',paa:'',pab:'',pac:'',pad:'',pae:'',paf:'',pb0:'',
+ pb1:'',pb2:'',pb3:'',pb4:'',pb5:'',pb6:'',pb7:'',pb8:'',
+ pb9:'',pba:'',pbb:'',pbc:'',pbd:'',pbe:'',pbf:'',pc0:'',
+ pc1:'',pc2:'',pc3:'',pc4:'',pc5:'',pc6:'',pc7:'',pc8:'',
+ pc9:'',pca:'',pcb:'',pcc:'',pcd:'',pce:'',pcf:'',pd0:'',
+ pd1:'',pd2:'',pd3:'',pd4:'',pd5:'',pd6:'',pd7:'',pd8:'',
+ pd9:'',pda:'',pdb:'',pdc:'',pdd:'',pde:'',pdf:'',pe0:'',
+ pe1:'',pe2:'',pe3:'',pe4:'',pe5:'',pe6:'',pe7:'',pe8:'',
+ pe9:'',pea:'',peb:'',pec:'',ped:'',pee:'',pef:'',pf0:'',
+ pf1:'',pf2:'',pf3:'',pf4:'',pf5:'',pf6:'',pf7:'',pf8:'',
+ pf9:'',pfa:'',pfb:'',pfc:'',pfd:'',pfe:'',pff:'',p100:'',
+ p101:'',p102:'',p103:'',p104:'',p105:'',p106:'',p107:'',p108:'',
+ p109:'',p10a:'',p10b:'',p10c:'',p10d:'',p10e:'',p10f:'',p110:'',
+ p111:'',p112:'',p113:'',p114:'',p115:'',p116:'',p117:'',p118:'',
+ p119:'',p11a:'',p11b:'',p11c:'',p11d:'',p11e:'',p11f:'',p120:'',
+ p121:'',p122:'',p123:'',p124:'',p125:'',p126:'',p127:'',p128:'',
+ p129:'',p12a:'',p12b:'',p12c:'',p12d:'',p12e:'',p12f:'',p130:'',
+ p131:'',p132:'',p133:'',p134:'',p135:'',p136:'',p137:'',p138:'',
+ p139:'',p13a:'',p13b:'',p13c:'',p13d:'',p13e:'',p13f:'',p140:'',
+ p141:'',p142:'',p143:'',p144:'',p145:'',p146:'',p147:'',p148:'',
+ p149:'',p14a:'',p14b:'',p14c:'',p14d:'',p14e:'',p14f:'',p150:'',
+ p151:'',p152:'',p153:'',p154:'',p155:'',p156:'',p157:'',p158:'',
+ p159:'',p15a:'',p15b:'',p15c:'',p15d:'',p15e:'',p15f:'',p160:'',
+ p161:'',p162:'',p163:'',p164:'',p165:'',p166:'',p167:'',p168:'',
+ p169:'',p16a:'',p16b:'',p16c:'',p16d:'',p16e:'',p16f:'',p170:'',
+ p171:'',p172:'',p173:'',p174:'',p175:'',p176:'',p177:'',p178:'',
+ p179:'',p17a:'',p17b:'',p17c:'',p17d:'',p17e:'',p17f:'',p180:'',
+ p181:'',p182:'',p183:'',p184:'',p185:'',p186:'',p187:'',p188:'',
+ p189:'',p18a:'',p18b:'',p18c:'',p18d:'',p18e:'',p18f:'',p190:'',
+ p191:'',p192:'',p193:'',p194:'',p195:'',p196:'',p197:'',p198:'',
+ p199:'',p19a:'',p19b:'',p19c:'',p19d:'',p19e:'',p19f:'',p1a0:'',
+ p1a1:'',p1a2:'',p1a3:'',p1a4:'',p1a5:'',p1a6:'',p1a7:'',p1a8:'',
+ p1a9:'',p1aa:'',p1ab:'',p1ac:'',p1ad:'',p1ae:'',p1af:'',p1b0:'',
+ p1b1:'',p1b2:'',p1b3:'',p1b4:'',p1b5:'',p1b6:'',p1b7:'',p1b8:'',
+ p1b9:'',p1ba:'',p1bb:'',p1bc:'',p1bd:'',p1be:'',p1bf:'',p1c0:'',
+ p1c1:'',p1c2:'',p1c3:'',p1c4:'',p1c5:'',p1c6:'',p1c7:'',p1c8:'',
+ p1c9:'',p1ca:'',p1cb:'',p1cc:'',p1cd:'',p1ce:'',p1cf:'',p1d0:'',
+ p1d1:'',p1d2:'',p1d3:'',p1d4:'',p1d5:'',p1d6:'',p1d7:'',p1d8:'',
+ p1d9:'',p1da:'',p1db:'',p1dc:'',p1dd:'',p1de:'',p1df:'',p1e0:'',
+ p1e1:'',p1e2:'',p1e3:'',p1e4:'',p1e5:'',p1e6:'',p1e7:'',p1e8:'',
+ p1e9:'',p1ea:'',p1eb:'',p1ec:'',p1ed:'',p1ee:'',p1ef:'',p1f0:'',
+ p1f1:'',p1f2:'',p1f3:'',p1f4:'',p1f5:'',p1f6:'',p1f7:'',p1f8:'',
+ p1f9:'',p1fa:'',p1fb:'',p1fc:'',p1fd:'',p1fe:'',p1ff:'',p200:'',
+ p201:'',p202:'',p203:'',p204:'',p205:'',p206:'',p207:'',p208:'',
+ p209:'',p20a:'',p20b:'',p20c:'',p20d:'',p20e:'',p20f:'',p210:'',
+ p211:'',p212:'',p213:'',p214:'',p215:'',p216:'',p217:'',p218:'',
+ p219:'',p21a:'',p21b:'',p21c:'',p21d:'',p21e:'',p21f:'',p220:'',
+ p221:'',p222:'',p223:'',p224:'',p225:'',p226:'',p227:'',p228:'',
+ p229:'',p22a:'',p22b:'',p22c:'',p22d:'',p22e:'',p22f:'',p230:'',
+ p231:'',p232:'',p233:'',p234:'',p235:'',p236:'',p237:'',p238:'',
+ p239:'',p23a:'',p23b:'',p23c:'',p23d:'',p23e:'',p23f:'',p240:'',
+ p241:'',p242:'',p243:'',p244:'',p245:'',p246:'',p247:'',p248:'',
+ p249:'',p24a:'',p24b:'',p24c:'',p24d:'',p24e:'',p24f:'',p250:'',
+ p251:'',p252:'',p253:'',p254:'',p255:'',p256:'',p257:'',p258:'',
+ p259:'',p25a:'',p25b:'',p25c:'',p25d:'',p25e:'',p25f:'',p260:'',
+ p261:'',p262:'',p263:'',p264:'',p265:'',p266:'',p267:'',p268:'',
+ p269:'',p26a:'',p26b:'',p26c:'',p26d:'',p26e:'',p26f:'',p270:'',
+ p271:'',p272:'',p273:'',p274:'',p275:'',p276:'',p277:'',p278:'',
+ p279:'',p27a:'',p27b:'',p27c:'',p27d:'',p27e:'',p27f:'',p280:'',
+ p281:'',p282:'',p283:'',p284:'',p285:'',p286:'',p287:'',p288:'',
+ p289:'',p28a:'',p28b:'',p28c:'',p28d:'',p28e:'',p28f:'',p290:'',
+ p291:'',p292:'',p293:'',p294:'',p295:'',p296:'',p297:'',p298:'',
+ p299:'',p29a:'',p29b:'',p29c:'',p29d:'',p29e:'',p29f:'',p2a0:'',
+ p2a1:'',p2a2:'',p2a3:'',p2a4:'',p2a5:'',p2a6:'',p2a7:'',p2a8:'',
+ p2a9:'',p2aa:'',p2ab:'',p2ac:'',p2ad:'',p2ae:'',p2af:'',p2b0:'',
+ p2b1:'',p2b2:'',p2b3:'',p2b4:'',p2b5:'',p2b6:'',p2b7:'',p2b8:'',
+ p2b9:'',p2ba:'',p2bb:'',p2bc:'',p2bd:'',p2be:'',p2bf:'',p2c0:'',
+ p2c1:'',p2c2:'',p2c3:'',p2c4:'',p2c5:'',p2c6:'',p2c7:'',p2c8:'',
+ p2c9:'',p2ca:'',p2cb:'',p2cc:'',p2cd:'',p2ce:'',p2cf:'',p2d0:'',
+ p2d1:'',p2d2:'',p2d3:'',p2d4:'',p2d5:'',p2d6:'',p2d7:'',p2d8:'',
+ p2d9:'',p2da:'',p2db:'',p2dc:'',p2dd:'',p2de:'',p2df:'',p2e0:'',
+ p2e1:'',p2e2:'',p2e3:'',p2e4:'',p2e5:'',p2e6:'',p2e7:'',p2e8:'',
+ p2e9:'',p2ea:'',p2eb:'',p2ec:'',p2ed:'',p2ee:'',p2ef:'',p2f0:'',
+ p2f1:'',p2f2:'',p2f3:'',p2f4:'',p2f5:'',p2f6:'',p2f7:'',p2f8:'',
+ p2f9:'',p2fa:'',p2fb:'',p2fc:'',p2fd:'',p2fe:'',p2ff:'',p300:'',
+ p301:'',p302:'',p303:'',p304:'',p305:'',p306:'',p307:'',p308:'',
+ p309:'',p30a:'',p30b:'',p30c:'',p30d:'',p30e:'',p30f:'',p310:'',
+ p311:'',p312:'',p313:'',p314:'',p315:'',p316:'',p317:'',p318:'',
+ p319:'',p31a:'',p31b:'',p31c:'',p31d:'',p31e:'',p31f:'',p320:'',
+ p321:'',p322:'',p323:'',p324:'',p325:'',p326:'',p327:'',p328:'',
+ p329:'',p32a:'',p32b:'',p32c:'',p32d:'',p32e:'',p32f:'',p330:'',
+ p331:'',p332:'',p333:'',p334:'',p335:'',p336:'',p337:'',p338:'',
+ p339:'',p33a:'',p33b:'',p33c:'',p33d:'',p33e:'',p33f:'',p340:'',
+ p341:'',p342:'',p343:'',p344:'',p345:'',p346:'',p347:'',p348:'',
+ p349:'',p34a:'',p34b:'',p34c:'',p34d:'',p34e:'',p34f:'',p350:'',
+ p351:'',p352:'',p353:'',p354:'',p355:'',p356:'',p357:'',p358:'',
+ p359:'',p35a:'',p35b:'',p35c:'',p35d:'',p35e:'',p35f:'',p360:'',
+ p361:'',p362:'',p363:'',p364:'',p365:'',p366:'',p367:'',p368:'',
+ p369:'',p36a:'',p36b:'',p36c:'',p36d:'',p36e:'',p36f:'',p370:'',
+ p371:'',p372:'',p373:'',p374:'',p375:'',p376:'',p377:'',p378:'',
+ p379:'',p37a:'',p37b:'',p37c:'',p37d:'',p37e:'',p37f:'',p380:'',
+ p381:'',p382:'',p383:'',p384:'',p385:'',p386:'',p387:'',p388:'',
+ p389:'',p38a:'',p38b:'',p38c:'',p38d:'',p38e:'',p38f:'',p390:'',
+ p391:'',p392:'',p393:'',p394:'',p395:'',p396:'',p397:'',p398:'',
+ p399:'',p39a:'',p39b:'',p39c:'',p39d:'',p39e:'',p39f:'',p3a0:'',
+ p3a1:'',p3a2:'',p3a3:'',p3a4:'',p3a5:'',p3a6:'',p3a7:'',p3a8:'',
+ p3a9:'',p3aa:'',p3ab:'',p3ac:'',p3ad:'',p3ae:'',p3af:'',p3b0:'',
+ p3b1:'',p3b2:'',p3b3:'',p3b4:'',p3b5:'',p3b6:'',p3b7:'',p3b8:'',
+ p3b9:'',p3ba:'',p3bb:'',p3bc:'',p3bd:'',p3be:'',p3bf:'',p3c0:'',
+ p3c1:'',p3c2:'',p3c3:'',p3c4:'',p3c5:'',p3c6:'',p3c7:'',p3c8:'',
+ p3c9:'',p3ca:'',p3cb:'',p3cc:'',p3cd:'',p3ce:'',p3cf:'',p3d0:'',
+ p3d1:'',p3d2:'',p3d3:'',p3d4:'',p3d5:'',p3d6:'',p3d7:'',p3d8:'',
+ p3d9:'',p3da:'',p3db:'',p3dc:'',p3dd:'',p3de:'',p3df:'',p3e0:'',
+ p3e1:'',p3e2:'',p3e3:'',p3e4:'',p3e5:'',p3e6:'',p3e7:'',p3e8:'',
+ p3e9:'',p3ea:'',p3eb:'',p3ec:'',p3ed:'',p3ee:'',p3ef:'',p3f0:'',
+ p3f1:'',p3f2:'',p3f3:'',p3f4:'',p3f5:'',p3f6:'',p3f7:'',p3f8:'',
+ p3f9:'',p3fa:'',p3fb:'',p3fc:'',p3fd:'',p3fe:'',p3ff:'',p400:'',
+ p401:'',p402:'',p403:'',p404:'',p405:'',p406:'',p407:'',p408:'',
+ p409:'',p40a:'',p40b:'',p40c:'',p40d:'',p40e:'',p40f:'',p410:'',
+ p411:'',p412:'',p413:'',p414:'',p415:'',p416:'',p417:'',p418:'',
+ p419:'',p41a:'',p41b:'',p41c:'',p41d:'',p41e:'',p41f:'',p420:'',
+ p421:'',p422:'',p423:'',p424:'',p425:'',p426:'',p427:'',p428:'',
+ p429:'',p42a:'',p42b:'',p42c:'',p42d:'',p42e:'',p42f:'',p430:'',
+ p431:'',p432:'',p433:'',p434:'',p435:'',p436:'',p437:'',p438:'',
+ p439:'',p43a:'',p43b:'',p43c:'',p43d:'',p43e:'',p43f:'',p440:'',
+ p441:'',p442:'',p443:'',p444:'',p445:'',p446:'',p447:'',p448:'',
+ p449:'',p44a:'',p44b:'',p44c:'',p44d:'',p44e:'',p44f:'',p450:'',
+ p451:'',p452:'',p453:'',p454:'',p455:'',p456:'',p457:'',p458:'',
+ p459:'',p45a:'',p45b:'',p45c:'',p45d:'',p45e:'',p45f:'',p460:'',
+ p461:'',p462:'',p463:'',p464:'',p465:'',p466:'',p467:'',p468:'',
+ p469:'',p46a:'',p46b:'',p46c:'',p46d:'',p46e:'',p46f:'',p470:'',
+ p471:'',p472:'',p473:'',p474:'',p475:'',p476:'',p477:'',p478:'',
+ p479:'',p47a:'',p47b:'',p47c:'',p47d:'',p47e:'',p47f:'',p480:'',
+ p481:'',p482:'',p483:'',p484:'',p485:'',p486:'',p487:'',p488:'',
+ p489:'',p48a:'',p48b:'',p48c:'',p48d:'',p48e:'',p48f:'',p490:'',
+ p491:'',p492:'',p493:'',p494:'',p495:'',p496:'',p497:'',p498:'',
+ p499:'',p49a:'',p49b:'',p49c:'',p49d:'',p49e:'',p49f:'',p4a0:'',
+ p4a1:'',p4a2:'',p4a3:'',p4a4:'',p4a5:'',p4a6:'',p4a7:'',p4a8:'',
+ p4a9:'',p4aa:'',p4ab:'',p4ac:'',p4ad:'',p4ae:'',p4af:'',p4b0:'',
+ p4b1:'',p4b2:'',p4b3:'',p4b4:'',p4b5:'',p4b6:'',p4b7:'',p4b8:'',
+ p4b9:'',p4ba:'',p4bb:'',p4bc:'',p4bd:'',p4be:'',p4bf:'',p4c0:'',
+ p4c1:'',p4c2:'',p4c3:'',p4c4:'',p4c5:'',p4c6:'',p4c7:'',p4c8:'',
+ p4c9:'',p4ca:'',p4cb:'',p4cc:'',p4cd:'',p4ce:'',p4cf:'',p4d0:'',
+ p4d1:'',p4d2:'',p4d3:'',p4d4:'',p4d5:'',p4d6:'',p4d7:'',p4d8:'',
+ p4d9:'',p4da:'',p4db:'',p4dc:'',p4dd:'',p4de:'',p4df:'',p4e0:'',
+ p4e1:'',p4e2:'',p4e3:'',p4e4:'',p4e5:'',p4e6:'',p4e7:'',p4e8:'',
+ p4e9:'',p4ea:'',p4eb:'',p4ec:'',p4ed:'',p4ee:'',p4ef:'',p4f0:'',
+ p4f1:'',p4f2:'',p4f3:'',p4f4:'',p4f5:'',p4f6:'',p4f7:'',p4f8:'',
+ p4f9:'',p4fa:'',p4fb:'',p4fc:'',p4fd:'',p4fe:'',p4ff:'',p500:'',
+ p501:'',p502:'',p503:'',p504:'',p505:'',p506:'',p507:'',p508:'',
+ p509:'',p50a:'',p50b:'',p50c:'',p50d:'',p50e:'',p50f:'',p510:'',
+ p511:'',p512:'',p513:'',p514:'',p515:'',p516:'',p517:'',p518:'',
+ p519:'',p51a:'',p51b:'',p51c:'',p51d:'',p51e:'',p51f:'',p520:'',
+ p521:'',p522:'',p523:'',p524:'',p525:'',p526:'',p527:'',p528:'',
+ p529:'',p52a:'',p52b:'',p52c:'',p52d:'',p52e:'',p52f:'',p530:'',
+ p531:'',p532:'',p533:'',p534:'',p535:'',p536:'',p537:'',p538:'',
+ p539:'',p53a:'',p53b:'',p53c:'',p53d:'',p53e:'',p53f:'',p540:'',
+ p541:'',p542:'',p543:'',p544:'',p545:'',p546:'',p547:'',p548:'',
+ p549:'',p54a:'',p54b:'',p54c:'',p54d:'',p54e:'',p54f:'',p550:'',
+ p551:'',p552:'',p553:'',p554:'',p555:'',p556:'',p557:'',p558:'',
+ p559:'',p55a:'',p55b:'',p55c:'',p55d:'',p55e:'',p55f:'',p560:'',
+ p561:'',p562:'',p563:'',p564:'',p565:'',p566:'',p567:'',p568:'',
+ p569:'',p56a:'',p56b:'',p56c:'',p56d:'',p56e:'',p56f:'',p570:'',
+ p571:'',p572:'',p573:'',p574:'',p575:'',p576:'',p577:'',p578:'',
+ p579:'',p57a:'',p57b:'',p57c:'',p57d:'',p57e:'',p57f:'',p580:'',
+ p581:'',p582:'',p583:'',p584:'',p585:'',p586:'',p587:'',p588:'',
+ p589:'',p58a:'',p58b:'',p58c:'',p58d:'',p58e:'',p58f:'',p590:'',
+ p591:'',p592:'',p593:'',p594:'',p595:'',p596:'',p597:'',p598:'',
+ p599:'',p59a:'',p59b:'',p59c:'',p59d:'',p59e:'',p59f:'',p5a0:'',
+ p5a1:'',p5a2:'',p5a3:'',p5a4:'',p5a5:'',p5a6:'',p5a7:'',p5a8:'',
+ p5a9:'',p5aa:'',p5ab:'',p5ac:'',p5ad:'',p5ae:'',p5af:'',p5b0:'',
+ p5b1:'',p5b2:'',p5b3:'',p5b4:'',p5b5:'',p5b6:'',p5b7:'',p5b8:'',
+ p5b9:'',p5ba:'',p5bb:'',p5bc:'',p5bd:'',p5be:'',p5bf:'',p5c0:'',
+ p5c1:'',p5c2:'',p5c3:'',p5c4:'',p5c5:'',p5c6:'',p5c7:'',p5c8:'',
+ p5c9:'',p5ca:'',p5cb:'',p5cc:'',p5cd:'',p5ce:'',p5cf:'',p5d0:'',
+ p5d1:'',p5d2:'',p5d3:'',p5d4:'',p5d5:'',p5d6:'',p5d7:'',p5d8:'',
+ p5d9:'',p5da:'',p5db:'',p5dc:'',p5dd:'',p5de:'',p5df:'',p5e0:'',
+ p5e1:'',p5e2:'',p5e3:'',p5e4:'',p5e5:'',p5e6:'',p5e7:'',p5e8:'',
+ p5e9:'',p5ea:'',p5eb:'',p5ec:'',p5ed:'',p5ee:'',p5ef:'',p5f0:'',
+ p5f1:'',p5f2:'',p5f3:'',p5f4:'',p5f5:'',p5f6:'',p5f7:'',p5f8:'',
+ p5f9:'',p5fa:'',p5fb:'',p5fc:'',p5fd:'',p5fe:'',p5ff:'',p600:'',
+ p601:'',p602:'',p603:'',p604:'',p605:'',p606:'',p607:'',p608:'',
+ p609:'',p60a:'',p60b:'',p60c:'',p60d:'',p60e:'',p60f:'',p610:'',
+ p611:'',p612:'',p613:'',p614:'',p615:'',p616:'',p617:'',p618:'',
+ p619:'',p61a:'',p61b:'',p61c:'',p61d:'',p61e:'',p61f:'',p620:'',
+ p621:'',p622:'',p623:'',p624:'',p625:'',p626:'',p627:'',p628:'',
+ p629:'',p62a:'',p62b:'',p62c:'',p62d:'',p62e:'',p62f:'',p630:'',
+ p631:'',p632:'',p633:'',p634:'',p635:'',p636:'',p637:'',p638:'',
+ p639:'',p63a:'',p63b:'',p63c:'',p63d:'',p63e:'',p63f:'',p640:'',
+ p641:'',p642:'',p643:'',p644:'',p645:'',p646:'',p647:'',p648:'',
+ p649:'',p64a:'',p64b:'',p64c:'',p64d:'',p64e:'',p64f:'',p650:'',
+ p651:'',p652:'',p653:'',p654:'',p655:'',p656:'',p657:'',p658:'',
+ p659:'',p65a:'',p65b:'',p65c:'',p65d:'',p65e:'',p65f:'',p660:'',
+ p661:'',p662:'',p663:'',p664:'',p665:'',p666:'',p667:'',p668:'',
+ p669:'',p66a:'',p66b:'',p66c:'',p66d:'',p66e:'',p66f:'',p670:'',
+ p671:'',p672:'',p673:'',p674:'',p675:'',p676:'',p677:'',p678:'',
+ p679:'',p67a:'',p67b:'',p67c:'',p67d:'',p67e:'',p67f:'',p680:'',
+ p681:'',p682:'',p683:'',p684:'',p685:'',p686:'',p687:'',p688:'',
+ p689:'',p68a:'',p68b:'',p68c:'',p68d:'',p68e:'',p68f:'',p690:'',
+ p691:'',p692:'',p693:'',p694:'',p695:'',p696:'',p697:'',p698:'',
+ p699:'',p69a:'',p69b:'',p69c:'',p69d:'',p69e:'',p69f:'',p6a0:'',
+ p6a1:'',p6a2:'',p6a3:'',p6a4:'',p6a5:'',p6a6:'',p6a7:'',p6a8:'',
+ p6a9:'',p6aa:'',p6ab:'',p6ac:'',p6ad:'',p6ae:'',p6af:'',p6b0:'',
+ p6b1:'',p6b2:'',p6b3:'',p6b4:'',p6b5:'',p6b6:'',p6b7:'',p6b8:'',
+ p6b9:'',p6ba:'',p6bb:'',p6bc:'',p6bd:'',p6be:'',p6bf:'',p6c0:'',
+ p6c1:'',p6c2:'',p6c3:'',p6c4:'',p6c5:'',p6c6:'',p6c7:'',p6c8:'',
+ p6c9:'',p6ca:'',p6cb:'',p6cc:'',p6cd:'',p6ce:'',p6cf:'',p6d0:'',
+ p6d1:'',p6d2:'',p6d3:'',p6d4:'',p6d5:'',p6d6:'',p6d7:'',p6d8:'',
+ p6d9:'',p6da:'',p6db:'',p6dc:'',p6dd:'',p6de:'',p6df:'',p6e0:'',
+ p6e1:'',p6e2:'',p6e3:'',p6e4:'',p6e5:'',p6e6:'',p6e7:'',p6e8:'',
+ p6e9:'',p6ea:'',p6eb:'',p6ec:'',p6ed:'',p6ee:'',p6ef:'',p6f0:'',
+ p6f1:'',p6f2:'',p6f3:'',p6f4:'',p6f5:'',p6f6:'',p6f7:'',p6f8:'',
+ p6f9:'',p6fa:'',p6fb:'',p6fc:'',p6fd:'',p6fe:'',p6ff:'',p700:'',
+ p701:'',p702:'',p703:'',p704:'',p705:'',p706:'',p707:'',p708:'',
+ p709:'',p70a:'',p70b:'',p70c:'',p70d:'',p70e:'',p70f:'',p710:'',
+ p711:'',p712:'',p713:'',p714:'',p715:'',p716:'',p717:'',p718:'',
+ p719:'',p71a:'',p71b:'',p71c:'',p71d:'',p71e:'',p71f:'',p720:'',
+ p721:'',p722:'',p723:'',p724:'',p725:'',p726:'',p727:'',p728:'',
+ p729:'',p72a:'',p72b:'',p72c:'',p72d:'',p72e:'',p72f:'',p730:'',
+ p731:'',p732:'',p733:'',p734:'',p735:'',p736:'',p737:'',p738:'',
+ p739:'',p73a:'',p73b:'',p73c:'',p73d:'',p73e:'',p73f:'',p740:'',
+ p741:'',p742:'',p743:'',p744:'',p745:'',p746:'',p747:'',p748:'',
+ p749:'',p74a:'',p74b:'',p74c:'',p74d:'',p74e:'',p74f:'',p750:'',
+ p751:'',p752:'',p753:'',p754:'',p755:'',p756:'',p757:'',p758:'',
+ p759:'',p75a:'',p75b:'',p75c:'',p75d:'',p75e:'',p75f:'',p760:'',
+ p761:'',p762:'',p763:'',p764:'',p765:'',p766:'',p767:'',p768:'',
+ p769:'',p76a:'',p76b:'',p76c:'',p76d:'',p76e:'',p76f:'',p770:'',
+ p771:'',p772:'',p773:'',p774:'',p775:'',p776:'',p777:'',p778:'',
+ p779:'',p77a:'',p77b:'',p77c:'',p77d:'',p77e:'',p77f:'',p780:'',
+ p781:'',p782:'',p783:'',p784:'',p785:'',p786:'',p787:'',p788:'',
+ p789:'',p78a:'',p78b:'',p78c:'',p78d:'',p78e:'',p78f:'',p790:'',
+ p791:'',p792:'',p793:'',p794:'',p795:'',p796:'',p797:'',p798:'',
+ p799:'',p79a:'',p79b:'',p79c:'',p79d:'',p79e:'',p79f:'',p7a0:'',
+ p7a1:'',p7a2:'',p7a3:'',p7a4:'',p7a5:'',p7a6:'',p7a7:'',p7a8:'',
+ p7a9:'',p7aa:'',p7ab:'',p7ac:'',p7ad:'',p7ae:'',p7af:'',p7b0:'',
+ p7b1:'',p7b2:'',p7b3:'',p7b4:'',p7b5:'',p7b6:'',p7b7:'',p7b8:'',
+ p7b9:'',p7ba:'',p7bb:'',p7bc:'',p7bd:'',p7be:'',p7bf:'',p7c0:'',
+ p7c1:'',p7c2:'',p7c3:'',p7c4:'',p7c5:'',p7c6:'',p7c7:'',p7c8:'',
+ p7c9:'',p7ca:'',p7cb:'',p7cc:'',p7cd:'',p7ce:'',p7cf:'',p7d0:'',
+ p7d1:'',p7d2:'',p7d3:'',p7d4:'',p7d5:'',p7d6:'',p7d7:'',p7d8:'',
+ p7d9:'',p7da:'',p7db:'',p7dc:'',p7dd:'',p7de:'',p7df:'',p7e0:'',
+ p7e1:'',p7e2:'',p7e3:'',p7e4:'',p7e5:'',p7e6:'',p7e7:'',p7e8:'',
+ p7e9:'',p7ea:'',p7eb:'',p7ec:'',p7ed:'',p7ee:'',p7ef:'',p7f0:'',
+ p7f1:'',p7f2:'',p7f3:'',p7f4:'',p7f5:'',p7f6:'',p7f7:'',p7f8:'',
+ p7f9:'',p7fa:'',p7fb:'',p7fc:'',p7fd:'',p7fe:'',p7ff:'',p800:'',
+ p801:'',p802:'',p803:'',p804:'',p805:'',p806:'',p807:'',p808:'',
+ p809:'',p80a:'',p80b:'',p80c:'',p80d:'',p80e:'',p80f:'',p810:'',
+ p811:'',p812:'',p813:'',p814:'',p815:'',p816:'',p817:'',p818:'',
+ p819:'',p81a:'',p81b:'',p81c:'',p81d:'',p81e:'',p81f:'',p820:'',
+ p821:'',p822:'',p823:'',p824:'',p825:'',p826:'',p827:'',p828:'',
+ p829:'',p82a:'',p82b:'',p82c:'',p82d:'',p82e:'',p82f:'',p830:'',
+ p831:'',p832:'',p833:'',p834:'',p835:'',p836:'',p837:'',p838:'',
+ p839:'',p83a:'',p83b:'',p83c:'',p83d:'',p83e:'',p83f:'',p840:'',
+ p841:'',p842:'',p843:'',p844:'',p845:'',p846:'',p847:'',p848:'',
+ p849:'',p84a:'',p84b:'',p84c:'',p84d:'',p84e:'',p84f:'',p850:'',
+ p851:'',p852:'',p853:'',p854:'',p855:'',p856:'',p857:'',p858:'',
+ p859:'',p85a:'',p85b:'',p85c:'',p85d:'',p85e:'',p85f:'',p860:'',
+ p861:'',p862:'',p863:'',p864:'',p865:'',p866:'',p867:'',p868:'',
+ p869:'',p86a:'',p86b:'',p86c:'',p86d:'',p86e:'',p86f:'',p870:'',
+ p871:'',p872:'',p873:'',p874:'',p875:'',p876:'',p877:'',p878:'',
+ p879:'',p87a:'',p87b:'',p87c:'',p87d:'',p87e:'',p87f:'',p880:'',
+ p881:'',p882:'',p883:'',p884:'',p885:'',p886:'',p887:'',p888:'',
+ p889:'',p88a:'',p88b:'',p88c:'',p88d:'',p88e:'',p88f:'',p890:'',
+ p891:'',p892:'',p893:'',p894:'',p895:'',p896:'',p897:'',p898:'',
+ p899:'',p89a:'',p89b:'',p89c:'',p89d:'',p89e:'',p89f:'',p8a0:'',
+ p8a1:'',p8a2:'',p8a3:'',p8a4:'',p8a5:'',p8a6:'',p8a7:'',p8a8:'',
+ p8a9:'',p8aa:'',p8ab:'',p8ac:'',p8ad:'',p8ae:'',p8af:'',p8b0:'',
+ p8b1:'',p8b2:'',p8b3:'',p8b4:'',p8b5:'',p8b6:'',p8b7:'',p8b8:'',
+ p8b9:'',p8ba:'',p8bb:'',p8bc:'',p8bd:'',p8be:'',p8bf:'',p8c0:'',
+ p8c1:'',p8c2:'',p8c3:'',p8c4:'',p8c5:'',p8c6:'',p8c7:'',p8c8:'',
+ p8c9:'',p8ca:'',p8cb:'',p8cc:'',p8cd:'',p8ce:'',p8cf:'',p8d0:'',
+ p8d1:'',p8d2:'',p8d3:'',p8d4:'',p8d5:'',p8d6:'',p8d7:'',p8d8:'',
+ p8d9:'',p8da:'',p8db:'',p8dc:'',p8dd:'',p8de:'',p8df:'',p8e0:'',
+ p8e1:'',p8e2:'',p8e3:'',p8e4:'',p8e5:'',p8e6:'',p8e7:'',p8e8:'',
+ p8e9:'',p8ea:'',p8eb:'',p8ec:'',p8ed:'',p8ee:'',p8ef:'',p8f0:'',
+ p8f1:'',p8f2:'',p8f3:'',p8f4:'',p8f5:'',p8f6:'',p8f7:'',p8f8:'',
+ p8f9:'',p8fa:'',p8fb:'',p8fc:'',p8fd:'',p8fe:'',p8ff:'',p900:'',
+ p901:'',p902:'',p903:'',p904:'',p905:'',p906:'',p907:'',p908:'',
+ p909:'',p90a:'',p90b:'',p90c:'',p90d:'',p90e:'',p90f:'',p910:'',
+ p911:'',p912:'',p913:'',p914:'',p915:'',p916:'',p917:'',p918:'',
+ p919:'',p91a:'',p91b:'',p91c:'',p91d:'',p91e:'',p91f:'',p920:'',
+ p921:'',p922:'',p923:'',p924:'',p925:'',p926:'',p927:'',p928:'',
+ p929:'',p92a:'',p92b:'',p92c:'',p92d:'',p92e:'',p92f:'',p930:'',
+ p931:'',p932:'',p933:'',p934:'',p935:'',p936:'',p937:'',p938:'',
+ p939:'',p93a:'',p93b:'',p93c:'',p93d:'',p93e:'',p93f:'',p940:'',
+ p941:'',p942:'',p943:'',p944:'',p945:'',p946:'',p947:'',p948:'',
+ p949:'',p94a:'',p94b:'',p94c:'',p94d:'',p94e:'',p94f:'',p950:'',
+ p951:'',p952:'',p953:'',p954:'',p955:'',p956:'',p957:'',p958:'',
+ p959:'',p95a:'',p95b:'',p95c:'',p95d:'',p95e:'',p95f:'',p960:'',
+ p961:'',p962:'',p963:'',p964:'',p965:'',p966:'',p967:'',p968:'',
+ p969:'',p96a:'',p96b:'',p96c:'',p96d:'',p96e:'',p96f:'',p970:'',
+ p971:'',p972:'',p973:'',p974:'',p975:'',p976:'',p977:'',p978:'',
+ p979:'',p97a:'',p97b:'',p97c:'',p97d:'',p97e:'',p97f:'',p980:'',
+ p981:'',p982:'',p983:'',p984:'',p985:'',p986:'',p987:'',p988:'',
+ p989:'',p98a:'',p98b:'',p98c:'',p98d:'',p98e:'',p98f:'',p990:'',
+ p991:'',p992:'',p993:'',p994:'',p995:'',p996:'',p997:'',p998:'',
+ p999:'',p99a:'',p99b:'',p99c:'',p99d:'',p99e:'',p99f:'',p9a0:'',
+ p9a1:'',p9a2:'',p9a3:'',p9a4:'',p9a5:'',p9a6:'',p9a7:'',p9a8:'',
+ p9a9:'',p9aa:'',p9ab:'',p9ac:'',p9ad:'',p9ae:'',p9af:'',p9b0:'',
+ p9b1:'',p9b2:'',p9b3:'',p9b4:'',p9b5:'',p9b6:'',p9b7:'',p9b8:'',
+ p9b9:'',p9ba:'',p9bb:'',p9bc:'',p9bd:'',p9be:'',p9bf:'',p9c0:'',
+ p9c1:'',p9c2:'',p9c3:'',p9c4:'',p9c5:'',p9c6:'',p9c7:'',p9c8:'',
+ p9c9:'',p9ca:'',p9cb:'',p9cc:'',p9cd:'',p9ce:'',p9cf:'',p9d0:'',
+ p9d1:'',p9d2:'',p9d3:'',p9d4:'',p9d5:'',p9d6:'',p9d7:'',p9d8:'',
+ p9d9:'',p9da:'',p9db:'',p9dc:'',p9dd:'',p9de:'',p9df:'',p9e0:'',
+ p9e1:'',p9e2:'',p9e3:'',p9e4:'',p9e5:'',p9e6:'',p9e7:'',p9e8:'',
+ p9e9:'',p9ea:'',p9eb:'',p9ec:'',p9ed:'',p9ee:'',p9ef:'',p9f0:'',
+ p9f1:'',p9f2:'',p9f3:'',p9f4:'',p9f5:'',p9f6:'',p9f7:'',p9f8:'',
+ p9f9:'',p9fa:'',p9fb:'',p9fc:'',p9fd:'',p9fe:'',p9ff:'',pa00:'',
+ pa01:'',pa02:'',pa03:'',pa04:'',pa05:'',pa06:'',pa07:'',pa08:'',
+ pa09:'',pa0a:'',pa0b:'',pa0c:'',pa0d:'',pa0e:'',pa0f:'',pa10:'',
+ pa11:'',pa12:'',pa13:'',pa14:'',pa15:'',pa16:'',pa17:'',pa18:'',
+ pa19:'',pa1a:'',pa1b:'',pa1c:'',pa1d:'',pa1e:'',pa1f:'',pa20:'',
+ pa21:'',pa22:'',pa23:'',pa24:'',pa25:'',pa26:'',pa27:'',pa28:'',
+ pa29:'',pa2a:'',pa2b:'',pa2c:'',pa2d:'',pa2e:'',pa2f:'',pa30:'',
+ pa31:'',pa32:'',pa33:'',pa34:'',pa35:'',pa36:'',pa37:'',pa38:'',
+ pa39:'',pa3a:'',pa3b:'',pa3c:'',pa3d:'',pa3e:'',pa3f:'',pa40:'',
+ pa41:'',pa42:'',pa43:'',pa44:'',pa45:'',pa46:'',pa47:'',pa48:'',
+ pa49:'',pa4a:'',pa4b:'',pa4c:'',pa4d:'',pa4e:'',pa4f:'',pa50:'',
+ pa51:'',pa52:'',pa53:'',pa54:'',pa55:'',pa56:'',pa57:'',pa58:'',
+ pa59:'',pa5a:'',pa5b:'',pa5c:'',pa5d:'',pa5e:'',pa5f:'',pa60:'',
+ pa61:'',pa62:'',pa63:'',pa64:'',pa65:'',pa66:'',pa67:'',pa68:'',
+ pa69:'',pa6a:'',pa6b:'',pa6c:'',pa6d:'',pa6e:'',pa6f:'',pa70:'',
+ pa71:'',pa72:'',pa73:'',pa74:'',pa75:'',pa76:'',pa77:'',pa78:'',
+ pa79:'',pa7a:'',pa7b:'',pa7c:'',pa7d:'',pa7e:'',pa7f:'',pa80:'',
+ pa81:'',pa82:'',pa83:'',pa84:'',pa85:'',pa86:'',pa87:'',pa88:'',
+ pa89:'',pa8a:'',pa8b:'',pa8c:'',pa8d:'',pa8e:'',pa8f:'',pa90:'',
+ pa91:'',pa92:'',pa93:'',pa94:'',pa95:'',pa96:'',pa97:'',pa98:'',
+ pa99:'',pa9a:'',pa9b:'',pa9c:'',pa9d:'',pa9e:'',pa9f:'',paa0:'',
+ paa1:'',paa2:'',paa3:'',paa4:'',paa5:'',paa6:'',paa7:'',paa8:'',
+ paa9:'',paaa:'',paab:'',paac:'',paad:'',paae:'',paaf:'',pab0:'',
+ pab1:'',pab2:'',pab3:'',pab4:'',pab5:'',pab6:'',pab7:'',pab8:'',
+ pab9:'',paba:'',pabb:'',pabc:'',pabd:'',pabe:'',pabf:'',pac0:'',
+ pac1:'',pac2:'',pac3:'',pac4:'',pac5:'',pac6:'',pac7:'',pac8:'',
+ pac9:'',paca:'',pacb:'',pacc:'',pacd:'',pace:'',pacf:'',pad0:'',
+ pad1:'',pad2:'',pad3:'',pad4:'',pad5:'',pad6:'',pad7:'',pad8:'',
+ pad9:'',pada:'',padb:'',padc:'',padd:'',pade:'',padf:'',pae0:'',
+ pae1:'',pae2:'',pae3:'',pae4:'',pae5:'',pae6:'',pae7:'',pae8:'',
+ pae9:'',paea:'',paeb:'',paec:'',paed:'',paee:'',paef:'',paf0:'',
+ paf1:'',paf2:'',paf3:'',paf4:'',paf5:'',paf6:'',paf7:'',paf8:'',
+ paf9:'',pafa:'',pafb:'',pafc:'',pafd:'',pafe:'',paff:'',pb00:'',
+ pb01:'',pb02:'',pb03:'',pb04:'',pb05:'',pb06:'',pb07:'',pb08:'',
+ pb09:'',pb0a:'',pb0b:'',pb0c:'',pb0d:'',pb0e:'',pb0f:'',pb10:'',
+ pb11:'',pb12:'',pb13:'',pb14:'',pb15:'',pb16:'',pb17:'',pb18:'',
+ pb19:'',pb1a:'',pb1b:'',pb1c:'',pb1d:'',pb1e:'',pb1f:'',pb20:'',
+ pb21:'',pb22:'',pb23:'',pb24:'',pb25:'',pb26:'',pb27:'',pb28:'',
+ pb29:'',pb2a:'',pb2b:'',pb2c:'',pb2d:'',pb2e:'',pb2f:'',pb30:'',
+ pb31:'',pb32:'',pb33:'',pb34:'',pb35:'',pb36:'',pb37:'',pb38:'',
+ pb39:'',pb3a:'',pb3b:'',pb3c:'',pb3d:'',pb3e:'',pb3f:'',pb40:'',
+ pb41:'',pb42:'',pb43:'',pb44:'',pb45:'',pb46:'',pb47:'',pb48:'',
+ pb49:'',pb4a:'',pb4b:'',pb4c:'',pb4d:'',pb4e:'',pb4f:'',pb50:'',
+ pb51:'',pb52:'',pb53:'',pb54:'',pb55:'',pb56:'',pb57:'',pb58:'',
+ pb59:'',pb5a:'',pb5b:'',pb5c:'',pb5d:'',pb5e:'',pb5f:'',pb60:'',
+ pb61:'',pb62:'',pb63:'',pb64:'',pb65:'',pb66:'',pb67:'',pb68:'',
+ pb69:'',pb6a:'',pb6b:'',pb6c:'',pb6d:'',pb6e:'',pb6f:'',pb70:'',
+ pb71:'',pb72:'',pb73:'',pb74:'',pb75:'',pb76:'',pb77:'',pb78:'',
+ pb79:'',pb7a:'',pb7b:'',pb7c:'',pb7d:'',pb7e:'',pb7f:'',pb80:'',
+ pb81:'',pb82:'',pb83:'',pb84:'',pb85:'',pb86:'',pb87:'',pb88:'',
+ pb89:'',pb8a:'',pb8b:'',pb8c:'',pb8d:'',pb8e:'',pb8f:'',pb90:'',
+ pb91:'',pb92:'',pb93:'',pb94:'',pb95:'',pb96:'',pb97:'',pb98:'',
+ pb99:'',pb9a:'',pb9b:'',pb9c:'',pb9d:'',pb9e:'',pb9f:'',pba0:'',
+ pba1:'',pba2:'',pba3:'',pba4:'',pba5:'',pba6:'',pba7:'',pba8:'',
+ pba9:'',pbaa:'',pbab:'',pbac:'',pbad:'',pbae:'',pbaf:'',pbb0:'',
+ pbb1:'',pbb2:'',pbb3:'',pbb4:'',pbb5:'',pbb6:'',pbb7:'',pbb8:'',
+ pbb9:'',pbba:'',pbbb:'',pbbc:'',pbbd:'',pbbe:'',pbbf:'',pbc0:'',
+ pbc1:'',pbc2:'',pbc3:'',pbc4:'',pbc5:'',pbc6:'',pbc7:'',pbc8:'',
+ pbc9:'',pbca:'',pbcb:'',pbcc:'',pbcd:'',pbce:'',pbcf:'',pbd0:'',
+ pbd1:'',pbd2:'',pbd3:'',pbd4:'',pbd5:'',pbd6:'',pbd7:'',pbd8:'',
+ pbd9:'',pbda:'',pbdb:'',pbdc:'',pbdd:'',pbde:'',pbdf:'',pbe0:'',
+ pbe1:'',pbe2:'',pbe3:'',pbe4:'',pbe5:'',pbe6:'',pbe7:'',pbe8:'',
+ pbe9:'',pbea:'',pbeb:'',pbec:'',pbed:'',pbee:'',pbef:'',pbf0:'',
+ pbf1:'',pbf2:'',pbf3:'',pbf4:'',pbf5:'',pbf6:'',pbf7:'',pbf8:'',
+ pbf9:'',pbfa:'',pbfb:'',pbfc:'',pbfd:'',pbfe:'',pbff:'',pc00:'',
+ pc01:'',pc02:'',pc03:'',pc04:'',pc05:'',pc06:'',pc07:'',pc08:'',
+ pc09:'',pc0a:'',pc0b:'',pc0c:'',pc0d:'',pc0e:'',pc0f:'',pc10:'',
+ pc11:'',pc12:'',pc13:'',pc14:'',pc15:'',pc16:'',pc17:'',pc18:'',
+ pc19:'',pc1a:'',pc1b:'',pc1c:'',pc1d:'',pc1e:'',pc1f:'',pc20:'',
+ pc21:'',pc22:'',pc23:'',pc24:'',pc25:'',pc26:'',pc27:'',pc28:'',
+ pc29:'',pc2a:'',pc2b:'',pc2c:'',pc2d:'',pc2e:'',pc2f:'',pc30:'',
+ pc31:'',pc32:'',pc33:'',pc34:'',pc35:'',pc36:'',pc37:'',pc38:'',
+ pc39:'',pc3a:'',pc3b:'',pc3c:'',pc3d:'',pc3e:'',pc3f:'',pc40:'',
+ pc41:'',pc42:'',pc43:'',pc44:'',pc45:'',pc46:'',pc47:'',pc48:'',
+ pc49:'',pc4a:'',pc4b:'',pc4c:'',pc4d:'',pc4e:'',pc4f:'',pc50:'',
+ pc51:'',pc52:'',pc53:'',pc54:'',pc55:'',pc56:'',pc57:'',pc58:'',
+ pc59:'',pc5a:'',pc5b:'',pc5c:'',pc5d:'',pc5e:'',pc5f:'',pc60:'',
+ pc61:'',pc62:'',pc63:'',pc64:'',pc65:'',pc66:'',pc67:'',pc68:'',
+ pc69:'',pc6a:'',pc6b:'',pc6c:'',pc6d:'',pc6e:'',pc6f:'',pc70:'',
+ pc71:'',pc72:'',pc73:'',pc74:'',pc75:'',pc76:'',pc77:'',pc78:'',
+ pc79:'',pc7a:'',pc7b:'',pc7c:'',pc7d:'',pc7e:'',pc7f:'',pc80:'',
+ pc81:'',pc82:'',pc83:'',pc84:'',pc85:'',pc86:'',pc87:'',pc88:'',
+ pc89:'',pc8a:'',pc8b:'',pc8c:'',pc8d:'',pc8e:'',pc8f:'',pc90:'',
+ pc91:'',pc92:'',pc93:'',pc94:'',pc95:'',pc96:'',pc97:'',pc98:'',
+ pc99:'',pc9a:'',pc9b:'',pc9c:'',pc9d:'',pc9e:'',pc9f:'',pca0:'',
+ pca1:'',pca2:'',pca3:'',pca4:'',pca5:'',pca6:'',pca7:'',pca8:'',
+ pca9:'',pcaa:'',pcab:'',pcac:'',pcad:'',pcae:'',pcaf:'',pcb0:'',
+ pcb1:'',pcb2:'',pcb3:'',pcb4:'',pcb5:'',pcb6:'',pcb7:'',pcb8:'',
+ pcb9:'',pcba:'',pcbb:'',pcbc:'',pcbd:'',pcbe:'',pcbf:'',pcc0:'',
+ pcc1:'',pcc2:'',pcc3:'',pcc4:'',pcc5:'',pcc6:'',pcc7:'',pcc8:'',
+ pcc9:'',pcca:'',pccb:'',pccc:'',pccd:'',pcce:'',pccf:'',pcd0:'',
+ pcd1:'',pcd2:'',pcd3:'',pcd4:'',pcd5:'',pcd6:'',pcd7:'',pcd8:'',
+ pcd9:'',pcda:'',pcdb:'',pcdc:'',pcdd:'',pcde:'',pcdf:'',pce0:'',
+ pce1:'',pce2:'',pce3:'',pce4:'',pce5:'',pce6:'',pce7:'',pce8:'',
+ pce9:'',pcea:'',pceb:'',pcec:'',pced:'',pcee:'',pcef:'',pcf0:'',
+ pcf1:'',pcf2:'',pcf3:'',pcf4:'',pcf5:'',pcf6:'',pcf7:'',pcf8:'',
+ pcf9:'',pcfa:'',pcfb:'',pcfc:'',pcfd:'',pcfe:'',pcff:'',pd00:'',
+ pd01:'',pd02:'',pd03:'',pd04:'',pd05:'',pd06:'',pd07:'',pd08:'',
+ pd09:'',pd0a:'',pd0b:'',pd0c:'',pd0d:'',pd0e:'',pd0f:'',pd10:'',
+ pd11:'',pd12:'',pd13:'',pd14:'',pd15:'',pd16:'',pd17:'',pd18:'',
+ pd19:'',pd1a:'',pd1b:'',pd1c:'',pd1d:'',pd1e:'',pd1f:'',pd20:'',
+ pd21:'',pd22:'',pd23:'',pd24:'',pd25:'',pd26:'',pd27:'',pd28:'',
+ pd29:'',pd2a:'',pd2b:'',pd2c:'',pd2d:'',pd2e:'',pd2f:'',pd30:'',
+ pd31:'',pd32:'',pd33:'',pd34:'',pd35:'',pd36:'',pd37:'',pd38:'',
+ pd39:'',pd3a:'',pd3b:'',pd3c:'',pd3d:'',pd3e:'',pd3f:'',pd40:'',
+ pd41:'',pd42:'',pd43:'',pd44:'',pd45:'',pd46:'',pd47:'',pd48:'',
+ pd49:'',pd4a:'',pd4b:'',pd4c:'',pd4d:'',pd4e:'',pd4f:'',pd50:'',
+ pd51:'',pd52:'',pd53:'',pd54:'',pd55:'',pd56:'',pd57:'',pd58:'',
+ pd59:'',pd5a:'',pd5b:'',pd5c:'',pd5d:'',pd5e:'',pd5f:'',pd60:'',
+ pd61:'',pd62:'',pd63:'',pd64:'',pd65:'',pd66:'',pd67:'',pd68:'',
+ pd69:'',pd6a:'',pd6b:'',pd6c:'',pd6d:'',pd6e:'',pd6f:'',pd70:'',
+ pd71:'',pd72:'',pd73:'',pd74:'',pd75:'',pd76:'',pd77:'',pd78:'',
+ pd79:'',pd7a:'',pd7b:'',pd7c:'',pd7d:'',pd7e:'',pd7f:'',pd80:'',
+ pd81:'',pd82:'',pd83:'',pd84:'',pd85:'',pd86:'',pd87:'',pd88:'',
+ pd89:'',pd8a:'',pd8b:'',pd8c:'',pd8d:'',pd8e:'',pd8f:'',pd90:'',
+ pd91:'',pd92:'',pd93:'',pd94:'',pd95:'',pd96:'',pd97:'',pd98:'',
+ pd99:'',pd9a:'',pd9b:'',pd9c:'',pd9d:'',pd9e:'',pd9f:'',pda0:'',
+ pda1:'',pda2:'',pda3:'',pda4:'',pda5:'',pda6:'',pda7:'',pda8:'',
+ pda9:'',pdaa:'',pdab:'',pdac:'',pdad:'',pdae:'',pdaf:'',pdb0:'',
+ pdb1:'',pdb2:'',pdb3:'',pdb4:'',pdb5:'',pdb6:'',pdb7:'',pdb8:'',
+ pdb9:'',pdba:'',pdbb:'',pdbc:'',pdbd:'',pdbe:'',pdbf:'',pdc0:'',
+ pdc1:'',pdc2:'',pdc3:'',pdc4:'',pdc5:'',pdc6:'',pdc7:'',pdc8:'',
+ pdc9:'',pdca:'',pdcb:'',pdcc:'',pdcd:'',pdce:'',pdcf:'',pdd0:'',
+ pdd1:'',pdd2:'',pdd3:'',pdd4:'',pdd5:'',pdd6:'',pdd7:'',pdd8:'',
+ pdd9:'',pdda:'',pddb:'',pddc:'',pddd:'',pdde:'',pddf:'',pde0:'',
+ pde1:'',pde2:'',pde3:'',pde4:'',pde5:'',pde6:'',pde7:'',pde8:'',
+ pde9:'',pdea:'',pdeb:'',pdec:'',pded:'',pdee:'',pdef:'',pdf0:'',
+ pdf1:'',pdf2:'',pdf3:'',pdf4:'',pdf5:'',pdf6:'',pdf7:'',pdf8:'',
+ pdf9:'',pdfa:'',pdfb:'',pdfc:'',pdfd:'',pdfe:'',pdff:'',pe00:'',
+ pe01:'',pe02:'',pe03:'',pe04:'',pe05:'',pe06:'',pe07:'',pe08:'',
+ pe09:'',pe0a:'',pe0b:'',pe0c:'',pe0d:'',pe0e:'',pe0f:'',pe10:'',
+ pe11:'',pe12:'',pe13:'',pe14:'',pe15:'',pe16:'',pe17:'',pe18:'',
+ pe19:'',pe1a:'',pe1b:'',pe1c:'',pe1d:'',pe1e:'',pe1f:'',pe20:'',
+ pe21:'',pe22:'',pe23:'',pe24:'',pe25:'',pe26:'',pe27:'',pe28:'',
+ pe29:'',pe2a:'',pe2b:'',pe2c:'',pe2d:'',pe2e:'',pe2f:'',pe30:'',
+ pe31:'',pe32:'',pe33:'',pe34:'',pe35:'',pe36:'',pe37:'',pe38:'',
+ pe39:'',pe3a:'',pe3b:'',pe3c:'',pe3d:'',pe3e:'',pe3f:'',pe40:'',
+ pe41:'',pe42:'',pe43:'',pe44:'',pe45:'',pe46:'',pe47:'',pe48:'',
+ pe49:'',pe4a:'',pe4b:'',pe4c:'',pe4d:'',pe4e:'',pe4f:'',pe50:'',
+ pe51:'',pe52:'',pe53:'',pe54:'',pe55:'',pe56:'',pe57:'',pe58:'',
+ pe59:'',pe5a:'',pe5b:'',pe5c:'',pe5d:'',pe5e:'',pe5f:'',pe60:'',
+ pe61:'',pe62:'',pe63:'',pe64:'',pe65:'',pe66:'',pe67:'',pe68:'',
+ pe69:'',pe6a:'',pe6b:'',pe6c:'',pe6d:'',pe6e:'',pe6f:'',pe70:'',
+ pe71:'',pe72:'',pe73:'',pe74:'',pe75:'',pe76:'',pe77:'',pe78:'',
+ pe79:'',pe7a:'',pe7b:'',pe7c:'',pe7d:'',pe7e:'',pe7f:'',pe80:'',
+ pe81:'',pe82:'',pe83:'',pe84:'',pe85:'',pe86:'',pe87:'',pe88:'',
+ pe89:'',pe8a:'',pe8b:'',pe8c:'',pe8d:'',pe8e:'',pe8f:'',pe90:'',
+ pe91:'',pe92:'',pe93:'',pe94:'',pe95:'',pe96:'',pe97:'',pe98:'',
+ pe99:'',pe9a:'',pe9b:'',pe9c:'',pe9d:'',pe9e:'',pe9f:'',pea0:'',
+ pea1:'',pea2:'',pea3:'',pea4:'',pea5:'',pea6:'',pea7:'',pea8:'',
+ pea9:'',peaa:'',peab:'',peac:'',pead:'',peae:'',peaf:'',peb0:'',
+ peb1:'',peb2:'',peb3:'',peb4:'',peb5:'',peb6:'',peb7:'',peb8:'',
+ peb9:'',peba:'',pebb:'',pebc:'',pebd:'',pebe:'',pebf:'',pec0:'',
+ pec1:'',pec2:'',pec3:'',pec4:'',pec5:'',pec6:'',pec7:'',pec8:'',
+ pec9:'',peca:'',pecb:'',pecc:'',pecd:'',pece:'',pecf:'',ped0:'',
+ ped1:'',ped2:'',ped3:'',ped4:'',ped5:'',ped6:'',ped7:'',ped8:'',
+ ped9:'',peda:'',pedb:'',pedc:'',pedd:'',pede:'',pedf:'',pee0:'',
+ pee1:'',pee2:'',pee3:'',pee4:'',pee5:'',pee6:'',pee7:'',pee8:'',
+ pee9:'',peea:'',peeb:'',peec:'',peed:'',peee:'',peef:'',pef0:'',
+ pef1:'',pef2:'',pef3:'',pef4:'',pef5:'',pef6:'',pef7:'',pef8:'',
+ pef9:'',pefa:'',pefb:'',pefc:'',pefd:'',pefe:'',peff:'',pf00:'',
+ pf01:'',pf02:'',pf03:'',pf04:'',pf05:'',pf06:'',pf07:'',pf08:'',
+ pf09:'',pf0a:'',pf0b:'',pf0c:'',pf0d:'',pf0e:'',pf0f:'',pf10:'',
+ pf11:'',pf12:'',pf13:'',pf14:'',pf15:'',pf16:'',pf17:'',pf18:'',
+ pf19:'',pf1a:'',pf1b:'',pf1c:'',pf1d:'',pf1e:'',pf1f:'',pf20:'',
+ pf21:'',pf22:'',pf23:'',pf24:'',pf25:'',pf26:'',pf27:'',pf28:'',
+ pf29:'',pf2a:'',pf2b:'',pf2c:'',pf2d:'',pf2e:'',pf2f:'',pf30:'',
+ pf31:'',pf32:'',pf33:'',pf34:'',pf35:'',pf36:'',pf37:'',pf38:'',
+ pf39:'',pf3a:'',pf3b:'',pf3c:'',pf3d:'',pf3e:'',pf3f:'',pf40:'',
+ pf41:'',pf42:'',pf43:'',pf44:'',pf45:'',pf46:'',pf47:'',pf48:'',
+ pf49:'',pf4a:'',pf4b:'',pf4c:'',pf4d:'',pf4e:'',pf4f:'',pf50:'',
+ pf51:'',pf52:'',pf53:'',pf54:'',pf55:'',pf56:'',pf57:'',pf58:'',
+ pf59:'',pf5a:'',pf5b:'',pf5c:'',pf5d:'',pf5e:'',pf5f:'',pf60:'',
+ pf61:'',pf62:'',pf63:'',pf64:'',pf65:'',pf66:'',pf67:'',pf68:'',
+ pf69:'',pf6a:'',pf6b:'',pf6c:'',pf6d:'',pf6e:'',pf6f:'',pf70:'',
+ pf71:'',pf72:'',pf73:'',pf74:'',pf75:'',pf76:'',pf77:'',pf78:'',
+ pf79:'',pf7a:'',pf7b:'',pf7c:'',pf7d:'',pf7e:'',pf7f:'',pf80:'',
+ pf81:'',pf82:'',pf83:'',pf84:'',pf85:'',pf86:'',pf87:'',pf88:'',
+ pf89:'',pf8a:'',pf8b:'',pf8c:'',pf8d:'',pf8e:'',pf8f:'',pf90:'',
+ pf91:'',pf92:'',pf93:'',pf94:'',pf95:'',pf96:'',pf97:'',pf98:'',
+ pf99:'',pf9a:'',pf9b:'',pf9c:'',pf9d:'',pf9e:'',pf9f:'',pfa0:'',
+ pfa1:'',pfa2:'',pfa3:'',pfa4:'',pfa5:'',pfa6:'',pfa7:'',pfa8:'',
+ pfa9:'',pfaa:'',pfab:'',pfac:'',pfad:'',pfae:'',pfaf:'',pfb0:'',
+ pfb1:'',pfb2:'',pfb3:'',pfb4:'',pfb5:'',pfb6:'',pfb7:'',pfb8:'',
+ pfb9:'',pfba:'',pfbb:'',pfbc:'',pfbd:'',pfbe:'',pfbf:'',pfc0:'',
+ pfc1:'',pfc2:'',pfc3:'',pfc4:'',pfc5:'',pfc6:'',pfc7:'',pfc8:'',
+ pfc9:'',pfca:'',pfcb:'',pfcc:'',pfcd:'',pfce:'',pfcf:'',pfd0:'',
+ pfd1:'',pfd2:'',pfd3:'',pfd4:'',pfd5:'',pfd6:'',pfd7:'',pfd8:'',
+ pfd9:'',pfda:'',pfdb:'',pfdc:'',pfdd:'',pfde:'',pfdf:'',pfe0:'',
+ pfe1:'',pfe2:'',pfe3:'',pfe4:'',pfe5:'',pfe6:'',pfe7:'',pfe8:'',
+ pfe9:'',pfea:'',pfeb:'',pfec:'',pfed:'',pfee:'',pfef:'',pff0:'',
+ pff1:'',pff2:'',pff3:'',pff4:'',pff5:'',pff6:'',pff7:'',pff8:'',
+ pff9:'',pffa:'',pffb:'',pffc:'',pffd:'',pffe:'',pfff:'',p1000:'',
+ p1001:'',p1002:'',p1003:'',p1004:'',p1005:'',p1006:'',p1007:'',p1008:'',
+ p1009:'',p100a:'',p100b:'',p100c:'',p100d:'',p100e:'',p100f:'',p1010:'',
+ p1011:'',p1012:'',p1013:'',p1014:'',p1015:'',p1016:'',p1017:'',p1018:'',
+ p1019:'',p101a:'',p101b:'',p101c:'',p101d:'',p101e:'',p101f:'',p1020:'',
+ p1021:'',p1022:'',p1023:'',p1024:'',p1025:'',p1026:'',p1027:'',p1028:'',
+ p1029:'',p102a:'',p102b:'',p102c:'',p102d:'',p102e:'',p102f:'',p1030:'',
+ p1031:'',p1032:'',p1033:'',p1034:'',p1035:'',p1036:'',p1037:'',p1038:'',
+ p1039:'',p103a:'',p103b:'',p103c:'',p103d:'',p103e:'',p103f:'',p1040:'',
+ p1041:'',p1042:'',p1043:'',p1044:'',p1045:'',p1046:'',p1047:'',p1048:'',
+ p1049:'',p104a:'',p104b:'',p104c:'',p104d:'',p104e:'',p104f:'',p1050:'',
+ p1051:'',p1052:'',p1053:'',p1054:'',p1055:'',p1056:'',p1057:'',p1058:'',
+ p1059:'',p105a:'',p105b:'',p105c:'',p105d:'',p105e:'',p105f:'',p1060:'',
+ p1061:'',p1062:'',p1063:'',p1064:'',p1065:'',p1066:'',p1067:'',p1068:'',
+ p1069:'',p106a:'',p106b:'',p106c:'',p106d:'',p106e:'',p106f:'',p1070:'',
+ p1071:'',p1072:'',p1073:'',p1074:'',p1075:'',p1076:'',p1077:'',p1078:'',
+ p1079:'',p107a:'',p107b:'',p107c:'',p107d:'',p107e:'',p107f:'',p1080:'',
+ p1081:'',p1082:'',p1083:'',p1084:'',p1085:'',p1086:'',p1087:'',p1088:'',
+ p1089:'',p108a:'',p108b:'',p108c:'',p108d:'',p108e:'',p108f:'',p1090:'',
+ p1091:'',p1092:'',p1093:'',p1094:'',p1095:'',p1096:'',p1097:'',p1098:'',
+ p1099:'',p109a:'',p109b:'',p109c:'',p109d:'',p109e:'',p109f:'',p10a0:'',
+ p10a1:'',p10a2:'',p10a3:'',p10a4:'',p10a5:'',p10a6:'',p10a7:'',p10a8:'',
+ p10a9:'',p10aa:'',p10ab:'',p10ac:'',p10ad:'',p10ae:'',p10af:'',p10b0:'',
+ p10b1:'',p10b2:'',p10b3:'',p10b4:'',p10b5:'',p10b6:'',p10b7:'',p10b8:'',
+ p10b9:'',p10ba:'',p10bb:'',p10bc:'',p10bd:'',p10be:'',p10bf:'',p10c0:'',
+ p10c1:'',p10c2:'',p10c3:'',p10c4:'',p10c5:'',p10c6:'',p10c7:'',p10c8:'',
+ p10c9:'',p10ca:'',p10cb:'',p10cc:'',p10cd:'',p10ce:'',p10cf:'',p10d0:'',
+ p10d1:'',p10d2:'',p10d3:'',p10d4:'',p10d5:'',p10d6:'',p10d7:'',p10d8:'',
+ p10d9:'',p10da:'',p10db:'',p10dc:'',p10dd:'',p10de:'',p10df:'',p10e0:'',
+ p10e1:'',p10e2:'',p10e3:'',p10e4:'',p10e5:'',p10e6:'',p10e7:'',p10e8:'',
+ p10e9:'',p10ea:'',p10eb:'',p10ec:'',p10ed:'',p10ee:'',p10ef:'',p10f0:'',
+ p10f1:'',p10f2:'',p10f3:'',p10f4:'',p10f5:'',p10f6:'',p10f7:'',p10f8:'',
+ p10f9:'',p10fa:'',p10fb:'',p10fc:'',p10fd:'',p10fe:'',p10ff:'',p1100:'',
+ p1101:'',p1102:'',p1103:'',p1104:'',p1105:'',p1106:'',p1107:'',p1108:'',
+ p1109:'',p110a:'',p110b:'',p110c:'',p110d:'',p110e:'',p110f:'',p1110:'',
+ p1111:'',p1112:'',p1113:'',p1114:'',p1115:'',p1116:'',p1117:'',p1118:'',
+ p1119:'',p111a:'',p111b:'',p111c:'',p111d:'',p111e:'',p111f:'',p1120:'',
+ p1121:'',p1122:'',p1123:'',p1124:'',p1125:'',p1126:'',p1127:'',p1128:'',
+ p1129:'',p112a:'',p112b:'',p112c:'',p112d:'',p112e:'',p112f:'',p1130:'',
+ p1131:'',p1132:'',p1133:'',p1134:'',p1135:'',p1136:'',p1137:'',p1138:'',
+ p1139:'',p113a:'',p113b:'',p113c:'',p113d:'',p113e:'',p113f:'',p1140:'',
+ p1141:'',p1142:'',p1143:'',p1144:'',p1145:'',p1146:'',p1147:'',p1148:'',
+ p1149:'',p114a:'',p114b:'',p114c:'',p114d:'',p114e:'',p114f:'',p1150:'',
+ p1151:'',p1152:'',p1153:'',p1154:'',p1155:'',p1156:'',p1157:'',p1158:'',
+ p1159:'',p115a:'',p115b:'',p115c:'',p115d:'',p115e:'',p115f:'',p1160:'',
+ p1161:'',p1162:'',p1163:'',p1164:'',p1165:'',p1166:'',p1167:'',p1168:'',
+ p1169:'',p116a:'',p116b:'',p116c:'',p116d:'',p116e:'',p116f:'',p1170:'',
+ p1171:'',p1172:'',p1173:'',p1174:'',p1175:'',p1176:'',p1177:'',p1178:'',
+ p1179:'',p117a:'',p117b:'',p117c:'',p117d:'',p117e:'',p117f:'',p1180:'',
+ p1181:'',p1182:'',p1183:'',p1184:'',p1185:'',p1186:'',p1187:'',p1188:'',
+ p1189:'',p118a:'',p118b:'',p118c:'',p118d:'',p118e:'',p118f:'',p1190:'',
+ p1191:'',p1192:'',p1193:'',p1194:'',p1195:'',p1196:'',p1197:'',p1198:'',
+ p1199:'',p119a:'',p119b:'',p119c:'',p119d:'',p119e:'',p119f:'',p11a0:'',
+ p11a1:'',p11a2:'',p11a3:'',p11a4:'',p11a5:'',p11a6:'',p11a7:'',p11a8:'',
+ p11a9:'',p11aa:'',p11ab:'',p11ac:'',p11ad:'',p11ae:'',p11af:'',p11b0:'',
+ p11b1:'',p11b2:'',p11b3:'',p11b4:'',p11b5:'',p11b6:'',p11b7:'',p11b8:'',
+ p11b9:'',p11ba:'',p11bb:'',p11bc:'',p11bd:'',p11be:'',p11bf:'',p11c0:'',
+ p11c1:'',p11c2:'',p11c3:'',p11c4:'',p11c5:'',p11c6:'',p11c7:'',p11c8:'',
+ p11c9:'',p11ca:'',p11cb:'',p11cc:'',p11cd:'',p11ce:'',p11cf:'',p11d0:'',
+ p11d1:'',p11d2:'',p11d3:'',p11d4:'',p11d5:'',p11d6:'',p11d7:'',p11d8:'',
+ p11d9:'',p11da:'',p11db:'',p11dc:'',p11dd:'',p11de:'',p11df:'',p11e0:'',
+ p11e1:'',p11e2:'',p11e3:'',p11e4:'',p11e5:'',p11e6:'',p11e7:'',p11e8:'',
+ p11e9:'',p11ea:'',p11eb:'',p11ec:'',p11ed:'',p11ee:'',p11ef:'',p11f0:'',
+ p11f1:'',p11f2:'',p11f3:'',p11f4:'',p11f5:'',p11f6:'',p11f7:'',p11f8:'',
+ p11f9:'',p11fa:'',p11fb:'',p11fc:'',p11fd:'',p11fe:'',p11ff:'',p1200:'',
+ p1201:'',p1202:'',p1203:'',p1204:'',p1205:'',p1206:'',p1207:'',p1208:'',
+ p1209:'',p120a:'',p120b:'',p120c:'',p120d:'',p120e:'',p120f:'',p1210:'',
+ p1211:'',p1212:'',p1213:'',p1214:'',p1215:'',p1216:'',p1217:'',p1218:'',
+ p1219:'',p121a:'',p121b:'',p121c:'',p121d:'',p121e:'',p121f:'',p1220:'',
+ p1221:'',p1222:'',p1223:'',p1224:'',p1225:'',p1226:'',p1227:'',p1228:'',
+ p1229:'',p122a:'',p122b:'',p122c:'',p122d:'',p122e:'',p122f:'',p1230:'',
+ p1231:'',p1232:'',p1233:'',p1234:'',p1235:'',p1236:'',p1237:'',p1238:'',
+ p1239:'',p123a:'',p123b:'',p123c:'',p123d:'',p123e:'',p123f:'',p1240:'',
+ p1241:'',p1242:'',p1243:'',p1244:'',p1245:'',p1246:'',p1247:'',p1248:'',
+ p1249:'',p124a:'',p124b:'',p124c:'',p124d:'',p124e:'',p124f:'',p1250:'',
+ p1251:'',p1252:'',p1253:'',p1254:'',p1255:'',p1256:'',p1257:'',p1258:'',
+ p1259:'',p125a:'',p125b:'',p125c:'',p125d:'',p125e:'',p125f:'',p1260:'',
+ p1261:'',p1262:'',p1263:'',p1264:'',p1265:'',p1266:'',p1267:'',p1268:'',
+ p1269:'',p126a:'',p126b:'',p126c:'',p126d:'',p126e:'',p126f:'',p1270:'',
+ p1271:'',p1272:'',p1273:'',p1274:'',p1275:'',p1276:'',p1277:'',p1278:'',
+ p1279:'',p127a:'',p127b:'',p127c:'',p127d:'',p127e:'',p127f:'',p1280:'',
+ p1281:'',p1282:'',p1283:'',p1284:'',p1285:'',p1286:'',p1287:'',p1288:'',
+ p1289:'',p128a:'',p128b:'',p128c:'',p128d:'',p128e:'',p128f:'',p1290:'',
+ p1291:'',p1292:'',p1293:'',p1294:'',p1295:'',p1296:'',p1297:'',p1298:'',
+ p1299:'',p129a:'',p129b:'',p129c:'',p129d:'',p129e:'',p129f:'',p12a0:'',
+ p12a1:'',p12a2:'',p12a3:'',p12a4:'',p12a5:'',p12a6:'',p12a7:'',p12a8:'',
+ p12a9:'',p12aa:'',p12ab:'',p12ac:'',p12ad:'',p12ae:'',p12af:'',p12b0:'',
+ p12b1:'',p12b2:'',p12b3:'',p12b4:'',p12b5:'',p12b6:'',p12b7:'',p12b8:'',
+ p12b9:'',p12ba:'',p12bb:'',p12bc:'',p12bd:'',p12be:'',p12bf:'',p12c0:'',
+ p12c1:'',p12c2:'',p12c3:'',p12c4:'',p12c5:'',p12c6:'',p12c7:'',p12c8:'',
+ p12c9:'',p12ca:'',p12cb:'',p12cc:'',p12cd:'',p12ce:'',p12cf:'',p12d0:'',
+ p12d1:'',p12d2:'',p12d3:'',p12d4:'',p12d5:'',p12d6:'',p12d7:'',p12d8:'',
+ p12d9:'',p12da:'',p12db:'',p12dc:'',p12dd:'',p12de:'',p12df:'',p12e0:'',
+ p12e1:'',p12e2:'',p12e3:'',p12e4:'',p12e5:'',p12e6:'',p12e7:'',p12e8:'',
+ p12e9:'',p12ea:'',p12eb:'',p12ec:'',p12ed:'',p12ee:'',p12ef:'',p12f0:'',
+ p12f1:'',p12f2:'',p12f3:'',p12f4:'',p12f5:'',p12f6:'',p12f7:'',p12f8:'',
+ p12f9:'',p12fa:'',p12fb:'',p12fc:'',p12fd:'',p12fe:'',p12ff:'',p1300:'',
+ p1301:'',p1302:'',p1303:'',p1304:'',p1305:'',p1306:'',p1307:'',p1308:'',
+ p1309:'',p130a:'',p130b:'',p130c:'',p130d:'',p130e:'',p130f:'',p1310:'',
+ p1311:'',p1312:'',p1313:'',p1314:'',p1315:'',p1316:'',p1317:'',p1318:'',
+ p1319:'',p131a:'',p131b:'',p131c:'',p131d:'',p131e:'',p131f:'',p1320:'',
+ p1321:'',p1322:'',p1323:'',p1324:'',p1325:'',p1326:'',p1327:'',p1328:'',
+ p1329:'',p132a:'',p132b:'',p132c:'',p132d:'',p132e:'',p132f:'',p1330:'',
+ p1331:'',p1332:'',p1333:'',p1334:'',p1335:'',p1336:'',p1337:'',p1338:'',
+ p1339:'',p133a:'',p133b:'',p133c:'',p133d:'',p133e:'',p133f:'',p1340:'',
+ p1341:'',p1342:'',p1343:'',p1344:'',p1345:'',p1346:'',p1347:'',p1348:'',
+ p1349:'',p134a:'',p134b:'',p134c:'',p134d:'',p134e:'',p134f:'',p1350:'',
+ p1351:'',p1352:'',p1353:'',p1354:'',p1355:'',p1356:'',p1357:'',p1358:'',
+ p1359:'',p135a:'',p135b:'',p135c:'',p135d:'',p135e:'',p135f:'',p1360:'',
+ p1361:'',p1362:'',p1363:'',p1364:'',p1365:'',p1366:'',p1367:'',p1368:'',
+ p1369:'',p136a:'',p136b:'',p136c:'',p136d:'',p136e:'',p136f:'',p1370:'',
+ p1371:'',p1372:'',p1373:'',p1374:'',p1375:'',p1376:'',p1377:'',p1378:'',
+ p1379:'',p137a:'',p137b:'',p137c:'',p137d:'',p137e:'',p137f:'',p1380:'',
+ p1381:'',p1382:'',p1383:'',p1384:'',p1385:'',p1386:'',p1387:'',p1388:'',
+ p1389:'',p138a:'',p138b:'',p138c:'',p138d:'',p138e:'',p138f:'',p1390:'',
+ p1391:'',p1392:'',p1393:'',p1394:'',p1395:'',p1396:'',p1397:'',p1398:'',
+ p1399:'',p139a:'',p139b:'',p139c:'',p139d:'',p139e:'',p139f:'',p13a0:'',
+ p13a1:'',p13a2:'',p13a3:'',p13a4:'',p13a5:'',p13a6:'',p13a7:'',p13a8:'',
+ p13a9:'',p13aa:'',p13ab:'',p13ac:'',p13ad:'',p13ae:'',p13af:'',p13b0:'',
+ p13b1:'',p13b2:'',p13b3:'',p13b4:'',p13b5:'',p13b6:'',p13b7:'',p13b8:'',
+ p13b9:'',p13ba:'',p13bb:'',p13bc:'',p13bd:'',p13be:'',p13bf:'',p13c0:'',
+ p13c1:'',p13c2:'',p13c3:'',p13c4:'',p13c5:'',p13c6:'',p13c7:'',p13c8:'',
+ p13c9:'',p13ca:'',p13cb:'',p13cc:'',p13cd:'',p13ce:'',p13cf:'',p13d0:'',
+ p13d1:'',p13d2:'',p13d3:'',p13d4:'',p13d5:'',p13d6:'',p13d7:'',p13d8:'',
+ p13d9:'',p13da:'',p13db:'',p13dc:'',p13dd:'',p13de:'',p13df:'',p13e0:'',
+ p13e1:'',p13e2:'',p13e3:'',p13e4:'',p13e5:'',p13e6:'',p13e7:'',p13e8:'',
+ p13e9:'',p13ea:'',p13eb:'',p13ec:'',p13ed:'',p13ee:'',p13ef:'',p13f0:'',
+ p13f1:'',p13f2:'',p13f3:'',p13f4:'',p13f5:'',p13f6:'',p13f7:'',p13f8:'',
+ p13f9:'',p13fa:'',p13fb:'',p13fc:'',p13fd:'',p13fe:'',p13ff:'',p1400:'',
+ p1401:'',p1402:'',p1403:'',p1404:'',p1405:'',p1406:'',p1407:'',p1408:'',
+ p1409:'',p140a:'',p140b:'',p140c:'',p140d:'',p140e:'',p140f:'',p1410:'',
+ p1411:'',p1412:'',p1413:'',p1414:'',p1415:'',p1416:'',p1417:'',p1418:'',
+ p1419:'',p141a:'',p141b:'',p141c:'',p141d:'',p141e:'',p141f:'',p1420:'',
+ p1421:'',p1422:'',p1423:'',p1424:'',p1425:'',p1426:'',p1427:'',p1428:'',
+ p1429:'',p142a:'',p142b:'',p142c:'',p142d:'',p142e:'',p142f:'',p1430:'',
+ p1431:'',p1432:'',p1433:'',p1434:'',p1435:'',p1436:'',p1437:'',p1438:'',
+ p1439:'',p143a:'',p143b:'',p143c:'',p143d:'',p143e:'',p143f:'',p1440:'',
+ p1441:'',p1442:'',p1443:'',p1444:'',p1445:'',p1446:'',p1447:'',p1448:'',
+ p1449:'',p144a:'',p144b:'',p144c:'',p144d:'',p144e:'',p144f:'',p1450:'',
+ p1451:'',p1452:'',p1453:'',p1454:'',p1455:'',p1456:'',p1457:'',p1458:'',
+ p1459:'',p145a:'',p145b:'',p145c:'',p145d:'',p145e:'',p145f:'',p1460:'',
+ p1461:'',p1462:'',p1463:'',p1464:'',p1465:'',p1466:'',p1467:'',p1468:'',
+ p1469:'',p146a:'',p146b:'',p146c:'',p146d:'',p146e:'',p146f:'',p1470:'',
+ p1471:'',p1472:'',p1473:'',p1474:'',p1475:'',p1476:'',p1477:'',p1478:'',
+ p1479:'',p147a:'',p147b:'',p147c:'',p147d:'',p147e:'',p147f:'',p1480:'',
+ p1481:'',p1482:'',p1483:'',p1484:'',p1485:'',p1486:'',p1487:'',p1488:'',
+ p1489:'',p148a:'',p148b:'',p148c:'',p148d:'',p148e:'',p148f:'',p1490:'',
+ p1491:'',p1492:'',p1493:'',p1494:'',p1495:'',p1496:'',p1497:'',p1498:'',
+ p1499:'',p149a:'',p149b:'',p149c:'',p149d:'',p149e:'',p149f:'',p14a0:'',
+ p14a1:'',p14a2:'',p14a3:'',p14a4:'',p14a5:'',p14a6:'',p14a7:'',p14a8:'',
+ p14a9:'',p14aa:'',p14ab:'',p14ac:'',p14ad:'',p14ae:'',p14af:'',p14b0:'',
+ p14b1:'',p14b2:'',p14b3:'',p14b4:'',p14b5:'',p14b6:'',p14b7:'',p14b8:'',
+ p14b9:'',p14ba:'',p14bb:'',p14bc:'',p14bd:'',p14be:'',p14bf:'',p14c0:'',
+ p14c1:'',p14c2:'',p14c3:'',p14c4:'',p14c5:'',p14c6:'',p14c7:'',p14c8:'',
+ p14c9:'',p14ca:'',p14cb:'',p14cc:'',p14cd:'',p14ce:'',p14cf:'',p14d0:'',
+ p14d1:'',p14d2:'',p14d3:'',p14d4:'',p14d5:'',p14d6:'',p14d7:'',p14d8:'',
+ p14d9:'',p14da:'',p14db:'',p14dc:'',p14dd:'',p14de:'',p14df:'',p14e0:'',
+ p14e1:'',p14e2:'',p14e3:'',p14e4:'',p14e5:'',p14e6:'',p14e7:'',p14e8:'',
+ p14e9:'',p14ea:'',p14eb:'',p14ec:'',p14ed:'',p14ee:'',p14ef:'',p14f0:'',
+ p14f1:'',p14f2:'',p14f3:'',p14f4:'',p14f5:'',p14f6:'',p14f7:'',p14f8:'',
+ p14f9:'',p14fa:'',p14fb:'',p14fc:'',p14fd:'',p14fe:'',p14ff:'',p1500:'',
+ p1501:'',p1502:'',p1503:'',p1504:'',p1505:'',p1506:'',p1507:'',p1508:'',
+ p1509:'',p150a:'',p150b:'',p150c:'',p150d:'',p150e:'',p150f:'',p1510:'',
+ p1511:'',p1512:'',p1513:'',p1514:'',p1515:'',p1516:'',p1517:'',p1518:'',
+ p1519:'',p151a:'',p151b:'',p151c:'',p151d:'',p151e:'',p151f:'',p1520:'',
+ p1521:'',p1522:'',p1523:'',p1524:'',p1525:'',p1526:'',p1527:'',p1528:'',
+ p1529:'',p152a:'',p152b:'',p152c:'',p152d:'',p152e:'',p152f:'',p1530:'',
+ p1531:'',p1532:'',p1533:'',p1534:'',p1535:'',p1536:'',p1537:'',p1538:'',
+ p1539:'',p153a:'',p153b:'',p153c:'',p153d:'',p153e:'',p153f:'',p1540:'',
+ p1541:'',p1542:'',p1543:'',p1544:'',p1545:'',p1546:'',p1547:'',p1548:'',
+ p1549:'',p154a:'',p154b:'',p154c:'',p154d:'',p154e:'',p154f:'',p1550:'',
+ p1551:'',p1552:'',p1553:'',p1554:'',p1555:'',p1556:'',p1557:'',p1558:'',
+ p1559:'',p155a:'',p155b:'',p155c:'',p155d:'',p155e:'',p155f:'',p1560:'',
+ p1561:'',p1562:'',p1563:'',p1564:'',p1565:'',p1566:'',p1567:'',p1568:'',
+ p1569:'',p156a:'',p156b:'',p156c:'',p156d:'',p156e:'',p156f:'',p1570:'',
+ p1571:'',p1572:'',p1573:'',p1574:'',p1575:'',p1576:'',p1577:'',p1578:'',
+ p1579:'',p157a:'',p157b:'',p157c:'',p157d:'',p157e:'',p157f:'',p1580:'',
+ p1581:'',p1582:'',p1583:'',p1584:'',p1585:'',p1586:'',p1587:'',p1588:'',
+ p1589:'',p158a:'',p158b:'',p158c:'',p158d:'',p158e:'',p158f:'',p1590:'',
+ p1591:'',p1592:'',p1593:'',p1594:'',p1595:'',p1596:'',p1597:'',p1598:'',
+ p1599:'',p159a:'',p159b:'',p159c:'',p159d:'',p159e:'',p159f:'',p15a0:'',
+ p15a1:'',p15a2:'',p15a3:'',p15a4:'',p15a5:'',p15a6:'',p15a7:'',p15a8:'',
+ p15a9:'',p15aa:'',p15ab:'',p15ac:'',p15ad:'',p15ae:'',p15af:'',p15b0:'',
+ p15b1:'',p15b2:'',p15b3:'',p15b4:'',p15b5:'',p15b6:'',p15b7:'',p15b8:'',
+ p15b9:'',p15ba:'',p15bb:'',p15bc:'',p15bd:'',p15be:'',p15bf:'',p15c0:'',
+ p15c1:'',p15c2:'',p15c3:'',p15c4:'',p15c5:'',p15c6:'',p15c7:'',p15c8:'',
+ p15c9:'',p15ca:'',p15cb:'',p15cc:'',p15cd:'',p15ce:'',p15cf:'',p15d0:'',
+ p15d1:'',p15d2:'',p15d3:'',p15d4:'',p15d5:'',p15d6:'',p15d7:'',p15d8:'',
+ p15d9:'',p15da:'',p15db:'',p15dc:'',p15dd:'',p15de:'',p15df:'',p15e0:'',
+ p15e1:'',p15e2:'',p15e3:'',p15e4:'',p15e5:'',p15e6:'',p15e7:'',p15e8:'',
+ p15e9:'',p15ea:'',p15eb:'',p15ec:'',p15ed:'',p15ee:'',p15ef:'',p15f0:'',
+ p15f1:'',p15f2:'',p15f3:'',p15f4:'',p15f5:'',p15f6:'',p15f7:'',p15f8:'',
+ p15f9:'',p15fa:'',p15fb:'',p15fc:'',p15fd:'',p15fe:'',p15ff:'',p1600:'',
+ p1601:'',p1602:'',p1603:'',p1604:'',p1605:'',p1606:'',p1607:'',p1608:'',
+ p1609:'',p160a:'',p160b:'',p160c:'',p160d:'',p160e:'',p160f:'',p1610:'',
+ p1611:'',p1612:'',p1613:'',p1614:'',p1615:'',p1616:'',p1617:'',p1618:'',
+ p1619:'',p161a:'',p161b:'',p161c:'',p161d:'',p161e:'',p161f:'',p1620:'',
+ p1621:'',p1622:'',p1623:'',p1624:'',p1625:'',p1626:'',p1627:'',p1628:'',
+ p1629:'',p162a:'',p162b:'',p162c:'',p162d:'',p162e:'',p162f:'',p1630:'',
+ p1631:'',p1632:'',p1633:'',p1634:'',p1635:'',p1636:'',p1637:'',p1638:'',
+ p1639:'',p163a:'',p163b:'',p163c:'',p163d:'',p163e:'',p163f:'',p1640:'',
+ p1641:'',p1642:'',p1643:'',p1644:'',p1645:'',p1646:'',p1647:'',p1648:'',
+ p1649:'',p164a:'',p164b:'',p164c:'',p164d:'',p164e:'',p164f:'',p1650:'',
+ p1651:'',p1652:'',p1653:'',p1654:'',p1655:'',p1656:'',p1657:'',p1658:'',
+ p1659:'',p165a:'',p165b:'',p165c:'',p165d:'',p165e:'',p165f:'',p1660:'',
+ p1661:'',p1662:'',p1663:'',p1664:'',p1665:'',p1666:'',p1667:'',p1668:'',
+ p1669:'',p166a:'',p166b:'',p166c:'',p166d:'',p166e:'',p166f:'',p1670:'',
+ p1671:'',p1672:'',p1673:'',p1674:'',p1675:'',p1676:'',p1677:'',p1678:'',
+ p1679:'',p167a:'',p167b:'',p167c:'',p167d:'',p167e:'',p167f:'',p1680:'',
+ p1681:'',p1682:'',p1683:'',p1684:'',p1685:'',p1686:'',p1687:'',p1688:'',
+ p1689:'',p168a:'',p168b:'',p168c:'',p168d:'',p168e:'',p168f:'',p1690:'',
+ p1691:'',p1692:'',p1693:'',p1694:'',p1695:'',p1696:'',p1697:'',p1698:'',
+ p1699:'',p169a:'',p169b:'',p169c:'',p169d:'',p169e:'',p169f:'',p16a0:'',
+ p16a1:'',p16a2:'',p16a3:'',p16a4:'',p16a5:'',p16a6:'',p16a7:'',p16a8:'',
+ p16a9:'',p16aa:'',p16ab:'',p16ac:'',p16ad:'',p16ae:'',p16af:'',p16b0:'',
+ p16b1:'',p16b2:'',p16b3:'',p16b4:'',p16b5:'',p16b6:'',p16b7:'',p16b8:'',
+ p16b9:'',p16ba:'',p16bb:'',p16bc:'',p16bd:'',p16be:'',p16bf:'',p16c0:'',
+ p16c1:'',p16c2:'',p16c3:'',p16c4:'',p16c5:'',p16c6:'',p16c7:'',p16c8:'',
+ p16c9:'',p16ca:'',p16cb:'',p16cc:'',p16cd:'',p16ce:'',p16cf:'',p16d0:'',
+ p16d1:'',p16d2:'',p16d3:'',p16d4:'',p16d5:'',p16d6:'',p16d7:'',p16d8:'',
+ p16d9:'',p16da:'',p16db:'',p16dc:'',p16dd:'',p16de:'',p16df:'',p16e0:'',
+ p16e1:'',p16e2:'',p16e3:'',p16e4:'',p16e5:'',p16e6:'',p16e7:'',p16e8:'',
+ p16e9:'',p16ea:'',p16eb:'',p16ec:'',p16ed:'',p16ee:'',p16ef:'',p16f0:'',
+ p16f1:'',p16f2:'',p16f3:'',p16f4:'',p16f5:'',p16f6:'',p16f7:'',p16f8:'',
+ p16f9:'',p16fa:'',p16fb:'',p16fc:'',p16fd:'',p16fe:'',p16ff:'',p1700:'',
+ p1701:'',p1702:'',p1703:'',p1704:'',p1705:'',p1706:'',p1707:'',p1708:'',
+ p1709:'',p170a:'',p170b:'',p170c:'',p170d:'',p170e:'',p170f:'',p1710:'',
+ p1711:'',p1712:'',p1713:'',p1714:'',p1715:'',p1716:'',p1717:'',p1718:'',
+ p1719:'',p171a:'',p171b:'',p171c:'',p171d:'',p171e:'',p171f:'',p1720:'',
+ p1721:'',p1722:'',p1723:'',p1724:'',p1725:'',p1726:'',p1727:'',p1728:'',
+ p1729:'',p172a:'',p172b:'',p172c:'',p172d:'',p172e:'',p172f:'',p1730:'',
+ p1731:'',p1732:'',p1733:'',p1734:'',p1735:'',p1736:'',p1737:'',p1738:'',
+ p1739:'',p173a:'',p173b:'',p173c:'',p173d:'',p173e:'',p173f:'',p1740:'',
+ p1741:'',p1742:'',p1743:'',p1744:'',p1745:'',p1746:'',p1747:'',p1748:'',
+ p1749:'',p174a:'',p174b:'',p174c:'',p174d:'',p174e:'',p174f:'',p1750:'',
+ p1751:'',p1752:'',p1753:'',p1754:'',p1755:'',p1756:'',p1757:'',p1758:'',
+ p1759:'',p175a:'',p175b:'',p175c:'',p175d:'',p175e:'',p175f:'',p1760:'',
+ p1761:'',p1762:'',p1763:'',p1764:'',p1765:'',p1766:'',p1767:'',p1768:'',
+ p1769:'',p176a:'',p176b:'',p176c:'',p176d:'',p176e:'',p176f:'',p1770:'',
+ p1771:'',p1772:'',p1773:'',p1774:'',p1775:'',p1776:'',p1777:'',p1778:'',
+ p1779:'',p177a:'',p177b:'',p177c:'',p177d:'',p177e:'',p177f:'',p1780:'',
+ p1781:'',p1782:'',p1783:'',p1784:'',p1785:'',p1786:'',p1787:'',p1788:'',
+ p1789:'',p178a:'',p178b:'',p178c:'',p178d:'',p178e:'',p178f:'',p1790:'',
+ p1791:'',p1792:'',p1793:'',p1794:'',p1795:'',p1796:'',p1797:'',p1798:'',
+ p1799:'',p179a:'',p179b:'',p179c:'',p179d:'',p179e:'',p179f:'',p17a0:'',
+ p17a1:'',p17a2:'',p17a3:'',p17a4:'',p17a5:'',p17a6:'',p17a7:'',p17a8:'',
+ p17a9:'',p17aa:'',p17ab:'',p17ac:'',p17ad:'',p17ae:'',p17af:'',p17b0:'',
+ p17b1:'',p17b2:'',p17b3:'',p17b4:'',p17b5:'',p17b6:'',p17b7:'',p17b8:'',
+ p17b9:'',p17ba:'',p17bb:'',p17bc:'',p17bd:'',p17be:'',p17bf:'',p17c0:'',
+ p17c1:'',p17c2:'',p17c3:'',p17c4:'',p17c5:'',p17c6:'',p17c7:'',p17c8:'',
+ p17c9:'',p17ca:'',p17cb:'',p17cc:'',p17cd:'',p17ce:'',p17cf:'',p17d0:'',
+ p17d1:'',p17d2:'',p17d3:'',p17d4:'',p17d5:'',p17d6:'',p17d7:'',p17d8:'',
+ p17d9:'',p17da:'',p17db:'',p17dc:'',p17dd:'',p17de:'',p17df:'',p17e0:'',
+ p17e1:'',p17e2:'',p17e3:'',p17e4:'',p17e5:'',p17e6:'',p17e7:'',p17e8:'',
+ p17e9:'',p17ea:'',p17eb:'',p17ec:'',p17ed:'',p17ee:'',p17ef:'',p17f0:'',
+ p17f1:'',p17f2:'',p17f3:'',p17f4:'',p17f5:'',p17f6:'',p17f7:'',p17f8:'',
+ p17f9:'',p17fa:'',p17fb:'',p17fc:'',p17fd:'',p17fe:'',p17ff:'',p1800:'',
+ p1801:'',p1802:'',p1803:'',p1804:'',p1805:'',p1806:'',p1807:'',p1808:'',
+ p1809:'',p180a:'',p180b:'',p180c:'',p180d:'',p180e:'',p180f:'',p1810:'',
+ p1811:'',p1812:'',p1813:'',p1814:'',p1815:'',p1816:'',p1817:'',p1818:'',
+ p1819:'',p181a:'',p181b:'',p181c:'',p181d:'',p181e:'',p181f:'',p1820:'',
+ p1821:'',p1822:'',p1823:'',p1824:'',p1825:'',p1826:'',p1827:'',p1828:'',
+ p1829:'',p182a:'',p182b:'',p182c:'',p182d:'',p182e:'',p182f:'',p1830:'',
+ p1831:'',p1832:'',p1833:'',p1834:'',p1835:'',p1836:'',p1837:'',p1838:'',
+ p1839:'',p183a:'',p183b:'',p183c:'',p183d:'',p183e:'',p183f:'',p1840:'',
+ p1841:'',p1842:'',p1843:'',p1844:'',p1845:'',p1846:'',p1847:'',p1848:'',
+ p1849:'',p184a:'',p184b:'',p184c:'',p184d:'',p184e:'',p184f:'',p1850:'',
+ p1851:'',p1852:'',p1853:'',p1854:'',p1855:'',p1856:'',p1857:'',p1858:'',
+ p1859:'',p185a:'',p185b:'',p185c:'',p185d:'',p185e:'',p185f:'',p1860:'',
+ p1861:'',p1862:'',p1863:'',p1864:'',p1865:'',p1866:'',p1867:'',p1868:'',
+ p1869:'',p186a:'',p186b:'',p186c:'',p186d:'',p186e:'',p186f:'',p1870:'',
+ p1871:'',p1872:'',p1873:'',p1874:'',p1875:'',p1876:'',p1877:'',p1878:'',
+ p1879:'',p187a:'',p187b:'',p187c:'',p187d:'',p187e:'',p187f:'',p1880:'',
+ p1881:'',p1882:'',p1883:'',p1884:'',p1885:'',p1886:'',p1887:'',p1888:'',
+ p1889:'',p188a:'',p188b:'',p188c:'',p188d:'',p188e:'',p188f:'',p1890:'',
+ p1891:'',p1892:'',p1893:'',p1894:'',p1895:'',p1896:'',p1897:'',p1898:'',
+ p1899:'',p189a:'',p189b:'',p189c:'',p189d:'',p189e:'',p189f:'',p18a0:'',
+ p18a1:'',p18a2:'',p18a3:'',p18a4:'',p18a5:'',p18a6:'',p18a7:'',p18a8:'',
+ p18a9:'',p18aa:'',p18ab:'',p18ac:'',p18ad:'',p18ae:'',p18af:'',p18b0:'',
+ p18b1:'',p18b2:'',p18b3:'',p18b4:'',p18b5:'',p18b6:'',p18b7:'',p18b8:'',
+ p18b9:'',p18ba:'',p18bb:'',p18bc:'',p18bd:'',p18be:'',p18bf:'',p18c0:'',
+ p18c1:'',p18c2:'',p18c3:'',p18c4:'',p18c5:'',p18c6:'',p18c7:'',p18c8:'',
+ p18c9:'',p18ca:'',p18cb:'',p18cc:'',p18cd:'',p18ce:'',p18cf:'',p18d0:'',
+ p18d1:'',p18d2:'',p18d3:'',p18d4:'',p18d5:'',p18d6:'',p18d7:'',p18d8:'',
+ p18d9:'',p18da:'',p18db:'',p18dc:'',p18dd:'',p18de:'',p18df:'',p18e0:'',
+ p18e1:'',p18e2:'',p18e3:'',p18e4:'',p18e5:'',p18e6:'',p18e7:'',p18e8:'',
+ p18e9:'',p18ea:'',p18eb:'',p18ec:'',p18ed:'',p18ee:'',p18ef:'',p18f0:'',
+ p18f1:'',p18f2:'',p18f3:'',p18f4:'',p18f5:'',p18f6:'',p18f7:'',p18f8:'',
+ p18f9:'',p18fa:'',p18fb:'',p18fc:'',p18fd:'',p18fe:'',p18ff:'',p1900:'',
+ p1901:'',p1902:'',p1903:'',p1904:'',p1905:'',p1906:'',p1907:'',p1908:'',
+ p1909:'',p190a:'',p190b:'',p190c:'',p190d:'',p190e:'',p190f:'',p1910:'',
+ p1911:'',p1912:'',p1913:'',p1914:'',p1915:'',p1916:'',p1917:'',p1918:'',
+ p1919:'',p191a:'',p191b:'',p191c:'',p191d:'',p191e:'',p191f:'',p1920:'',
+ p1921:'',p1922:'',p1923:'',p1924:'',p1925:'',p1926:'',p1927:'',p1928:'',
+ p1929:'',p192a:'',p192b:'',p192c:'',p192d:'',p192e:'',p192f:'',p1930:'',
+ p1931:'',p1932:'',p1933:'',p1934:'',p1935:'',p1936:'',p1937:'',p1938:'',
+ p1939:'',p193a:'',p193b:'',p193c:'',p193d:'',p193e:'',p193f:'',p1940:'',
+ p1941:'',p1942:'',p1943:'',p1944:'',p1945:'',p1946:'',p1947:'',p1948:'',
+ p1949:'',p194a:'',p194b:'',p194c:'',p194d:'',p194e:'',p194f:'',p1950:'',
+ p1951:'',p1952:'',p1953:'',p1954:'',p1955:'',p1956:'',p1957:'',p1958:'',
+ p1959:'',p195a:'',p195b:'',p195c:'',p195d:'',p195e:'',p195f:'',p1960:'',
+ p1961:'',p1962:'',p1963:'',p1964:'',p1965:'',p1966:'',p1967:'',p1968:'',
+ p1969:'',p196a:'',p196b:'',p196c:'',p196d:'',p196e:'',p196f:'',p1970:'',
+ p1971:'',p1972:'',p1973:'',p1974:'',p1975:'',p1976:'',p1977:'',p1978:'',
+ p1979:'',p197a:'',p197b:'',p197c:'',p197d:'',p197e:'',p197f:'',p1980:'',
+ p1981:'',p1982:'',p1983:'',p1984:'',p1985:'',p1986:'',p1987:'',p1988:'',
+ p1989:'',p198a:'',p198b:'',p198c:'',p198d:'',p198e:'',p198f:'',p1990:'',
+ p1991:'',p1992:'',p1993:'',p1994:'',p1995:'',p1996:'',p1997:'',p1998:'',
+ p1999:'',p199a:'',p199b:'',p199c:'',p199d:'',p199e:'',p199f:'',p19a0:'',
+ p19a1:'',p19a2:'',p19a3:'',p19a4:'',p19a5:'',p19a6:'',p19a7:'',p19a8:'',
+ p19a9:'',p19aa:'',p19ab:'',p19ac:'',p19ad:'',p19ae:'',p19af:'',p19b0:'',
+ p19b1:'',p19b2:'',p19b3:'',p19b4:'',p19b5:'',p19b6:'',p19b7:'',p19b8:'',
+ p19b9:'',p19ba:'',p19bb:'',p19bc:'',p19bd:'',p19be:'',p19bf:'',p19c0:'',
+ p19c1:'',p19c2:'',p19c3:'',p19c4:'',p19c5:'',p19c6:'',p19c7:'',p19c8:'',
+ p19c9:'',p19ca:'',p19cb:'',p19cc:'',p19cd:'',p19ce:'',p19cf:'',p19d0:'',
+ p19d1:'',p19d2:'',p19d3:'',p19d4:'',p19d5:'',p19d6:'',p19d7:'',p19d8:'',
+ p19d9:'',p19da:'',p19db:'',p19dc:'',p19dd:'',p19de:'',p19df:'',p19e0:'',
+ p19e1:'',p19e2:'',p19e3:'',p19e4:'',p19e5:'',p19e6:'',p19e7:'',p19e8:'',
+ p19e9:'',p19ea:'',p19eb:'',p19ec:'',p19ed:'',p19ee:'',p19ef:'',p19f0:'',
+ p19f1:'',p19f2:'',p19f3:'',p19f4:'',p19f5:'',p19f6:'',p19f7:'',p19f8:'',
+ p19f9:'',p19fa:'',p19fb:'',p19fc:'',p19fd:'',p19fe:'',p19ff:'',p1a00:'',
+ p1a01:'',p1a02:'',p1a03:'',p1a04:'',p1a05:'',p1a06:'',p1a07:'',p1a08:'',
+ p1a09:'',p1a0a:'',p1a0b:'',p1a0c:'',p1a0d:'',p1a0e:'',p1a0f:'',p1a10:'',
+ p1a11:'',p1a12:'',p1a13:'',p1a14:'',p1a15:'',p1a16:'',p1a17:'',p1a18:'',
+ p1a19:'',p1a1a:'',p1a1b:'',p1a1c:'',p1a1d:'',p1a1e:'',p1a1f:'',p1a20:'',
+ p1a21:'',p1a22:'',p1a23:'',p1a24:'',p1a25:'',p1a26:'',p1a27:'',p1a28:'',
+ p1a29:'',p1a2a:'',p1a2b:'',p1a2c:'',p1a2d:'',p1a2e:'',p1a2f:'',p1a30:'',
+ p1a31:'',p1a32:'',p1a33:'',p1a34:'',p1a35:'',p1a36:'',p1a37:'',p1a38:'',
+ p1a39:'',p1a3a:'',p1a3b:'',p1a3c:'',p1a3d:'',p1a3e:'',p1a3f:'',p1a40:'',
+ p1a41:'',p1a42:'',p1a43:'',p1a44:'',p1a45:'',p1a46:'',p1a47:'',p1a48:'',
+ p1a49:'',p1a4a:'',p1a4b:'',p1a4c:'',p1a4d:'',p1a4e:'',p1a4f:'',p1a50:'',
+ p1a51:'',p1a52:'',p1a53:'',p1a54:'',p1a55:'',p1a56:'',p1a57:'',p1a58:'',
+ p1a59:'',p1a5a:'',p1a5b:'',p1a5c:'',p1a5d:'',p1a5e:'',p1a5f:'',p1a60:'',
+ p1a61:'',p1a62:'',p1a63:'',p1a64:'',p1a65:'',p1a66:'',p1a67:'',p1a68:'',
+ p1a69:'',p1a6a:'',p1a6b:'',p1a6c:'',p1a6d:'',p1a6e:'',p1a6f:'',p1a70:'',
+ p1a71:'',p1a72:'',p1a73:'',p1a74:'',p1a75:'',p1a76:'',p1a77:'',p1a78:'',
+ p1a79:'',p1a7a:'',p1a7b:'',p1a7c:'',p1a7d:'',p1a7e:'',p1a7f:'',p1a80:'',
+ p1a81:'',p1a82:'',p1a83:'',p1a84:'',p1a85:'',p1a86:'',p1a87:'',p1a88:'',
+ p1a89:'',p1a8a:'',p1a8b:'',p1a8c:'',p1a8d:'',p1a8e:'',p1a8f:'',p1a90:'',
+ p1a91:'',p1a92:'',p1a93:'',p1a94:'',p1a95:'',p1a96:'',p1a97:'',p1a98:'',
+ p1a99:'',p1a9a:'',p1a9b:'',p1a9c:'',p1a9d:'',p1a9e:'',p1a9f:'',p1aa0:'',
+ p1aa1:'',p1aa2:'',p1aa3:'',p1aa4:'',p1aa5:'',p1aa6:'',p1aa7:'',p1aa8:'',
+ p1aa9:'',p1aaa:'',p1aab:'',p1aac:'',p1aad:'',p1aae:'',p1aaf:'',p1ab0:'',
+ p1ab1:'',p1ab2:'',p1ab3:'',p1ab4:'',p1ab5:'',p1ab6:'',p1ab7:'',p1ab8:'',
+ p1ab9:'',p1aba:'',p1abb:'',p1abc:'',p1abd:'',p1abe:'',p1abf:'',p1ac0:'',
+ p1ac1:'',p1ac2:'',p1ac3:'',p1ac4:'',p1ac5:'',p1ac6:'',p1ac7:'',p1ac8:'',
+ p1ac9:'',p1aca:'',p1acb:'',p1acc:'',p1acd:'',p1ace:'',p1acf:'',p1ad0:'',
+ p1ad1:'',p1ad2:'',p1ad3:'',p1ad4:'',p1ad5:'',p1ad6:'',p1ad7:'',p1ad8:'',
+ p1ad9:'',p1ada:'',p1adb:'',p1adc:'',p1add:'',p1ade:'',p1adf:'',p1ae0:'',
+ p1ae1:'',p1ae2:'',p1ae3:'',p1ae4:'',p1ae5:'',p1ae6:'',p1ae7:'',p1ae8:'',
+ p1ae9:'',p1aea:'',p1aeb:'',p1aec:'',p1aed:'',p1aee:'',p1aef:'',p1af0:'',
+ p1af1:'',p1af2:'',p1af3:'',p1af4:'',p1af5:'',p1af6:'',p1af7:'',p1af8:'',
+ p1af9:'',p1afa:'',p1afb:'',p1afc:'',p1afd:'',p1afe:'',p1aff:'',p1b00:'',
+ p1b01:'',p1b02:'',p1b03:'',p1b04:'',p1b05:'',p1b06:'',p1b07:'',p1b08:'',
+ p1b09:'',p1b0a:'',p1b0b:'',p1b0c:'',p1b0d:'',p1b0e:'',p1b0f:'',p1b10:'',
+ p1b11:'',p1b12:'',p1b13:'',p1b14:'',p1b15:'',p1b16:'',p1b17:'',p1b18:'',
+ p1b19:'',p1b1a:'',p1b1b:'',p1b1c:'',p1b1d:'',p1b1e:'',p1b1f:'',p1b20:'',
+ p1b21:'',p1b22:'',p1b23:'',p1b24:'',p1b25:'',p1b26:'',p1b27:'',p1b28:'',
+ p1b29:'',p1b2a:'',p1b2b:'',p1b2c:'',p1b2d:'',p1b2e:'',p1b2f:'',p1b30:'',
+ p1b31:'',p1b32:'',p1b33:'',p1b34:'',p1b35:'',p1b36:'',p1b37:'',p1b38:'',
+ p1b39:'',p1b3a:'',p1b3b:'',p1b3c:'',p1b3d:'',p1b3e:'',p1b3f:'',p1b40:'',
+ p1b41:'',p1b42:'',p1b43:'',p1b44:'',p1b45:'',p1b46:'',p1b47:'',p1b48:'',
+ p1b49:'',p1b4a:'',p1b4b:'',p1b4c:'',p1b4d:'',p1b4e:'',p1b4f:'',p1b50:'',
+ p1b51:'',p1b52:'',p1b53:'',p1b54:'',p1b55:'',p1b56:'',p1b57:'',p1b58:'',
+ p1b59:'',p1b5a:'',p1b5b:'',p1b5c:'',p1b5d:'',p1b5e:'',p1b5f:'',p1b60:'',
+ p1b61:'',p1b62:'',p1b63:'',p1b64:'',p1b65:'',p1b66:'',p1b67:'',p1b68:'',
+ p1b69:'',p1b6a:'',p1b6b:'',p1b6c:'',p1b6d:'',p1b6e:'',p1b6f:'',p1b70:'',
+ p1b71:'',p1b72:'',p1b73:'',p1b74:'',p1b75:'',p1b76:'',p1b77:'',p1b78:'',
+ p1b79:'',p1b7a:'',p1b7b:'',p1b7c:'',p1b7d:'',p1b7e:'',p1b7f:'',p1b80:'',
+ p1b81:'',p1b82:'',p1b83:'',p1b84:'',p1b85:'',p1b86:'',p1b87:'',p1b88:'',
+ p1b89:'',p1b8a:'',p1b8b:'',p1b8c:'',p1b8d:'',p1b8e:'',p1b8f:'',p1b90:'',
+ p1b91:'',p1b92:'',p1b93:'',p1b94:'',p1b95:'',p1b96:'',p1b97:'',p1b98:'',
+ p1b99:'',p1b9a:'',p1b9b:'',p1b9c:'',p1b9d:'',p1b9e:'',p1b9f:'',p1ba0:'',
+ p1ba1:'',p1ba2:'',p1ba3:'',p1ba4:'',p1ba5:'',p1ba6:'',p1ba7:'',p1ba8:'',
+ p1ba9:'',p1baa:'',p1bab:'',p1bac:'',p1bad:'',p1bae:'',p1baf:'',p1bb0:'',
+ p1bb1:'',p1bb2:'',p1bb3:'',p1bb4:'',p1bb5:'',p1bb6:'',p1bb7:'',p1bb8:'',
+ p1bb9:'',p1bba:'',p1bbb:'',p1bbc:'',p1bbd:'',p1bbe:'',p1bbf:'',p1bc0:'',
+ p1bc1:'',p1bc2:'',p1bc3:'',p1bc4:'',p1bc5:'',p1bc6:'',p1bc7:'',p1bc8:'',
+ p1bc9:'',p1bca:'',p1bcb:'',p1bcc:'',p1bcd:'',p1bce:'',p1bcf:'',p1bd0:'',
+ p1bd1:'',p1bd2:'',p1bd3:'',p1bd4:'',p1bd5:'',p1bd6:'',p1bd7:'',p1bd8:'',
+ p1bd9:'',p1bda:'',p1bdb:'',p1bdc:'',p1bdd:'',p1bde:'',p1bdf:'',p1be0:'',
+ p1be1:'',p1be2:'',p1be3:'',p1be4:'',p1be5:'',p1be6:'',p1be7:'',p1be8:'',
+ p1be9:'',p1bea:'',p1beb:'',p1bec:'',p1bed:'',p1bee:'',p1bef:'',p1bf0:'',
+ p1bf1:'',p1bf2:'',p1bf3:'',p1bf4:'',p1bf5:'',p1bf6:'',p1bf7:'',p1bf8:'',
+ p1bf9:'',p1bfa:'',p1bfb:'',p1bfc:'',p1bfd:'',p1bfe:'',p1bff:'',p1c00:'',
+ p1c01:'',p1c02:'',p1c03:'',p1c04:'',p1c05:'',p1c06:'',p1c07:'',p1c08:'',
+ p1c09:'',p1c0a:'',p1c0b:'',p1c0c:'',p1c0d:'',p1c0e:'',p1c0f:'',p1c10:'',
+ p1c11:'',p1c12:'',p1c13:'',p1c14:'',p1c15:'',p1c16:'',p1c17:'',p1c18:'',
+ p1c19:'',p1c1a:'',p1c1b:'',p1c1c:'',p1c1d:'',p1c1e:'',p1c1f:'',p1c20:'',
+ p1c21:'',p1c22:'',p1c23:'',p1c24:'',p1c25:'',p1c26:'',p1c27:'',p1c28:'',
+ p1c29:'',p1c2a:'',p1c2b:'',p1c2c:'',p1c2d:'',p1c2e:'',p1c2f:'',p1c30:'',
+ p1c31:'',p1c32:'',p1c33:'',p1c34:'',p1c35:'',p1c36:'',p1c37:'',p1c38:'',
+ p1c39:'',p1c3a:'',p1c3b:'',p1c3c:'',p1c3d:'',p1c3e:'',p1c3f:'',p1c40:'',
+ p1c41:'',p1c42:'',p1c43:'',p1c44:'',p1c45:'',p1c46:'',p1c47:'',p1c48:'',
+ p1c49:'',p1c4a:'',p1c4b:'',p1c4c:'',p1c4d:'',p1c4e:'',p1c4f:'',p1c50:'',
+ p1c51:'',p1c52:'',p1c53:'',p1c54:'',p1c55:'',p1c56:'',p1c57:'',p1c58:'',
+ p1c59:'',p1c5a:'',p1c5b:'',p1c5c:'',p1c5d:'',p1c5e:'',p1c5f:'',p1c60:'',
+ p1c61:'',p1c62:'',p1c63:'',p1c64:'',p1c65:'',p1c66:'',p1c67:'',p1c68:'',
+ p1c69:'',p1c6a:'',p1c6b:'',p1c6c:'',p1c6d:'',p1c6e:'',p1c6f:'',p1c70:'',
+ p1c71:'',p1c72:'',p1c73:'',p1c74:'',p1c75:'',p1c76:'',p1c77:'',p1c78:'',
+ p1c79:'',p1c7a:'',p1c7b:'',p1c7c:'',p1c7d:'',p1c7e:'',p1c7f:'',p1c80:'',
+ p1c81:'',p1c82:'',p1c83:'',p1c84:'',p1c85:'',p1c86:'',p1c87:'',p1c88:'',
+ p1c89:'',p1c8a:'',p1c8b:'',p1c8c:'',p1c8d:'',p1c8e:'',p1c8f:'',p1c90:'',
+ p1c91:'',p1c92:'',p1c93:'',p1c94:'',p1c95:'',p1c96:'',p1c97:'',p1c98:'',
+ p1c99:'',p1c9a:'',p1c9b:'',p1c9c:'',p1c9d:'',p1c9e:'',p1c9f:'',p1ca0:'',
+ p1ca1:'',p1ca2:'',p1ca3:'',p1ca4:'',p1ca5:'',p1ca6:'',p1ca7:'',p1ca8:'',
+ p1ca9:'',p1caa:'',p1cab:'',p1cac:'',p1cad:'',p1cae:'',p1caf:'',p1cb0:'',
+ p1cb1:'',p1cb2:'',p1cb3:'',p1cb4:'',p1cb5:'',p1cb6:'',p1cb7:'',p1cb8:'',
+ p1cb9:'',p1cba:'',p1cbb:'',p1cbc:'',p1cbd:'',p1cbe:'',p1cbf:'',p1cc0:'',
+ p1cc1:'',p1cc2:'',p1cc3:'',p1cc4:'',p1cc5:'',p1cc6:'',p1cc7:'',p1cc8:'',
+ p1cc9:'',p1cca:'',p1ccb:'',p1ccc:'',p1ccd:'',p1cce:'',p1ccf:'',p1cd0:'',
+ p1cd1:'',p1cd2:'',p1cd3:'',p1cd4:'',p1cd5:'',p1cd6:'',p1cd7:'',p1cd8:'',
+ p1cd9:'',p1cda:'',p1cdb:'',p1cdc:'',p1cdd:'',p1cde:'',p1cdf:'',p1ce0:'',
+ p1ce1:'',p1ce2:'',p1ce3:'',p1ce4:'',p1ce5:'',p1ce6:'',p1ce7:'',p1ce8:'',
+ p1ce9:'',p1cea:'',p1ceb:'',p1cec:'',p1ced:'',p1cee:'',p1cef:'',p1cf0:'',
+ p1cf1:'',p1cf2:'',p1cf3:'',p1cf4:'',p1cf5:'',p1cf6:'',p1cf7:'',p1cf8:'',
+ p1cf9:'',p1cfa:'',p1cfb:'',p1cfc:'',p1cfd:'',p1cfe:'',p1cff:'',p1d00:'',
+ p1d01:'',p1d02:'',p1d03:'',p1d04:'',p1d05:'',p1d06:'',p1d07:'',p1d08:'',
+ p1d09:'',p1d0a:'',p1d0b:'',p1d0c:'',p1d0d:'',p1d0e:'',p1d0f:'',p1d10:'',
+ p1d11:'',p1d12:'',p1d13:'',p1d14:'',p1d15:'',p1d16:'',p1d17:'',p1d18:'',
+ p1d19:'',p1d1a:'',p1d1b:'',p1d1c:'',p1d1d:'',p1d1e:'',p1d1f:'',p1d20:'',
+ p1d21:'',p1d22:'',p1d23:'',p1d24:'',p1d25:'',p1d26:'',p1d27:'',p1d28:'',
+ p1d29:'',p1d2a:'',p1d2b:'',p1d2c:'',p1d2d:'',p1d2e:'',p1d2f:'',p1d30:'',
+ p1d31:'',p1d32:'',p1d33:'',p1d34:'',p1d35:'',p1d36:'',p1d37:'',p1d38:'',
+ p1d39:'',p1d3a:'',p1d3b:'',p1d3c:'',p1d3d:'',p1d3e:'',p1d3f:'',p1d40:'',
+ p1d41:'',p1d42:'',p1d43:'',p1d44:'',p1d45:'',p1d46:'',p1d47:'',p1d48:'',
+ p1d49:'',p1d4a:'',p1d4b:'',p1d4c:'',p1d4d:'',p1d4e:'',p1d4f:'',p1d50:'',
+ p1d51:'',p1d52:'',p1d53:'',p1d54:'',p1d55:'',p1d56:'',p1d57:'',p1d58:'',
+ p1d59:'',p1d5a:'',p1d5b:'',p1d5c:'',p1d5d:'',p1d5e:'',p1d5f:'',p1d60:'',
+ p1d61:'',p1d62:'',p1d63:'',p1d64:'',p1d65:'',p1d66:'',p1d67:'',p1d68:'',
+ p1d69:'',p1d6a:'',p1d6b:'',p1d6c:'',p1d6d:'',p1d6e:'',p1d6f:'',p1d70:'',
+ p1d71:'',p1d72:'',p1d73:'',p1d74:'',p1d75:'',p1d76:'',p1d77:'',p1d78:'',
+ p1d79:'',p1d7a:'',p1d7b:'',p1d7c:'',p1d7d:'',p1d7e:'',p1d7f:'',p1d80:'',
+ p1d81:'',p1d82:'',p1d83:'',p1d84:'',p1d85:'',p1d86:'',p1d87:'',p1d88:'',
+ p1d89:'',p1d8a:'',p1d8b:'',p1d8c:'',p1d8d:'',p1d8e:'',p1d8f:'',p1d90:'',
+ p1d91:'',p1d92:'',p1d93:'',p1d94:'',p1d95:'',p1d96:'',p1d97:'',p1d98:'',
+ p1d99:'',p1d9a:'',p1d9b:'',p1d9c:'',p1d9d:'',p1d9e:'',p1d9f:'',p1da0:'',
+ p1da1:'',p1da2:'',p1da3:'',p1da4:'',p1da5:'',p1da6:'',p1da7:'',p1da8:'',
+ p1da9:'',p1daa:'',p1dab:'',p1dac:'',p1dad:'',p1dae:'',p1daf:'',p1db0:'',
+ p1db1:'',p1db2:'',p1db3:'',p1db4:'',p1db5:'',p1db6:'',p1db7:'',p1db8:'',
+ p1db9:'',p1dba:'',p1dbb:'',p1dbc:'',p1dbd:'',p1dbe:'',p1dbf:'',p1dc0:'',
+ p1dc1:'',p1dc2:'',p1dc3:'',p1dc4:'',p1dc5:'',p1dc6:'',p1dc7:'',p1dc8:'',
+ p1dc9:'',p1dca:'',p1dcb:'',p1dcc:'',p1dcd:'',p1dce:'',p1dcf:'',p1dd0:'',
+ p1dd1:'',p1dd2:'',p1dd3:'',p1dd4:'',p1dd5:'',p1dd6:'',p1dd7:'',p1dd8:'',
+ p1dd9:'',p1dda:'',p1ddb:'',p1ddc:'',p1ddd:'',p1dde:'',p1ddf:'',p1de0:'',
+ p1de1:'',p1de2:'',p1de3:'',p1de4:'',p1de5:'',p1de6:'',p1de7:'',p1de8:'',
+ p1de9:'',p1dea:'',p1deb:'',p1dec:'',p1ded:'',p1dee:'',p1def:'',p1df0:'',
+ p1df1:'',p1df2:'',p1df3:'',p1df4:'',p1df5:'',p1df6:'',p1df7:'',p1df8:'',
+ p1df9:'',p1dfa:'',p1dfb:'',p1dfc:'',p1dfd:'',p1dfe:'',p1dff:'',p1e00:'',
+ p1e01:'',p1e02:'',p1e03:'',p1e04:'',p1e05:'',p1e06:'',p1e07:'',p1e08:'',
+ p1e09:'',p1e0a:'',p1e0b:'',p1e0c:'',p1e0d:'',p1e0e:'',p1e0f:'',p1e10:'',
+ p1e11:'',p1e12:'',p1e13:'',p1e14:'',p1e15:'',p1e16:'',p1e17:'',p1e18:'',
+ p1e19:'',p1e1a:'',p1e1b:'',p1e1c:'',p1e1d:'',p1e1e:'',p1e1f:'',p1e20:'',
+ p1e21:'',p1e22:'',p1e23:'',p1e24:'',p1e25:'',p1e26:'',p1e27:'',p1e28:'',
+ p1e29:'',p1e2a:'',p1e2b:'',p1e2c:'',p1e2d:'',p1e2e:'',p1e2f:'',p1e30:'',
+ p1e31:'',p1e32:'',p1e33:'',p1e34:'',p1e35:'',p1e36:'',p1e37:'',p1e38:'',
+ p1e39:'',p1e3a:'',p1e3b:'',p1e3c:'',p1e3d:'',p1e3e:'',p1e3f:'',p1e40:'',
+ p1e41:'',p1e42:'',p1e43:'',p1e44:'',p1e45:'',p1e46:'',p1e47:'',p1e48:'',
+ p1e49:'',p1e4a:'',p1e4b:'',p1e4c:'',p1e4d:'',p1e4e:'',p1e4f:'',p1e50:'',
+ p1e51:'',p1e52:'',p1e53:'',p1e54:'',p1e55:'',p1e56:'',p1e57:'',p1e58:'',
+ p1e59:'',p1e5a:'',p1e5b:'',p1e5c:'',p1e5d:'',p1e5e:'',p1e5f:'',p1e60:'',
+ p1e61:'',p1e62:'',p1e63:'',p1e64:'',p1e65:'',p1e66:'',p1e67:'',p1e68:'',
+ p1e69:'',p1e6a:'',p1e6b:'',p1e6c:'',p1e6d:'',p1e6e:'',p1e6f:'',p1e70:'',
+ p1e71:'',p1e72:'',p1e73:'',p1e74:'',p1e75:'',p1e76:'',p1e77:'',p1e78:'',
+ p1e79:'',p1e7a:'',p1e7b:'',p1e7c:'',p1e7d:'',p1e7e:'',p1e7f:'',p1e80:'',
+ p1e81:'',p1e82:'',p1e83:'',p1e84:'',p1e85:'',p1e86:'',p1e87:'',p1e88:'',
+ p1e89:'',p1e8a:'',p1e8b:'',p1e8c:'',p1e8d:'',p1e8e:'',p1e8f:'',p1e90:'',
+ p1e91:'',p1e92:'',p1e93:'',p1e94:'',p1e95:'',p1e96:'',p1e97:'',p1e98:'',
+ p1e99:'',p1e9a:'',p1e9b:'',p1e9c:'',p1e9d:'',p1e9e:'',p1e9f:'',p1ea0:'',
+ p1ea1:'',p1ea2:'',p1ea3:'',p1ea4:'',p1ea5:'',p1ea6:'',p1ea7:'',p1ea8:'',
+ p1ea9:'',p1eaa:'',p1eab:'',p1eac:'',p1ead:'',p1eae:'',p1eaf:'',p1eb0:'',
+ p1eb1:'',p1eb2:'',p1eb3:'',p1eb4:'',p1eb5:'',p1eb6:'',p1eb7:'',p1eb8:'',
+ p1eb9:'',p1eba:'',p1ebb:'',p1ebc:'',p1ebd:'',p1ebe:'',p1ebf:'',p1ec0:'',
+ p1ec1:'',p1ec2:'',p1ec3:'',p1ec4:'',p1ec5:'',p1ec6:'',p1ec7:'',p1ec8:'',
+ p1ec9:'',p1eca:'',p1ecb:'',p1ecc:'',p1ecd:'',p1ece:'',p1ecf:'',p1ed0:'',
+ p1ed1:'',p1ed2:'',p1ed3:'',p1ed4:'',p1ed5:'',p1ed6:'',p1ed7:'',p1ed8:'',
+ p1ed9:'',p1eda:'',p1edb:'',p1edc:'',p1edd:'',p1ede:'',p1edf:'',p1ee0:'',
+ p1ee1:'',p1ee2:'',p1ee3:'',p1ee4:'',p1ee5:'',p1ee6:'',p1ee7:'',p1ee8:'',
+ p1ee9:'',p1eea:'',p1eeb:'',p1eec:'',p1eed:'',p1eee:'',p1eef:'',p1ef0:'',
+ p1ef1:'',p1ef2:'',p1ef3:'',p1ef4:'',p1ef5:'',p1ef6:'',p1ef7:'',p1ef8:'',
+ p1ef9:'',p1efa:'',p1efb:'',p1efc:'',p1efd:'',p1efe:'',p1eff:'',p1f00:''
+ }
+ }
+ let object = createObject();
+ assertFalse(%HasFastProperties(object ));
+ assertEquals(Object.getPrototypeOf(object ), null);
+ let keys = Object.keys(object);
+ // modify original object
+ object['new_property'] = {};
+ object[1] = 12;
+
+ let object2 = createObject();
+ assertFalse(object === object2 );
+ assertFalse(%HasFastProperties(object2 ));
+ assertEquals(Object.getPrototypeOf(object2), null);
+ assertEquals(keys, Object.keys(object2));
+})();
+
(function TestPrototypeInObjectLiteral() {
// The prototype chain should not be used if the definition
@@ -282,22 +1500,3 @@ TestNumericNamesSetter(['1.2', '1.3'], {
delete Object.prototype.c;
})();
-
-(function TestProxyWithDefinitionInObjectLiteral() {
- // Trap for set should not be used if the definition
- // happens in the object literal.
- var handler = {
- set: function(target, name, value) {
- }
- };
-
- const prop = 'a';
-
- var p = new Proxy({}, handler);
- p[prop] = 'my value';
- assertEquals(undefined, p[prop]);
-
-
- var l = new Proxy({[prop]: 'my value'}, handler);
- assertEquals('my value', l[prop]);
-})();
diff --git a/deps/v8/test/mjsunit/object-seal.js b/deps/v8/test/mjsunit/object-seal.js
index a901b1f480..f685b41927 100644
--- a/deps/v8/test/mjsunit/object-seal.js
+++ b/deps/v8/test/mjsunit/object-seal.js
@@ -28,7 +28,7 @@
// Tests the Object.seal and Object.isSealed methods - ES 19.1.2.17 and
// ES 19.1.2.13
-// Flags: --allow-natives-syntax --crankshaft --noalways-opt
+// Flags: --allow-natives-syntax --opt --noalways-opt
// Test that we return obj if non-object is passed as argument
var non_objects = new Array(undefined, null, 1, -1, 0, 42.43, Symbol("test"));
diff --git a/deps/v8/test/mjsunit/osr-elements-kind.js b/deps/v8/test/mjsunit/osr-elements-kind.js
index aee7017134..3f27bf2295 100644
--- a/deps/v8/test/mjsunit/osr-elements-kind.js
+++ b/deps/v8/test/mjsunit/osr-elements-kind.js
@@ -116,7 +116,7 @@ function construct_doubles() {
return a;
}
-// Test transition chain SMI->DOUBLE->FAST (crankshafted function will
+// Test transition chain SMI->DOUBLE->FAST (optimized function will
// transition to FAST directly).
function convert_mixed(array, value, kind) {
array[1] = value;
diff --git a/deps/v8/test/mjsunit/parse-tasks.js b/deps/v8/test/mjsunit/parse-tasks.js
new file mode 100644
index 0000000000..11b48ebe0e
--- /dev/null
+++ b/deps/v8/test/mjsunit/parse-tasks.js
@@ -0,0 +1,55 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --compiler-dispatcher --use-parse-tasks --use-external-strings
+
+(function(a) {
+ assertEquals(a, "IIFE");
+})("IIFE");
+
+(function(a, ...rest) {
+ assertEquals(a, 1);
+ assertEquals(rest.length, 2);
+ assertEquals(rest[0], 2);
+ assertEquals(rest[1], 3);
+})(1,2,3);
+
+var outer_var = 42;
+
+function lazy_outer() {
+ return 42;
+}
+
+var eager_outer = (function() { return 42; });
+
+(function() {
+ assertEquals(outer_var, 42);
+ assertEquals(lazy_outer(), 42);
+ assertEquals(eager_outer(), 42);
+})();
+
+var gen = (function*() {
+ yield 1;
+ yield 2;
+})();
+
+assertEquals(gen.next().value, 1);
+assertEquals(gen.next().value, 2);
+
+var result = (function recursive(a=0) {
+ if (a == 1) {
+ return 42;
+ }
+ return recursive(1);
+})();
+
+assertEquals(result, 42);
+
+var a = 42;
+var b;
+var c = (a, b = (function z(){ return a+1; })());
+assertEquals(b, 43);
+assertEquals(c, 43);
+var c = (a, b = (function z(){ return a+1; })()) => { return b; };
+assertEquals(c(314), 315);
diff --git a/deps/v8/test/mjsunit/polymorph-arrays.js b/deps/v8/test/mjsunit/polymorph-arrays.js
index 6a05c9f013..7d3221a20c 100644
--- a/deps/v8/test/mjsunit/polymorph-arrays.js
+++ b/deps/v8/test/mjsunit/polymorph-arrays.js
@@ -83,7 +83,7 @@ function testPolymorphicLoads() {
load = make_polymorphic_load_function();
assertEquals(undefined, load(sparse_object_array, new Object()));
- // Try with crankshaft.
+ // Try with optimizing compiler.
load = make_polymorphic_load_function();
%OptimizeFunctionOnNextCall(load);
assertEquals(1, load(object_array, 1));
diff --git a/deps/v8/test/mjsunit/proto-elements-add-during-foreach.js b/deps/v8/test/mjsunit/proto-elements-add-during-foreach.js
index a99e8070d0..8ee4ebc37c 100644
--- a/deps/v8/test/mjsunit/proto-elements-add-during-foreach.js
+++ b/deps/v8/test/mjsunit/proto-elements-add-during-foreach.js
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --enable-fast-array-builtins
-
var a = [0,1,2,,,,7];
var proto = {}
a.__proto__ = proto;
diff --git a/deps/v8/test/mjsunit/regexp.js b/deps/v8/test/mjsunit/regexp.js
index 6fb5660c08..dd4832b567 100644
--- a/deps/v8/test/mjsunit/regexp.js
+++ b/deps/v8/test/mjsunit/regexp.js
@@ -803,3 +803,8 @@ assertTrue(/^[\444]*$/.test("\u{24}4"));
assertTrue(/^[\d-X]*$/.test("234-X-432")); // CharacterRangeOrUnion.
assertTrue(/^[\d-X-Z]*$/.test("234-XZ-432"));
assertFalse(/^[\d-X-Z]*$/.test("234-XYZ-432"));
+
+// Lone leading surrogates. Just here to exercise specific parsing code-paths.
+
+assertFalse(/\uDB88|\uDBEC|aa/.test(""));
+assertFalse(/\uDB88|\uDBEC|aa/u.test(""));
diff --git a/deps/v8/test/mjsunit/regress/regress-105.js b/deps/v8/test/mjsunit/regress/regress-105.js
index 8b8030ffec..877cb82317 100644
--- a/deps/v8/test/mjsunit/regress/regress-105.js
+++ b/deps/v8/test/mjsunit/regress/regress-105.js
@@ -26,12 +26,12 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
var custom_valueOf = function() {
- assertEquals(Number, custom_valueOf.caller);
+ assertEquals(null, custom_valueOf.caller);
return 2;
}
var custom_toString = function() {
- assertEquals(String, custom_toString.caller);
+ assertEquals(null, custom_toString.caller);
return "I used to be an adventurer like you";
}
diff --git a/deps/v8/test/mjsunit/regress/regress-1119.js b/deps/v8/test/mjsunit/regress/regress-1119.js
index 24ab49aa95..1163ca042e 100644
--- a/deps/v8/test/mjsunit/regress/regress-1119.js
+++ b/deps/v8/test/mjsunit/regress/regress-1119.js
@@ -28,8 +28,6 @@
// Test runtime declaration of properties with var which are intercepted
// by JS accessors.
-// Flags: --es52-globals
-
this.__defineSetter__("x", function() { hasBeenInvoked = true; });
this.__defineSetter__("y", function() { throw 'exception'; });
diff --git a/deps/v8/test/mjsunit/regress/regress-115452.js b/deps/v8/test/mjsunit/regress/regress-115452.js
index d95bba893c..f745e1bad3 100644
--- a/deps/v8/test/mjsunit/regress/regress-115452.js
+++ b/deps/v8/test/mjsunit/regress/regress-115452.js
@@ -27,8 +27,6 @@
// Test that a function declaration cannot overwrite a read-only property.
-// Flags: --es52-globals
-
function foobl() {}
assertTrue(typeof this.foobl == "function");
assertTrue(Object.getOwnPropertyDescriptor(this, "foobl").writable);
diff --git a/deps/v8/test/mjsunit/regress/regress-1240.js b/deps/v8/test/mjsunit/regress/regress-1240.js
index 1a0bf2edb6..57d72b0a5a 100644
--- a/deps/v8/test/mjsunit/regress/regress-1240.js
+++ b/deps/v8/test/mjsunit/regress/regress-1240.js
@@ -33,7 +33,9 @@ var a = {};
Object.defineProperty(a, 'b',
{ get: function () { return 42; }, configurable: false });
// Do not allow us to redefine b on a.
-a.__defineGetter__('b', function _b(){ return 'foo'; });
+try {
+ a.__defineGetter__('b', function _b(){ return 'foo'; });
+} catch (e) {}
assertEquals(42, a.b);
var desc = Object.getOwnPropertyDescriptor(a, 'b');
assertFalse(desc.configurable);
diff --git a/deps/v8/test/mjsunit/regress/regress-1493017.js b/deps/v8/test/mjsunit/regress/regress-1493017.js
index 99a1dad2e0..b46397c8a0 100644
--- a/deps/v8/test/mjsunit/regress/regress-1493017.js
+++ b/deps/v8/test/mjsunit/regress/regress-1493017.js
@@ -28,7 +28,7 @@
// Test collection of abandoned maps. Tests that deleted map
// transitions do not show up as properties in for in.
-// Flags: --expose-gc --collect-maps
+// Flags: --expose-gc
function C() {}
diff --git a/deps/v8/test/mjsunit/regress/regress-2132.js b/deps/v8/test/mjsunit/regress/regress-2132.js
index 51938c8027..c2f6c297b4 100644
--- a/deps/v8/test/mjsunit/regress/regress-2132.js
+++ b/deps/v8/test/mjsunit/regress/regress-2132.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --crankshaft --no-always-opt
+// Flags: --allow-natives-syntax --opt --no-always-opt
function mul(x, y) {
return (x * y) | 0;
diff --git a/deps/v8/test/mjsunit/regress/regress-2250.js b/deps/v8/test/mjsunit/regress/regress-2250.js
index 013771971e..e2ce546628 100644
--- a/deps/v8/test/mjsunit/regress/regress-2250.js
+++ b/deps/v8/test/mjsunit/regress/regress-2250.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
// The original problem from the bug: In the example below SMI check for b
// generated for inlining of equals invocation (marked with (*)) will be hoisted
diff --git a/deps/v8/test/mjsunit/regress/regress-2315.js b/deps/v8/test/mjsunit/regress/regress-2315.js
index 41211c42e9..9e40d0d3e3 100644
--- a/deps/v8/test/mjsunit/regress/regress-2315.js
+++ b/deps/v8/test/mjsunit/regress/regress-2315.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
var foo = (function() {
return eval("(function bar() { return 1; })");
diff --git a/deps/v8/test/mjsunit/regress/regress-2339.js b/deps/v8/test/mjsunit/regress/regress-2339.js
index 9db2f9c2bf..d7d2bb398a 100644
--- a/deps/v8/test/mjsunit/regress/regress-2339.js
+++ b/deps/v8/test/mjsunit/regress/regress-2339.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --expose-gc --crankshaft
+// Flags: --allow-natives-syntax --expose-gc --opt
function simple() {
return simple_two_args(0, undefined);
diff --git a/deps/v8/test/mjsunit/regress/regress-2451.js b/deps/v8/test/mjsunit/regress/regress-2451.js
index 1a486be8b1..08efda2325 100644
--- a/deps/v8/test/mjsunit/regress/regress-2451.js
+++ b/deps/v8/test/mjsunit/regress/regress-2451.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
function f() {
assertEquals(-1.0, Math.round(-1.5));
diff --git a/deps/v8/test/mjsunit/regress/regress-252797.js b/deps/v8/test/mjsunit/regress/regress-252797.js
index c3bb139965..08b22176af 100644
--- a/deps/v8/test/mjsunit/regress/regress-252797.js
+++ b/deps/v8/test/mjsunit/regress/regress-252797.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
// The type feedback oracle had a bug when retrieving the map from an IC
// starting with a negative lookup.
@@ -45,6 +45,7 @@ assertFalse(%HasFastProperties(holder));
// Create a receiver into dictionary mode.
var receiver = Object.create(holder, {
killMe: {value: 0, configurable: true},
+ keepMe: {value: 0, configurable: true}
});
delete receiver.killMe;
assertFalse(%HasFastProperties(receiver));
diff --git a/deps/v8/test/mjsunit/regress/regress-2618.js b/deps/v8/test/mjsunit/regress/regress-2618.js
index be3168c1cd..10ed81f0be 100644
--- a/deps/v8/test/mjsunit/regress/regress-2618.js
+++ b/deps/v8/test/mjsunit/regress/regress-2618.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --use-osr --allow-natives-syntax --ignition-osr --crankshaft
+// Flags: --use-osr --allow-natives-syntax --ignition-osr --opt
function f() {
do {
diff --git a/deps/v8/test/mjsunit/regress/regress-3176.js b/deps/v8/test/mjsunit/regress/regress-3176.js
index 370065d777..dbfe8218fd 100644
--- a/deps/v8/test/mjsunit/regress/regress-3176.js
+++ b/deps/v8/test/mjsunit/regress/regress-3176.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
function foo(a) {
var sum = 0;
diff --git a/deps/v8/test/mjsunit/regress/regress-330046.js b/deps/v8/test/mjsunit/regress/regress-330046.js
index eb0d3f38a2..24557b4cc6 100644
--- a/deps/v8/test/mjsunit/regress/regress-330046.js
+++ b/deps/v8/test/mjsunit/regress/regress-330046.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --use-osr --allow-natives-syntax --crankshaft
+// Flags: --use-osr --allow-natives-syntax --opt
var o1 = {a : 10};
var o2 = { };
diff --git a/deps/v8/test/mjsunit/regress/regress-3408144.js b/deps/v8/test/mjsunit/regress/regress-3408144.js
index 6e292d635a..8bd7b20eb9 100644
--- a/deps/v8/test/mjsunit/regress/regress-3408144.js
+++ b/deps/v8/test/mjsunit/regress/regress-3408144.js
@@ -28,8 +28,6 @@
// Test incorrect code generation for alternations on ARM.
-// Flags: --nofull-compiler
-
function foo() {
return (0 > ("10"||10) - 1);
}
diff --git a/deps/v8/test/mjsunit/regress/regress-347914.js b/deps/v8/test/mjsunit/regress/regress-347914.js
index ec693ee92c..0137397cf2 100644
--- a/deps/v8/test/mjsunit/regress/regress-347914.js
+++ b/deps/v8/test/mjsunit/regress/regress-347914.js
@@ -3,7 +3,7 @@
// found in the LICENSE file.
// Flags: --allow-natives-syntax --debug-code --gc-interval=201 --verify-heap --max-inlined-source-size=999999 --max-inlined-nodes=999999 --max-inlined-nodes-cumulative=999999
-// Flags: --crankshaft --no-always-opt
+// Flags: --opt --no-always-opt
// Begin stripped down and modified version of mjsunit.js for easy minimization in CF.
function MjsUnitAssertionError(message) {}
diff --git a/deps/v8/test/mjsunit/regress/regress-353004.js b/deps/v8/test/mjsunit/regress/regress-353004.js
index 7e1fb7e939..233a0f11d1 100644
--- a/deps/v8/test/mjsunit/regress/regress-353004.js
+++ b/deps/v8/test/mjsunit/regress/regress-353004.js
@@ -59,18 +59,18 @@ assertThrows(function() {
var buffer9 = new ArrayBuffer(1024);
var array9 = new Uint8Array(buffer9);
-var array10 = array9.subarray({valueOf : function() {
+assertThrows(() =>
+ array9.subarray({valueOf : function() {
%ArrayBufferNeuter(buffer9);
return 0;
- }}, 1024);
+ }}, 1024), TypeError);
assertEquals(0, array9.length);
-assertEquals(0, array10.length);
var buffer11 = new ArrayBuffer(1024);
var array11 = new Uint8Array(buffer11);
-var array12 = array11.subarray(0, {valueOf : function() {
- %ArrayBufferNeuter(buffer11);
- return 1024;
- }});
+assertThrows(() =>
+ array11.subarray(0, {valueOf : function() {
+ %ArrayBufferNeuter(buffer11);
+ return 1024;
+ }}), TypeError);
assertEquals(0, array11.length);
-assertEquals(0, array12.length);
diff --git a/deps/v8/test/mjsunit/regress/regress-3650-3.js b/deps/v8/test/mjsunit/regress/regress-3650-3.js
index f842428262..6195b12441 100644
--- a/deps/v8/test/mjsunit/regress/regress-3650-3.js
+++ b/deps/v8/test/mjsunit/regress/regress-3650-3.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
function foo(a) {
for (var d in a) {
diff --git a/deps/v8/test/mjsunit/regress/regress-3709.js b/deps/v8/test/mjsunit/regress/regress-3709.js
index 0f6f7b71d4..ecb906a908 100644
--- a/deps/v8/test/mjsunit/regress/regress-3709.js
+++ b/deps/v8/test/mjsunit/regress/regress-3709.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft --no-always-opt
+// Flags: --allow-natives-syntax --opt --no-always-opt
function getobj() {
return { bar : function() { return 0}};
diff --git a/deps/v8/test/mjsunit/regress/regress-385565.js b/deps/v8/test/mjsunit/regress/regress-385565.js
index 0244cdf75c..541e461d96 100644
--- a/deps/v8/test/mjsunit/regress/regress-385565.js
+++ b/deps/v8/test/mjsunit/regress/regress-385565.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --crankshaft --no-always-opt
+// Flags: --allow-natives-syntax --opt --no-always-opt
var calls = 0;
diff --git a/deps/v8/test/mjsunit/regress/regress-410912.js b/deps/v8/test/mjsunit/regress/regress-410912.js
index 5691161521..9a2e46d7bf 100644
--- a/deps/v8/test/mjsunit/regress/regress-410912.js
+++ b/deps/v8/test/mjsunit/regress/regress-410912.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --expose-gc --crankshaft --no-always-opt
+// Flags: --allow-natives-syntax --expose-gc --opt --no-always-opt
var assertDoesNotThrow;
var assertInstanceof;
diff --git a/deps/v8/test/mjsunit/regress/regress-4380.js b/deps/v8/test/mjsunit/regress/regress-4380.js
index f51241ac7d..06a64790ef 100644
--- a/deps/v8/test/mjsunit/regress/regress-4380.js
+++ b/deps/v8/test/mjsunit/regress/regress-4380.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
function bar(a) {
var x = a[0];
diff --git a/deps/v8/test/mjsunit/regress/regress-4665.js b/deps/v8/test/mjsunit/regress/regress-4665.js
index a75d68f105..9aed4ed0ce 100644
--- a/deps/v8/test/mjsunit/regress/regress-4665.js
+++ b/deps/v8/test/mjsunit/regress/regress-4665.js
@@ -11,12 +11,14 @@ FirstBuffer.__proto__ = Uint8Array
var buf = new Uint8Array(10)
buf.__proto__ = FirstBuffer.prototype
-var buf2 = buf.subarray(2)
-assertEquals(8, buf2.length);
+assertThrows(() => buf.subarray(2), TypeError);
// Second test case
+let seen_args = [];
+
function SecondBuffer (arg) {
+ seen_args.push(arg);
var arr = new Uint8Array(arg)
arr.__proto__ = SecondBuffer.prototype
return arr
@@ -25,7 +27,9 @@ SecondBuffer.prototype.__proto__ = Uint8Array.prototype
SecondBuffer.__proto__ = Uint8Array
var buf3 = new SecondBuffer(10)
+assertEquals([10], seen_args);
var buf4 = buf3.subarray(2)
-assertEquals(8, buf4.length);
+assertEquals(10, buf4.length);
+assertEquals([10, buf3.buffer], seen_args);
diff --git a/deps/v8/test/mjsunit/regress/regress-475705.js b/deps/v8/test/mjsunit/regress/regress-475705.js
index ff96e041b1..ec8416aed4 100644
--- a/deps/v8/test/mjsunit/regress/regress-475705.js
+++ b/deps/v8/test/mjsunit/regress/regress-475705.js
@@ -5,7 +5,7 @@
// Crankshaft changes the stack usage and messes up the binary search for the
// stack depth that causes a stack overflow. The issue only arises without
// regexp optimization, which can happen on pages that create a lot of regexps.
-// Flags: --nocrankshaft --noregexp-optimization
+// Flags: --noopt --noregexp-optimization
// Should not crash with a stack overflow in the regexp compiler, even when the
// JS has used most of the stack.
diff --git a/deps/v8/test/mjsunit/regress/regress-4825.js b/deps/v8/test/mjsunit/regress/regress-4825.js
index 5ad096f3ed..fafd3db73b 100644
--- a/deps/v8/test/mjsunit/regress/regress-4825.js
+++ b/deps/v8/test/mjsunit/regress/regress-4825.js
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// Flags: --allow-natives-syntax
+
function enumerate(o) {
var keys = [];
for (var key in o) keys.push(key);
@@ -10,11 +12,13 @@ function enumerate(o) {
(function testSlowSloppyArgumentsElements() {
function slowSloppyArguments(a, b, c) {
+ %HeapObjectVerify(arguments);
arguments[10000] = "last";
arguments[4000] = "first";
arguments[6000] = "second";
arguments[5999] = "x";
arguments[3999] = "y";
+ %HeapObjectVerify(arguments);
return arguments;
}
assertEquals(["0", "1", "2", "3999", "4000", "5999", "6000", "10000"],
@@ -29,10 +33,12 @@ function enumerate(o) {
Object.defineProperty(arguments, 10000, {
enumerable: false, configurable: false, value: "NOPE"
});
+ %HeapObjectVerify(arguments);
arguments[4000] = "first";
arguments[6000] = "second";
arguments[5999] = "x";
arguments[3999] = "y";
+ %HeapObjectVerify(arguments);
return arguments;
}
@@ -43,11 +49,13 @@ function enumerate(o) {
enumerate(slowSloppyArguments(1,2,3)));
})();
+
(function testFastSloppyArgumentsElements() {
function fastSloppyArguments(a, b, c) {
arguments[5] = 1;
arguments[7] = 0;
arguments[3] = 2;
+ %HeapObjectVerify(arguments);
return arguments;
}
assertEquals(["0", "1", "2", "3", "5", "7"],
@@ -58,7 +66,11 @@ function enumerate(o) {
function fastSloppyArguments2(a, b, c) {
delete arguments[0];
+ %DebugPrint(arguments);
+ %HeapObjectVerify(arguments);
arguments[0] = "test";
+ %DebugPrint(arguments);
+ %HeapObjectVerify(arguments);
return arguments;
}
@@ -71,8 +83,10 @@ function enumerate(o) {
Object.defineProperty(arguments, 5, {
enumerable: false, configurable: false, value: "NOPE"
});
+ %HeapObjectVerify(arguments);
arguments[7] = 0;
arguments[3] = 2;
+ %HeapObjectVerify(arguments);
return arguments;
}
assertEquals(
@@ -83,10 +97,12 @@ function enumerate(o) {
function fastSloppyArguments2(a, b, c) {
delete arguments[0];
+ %HeapObjectVerify(arguments);
Object.defineProperty(arguments, 1, {
enumerable: false, configurable: false, value: "NOPE"
});
arguments[0] = "test";
+ %HeapObjectVerify(arguments);
return arguments;
}
diff --git a/deps/v8/test/mjsunit/regress/regress-5404.js b/deps/v8/test/mjsunit/regress/regress-5404.js
index b776a73bd0..72c5d30fe3 100644
--- a/deps/v8/test/mjsunit/regress/regress-5404.js
+++ b/deps/v8/test/mjsunit/regress/regress-5404.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
function foo(a, b) {
return a + "0123456789012";
diff --git a/deps/v8/test/mjsunit/regress/regress-5790.js b/deps/v8/test/mjsunit/regress/regress-5790.js
index 8709cd4aa3..eb405237e1 100644
--- a/deps/v8/test/mjsunit/regress/regress-5790.js
+++ b/deps/v8/test/mjsunit/regress/regress-5790.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
function foo(a) {
"use strict";
diff --git a/deps/v8/test/mjsunit/regress/regress-5802.js b/deps/v8/test/mjsunit/regress/regress-5802.js
index 799d89cada..57c8198c0c 100644
--- a/deps/v8/test/mjsunit/regress/regress-5802.js
+++ b/deps/v8/test/mjsunit/regress/regress-5802.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
(function() {
function eq(a, b) { return a == b; }
diff --git a/deps/v8/test/mjsunit/regress/regress-5902.js b/deps/v8/test/mjsunit/regress/regress-5902.js
index 69dde4387a..034b6a7951 100644
--- a/deps/v8/test/mjsunit/regress/regress-5902.js
+++ b/deps/v8/test/mjsunit/regress/regress-5902.js
@@ -58,5 +58,6 @@ assertEquals(
'Error.prototype',
'EvalError.prototype', 'RangeError.prototype', 'ReferenceError.prototype',
'SyntaxError.prototype', 'TypeError.prototype', 'URIError.prototype',
+ 'Map', 'Map.prototype.constructor', 'Set', 'Set.prototype.constructor'
],
log);
diff --git a/deps/v8/test/mjsunit/regress/regress-618608.js b/deps/v8/test/mjsunit/regress/regress-618608.js
index 742cc6e32e..33c5fbf188 100644
--- a/deps/v8/test/mjsunit/regress/regress-618608.js
+++ b/deps/v8/test/mjsunit/regress/regress-618608.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --validate-asm --allow-natives-syntax --crankshaft --no-always-opt
+// Flags: --validate-asm --allow-natives-syntax --opt --no-always-opt
// /v8/test/mjsunit/regress/regress-crbug-431602.js
// /v8/test/mjsunit/lazy-load.js
diff --git a/deps/v8/test/mjsunit/regress/regress-6248.js b/deps/v8/test/mjsunit/regress/regress-6248.js
new file mode 100644
index 0000000000..0631892549
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-6248.js
@@ -0,0 +1,24 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+var sentinelObject = {};
+var evaluatedArg = false;
+class C extends Object {
+ constructor() {
+ try {
+ super(evaluatedArg = true);
+ } catch (e) {
+ assertInstanceof(e, TypeError);
+ return sentinelObject;
+ }
+ }
+}
+Object.setPrototypeOf(C, parseInt);
+assertSame(sentinelObject, new C());
+assertSame(sentinelObject, new C());
+%OptimizeFunctionOnNextCall(C)
+assertSame(sentinelObject, new C());
+assertFalse(evaluatedArg);
diff --git a/deps/v8/test/mjsunit/regress/regress-6280.js b/deps/v8/test/mjsunit/regress/regress-6280.js
new file mode 100644
index 0000000000..e5ccf265f4
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-6280.js
@@ -0,0 +1,22 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function Module(stdlib, imports, buffer) {
+ "use asm";
+ var x = new stdlib.Int8Array(buffer);
+ function f() {
+ return x[0] | 0;
+ }
+ return { f:f };
+}
+
+var b = new ArrayBuffer(1024);
+var m1 = Module({ Int8Array:Int8Array }, {}, b);
+assertEquals(0, m1.f());
+
+var was_called = 0;
+function observer() { was_called++; return [23]; }
+var m2 = Module({ Int8Array:observer }, {}, b);
+assertEquals(1, was_called);
+assertEquals(23, m2.f());
diff --git a/deps/v8/test/mjsunit/regress/regress-6288.js b/deps/v8/test/mjsunit/regress/regress-6288.js
new file mode 100644
index 0000000000..eb8e735920
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-6288.js
@@ -0,0 +1,13 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Environment Variables: LC_ALL=pt-BR.UTF8
+
+// The data files packaged with d8 currently have Brazillian Portugese
+// DateTimeFormat but not Collation
+
+if (this.Intl) {
+ assertEquals('und', Intl.Collator().resolvedOptions().locale);
+ assertEquals('pt-BR', Intl.DateTimeFormat().resolvedOptions().locale);
+}
diff --git a/deps/v8/test/mjsunit/regress/regress-6298.js b/deps/v8/test/mjsunit/regress/regress-6298.js
new file mode 100644
index 0000000000..c3f4de3c2d
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-6298.js
@@ -0,0 +1,16 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function Module(stdlib, imports, buffer) {
+ "use asm";
+ function f() {
+ return (281474976710655 * 1048575) | 0;
+ }
+ return { f:f };
+}
+var m = Module(this);
+assertEquals(-1048576, m.f());
+assertFalse(%IsAsmWasmCode(Module));
diff --git a/deps/v8/test/mjsunit/regress/regress-6337.js b/deps/v8/test/mjsunit/regress/regress-6337.js
new file mode 100644
index 0000000000..e80804ee5b
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-6337.js
@@ -0,0 +1,5 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+assertThrows(function() { eval(`class C { ...[] }`); } )
diff --git a/deps/v8/test/mjsunit/regress/regress-641091.js b/deps/v8/test/mjsunit/regress/regress-641091.js
new file mode 100644
index 0000000000..33a98ef52c
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-641091.js
@@ -0,0 +1,15 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+assertEquals(["🍤", "🍤"],
+ '🍤🍦🍋ππ🍋🍦🍤'.match(/🍤/ug));
+
+assertEquals(["🍤", "🍦", "🍦", "🍤"],
+ '🍤🍦🍋ππ🍋🍦🍤'.match(/🍤|🍦/ug));
+
+assertEquals(["🍤", "🍦", "🍋", "🍋", "🍦", "🍤"],
+ '🍤🍦🍋ππ🍋🍦🍤'.match(/🍤|🍦|🍋/ug));
+
+assertEquals(["🍤", "🍦", "🍋", "π", "π", "🍋", "🍦", "🍤"],
+ '🍤🍦🍋ππ🍋🍦🍤'.match(/🍤|🍦|π|🍋/ug));
diff --git a/deps/v8/test/mjsunit/regress/regress-645680.js b/deps/v8/test/mjsunit/regress/regress-645680.js
index b244d9c047..de216f07fc 100644
--- a/deps/v8/test/mjsunit/regress/regress-645680.js
+++ b/deps/v8/test/mjsunit/regress/regress-645680.js
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --expose-gc
-//
+// Flags: --expose-gc --allow-natives-syntax
+
function getRandomProperty(v, rand) {
var properties = Object.getOwnPropertyNames(v);
if ("constructor" && v.constructor.hasOwnProperty()) {; }
@@ -11,10 +11,12 @@ function getRandomProperty(v, rand) {
return properties[rand % properties.length];
}
-var __v_18 = (function( b) { return arguments; })("foo", NaN, "bar");
-__v_18.__p_293850326 = "foo";
-__v_18.__defineGetter__(getRandomProperty( 990787501), function() {
+var args = (function( b) { return arguments; })("foo", NaN, "bar");
+args.__p_293850326 = "foo";
+%HeapObjectVerify(args);
+args.__defineGetter__(getRandomProperty( 990787501), function() {
gc();
- return __v_18.__p_293850326;
+ return args.__p_293850326;
});
-Array.prototype.indexOf.call(__v_18)
+%HeapObjectVerify(args);
+Array.prototype.indexOf.call(args)
diff --git a/deps/v8/test/mjsunit/regress/regress-707066.js b/deps/v8/test/mjsunit/regress/regress-707066.js
new file mode 100644
index 0000000000..b33b585ebd
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-707066.js
@@ -0,0 +1,25 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Flags: --harmony-function-tostring
+
+// There was a bug in CreateDynamicFunction where a stack overflow
+// situation caused an assertion failure.
+
+function test(api) {
+ function f() {
+ try {
+ // induce a stack overflow
+ f();
+ } catch(e) {
+ // this might result in even more stack overflows
+ api();
+ }
+ }
+ f();
+}
+
+test(( function (){}).constructor); // Function
+test(( function*(){}).constructor); // GeneratorFunction
+test((async function (){}).constructor); // AsyncFunction
diff --git a/deps/v8/test/mjsunit/regress/regress-709782.js b/deps/v8/test/mjsunit/regress/regress-709782.js
new file mode 100644
index 0000000000..e33f694ec9
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-709782.js
@@ -0,0 +1,14 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+var a = [0];
+function bar(x) { return x; }
+function foo() { return a.reduce(bar); }
+
+assertEquals(0, foo());
+assertEquals(0, foo());
+%OptimizeFunctionOnNextCall(foo);
+assertEquals(0, foo());
diff --git a/deps/v8/test/mjsunit/regress/regress-711165.js b/deps/v8/test/mjsunit/regress/regress-711165.js
new file mode 100644
index 0000000000..9a42451e25
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-711165.js
@@ -0,0 +1,9 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This is testing a leak failure.
+
+try {
+ Realm.navigate(0);
+} catch(e) {}
diff --git a/deps/v8/test/mjsunit/regress/regress-716044.js b/deps/v8/test/mjsunit/regress/regress-716044.js
new file mode 100644
index 0000000000..264424c811
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-716044.js
@@ -0,0 +1,25 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --verify-heap
+
+class Array1 extends Array {
+ constructor(len) {
+ super(1);
+ }
+};
+
+class MyArray extends Array {
+ static get [Symbol.species]() {
+ return Array1;
+ }
+}
+
+a = new MyArray();
+
+for (var i = 0; i < 100000; i++) {
+ a.push(1);
+}
+
+a.map(function(x) { return 42; });
diff --git a/deps/v8/test/mjsunit/regress/regress-718285.js b/deps/v8/test/mjsunit/regress/regress-718285.js
new file mode 100644
index 0000000000..409f343693
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-718285.js
@@ -0,0 +1,46 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function foo_reference(n) {
+ var array = new Int32Array(n + 1);
+ for (var i = 0; i < n; ++i) {
+ array[i] = i;
+ }
+ var array2 = new Int32Array(array);
+ array2.set(new Uint8Array(array.buffer, 0, n), 1);
+ return array2;
+}
+
+function foo(n) {
+ var array = new Int32Array(n + 1);
+ for (var i = 0; i < n; ++i) {
+ array[i] = i;
+ }
+ array.set(new Uint8Array(array.buffer, 0, n), 1);
+ return array;
+}
+
+function bar_reference(n) {
+ var array = new Int32Array(n + 1);
+ for (var i = 0; i < n; ++i) {
+ array[i] = i;
+ }
+ var array2 = new Int32Array(array);
+ array2.set(new Uint8Array(array.buffer, 34), 0);
+ return array2;
+}
+
+function bar(n) {
+ var array = new Int32Array(n + 1);
+ for (var i = 0; i < n; ++i) {
+ array[i] = i;
+ }
+ array.set(new Uint8Array(array.buffer, 34), 0);
+ return array;
+}
+
+foo(10);
+foo_reference(10);
+bar(10);
+bar_reference(10);
diff --git a/deps/v8/test/mjsunit/regress/regress-718891.js b/deps/v8/test/mjsunit/regress/regress-718891.js
new file mode 100644
index 0000000000..60ce380e01
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-718891.js
@@ -0,0 +1,68 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --expose-gc
+
+function Data() {
+}
+Data.prototype = { x: 1 };
+
+function TriggerDeopt() {
+ Data.prototype = { x: 2 };
+}
+
+function TestDontSelfHealWithDeoptedCode(run_unoptimized, ClosureFactory) {
+ // Create some function closures which don't have
+ // optimized code.
+ var unoptimized_closure = ClosureFactory();
+ if (run_unoptimized) {
+ unoptimized_closure();
+ }
+
+ // Run and optimize the code (do this in a seperate function
+ // so that the closure doesn't leak in a dead register).
+ (() => {
+ var optimized_closure = ClosureFactory();
+ // Use .call to avoid the CallIC retaining the JSFunction in the
+ // feedback vector via a weak map, which would mean it wouldn't be
+ // collected in the minor gc below.
+ optimized_closure.call(undefined);
+ %OptimizeFunctionOnNextCall(optimized_closure);
+ optimized_closure.call(undefined);
+ })();
+
+ // Optimize a dummy function, just so it gets linked into the
+ // Contexts optimized_functions list head, which is in the old
+ // space, and the link from to the optimized_closure's JSFunction
+ // moves to the inline link in dummy's JSFunction in the new space,
+ // otherwise optimized_closure's JSFunction will be retained by the
+ // old->new remember set.
+ (() => {
+ var dummy = function() { return 1; };
+ %OptimizeFunctionOnNextCall(dummy);
+ dummy();
+ })();
+
+ // GC the optimized closure with a minor GC - the optimized
+ // code will remain in the feedback vector.
+ gc(true);
+
+ // Trigger deoptimization by changing the prototype of Data. This
+ // will mark the code for deopt, but since no live JSFunction has
+ // optimized code, we won't clear the feedback vector.
+ TriggerDeopt();
+
+ // Call pre-existing functions, these will try to self-heal with the
+ // optimized code in the feedback vector op, but should bail-out
+ // since the code is marked for deoptimization.
+ unoptimized_closure();
+}
+
+// Run with the unoptimized closure both uncomplied and compiled for the
+// interpreter initially, to test self healing on both CompileLazy and
+// the InterpreterEntryTrampoline respectively.
+TestDontSelfHealWithDeoptedCode(false,
+ () => { return () => { return new Data() }});
+TestDontSelfHealWithDeoptedCode(true,
+ () => { return () => { return new Data() }});
diff --git a/deps/v8/test/mjsunit/regress/regress-719380.js b/deps/v8/test/mjsunit/regress/regress-719380.js
new file mode 100644
index 0000000000..18d541a5fe
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-719380.js
@@ -0,0 +1,7 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+TypeError.prototype.__defineGetter__("name", () => { throw 42; });
+console.log({ toString: () => { throw new TypeError() }});
+try { new WebAssembly.Table({}); } catch (e) {}
diff --git a/deps/v8/test/mjsunit/regress/regress-722978.js b/deps/v8/test/mjsunit/regress/regress-722978.js
new file mode 100644
index 0000000000..082c1f8be3
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-722978.js
@@ -0,0 +1,15 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --always-opt
+
+var __v_3 = {};
+function __f_0() {
+ var __v_30 = -0;
+ __v_30.__defineGetter__("0", function() { return undefined; });
+ __v_30 = 0;
+ __v_3 = 0;
+ assertTrue(Object.is(0, __v_30));
+}
+__f_0();
diff --git a/deps/v8/test/mjsunit/regress/regress-725858.js b/deps/v8/test/mjsunit/regress/regress-725858.js
new file mode 100644
index 0000000000..466673f816
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-725858.js
@@ -0,0 +1,11 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function f() {}
+var src = 'f(' + '0,'.repeat(0x201f) + ')';
+var boom = new Function(src);
+%OptimizeFunctionOnNextCall(boom);
+boom();
diff --git a/deps/v8/test/mjsunit/regress/regress-727218.js b/deps/v8/test/mjsunit/regress/regress-727218.js
new file mode 100644
index 0000000000..8b2aa06a20
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-727218.js
@@ -0,0 +1,12 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+var f = ({ x } = { x: y }) => {
+ x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;
+ x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;
+ x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;
+ x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;
+ x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;
+ x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;
+};
diff --git a/deps/v8/test/mjsunit/regress/regress-conditional-position.js b/deps/v8/test/mjsunit/regress/regress-conditional-position.js
index ae5a3acb58..c9badd6830 100644
--- a/deps/v8/test/mjsunit/regress/regress-conditional-position.js
+++ b/deps/v8/test/mjsunit/regress/regress-conditional-position.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --nocrankshaft
+// Flags: --noopt
var functionToCatch;
var lineNumber;
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-157019.js b/deps/v8/test/mjsunit/regress/regress-crbug-157019.js
index 1c54089ff9..66eb41bdd2 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-157019.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-157019.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --nocrankshaft
+// Flags: --allow-natives-syntax --noopt
function makeConstructor() {
return function() {
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-157520.js b/deps/v8/test/mjsunit/regress/regress-crbug-157520.js
index 17081dfa52..9570085333 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-157520.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-157520.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --nocrankshaft
+// Flags: --noopt
(function(){
var f = function(arg) {
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-244461.js b/deps/v8/test/mjsunit/regress/regress-crbug-244461.js
index 7b465482e0..2afb76ac12 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-244461.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-244461.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --smi-only-arrays
+// Flags: --allow-natives-syntax
function foo(arg) {
var a = arg();
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-504787.js b/deps/v8/test/mjsunit/regress/regress-crbug-504787.js
index 66274bc6b9..ac592e08fb 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-504787.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-504787.js
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --noturbo-osr
-
function f() {
"use asm";
function g() {
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-506443.js b/deps/v8/test/mjsunit/regress/regress-crbug-506443.js
index 0ab518f9b9..490edf0d4c 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-506443.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-506443.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft --no-always-opt
+// Flags: --allow-natives-syntax --opt --no-always-opt
assertSame = function assertSame() {
if (found === expected) {
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-513507.js b/deps/v8/test/mjsunit/regress/regress-crbug-513507.js
index 86a0f1b1f9..ae321ba906 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-513507.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-513507.js
@@ -4,7 +4,7 @@
// Flags: --allow-natives-syntax
-// The following triggers a GC in SharedFunctionInfo::AddToOptimizedCodeMap.
+// The following triggers a GC in Context::AddToOSROptimizedCodeCache.
// Flags: --gc-interval=1234 --gc-global
function makeFun() {
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-554831.js b/deps/v8/test/mjsunit/regress/regress-crbug-554831.js
index da78fa4c07..3d022b257b 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-554831.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-554831.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
(function() {
var key = "s";
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-587068.js b/deps/v8/test/mjsunit/regress/regress-crbug-587068.js
index 4af8110497..864f8ce7d2 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-587068.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-587068.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
// The Crankshaft fast case for String.fromCharCode used to unconditionally
// deoptimize on non int32 indices.
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-594183.js b/deps/v8/test/mjsunit/regress/regress-crbug-594183.js
index 87f3195917..cb8003404d 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-594183.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-594183.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft --no-always-opt
+// Flags: --allow-natives-syntax --opt --no-always-opt
var global = {}
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-651403-global.js b/deps/v8/test/mjsunit/regress/regress-crbug-651403-global.js
index 776bdcfc87..8682d822a5 100644
--- a/deps/v8/test/mjsunit/regress/regress-crbug-651403-global.js
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-651403-global.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --ignition-staging --turbo --always-opt
+// Flags: --turbo --always-opt
x = "";
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-707580.js b/deps/v8/test/mjsunit/regress/regress-crbug-707580.js
new file mode 100644
index 0000000000..37d13d219f
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-707580.js
@@ -0,0 +1,10 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+var thrower = { [Symbol.toPrimitive] : function() { throw "I was called!" } };
+var heap_number = 4.2;
+var smi_number = 23;
+
+assertThrows(() => heap_number.hasOwnProperty(thrower));
+assertThrows(() => smi_number.hasOwnProperty(thrower));
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-711166.js b/deps/v8/test/mjsunit/regress/regress-crbug-711166.js
new file mode 100644
index 0000000000..7f4acb963d
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-711166.js
@@ -0,0 +1,22 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+'use strict'
+function g() {
+ var x = 1;
+ try { undefined.x } catch (e) { x = e; }
+ (function() { x });
+ return x;
+}
+function f(a) {
+ var args = arguments;
+ assertInstanceof(g(), TypeError);
+ return args.length;
+}
+assertEquals(1, f(0));
+assertEquals(1, f(0));
+%OptimizeFunctionOnNextCall(f);
+assertEquals(1, f(0));
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-712802.js b/deps/v8/test/mjsunit/regress/regress-crbug-712802.js
new file mode 100644
index 0000000000..e23519e179
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-712802.js
@@ -0,0 +1,12 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function foo(...args) { return Array.isArray(args); }
+
+assertTrue(foo());
+assertTrue(foo());
+%OptimizeFunctionOnNextCall(foo);
+assertTrue(foo());
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-714696.js b/deps/v8/test/mjsunit/regress/regress-crbug-714696.js
new file mode 100644
index 0000000000..16b09604e9
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-714696.js
@@ -0,0 +1,10 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+if (this.Intl) {
+ new Intl.v8BreakIterator();
+ new Intl.DateTimeFormat();
+ console.log({ toString: function() { throw 1; }});
+ new Intl.v8BreakIterator();
+}
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-714872.js b/deps/v8/test/mjsunit/regress/regress-crbug-714872.js
new file mode 100644
index 0000000000..88dee1401e
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-714872.js
@@ -0,0 +1,8 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function f() {}
+f.prototype = 1;
+f.foo = 1;
+f.prototype = {};
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-714971.js b/deps/v8/test/mjsunit/regress/regress-crbug-714971.js
new file mode 100644
index 0000000000..d72c7a0fad
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-714971.js
@@ -0,0 +1,19 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function Module(stdlib, foreign, heap) {
+ "use asm";
+ var a = new stdlib.Int16Array(heap);
+ function f() {
+ return a[23 >> -1];
+ }
+ return { f:f };
+}
+var b = new ArrayBuffer(1024);
+var m = Module(this, {}, b);
+new Int16Array(b)[0] = 42;
+assertEquals(42, m.f());
+assertFalse(%IsAsmWasmCode(Module));
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-714981.js b/deps/v8/test/mjsunit/regress/regress-crbug-714981.js
new file mode 100644
index 0000000000..e6a664d422
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-714981.js
@@ -0,0 +1,32 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function addProperties(o)
+{
+ o.p1 = 1;
+ o.p2 = 2;
+ o.p3 = 3;
+ o.p4 = 4;
+ o.p5 = 5;
+ o.p6 = 6;
+ o.p7 = 7;
+ o.p8 = 8;
+}
+function removeProperties(o)
+{
+ delete o.p8;
+ delete o.p7;
+ delete o.p6;
+ delete o.p5;
+}
+function makeO()
+{
+ var o = { };
+ addProperties(o);
+ removeProperties(o);
+ addProperties(o);
+}
+for (var i = 0; i < 3; ++i) {
+ o = makeO();
+}
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-715151.js b/deps/v8/test/mjsunit/regress/regress-crbug-715151.js
new file mode 100644
index 0000000000..c0b2c5dba8
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-715151.js
@@ -0,0 +1,15 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --verify-heap
+
+function foo() {
+ var a = [0];
+ Object.preventExtensions(a);
+ return a.pop();
+}
+foo();
+foo();
+%OptimizeFunctionOnNextCall(foo);
+foo();
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-715404.js b/deps/v8/test/mjsunit/regress/regress-crbug-715404.js
new file mode 100644
index 0000000000..8ff2d00ba0
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-715404.js
@@ -0,0 +1,11 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function foo() { Array(-1); }
+assertThrows(foo, RangeError);
+assertThrows(foo, RangeError);
+%OptimizeFunctionOnNextCall(foo);
+assertThrows(foo, RangeError);
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-715455.js b/deps/v8/test/mjsunit/regress/regress-crbug-715455.js
new file mode 100644
index 0000000000..21ec165683
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-715455.js
@@ -0,0 +1,25 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function MODULE() {
+ "use asm";
+ function f() {
+ bogus_function_table[0 & LIMIT]();
+ }
+ return { f:f };
+}
+
+var bogus_function_table = [ Object ];
+var test_set = [ 0x3fffffff, 0x7fffffff, 0xffffffff ];
+for (var i = 0; i < test_set.length; ++i) {
+ bogus_function_table[i] = Object;
+ var src = MODULE.toString();
+ src = src.replace(/MODULE/g, "Module" + i);
+ src = src.replace(/LIMIT/g, test_set[i]);
+ var module = eval("(" + src + ")");
+ assertDoesNotThrow(module(this).f());
+ assertFalse(%IsAsmWasmCode(module));
+}
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-715862.js b/deps/v8/test/mjsunit/regress/regress-crbug-715862.js
new file mode 100644
index 0000000000..60e836ddc4
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-715862.js
@@ -0,0 +1,17 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --verify-heap
+
+function f(a) {
+ a.x = 0;
+ a[1] = 0.1;
+ a.x = {};
+}
+
+f(new Array(1));
+f(new Array());
+
+%OptimizeFunctionOnNextCall(f);
+f(new Array(1));
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-716520.js b/deps/v8/test/mjsunit/regress/regress-crbug-716520.js
new file mode 100644
index 0000000000..5058c94a6b
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-716520.js
@@ -0,0 +1,21 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+var __v_0 = {};
+var __v_8 = this;
+var __v_11 = -1073741825;
+__v_1 = this;
+try {
+} catch(e) {; }
+ function __f_4() {}
+ __f_4.prototype = __v_0;
+ function __f_9() { return new __f_4().v; }
+ __f_9(); __f_9();
+try {
+(function() {
+})();
+} catch(e) {; }
+ Object.assign(__v_0, __v_1, __v_0);
+(function() {
+})();
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-716804.js b/deps/v8/test/mjsunit/regress/regress-crbug-716804.js
new file mode 100644
index 0000000000..181a3d6c68
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-716804.js
@@ -0,0 +1,13 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+var v = [];
+v.__proto__ = function() {};
+v.prototype;
+
+var v = [];
+v.__proto__ = new Error();
+v.stack;
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-716912.js b/deps/v8/test/mjsunit/regress/regress-crbug-716912.js
new file mode 100644
index 0000000000..ca1663d61a
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-716912.js
@@ -0,0 +1,23 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-gc --invoke-weak-callbacks
+
+function __f_6() {
+this.a4 = {};
+}
+__v_6 = new __f_6();
+__v_6.prototype = __v_6;
+__v_6 = new __f_6();
+gc();
+gc();
+
+buf = new ArrayBuffer(8);
+__v_8 = new Int32Array(buf);
+__v_9 = new Float64Array(buf);
+
+__v_8[0] = 1;
+__v_6.a4 = {a: 0};
+delete __v_6.a4;
+__v_6.boom = __v_9[0];
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-718779.js b/deps/v8/test/mjsunit/regress/regress-crbug-718779.js
new file mode 100644
index 0000000000..e62c10729f
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-718779.js
@@ -0,0 +1,21 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function __f_1()
+{
+ __v_1.p2 = 2147483648;
+ __v_1.p3 = 3;
+ __v_1.p4 = 4;
+ __v_1.p5 = 2147483648;
+ __v_1.p6 = 6;
+}
+function __f_2()
+{
+ delete __v_1.p6;
+ delete __v_1.p5;
+}
+var __v_1 = { };
+__f_1(__v_1);
+__f_2(__v_1);
+__f_1(__v_1);
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-719479.js b/deps/v8/test/mjsunit/regress/regress-crbug-719479.js
new file mode 100644
index 0000000000..dac49de3b7
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-719479.js
@@ -0,0 +1,24 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function baz(a, b) {
+ for (var i = 0; i < a.length; i++) {
+ if (a[i], b[i]) return false;
+ }
+}
+function bar(expected, found) {
+ if (!baz(found, expected)) {
+ }
+};
+bar([{}, 6, NaN], [1.8, , NaN]);
+function foo() {
+ var a = [1,2,3,4];
+ bar(a.length, a.length);
+}
+foo();
+foo();
+%OptimizeFunctionOnNextCall(foo);
+foo();
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-721835.js b/deps/v8/test/mjsunit/regress/regress-crbug-721835.js
new file mode 100644
index 0000000000..80f99e6dd5
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-721835.js
@@ -0,0 +1,31 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --validate-asm --allow-natives-syntax
+
+(function TestValidationFailureInForStatement() {
+ function Module() {
+ "use asm"
+ function f() {
+ var a = 0;
+ for (a = b; 0; 0) {};
+ return 0;
+ }
+ return { f:f };
+ }
+ assertThrows(() => Module().f(), ReferenceError);
+ assertFalse(%IsAsmWasmCode(Module));
+})();
+
+(function TestForStatementInVoidFunction() {
+ function Module() {
+ "use asm"
+ function f() {
+ for (1; 0; 0) {};
+ }
+ return { f:f };
+ }
+ assertDoesNotThrow(() => Module().f());
+ assertTrue(%IsAsmWasmCode(Module));
+})();
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-723132.js b/deps/v8/test/mjsunit/regress/regress-crbug-723132.js
new file mode 100644
index 0000000000..99189f6f21
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-723132.js
@@ -0,0 +1,16 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function outer() {
+ function* generator() {
+ let arrow = () => {
+ assertSame(expectedReceiver, this);
+ assertEquals(42, arguments[0]);
+ };
+ arrow();
+ }
+ generator.call(this, 42).next();
+}
+let expectedReceiver = {};
+outer.call(expectedReceiver);
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-723455.js b/deps/v8/test/mjsunit/regress/regress-crbug-723455.js
new file mode 100644
index 0000000000..85f5e3c1d5
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-723455.js
@@ -0,0 +1,18 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax --verify-heap
+
+function f(a) {
+ a.x = 0;
+ a[0] = 0.1;
+ a.x = {};
+}
+
+f(new Array(1));
+f(new Array(1));
+f(new Array());
+
+%OptimizeFunctionOnNextCall(f);
+f(new Array(1));
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-736451.js b/deps/v8/test/mjsunit/regress/regress-crbug-736451.js
new file mode 100644
index 0000000000..3f70fe271b
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-736451.js
@@ -0,0 +1,13 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-externalize-string --no-stress-opt
+
+!function() {
+ const s0 = "external string turned into two byte";
+ const s1 = s0.substring(1);
+ externalizeString(s0, true);
+
+ s1.toLowerCase();
+}();
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-736575.js b/deps/v8/test/mjsunit/regress/regress-crbug-736575.js
new file mode 100644
index 0000000000..3622b09b97
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-736575.js
@@ -0,0 +1,14 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function f() {
+ return [...[/*hole*/, 2.3]];
+}
+
+assertEquals(undefined, f()[0]);
+assertEquals(undefined, f()[0]);
+%OptimizeFunctionOnNextCall(f);
+assertEquals(undefined, f()[0]);
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-738763.js b/deps/v8/test/mjsunit/regress/regress-crbug-738763.js
new file mode 100644
index 0000000000..71cb67b22e
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-738763.js
@@ -0,0 +1,25 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --verify-heap --allow-natives-syntax --expose-gc
+
+let constant = { a: 1 };
+
+function update_array(array) {
+ array.x = constant;
+ %HeapObjectVerify(array);
+ array[0] = undefined;
+ %HeapObjectVerify(array);
+ return array;
+}
+
+let ar1 = [1];
+let ar2 = [2];
+let ar3 = [3];
+gc();
+gc();
+
+update_array(ar1);
+constant = update_array(ar2);
+update_array(ar3);
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-740803.js b/deps/v8/test/mjsunit/regress/regress-crbug-740803.js
new file mode 100644
index 0000000000..b470ecafbf
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-740803.js
@@ -0,0 +1,19 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+({
+ m() {
+ x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x;
+ x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x;
+ x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x;
+ x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x;
+ x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x;
+ x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x;
+ x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x;
+ x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x;
+ x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x;
+ x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x; x;
+ x;
+ }
+})
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-747979.js b/deps/v8/test/mjsunit/regress/regress-crbug-747979.js
new file mode 100644
index 0000000000..bbdea1ddf5
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-747979.js
@@ -0,0 +1,32 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function f(a) {
+ %HeapObjectVerify(a);
+ a[1] = 0;
+ %HeapObjectVerify(a);
+}
+
+function foo() {}
+
+var arr1 = [0];
+var arr2 = [0];
+var arr3 = [0];
+
+arr1.f = foo;
+arr1[0] = 4.2;
+
+arr2.f = foo;
+
+arr3.f = foo;
+arr3[0] = 4.2;
+arr3.f = f;
+
+f(arr1);
+f(arr2);
+f(arr3);
+%OptimizeFunctionOnNextCall(f);
+f(arr3);
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-748539.js b/deps/v8/test/mjsunit/regress/regress-crbug-748539.js
new file mode 100644
index 0000000000..bae598710e
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-748539.js
@@ -0,0 +1,22 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+function f1() {}
+function f2() {}
+
+var o1 = [];
+o1.a = 0;
+o1.f = f1;
+%HeapObjectVerify(o1);
+
+var o2 = [];
+o2.a = 4.2;
+o2.f = f2;
+%HeapObjectVerify(o2);
+
+o1.a;
+%HeapObjectVerify(o1);
+%HeapObjectVerify(o2);
diff --git a/deps/v8/test/mjsunit/regress/regress-embedded-cons-string.js b/deps/v8/test/mjsunit/regress/regress-embedded-cons-string.js
index b7c5e14231..08de6dbab1 100644
--- a/deps/v8/test/mjsunit/regress/regress-embedded-cons-string.js
+++ b/deps/v8/test/mjsunit/regress/regress-embedded-cons-string.js
@@ -28,7 +28,7 @@
// Flags: --fold-constants --nodead-code-elimination
// Flags: --expose-gc --allow-natives-syntax
// Flags: --concurrent-recompilation --block-concurrent-recompilation
-// Flags: --crankshaft --no-always-opt
+// Flags: --opt --no-always-opt
if (!%IsConcurrentRecompilationSupported()) {
print("Concurrent recompilation is disabled. Skipping this test.");
diff --git a/deps/v8/test/mjsunit/regress/regress-map-invalidation-2.js b/deps/v8/test/mjsunit/regress/regress-map-invalidation-2.js
index f1d2b7703f..ece96b3ff0 100644
--- a/deps/v8/test/mjsunit/regress/regress-map-invalidation-2.js
+++ b/deps/v8/test/mjsunit/regress/regress-map-invalidation-2.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
var c = { x: 2, y: 1 };
diff --git a/deps/v8/test/mjsunit/regress/regress-param-local-type.js b/deps/v8/test/mjsunit/regress/regress-param-local-type.js
index 076a56dd25..0eaca50af5 100644
--- a/deps/v8/test/mjsunit/regress/regress-param-local-type.js
+++ b/deps/v8/test/mjsunit/regress/regress-param-local-type.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
// Test that we do not confuse the first local and the first parameter
// when gathering type information.
diff --git a/deps/v8/test/mjsunit/regress/regress-r4998.js b/deps/v8/test/mjsunit/regress/regress-r4998.js
index 9cf33713b5..a82c266777 100644
--- a/deps/v8/test/mjsunit/regress/regress-r4998.js
+++ b/deps/v8/test/mjsunit/regress/regress-r4998.js
@@ -28,8 +28,6 @@
// Test for a broken fast-smi-loop that does not save the incremented value
// of the loop index. If this test fails, it loops forever, and times out.
-// Flags: --nofull-compiler
-
// Calling foo() spills the virtual frame.
function foo() {
return;
diff --git a/deps/v8/test/mjsunit/regress/regress-store-uncacheable.js b/deps/v8/test/mjsunit/regress/regress-store-uncacheable.js
index fdd200ae3a..4baedbacae 100644
--- a/deps/v8/test/mjsunit/regress/regress-store-uncacheable.js
+++ b/deps/v8/test/mjsunit/regress/regress-store-uncacheable.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
function f() {
var o = {};
diff --git a/deps/v8/test/mjsunit/regress/regress-v8-5697.js b/deps/v8/test/mjsunit/regress/regress-v8-5697.js
index 550bd98017..d7c1679fa1 100644
--- a/deps/v8/test/mjsunit/regress/regress-v8-5697.js
+++ b/deps/v8/test/mjsunit/regress/regress-v8-5697.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
function load(o) { return o.x; }
diff --git a/deps/v8/test/mjsunit/regress/wasm/regress-712569.js b/deps/v8/test/mjsunit/regress/wasm/regress-712569.js
new file mode 100644
index 0000000000..ea7e4060a0
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/wasm/regress-712569.js
@@ -0,0 +1,20 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+var v11 = {};
+Object.defineProperty(v11.__proto__, 0, {
+ get: function() {
+ },
+ set: function() {
+ try {
+ WebAssembly.instantiate();
+ v11[0] = 0;
+ } catch (e) {
+ assertTrue(e instanceof RangeError);
+ }
+ }
+});
+v66 = new Array();
+cv = v66; cv[0] = 0.1; cv[2] = 0.2;
diff --git a/deps/v8/test/mjsunit/regress/wasm/regression-02256.js b/deps/v8/test/mjsunit/regress/wasm/regression-02256.js
index d0db4ca82a..3b9b76b5a6 100644
--- a/deps/v8/test/mjsunit/regress/wasm/regression-02256.js
+++ b/deps/v8/test/mjsunit/regress/wasm/regression-02256.js
@@ -4,7 +4,7 @@
//
// Flags: --random-seed=891196975 --expose-gc --allow-natives-syntax
// Flags: --gc-interval=207 --stress-compaction --validate-asm
-// Flags: --crankshaft --no-always-opt
+// Flags: --opt --no-always-opt
//
// /v8/test/mjsunit/wasm/grow-memory.js
// /v8/test/mjsunit/regress/regress-540.js
diff --git a/deps/v8/test/mjsunit/regress/wasm/regression-02256b.js b/deps/v8/test/mjsunit/regress/wasm/regression-02256b.js
index 6facf0d4e3..120643896d 100644
--- a/deps/v8/test/mjsunit/regress/wasm/regression-02256b.js
+++ b/deps/v8/test/mjsunit/regress/wasm/regression-02256b.js
@@ -4,7 +4,7 @@
//
// Flags: --random-seed=891196975 --expose-gc --allow-natives-syntax
// Flags: --gc-interval=207 --stress-compaction --validate-asm
-// Flags: --crankshaft --no-always-opt
+// Flags: --opt --no-always-opt
//
// /v8/test/mjsunit/wasm/grow-memory.js
// /v8/test/mjsunit/regress/regress-540.js
diff --git a/deps/v8/test/mjsunit/regress/wasm/regression-647649.js b/deps/v8/test/mjsunit/regress/wasm/regression-647649.js
index fc228d4b10..dc89ebd845 100644
--- a/deps/v8/test/mjsunit/regress/wasm/regression-647649.js
+++ b/deps/v8/test/mjsunit/regress/wasm/regression-647649.js
@@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --nostress-opt --expose-gc --invoke-weak-callbacks --validate-asm
-// Flags: --noalways-opt --invoke-weak-callbacks
+// Flags: --nostress-opt --expose-gc --noalways-opt --invoke-weak-callbacks
// This test was generated by the fuzzer.
@@ -38,6 +37,6 @@ Array.prototype.__proto__ = {3: __v_13};
Array.prototype.__proto__.__proto__ = {7: __v_11};
__v_9 = [0, 1, , , 4, 5, , , , 9]
__v_12 = __v_9.splice(4, 1)
-__v_9.__defineGetter__(getRandomProperty(__v_9, 1689439720), function() {; return __f_1(); });
+__v_9.__defineGetter__(getRandomProperty(__v_9, 1689439720), function() { return {}; });
__v_9[8]
gc();
diff --git a/deps/v8/test/mjsunit/regress/wasm/regression-699485.js b/deps/v8/test/mjsunit/regress/wasm/regression-699485.js
index 12477c5d37..7f4560789e 100644
--- a/deps/v8/test/mjsunit/regress/wasm/regression-699485.js
+++ b/deps/v8/test/mjsunit/regress/wasm/regression-699485.js
@@ -1,4 +1,4 @@
-// Copyright 2016 the V8 project authors. All rights reserved.
+// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
diff --git a/deps/v8/test/mjsunit/regress/wasm/regression-710844.js b/deps/v8/test/mjsunit/regress/wasm/regression-710844.js
new file mode 100644
index 0000000000..a45e953574
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/wasm/regression-710844.js
@@ -0,0 +1,23 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+load("test/mjsunit/wasm/wasm-constants.js");
+load("test/mjsunit/wasm/wasm-module-builder.js");
+
+(function() {
+ "use asm";
+ var builder = new WasmModuleBuilder();
+ builder.addMemory(0, 5, true);
+ builder.addFunction("regression_710844", kSig_v_v)
+ .addBody([
+ kExprI32Const, 0x03,
+ kExprNop,
+ kExprGrowMemory, 0x00,
+ kExprI32Const, 0x13,
+ kExprNop,
+ kExprI32StoreMem8, 0x00, 0x10
+ ]).exportFunc();
+ let instance = builder.instantiate();
+ instance.exports.regression_710844();
+})();
diff --git a/deps/v8/test/mjsunit/regress/wasm/regression-711203.js b/deps/v8/test/mjsunit/regress/wasm/regression-711203.js
new file mode 100644
index 0000000000..46f274a8b0
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/wasm/regression-711203.js
@@ -0,0 +1,30 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+load("test/mjsunit/wasm/wasm-constants.js");
+load("test/mjsunit/wasm/wasm-module-builder.js");
+
+(function() {
+ var builder = new WasmModuleBuilder();
+ builder.addMemory(16, 32, false);
+ builder.addFunction("test", kSig_i_iii)
+ .addBodyWithEnd([
+ // body:
+ kExprI64Const, 0,
+ kExprI64Const, 0x1,
+ kExprI64Clz,
+ kExprI64Sub,
+ kExprI64Const, 0x10,
+ kExprI64Const, 0x1b,
+ kExprI64Shl,
+ kExprI64Sub,
+ kExprI64Popcnt,
+ kExprI32ConvertI64,
+ kExprEnd, // @207
+ ])
+ .exportFunc();
+ var module = builder.instantiate();
+ const result = module.exports.test(1, 2, 3);
+ assertEquals(58, result);
+})();
diff --git a/deps/v8/test/mjsunit/regress/wasm/regression-715216-a.js b/deps/v8/test/mjsunit/regress/wasm/regression-715216-a.js
new file mode 100644
index 0000000000..56253414c9
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/wasm/regression-715216-a.js
@@ -0,0 +1,12 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --wasm-interpret-all --validate-asm
+
+function asm() {
+ "use asm";
+ function f() {}
+ return {};
+}
+asm();
diff --git a/deps/v8/test/mjsunit/regress/wasm/regression-715216-b.js b/deps/v8/test/mjsunit/regress/wasm/regression-715216-b.js
new file mode 100644
index 0000000000..0954f807dd
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/wasm/regression-715216-b.js
@@ -0,0 +1,13 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --wasm-interpret-all --wasm-lazy-compilation
+
+load("test/mjsunit/wasm/wasm-constants.js");
+load("test/mjsunit/wasm/wasm-module-builder.js");
+
+var builder = new WasmModuleBuilder();
+builder.addFunction('f', kSig_v_v).addBody([]);
+builder.addFunction('g', kSig_v_v).addBody([]);
+builder.instantiate();
diff --git a/deps/v8/test/mjsunit/regress/wasm/regression-717056.js b/deps/v8/test/mjsunit/regress/wasm/regression-717056.js
new file mode 100644
index 0000000000..534cf74eb7
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/wasm/regression-717056.js
@@ -0,0 +1,16 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Check that stack overflow inside asm-wasm translation propagates correctly.
+
+function asm() {
+ 'use asm';
+ return {};
+}
+
+function rec() {
+ asm();
+ rec();
+}
+assertThrows(() => rec(), RangeError);
diff --git a/deps/v8/test/mjsunit/regress/wasm/regression-719175.js b/deps/v8/test/mjsunit/regress/wasm/regression-719175.js
new file mode 100644
index 0000000000..c6217b0b01
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/wasm/regression-719175.js
@@ -0,0 +1,16 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --validate-asm --wasm-interpret-all
+
+function asm() {
+ 'use asm';
+ function f() {
+ if (1.0 % 2.5 == -0.75) {
+ }
+ return 0;
+ }
+ return {f: f};
+}
+asm().f();
diff --git a/deps/v8/test/mjsunit/regress/wasm/regression-722445.js b/deps/v8/test/mjsunit/regress/wasm/regression-722445.js
new file mode 100644
index 0000000000..f6a96dc60d
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/wasm/regression-722445.js
@@ -0,0 +1,16 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+load('test/mjsunit/wasm/wasm-constants.js');
+load('test/mjsunit/wasm/wasm-module-builder.js');
+
+var builder = new WasmModuleBuilder();
+builder.addFunction('f', kSig_v_v).addBody([
+ kExprI32Const, 0, kExprBrTable,
+ // 0x80000000 in LEB:
+ 0x80, 0x80, 0x80, 0x80, 0x08,
+ // First break target. Creation of this node triggered the bug.
+ 0
+]);
+assertThrows(() => builder.instantiate(), WebAssembly.CompileError);
diff --git a/deps/v8/test/mjsunit/regress/wasm/regression-731351.js b/deps/v8/test/mjsunit/regress/wasm/regression-731351.js
new file mode 100644
index 0000000000..238223ac2c
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/wasm/regression-731351.js
@@ -0,0 +1,23 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --validate-asm --expose-gc --stress-opt
+
+gc();
+function asm(stdlib, foreign, buffer) {
+ "use asm";
+ var HEAP32 = new stdlib.Uint32Array(buffer);
+ function load(a) {
+ a = a | 0;
+ return +(HEAP32[a >> 2] >>> 0);
+ }
+ return {load: load};
+}
+
+function RunAsmJsTest() {
+ buffer = new ArrayBuffer(65536);
+ var asm_module = asm({Uint32Array: Uint32Array}, {}, buffer);
+ asm_module.load(buffer.byteLength);
+}
+RunAsmJsTest();
diff --git a/deps/v8/test/mjsunit/regress/wasm/regression-734108.js b/deps/v8/test/mjsunit/regress/wasm/regression-734108.js
new file mode 100644
index 0000000000..d8774f4a84
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/wasm/regression-734108.js
@@ -0,0 +1,16 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --wasm-async-compilation
+
+__v_0 = new Uint8Array([
+ 0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x05, 0x01,
+ 0x60, 0x00, 0x01, 0x7f, 0x03, 0x02, 0x01, 0x00, 0x05, 0x03, 0x01,
+ 0x00, 0x01, 0x07, 0x11, 0x02, 0x04, 0x67, 0x72, 0x6f, 0x77, 0x00,
+ 0x00, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x02, 0x00, 0x0a,
+ 0x08, 0x01, 0x06, 0x00, 0x41, 0x01, 0x40, 0x00, 0x0b
+]);
+assertPromiseResult(
+ WebAssembly.compile(__v_0)
+);
diff --git a/deps/v8/test/mjsunit/regress/wasm/regression-737069.js b/deps/v8/test/mjsunit/regress/wasm/regression-737069.js
new file mode 100644
index 0000000000..c68d10f06d
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/wasm/regression-737069.js
@@ -0,0 +1,35 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --expose-wasm
+
+load("test/mjsunit/wasm/wasm-constants.js");
+load("test/mjsunit/wasm/wasm-module-builder.js");
+
+let binary = new Binary;
+
+binary.emit_header();
+binary.emit_section(kTypeSectionCode, section => {
+ section.emit_u32v(1); // number of types
+ section.emit_u8(kWasmFunctionTypeForm);
+ section.emit_u32v(0); // number of parameters
+ section.emit_u32v(0); // number of returns
+});
+binary.emit_section(kFunctionSectionCode, section => {
+ section.emit_u32v(1); // number of functions
+ section.emit_u32v(0); // type index
+});
+
+binary.emit_u8(kCodeSectionCode);
+binary.emit_u8(0x02); // section length
+binary.emit_u8(0x01); // number of functions
+binary.emit_u8(0x40); // function body size
+// Function body is missing here.
+
+let buffer = new ArrayBuffer(binary.length);
+let view = new Uint8Array(buffer);
+for (let i = 0; i < binary.length; i++) {
+ view[i] = binary[i] | 0;
+}
+WebAssembly.validate(buffer);
diff --git a/deps/v8/test/mjsunit/setters-on-elements.js b/deps/v8/test/mjsunit/setters-on-elements.js
index f90c510c22..48fa33b5fe 100644
--- a/deps/v8/test/mjsunit/setters-on-elements.js
+++ b/deps/v8/test/mjsunit/setters-on-elements.js
@@ -25,11 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --max-opt-count=100 --noalways-opt
-// Flags: --crankshaft
-
-// We specify max-opt-count because we opt/deopt the same function many
-// times.
+// Flags: --allow-natives-syntax --noalways-opt --opt
// It's nice to run this in other browsers too.
var standalone = false;
diff --git a/deps/v8/test/mjsunit/shared-function-tier-up-turbo.js b/deps/v8/test/mjsunit/shared-function-tier-up-turbo.js
index 56d07ad62b..95fa8d337c 100644
--- a/deps/v8/test/mjsunit/shared-function-tier-up-turbo.js
+++ b/deps/v8/test/mjsunit/shared-function-tier-up-turbo.js
@@ -3,7 +3,7 @@
// found in the LICENSE file.
//
// Flags: --mark-shared-functions-for-tier-up --allow-natives-syntax
-// Flags: --ignition --turbo --crankshaft --no-always-opt
+// Flags: --ignition --turbo --opt --no-always-opt
// Flags: --turbo-filter=*
// If we are always or never optimizing it is useless.
diff --git a/deps/v8/test/mjsunit/shift-for-integer-div.js b/deps/v8/test/mjsunit/shift-for-integer-div.js
index 7aadb4d237..9264242879 100644
--- a/deps/v8/test/mjsunit/shift-for-integer-div.js
+++ b/deps/v8/test/mjsunit/shift-for-integer-div.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --crankshaft --no-always-opt
+// Flags: --allow-natives-syntax --opt --no-always-opt
function divp4(x) {
return x / 4;
diff --git a/deps/v8/test/mjsunit/shifts.js b/deps/v8/test/mjsunit/shifts.js
index b91b3e8a00..37ba9d17c1 100644
--- a/deps/v8/test/mjsunit/shifts.js
+++ b/deps/v8/test/mjsunit/shifts.js
@@ -25,8 +25,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --nofull-compiler
-
// test a few corners cases with shifts
// The result of the shift is not a Smi.
diff --git a/deps/v8/test/mjsunit/sin-cos.js b/deps/v8/test/mjsunit/sin-cos.js
index 8c4b80e8c1..7af471d3c0 100644
--- a/deps/v8/test/mjsunit/sin-cos.js
+++ b/deps/v8/test/mjsunit/sin-cos.js
@@ -27,7 +27,7 @@
// Test Math.sin and Math.cos.
-// Flags: --allow-natives-syntax --crankshaft
+// Flags: --allow-natives-syntax --opt
assertEquals("-Infinity", String(1/Math.sin(-0)));
assertEquals(1, Math.cos(-0));
diff --git a/deps/v8/test/mjsunit/skipping-inner-functions.js b/deps/v8/test/mjsunit/skipping-inner-functions.js
new file mode 100644
index 0000000000..1c5538567f
--- /dev/null
+++ b/deps/v8/test/mjsunit/skipping-inner-functions.js
@@ -0,0 +1,37 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --experimental-preparser-scope-analysis
+
+(function TestBasicSkipping() {
+ var result = 0;
+
+ function lazy(ctxt_alloc_param) {
+ var ctxt_alloc_var = 10;
+ function skip_me() {
+ result = ctxt_alloc_param + ctxt_alloc_var;
+ }
+ return skip_me;
+ }
+ // Test that parameters and variables of the outer function get context
+ // allocated even if we skip the inner function.
+ lazy(9)();
+ assertEquals(19, result);
+})();
+
+(function TestSkippingFunctionWithEval() {
+ var result = 0;
+
+ function lazy(ctxt_alloc_param) {
+ var ctxt_alloc_var = 10;
+ function skip_me() {
+ eval('result = ctxt_alloc_param + ctxt_alloc_var');
+ }
+ return skip_me;
+ }
+ // Test that parameters and variables of the outer function get context
+ // allocated even if we skip the inner function.
+ lazy(9)();
+ assertEquals(19, result);
+})();
diff --git a/deps/v8/test/mjsunit/smi-mul-const.js b/deps/v8/test/mjsunit/smi-mul-const.js
index ef0685b7a9..e5255014dc 100644
--- a/deps/v8/test/mjsunit/smi-mul-const.js
+++ b/deps/v8/test/mjsunit/smi-mul-const.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --crankshaft --noalways-opt
+// Flags: --allow-natives-syntax --opt --noalways-opt
function check(func, input, expected) {
func(-1);
diff --git a/deps/v8/test/mjsunit/smi-mul.js b/deps/v8/test/mjsunit/smi-mul.js
index 236563590b..12d206abec 100644
--- a/deps/v8/test/mjsunit/smi-mul.js
+++ b/deps/v8/test/mjsunit/smi-mul.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --crankshaft --noalways-opt
+// Flags: --allow-natives-syntax --opt --noalways-opt
function mul(a, b) {
return a * b;
diff --git a/deps/v8/test/mjsunit/stack-traces.js b/deps/v8/test/mjsunit/stack-traces.js
index 9522178c0d..33552bbf5c 100644
--- a/deps/v8/test/mjsunit/stack-traces.js
+++ b/deps/v8/test/mjsunit/stack-traces.js
@@ -264,7 +264,7 @@ function testOmittedBuiltin(throwing, omitted) {
}
-testTrace("testArrayNative", testArrayNative, ["Array.map (native)"]);
+testTrace("testArrayNative", testArrayNative, ["Array.map"]);
testTrace("testNested", testNested, ["at one", "at two", "at three"]);
testTrace("testMethodNameInference", testMethodNameInference, ["at Foo.bar"]);
testTrace("testImplicitConversion", testImplicitConversion, ["at Nirk.valueOf"]);
diff --git a/deps/v8/test/mjsunit/string-case.js b/deps/v8/test/mjsunit/string-case.js
index 34c2340d33..b6934eb705 100644
--- a/deps/v8/test/mjsunit/string-case.js
+++ b/deps/v8/test/mjsunit/string-case.js
@@ -59,8 +59,9 @@ function test(length) {
strLower += String.fromCharCode(charCodeToLower(c));
strUpper += String.fromCharCode(charCodeToUpper(c));
}
- %FlattenString(strLower);
- %FlattenString(strUpper);
+ str = %FlattenString(str);
+ strLower = %FlattenString(strLower);
+ strUpper = %FlattenString(strUpper);
// Sequential string.
assertEquals(strLower, str.toLowerCase());
assertEquals(strUpper, str.toUpperCase());
diff --git a/deps/v8/test/mjsunit/strong-rooted-literals.js b/deps/v8/test/mjsunit/strong-rooted-literals.js
index c124a913da..55ce89e4ef 100644
--- a/deps/v8/test/mjsunit/strong-rooted-literals.js
+++ b/deps/v8/test/mjsunit/strong-rooted-literals.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --allow-natives-syntax --expose-gc --turbo --crankshaft
+// Flags: --allow-natives-syntax --expose-gc --turbo --opt
// Make sure literals are strongly rooted and safe from weak-code deopts.
diff --git a/deps/v8/test/mjsunit/type-profile/regress-707223.js b/deps/v8/test/mjsunit/type-profile/regress-707223.js
new file mode 100644
index 0000000000..078b687c51
--- /dev/null
+++ b/deps/v8/test/mjsunit/type-profile/regress-707223.js
@@ -0,0 +1,8 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --type-profile
+
+let e;
+eval("e");
diff --git a/deps/v8/test/mjsunit/unary-minus-deopt.js b/deps/v8/test/mjsunit/unary-minus-deopt.js
index cc3bede4d2..07f7e0e497 100644
--- a/deps/v8/test/mjsunit/unary-minus-deopt.js
+++ b/deps/v8/test/mjsunit/unary-minus-deopt.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax --crankshaft --no-always-opt
+// Flags: --allow-natives-syntax --opt --no-always-opt
// This is a boiled-down example happening in the Epic Citadel demo:
// After deopting, the multiplication for unary minus stayed in Smi
diff --git a/deps/v8/test/mjsunit/wasm/asm-wasm-expr.js b/deps/v8/test/mjsunit/wasm/asm-wasm-expr.js
index 3b20826fe7..ac42759788 100644
--- a/deps/v8/test/mjsunit/wasm/asm-wasm-expr.js
+++ b/deps/v8/test/mjsunit/wasm/asm-wasm-expr.js
@@ -23,7 +23,7 @@ const assign_in_stmt = [
"do { S } while (=)",
];
const assign_in_expr = [
- "i32_func(=)",
+ "i32_func(=) | 0",
"(=) ? E : E",
"E ? (=) : E",
"E ? E : (=)",
@@ -108,9 +108,6 @@ function DoTheTests(expr, assign, stmt) {
e = e.replace(/S/g, stmt);
var str = main.toString().replace("FUNC_BODY", "return (" + e + ") | 0;");
var asm_source = MODULE_TEMPLATE.toString().replace("FUNC_DECL", str);
- // TODO(titzer): a verbosity API for these kinds of tests?
- // print(asm_source);
-
doTest(asm_source, "(" + test + ") " + e);
}
@@ -123,8 +120,6 @@ function DoTheTests(expr, assign, stmt) {
e = e.replace(/S/g, stmt);
var str = main.toString().replace("FUNC_BODY", e + "; return 0;");
var asm_source = MODULE_TEMPLATE.toString().replace("FUNC_DECL", str);
-// print(asm_source);
-
doTest(asm_source, "(" + test + ") " + e);
}
@@ -134,9 +129,8 @@ function DoTheTests(expr, assign, stmt) {
var js_module = eval("(" + nonasm_source + ")")(stdlib, {}, buffer);
expect(js_module);
- var asmfunc = eval("(" + asm_source + ")");
-
print("Testing ASMJS: " + orig);
+ var asmfunc = eval("(" + asm_source + ")");
var asm_module = asmfunc(stdlib, {}, buffer);
assertTrue(%IsAsmWasmCode(asmfunc));
expect(asm_module);
diff --git a/deps/v8/test/mjsunit/wasm/asm-wasm.js b/deps/v8/test/mjsunit/wasm/asm-wasm.js
index a5d04ce4fe..9d7a807bc9 100644
--- a/deps/v8/test/mjsunit/wasm/asm-wasm.js
+++ b/deps/v8/test/mjsunit/wasm/asm-wasm.js
@@ -549,7 +549,6 @@ function TestHeapAccessIntTypes() {
assertValidAsm(module_decl);
assertEquals(7, module.caller());
assertEquals(7, memory_view[2]);
- assertEquals(7, module_decl(stdlib).caller());
assertValidAsm(module_decl);
}
}
@@ -1227,8 +1226,9 @@ TestForeignVariables();
return {load: load, iload: iload, store: store, storeb: storeb};
}
+ var memory = new ArrayBuffer(1024);
var module_decl = eval('(' + TestByteHeapAccessCompat.toString() + ')');
- var m = module_decl(stdlib);
+ var m = module_decl(stdlib, null, memory);
assertValidAsm(module_decl);
m.store(0, 20);
m.store(4, 21);
diff --git a/deps/v8/test/mjsunit/wasm/async-compile.js b/deps/v8/test/mjsunit/wasm/async-compile.js
index 135e39a9d8..b95930aa5a 100644
--- a/deps/v8/test/mjsunit/wasm/async-compile.js
+++ b/deps/v8/test/mjsunit/wasm/async-compile.js
@@ -7,43 +7,66 @@
load("test/mjsunit/wasm/wasm-constants.js");
load("test/mjsunit/wasm/wasm-module-builder.js");
-let ok_buffer = (() => {
- var builder = new WasmModuleBuilder();
- builder.addFunction("f", kSig_i_v)
- .addBody([kExprI32Const, 42])
- .exportAs("f");
- return builder.toBuffer();
-})();
-
-// The OK buffer validates and can be made into a module.
-assertTrue(WebAssembly.validate(ok_buffer));
-let ok_module = new WebAssembly.Module(ok_buffer);
-assertTrue(ok_module instanceof WebAssembly.Module);
-
-// The bad buffer does not validate and cannot be made into a module.
-let bad_buffer = new ArrayBuffer(0);
-assertFalse(WebAssembly.validate(bad_buffer));
-assertThrows(() => new WebAssembly.Module(bad_buffer), WebAssembly.CompileError);
-
-function checkModule(module) {
- assertTrue(module instanceof WebAssembly.Module);
+function assertCompiles(buffer) {
+ return assertPromiseResult(
+ WebAssembly.compile(buffer),
+ module => assertTrue(module instanceof WebAssembly.Module),
+ ex => assertUnreachable);
}
-function checkCompileError(ex) {
- assertTrue(ex instanceof WebAssembly.CompileError);
+function assertCompileError(buffer) {
+ return assertPromiseResult(
+ WebAssembly.compile(buffer), module => assertUnreachable,
+ ex => assertTrue(ex instanceof WebAssembly.CompileError));
}
-let kNumCompiles = 3;
+assertPromiseResult(async function basicCompile() {
+ let ok_buffer = (() => {
+ var builder = new WasmModuleBuilder();
+ builder.addFunction('f', kSig_i_v)
+ .addBody([kExprI32Const, 42])
+ .exportAs('f');
+ return builder.toBuffer();
+ })();
-// Three compilations of the OK module should succeed.
-for (var i = 0; i < kNumCompiles; i++) {
- assertPromiseResult(WebAssembly.compile(ok_buffer), checkModule,
- (ex) => assertUnreachable);
-}
+ // The OK buffer validates and can be made into a module.
+ assertTrue(WebAssembly.validate(ok_buffer));
+ let ok_module = new WebAssembly.Module(ok_buffer);
+ assertTrue(ok_module instanceof WebAssembly.Module);
-// Three compilations of the bad module should fail.
-for (var i = 0; i < kNumCompiles; i++) {
- assertPromiseResult(WebAssembly.compile(bad_buffer),
- (module) => assertUnreachable,
- checkCompileError);
-}
+ // The bad buffer does not validate and cannot be made into a module.
+ let bad_buffer = new ArrayBuffer(0);
+ assertFalse(WebAssembly.validate(bad_buffer));
+ assertThrows(
+ () => new WebAssembly.Module(bad_buffer), WebAssembly.CompileError);
+
+ let kNumCompiles = 3;
+
+ // Three compilations of the OK module should succeed.
+ for (var i = 0; i < kNumCompiles; i++) {
+ await assertCompiles(ok_buffer);
+ }
+
+ // Three compilations of the bad module should fail.
+ for (var i = 0; i < kNumCompiles; i++) {
+ await assertCompileError(bad_buffer);
+ }
+}());
+
+assertPromiseResult(async function badFunctionInTheMiddle() {
+ // We had an error where an exception was generated by a background task and
+ // later thrown in a foreground task. The handle to the exception died
+ // inbetween, since the HandleScope was left.
+ // This test reproduced that error.
+ let builder = new WasmModuleBuilder();
+ let sig = builder.addType(kSig_i_v);
+ for (var i = 0; i < 10; ++i) {
+ builder.addFunction('a' + i, sig).addBody([kExprI32Const, 42]);
+ }
+ builder.addFunction('bad', sig).addBody([]);
+ for (var i = 0; i < 10; ++i) {
+ builder.addFunction('b' + i, sig).addBody([kExprI32Const, 42]);
+ }
+ let buffer = builder.toBuffer();
+ await assertCompileError(buffer);
+}());
diff --git a/deps/v8/test/mjsunit/wasm/compilation-limits.js b/deps/v8/test/mjsunit/wasm/compilation-limits.js
index 1a4fa0a8ea..2cc38bdfea 100644
--- a/deps/v8/test/mjsunit/wasm/compilation-limits.js
+++ b/deps/v8/test/mjsunit/wasm/compilation-limits.js
@@ -106,8 +106,4 @@ async function TestAll() {
await FailAsyncInstantiate();
}
-%IncrementWaitCount();
-TestAll().then(
- () => { %DecrementWaitCount(); },
- () => { %DecrementWaitCount(); }
-);
+assertPromiseResult(TestAll());
diff --git a/deps/v8/test/mjsunit/wasm/gc-buffer.js b/deps/v8/test/mjsunit/wasm/gc-buffer.js
index 6bcf299d8b..f187d7dabe 100644
--- a/deps/v8/test/mjsunit/wasm/gc-buffer.js
+++ b/deps/v8/test/mjsunit/wasm/gc-buffer.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --expose-wasm --stress-gc --expose-gc
+// Flags: --expose-wasm --gc-interval=500 --stress-compaction --expose-gc
load("test/mjsunit/wasm/wasm-constants.js");
load("test/mjsunit/wasm/wasm-module-builder.js");
diff --git a/deps/v8/test/mjsunit/wasm/gc-stress.js b/deps/v8/test/mjsunit/wasm/gc-stress.js
index 2bf2f758d6..a6c408d3db 100644
--- a/deps/v8/test/mjsunit/wasm/gc-stress.js
+++ b/deps/v8/test/mjsunit/wasm/gc-stress.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --expose-wasm --stress-gc
+// Flags: --expose-wasm --gc-interval=500 --stress-compaction
load("test/mjsunit/wasm/wasm-constants.js");
load("test/mjsunit/wasm/wasm-module-builder.js");
diff --git a/deps/v8/test/mjsunit/wasm/huge-memory.js b/deps/v8/test/mjsunit/wasm/huge-memory.js
new file mode 100644
index 0000000000..9719ad4a28
--- /dev/null
+++ b/deps/v8/test/mjsunit/wasm/huge-memory.js
@@ -0,0 +1,76 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --wasm-max-mem-pages=49152
+
+// This test makes sure things don't break once we support >2GB wasm memories.
+load("test/mjsunit/wasm/wasm-constants.js");
+load("test/mjsunit/wasm/wasm-module-builder.js");
+
+function testHugeMemory() {
+ var builder = new WasmModuleBuilder();
+
+ const num_pages = 49152; // 3GB
+
+ builder.addMemory(num_pages, num_pages, true);
+ builder.addFunction("geti", kSig_i_ii)
+ .addBody([
+ kExprGetLocal, 0,
+ kExprGetLocal, 1,
+ kExprI32Mul,
+ kExprI32LoadMem, 0, 0,
+ ])
+ .exportFunc();
+
+ var module = builder.instantiate();
+ const geti = module.exports.geti;
+
+ print("In bounds");
+ assertEquals(0, geti(2500, 1 << 20));
+ print("Out of bounds");
+ assertTraps(kTrapMemOutOfBounds, () => geti(3500, 1 << 20));
+}
+testHugeMemory();
+
+function testHugeMemoryConstInBounds() {
+ var builder = new WasmModuleBuilder();
+
+ const num_pages = 49152; // 3GB
+
+ builder.addMemory(num_pages, num_pages, true);
+ builder.addFunction("geti", kSig_i_v)
+ .addBody([
+ kExprI32Const, 0x80, 0x80, 0x80, 0x80, 0x7A, // 0xA0000000, 2.5GB
+ kExprI32LoadMem, 0, 0,
+ ])
+ .exportFunc();
+
+ var module = builder.instantiate();
+ const geti = module.exports.geti;
+
+ print("In bounds");
+ assertEquals(0, geti());
+}
+testHugeMemoryConstInBounds();
+
+function testHugeMemoryConstOutOfBounds() {
+ var builder = new WasmModuleBuilder();
+
+ const num_pages = 49152; // 3GB
+
+ builder.addMemory(num_pages, num_pages, true);
+ builder.addFunction("geti", kSig_i_v)
+ .addBody([
+ kExprI32Const, 0x80, 0x80, 0x80, 0x80, 0x7E, // 0xE0000000, 3.5GB
+ kExprI32LoadMem, 0, 0,
+ ])
+ .exportFunc();
+
+ var module = builder.instantiate();
+ const geti = module.exports.geti;
+
+ print("Out of bounds");
+ assertTraps(kTrapMemOutOfBounds, geti);
+}
+testHugeMemoryConstOutOfBounds();
diff --git a/deps/v8/test/mjsunit/wasm/indirect-tables.js b/deps/v8/test/mjsunit/wasm/indirect-tables.js
index 7583d05968..9bc646e2f0 100644
--- a/deps/v8/test/mjsunit/wasm/indirect-tables.js
+++ b/deps/v8/test/mjsunit/wasm/indirect-tables.js
@@ -523,3 +523,34 @@ function js_div(a, b) { return (a / b) | 0; }
// Try to grow past imported maximum
assertThrows(() => table.grow(21));
})();
+
+(function InitImportedTableSignatureMismatch() {
+ // instance0 exports a function table and a main function which indirectly
+ // calls a function from the table.
+ let builder0 = new WasmModuleBuilder();
+ let sig_index = builder0.addType(kSig_i_v);
+ builder0.addFunction('main', kSig_i_i)
+ .addBody([
+ kExprGetLocal, 0, // -
+ kExprCallIndirect, sig_index, kTableZero
+ ])
+ .exportAs('main');
+ builder0.setFunctionTableLength(3);
+ builder0.addExportOfKind('table', kExternalTable);
+ let module0 = new WebAssembly.Module(builder0.toBuffer());
+ let instance0 = new WebAssembly.Instance(module0);
+
+ // instance1 imports the table and adds a function to it.
+ let builder1 = new WasmModuleBuilder();
+ builder1.addFunction('f', kSig_i_i).addBody([kExprGetLocal, 0]);
+ builder1.addImportedTable('z', 'table');
+ builder1.addFunctionTableInit(0, false, [0], true);
+ let module1 = new WebAssembly.Module(builder1.toBuffer());
+ let instance1 =
+ new WebAssembly.Instance(module1, {z: {table: instance0.exports.table}});
+
+ // Calling the main method on instance0 should fail, because the signature of
+ // the added function does not match.
+ assertThrows(
+ () => instance0.exports.main(0), WebAssembly.RuntimeError);
+})();
diff --git a/deps/v8/test/mjsunit/wasm/instantiate-module-basic.js b/deps/v8/test/mjsunit/wasm/instantiate-module-basic.js
index e876a7997f..d2489f3e89 100644
--- a/deps/v8/test/mjsunit/wasm/instantiate-module-basic.js
+++ b/deps/v8/test/mjsunit/wasm/instantiate-module-basic.js
@@ -70,7 +70,7 @@ function CheckInstance(instance) {
print('async instantiate...');
let instance_promise = WebAssembly.instantiate(buffer);
- assertPromiseResult(instance_promise, CheckInstance);
+ assertPromiseResult(instance_promise, pair => CheckInstance(pair.instance));
})();
// Check that validate works correctly for a module.
diff --git a/deps/v8/test/mjsunit/wasm/instantiate-run-basic.js b/deps/v8/test/mjsunit/wasm/instantiate-run-basic.js
index e9e9a9ac48..b0016ec9aa 100644
--- a/deps/v8/test/mjsunit/wasm/instantiate-run-basic.js
+++ b/deps/v8/test/mjsunit/wasm/instantiate-run-basic.js
@@ -2,19 +2,33 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --expose-wasm
+// Flags: --allow-natives-syntax
load("test/mjsunit/wasm/wasm-constants.js");
load("test/mjsunit/wasm/wasm-module-builder.js");
-(function BasicTest() {
- var kReturnValue = 15;
+const kReturnValue = 15;
+
+function getBuilder() {
var builder = new WasmModuleBuilder();
builder.addFunction("main", kSig_i_i)
.addBody([kExprI32Const, kReturnValue])
.exportFunc();
+ return builder;
+}
+(function BasicTest() {
+ var builder = getBuilder();
var main = builder.instantiate().exports.main;
assertEquals(kReturnValue, main());
})();
+
+(function AsyncTest() {
+ var builder = getBuilder();
+ var buffer = builder.toBuffer();
+ assertPromiseResult(
+ WebAssembly.instantiate(buffer)
+ .then(pair => pair.instance.exports.main(), assertUnreachable)
+ .then(result => assertEquals(kReturnValue, result), assertUnreachable));
+})();
diff --git a/deps/v8/test/mjsunit/wasm/js-api.js b/deps/v8/test/mjsunit/wasm/js-api.js
index 689a0adbc4..0f6b0816be 100644
--- a/deps/v8/test/mjsunit/wasm/js-api.js
+++ b/deps/v8/test/mjsunit/wasm/js-api.js
@@ -713,7 +713,6 @@ function assertCompileError(args, err, msg) {
var error = null;
assertPromiseResult(compile(...args), unexpectedSuccess, error => {
assertTrue(error instanceof err);
- assertTrue(Boolean(error.stack.match('js-api.js')));
// TODO assertTrue(Boolean(error.message.match(msg)));
});
}
@@ -760,7 +759,6 @@ function assertInstantiateError(args, err, msg) {
var error = null;
assertPromiseResult(instantiate(...args), unexpectedSuccess, error => {
assertTrue(error instanceof err);
- assertTrue(Boolean(error.stack.match('js-api.js')));
// TODO assertTrue(Boolean(error.message.match(msg)));
});
}
diff --git a/deps/v8/test/mjsunit/wasm/wasm-api-overloading.js b/deps/v8/test/mjsunit/wasm/wasm-api-overloading.js
new file mode 100644
index 0000000000..37320e54ce
--- /dev/null
+++ b/deps/v8/test/mjsunit/wasm/wasm-api-overloading.js
@@ -0,0 +1,53 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+load("test/mjsunit/wasm/wasm-constants.js");
+load("test/mjsunit/wasm/wasm-module-builder.js");
+
+%ResetWasmOverloads();
+let buffer = (() => {
+ let builder = new WasmModuleBuilder();
+ builder.addFunction("f", kSig_i_v)
+ .addBody([kExprI32Const, 42])
+ .exportAs("f");
+ return builder.toBuffer();
+})();
+
+var module = new WebAssembly.Module(buffer);
+var wrapper = [module];
+
+assertPromiseResult(
+ WebAssembly.instantiateStreaming(wrapper),
+ assertUnreachable,
+ e => assertTrue(e instanceof TypeError));
+
+assertPromiseResult(
+ WebAssembly.compileStreaming(wrapper),
+ assertUnreachable,
+ e => assertTrue(e instanceof TypeError));
+
+assertPromiseResult(
+ (() => {
+ %SetWasmCompileFromPromiseOverload();
+ return WebAssembly.compileStreaming(wrapper);
+ })(),
+ module => {
+ assertTrue(module instanceof WebAssembly.Module);
+ %ResetWasmOverloads();
+ },
+ assertUnreachable);
+
+assertPromiseResult(
+ (() => {
+ %SetWasmCompileFromPromiseOverload();
+ return WebAssembly.instantiateStreaming(wrapper);
+ })(),
+ pair => {
+ assertTrue(pair.instance instanceof WebAssembly.Instance);
+ assertTrue(pair.module instanceof WebAssembly.Module);
+ %ResetWasmOverloads();
+ },
+ assertUnreachable);
diff --git a/deps/v8/test/mkgrokdump/BUILD.gn b/deps/v8/test/mkgrokdump/BUILD.gn
new file mode 100644
index 0000000000..5359f675d0
--- /dev/null
+++ b/deps/v8/test/mkgrokdump/BUILD.gn
@@ -0,0 +1,27 @@
+# Copyright 2017 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("../../gni/v8.gni")
+
+v8_executable("mkgrokdump") {
+ testonly = true
+
+ # mkgrokdump is used to create tools/v8heapconst.py.
+
+ sources = [
+ "mkgrokdump.cc",
+ ]
+
+ configs = [ "../..:internal_config_base" ]
+
+ defines = []
+
+ deps = [
+ "../..:v8",
+ "../..:v8_libbase",
+ "../..:v8_libplatform",
+ "//build/config:exe_and_shlib_deps",
+ "//build/win:default_exe_manifest",
+ ]
+}
diff --git a/deps/v8/test/mkgrokdump/DEPS b/deps/v8/test/mkgrokdump/DEPS
new file mode 100644
index 0000000000..3e73aa244f
--- /dev/null
+++ b/deps/v8/test/mkgrokdump/DEPS
@@ -0,0 +1,3 @@
+include_rules = [
+ "+src",
+]
diff --git a/deps/v8/test/mkgrokdump/README b/deps/v8/test/mkgrokdump/README
new file mode 100644
index 0000000000..2ee5ab099f
--- /dev/null
+++ b/deps/v8/test/mkgrokdump/README
@@ -0,0 +1,3 @@
+If you change the heap layout, expect this test to fail (in CQ). You will then
+need to build x64 release and run `<outdir>/mkgrokdump > tools/v8heapconst.py`
+to rebaseline.
diff --git a/deps/v8/test/mkgrokdump/mkgrokdump.cc b/deps/v8/test/mkgrokdump/mkgrokdump.cc
new file mode 100644
index 0000000000..e5a41a13ba
--- /dev/null
+++ b/deps/v8/test/mkgrokdump/mkgrokdump.cc
@@ -0,0 +1,133 @@
+// Copyright 2012 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <stdio.h>
+
+#include "include/libplatform/libplatform.h"
+#include "include/v8.h"
+
+#include "src/frames.h"
+#include "src/heap/heap.h"
+#include "src/heap/spaces.h"
+#include "src/isolate.h"
+#include "src/objects-inl.h"
+
+namespace v8 {
+
+static const char* kHeader =
+ "# Copyright 2017 the V8 project authors. All rights reserved.\n"
+ "# Use of this source code is governed by a BSD-style license that can\n"
+ "# be found in the LICENSE file.\n"
+ "\n"
+ "# This file is automatically generated by mkgrokdump and should not\n"
+ "# be modified manually.\n"
+ "\n"
+ "# List of known V8 instance types.\n";
+
+// Non-snapshot builds allocate objects to different places.
+// Debug builds emit debug code, affecting code object sizes.
+#if defined(V8_USE_SNAPSHOT) && !defined(DEBUG)
+static const char* kBuild = "shipping";
+#else
+static const char* kBuild = "non-shipping";
+#endif
+
+class MockArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
+ public:
+ void* Allocate(size_t length) override { return nullptr; }
+ void* AllocateUninitialized(size_t length) override { return nullptr; }
+ void Free(void* p, size_t) override {}
+};
+
+static int DumpHeapConstants(const char* argv0) {
+ // Start up V8.
+ v8::Platform* platform = v8::platform::CreateDefaultPlatform();
+ v8::V8::InitializePlatform(platform);
+ v8::V8::Initialize();
+ v8::V8::InitializeExternalStartupData(argv0);
+ Isolate::CreateParams create_params;
+ MockArrayBufferAllocator mock_arraybuffer_allocator;
+ create_params.array_buffer_allocator = &mock_arraybuffer_allocator;
+ Isolate* isolate = Isolate::New(create_params);
+ {
+ Isolate::Scope scope(isolate);
+ i::Heap* heap = reinterpret_cast<i::Isolate*>(isolate)->heap();
+ i::PrintF("%s", kHeader);
+#define DUMP_TYPE(T) i::PrintF(" %d: \"%s\",\n", i::T, #T);
+ i::PrintF("INSTANCE_TYPES = {\n");
+ INSTANCE_TYPE_LIST(DUMP_TYPE)
+ i::PrintF("}\n");
+#undef DUMP_TYPE
+
+ // Dump the KNOWN_MAP table to the console.
+ i::PrintF("\n# List of known V8 maps.\n");
+#define ROOT_LIST_CASE(type, name, camel_name) \
+ if (n == NULL && o == heap->name()) n = #camel_name;
+#define STRUCT_LIST_CASE(upper_name, camel_name, name) \
+ if (n == NULL && o == heap->name##_map()) n = #camel_name "Map";
+ i::HeapObjectIterator it(heap->map_space());
+ i::PrintF("KNOWN_MAPS = {\n");
+ for (i::Object* o = it.Next(); o != NULL; o = it.Next()) {
+ i::Map* m = i::Map::cast(o);
+ const char* n = NULL;
+ intptr_t p = reinterpret_cast<intptr_t>(m) & 0x7ffff;
+ int t = m->instance_type();
+ ROOT_LIST(ROOT_LIST_CASE)
+ STRUCT_LIST(STRUCT_LIST_CASE)
+ if (n == NULL) continue;
+ i::PrintF(" 0x%05" V8PRIxPTR ": (%d, \"%s\"),\n", p, t, n);
+ }
+ i::PrintF("}\n");
+#undef STRUCT_LIST_CASE
+#undef ROOT_LIST_CASE
+
+ // Dump the KNOWN_OBJECTS table to the console.
+ i::PrintF("\n# List of known V8 objects.\n");
+#define ROOT_LIST_CASE(type, name, camel_name) \
+ if (n == NULL && o == heap->name()) { \
+ n = #camel_name; \
+ i = i::Heap::k##camel_name##RootIndex; \
+ }
+ i::OldSpaces spit(heap);
+ i::PrintF("KNOWN_OBJECTS = {\n");
+ for (i::PagedSpace* s = spit.next(); s != NULL; s = spit.next()) {
+ i::HeapObjectIterator it(s);
+ // Code objects are generally platform-dependent.
+ if (s->identity() == i::CODE_SPACE) continue;
+ const char* sname = AllocationSpaceName(s->identity());
+ for (i::Object* o = it.Next(); o != NULL; o = it.Next()) {
+ const char* n = NULL;
+ i::Heap::RootListIndex i = i::Heap::kStrongRootListLength;
+ intptr_t p = reinterpret_cast<intptr_t>(o) & 0x7ffff;
+ ROOT_LIST(ROOT_LIST_CASE)
+ if (n == NULL) continue;
+ if (!i::Heap::RootIsImmortalImmovable(i)) continue;
+ i::PrintF(" (\"%s\", 0x%05" V8PRIxPTR "): \"%s\",\n", sname, p, n);
+ }
+ }
+ i::PrintF("}\n");
+#undef ROOT_LIST_CASE
+
+ // Dump frame markers
+ i::PrintF("\n# List of known V8 Frame Markers.\n");
+#define DUMP_MARKER(T, class) i::PrintF(" \"%s\",\n", #T);
+ i::PrintF("FRAME_MARKERS = (\n");
+ STACK_FRAME_TYPE_LIST(DUMP_MARKER)
+ i::PrintF(")\n");
+#undef DUMP_TYPE
+ }
+
+ i::PrintF("\n# This set of constants is generated from a %s build.\n",
+ kBuild);
+
+ // Teardown.
+ isolate->Dispose();
+ v8::V8::ShutdownPlatform();
+ delete platform;
+ return 0;
+}
+
+} // namespace v8
+
+int main(int argc, char* argv[]) { return v8::DumpHeapConstants(argv[0]); }
diff --git a/deps/v8/test/mkgrokdump/mkgrokdump.gyp b/deps/v8/test/mkgrokdump/mkgrokdump.gyp
new file mode 100644
index 0000000000..56f9ad14e0
--- /dev/null
+++ b/deps/v8/test/mkgrokdump/mkgrokdump.gyp
@@ -0,0 +1,46 @@
+# Copyright 2017 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'variables': {
+ 'v8_code': 1,
+ },
+ 'includes': ['../../gypfiles/toolchain.gypi', '../../gypfiles/features.gypi'],
+ 'targets': [
+ {
+ 'target_name': 'mkgrokdump',
+ 'type': 'executable',
+ 'dependencies': [
+ '../../src/v8.gyp:v8',
+ '../../src/v8.gyp:v8_libbase',
+ '../../src/v8.gyp:v8_libplatform',
+ ],
+ 'include_dirs': [
+ '../..',
+ ],
+ 'sources': [
+ 'mkgrokdump.cc',
+ ],
+ },
+ ],
+ 'conditions': [
+ ['test_isolation_mode != "noop"', {
+ 'targets': [
+ {
+ 'target_name': 'mkgrokdump_run',
+ 'type': 'none',
+ 'dependencies': [
+ 'mkgrokdump',
+ ],
+ 'includes': [
+ '../../gypfiles/isolate.gypi',
+ ],
+ 'sources': [
+ 'mkgrokdump.isolate',
+ ],
+ },
+ ],
+ }],
+ ],
+}
diff --git a/deps/v8/test/mkgrokdump/mkgrokdump.isolate b/deps/v8/test/mkgrokdump/mkgrokdump.isolate
new file mode 100644
index 0000000000..b2cbc32551
--- /dev/null
+++ b/deps/v8/test/mkgrokdump/mkgrokdump.isolate
@@ -0,0 +1,17 @@
+# Copyright 2017 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+{
+ 'variables': {
+ 'files': [
+ './mkgrokdump.status',
+ './testcfg.py',
+ '../../tools/v8heapconst.py',
+ '<(PRODUCT_DIR)/mkgrokdump<(EXECUTABLE_SUFFIX)',
+ ],
+ },
+ 'includes': [
+ '../../src/base.isolate',
+ '../../tools/testrunner/testrunner.isolate',
+ ],
+}
diff --git a/deps/v8/test/mkgrokdump/mkgrokdump.status b/deps/v8/test/mkgrokdump/mkgrokdump.status
new file mode 100644
index 0000000000..8fd6a0417a
--- /dev/null
+++ b/deps/v8/test/mkgrokdump/mkgrokdump.status
@@ -0,0 +1,10 @@
+# Copyright 2017 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+[
+# Only test for default mode x64.
+['variant != default or arch != x64', {
+ '*': [SKIP],
+}], # variant != default or arch != x64
+]
diff --git a/deps/v8/test/mkgrokdump/testcfg.py b/deps/v8/test/mkgrokdump/testcfg.py
new file mode 100644
index 0000000000..c47b59de4a
--- /dev/null
+++ b/deps/v8/test/mkgrokdump/testcfg.py
@@ -0,0 +1,49 @@
+# Copyright 2017 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import os
+import difflib
+
+from testrunner.local import testsuite
+from testrunner.objects import testcase
+
+
+class MkGrokdump(testsuite.TestSuite):
+
+ def __init__(self, name, root):
+ super(MkGrokdump, self).__init__(name, root)
+
+ def ListTests(self, context):
+ test = testcase.TestCase(self, self.shell())
+ return [test]
+
+ def GetFlagsForTestCase(self, testcase, context):
+ return []
+
+ def IsFailureOutput(self, testcase):
+ output = testcase.output
+ v8_path = os.path.dirname(os.path.dirname(os.path.abspath(self.root)))
+ expected_path = os.path.join(v8_path, "tools", "v8heapconst.py")
+ with open(expected_path) as f:
+ expected = f.read()
+ expected_lines = expected.splitlines()
+ actual_lines = output.stdout.splitlines()
+ diff = difflib.unified_diff(expected_lines, actual_lines, lineterm="",
+ fromfile="expected_path")
+ diffstring = '\n'.join(diff)
+ if diffstring is not "":
+ if "generated from a non-shipping build" in output.stdout:
+ return False
+ if not "generated from a shipping build" in output.stdout:
+ output.stdout = "Unexpected output:\n\n" + output.stdout
+ return True
+ output.stdout = diffstring
+ return True
+ return False
+
+ def shell(self):
+ return "mkgrokdump"
+
+def GetSuite(name, root):
+ return MkGrokdump(name, root)
diff --git a/deps/v8/test/mozilla/mozilla.status b/deps/v8/test/mozilla/mozilla.status
index 01dfa9ae8f..a30172ab58 100644
--- a/deps/v8/test/mozilla/mozilla.status
+++ b/deps/v8/test/mozilla/mozilla.status
@@ -932,14 +932,14 @@
'js1_5/GC/regress-203278-2': [PASS, TIMEOUT, NO_VARIANTS],
}], # 'arch == mipsel or arch == mips64el or arch == mips64'
-['arch == mipsel and simulator_run == True', {
+['arch == mipsel and simulator_run', {
# Crashes due to C stack overflow.
'js1_5/extensions/regress-355497': [SKIP],
-}], # 'arch == mipsel and simulator_run == True'
+}], # 'arch == mipsel and simulator_run'
-['arch == mips64el and simulator_run == True', {
+['arch == mips64el and simulator_run', {
'js1_5/extensions/regress-355497': [FAIL_OK, 'Flags: --sim-stack-size=512'],
-}], # 'arch == mips64el and simulator_run == True'
+}], # 'arch == mips64el and simulator_run'
['arch == mips', {
@@ -960,13 +960,13 @@
'js1_5/GC/regress-203278-2': [PASS, TIMEOUT, NO_VARIANTS],
}], # 'arch == mips'
-['arch == arm and simulator_run == True', {
+['arch == arm and simulator_run', {
#BUG(3837): Crashes due to C stack overflow.
'js1_5/extensions/regress-355497': [SKIP],
-}], # 'arch == arm and simulator_run == True'
+}], # 'arch == arm and simulator_run'
-['arch == arm64 and simulator_run == True', {
+['arch == arm64 and simulator_run', {
'js1_5/GC/regress-203278-2': [SKIP],
@@ -988,7 +988,7 @@
#BUG(3152): Avoid C stack overflow.
'js1_5/extensions/regress-355497': [FAIL_OK, 'Flags: --sim-stack-size=512'],
-}], # 'arch == arm64 and simulator_run == True'
+}], # 'arch == arm64 and simulator_run'
['variant == wasm_traps', {
'*': [SKIP],
diff --git a/deps/v8/test/test262/local-tests/test/language/module-code/comment-single-line-html-close-comment-before-function.js b/deps/v8/test/test262/local-tests/test/language/module-code/comment-single-line-html-close-comment-before-function.js
new file mode 100644
index 0000000000..92d7507cff
--- /dev/null
+++ b/deps/v8/test/test262/local-tests/test/language/module-code/comment-single-line-html-close-comment-before-function.js
@@ -0,0 +1,16 @@
+// Copyright (C) 2017 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: >
+ HTML-like comments are not available in module code
+ (SingleLineHTMLCloseComment)
+esid: sec-html-like-comments
+es6id: B1.3
+negative:
+ phase: early
+ type: SyntaxError
+flags: [module]
+---*/
+
+-->
+function f(){}
diff --git a/deps/v8/test/test262/local-tests/test/language/module-code/comment-single-line-html-close-comment-newline-before-function.js b/deps/v8/test/test262/local-tests/test/language/module-code/comment-single-line-html-close-comment-newline-before-function.js
new file mode 100644
index 0000000000..19b0c99250
--- /dev/null
+++ b/deps/v8/test/test262/local-tests/test/language/module-code/comment-single-line-html-close-comment-newline-before-function.js
@@ -0,0 +1,15 @@
+// Copyright (C) 2017 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: >
+ HTML-like comments are not available in module code
+ (SingleLineHTMLCloseComment)
+esid: sec-html-like-comments
+es6id: B1.3
+negative:
+ phase: early
+ type: SyntaxError
+flags: [module]
+---*/
+-->
+function f(){}
diff --git a/deps/v8/test/test262/test262.status b/deps/v8/test/test262/test262.status
index e9fb30ae9e..920ce3293f 100644
--- a/deps/v8/test/test262/test262.status
+++ b/deps/v8/test/test262/test262.status
@@ -117,7 +117,6 @@
'built-ins/TypedArray/prototype/slice/detached-buffer-custom-ctor-other-targettype': [FAIL],
'built-ins/TypedArray/prototype/slice/detached-buffer-custom-ctor-same-targettype': [FAIL],
'built-ins/TypedArray/prototype/slice/detached-buffer-get-ctor': [FAIL],
- 'built-ins/TypedArray/prototype/slice/detached-buffer-speciesctor-get-species-custom-ctor-throws': [FAIL],
'built-ins/TypedArray/prototype/some/callbackfn-detachbuffer': [FAIL],
'built-ins/TypedArray/prototype/sort/detached-buffer-comparefn': [FAIL],
# DataView functions should also throw on detached buffers
@@ -158,27 +157,6 @@
'built-ins/DataView/prototype/setUint8/detached-buffer': [FAIL],
'built-ins/DataView/prototype/setUint8/detached-buffer-before-outofrange-byteoffset': [FAIL],
- # https://bugs.chromium.org/p/v8/issues/detail?id=4648
- 'built-ins/TypedArray/prototype/copyWithin/detached-buffer': [FAIL],
- 'built-ins/TypedArray/prototype/every/detached-buffer': [FAIL],
- 'built-ins/TypedArray/prototype/fill/detached-buffer': [FAIL],
- 'built-ins/TypedArray/prototype/filter/detached-buffer': [FAIL],
- 'built-ins/TypedArray/prototype/find/detached-buffer': [FAIL],
- 'built-ins/TypedArray/prototype/findIndex/detached-buffer': [FAIL],
- 'built-ins/TypedArray/prototype/forEach/detached-buffer': [FAIL],
- 'built-ins/TypedArray/prototype/includes/detached-buffer': [FAIL],
- 'built-ins/TypedArray/prototype/indexOf/detached-buffer': [FAIL],
- 'built-ins/TypedArray/prototype/join/detached-buffer': [FAIL],
- 'built-ins/TypedArray/prototype/lastIndexOf/detached-buffer': [FAIL],
- 'built-ins/TypedArray/prototype/map/detached-buffer': [FAIL],
- 'built-ins/TypedArray/prototype/reverse/detached-buffer': [FAIL],
- 'built-ins/TypedArray/prototype/slice/detached-buffer': [FAIL],
- 'built-ins/TypedArray/prototype/some/detached-buffer': [FAIL],
- 'built-ins/TypedArray/prototype/sort/detached-buffer': [FAIL],
- 'built-ins/TypedArray/prototype/subarray/detached-buffer': [FAIL],
- 'built-ins/TypedArray/prototype/toLocaleString/detached-buffer': [FAIL],
- 'built-ins/TypedArray/prototype/toString/detached-buffer': [FAIL],
-
# https://bugs.chromium.org/p/v8/issues/detail?id=4034
'built-ins/ThrowTypeError/unique-per-realm-function-proto': [FAIL],
@@ -278,14 +256,14 @@
'built-ins/TypedArrays/internals/Set/conversion-operation-consistent-nan': [PASS, FAIL],
# https://bugs.chromium.org/p/v8/issues/detail?id=5070
- 'annexB/built-ins/Object/prototype/__defineGetter__/define-non-configurable': [FAIL],
- 'annexB/built-ins/Object/prototype/__defineGetter__/define-non-extensible': [FAIL],
- 'annexB/built-ins/Object/prototype/__defineGetter__/this-non-obj': [FAIL],
- 'annexB/built-ins/Object/prototype/__defineSetter__/define-non-configurable': [FAIL],
- 'annexB/built-ins/Object/prototype/__defineSetter__/define-non-extensible': [FAIL],
- 'annexB/built-ins/Object/prototype/__defineSetter__/this-non-obj': [FAIL],
- 'annexB/built-ins/Object/prototype/__lookupGetter__/this-non-obj': [FAIL],
- 'annexB/built-ins/Object/prototype/__lookupSetter__/this-non-obj': [FAIL],
+ 'annexB/built-ins/Object/prototype/__defineGetter__/define-non-configurable': ['--harmony-strict-legacy-accessor-builtins'],
+ 'annexB/built-ins/Object/prototype/__defineGetter__/define-non-extensible': ['--harmony-strict-legacy-accessor-builtins'],
+ 'annexB/built-ins/Object/prototype/__defineGetter__/this-non-obj': ['--harmony-strict-legacy-accessor-builtins'],
+ 'annexB/built-ins/Object/prototype/__defineSetter__/define-non-configurable': ['--harmony-strict-legacy-accessor-builtins'],
+ 'annexB/built-ins/Object/prototype/__defineSetter__/define-non-extensible': ['--harmony-strict-legacy-accessor-builtins'],
+ 'annexB/built-ins/Object/prototype/__defineSetter__/this-non-obj': ['--harmony-strict-legacy-accessor-builtins'],
+ 'annexB/built-ins/Object/prototype/__lookupGetter__/this-non-obj': ['--harmony-strict-legacy-accessor-builtins'],
+ 'annexB/built-ins/Object/prototype/__lookupSetter__/this-non-obj': ['--harmony-strict-legacy-accessor-builtins'],
# https://bugs.chromium.org/p/v8/issues/detail?id=4451
# https://github.com/tc39/ecma262/issues/753
@@ -391,9 +369,6 @@
'language/statements/async-function/early-errors-declaration-formals-body-duplicate': [FAIL],
# Module-related tests
- # v8:5485
- 'language/module-code/comment-multi-line-html*': [FAIL],
- 'language/module-code/comment-single-line-html*': [FAIL],
# v8:5487
'language/module-code/namespace/internals/get-own-property-str-found-uninit': [FAIL],
# https://github.com/tc39/ecma262/pull/858
@@ -421,36 +396,6 @@
# https://bugs.chromium.org/p/v8/issues/detail?id=5601
'intl402/PluralRules/*': [SKIP],
- # https://bugs.chromium.org/p/v8/issues/detail?id=5855
- 'language/expressions/async-generators/*': ['--harmony-async-iteration'],
- 'language/statements/async-generator/*': ['--harmony-async-iteration'],
-
- # https://bugs.chromium.org/p/v8/issues/detail?id=6226
- 'language/expressions/async-generator/named-yield-star-async-next': [FAIL],
- 'language/expressions/async-generator/named-yield-star-async-return': [FAIL],
- 'language/expressions/async-generator/named-yield-star-async-throw': [FAIL],
- 'language/expressions/async-generator/yield-star-async-next': [FAIL],
- 'language/expressions/async-generator/yield-star-async-return': [FAIL],
- 'language/expressions/async-generator/yield-star-async-throw': [FAIL],
- 'language/expressions/class/async-gen-method-static-yield-star-async-next': [FAIL],
- 'language/expressions/class/async-gen-method-static-yield-star-async-return': [FAIL],
- 'language/expressions/class/async-gen-method-static-yield-star-async-throw': [FAIL],
- 'language/expressions/class/async-gen-method-yield-star-async-next': [FAIL],
- 'language/expressions/class/async-gen-method-yield-star-async-return': [FAIL],
- 'language/expressions/class/async-gen-method-yield-star-async-throw': [FAIL],
- 'language/expressions/object/method-definition/async-gen-yield-star-async-next': [FAIL],
- 'language/expressions/object/method-definition/async-gen-yield-star-async-return': [FAIL],
- 'language/expressions/object/method-definition/async-gen-yield-star-async-throw': [FAIL],
- 'language/statements/async-generator/yield-star-async-next': [FAIL],
- 'language/statements/async-generator/yield-star-async-return': [FAIL],
- 'language/statements/async-generator/yield-star-async-throw': [FAIL],
- 'language/statements/class/async-gen-method-static-yield-star-async-next': [FAIL],
- 'language/statements/class/async-gen-method-static-yield-star-async-return': [FAIL],
- 'language/statements/class/async-gen-method-static-yield-star-async-throw': [FAIL],
- 'language/statements/class/async-gen-method-yield-star-async-next': [FAIL],
- 'language/statements/class/async-gen-method-yield-star-async-return': [FAIL],
- 'language/statements/class/async-gen-method-yield-star-async-throw': [FAIL],
-
# https://bugs.chromium.org/p/v8/issues/detail?id=6242
'language/expressions/async-generator/named-yield-star-sync-next': [FAIL],
'language/expressions/async-generator/named-yield-star-sync-return': [FAIL],
@@ -552,18 +497,6 @@
'built-ins/TypedArrays/buffer-arg-use-default-proto-if-custom-proto-is-not-object-sab': ['--harmony-sharedarraybuffer'],
'built-ins/TypedArrays/internals/Get/indexed-value-sab': ['--harmony-sharedarraybuffer'],
- # https://bugs.chromium.org/p/v8/issues/detail?id=5961
- 'built-ins/Atomics/add/good-views': ['--harmony-sharedarraybuffer', FAIL],
- 'built-ins/Atomics/and/good-views': ['--harmony-sharedarraybuffer', FAIL],
- 'built-ins/Atomics/compareExchange/good-views': ['--harmony-sharedarraybuffer', FAIL],
- 'built-ins/Atomics/exchange/good-views': ['--harmony-sharedarraybuffer', FAIL],
- 'built-ins/Atomics/load/good-views': ['--harmony-sharedarraybuffer', FAIL],
- 'built-ins/Atomics/or/good-views': ['--harmony-sharedarraybuffer', FAIL],
- 'built-ins/Atomics/store/good-views': ['--harmony-sharedarraybuffer', FAIL],
- 'built-ins/Atomics/sub/good-views': ['--harmony-sharedarraybuffer', FAIL],
- 'built-ins/Atomics/wake/good-views': ['--harmony-sharedarraybuffer', FAIL],
- 'built-ins/Atomics/xor/good-views': ['--harmony-sharedarraybuffer', FAIL],
-
# https://bugs.chromium.org/p/v8/issues/detail?id=6045
'intl402/NumberFormat/prototype/format/11.3.2_TRF': [FAIL],
'intl402/NumberFormat/prototype/format/11.3.2_TRP': [FAIL],
@@ -597,19 +530,6 @@
# https://code.google.com/p/v8/issues/detail?id=4693
'language/block-scope/syntax/redeclaration-in-block/attempt-to-redeclare-function-declaration-with-function-declaration': [PASS, FAIL_SLOPPY],
- # https://bugs.chromium.org/p/v8/issues/detail?id=4953
- 'built-ins/TypedArray/prototype/subarray/speciesctor-get-ctor': [FAIL],
- 'built-ins/TypedArray/prototype/subarray/speciesctor-get-ctor-abrupt': [FAIL],
- 'built-ins/TypedArray/prototype/subarray/speciesctor-get-ctor-inherited': [FAIL],
- 'built-ins/TypedArray/prototype/subarray/speciesctor-get-ctor-returns-throws': [FAIL],
- 'built-ins/TypedArray/prototype/subarray/speciesctor-get-species': [FAIL],
- 'built-ins/TypedArray/prototype/subarray/speciesctor-get-species-abrupt': [FAIL],
- 'built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor': [FAIL],
- 'built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor-invocation': [FAIL],
- 'built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor-returns-another-instance': [FAIL],
- 'built-ins/TypedArray/prototype/subarray/speciesctor-get-species-custom-ctor-throws': [FAIL],
- 'built-ins/TypedArray/prototype/subarray/speciesctor-get-species-returns-throws': [FAIL],
-
# We do not expose Array.prototype.values due to webcompat issues.
# Most recent incompatability: https://crbug.com/615873
# https://code.google.com/p/v8/issues/detail?id=4247
@@ -712,7 +632,7 @@
# compilation of parenthesized function literals. Needs investigation.
'language/statements/function/S13.2.1_A1_T1': [SKIP],
- # BUG(3251225): Tests that timeout with --nocrankshaft.
+ # BUG(3251225): Tests that timeout with --noopt.
'built-ins/decodeURI/S15.1.3.1_A2.4_T1': [SKIP],
'built-ins/decodeURI/S15.1.3.1_A2.5_T1': [SKIP],
'built-ins/decodeURIComponent/S15.1.3.2_A2.4_T1': [SKIP],
@@ -721,16 +641,24 @@
'built-ins/encodeURIComponent/S15.1.3.4_A2.3_T1': [SKIP],
}], # 'arch == arm or arch == mipsel or arch == mips or arch == arm64'
+['byteorder == big', {
+ # Test failures on big endian platforms due to the way the tests
+ # are written
+
+ # https://github.com/tc39/test262/issues/757
+ 'built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-other-type': [SKIP],
+}],
+
['asan == True', {
# BUG(v8:4653): Test262 tests which rely on quit() are not compatible with
# asan's --omit-quit flag.
'built-ins/Promise/prototype/then/deferred-is-resolved-value': [SKIP],
}], # asan == True
-['variant != default and asan', {
- # BUG(chromium:710428).
+['asan and variant in [noturbofan, noturbofan_stress, fullcode]', {
+ # Demands too many resources to test the old pipeline with asan.
'*': [SKIP],
-}], # variant != default and asan
+}], # asan and variant in [noturbofan, noturbofan_stress, fullcode]
['asan == True or msan == True or tsan == True', {
# https://bugs.chromium.org/p/v8/issues/detail?id=4639
diff --git a/deps/v8/test/unittests/BUILD.gn b/deps/v8/test/unittests/BUILD.gn
index 6bdc3199d9..ece24ad1c1 100644
--- a/deps/v8/test/unittests/BUILD.gn
+++ b/deps/v8/test/unittests/BUILD.gn
@@ -8,6 +8,7 @@ v8_executable("unittests") {
testonly = true
sources = [
+ "../../test/common/wasm/wasm-macro-gen.h",
"../../testing/gmock-support.h",
"../../testing/gtest-support.h",
"api/access-check-unittest.cc",
@@ -17,6 +18,8 @@ v8_executable("unittests") {
"api/remote-object-unittest.cc",
"api/v8-object-unittest.cc",
"asmjs/asm-scanner-unittest.cc",
+ "asmjs/asm-types-unittest.cc",
+ "asmjs/switch-logic-unittest.cc",
"base/atomic-utils-unittest.cc",
"base/bits-unittest.cc",
"base/cpu-unittest.cc",
@@ -35,8 +38,6 @@ v8_executable("unittests") {
"base/utils/random-number-generator-unittest.cc",
"cancelable-tasks-unittest.cc",
"char-predicates-unittest.cc",
- "compiler-dispatcher/compiler-dispatcher-helper.cc",
- "compiler-dispatcher/compiler-dispatcher-helper.h",
"compiler-dispatcher/compiler-dispatcher-job-unittest.cc",
"compiler-dispatcher/compiler-dispatcher-tracer-unittest.cc",
"compiler-dispatcher/compiler-dispatcher-unittest.cc",
@@ -101,25 +102,29 @@ v8_executable("unittests") {
"eh-frame-iterator-unittest.cc",
"eh-frame-writer-unittest.cc",
"heap/bitmap-unittest.cc",
+ "heap/concurrent-marking-deque-unittest.cc",
"heap/embedder-tracing-unittest.cc",
"heap/gc-idle-time-handler-unittest.cc",
"heap/gc-tracer-unittest.cc",
"heap/heap-unittest.cc",
+ "heap/item-parallel-job-unittest.cc",
"heap/marking-unittest.cc",
"heap/memory-reducer-unittest.cc",
"heap/scavenge-job-unittest.cc",
"heap/slot-set-unittest.cc",
"heap/spaces-unittest.cc",
"heap/unmapper-unittest.cc",
+ "heap/workstealing-marking-deque-unittest.cc",
"interpreter/bytecode-array-builder-unittest.cc",
"interpreter/bytecode-array-iterator-unittest.cc",
"interpreter/bytecode-array-random-iterator-unittest.cc",
"interpreter/bytecode-array-writer-unittest.cc",
"interpreter/bytecode-decoder-unittest.cc",
+ "interpreter/bytecode-node-unittest.cc",
"interpreter/bytecode-operands-unittest.cc",
- "interpreter/bytecode-pipeline-unittest.cc",
"interpreter/bytecode-register-allocator-unittest.cc",
"interpreter/bytecode-register-optimizer-unittest.cc",
+ "interpreter/bytecode-source-info-unittest.cc",
"interpreter/bytecode-utils.h",
"interpreter/bytecodes-unittest.cc",
"interpreter/constant-array-builder-unittest.cc",
@@ -130,21 +135,23 @@ v8_executable("unittests") {
"libplatform/worker-thread-unittest.cc",
"locked-queue-unittest.cc",
"object-unittest.cc",
+ "parser/preparser-unittest.cc",
"register-configuration-unittest.cc",
"run-all-unittests.cc",
"source-position-table-unittest.cc",
+ "test-helpers.cc",
+ "test-helpers.h",
"test-utils.cc",
"test-utils.h",
"unicode-unittest.cc",
"value-serializer-unittest.cc",
- "wasm/asm-types-unittest.cc",
"wasm/control-transfer-unittest.cc",
"wasm/decoder-unittest.cc",
"wasm/function-body-decoder-unittest.cc",
"wasm/leb-helper-unittest.cc",
"wasm/loop-assignment-analysis-unittest.cc",
"wasm/module-decoder-unittest.cc",
- "wasm/switch-logic-unittest.cc",
+ "wasm/streaming-decoder-unittest.cc",
"wasm/wasm-macro-gen-unittest.cc",
"wasm/wasm-module-builder-unittest.cc",
"wasm/wasm-opcodes-unittest.cc",
@@ -183,30 +190,15 @@ v8_executable("unittests") {
#}],
deps = [
- "../..:v8_builtins_generators",
+ "../..:v8_for_testing",
"../..:v8_libbase",
"../..:v8_libplatform",
- "//build/config/sanitizers:deps",
+ "//build/config:exe_and_shlib_deps",
"//build/win:default_exe_manifest",
"//testing/gmock",
"//testing/gtest",
]
- if (v8_enable_i18n_support) {
- deps += [ "//third_party/icu" ]
- }
-
- defines = []
-
- if (is_component_build) {
- # unittests can't be built against a shared library, so we
- # need to depend on the underlying static target in that case.
- deps += [ "../..:v8_maybe_snapshot" ]
- defines += [ "BUILDING_V8_SHARED" ]
- } else {
- deps += [ "../..:v8" ]
- }
-
if (is_win) {
# This warning is benignly triggered by the U16 and U32 macros in
# bytecode-utils.h.
diff --git a/deps/v8/test/unittests/asmjs/asm-scanner-unittest.cc b/deps/v8/test/unittests/asmjs/asm-scanner-unittest.cc
index 9924244ec7..c7a68d23ef 100644
--- a/deps/v8/test/unittests/asmjs/asm-scanner-unittest.cc
+++ b/deps/v8/test/unittests/asmjs/asm-scanner-unittest.cc
@@ -209,6 +209,26 @@ TEST_F(AsmJsScannerTest, Numbers) {
CheckForEnd();
}
+TEST_F(AsmJsScannerTest, UnsignedNumbers) {
+ SetupSource("0x7fffffff 0x80000000 0xffffffff 0x100000000");
+
+ CHECK(scanner.IsUnsigned());
+ CHECK_EQ(0x7fffffff, scanner.AsUnsigned());
+ scanner.Next();
+
+ CHECK(scanner.IsUnsigned());
+ CHECK_EQ(0x80000000, scanner.AsUnsigned());
+ scanner.Next();
+
+ CHECK(scanner.IsUnsigned());
+ CHECK_EQ(0xffffffff, scanner.AsUnsigned());
+ scanner.Next();
+
+ // Numeric "unsigned" literals with a payload of more than 32-bit are rejected
+ // by asm.js in all contexts, we hence consider `0x100000000` to be an error.
+ CheckForParseError();
+}
+
TEST_F(AsmJsScannerTest, BadNumber) {
SetupSource(".123fe");
Skip('.');
@@ -254,7 +274,7 @@ TEST_F(AsmJsScannerTest, TrailingCComment) {
TEST_F(AsmJsScannerTest, Seeking) {
SetupSource("var eval do arguments function break\n");
Skip(TOK(var));
- int old_pos = scanner.GetPosition();
+ size_t old_pos = scanner.Position();
Skip(TOK(eval));
Skip(TOK(do));
Skip(TOK(arguments));
@@ -262,6 +282,7 @@ TEST_F(AsmJsScannerTest, Seeking) {
Skip(TOK(arguments));
scanner.Rewind();
scanner.Seek(old_pos);
+ Skip(TOK(eval));
Skip(TOK(do));
Skip(TOK(arguments));
Skip(TOK(function));
diff --git a/deps/v8/test/unittests/wasm/asm-types-unittest.cc b/deps/v8/test/unittests/asmjs/asm-types-unittest.cc
index ebdd74a9f4..3ffe6c0622 100644
--- a/deps/v8/test/unittests/wasm/asm-types-unittest.cc
+++ b/deps/v8/test/unittests/asmjs/asm-types-unittest.cc
@@ -250,7 +250,8 @@ TEST_F(AsmTypeTest, IsExactly) {
Overload(Function(Type::Int)(Type::Double)),
Function(Type::Int)(Type::Int, Type::Int),
Type::MinMaxType(zone(), Type::Signed(), Type::Int()),
- Function(Type::Int)(Type::Float), Type::FroundType(zone()),
+ Function(Type::Int)(Type::Float),
+ Type::FroundType(zone()),
Type::FFIType(zone()),
Type::FunctionTableType(zone(), 10, Function(Type::Void)()),
};
@@ -285,7 +286,8 @@ TEST_F(AsmTypeTest, IsA) {
Overload(Function(Type::Int)(Type::Double)),
Function(Type::Int)(Type::Int, Type::Int),
Type::MinMaxType(zone(), Type::Signed(), Type::Int()),
- Function(Type::Int)(Type::Float), Type::FroundType(zone()),
+ Function(Type::Int)(Type::Float),
+ Type::FroundType(zone()),
Type::FFIType(zone()),
Type::FunctionTableType(zone(), 10, Function(Type::Void)()),
};
@@ -470,7 +472,8 @@ TEST_F(AsmTypeTest, ToReturnType) {
Overload(Function(Type::Int)(Type::Double)),
Function(Type::Int)(Type::Int, Type::Int),
Type::MinMaxType(zone(), Type::Signed(), Type::Int()),
- Function(Type::Int)(Type::Float), Type::FroundType(zone()),
+ Function(Type::Int)(Type::Float),
+ Type::FroundType(zone()),
Type::FFIType(zone()),
Type::FunctionTableType(zone(), 10, Function(Type::Void)()),
};
@@ -496,7 +499,8 @@ TEST_F(AsmTypeTest, IsReturnType) {
Overload(Function(Type::Int)(Type::Double)),
Function(Type::Int)(Type::Int, Type::Int),
Type::MinMaxType(zone(), Type::Signed(), Type::Int()),
- Function(Type::Int)(Type::Float), Type::FroundType(zone()),
+ Function(Type::Int)(Type::Float),
+ Type::FroundType(zone()),
Type::FFIType(zone()),
Type::FunctionTableType(zone(), 10, Function(Type::Void)()),
};
@@ -529,7 +533,8 @@ TEST_F(AsmTypeTest, ToParameterType) {
Overload(Function(Type::Int)(Type::Double)),
Function(Type::Int)(Type::Int, Type::Int),
Type::MinMaxType(zone(), Type::Signed(), Type::Int()),
- Function(Type::Int)(Type::Float), Type::FroundType(zone()),
+ Function(Type::Int)(Type::Float),
+ Type::FroundType(zone()),
Type::FFIType(zone()),
Type::FunctionTableType(zone(), 10, Function(Type::Void)()),
};
@@ -556,7 +561,8 @@ TEST_F(AsmTypeTest, IsParameterType) {
Overload(Function(Type::Int)(Type::Double)),
Function(Type::Int)(Type::Int, Type::Int),
Type::MinMaxType(zone(), Type::Signed(), Type::Int()),
- Function(Type::Int)(Type::Float), Type::FroundType(zone()),
+ Function(Type::Int)(Type::Float),
+ Type::FroundType(zone()),
Type::FFIType(zone()),
Type::FunctionTableType(zone(), 10, Function(Type::Void)()),
};
@@ -584,7 +590,8 @@ TEST_F(AsmTypeTest, IsComparableType) {
Overload(Function(Type::Int)(Type::Double)),
Function(Type::Int)(Type::Int, Type::Int),
Type::MinMaxType(zone(), Type::Signed(), Type::Int()),
- Function(Type::Int)(Type::Float), Type::FroundType(zone()),
+ Function(Type::Int)(Type::Float),
+ Type::FroundType(zone()),
Type::FFIType(zone()),
Type::FunctionTableType(zone(), 10, Function(Type::Void)()),
};
@@ -612,7 +619,8 @@ TEST_F(AsmTypeTest, ElementSizeInBytes) {
Overload(Function(Type::Int)(Type::Double)),
Function(Type::Int)(Type::Int, Type::Int),
Type::MinMaxType(zone(), Type::Signed(), Type::Int()),
- Function(Type::Int)(Type::Float), Type::FroundType(zone()),
+ Function(Type::Int)(Type::Float),
+ Type::FroundType(zone()),
Type::FFIType(zone()),
Type::FunctionTableType(zone(), 10, Function(Type::Void)()),
};
@@ -650,7 +658,8 @@ TEST_F(AsmTypeTest, LoadType) {
Overload(Function(Type::Int)(Type::Double)),
Function(Type::Int)(Type::Int, Type::Int),
Type::MinMaxType(zone(), Type::Signed(), Type::Int()),
- Function(Type::Int)(Type::Float), Type::FroundType(zone()),
+ Function(Type::Int)(Type::Float),
+ Type::FroundType(zone()),
Type::FFIType(zone()),
Type::FunctionTableType(zone(), 10, Function(Type::Void)()),
};
@@ -688,7 +697,8 @@ TEST_F(AsmTypeTest, StoreType) {
Overload(Function(Type::Int)(Type::Double)),
Function(Type::Int)(Type::Int, Type::Int),
Type::MinMaxType(zone(), Type::Signed(), Type::Int()),
- Function(Type::Int)(Type::Float), Type::FroundType(zone()),
+ Function(Type::Int)(Type::Float),
+ Type::FroundType(zone()),
Type::FFIType(zone()),
Type::FunctionTableType(zone(), 10, Function(Type::Void)()),
};
diff --git a/deps/v8/test/unittests/wasm/switch-logic-unittest.cc b/deps/v8/test/unittests/asmjs/switch-logic-unittest.cc
index cc3fbb05cc..cc3fbb05cc 100644
--- a/deps/v8/test/unittests/wasm/switch-logic-unittest.cc
+++ b/deps/v8/test/unittests/asmjs/switch-logic-unittest.cc
diff --git a/deps/v8/test/unittests/base/bits-unittest.cc b/deps/v8/test/unittests/base/bits-unittest.cc
index 3d17a050db..2bb4956d71 100644
--- a/deps/v8/test/unittests/base/bits-unittest.cc
+++ b/deps/v8/test/unittests/base/bits-unittest.cc
@@ -117,7 +117,8 @@ TEST(Bits, RoundUpToPowerOfTwo32) {
TRACED_FORRANGE(uint32_t, shift, 0, 31) {
EXPECT_EQ(1u << shift, RoundUpToPowerOfTwo32(1u << shift));
}
- EXPECT_EQ(0u, RoundUpToPowerOfTwo32(0));
+ EXPECT_EQ(1u, RoundUpToPowerOfTwo32(0));
+ EXPECT_EQ(1u, RoundUpToPowerOfTwo32(1));
EXPECT_EQ(4u, RoundUpToPowerOfTwo32(3));
EXPECT_EQ(0x80000000u, RoundUpToPowerOfTwo32(0x7fffffffu));
}
@@ -125,7 +126,24 @@ TEST(Bits, RoundUpToPowerOfTwo32) {
TEST(BitsDeathTest, DISABLE_IN_RELEASE(RoundUpToPowerOfTwo32)) {
ASSERT_DEATH_IF_SUPPORTED({ RoundUpToPowerOfTwo32(0x80000001u); },
- "0x80000000");
+ "Check failed:.* << 31");
+}
+
+TEST(Bits, RoundUpToPowerOfTwo64) {
+ TRACED_FORRANGE(uint64_t, shift, 0, 63) {
+ uint64_t value = uint64_t{1} << shift;
+ EXPECT_EQ(value, RoundUpToPowerOfTwo64(value));
+ }
+ EXPECT_EQ(uint64_t{1}, RoundUpToPowerOfTwo64(0));
+ EXPECT_EQ(uint64_t{1}, RoundUpToPowerOfTwo64(1));
+ EXPECT_EQ(uint64_t{4}, RoundUpToPowerOfTwo64(3));
+ EXPECT_EQ(uint64_t{1} << 63, RoundUpToPowerOfTwo64((uint64_t{1} << 63) - 1));
+ EXPECT_EQ(uint64_t{1} << 63, RoundUpToPowerOfTwo64(uint64_t{1} << 63));
+}
+
+TEST(BitsDeathTest, DISABLE_IN_RELEASE(RoundUpToPowerOfTwo64)) {
+ ASSERT_DEATH_IF_SUPPORTED({ RoundUpToPowerOfTwo64((uint64_t{1} << 63) + 1); },
+ "Check failed:.* << 63");
}
diff --git a/deps/v8/test/unittests/base/iterator-unittest.cc b/deps/v8/test/unittests/base/iterator-unittest.cc
index 8da26ce20e..c5fe7bc505 100644
--- a/deps/v8/test/unittests/base/iterator-unittest.cc
+++ b/deps/v8/test/unittests/base/iterator-unittest.cc
@@ -42,7 +42,7 @@ TEST(IteratorTest, IteratorRangeArray) {
TEST(IteratorTest, IteratorRangeDeque) {
- typedef std::deque<unsigned> C;
+ typedef std::deque<int> C;
C c;
c.push_back(1);
c.push_back(2);
diff --git a/deps/v8/test/unittests/base/logging-unittest.cc b/deps/v8/test/unittests/base/logging-unittest.cc
index e59456f4fc..35da8a33db 100644
--- a/deps/v8/test/unittests/base/logging-unittest.cc
+++ b/deps/v8/test/unittests/base/logging-unittest.cc
@@ -63,11 +63,11 @@ TEST(LoggingTest, CompareAgainstStaticConstPointer) {
CHECK_SUCCEED(GT, 0, v8::internal::Smi::kMinValue);
}
-TEST(LoggingTest, CompareWithDifferentSignedness) {
#define CHECK_BOTH(name, lhs, rhs) \
CHECK_##name(lhs, rhs); \
DCHECK_##name(lhs, rhs)
+TEST(LoggingTest, CompareWithDifferentSignedness) {
int32_t i32 = 10;
uint32_t u32 = 20;
int64_t i64 = 30;
@@ -82,5 +82,18 @@ TEST(LoggingTest, CompareWithDifferentSignedness) {
CHECK_BOTH(IMPLIES, !u32, !i64);
}
+TEST(LoggingTest, CompareWithReferenceType) {
+ int32_t i32 = 10;
+ uint32_t u32 = 20;
+ int64_t i64 = 30;
+ uint64_t u64 = 40;
+
+ // All these checks should compile (!) and succeed.
+ CHECK_BOTH(EQ, i32 + 10, *&u32);
+ CHECK_BOTH(LT, *&i32, u64);
+ CHECK_BOTH(IMPLIES, *&i32, i64);
+ CHECK_BOTH(IMPLIES, *&i32, u64);
+}
+
} // namespace base
} // namespace v8
diff --git a/deps/v8/test/unittests/base/platform/platform-unittest.cc b/deps/v8/test/unittests/base/platform/platform-unittest.cc
index 0f0fb375b1..098b989a60 100644
--- a/deps/v8/test/unittests/base/platform/platform-unittest.cc
+++ b/deps/v8/test/unittests/base/platform/platform-unittest.cc
@@ -5,6 +5,8 @@
#include "src/base/platform/platform.h"
#if V8_OS_POSIX
+#include <setjmp.h>
+#include <signal.h>
#include <unistd.h> // NOLINT
#endif
@@ -96,5 +98,106 @@ TEST_F(ThreadLocalStorageTest, DoTest) {
Join();
}
+#if V8_OS_POSIX
+// TODO(eholk): Add a windows version of these tests
+
+namespace {
+
+// These tests make sure the routines to allocate memory do so with the correct
+// permissions.
+//
+// Unfortunately, there is no API to find the protection of a memory address,
+// so instead we test permissions by installing a signal handler, probing a
+// memory location and recovering from the fault.
+//
+// We don't test the execution permission because to do so we'd have to
+// dynamically generate code and test if we can execute it.
+
+class MemoryAllocationPermissionsTest : public ::testing::Test {
+ static void SignalHandler(int signal, siginfo_t* info, void*) {
+ siglongjmp(continuation_, 1);
+ }
+ struct sigaction old_action_;
+// On Mac, sometimes we get SIGBUS instead of SIGSEGV.
+#if V8_OS_MACOSX
+ struct sigaction old_bus_action_;
+#endif
+
+ protected:
+ virtual void SetUp() {
+ struct sigaction action;
+ action.sa_sigaction = SignalHandler;
+ sigemptyset(&action.sa_mask);
+ action.sa_flags = SA_SIGINFO;
+ sigaction(SIGSEGV, &action, &old_action_);
+#if V8_OS_MACOSX
+ sigaction(SIGBUS, &action, &old_bus_action_);
+#endif
+ }
+
+ virtual void TearDown() {
+ // be a good citizen and restore the old signal handler.
+ sigaction(SIGSEGV, &old_action_, nullptr);
+#if V8_OS_MACOSX
+ sigaction(SIGBUS, &old_bus_action_, nullptr);
+#endif
+ }
+
+ public:
+ static sigjmp_buf continuation_;
+
+ enum class MemoryAction { kRead, kWrite };
+
+ void ProbeMemory(volatile int* buffer, MemoryAction action,
+ bool should_succeed) {
+ const int save_sigs = 1;
+ if (!sigsetjmp(continuation_, save_sigs)) {
+ switch (action) {
+ case MemoryAction::kRead: {
+ USE(*buffer);
+ break;
+ }
+ case MemoryAction::kWrite: {
+ *buffer = 0;
+ break;
+ }
+ }
+ if (should_succeed) {
+ SUCCEED();
+ } else {
+ FAIL();
+ }
+ return;
+ }
+ if (should_succeed) {
+ FAIL();
+ } else {
+ SUCCEED();
+ }
+ }
+
+ void TestPermissions(OS::MemoryPermission permission, bool can_read,
+ bool can_write) {
+ const size_t allocation_size = OS::CommitPageSize();
+ size_t actual = 0;
+ int* buffer =
+ static_cast<int*>(OS::Allocate(allocation_size, &actual, permission));
+ ProbeMemory(buffer, MemoryAction::kRead, can_read);
+ ProbeMemory(buffer, MemoryAction::kWrite, can_write);
+ OS::Free(buffer, actual);
+ }
+};
+
+sigjmp_buf MemoryAllocationPermissionsTest::continuation_;
+
+TEST_F(MemoryAllocationPermissionsTest, DoTest) {
+ TestPermissions(OS::MemoryPermission::kNoAccess, false, false);
+ TestPermissions(OS::MemoryPermission::kReadWrite, true, true);
+ TestPermissions(OS::MemoryPermission::kReadWriteExecute, true, true);
+}
+
+} // namespace
+#endif // V8_OS_POSIX
+
} // namespace base
} // namespace v8
diff --git a/deps/v8/test/unittests/char-predicates-unittest.cc b/deps/v8/test/unittests/char-predicates-unittest.cc
index d2b71c275f..a34e3a1680 100644
--- a/deps/v8/test/unittests/char-predicates-unittest.cc
+++ b/deps/v8/test/unittests/char-predicates-unittest.cc
@@ -84,8 +84,7 @@ TEST(CharPredicatesTest, IdentifierPart) {
EXPECT_FALSE(IdentifierPart::Is(0x2E2F));
}
-
-#ifdef V8_I18N_SUPPORT
+#ifdef V8_INTL_SUPPORT
TEST(CharPredicatesTest, SupplementaryPlaneIdentifiers) {
// Both ID_Start and ID_Continue.
EXPECT_TRUE(IdentifierStart::Is(0x10403)); // Category Lu
@@ -113,7 +112,7 @@ TEST(CharPredicatesTest, SupplementaryPlaneIdentifiers) {
EXPECT_FALSE(IdentifierStart::Is(0x1F4A9)); // Category So
EXPECT_FALSE(IdentifierPart::Is(0x1F4A9));
}
-#endif // V8_I18N_SUPPORT
+#endif // V8_INTL_SUPPORT
} // namespace internal
} // namespace v8
diff --git a/deps/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-job-unittest.cc b/deps/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-job-unittest.cc
index bcacf04f48..da13758b12 100644
--- a/deps/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-job-unittest.cc
+++ b/deps/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-job-unittest.cc
@@ -15,7 +15,7 @@
#include "src/isolate-inl.h"
#include "src/parsing/parse-info.h"
#include "src/v8.h"
-#include "test/unittests/compiler-dispatcher/compiler-dispatcher-helper.h"
+#include "test/unittests/test-helpers.h"
#include "test/unittests/test-utils.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -72,7 +72,7 @@ TEST_F(CompilerDispatcherJobTest, ConstructWithoutSFI) {
tracer(), FLAG_stack_size,
test::CreateSource(i_isolate(), resource.get()), 0,
static_cast<int>(resource->length()), SLOPPY, 1, false, false, false,
- false, i_isolate()->heap()->HashSeed(), i_isolate()->allocator(),
+ i_isolate()->heap()->HashSeed(), i_isolate()->allocator(),
ScriptCompiler::kNoCompileOptions, i_isolate()->ast_string_constants(),
callback.get()));
}
@@ -109,7 +109,7 @@ TEST_F(CompilerDispatcherJobTest, StateTransitionsParseWithCallback) {
tracer(), FLAG_stack_size,
test::CreateSource(i_isolate(), resource.get()), 0,
static_cast<int>(resource->length()), SLOPPY, 1, false, false, false,
- false, i_isolate()->heap()->HashSeed(), i_isolate()->allocator(),
+ i_isolate()->heap()->HashSeed(), i_isolate()->allocator(),
ScriptCompiler::kNoCompileOptions, i_isolate()->ast_string_constants(),
callback.get()));
ASSERT_TRUE(job->status() == CompileJobStatus::kReadyToParse);
diff --git a/deps/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-unittest.cc b/deps/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-unittest.cc
index e54e6992b3..143b5d4ad5 100644
--- a/deps/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-unittest.cc
+++ b/deps/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-unittest.cc
@@ -18,7 +18,7 @@
#include "src/parsing/parse-info.h"
#include "src/parsing/parsing.h"
#include "src/v8.h"
-#include "test/unittests/compiler-dispatcher/compiler-dispatcher-helper.h"
+#include "test/unittests/test-helpers.h"
#include "test/unittests/test-utils.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -891,8 +891,8 @@ TEST_F(CompilerDispatcherTest, EnqueueWithoutSFI) {
ASSERT_TRUE(callback->result() == nullptr);
ASSERT_TRUE(dispatcher.Enqueue(CreateSource(i_isolate(), resource.get()), 0,
static_cast<int>(resource->length()), SLOPPY,
- 1, false, false, false, false, 0,
- callback.get(), nullptr));
+ 1, false, false, false, 0, callback.get(),
+ nullptr));
ASSERT_TRUE(!dispatcher.jobs_.empty());
ASSERT_TRUE(dispatcher.jobs_.begin()->second->status() ==
CompileJobStatus::kReadyToParse);
diff --git a/deps/v8/test/unittests/compiler-dispatcher/optimizing-compile-dispatcher-unittest.cc b/deps/v8/test/unittests/compiler-dispatcher/optimizing-compile-dispatcher-unittest.cc
index 5bd957af54..df545aa06e 100644
--- a/deps/v8/test/unittests/compiler-dispatcher/optimizing-compile-dispatcher-unittest.cc
+++ b/deps/v8/test/unittests/compiler-dispatcher/optimizing-compile-dispatcher-unittest.cc
@@ -12,7 +12,7 @@
#include "src/isolate.h"
#include "src/objects-inl.h"
#include "src/parsing/parse-info.h"
-#include "test/unittests/compiler-dispatcher/compiler-dispatcher-helper.h"
+#include "test/unittests/test-helpers.h"
#include "test/unittests/test-utils.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/deps/v8/test/unittests/compiler/bytecode-analysis-unittest.cc b/deps/v8/test/unittests/compiler/bytecode-analysis-unittest.cc
index 20d67e687d..b330e81a53 100644
--- a/deps/v8/test/unittests/compiler/bytecode-analysis-unittest.cc
+++ b/deps/v8/test/unittests/compiler/bytecode-analysis-unittest.cc
@@ -90,7 +90,7 @@ class BytecodeAnalysisTest : public TestWithIsolateAndZone {
SaveFlags* BytecodeAnalysisTest::save_flags_ = nullptr;
TEST_F(BytecodeAnalysisTest, EmptyBlock) {
- interpreter::BytecodeArrayBuilder builder(isolate(), zone(), 3, 0, 3);
+ interpreter::BytecodeArrayBuilder builder(isolate(), zone(), 3, 3);
std::vector<std::pair<std::string, std::string>> expected_liveness;
interpreter::Register reg_0(0);
@@ -104,7 +104,7 @@ TEST_F(BytecodeAnalysisTest, EmptyBlock) {
}
TEST_F(BytecodeAnalysisTest, SimpleLoad) {
- interpreter::BytecodeArrayBuilder builder(isolate(), zone(), 3, 0, 3);
+ interpreter::BytecodeArrayBuilder builder(isolate(), zone(), 3, 3);
std::vector<std::pair<std::string, std::string>> expected_liveness;
interpreter::Register reg_0(0);
@@ -121,7 +121,7 @@ TEST_F(BytecodeAnalysisTest, SimpleLoad) {
}
TEST_F(BytecodeAnalysisTest, StoreThenLoad) {
- interpreter::BytecodeArrayBuilder builder(isolate(), zone(), 3, 0, 3);
+ interpreter::BytecodeArrayBuilder builder(isolate(), zone(), 3, 3);
std::vector<std::pair<std::string, std::string>> expected_liveness;
interpreter::Register reg_0(0);
@@ -141,7 +141,7 @@ TEST_F(BytecodeAnalysisTest, StoreThenLoad) {
}
TEST_F(BytecodeAnalysisTest, DiamondLoad) {
- interpreter::BytecodeArrayBuilder builder(isolate(), zone(), 3, 0, 3);
+ interpreter::BytecodeArrayBuilder builder(isolate(), zone(), 3, 3);
std::vector<std::pair<std::string, std::string>> expected_liveness;
interpreter::Register reg_0(0);
@@ -178,7 +178,7 @@ TEST_F(BytecodeAnalysisTest, DiamondLoad) {
}
TEST_F(BytecodeAnalysisTest, DiamondLookupsAndBinds) {
- interpreter::BytecodeArrayBuilder builder(isolate(), zone(), 3, 0, 3);
+ interpreter::BytecodeArrayBuilder builder(isolate(), zone(), 3, 3);
std::vector<std::pair<std::string, std::string>> expected_liveness;
interpreter::Register reg_0(0);
@@ -225,7 +225,7 @@ TEST_F(BytecodeAnalysisTest, DiamondLookupsAndBinds) {
}
TEST_F(BytecodeAnalysisTest, SimpleLoop) {
- interpreter::BytecodeArrayBuilder builder(isolate(), zone(), 3, 0, 3);
+ interpreter::BytecodeArrayBuilder builder(isolate(), zone(), 3, 3);
std::vector<std::pair<std::string, std::string>> expected_liveness;
interpreter::Register reg_0(0);
@@ -235,9 +235,10 @@ TEST_F(BytecodeAnalysisTest, SimpleLoop) {
builder.StoreAccumulatorInRegister(reg_0);
expected_liveness.emplace_back("..LL", "L.LL");
- interpreter::LoopBuilder loop_builder(&builder);
- loop_builder.LoopHeader();
{
+ interpreter::LoopBuilder loop_builder(&builder);
+ loop_builder.LoopHeader();
+
builder.JumpIfTrue(ToBooleanMode::kConvertToBoolean,
loop_builder.break_labels()->New());
expected_liveness.emplace_back("L.LL", "L.L.");
@@ -252,7 +253,6 @@ TEST_F(BytecodeAnalysisTest, SimpleLoop) {
loop_builder.JumpToHeader(0);
expected_liveness.emplace_back("L.LL", "L.LL");
}
- loop_builder.EndLoop();
builder.LoadAccumulatorWithRegister(reg_2);
expected_liveness.emplace_back("..L.", "...L");
@@ -266,7 +266,7 @@ TEST_F(BytecodeAnalysisTest, SimpleLoop) {
}
TEST_F(BytecodeAnalysisTest, TryCatch) {
- interpreter::BytecodeArrayBuilder builder(isolate(), zone(), 3, 0, 3);
+ interpreter::BytecodeArrayBuilder builder(isolate(), zone(), 3, 3);
std::vector<std::pair<std::string, std::string>> expected_liveness;
interpreter::Register reg_0(0);
@@ -311,7 +311,7 @@ TEST_F(BytecodeAnalysisTest, TryCatch) {
}
TEST_F(BytecodeAnalysisTest, DiamondInLoop) {
- interpreter::BytecodeArrayBuilder builder(isolate(), zone(), 3, 0, 3);
+ interpreter::BytecodeArrayBuilder builder(isolate(), zone(), 3, 3);
std::vector<std::pair<std::string, std::string>> expected_liveness;
interpreter::Register reg_0(0);
@@ -321,9 +321,10 @@ TEST_F(BytecodeAnalysisTest, DiamondInLoop) {
builder.StoreAccumulatorInRegister(reg_0);
expected_liveness.emplace_back("...L", "L..L");
- interpreter::LoopBuilder loop_builder(&builder);
- loop_builder.LoopHeader();
{
+ interpreter::LoopBuilder loop_builder(&builder);
+ loop_builder.LoopHeader();
+
builder.JumpIfTrue(ToBooleanMode::kConvertToBoolean,
loop_builder.break_labels()->New());
expected_liveness.emplace_back("L..L", "L..L");
@@ -350,7 +351,6 @@ TEST_F(BytecodeAnalysisTest, DiamondInLoop) {
loop_builder.JumpToHeader(0);
expected_liveness.emplace_back("L..L", "L..L");
}
- loop_builder.EndLoop();
builder.Return();
expected_liveness.emplace_back("...L", "....");
@@ -361,7 +361,7 @@ TEST_F(BytecodeAnalysisTest, DiamondInLoop) {
}
TEST_F(BytecodeAnalysisTest, KillingLoopInsideLoop) {
- interpreter::BytecodeArrayBuilder builder(isolate(), zone(), 3, 0, 3);
+ interpreter::BytecodeArrayBuilder builder(isolate(), zone(), 3, 3);
std::vector<std::pair<std::string, std::string>> expected_liveness;
interpreter::Register reg_0(0);
@@ -370,9 +370,10 @@ TEST_F(BytecodeAnalysisTest, KillingLoopInsideLoop) {
builder.StoreAccumulatorInRegister(reg_0);
expected_liveness.emplace_back(".L.L", "LL..");
- interpreter::LoopBuilder loop_builder(&builder);
- loop_builder.LoopHeader();
{
+ interpreter::LoopBuilder loop_builder(&builder);
+ loop_builder.LoopHeader();
+
builder.LoadAccumulatorWithRegister(reg_0);
expected_liveness.emplace_back("LL..", ".L..");
@@ -383,9 +384,10 @@ TEST_F(BytecodeAnalysisTest, KillingLoopInsideLoop) {
loop_builder.break_labels()->New());
expected_liveness.emplace_back(".L.L", ".L.L");
- interpreter::LoopBuilder inner_loop_builder(&builder);
- inner_loop_builder.LoopHeader();
{
+ interpreter::LoopBuilder inner_loop_builder(&builder);
+ inner_loop_builder.LoopHeader();
+
builder.StoreAccumulatorInRegister(reg_0);
expected_liveness.emplace_back(".L.L", "LL.L");
@@ -397,13 +399,11 @@ TEST_F(BytecodeAnalysisTest, KillingLoopInsideLoop) {
inner_loop_builder.JumpToHeader(1);
expected_liveness.emplace_back(".L.L", ".L.L");
}
- inner_loop_builder.EndLoop();
loop_builder.BindContinueTarget();
loop_builder.JumpToHeader(0);
expected_liveness.emplace_back("LL..", "LL..");
}
- loop_builder.EndLoop();
builder.Return();
expected_liveness.emplace_back("...L", "....");
diff --git a/deps/v8/test/unittests/compiler/int64-lowering-unittest.cc b/deps/v8/test/unittests/compiler/int64-lowering-unittest.cc
index 2afeed6c00..5604b81ecd 100644
--- a/deps/v8/test/unittests/compiler/int64-lowering-unittest.cc
+++ b/deps/v8/test/unittests/compiler/int64-lowering-unittest.cc
@@ -603,7 +603,8 @@ TEST_F(Int64LoweringTest, F64ReinterpretI64) {
MachineRepresentation::kFloat64);
Capture<Node*> stack_slot_capture;
- Matcher<Node*> stack_slot_matcher = IsStackSlot(sizeof(int64_t));
+ Matcher<Node*> stack_slot_matcher =
+ IsStackSlot(StackSlotRepresentation(sizeof(int64_t), 0));
Capture<Node*> store_capture;
Matcher<Node*> store_matcher =
@@ -634,7 +635,8 @@ TEST_F(Int64LoweringTest, I64ReinterpretF64) {
MachineRepresentation::kWord64);
Capture<Node*> stack_slot;
- Matcher<Node*> stack_slot_matcher = IsStackSlot(sizeof(int64_t));
+ Matcher<Node*> stack_slot_matcher =
+ IsStackSlot(StackSlotRepresentation(sizeof(int64_t), 0));
Capture<Node*> store;
Matcher<Node*> store_matcher = IsStore(
diff --git a/deps/v8/test/unittests/compiler/js-intrinsic-lowering-unittest.cc b/deps/v8/test/unittests/compiler/js-intrinsic-lowering-unittest.cc
index e8bbc33578..34da77dec4 100644
--- a/deps/v8/test/unittests/compiler/js-intrinsic-lowering-unittest.cc
+++ b/deps/v8/test/unittests/compiler/js-intrinsic-lowering-unittest.cc
@@ -144,6 +144,23 @@ TEST_F(JSIntrinsicLoweringTest, InlineIsJSReceiver) {
EXPECT_THAT(r.replacement(), IsObjectIsReceiver(input));
}
+// -----------------------------------------------------------------------------
+// %_CreateJSGeneratorObject
+
+TEST_F(JSIntrinsicLoweringTest, InlineCreateJSGeneratorObject) {
+ Node* const function = Parameter(0);
+ Node* const receiver = Parameter(1);
+ Node* const context = Parameter(2);
+ Node* const effect = graph()->start();
+ Node* const control = graph()->start();
+ Reduction const r = Reduce(graph()->NewNode(
+ javascript()->CallRuntime(Runtime::kInlineCreateJSGeneratorObject, 2),
+ function, receiver, context, effect, control));
+ ASSERT_TRUE(r.Changed());
+ EXPECT_EQ(IrOpcode::kJSCreateGeneratorObject,
+ r.replacement()->op()->opcode());
+}
+
} // namespace compiler
} // namespace internal
} // namespace v8
diff --git a/deps/v8/test/unittests/compiler/mips/OWNERS b/deps/v8/test/unittests/compiler/mips/OWNERS
index 89455a4fbd..3f8fbfc7c8 100644
--- a/deps/v8/test/unittests/compiler/mips/OWNERS
+++ b/deps/v8/test/unittests/compiler/mips/OWNERS
@@ -1,6 +1,3 @@
-paul.lind@imgtec.com
-gergely.kis@imgtec.com
-akos.palfi@imgtec.com
-balazs.kilvady@imgtec.com
-dusan.milosavljevic@imgtec.com
ivica.bogosavljevic@imgtec.com
+Miran.Karic@imgtec.com
+dusan.simicic@imgtec.com
diff --git a/deps/v8/test/unittests/compiler/mips64/OWNERS b/deps/v8/test/unittests/compiler/mips64/OWNERS
index 89455a4fbd..3f8fbfc7c8 100644
--- a/deps/v8/test/unittests/compiler/mips64/OWNERS
+++ b/deps/v8/test/unittests/compiler/mips64/OWNERS
@@ -1,6 +1,3 @@
-paul.lind@imgtec.com
-gergely.kis@imgtec.com
-akos.palfi@imgtec.com
-balazs.kilvady@imgtec.com
-dusan.milosavljevic@imgtec.com
ivica.bogosavljevic@imgtec.com
+Miran.Karic@imgtec.com
+dusan.simicic@imgtec.com
diff --git a/deps/v8/test/unittests/compiler/node-test-utils.cc b/deps/v8/test/unittests/compiler/node-test-utils.cc
index 46c0a8ffaa..764a4da2d7 100644
--- a/deps/v8/test/unittests/compiler/node-test-utils.cc
+++ b/deps/v8/test/unittests/compiler/node-test-utils.cc
@@ -1339,24 +1339,25 @@ STORE_MATCHER(UnalignedStore)
class IsStackSlotMatcher final : public NodeMatcher {
public:
- explicit IsStackSlotMatcher(const Matcher<int>& size_matcher)
- : NodeMatcher(IrOpcode::kStackSlot), size_matcher_(size_matcher) {}
+ explicit IsStackSlotMatcher(
+ const Matcher<StackSlotRepresentation>& rep_matcher)
+ : NodeMatcher(IrOpcode::kStackSlot), rep_matcher_(rep_matcher) {}
void DescribeTo(std::ostream* os) const final {
NodeMatcher::DescribeTo(os);
- *os << " whose size (";
- size_matcher_.DescribeTo(os);
+ *os << " whose rep (";
+ rep_matcher_.DescribeTo(os);
*os << ")";
}
bool MatchAndExplain(Node* node, MatchResultListener* listener) const final {
return (NodeMatcher::MatchAndExplain(node, listener) &&
- PrintMatchAndExplain(OpParameter<int>(node), "size", size_matcher_,
- listener));
+ PrintMatchAndExplain(OpParameter<StackSlotRepresentation>(node),
+ "rep", rep_matcher_, listener));
}
private:
- const Matcher<int> size_matcher_;
+ const Matcher<StackSlotRepresentation> rep_matcher_;
};
class IsToNumberMatcher final : public NodeMatcher {
@@ -2175,8 +2176,9 @@ Matcher<Node*> IsUnalignedStore(
control_matcher));
}
-Matcher<Node*> IsStackSlot(const Matcher<int>& size_matcher) {
- return MakeMatcher(new IsStackSlotMatcher(size_matcher));
+Matcher<Node*> IsStackSlot(
+ const Matcher<StackSlotRepresentation>& rep_matcher) {
+ return MakeMatcher(new IsStackSlotMatcher(rep_matcher));
}
Matcher<Node*> IsToNumber(const Matcher<Node*>& base_matcher,
diff --git a/deps/v8/test/unittests/compiler/node-test-utils.h b/deps/v8/test/unittests/compiler/node-test-utils.h
index 1e0f3d8b15..683ee2c964 100644
--- a/deps/v8/test/unittests/compiler/node-test-utils.h
+++ b/deps/v8/test/unittests/compiler/node-test-utils.h
@@ -334,7 +334,7 @@ Matcher<Node*> IsUnalignedStore(
const Matcher<Node*>& base_matcher, const Matcher<Node*>& index_matcher,
const Matcher<Node*>& value_matcher, const Matcher<Node*>& effect_matcher,
const Matcher<Node*>& control_matcher);
-Matcher<Node*> IsStackSlot(const Matcher<int>& size_matcher);
+Matcher<Node*> IsStackSlot(const Matcher<StackSlotRepresentation>& rep_matcher);
Matcher<Node*> IsWord32And(const Matcher<Node*>& lhs_matcher,
const Matcher<Node*>& rhs_matcher);
Matcher<Node*> IsWord32Or(const Matcher<Node*>& lhs_matcher,
diff --git a/deps/v8/test/unittests/heap/concurrent-marking-deque-unittest.cc b/deps/v8/test/unittests/heap/concurrent-marking-deque-unittest.cc
new file mode 100644
index 0000000000..25369217e3
--- /dev/null
+++ b/deps/v8/test/unittests/heap/concurrent-marking-deque-unittest.cc
@@ -0,0 +1,57 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <stdlib.h>
+
+#include "src/globals.h"
+#include "src/heap/concurrent-marking-deque.h"
+#include "src/heap/heap-inl.h"
+#include "src/isolate.h"
+#include "test/unittests/test-utils.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace v8 {
+namespace internal {
+
+class ConcurrentMarkingDequeTest : public TestWithIsolate {
+ public:
+ ConcurrentMarkingDequeTest() {
+ marking_deque_ = new ConcurrentMarkingDeque(i_isolate()->heap());
+ object_ = i_isolate()->heap()->undefined_value();
+ }
+
+ ~ConcurrentMarkingDequeTest() { delete marking_deque_; }
+
+ ConcurrentMarkingDeque* marking_deque() { return marking_deque_; }
+
+ HeapObject* object() { return object_; }
+
+ private:
+ ConcurrentMarkingDeque* marking_deque_;
+ HeapObject* object_;
+ DISALLOW_COPY_AND_ASSIGN(ConcurrentMarkingDequeTest);
+};
+
+TEST_F(ConcurrentMarkingDequeTest, Empty) {
+ EXPECT_TRUE(marking_deque()->IsEmpty());
+ EXPECT_EQ(0, marking_deque()->Size());
+}
+
+TEST_F(ConcurrentMarkingDequeTest, SharedDeque) {
+ marking_deque()->Push(object());
+ EXPECT_FALSE(marking_deque()->IsEmpty());
+ EXPECT_EQ(1, marking_deque()->Size());
+ EXPECT_EQ(object(), marking_deque()->Pop(MarkingThread::kConcurrent));
+}
+
+TEST_F(ConcurrentMarkingDequeTest, BailoutDeque) {
+ marking_deque()->Push(object(), MarkingThread::kConcurrent,
+ TargetDeque::kBailout);
+ EXPECT_FALSE(marking_deque()->IsEmpty());
+ EXPECT_EQ(1, marking_deque()->Size());
+ EXPECT_EQ(nullptr, marking_deque()->Pop(MarkingThread::kConcurrent));
+}
+
+} // namespace internal
+} // namespace v8
diff --git a/deps/v8/test/unittests/heap/item-parallel-job-unittest.cc b/deps/v8/test/unittests/heap/item-parallel-job-unittest.cc
new file mode 100644
index 0000000000..23ff94fae9
--- /dev/null
+++ b/deps/v8/test/unittests/heap/item-parallel-job-unittest.cc
@@ -0,0 +1,211 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "src/heap/item-parallel-job.h"
+
+#include "src/isolate.h"
+#include "test/unittests/test-utils.h"
+
+namespace v8 {
+namespace internal {
+
+class ItemParallelJobTest : public TestWithIsolate {
+ public:
+ ItemParallelJobTest() : parallel_job_semaphore_(0) {}
+
+ base::Semaphore* parallel_job_semaphore() { return &parallel_job_semaphore_; }
+
+ private:
+ base::Semaphore parallel_job_semaphore_;
+ DISALLOW_COPY_AND_ASSIGN(ItemParallelJobTest);
+};
+
+namespace {
+
+class EmptyTask : public ItemParallelJob::Task {
+ public:
+ explicit EmptyTask(Isolate* isolate, bool* did_run)
+ : ItemParallelJob::Task(isolate), did_run_(did_run) {}
+
+ void RunInParallel() override { *did_run_ = true; }
+
+ private:
+ bool* did_run_;
+};
+
+class SimpleItem : public ItemParallelJob::Item {
+ public:
+ explicit SimpleItem(bool* was_processed)
+ : ItemParallelJob::Item(), was_processed_(was_processed) {}
+ void Process() { *was_processed_ = true; }
+
+ private:
+ bool* was_processed_;
+};
+
+class EagerTask : public ItemParallelJob::Task {
+ public:
+ explicit EagerTask(Isolate* isolate) : ItemParallelJob::Task(isolate) {}
+
+ void RunInParallel() override {
+ SimpleItem* item = nullptr;
+ while ((item = GetItem<SimpleItem>()) != nullptr) {
+ item->Process();
+ item->MarkFinished();
+ }
+ }
+};
+
+class OneShotBarrier {
+ public:
+ explicit OneShotBarrier(size_t counter) : counter_(counter) {
+ DCHECK_GE(counter_, 0);
+ }
+
+ void Wait() {
+ DCHECK_NE(counter_, 0);
+ mutex_.Lock();
+ counter_--;
+ if (counter_ == 0) {
+ condition_.NotifyAll();
+ } else {
+ while (counter_ > 0) {
+ condition_.Wait(&mutex_);
+ }
+ }
+ mutex_.Unlock();
+ }
+
+ private:
+ base::Mutex mutex_;
+ base::ConditionVariable condition_;
+ size_t counter_;
+};
+
+class TaskProcessingOneItem : public ItemParallelJob::Task {
+ public:
+ explicit TaskProcessingOneItem(Isolate* isolate, OneShotBarrier* barrier)
+ : ItemParallelJob::Task(isolate), barrier_(barrier) {}
+
+ void RunInParallel() override {
+ SimpleItem* item = GetItem<SimpleItem>();
+ EXPECT_NE(nullptr, item);
+ item->Process();
+ item->MarkFinished();
+ // Avoid canceling the remaining tasks with a simple barrier.
+ barrier_->Wait();
+ }
+
+ private:
+ OneShotBarrier* barrier_;
+};
+
+class TaskForDifferentItems;
+
+class BaseItem : public ItemParallelJob::Item {
+ public:
+ virtual ~BaseItem() {}
+ virtual void ProcessItem(TaskForDifferentItems* task) = 0;
+};
+
+class TaskForDifferentItems : public ItemParallelJob::Task {
+ public:
+ explicit TaskForDifferentItems(Isolate* isolate, bool* processed_a,
+ bool* processed_b)
+ : ItemParallelJob::Task(isolate),
+ processed_a_(processed_a),
+ processed_b_(processed_b) {}
+ virtual ~TaskForDifferentItems() {}
+
+ void RunInParallel() override {
+ BaseItem* item = nullptr;
+ while ((item = GetItem<BaseItem>()) != nullptr) {
+ item->ProcessItem(this);
+ item->MarkFinished();
+ }
+ }
+
+ void ProcessA() { *processed_a_ = true; }
+ void ProcessB() { *processed_b_ = true; }
+
+ private:
+ bool* processed_a_;
+ bool* processed_b_;
+};
+
+class ItemA : public BaseItem {
+ public:
+ virtual ~ItemA() {}
+ void ProcessItem(TaskForDifferentItems* task) override { task->ProcessA(); }
+};
+
+class ItemB : public BaseItem {
+ public:
+ virtual ~ItemB() {}
+ void ProcessItem(TaskForDifferentItems* task) override { task->ProcessB(); }
+};
+
+} // namespace
+
+TEST_F(ItemParallelJobTest, EmptyTaskRuns) {
+ bool did_run = false;
+ ItemParallelJob job(i_isolate()->cancelable_task_manager(),
+ parallel_job_semaphore());
+ job.AddTask(new EmptyTask(i_isolate(), &did_run));
+ job.Run();
+ EXPECT_TRUE(did_run);
+}
+
+TEST_F(ItemParallelJobTest, FinishAllItems) {
+ const int kItems = 111;
+ bool was_processed[kItems];
+ for (int i = 0; i < kItems; i++) {
+ was_processed[i] = false;
+ }
+ ItemParallelJob job(i_isolate()->cancelable_task_manager(),
+ parallel_job_semaphore());
+ job.AddTask(new EagerTask(i_isolate()));
+ for (int i = 0; i < kItems; i++) {
+ job.AddItem(new SimpleItem(&was_processed[i]));
+ }
+ job.Run();
+ for (int i = 0; i < kItems; i++) {
+ EXPECT_TRUE(was_processed[i]);
+ }
+}
+
+TEST_F(ItemParallelJobTest, DistributeItemsMultipleTasks) {
+ const int kItemsAndTasks = 2; // Main thread + additional task.
+ bool was_processed[kItemsAndTasks];
+ OneShotBarrier barrier(kItemsAndTasks);
+ for (int i = 0; i < kItemsAndTasks; i++) {
+ was_processed[i] = false;
+ }
+ ItemParallelJob job(i_isolate()->cancelable_task_manager(),
+ parallel_job_semaphore());
+ for (int i = 0; i < kItemsAndTasks; i++) {
+ job.AddItem(new SimpleItem(&was_processed[i]));
+ job.AddTask(new TaskProcessingOneItem(i_isolate(), &barrier));
+ }
+ job.Run();
+ for (int i = 0; i < kItemsAndTasks; i++) {
+ EXPECT_TRUE(was_processed[i]);
+ }
+}
+
+TEST_F(ItemParallelJobTest, DifferentItems) {
+ bool item_a = false;
+ bool item_b = false;
+ ItemParallelJob job(i_isolate()->cancelable_task_manager(),
+ parallel_job_semaphore());
+ job.AddItem(new ItemA());
+ job.AddItem(new ItemB());
+ job.AddTask(new TaskForDifferentItems(i_isolate(), &item_a, &item_b));
+ job.Run();
+ EXPECT_TRUE(item_a);
+ EXPECT_TRUE(item_b);
+}
+
+} // namespace internal
+} // namespace v8
diff --git a/deps/v8/test/unittests/heap/spaces-unittest.cc b/deps/v8/test/unittests/heap/spaces-unittest.cc
index bdd9933398..9b4b2675e3 100644
--- a/deps/v8/test/unittests/heap/spaces-unittest.cc
+++ b/deps/v8/test/unittests/heap/spaces-unittest.cc
@@ -22,6 +22,12 @@ TEST_F(SpacesTest, CompactionSpaceMerge) {
EXPECT_TRUE(compaction_space != NULL);
EXPECT_TRUE(compaction_space->SetUp());
+ for (Page* p : *old_space) {
+ // Unlink free lists from the main space to avoid reusing the memory for
+ // compaction spaces.
+ old_space->UnlinkFreeListCategories(p);
+ }
+
// Cannot loop until "Available()" since we initially have 0 bytes available
// and would thus neither grow, nor be able to allocate an object.
const int kNumObjects = 10;
diff --git a/deps/v8/test/unittests/heap/workstealing-marking-deque-unittest.cc b/deps/v8/test/unittests/heap/workstealing-marking-deque-unittest.cc
new file mode 100644
index 0000000000..c8165285c7
--- /dev/null
+++ b/deps/v8/test/unittests/heap/workstealing-marking-deque-unittest.cc
@@ -0,0 +1,33 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "src/heap/workstealing-marking-deque.h"
+
+#include "test/unittests/test-utils.h"
+
+namespace v8 {
+namespace internal {
+
+class HeapObject {};
+
+TEST(WorkStealingMarkingDeque, LocalEmpty) {
+ WorkStealingMarkingDeque marking_deque;
+ LocalWorkStealingMarkingDeque local_marking_deque(&marking_deque, 0);
+ EXPECT_TRUE(local_marking_deque.IsEmpty());
+}
+
+TEST(WorkStealingMarkingDeque, LocalPushPop) {
+ WorkStealingMarkingDeque marking_deque;
+ LocalWorkStealingMarkingDeque local_marking_deque(&marking_deque, 0);
+ HeapObject* object1 = new HeapObject();
+ HeapObject* object2 = nullptr;
+ EXPECT_TRUE(local_marking_deque.Push(object1));
+ EXPECT_FALSE(local_marking_deque.IsEmpty());
+ EXPECT_TRUE(local_marking_deque.Pop(&object2));
+ EXPECT_EQ(object1, object2);
+ delete object1;
+}
+
+} // namespace internal
+} // namespace v8
diff --git a/deps/v8/test/unittests/interpreter/bytecode-array-builder-unittest.cc b/deps/v8/test/unittests/interpreter/bytecode-array-builder-unittest.cc
index 46270241fe..8f0821fd81 100644
--- a/deps/v8/test/unittests/interpreter/bytecode-array-builder-unittest.cc
+++ b/deps/v8/test/unittests/interpreter/bytecode-array-builder-unittest.cc
@@ -7,6 +7,7 @@
#include "src/ast/scopes.h"
#include "src/interpreter/bytecode-array-builder.h"
#include "src/interpreter/bytecode-array-iterator.h"
+#include "src/interpreter/bytecode-jump-table.h"
#include "src/interpreter/bytecode-label.h"
#include "src/interpreter/bytecode-register-allocator.h"
#include "src/objects-inl.h"
@@ -25,16 +26,14 @@ class BytecodeArrayBuilderTest : public TestWithIsolateAndZone {
using ToBooleanMode = BytecodeArrayBuilder::ToBooleanMode;
TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
- CanonicalHandleScope canonical(isolate());
- BytecodeArrayBuilder builder(isolate(), zone(), 0, 1, 131);
+ BytecodeArrayBuilder builder(isolate(), zone(), 1, 131);
Factory* factory = isolate()->factory();
AstValueFactory ast_factory(zone(), isolate()->ast_string_constants(),
isolate()->heap()->HashSeed());
DeclarationScope scope(zone(), &ast_factory);
CHECK_EQ(builder.locals_count(), 131);
- CHECK_EQ(builder.context_count(), 1);
- CHECK_EQ(builder.fixed_register_count(), 132);
+ CHECK_EQ(builder.fixed_register_count(), 131);
Register reg(0);
Register other(reg.index() + 1);
@@ -278,6 +277,10 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
.JumpIfJSReceiver(&end[10]);
}
+ // Emit Smi table switch bytecode.
+ BytecodeJumpTable* jump_table = builder.AllocateJumpTable(1, 0);
+ builder.SwitchOnSmiNoFeedback(jump_table).Bind(jump_table, 0);
+
// Emit set pending message bytecode.
builder.SetPendingMessage();
@@ -429,37 +432,33 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
TEST_F(BytecodeArrayBuilderTest, FrameSizesLookGood) {
- CanonicalHandleScope canonical(isolate());
for (int locals = 0; locals < 5; locals++) {
- for (int contexts = 0; contexts < 4; contexts++) {
- for (int temps = 0; temps < 3; temps++) {
- BytecodeArrayBuilder builder(isolate(), zone(), 0, contexts, locals);
- BytecodeRegisterAllocator* allocator(builder.register_allocator());
- for (int i = 0; i < locals + contexts; i++) {
- builder.LoadLiteral(Smi::kZero);
- builder.StoreAccumulatorInRegister(Register(i));
- }
- for (int i = 0; i < temps; i++) {
- Register temp = allocator->NewRegister();
- builder.LoadLiteral(Smi::kZero);
- builder.StoreAccumulatorInRegister(temp);
- // Ensure temporaries are used so not optimized away by the
- // register optimizer.
- builder.ConvertAccumulatorToName(temp);
- }
- builder.Return();
-
- Handle<BytecodeArray> the_array = builder.ToBytecodeArray(isolate());
- int total_registers = locals + contexts + temps;
- CHECK_EQ(the_array->frame_size(), total_registers * kPointerSize);
+ for (int temps = 0; temps < 3; temps++) {
+ BytecodeArrayBuilder builder(isolate(), zone(), 1, locals);
+ BytecodeRegisterAllocator* allocator(builder.register_allocator());
+ for (int i = 0; i < locals; i++) {
+ builder.LoadLiteral(Smi::kZero);
+ builder.StoreAccumulatorInRegister(Register(i));
+ }
+ for (int i = 0; i < temps; i++) {
+ Register temp = allocator->NewRegister();
+ builder.LoadLiteral(Smi::kZero);
+ builder.StoreAccumulatorInRegister(temp);
+ // Ensure temporaries are used so not optimized away by the
+ // register optimizer.
+ builder.ConvertAccumulatorToName(temp);
}
+ builder.Return();
+
+ Handle<BytecodeArray> the_array = builder.ToBytecodeArray(isolate());
+ int total_registers = locals + temps;
+ CHECK_EQ(the_array->frame_size(), total_registers * kPointerSize);
}
}
}
TEST_F(BytecodeArrayBuilderTest, RegisterValues) {
- CanonicalHandleScope canonical(isolate());
int index = 1;
Register the_register(index);
@@ -472,8 +471,7 @@ TEST_F(BytecodeArrayBuilderTest, RegisterValues) {
TEST_F(BytecodeArrayBuilderTest, Parameters) {
- CanonicalHandleScope canonical(isolate());
- BytecodeArrayBuilder builder(isolate(), zone(), 10, 0, 0);
+ BytecodeArrayBuilder builder(isolate(), zone(), 10, 0);
Register receiver(builder.Receiver());
Register param8(builder.Parameter(8));
@@ -482,8 +480,7 @@ TEST_F(BytecodeArrayBuilderTest, Parameters) {
TEST_F(BytecodeArrayBuilderTest, Constants) {
- CanonicalHandleScope canonical(isolate());
- BytecodeArrayBuilder builder(isolate(), zone(), 0, 0, 0);
+ BytecodeArrayBuilder builder(isolate(), zone(), 1, 0);
AstValueFactory ast_factory(zone(), isolate()->ast_string_constants(),
isolate()->heap()->HashSeed());
@@ -509,10 +506,9 @@ TEST_F(BytecodeArrayBuilderTest, Constants) {
}
TEST_F(BytecodeArrayBuilderTest, ForwardJumps) {
- CanonicalHandleScope canonical(isolate());
static const int kFarJumpDistance = 256 + 20;
- BytecodeArrayBuilder builder(isolate(), zone(), 0, 0, 1);
+ BytecodeArrayBuilder builder(isolate(), zone(), 1, 1);
Register reg(0);
BytecodeLabel far0, far1, far2, far3, far4;
@@ -627,8 +623,7 @@ TEST_F(BytecodeArrayBuilderTest, ForwardJumps) {
TEST_F(BytecodeArrayBuilderTest, BackwardJumps) {
- CanonicalHandleScope canonical(isolate());
- BytecodeArrayBuilder builder(isolate(), zone(), 0, 0, 1);
+ BytecodeArrayBuilder builder(isolate(), zone(), 1, 1);
Register reg(0);
@@ -675,10 +670,104 @@ TEST_F(BytecodeArrayBuilderTest, BackwardJumps) {
CHECK(iterator.done());
}
+TEST_F(BytecodeArrayBuilderTest, SmallSwitch) {
+ BytecodeArrayBuilder builder(isolate(), zone(), 1, 1);
+
+ // Small jump table that fits into the single-size constant pool
+ int small_jump_table_size = 5;
+ int small_jump_table_base = -2;
+ BytecodeJumpTable* small_jump_table =
+ builder.AllocateJumpTable(small_jump_table_size, small_jump_table_base);
+
+ builder.LoadLiteral(Smi::FromInt(7)).SwitchOnSmiNoFeedback(small_jump_table);
+ for (int i = 0; i < small_jump_table_size; i++) {
+ builder.Bind(small_jump_table, small_jump_table_base + i).Debugger();
+ }
+ builder.Return();
+
+ Handle<BytecodeArray> array = builder.ToBytecodeArray(isolate());
+ BytecodeArrayIterator iterator(array);
+
+ CHECK_EQ(iterator.current_bytecode(), Bytecode::kLdaSmi);
+ iterator.Advance();
+
+ CHECK_EQ(iterator.current_bytecode(), Bytecode::kSwitchOnSmiNoFeedback);
+ CHECK_EQ(iterator.current_operand_scale(), OperandScale::kSingle);
+ {
+ int i = 0;
+ int switch_end =
+ iterator.current_offset() + iterator.current_bytecode_size();
+
+ for (const auto& entry : iterator.GetJumpTableTargetOffsets()) {
+ CHECK_EQ(entry.case_value, small_jump_table_base + i);
+ CHECK_EQ(entry.target_offset, switch_end + i);
+
+ i++;
+ }
+ CHECK_EQ(i, small_jump_table_size);
+ }
+ iterator.Advance();
+
+ for (int i = 0; i < small_jump_table_size; i++) {
+ CHECK_EQ(iterator.current_bytecode(), Bytecode::kDebugger);
+ iterator.Advance();
+ }
+
+ CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
+ iterator.Advance();
+ CHECK(iterator.done());
+}
+
+TEST_F(BytecodeArrayBuilderTest, WideSwitch) {
+ BytecodeArrayBuilder builder(isolate(), zone(), 1, 1);
+
+ // Large jump table that requires a wide Switch bytecode.
+ int large_jump_table_size = 256;
+ int large_jump_table_base = -10;
+ BytecodeJumpTable* large_jump_table =
+ builder.AllocateJumpTable(large_jump_table_size, large_jump_table_base);
+
+ builder.LoadLiteral(Smi::FromInt(7)).SwitchOnSmiNoFeedback(large_jump_table);
+ for (int i = 0; i < large_jump_table_size; i++) {
+ builder.Bind(large_jump_table, large_jump_table_base + i).Debugger();
+ }
+ builder.Return();
+
+ Handle<BytecodeArray> array = builder.ToBytecodeArray(isolate());
+ BytecodeArrayIterator iterator(array);
+
+ CHECK_EQ(iterator.current_bytecode(), Bytecode::kLdaSmi);
+ iterator.Advance();
+
+ CHECK_EQ(iterator.current_bytecode(), Bytecode::kSwitchOnSmiNoFeedback);
+ CHECK_EQ(iterator.current_operand_scale(), OperandScale::kDouble);
+ {
+ int i = 0;
+ int switch_end =
+ iterator.current_offset() + iterator.current_bytecode_size();
+
+ for (const auto& entry : iterator.GetJumpTableTargetOffsets()) {
+ CHECK_EQ(entry.case_value, large_jump_table_base + i);
+ CHECK_EQ(entry.target_offset, switch_end + i);
+
+ i++;
+ }
+ CHECK_EQ(i, large_jump_table_size);
+ }
+ iterator.Advance();
+
+ for (int i = 0; i < large_jump_table_size; i++) {
+ CHECK_EQ(iterator.current_bytecode(), Bytecode::kDebugger);
+ iterator.Advance();
+ }
+
+ CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
+ iterator.Advance();
+ CHECK(iterator.done());
+}
TEST_F(BytecodeArrayBuilderTest, LabelReuse) {
- CanonicalHandleScope canonical(isolate());
- BytecodeArrayBuilder builder(isolate(), zone(), 0, 0, 0);
+ BytecodeArrayBuilder builder(isolate(), zone(), 1, 0);
// Labels can only have 1 forward reference, but
// can be referred to mulitple times once bound.
@@ -710,10 +799,9 @@ TEST_F(BytecodeArrayBuilderTest, LabelReuse) {
TEST_F(BytecodeArrayBuilderTest, LabelAddressReuse) {
- CanonicalHandleScope canonical(isolate());
static const int kRepeats = 3;
- BytecodeArrayBuilder builder(isolate(), zone(), 0, 0, 0);
+ BytecodeArrayBuilder builder(isolate(), zone(), 1, 0);
for (int i = 0; i < kRepeats; i++) {
BytecodeLabel label, after_jump0, after_jump1;
builder.Jump(&label)
diff --git a/deps/v8/test/unittests/interpreter/bytecode-array-writer-unittest.cc b/deps/v8/test/unittests/interpreter/bytecode-array-writer-unittest.cc
index 915521f3d7..680d8197b2 100644
--- a/deps/v8/test/unittests/interpreter/bytecode-array-writer-unittest.cc
+++ b/deps/v8/test/unittests/interpreter/bytecode-array-writer-unittest.cc
@@ -8,6 +8,9 @@
#include "src/factory.h"
#include "src/interpreter/bytecode-array-writer.h"
#include "src/interpreter/bytecode-label.h"
+#include "src/interpreter/bytecode-node.h"
+#include "src/interpreter/bytecode-register.h"
+#include "src/interpreter/bytecode-source-info.h"
#include "src/interpreter/constant-array-builder.h"
#include "src/isolate.h"
#include "src/objects-inl.h"
@@ -145,7 +148,7 @@ TEST_F(BytecodeArrayWriterUnittest, SimpleExample) {
PositionTableEntry expected_positions[] = {
{0, 10, false}, {1, 55, true}, {9, 70, true}};
SourcePositionTableIterator source_iterator(
- bytecode_array->source_position_table());
+ bytecode_array->SourcePositionTable());
for (size_t i = 0; i < arraysize(expected_positions); ++i) {
const PositionTableEntry& expected = expected_positions[i];
CHECK_EQ(source_iterator.code_offset(), expected.code_offset);
@@ -230,7 +233,7 @@ TEST_F(BytecodeArrayWriterUnittest, ComplexExample) {
Handle<BytecodeArray> bytecode_array = writer()->ToBytecodeArray(
isolate(), 0, 0, factory()->empty_fixed_array());
SourcePositionTableIterator source_iterator(
- bytecode_array->source_position_table());
+ bytecode_array->SourcePositionTable());
for (size_t i = 0; i < arraysize(expected_positions); ++i) {
const PositionTableEntry& expected = expected_positions[i];
CHECK_EQ(source_iterator.code_offset(), expected.code_offset);
@@ -282,7 +285,7 @@ TEST_F(BytecodeArrayWriterUnittest, ElideNoneffectfulBytecodes) {
Handle<BytecodeArray> bytecode_array = writer()->ToBytecodeArray(
isolate(), 0, 0, factory()->empty_fixed_array());
SourcePositionTableIterator source_iterator(
- bytecode_array->source_position_table());
+ bytecode_array->SourcePositionTable());
for (size_t i = 0; i < arraysize(expected_positions); ++i) {
const PositionTableEntry& expected = expected_positions[i];
CHECK_EQ(source_iterator.code_offset(), expected.code_offset);
@@ -348,7 +351,7 @@ TEST_F(BytecodeArrayWriterUnittest, DeadcodeElimination) {
Handle<BytecodeArray> bytecode_array = writer()->ToBytecodeArray(
isolate(), 0, 0, factory()->empty_fixed_array());
SourcePositionTableIterator source_iterator(
- bytecode_array->source_position_table());
+ bytecode_array->SourcePositionTable());
for (size_t i = 0; i < arraysize(expected_positions); ++i) {
const PositionTableEntry& expected = expected_positions[i];
CHECK_EQ(source_iterator.code_offset(), expected.code_offset);
diff --git a/deps/v8/test/unittests/interpreter/bytecode-pipeline-unittest.cc b/deps/v8/test/unittests/interpreter/bytecode-node-unittest.cc
index 45366196f4..af793ebcfe 100644
--- a/deps/v8/test/unittests/interpreter/bytecode-pipeline-unittest.cc
+++ b/deps/v8/test/unittests/interpreter/bytecode-node-unittest.cc
@@ -4,9 +4,7 @@
#include "src/v8.h"
-#include "src/interpreter/bytecode-pipeline.h"
-#include "src/interpreter/bytecode-register-allocator.h"
-#include "src/isolate.h"
+#include "src/interpreter/bytecode-node.h"
#include "test/unittests/test-utils.h"
namespace v8 {
@@ -15,42 +13,6 @@ namespace interpreter {
using BytecodeNodeTest = TestWithIsolateAndZone;
-TEST(BytecodeSourceInfo, Operations) {
- BytecodeSourceInfo x(0, true);
- CHECK_EQ(x.source_position(), 0);
- CHECK_EQ(x.is_statement(), true);
- CHECK_EQ(x.is_valid(), true);
- x.set_invalid();
- CHECK_EQ(x.is_statement(), false);
- CHECK_EQ(x.is_valid(), false);
-
- x.MakeStatementPosition(1);
- BytecodeSourceInfo y(1, true);
- CHECK(x == y);
- CHECK(!(x != y));
-
- x.set_invalid();
- CHECK(!(x == y));
- CHECK(x != y);
-
- y.MakeStatementPosition(1);
- CHECK_EQ(y.source_position(), 1);
- CHECK_EQ(y.is_statement(), true);
-
- y.MakeStatementPosition(2);
- CHECK_EQ(y.source_position(), 2);
- CHECK_EQ(y.is_statement(), true);
-
- y.set_invalid();
- y.MakeExpressionPosition(3);
- CHECK_EQ(y.source_position(), 3);
- CHECK_EQ(y.is_statement(), false);
-
- y.MakeStatementPosition(3);
- CHECK_EQ(y.source_position(), 3);
- CHECK_EQ(y.is_statement(), true);
-}
-
TEST_F(BytecodeNodeTest, Constructor1) {
BytecodeNode node(Bytecode::kLdaZero);
CHECK_EQ(node.bytecode(), Bytecode::kLdaZero);
diff --git a/deps/v8/test/unittests/interpreter/bytecode-register-optimizer-unittest.cc b/deps/v8/test/unittests/interpreter/bytecode-register-optimizer-unittest.cc
index cb5e1f927e..8c7b363ebf 100644
--- a/deps/v8/test/unittests/interpreter/bytecode-register-optimizer-unittest.cc
+++ b/deps/v8/test/unittests/interpreter/bytecode-register-optimizer-unittest.cc
@@ -4,12 +4,8 @@
#include "src/v8.h"
-#include "src/factory.h"
#include "src/interpreter/bytecode-label.h"
-#include "src/interpreter/bytecode-pipeline.h"
#include "src/interpreter/bytecode-register-optimizer.h"
-#include "src/objects-inl.h"
-#include "src/objects.h"
#include "test/unittests/test-utils.h"
namespace v8 {
@@ -99,7 +95,6 @@ TEST_F(BytecodeRegisterOptimizerTest, TemporaryNotEmitted) {
CHECK_EQ(write_count(), 0u);
Register temp = NewTemporary();
optimizer()->DoStar(temp);
- BytecodeNode node1(Bytecode::kStar, NewTemporary().ToOperand());
ReleaseTemporaries(temp);
CHECK_EQ(write_count(), 0u);
optimizer()->PrepareForBytecode<Bytecode::kReturn, AccumulatorUse::kRead>();
diff --git a/deps/v8/test/unittests/interpreter/bytecode-source-info-unittest.cc b/deps/v8/test/unittests/interpreter/bytecode-source-info-unittest.cc
new file mode 100644
index 0000000000..f08bfe307f
--- /dev/null
+++ b/deps/v8/test/unittests/interpreter/bytecode-source-info-unittest.cc
@@ -0,0 +1,52 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "src/v8.h"
+
+#include "src/interpreter/bytecode-source-info.h"
+#include "test/unittests/test-utils.h"
+
+namespace v8 {
+namespace internal {
+namespace interpreter {
+
+TEST(BytecodeSourceInfo, Operations) {
+ BytecodeSourceInfo x(0, true);
+ CHECK_EQ(x.source_position(), 0);
+ CHECK_EQ(x.is_statement(), true);
+ CHECK_EQ(x.is_valid(), true);
+ x.set_invalid();
+ CHECK_EQ(x.is_statement(), false);
+ CHECK_EQ(x.is_valid(), false);
+
+ x.MakeStatementPosition(1);
+ BytecodeSourceInfo y(1, true);
+ CHECK(x == y);
+ CHECK(!(x != y));
+
+ x.set_invalid();
+ CHECK(!(x == y));
+ CHECK(x != y);
+
+ y.MakeStatementPosition(1);
+ CHECK_EQ(y.source_position(), 1);
+ CHECK_EQ(y.is_statement(), true);
+
+ y.MakeStatementPosition(2);
+ CHECK_EQ(y.source_position(), 2);
+ CHECK_EQ(y.is_statement(), true);
+
+ y.set_invalid();
+ y.MakeExpressionPosition(3);
+ CHECK_EQ(y.source_position(), 3);
+ CHECK_EQ(y.is_statement(), false);
+
+ y.MakeStatementPosition(3);
+ CHECK_EQ(y.source_position(), 3);
+ CHECK_EQ(y.is_statement(), true);
+}
+
+} // namespace interpreter
+} // namespace internal
+} // namespace v8
diff --git a/deps/v8/test/unittests/object-unittest.cc b/deps/v8/test/unittests/object-unittest.cc
index b09b97dea6..e0a65f2ac8 100644
--- a/deps/v8/test/unittests/object-unittest.cc
+++ b/deps/v8/test/unittests/object-unittest.cc
@@ -8,6 +8,7 @@
#include "src/objects-inl.h"
#include "src/objects.h"
+#include "test/unittests/test-utils.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -53,5 +54,64 @@ TEST(Object, StructListOrder) {
#undef TEST_STRUCT
}
+typedef TestWithIsolate ObjectWithIsolate;
+
+TEST_F(ObjectWithIsolate, DictionaryGrowth) {
+ Handle<SeededNumberDictionary> dict =
+ SeededNumberDictionary::New(isolate(), 1);
+ Handle<Object> value = isolate()->factory()->null_value();
+ PropertyDetails details = PropertyDetails::Empty();
+
+ // This test documents the expected growth behavior of a dictionary getting
+ // elements added to it one by one.
+ STATIC_ASSERT(HashTableBase::kMinCapacity == 4);
+ uint32_t i = 1;
+ // 3 elements fit into the initial capacity.
+ for (; i <= 3; i++) {
+ dict = SeededNumberDictionary::Add(dict, i, value, details);
+ CHECK_EQ(4, dict->Capacity());
+ }
+ // 4th element triggers growth.
+ DCHECK_EQ(4, i);
+ for (; i <= 5; i++) {
+ dict = SeededNumberDictionary::Add(dict, i, value, details);
+ CHECK_EQ(8, dict->Capacity());
+ }
+ // 6th element triggers growth.
+ DCHECK_EQ(6, i);
+ for (; i <= 11; i++) {
+ dict = SeededNumberDictionary::Add(dict, i, value, details);
+ CHECK_EQ(16, dict->Capacity());
+ }
+ // 12th element triggers growth.
+ DCHECK_EQ(12, i);
+ for (; i <= 21; i++) {
+ dict = SeededNumberDictionary::Add(dict, i, value, details);
+ CHECK_EQ(32, dict->Capacity());
+ }
+ // 22nd element triggers growth.
+ DCHECK_EQ(22, i);
+ for (; i <= 43; i++) {
+ dict = SeededNumberDictionary::Add(dict, i, value, details);
+ CHECK_EQ(64, dict->Capacity());
+ }
+ // 44th element triggers growth.
+ DCHECK_EQ(44, i);
+ for (; i <= 50; i++) {
+ dict = SeededNumberDictionary::Add(dict, i, value, details);
+ CHECK_EQ(128, dict->Capacity());
+ }
+
+ // If we grow by larger chunks, the next (sufficiently big) power of 2 is
+ // chosen as the capacity.
+ dict = SeededNumberDictionary::New(isolate(), 1);
+ dict = SeededNumberDictionary::EnsureCapacity(dict, 65, 1);
+ CHECK_EQ(128, dict->Capacity());
+
+ dict = SeededNumberDictionary::New(isolate(), 1);
+ dict = SeededNumberDictionary::EnsureCapacity(dict, 30, 1);
+ CHECK_EQ(64, dict->Capacity());
+}
+
} // namespace internal
} // namespace v8
diff --git a/deps/v8/test/unittests/parser/preparser-unittest.cc b/deps/v8/test/unittests/parser/preparser-unittest.cc
new file mode 100644
index 0000000000..26f5cd5ab3
--- /dev/null
+++ b/deps/v8/test/unittests/parser/preparser-unittest.cc
@@ -0,0 +1,41 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "src/api.h"
+#include "src/objects-inl.h"
+#include "test/unittests/test-helpers.h"
+#include "test/unittests/test-utils.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace v8 {
+namespace internal {
+
+class PreParserTest : public TestWithContext {
+ public:
+ PreParserTest() {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(PreParserTest);
+};
+
+TEST_F(PreParserTest, LazyFunctionLength) {
+ const char* script_source = "function lazy(a, b, c) { } lazy";
+
+ Handle<Object> lazy_object = test::RunJS(isolate(), script_source);
+
+ Handle<SharedFunctionInfo> shared(
+ Handle<JSFunction>::cast(lazy_object)->shared(), i_isolate());
+ CHECK_EQ(shared->length(), SharedFunctionInfo::kInvalidLength);
+
+ const char* get_length_source = "lazy.length";
+
+ Handle<Object> length = test::RunJS(isolate(), get_length_source);
+ CHECK(length->IsSmi());
+ int32_t value;
+ CHECK(length->ToInt32(&value));
+ CHECK_EQ(3, value);
+}
+
+} // namespace internal
+} // namespace v8
diff --git a/deps/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-helper.cc b/deps/v8/test/unittests/test-helpers.cc
index 047e1c1688..eb3dd267f5 100644
--- a/deps/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-helper.cc
+++ b/deps/v8/test/unittests/test-helpers.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "test/unittests/compiler-dispatcher/compiler-dispatcher-helper.h"
+#include "test/unittests/test-helpers.h"
#include "include/v8.h"
#include "src/api.h"
diff --git a/deps/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-helper.h b/deps/v8/test/unittests/test-helpers.h
index ad90a1114d..e5e003be24 100644
--- a/deps/v8/test/unittests/compiler-dispatcher/compiler-dispatcher-helper.h
+++ b/deps/v8/test/unittests/test-helpers.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef V8_UNITTESTS_COMPILER_DISPATCHER_COMPILER_DISPATCHER_HELPER_H_
-#define V8_UNITTESTS_COMPILER_DISPATCHER_COMPILER_DISPATCHER_HELPER_H_
+#ifndef V8_UNITTESTS_TEST_HELPERS_H_
+#define V8_UNITTESTS_TEST_HELPERS_H_
#include <memory>
@@ -63,4 +63,4 @@ Handle<SharedFunctionInfo> CreateSharedFunctionInfo(
} // namespace internal
} // namespace v8
-#endif // V8_UNITTESTS_COMPILER_DISPATCHER_COMPILER_DISPATCHER_HELPER_H_
+#endif // V8_UNITTESTS_TEST_HELPERS_H_
diff --git a/deps/v8/test/unittests/unittests.gyp b/deps/v8/test/unittests/unittests.gyp
index 6add56471f..01cf0c5bfe 100644
--- a/deps/v8/test/unittests/unittests.gyp
+++ b/deps/v8/test/unittests/unittests.gyp
@@ -15,6 +15,8 @@
'api/remote-object-unittest.cc',
'api/v8-object-unittest.cc',
'asmjs/asm-scanner-unittest.cc',
+ 'asmjs/asm-types-unittest.cc',
+ 'asmjs/switch-logic-unittest.cc',
'base/atomic-utils-unittest.cc',
'base/bits-unittest.cc',
'base/cpu-unittest.cc',
@@ -89,8 +91,6 @@
'compiler/typer-unittest.cc',
'compiler/value-numbering-reducer-unittest.cc',
'compiler/zone-stats-unittest.cc',
- 'compiler-dispatcher/compiler-dispatcher-helper.cc',
- 'compiler-dispatcher/compiler-dispatcher-helper.h',
'compiler-dispatcher/compiler-dispatcher-job-unittest.cc',
'compiler-dispatcher/compiler-dispatcher-tracer-unittest.cc',
'compiler-dispatcher/compiler-dispatcher-unittest.cc',
@@ -98,16 +98,31 @@
'counters-unittest.cc',
'eh-frame-iterator-unittest.cc',
'eh-frame-writer-unittest.cc',
+ 'heap/bitmap-unittest.cc',
+ 'heap/concurrent-marking-deque-unittest.cc',
+ 'heap/embedder-tracing-unittest.cc',
+ 'heap/gc-idle-time-handler-unittest.cc',
+ 'heap/gc-tracer-unittest.cc',
+ 'heap/item-parallel-job-unittest.cc',
+ 'heap/marking-unittest.cc',
+ 'heap/memory-reducer-unittest.cc',
+ 'heap/heap-unittest.cc',
+ 'heap/scavenge-job-unittest.cc',
+ 'heap/slot-set-unittest.cc',
+ 'heap/spaces-unittest.cc',
+ 'heap/unmapper-unittest.cc',
+ 'heap/workstealing-marking-deque-unittest.cc',
'interpreter/bytecodes-unittest.cc',
'interpreter/bytecode-array-builder-unittest.cc',
'interpreter/bytecode-array-iterator-unittest.cc',
'interpreter/bytecode-array-random-iterator-unittest.cc',
'interpreter/bytecode-array-writer-unittest.cc',
'interpreter/bytecode-decoder-unittest.cc',
+ 'interpreter/bytecode-node-unittest.cc',
'interpreter/bytecode-operands-unittest.cc',
- 'interpreter/bytecode-pipeline-unittest.cc',
'interpreter/bytecode-register-allocator-unittest.cc',
'interpreter/bytecode-register-optimizer-unittest.cc',
+ 'interpreter/bytecode-source-info-unittest.cc',
'interpreter/bytecode-utils.h',
'interpreter/constant-array-builder-unittest.cc',
'interpreter/interpreter-assembler-unittest.cc',
@@ -115,22 +130,14 @@
'libplatform/default-platform-unittest.cc',
'libplatform/task-queue-unittest.cc',
'libplatform/worker-thread-unittest.cc',
- 'heap/bitmap-unittest.cc',
- 'heap/embedder-tracing-unittest.cc',
- 'heap/gc-idle-time-handler-unittest.cc',
- 'heap/gc-tracer-unittest.cc',
- 'heap/marking-unittest.cc',
- 'heap/memory-reducer-unittest.cc',
- 'heap/heap-unittest.cc',
- 'heap/scavenge-job-unittest.cc',
- 'heap/slot-set-unittest.cc',
- 'heap/spaces-unittest.cc',
- 'heap/unmapper-unittest.cc',
'locked-queue-unittest.cc',
'object-unittest.cc',
+ 'parser/preparser-unittest.cc',
'register-configuration-unittest.cc',
'run-all-unittests.cc',
'source-position-table-unittest.cc',
+ 'test-helpers.cc',
+ 'test-helpers.h',
'test-utils.h',
'test-utils.cc',
'unicode-unittest.cc',
@@ -139,14 +146,13 @@
'zone/zone-allocator-unittest.cc',
'zone/zone-chunk-list-unittest.cc',
'zone/zone-unittest.cc',
- 'wasm/asm-types-unittest.cc',
'wasm/control-transfer-unittest.cc',
'wasm/decoder-unittest.cc',
'wasm/function-body-decoder-unittest.cc',
'wasm/leb-helper-unittest.cc',
'wasm/loop-assignment-analysis-unittest.cc',
'wasm/module-decoder-unittest.cc',
- 'wasm/switch-logic-unittest.cc',
+ 'wasm/streaming-decoder-unittest.cc',
'wasm/wasm-macro-gen-unittest.cc',
'wasm/wasm-module-builder-unittest.cc',
'wasm/wasm-opcodes-unittest.cc',
@@ -190,6 +196,7 @@
'../../src/v8.gyp:v8',
'../../src/v8.gyp:v8_libbase',
'../../src/v8.gyp:v8_libplatform',
+ '../../src/v8.gyp:v8_maybe_snapshot',
],
'include_dirs': [
'../..',
@@ -257,6 +264,9 @@
'<(icu_gyp_path):icuuc',
],
}],
+ ['v8_use_snapshot=="true"', {
+ 'dependencies': ['../../src/v8.gyp:v8_builtins_generators'],
+ }],
],
},
],
diff --git a/deps/v8/test/unittests/value-serializer-unittest.cc b/deps/v8/test/unittests/value-serializer-unittest.cc
index 9f49c6498a..7ca7433eeb 100644
--- a/deps/v8/test/unittests/value-serializer-unittest.cc
+++ b/deps/v8/test/unittests/value-serializer-unittest.cc
@@ -1603,6 +1603,44 @@ TEST_F(ValueSerializerTest, DecodeRegExp) {
});
}
+// Tests that invalid flags are not accepted by the deserializer. In particular,
+// the dotAll flag ('s') is only valid when the corresponding flag is enabled.
+TEST_F(ValueSerializerTest, DecodeRegExpDotAll) {
+ i::FLAG_harmony_regexp_dotall = false;
+ DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x1f},
+ [this](Local<Value> value) {
+ ASSERT_TRUE(value->IsRegExp());
+ EXPECT_TRUE(EvaluateScriptForResultBool(
+ "Object.getPrototypeOf(result) === RegExp.prototype"));
+ EXPECT_TRUE(EvaluateScriptForResultBool(
+ "result.toString() === '/foo/gimuy'"));
+ });
+ InvalidDecodeTest(
+ {0xff, 0x09, 0x3f, 0x00, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x3f});
+ InvalidDecodeTest(
+ {0xff, 0x09, 0x3f, 0x00, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x7f});
+
+ i::FLAG_harmony_regexp_dotall = true;
+ DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x1f},
+ [this](Local<Value> value) {
+ ASSERT_TRUE(value->IsRegExp());
+ EXPECT_TRUE(EvaluateScriptForResultBool(
+ "Object.getPrototypeOf(result) === RegExp.prototype"));
+ EXPECT_TRUE(EvaluateScriptForResultBool(
+ "result.toString() === '/foo/gimuy'"));
+ });
+ DecodeTest({0xff, 0x09, 0x3f, 0x00, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x3f},
+ [this](Local<Value> value) {
+ ASSERT_TRUE(value->IsRegExp());
+ EXPECT_TRUE(EvaluateScriptForResultBool(
+ "Object.getPrototypeOf(result) === RegExp.prototype"));
+ EXPECT_TRUE(EvaluateScriptForResultBool(
+ "result.toString() === '/foo/gimsuy'"));
+ });
+ InvalidDecodeTest(
+ {0xff, 0x09, 0x3f, 0x00, 0x52, 0x03, 0x66, 0x6f, 0x6f, 0x7f});
+}
+
TEST_F(ValueSerializerTest, RoundTripMap) {
RoundTripTest(
"(() => { var m = new Map(); m.set(42, 'foo'); return m; })()",
@@ -1866,21 +1904,24 @@ TEST_F(ValueSerializerTest, DecodeArrayBufferOOM) {
Isolate::CreateParams params;
params.array_buffer_allocator = &allocator;
Isolate* isolate = Isolate::New(params);
- Isolate::Scope isolate_scope(isolate);
- HandleScope handle_scope(isolate);
- Local<Context> context = Context::New(isolate);
- Context::Scope context_scope(context);
- TryCatch try_catch(isolate);
-
- const std::vector<uint8_t> data = {0xff, 0x09, 0x3f, 0x00, 0x42,
- 0x03, 0x00, 0x80, 0xff, 0x00};
- ValueDeserializer deserializer(isolate, &data[0],
- static_cast<int>(data.size()), nullptr);
- deserializer.SetSupportsLegacyWireFormat(true);
- ASSERT_TRUE(deserializer.ReadHeader(context).FromMaybe(false));
- ASSERT_FALSE(try_catch.HasCaught());
- EXPECT_TRUE(deserializer.ReadValue(context).IsEmpty());
- EXPECT_TRUE(try_catch.HasCaught());
+ {
+ Isolate::Scope isolate_scope(isolate);
+ HandleScope handle_scope(isolate);
+ Local<Context> context = Context::New(isolate);
+ Context::Scope context_scope(context);
+ TryCatch try_catch(isolate);
+
+ const std::vector<uint8_t> data = {0xff, 0x09, 0x3f, 0x00, 0x42,
+ 0x03, 0x00, 0x80, 0xff, 0x00};
+ ValueDeserializer deserializer(isolate, &data[0],
+ static_cast<int>(data.size()), nullptr);
+ deserializer.SetSupportsLegacyWireFormat(true);
+ ASSERT_TRUE(deserializer.ReadHeader(context).FromMaybe(false));
+ ASSERT_FALSE(try_catch.HasCaught());
+ EXPECT_TRUE(deserializer.ReadValue(context).IsEmpty());
+ EXPECT_TRUE(try_catch.HasCaught());
+ }
+ isolate->Dispose();
}
// Includes an ArrayBuffer wrapper marked for transfer from the serialization
diff --git a/deps/v8/test/unittests/wasm/control-transfer-unittest.cc b/deps/v8/test/unittests/wasm/control-transfer-unittest.cc
index 12712683c1..f49ba9c862 100644
--- a/deps/v8/test/unittests/wasm/control-transfer-unittest.cc
+++ b/deps/v8/test/unittests/wasm/control-transfer-unittest.cc
@@ -6,9 +6,9 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "src/v8.h"
-
#include "src/wasm/wasm-interpreter.h"
-#include "src/wasm/wasm-macro-gen.h"
+
+#include "test/common/wasm/wasm-macro-gen.h"
using testing::MakeMatcher;
using testing::Matcher;
@@ -27,88 +27,90 @@ namespace wasm {
#define TRANSFER_VOID 0
#define TRANSFER_ONE 1
-struct ExpectedPcDelta {
+struct ExpectedControlTransfer {
pc_t pc;
- pcdiff_t expected;
+ pcdiff_t pc_diff;
+ uint32_t sp_diff;
+ uint32_t target_arity;
};
// For nicer error messages.
-class ControlTransferMatcher : public MatcherInterface<const pcdiff_t&> {
+class ControlTransferMatcher
+ : public MatcherInterface<const ControlTransferEntry&> {
public:
- explicit ControlTransferMatcher(pc_t pc, const pcdiff_t& expected)
+ explicit ControlTransferMatcher(pc_t pc,
+ const ExpectedControlTransfer& expected)
: pc_(pc), expected_(expected) {}
void DescribeTo(std::ostream* os) const override {
- *os << "@" << pc_ << " pcdiff = " << expected_;
+ *os << "@" << pc_ << ": pcdiff = " << expected_.pc_diff
+ << ", spdiff = " << expected_.sp_diff
+ << ", target arity = " << expected_.target_arity;
}
- bool MatchAndExplain(const pcdiff_t& input,
+ bool MatchAndExplain(const ControlTransferEntry& input,
MatchResultListener* listener) const override {
- if (input != expected_) {
- *listener << "@" << pc_ << " pcdiff = " << input;
- return false;
+ if (input.pc_diff == expected_.pc_diff &&
+ input.sp_diff == expected_.sp_diff &&
+ input.target_arity == expected_.target_arity) {
+ return true;
}
- return true;
+ *listener << "@" << pc_ << ": pcdiff = " << input.pc_diff
+ << ", spdiff = " << input.sp_diff
+ << ", target arity = " << input.target_arity;
+ return false;
}
private:
pc_t pc_;
- const pcdiff_t& expected_;
+ const ExpectedControlTransfer& expected_;
};
class ControlTransferTest : public TestWithZone {
public:
- void CheckPcDeltas(const byte* start, const byte* end,
- ExpectedPcDelta* expected_deltas, size_t num_targets) {
- ControlTransferMap map =
- WasmInterpreter::ComputeControlTransfersForTesting(zone(), start, end);
+ template <int code_len>
+ void CheckTransfers(
+ const byte (&code)[code_len],
+ std::initializer_list<ExpectedControlTransfer> expected_transfers) {
+ byte code_with_end[code_len + 1]; // NOLINT: code_len is a constant here
+ memcpy(code_with_end, code, code_len);
+ code_with_end[code_len] = kExprEnd;
+
+ ControlTransferMap map = WasmInterpreter::ComputeControlTransfersForTesting(
+ zone(), nullptr, code_with_end, code_with_end + code_len + 1);
// Check all control targets in the map.
- for (size_t i = 0; i < num_targets; i++) {
- pc_t pc = expected_deltas[i].pc;
- auto it = map.find(pc);
- if (it == map.end()) {
- EXPECT_TRUE(false) << "expected control target @ " << pc;
- } else {
- pcdiff_t expected = expected_deltas[i].expected;
- pcdiff_t& target = it->second;
- EXPECT_THAT(target,
- MakeMatcher(new ControlTransferMatcher(pc, expected)));
- }
+ for (auto& expected_transfer : expected_transfers) {
+ pc_t pc = expected_transfer.pc;
+ EXPECT_TRUE(map.count(pc) > 0) << "expected control target @" << pc;
+ if (!map.count(pc)) continue;
+ auto& entry = map[pc];
+ EXPECT_THAT(entry, MakeMatcher(new ControlTransferMatcher(
+ pc, expected_transfer)));
}
// Check there are no other control targets.
- CheckNoOtherTargets<ExpectedPcDelta>(start, end, map, expected_deltas,
- num_targets);
+ CheckNoOtherTargets(code_with_end, code_with_end + code_len + 1, map,
+ expected_transfers);
}
- template <typename T>
- void CheckNoOtherTargets(const byte* start, const byte* end,
- ControlTransferMap& map, T* targets,
- size_t num_targets) {
+ void CheckNoOtherTargets(
+ const byte* start, const byte* end, ControlTransferMap& map,
+ std::initializer_list<ExpectedControlTransfer> targets) {
// Check there are no other control targets.
for (pc_t pc = 0; start + pc < end; pc++) {
bool found = false;
- for (size_t i = 0; i < num_targets; i++) {
- if (targets[i].pc == pc) {
+ for (auto& target : targets) {
+ if (target.pc == pc) {
found = true;
break;
}
}
if (found) continue;
- if (map.find(pc) != map.end()) {
- printf("expected no control @ +%zu\n", pc);
- EXPECT_TRUE(false);
- }
+ EXPECT_TRUE(map.count(pc) == 0) << "expected no control @ +" << pc;
}
}
};
-#define EXPECT_PC_DELTAS(...) \
- do { \
- ExpectedPcDelta pairs[] = {__VA_ARGS__}; \
- CheckPcDeltas(code, code + sizeof(code), pairs, arraysize(pairs)); \
- } while (false)
-
TEST_F(ControlTransferTest, SimpleIf) {
byte code[] = {
kExprI32Const, // @0
@@ -117,7 +119,7 @@ TEST_F(ControlTransferTest, SimpleIf) {
kLocalVoid, // @3
kExprEnd // @4
};
- EXPECT_PC_DELTAS({2, 2});
+ CheckTransfers(code, {{2, 2, 0, 0}});
}
TEST_F(ControlTransferTest, SimpleIf1) {
@@ -129,7 +131,7 @@ TEST_F(ControlTransferTest, SimpleIf1) {
kExprNop, // @4
kExprEnd // @5
};
- EXPECT_PC_DELTAS({2, 3});
+ CheckTransfers(code, {{2, 3, 0, 0}});
}
TEST_F(ControlTransferTest, SimpleIf2) {
@@ -142,7 +144,7 @@ TEST_F(ControlTransferTest, SimpleIf2) {
kExprNop, // @5
kExprEnd // @6
};
- EXPECT_PC_DELTAS({2, 4});
+ CheckTransfers(code, {{2, 4, 0, 0}});
}
TEST_F(ControlTransferTest, SimpleIfElse) {
@@ -154,7 +156,7 @@ TEST_F(ControlTransferTest, SimpleIfElse) {
kExprElse, // @4
kExprEnd // @5
};
- EXPECT_PC_DELTAS({2, 3}, {4, 2});
+ CheckTransfers(code, {{2, 3, 0, 0}, {4, 2, 0, 0}});
}
TEST_F(ControlTransferTest, SimpleIfElse_v1) {
@@ -170,7 +172,7 @@ TEST_F(ControlTransferTest, SimpleIfElse_v1) {
0, // @8
kExprEnd // @9
};
- EXPECT_PC_DELTAS({2, 5}, {6, 4});
+ CheckTransfers(code, {{2, 5, 0, 0}, {6, 4, 1, 0}});
}
TEST_F(ControlTransferTest, SimpleIfElse1) {
@@ -183,7 +185,7 @@ TEST_F(ControlTransferTest, SimpleIfElse1) {
kExprNop, // @5
kExprEnd // @6
};
- EXPECT_PC_DELTAS({2, 3}, {4, 3});
+ CheckTransfers(code, {{2, 3, 0, 0}, {4, 3, 0, 0}});
}
TEST_F(ControlTransferTest, IfBr) {
@@ -196,7 +198,7 @@ TEST_F(ControlTransferTest, IfBr) {
0, // @5
kExprEnd // @6
};
- EXPECT_PC_DELTAS({2, 4}, {4, 3});
+ CheckTransfers(code, {{2, 4, 0, 0}, {4, 3, 0, 0}});
}
TEST_F(ControlTransferTest, IfBrElse) {
@@ -210,7 +212,7 @@ TEST_F(ControlTransferTest, IfBrElse) {
kExprElse, // @6
kExprEnd // @7
};
- EXPECT_PC_DELTAS({2, 5}, {4, 4}, {6, 2});
+ CheckTransfers(code, {{2, 5, 0, 0}, {4, 4, 0, 0}, {6, 2, 0, 0}});
}
TEST_F(ControlTransferTest, IfElseBr) {
@@ -224,15 +226,16 @@ TEST_F(ControlTransferTest, IfElseBr) {
0, // @6
kExprEnd // @7
};
- EXPECT_PC_DELTAS({2, 3}, {4, 4}, {5, 3});
+ CheckTransfers(code, {{2, 3, 0, 0}, {4, 4, 0, 0}, {5, 3, 0, 0}});
}
TEST_F(ControlTransferTest, BlockEmpty) {
byte code[] = {
kExprBlock, // @0
- kExprEnd // @1
+ kLocalVoid, // @1
+ kExprEnd // @2
};
- CheckPcDeltas(code, code + sizeof(code), nullptr, 0);
+ CheckTransfers(code, {});
}
TEST_F(ControlTransferTest, Br0) {
@@ -243,7 +246,7 @@ TEST_F(ControlTransferTest, Br0) {
0, // @3
kExprEnd // @4
};
- EXPECT_PC_DELTAS({2, 3});
+ CheckTransfers(code, {{2, 3, 0, 0}});
}
TEST_F(ControlTransferTest, Br1) {
@@ -255,7 +258,7 @@ TEST_F(ControlTransferTest, Br1) {
0, // @4
kExprEnd // @5
};
- EXPECT_PC_DELTAS({3, 3});
+ CheckTransfers(code, {{3, 3, 0, 0}});
}
TEST_F(ControlTransferTest, Br_v1a) {
@@ -268,7 +271,7 @@ TEST_F(ControlTransferTest, Br_v1a) {
0, // @5
kExprEnd // @6
};
- EXPECT_PC_DELTAS({4, 3});
+ CheckTransfers(code, {{4, 3, 1, 0}});
}
TEST_F(ControlTransferTest, Br_v1b) {
@@ -281,7 +284,7 @@ TEST_F(ControlTransferTest, Br_v1b) {
0, // @5
kExprEnd // @6
};
- EXPECT_PC_DELTAS({4, 3});
+ CheckTransfers(code, {{4, 3, 1, 0}});
}
TEST_F(ControlTransferTest, Br_v1c) {
@@ -294,7 +297,20 @@ TEST_F(ControlTransferTest, Br_v1c) {
0, // @5
kExprEnd // @6
};
- EXPECT_PC_DELTAS({4, 3});
+ CheckTransfers(code, {{4, 3, 0, 0}});
+}
+
+TEST_F(ControlTransferTest, Br_v1d) {
+ byte code[] = {
+ kExprBlock, // @0
+ kLocalI32, // @1
+ kExprI32Const, // @2
+ 0, // @3
+ kExprBr, // @4
+ 0, // @5
+ kExprEnd // @6
+ };
+ CheckTransfers(code, {{4, 3, 1, 1}});
}
TEST_F(ControlTransferTest, Br2) {
@@ -307,7 +323,7 @@ TEST_F(ControlTransferTest, Br2) {
0, // @5
kExprEnd // @6
};
- EXPECT_PC_DELTAS({4, 3});
+ CheckTransfers(code, {{4, 3, 0, 0}});
}
TEST_F(ControlTransferTest, Br0b) {
@@ -319,7 +335,7 @@ TEST_F(ControlTransferTest, Br0b) {
kExprNop, // @4
kExprEnd // @5
};
- EXPECT_PC_DELTAS({2, 4});
+ CheckTransfers(code, {{2, 4, 0, 0}});
}
TEST_F(ControlTransferTest, Br0c) {
@@ -332,7 +348,7 @@ TEST_F(ControlTransferTest, Br0c) {
kExprNop, // @5
kExprEnd // @6
};
- EXPECT_PC_DELTAS({2, 5});
+ CheckTransfers(code, {{2, 5, 0, 0}});
}
TEST_F(ControlTransferTest, SimpleLoop1) {
@@ -343,7 +359,7 @@ TEST_F(ControlTransferTest, SimpleLoop1) {
0, // @3
kExprEnd // @4
};
- EXPECT_PC_DELTAS({2, -2});
+ CheckTransfers(code, {{2, -2, 0, 0}});
}
TEST_F(ControlTransferTest, SimpleLoop2) {
@@ -355,7 +371,7 @@ TEST_F(ControlTransferTest, SimpleLoop2) {
0, // @4
kExprEnd // @5
};
- EXPECT_PC_DELTAS({3, -3});
+ CheckTransfers(code, {{3, -3, 0, 0}});
}
TEST_F(ControlTransferTest, SimpleLoopExit1) {
@@ -366,7 +382,7 @@ TEST_F(ControlTransferTest, SimpleLoopExit1) {
1, // @3
kExprEnd // @4
};
- EXPECT_PC_DELTAS({2, 3});
+ CheckTransfers(code, {{2, 4, 0, 0}});
}
TEST_F(ControlTransferTest, SimpleLoopExit2) {
@@ -378,7 +394,7 @@ TEST_F(ControlTransferTest, SimpleLoopExit2) {
1, // @4
kExprEnd // @5
};
- EXPECT_PC_DELTAS({3, 3});
+ CheckTransfers(code, {{3, 4, 0, 0}});
}
TEST_F(ControlTransferTest, BrTable0) {
@@ -392,7 +408,7 @@ TEST_F(ControlTransferTest, BrTable0) {
U32V_1(0), // @6
kExprEnd // @7
};
- EXPECT_PC_DELTAS({4, 4});
+ CheckTransfers(code, {{4, 4, 0, 0}});
}
TEST_F(ControlTransferTest, BrTable0_v1a) {
@@ -408,7 +424,7 @@ TEST_F(ControlTransferTest, BrTable0_v1a) {
U32V_1(0), // @8
kExprEnd // @9
};
- EXPECT_PC_DELTAS({6, 4});
+ CheckTransfers(code, {{6, 4, 1, 0}});
}
TEST_F(ControlTransferTest, BrTable0_v1b) {
@@ -424,7 +440,7 @@ TEST_F(ControlTransferTest, BrTable0_v1b) {
U32V_1(0), // @8
kExprEnd // @9
};
- EXPECT_PC_DELTAS({6, 4});
+ CheckTransfers(code, {{6, 4, 1, 0}});
}
TEST_F(ControlTransferTest, BrTable1) {
@@ -439,7 +455,7 @@ TEST_F(ControlTransferTest, BrTable1) {
U32V_1(0), // @7
kExprEnd // @8
};
- EXPECT_PC_DELTAS({4, 5}, {5, 4});
+ CheckTransfers(code, {{4, 5, 0, 0}, {5, 4, 0, 0}});
}
TEST_F(ControlTransferTest, BrTable2) {
@@ -458,7 +474,56 @@ TEST_F(ControlTransferTest, BrTable2) {
kExprEnd, // @11
kExprEnd // @12
};
- EXPECT_PC_DELTAS({6, 6}, {7, 5}, {8, 5});
+ CheckTransfers(code, {{6, 6, 0, 0}, {7, 5, 0, 0}, {8, 5, 0, 0}});
+}
+
+TEST_F(ControlTransferTest, BiggerSpDiffs) {
+ byte code[] = {
+ kExprBlock, // @0
+ kLocalI32, // @1
+ kExprI32Const, // @2
+ 0, // @3
+ kExprBlock, // @4
+ kLocalVoid, // @5
+ kExprI32Const, // @6
+ 0, // @7
+ kExprI32Const, // @8
+ 0, // @9
+ kExprI32Const, // @10
+ 0, // @11
+ kExprBrIf, // @12
+ 0, // @13
+ kExprBr, // @14
+ 1, // @15
+ kExprEnd, // @16
+ kExprEnd // @17
+ };
+ CheckTransfers(code, {{12, 5, 2, 0}, {14, 4, 3, 1}});
+}
+
+TEST_F(ControlTransferTest, NoInfoForUnreachableCode) {
+ byte code[] = {
+ kExprBlock, // @0
+ kLocalVoid, // @1
+ kExprBr, // @2
+ 0, // @3
+ kExprBr, // @4 -- no control transfer entry!
+ 1, // @5
+ kExprEnd, // @6
+ kExprBlock, // @7
+ kLocalVoid, // @8
+ kExprUnreachable, // @9
+ kExprI32Const, // @10
+ 0, // @11
+ kExprIf, // @12 -- no control transfer entry!
+ kLocalVoid, // @13
+ kExprBr, // @14 -- no control transfer entry!
+ 0, // @15
+ kExprElse, // @16 -- no control transfer entry!
+ kExprEnd, // @17
+ kExprEnd // @18
+ };
+ CheckTransfers(code, {{2, 5, 0, 0}});
}
} // namespace wasm
diff --git a/deps/v8/test/unittests/wasm/decoder-unittest.cc b/deps/v8/test/unittests/wasm/decoder-unittest.cc
index f28d5473d7..e0c7908b90 100644
--- a/deps/v8/test/unittests/wasm/decoder-unittest.cc
+++ b/deps/v8/test/unittests/wasm/decoder-unittest.cc
@@ -6,7 +6,7 @@
#include "src/objects-inl.h"
#include "src/wasm/decoder.h"
-#include "src/wasm/wasm-macro-gen.h"
+#include "test/common/wasm/wasm-macro-gen.h"
namespace v8 {
namespace internal {
diff --git a/deps/v8/test/unittests/wasm/function-body-decoder-unittest.cc b/deps/v8/test/unittests/wasm/function-body-decoder-unittest.cc
index 6961df9b5a..49c2ca76e6 100644
--- a/deps/v8/test/unittests/wasm/function-body-decoder-unittest.cc
+++ b/deps/v8/test/unittests/wasm/function-body-decoder-unittest.cc
@@ -4,21 +4,20 @@
#include "test/unittests/test-utils.h"
-#include "src/v8.h"
-
-#include "test/common/wasm/test-signatures.h"
-
#include "src/objects-inl.h"
#include "src/objects.h"
-
+#include "src/v8.h"
#include "src/wasm/function-body-decoder-impl.h"
#include "src/wasm/function-body-decoder.h"
+#include "src/wasm/local-decl-encoder.h"
#include "src/wasm/signature-map.h"
#include "src/wasm/wasm-limits.h"
-#include "src/wasm/wasm-macro-gen.h"
#include "src/wasm/wasm-module.h"
#include "src/wasm/wasm-opcodes.h"
+#include "test/common/wasm/test-signatures.h"
+#include "test/common/wasm/wasm-macro-gen.h"
+
namespace v8 {
namespace internal {
namespace wasm {
@@ -135,11 +134,11 @@ class FunctionBodyDecoderTest : public TestWithZone {
start, end);
if (result.ok() != expected_success) {
- uint32_t pc = result.error_offset;
+ uint32_t pc = result.error_offset();
std::ostringstream str;
if (expected_success) {
str << "Verification failed: pc = +" << pc
- << ", msg = " << result.error_msg;
+ << ", msg = " << result.error_msg();
} else {
str << "Verification successed, expected failure; pc = +" << pc;
}
@@ -1296,7 +1295,7 @@ TEST_F(FunctionBodyDecoderTest, StoreMemOffset) {
TestModuleEnv module_env;
module = &module_env;
module_env.InitializeMemory();
- for (int offset = 0; offset < 128; offset += 7) {
+ for (byte offset = 0; offset < 128; offset += 7) {
byte code[] = {WASM_STORE_MEM_OFFSET(MachineType::Int32(), offset,
WASM_ZERO, WASM_ZERO)};
EXPECT_VERIFIES_C(v_i, code);
@@ -2636,6 +2635,10 @@ TEST_F(WasmOpcodeLengthTest, SimdExpressions) {
EXPECT_LENGTH_N(3, kSimdPrefix, static_cast<byte>(kExpr##name & 0xff));
FOREACH_SIMD_1_OPERAND_OPCODE(TEST_SIMD)
#undef TEST_SIMD
+ EXPECT_LENGTH_N(6, kSimdPrefix, static_cast<byte>(kExprS32x4Shuffle & 0xff));
+ EXPECT_LENGTH_N(10, kSimdPrefix, static_cast<byte>(kExprS16x8Shuffle & 0xff));
+ EXPECT_LENGTH_N(18, kSimdPrefix, static_cast<byte>(kExprS8x16Shuffle & 0xff));
+#undef TEST_SIMD
// test for bad simd opcode
EXPECT_LENGTH_N(2, kSimdPrefix, 0xff);
}
diff --git a/deps/v8/test/unittests/wasm/loop-assignment-analysis-unittest.cc b/deps/v8/test/unittests/wasm/loop-assignment-analysis-unittest.cc
index 9e1954d481..e6507b9685 100644
--- a/deps/v8/test/unittests/wasm/loop-assignment-analysis-unittest.cc
+++ b/deps/v8/test/unittests/wasm/loop-assignment-analysis-unittest.cc
@@ -4,18 +4,16 @@
#include "test/unittests/test-utils.h"
-#include "src/v8.h"
-
-#include "test/common/wasm/test-signatures.h"
-
#include "src/bit-vector.h"
#include "src/objects-inl.h"
#include "src/objects.h"
-
+#include "src/v8.h"
#include "src/wasm/function-body-decoder.h"
-#include "src/wasm/wasm-macro-gen.h"
#include "src/wasm/wasm-module.h"
+#include "test/common/wasm/test-signatures.h"
+#include "test/common/wasm/wasm-macro-gen.h"
+
#define WASM_SET_ZERO(i) WASM_SET_LOCAL(i, WASM_ZERO)
namespace v8 {
diff --git a/deps/v8/test/unittests/wasm/module-decoder-unittest.cc b/deps/v8/test/unittests/wasm/module-decoder-unittest.cc
index adbb3d5808..3bdd3d9b99 100644
--- a/deps/v8/test/unittests/wasm/module-decoder-unittest.cc
+++ b/deps/v8/test/unittests/wasm/module-decoder-unittest.cc
@@ -8,8 +8,8 @@
#include "src/objects-inl.h"
#include "src/wasm/module-decoder.h"
#include "src/wasm/wasm-limits.h"
-#include "src/wasm/wasm-macro-gen.h"
#include "src/wasm/wasm-opcodes.h"
+#include "test/common/wasm/wasm-macro-gen.h"
namespace v8 {
namespace internal {
@@ -89,14 +89,12 @@ namespace wasm {
do { \
ModuleResult result = DecodeModule(data, data + sizeof(data)); \
EXPECT_TRUE(result.ok()); \
- if (result.val) delete result.val; \
} while (false)
#define EXPECT_FAILURE_LEN(data, length) \
do { \
ModuleResult result = DecodeModule(data, data + length); \
EXPECT_FALSE(result.ok()); \
- if (result.val) delete result.val; \
} while (false)
#define EXPECT_FAILURE(data) EXPECT_FAILURE_LEN(data, sizeof(data))
@@ -108,13 +106,10 @@ namespace wasm {
} \
} while (false)
-#define EXPECT_OK(result) \
- do { \
- EXPECT_TRUE(result.ok()); \
- if (!result.ok()) { \
- if (result.val) delete result.val; \
- return; \
- } \
+#define EXPECT_OK(result) \
+ do { \
+ EXPECT_TRUE(result.ok()); \
+ if (!result.ok()) return; \
} while (false)
static size_t SizeOfVarInt(size_t value) {
@@ -161,7 +156,6 @@ TEST_F(WasmModuleVerifyTest, WrongMagic) {
const byte data[] = {U32_LE(kWasmMagic ^ x), U32_LE(kWasmVersion)};
ModuleResult result = DecodeModuleNoHeader(data, data + sizeof(data));
EXPECT_FALSE(result.ok());
- if (result.val) delete result.val;
}
}
@@ -170,14 +164,12 @@ TEST_F(WasmModuleVerifyTest, WrongVersion) {
const byte data[] = {U32_LE(kWasmMagic), U32_LE(kWasmVersion ^ x)};
ModuleResult result = DecodeModuleNoHeader(data, data + sizeof(data));
EXPECT_FALSE(result.ok());
- if (result.val) delete result.val;
}
}
TEST_F(WasmModuleVerifyTest, DecodeEmpty) {
ModuleResult result = DecodeModule(nullptr, 0);
EXPECT_TRUE(result.ok());
- if (result.val) delete result.val;
}
TEST_F(WasmModuleVerifyTest, OneGlobal) {
@@ -204,8 +196,6 @@ TEST_F(WasmModuleVerifyTest, OneGlobal) {
EXPECT_FALSE(global->mutability);
EXPECT_EQ(WasmInitExpr::kI32Const, global->init.kind);
EXPECT_EQ(13, global->init.val.i32_const);
-
- if (result.val) delete result.val;
}
EXPECT_OFF_END_FAILURE(data, 1, sizeof(data));
@@ -222,7 +212,6 @@ TEST_F(WasmModuleVerifyTest, Global_invalid_type) {
ModuleResult result = DecodeModule(data, data + sizeof(data));
EXPECT_FALSE(result.ok());
- if (result.val) delete result.val;
}
TEST_F(WasmModuleVerifyTest, Global_invalid_type2) {
@@ -236,7 +225,6 @@ TEST_F(WasmModuleVerifyTest, Global_invalid_type2) {
ModuleResult result = DecodeModule(data, data + sizeof(data));
EXPECT_FALSE(result.ok());
- if (result.val) delete result.val;
}
TEST_F(WasmModuleVerifyTest, ZeroGlobals) {
@@ -246,7 +234,6 @@ TEST_F(WasmModuleVerifyTest, ZeroGlobals) {
};
ModuleResult result = DecodeModule(data, data + sizeof(data));
EXPECT_OK(result);
- if (result.val) delete result.val;
}
TEST_F(WasmModuleVerifyTest, ExportMutableGlobal) {
@@ -325,7 +312,6 @@ TEST_F(WasmModuleVerifyTest, NGlobals) {
ModuleResult result = DecodeModule(&buffer[0], &buffer[0] + buffer.size());
EXPECT_OK(result);
- if (result.val) delete result.val;
}
}
@@ -371,8 +357,6 @@ TEST_F(WasmModuleVerifyTest, TwoGlobals) {
EXPECT_EQ(8u, g1->offset);
EXPECT_TRUE(g1->mutability);
EXPECT_EQ(WasmInitExpr::kF64Const, g1->init.kind);
-
- if (result.val) delete result.val;
}
EXPECT_OFF_END_FAILURE(data, 1, sizeof(data));
@@ -413,7 +397,6 @@ TEST_F(WasmModuleVerifyTest, MultipleSignatures) {
EXPECT_EQ(1u, result.val->signatures[1]->parameter_count());
EXPECT_EQ(2u, result.val->signatures[2]->parameter_count());
}
- if (result.val) delete result.val;
EXPECT_OFF_END_FAILURE(data, 1, sizeof(data));
}
@@ -456,7 +439,6 @@ TEST_F(WasmModuleVerifyTest, DataSegmentWithImmutableImportedGlobal) {
WasmInitExpr expr = result.val->data_segments.back().dest_addr;
EXPECT_EQ(WasmInitExpr::kGlobalIndex, expr.kind);
EXPECT_EQ(1u, expr.val.global_index);
- if (result.val) delete result.val;
}
TEST_F(WasmModuleVerifyTest, DataSegmentWithMutableImportedGlobal) {
@@ -544,8 +526,6 @@ TEST_F(WasmModuleVerifyTest, OneDataSegment) {
EXPECT_EQ(0x9bbaa, segment->dest_addr.val.i32_const);
EXPECT_EQ(kDataSegmentSourceOffset, segment->source_offset);
EXPECT_EQ(3u, segment->source_size);
-
- if (result.val) delete result.val;
}
EXPECT_OFF_END_FAILURE(data, 14, sizeof(data));
@@ -604,8 +584,6 @@ TEST_F(WasmModuleVerifyTest, TwoDataSegments) {
EXPECT_EQ(0x6ddcc, s1->dest_addr.val.i32_const);
EXPECT_EQ(kDataSegment1SourceOffset, s1->source_offset);
EXPECT_EQ(10u, s1->source_size);
-
- if (result.val) delete result.val;
}
EXPECT_OFF_END_FAILURE(data, 14, sizeof(data));
@@ -679,7 +657,26 @@ TEST_F(WasmModuleVerifyTest, OneIndirectFunction) {
EXPECT_EQ(1u, result.val->function_tables.size());
EXPECT_EQ(1u, result.val->function_tables[0].min_size);
}
- if (result.val) delete result.val;
+}
+
+TEST_F(WasmModuleVerifyTest, Regression_735887) {
+ // Test with an invalid function index in the element section.
+ static const byte data[] = {
+ // sig#0 ---------------------------------------------------------------
+ SIGNATURES_SECTION_VOID_VOID,
+ // funcs ---------------------------------------------------------------
+ ONE_EMPTY_FUNCTION,
+ // table declaration ---------------------------------------------------
+ SECTION(Table, 4), ENTRY_COUNT(1), kWasmAnyFunctionTypeForm, 0, 1,
+ // elements ------------------------------------------------------------
+ SECTION(Element, 7),
+ 1, // entry count
+ TABLE_INDEX(0), WASM_INIT_EXPR_I32V_1(0),
+ 1, // elements count
+ 0x9a // invalid I32V as function index
+ };
+
+ EXPECT_FAILURE(data);
}
TEST_F(WasmModuleVerifyTest, OneIndirectFunction_one_entry) {
@@ -705,7 +702,6 @@ TEST_F(WasmModuleVerifyTest, OneIndirectFunction_one_entry) {
EXPECT_EQ(1u, result.val->function_tables.size());
EXPECT_EQ(1u, result.val->function_tables[0].min_size);
}
- if (result.val) delete result.val;
}
TEST_F(WasmModuleVerifyTest, MultipleIndirectFunctions) {
@@ -742,7 +738,6 @@ TEST_F(WasmModuleVerifyTest, MultipleIndirectFunctions) {
EXPECT_EQ(1u, result.val->function_tables.size());
EXPECT_EQ(8u, result.val->function_tables[0].min_size);
}
- if (result.val) delete result.val;
}
TEST_F(WasmModuleVerifyTest, IndirectFunctionNoFunctions) {
@@ -955,7 +950,7 @@ TEST_F(WasmFunctionVerifyTest, Ok_v_v_empty) {
EXPECT_OK(result);
if (result.val && result.ok()) {
- WasmFunction* function = result.val;
+ WasmFunction* function = result.val.get();
EXPECT_EQ(0u, function->sig->parameter_count());
EXPECT_EQ(0u, function->sig->return_count());
EXPECT_EQ(0u, function->name_offset);
@@ -964,8 +959,6 @@ TEST_F(WasmFunctionVerifyTest, Ok_v_v_empty) {
EXPECT_EQ(sizeof(data), function->code_end_offset);
// TODO(titzer): verify encoding of local declarations
}
-
- if (result.val) delete result.val;
}
TEST_F(WasmModuleVerifyTest, SectionWithoutNameLength) {
@@ -1070,8 +1063,6 @@ TEST_F(WasmModuleVerifyTest, UnknownSectionSkipped) {
EXPECT_EQ(kWasmI32, global->type);
EXPECT_EQ(0u, global->offset);
-
- if (result.val) delete result.val;
}
TEST_F(WasmModuleVerifyTest, ImportTable_empty) {
@@ -1213,8 +1204,6 @@ TEST_F(WasmModuleVerifyTest, ExportTable_empty1) {
EXPECT_EQ(1u, result.val->functions.size());
EXPECT_EQ(0u, result.val->export_table.size());
-
- if (result.val) delete result.val;
}
TEST_F(WasmModuleVerifyTest, ExportTable_empty2) {
@@ -1244,8 +1233,6 @@ TEST_F(WasmModuleVerifyTest, ExportTableOne) {
EXPECT_EQ(1u, result.val->functions.size());
EXPECT_EQ(1u, result.val->export_table.size());
-
- if (result.val) delete result.val;
}
TEST_F(WasmModuleVerifyTest, ExportNameWithInvalidStringLength) {
@@ -1288,8 +1275,6 @@ TEST_F(WasmModuleVerifyTest, ExportTableTwo) {
EXPECT_EQ(1u, result.val->functions.size());
EXPECT_EQ(2u, result.val->export_table.size());
-
- if (result.val) delete result.val;
}
TEST_F(WasmModuleVerifyTest, ExportTableThree) {
@@ -1316,8 +1301,6 @@ TEST_F(WasmModuleVerifyTest, ExportTableThree) {
EXPECT_EQ(3u, result.val->functions.size());
EXPECT_EQ(3u, result.val->export_table.size());
-
- if (result.val) delete result.val;
}
TEST_F(WasmModuleVerifyTest, ExportTableThreeOne) {
@@ -1357,7 +1340,6 @@ TEST_F(WasmModuleVerifyTest, ExportTableOne_off_end) {
for (size_t length = 33; length < sizeof(data); length++) {
ModuleResult result = DecodeModule(data, data + length);
EXPECT_FALSE(result.ok());
- if (result.val) delete result.val;
}
}
diff --git a/deps/v8/test/unittests/wasm/streaming-decoder-unittest.cc b/deps/v8/test/unittests/wasm/streaming-decoder-unittest.cc
new file mode 100644
index 0000000000..98b3e25457
--- /dev/null
+++ b/deps/v8/test/unittests/wasm/streaming-decoder-unittest.cc
@@ -0,0 +1,498 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "test/unittests/test-utils.h"
+
+#include "src/objects-inl.h"
+
+#include "src/wasm/module-decoder.h"
+#include "src/wasm/streaming-decoder.h"
+
+#include "src/objects/descriptor-array.h"
+#include "src/objects/dictionary.h"
+#include "test/common/wasm/wasm-macro-gen.h"
+
+namespace v8 {
+namespace internal {
+namespace wasm {
+
+class WasmStreamingDecoderTest : public ::testing::Test {
+ public:
+ void ExpectVerifies(Vector<const uint8_t> data) {
+ for (int split = 0; split <= data.length(); ++split) {
+ StreamingDecoder stream(nullptr);
+ stream.OnBytesReceived(data.SubVector(0, split));
+ stream.OnBytesReceived(data.SubVector(split, data.length()));
+ EXPECT_TRUE(stream.FinishForTesting());
+ }
+ }
+
+ void ExpectFailure(Vector<const uint8_t> data) {
+ for (int split = 0; split <= data.length(); ++split) {
+ StreamingDecoder stream(nullptr);
+ stream.OnBytesReceived(data.SubVector(0, split));
+ stream.OnBytesReceived(data.SubVector(split, data.length()));
+ EXPECT_FALSE(stream.FinishForTesting());
+ }
+ }
+};
+
+TEST_F(WasmStreamingDecoderTest, EmptyStream) {
+ StreamingDecoder stream(nullptr);
+ EXPECT_FALSE(stream.FinishForTesting());
+}
+
+TEST_F(WasmStreamingDecoderTest, IncompleteModuleHeader) {
+ const uint8_t data[] = {U32_LE(kWasmMagic), U32_LE(kWasmVersion)};
+ {
+ StreamingDecoder stream(nullptr);
+ stream.OnBytesReceived(Vector<const uint8_t>(data, 1));
+ EXPECT_FALSE(stream.FinishForTesting());
+ }
+ for (int length = 1; length < static_cast<int>(arraysize(data)); ++length) {
+ ExpectFailure(Vector<const uint8_t>(data, length));
+ }
+}
+
+TEST_F(WasmStreamingDecoderTest, MagicAndVersion) {
+ const uint8_t data[] = {U32_LE(kWasmMagic), U32_LE(kWasmVersion)};
+ ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)));
+}
+
+TEST_F(WasmStreamingDecoderTest, BadMagic) {
+ for (uint32_t x = 1; x; x <<= 1) {
+ const uint8_t data[] = {U32_LE(kWasmMagic ^ x), U32_LE(kWasmVersion)};
+ ExpectFailure(Vector<const uint8_t>(data, arraysize(data)));
+ }
+}
+
+TEST_F(WasmStreamingDecoderTest, BadVersion) {
+ for (uint32_t x = 1; x; x <<= 1) {
+ const uint8_t data[] = {U32_LE(kWasmMagic), U32_LE(kWasmVersion ^ x)};
+ ExpectFailure(Vector<const uint8_t>(data, arraysize(data)));
+ }
+}
+
+TEST_F(WasmStreamingDecoderTest, OneSection) {
+ const uint8_t data[] = {
+ U32_LE(kWasmMagic), // --
+ U32_LE(kWasmVersion), // --
+ 0x1, // Section ID
+ 0x6, // Section Length
+ 0x0, // Payload
+ 0x0, // 2
+ 0x0, // 3
+ 0x0, // 4
+ 0x0, // 5
+ 0x0 // 6
+ };
+ ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)));
+}
+
+TEST_F(WasmStreamingDecoderTest, OneSection_b) {
+ const uint8_t data[] = {
+ U32_LE(kWasmMagic), // --
+ U32_LE(kWasmVersion), // --
+ 0x1, // Section ID
+ 0x86, // Section Length = 6 (LEB)
+ 0x0, // --
+ 0x0, // Payload
+ 0x0, // 2
+ 0x0, // 3
+ 0x0, // 4
+ 0x0, // 5
+ 0x0 // 6
+ };
+ ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)));
+}
+
+TEST_F(WasmStreamingDecoderTest, OneShortSection) {
+ // Short section means that section length + payload is less than 5 bytes,
+ // which is the maximum size of the length field.
+ const uint8_t data[] = {
+ U32_LE(kWasmMagic), // --
+ U32_LE(kWasmVersion), // --
+ 0x1, // Section ID
+ 0x2, // Section Length
+ 0x0, // Payload
+ 0x0 // 2
+ };
+ ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)));
+}
+
+TEST_F(WasmStreamingDecoderTest, OneShortSection_b) {
+ const uint8_t data[] = {
+ U32_LE(kWasmMagic), // --
+ U32_LE(kWasmVersion), // --
+ 0x1, // Section ID
+ 0x82, // Section Length = 2 (LEB)
+ 0x80, // --
+ 0x0, // --
+ 0x0, // Payload
+ 0x0 // 2
+ };
+ ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)));
+}
+
+TEST_F(WasmStreamingDecoderTest, OneEmptySection) {
+ const uint8_t data[] = {
+ U32_LE(kWasmMagic), // --
+ U32_LE(kWasmVersion), // --
+ 0x1, // Section ID
+ 0x0 // Section Length
+ };
+ ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)));
+}
+
+TEST_F(WasmStreamingDecoderTest, OneSectionNotEnoughPayload1) {
+ const uint8_t data[] = {
+ U32_LE(kWasmMagic), // --
+ U32_LE(kWasmVersion), // --
+ 0x1, // Section ID
+ 0x6, // Section Length
+ 0x0, // Payload
+ 0x0, // 2
+ 0x0, // 3
+ 0x0, // 4
+ 0x0 // 5
+ };
+ ExpectFailure(Vector<const uint8_t>(data, arraysize(data)));
+}
+
+TEST_F(WasmStreamingDecoderTest, OneSectionNotEnoughPayload2) {
+ const uint8_t data[] = {
+ U32_LE(kWasmMagic), // --
+ U32_LE(kWasmVersion), // --
+ 0x1, // Section ID
+ 0x6, // Section Length
+ 0x0 // Payload
+ };
+ ExpectFailure(Vector<const uint8_t>(data, arraysize(data)));
+}
+
+TEST_F(WasmStreamingDecoderTest, OneSectionInvalidLength) {
+ const uint8_t data[] = {
+ U32_LE(kWasmMagic), // --
+ U32_LE(kWasmVersion), // --
+ 0x1, // Section ID
+ 0x80, // Section Length (0 in LEB)
+ 0x80, // --
+ 0x80, // --
+ 0x80, // --
+ 0x80, // --
+ };
+ ExpectFailure(Vector<const uint8_t>(data, arraysize(data)));
+}
+
+TEST_F(WasmStreamingDecoderTest, TwoLongSections) {
+ const uint8_t data[] = {
+ U32_LE(kWasmMagic), // --
+ U32_LE(kWasmVersion), // --
+ 0x1, // Section ID
+ 0x6, // Section Length
+ 0x0, // Payload
+ 0x0, // 2
+ 0x0, // 3
+ 0x0, // 4
+ 0x0, // 5
+ 0x0, // 6
+ 0x2, // Section ID
+ 0x7, // Section Length
+ 0x0, // Payload
+ 0x0, // 2
+ 0x0, // 3
+ 0x0, // 4
+ 0x0, // 5
+ 0x0, // 6
+ 0x0 // 7
+ };
+ ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)));
+}
+
+TEST_F(WasmStreamingDecoderTest, TwoShortSections) {
+ const uint8_t data[] = {
+ U32_LE(kWasmMagic), // --
+ U32_LE(kWasmVersion), // --
+ 0x1, // Section ID
+ 0x1, // Section Length
+ 0x0, // Payload
+ 0x2, // Section ID
+ 0x2, // Section Length
+ 0x0, // Payload
+ 0x0, // 2
+ };
+ ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)));
+}
+
+TEST_F(WasmStreamingDecoderTest, TwoSectionsShortLong) {
+ const uint8_t data[] = {
+ U32_LE(kWasmMagic), // --
+ U32_LE(kWasmVersion), // --
+ 0x1, // Section ID
+ 0x1, // Section Length
+ 0x0, // Payload
+ 0x2, // Section ID
+ 0x7, // Section Length
+ 0x0, // Payload
+ 0x0, // 2
+ 0x0, // 3
+ 0x0, // 4
+ 0x0, // 5
+ 0x0, // 6
+ 0x0 // 7
+ };
+ ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)));
+}
+
+TEST_F(WasmStreamingDecoderTest, TwoEmptySections) {
+ const uint8_t data[] = {
+ U32_LE(kWasmMagic), // --
+ U32_LE(kWasmVersion), // --
+ 0x1, // Section ID
+ 0x0, // Section Length
+ 0x2, // Section ID
+ 0x0 // Section Length
+ };
+ ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)));
+}
+
+TEST_F(WasmStreamingDecoderTest, EmptyCodeSection) {
+ const uint8_t data[] = {
+ U32_LE(kWasmMagic), // --
+ U32_LE(kWasmVersion), // --
+ kCodeSectionCode, // Section ID
+ 0x0, // Section Length
+ 0xb, // Section ID
+ 0x0 // Section Length
+ };
+ ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)));
+}
+
+TEST_F(WasmStreamingDecoderTest, OneFunction) {
+ const uint8_t data[] = {
+ U32_LE(kWasmMagic), // --
+ U32_LE(kWasmVersion), // --
+ kCodeSectionCode, // Section ID
+ 0x8, // Section Length
+ 0x1, // Number of Functions
+ 0x6, // Function Length
+ 0x0, // Function
+ 0x0, // 2
+ 0x0, // 3
+ 0x0, // 4
+ 0x0, // 5
+ 0x0, // 6
+ };
+ ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)));
+}
+
+TEST_F(WasmStreamingDecoderTest, OneShortFunction) {
+ const uint8_t data[] = {
+ U32_LE(kWasmMagic), // --
+ U32_LE(kWasmVersion), // --
+ kCodeSectionCode, // Section ID
+ 0x3, // Section Length
+ 0x1, // Number of Functions
+ 0x1, // Function Length
+ 0x0, // Function
+ };
+ ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)));
+}
+
+TEST_F(WasmStreamingDecoderTest, EmptyFunction) {
+ const uint8_t data[] = {
+ U32_LE(kWasmMagic), // --
+ U32_LE(kWasmVersion), // --
+ kCodeSectionCode, // Section ID
+ 0x2, // Section Length
+ 0x1, // Number of Functions
+ 0x0, // Function Length
+ };
+ ExpectFailure(Vector<const uint8_t>(data, arraysize(data)));
+}
+
+TEST_F(WasmStreamingDecoderTest, TwoFunctions) {
+ const uint8_t data[] = {
+ U32_LE(kWasmMagic), // --
+ U32_LE(kWasmVersion), // --
+ kCodeSectionCode, // Section ID
+ 0x10, // Section Length
+ 0x2, // Number of Functions
+ 0x6, // Function Length
+ 0x0, // Function
+ 0x0, // 2
+ 0x0, // 3
+ 0x0, // 4
+ 0x0, // 5
+ 0x0, // 6
+ 0x7, // Function Length
+ 0x0, // Function
+ 0x0, // 2
+ 0x0, // 3
+ 0x0, // 4
+ 0x0, // 5
+ 0x0, // 6
+ 0x0, // 7
+ };
+ ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)));
+}
+
+TEST_F(WasmStreamingDecoderTest, TwoFunctions_b) {
+ const uint8_t data[] = {
+ U32_LE(kWasmMagic), // --
+ U32_LE(kWasmVersion), // --
+ kCodeSectionCode, // Section ID
+ 0xb, // Section Length
+ 0x2, // Number of Functions
+ 0x1, // Function Length
+ 0x0, // Function
+ 0x7, // Function Length
+ 0x0, // Function
+ 0x0, // 2
+ 0x0, // 3
+ 0x0, // 4
+ 0x0, // 5
+ 0x0, // 6
+ 0x0, // 7
+ };
+ ExpectVerifies(Vector<const uint8_t>(data, arraysize(data)));
+}
+
+TEST_F(WasmStreamingDecoderTest, CodeSectionLengthTooHigh) {
+ const uint8_t data[] = {
+ U32_LE(kWasmMagic), // --
+ U32_LE(kWasmVersion), // --
+ kCodeSectionCode, // Section ID
+ 0xd, // Section Length
+ 0x2, // Number of Functions
+ 0x7, // Function Length
+ 0x0, // Function
+ 0x0, // 2
+ 0x0, // 3
+ 0x0, // 4
+ 0x0, // 5
+ 0x0, // 6
+ 0x0, // 7
+ 0x1, // Function Length
+ 0x0, // Function
+ };
+ ExpectFailure(Vector<const uint8_t>(data, arraysize(data)));
+}
+
+TEST_F(WasmStreamingDecoderTest, CodeSectionLengthTooLow) {
+ const uint8_t data[] = {
+ U32_LE(kWasmMagic), // --
+ U32_LE(kWasmVersion), // --
+ kCodeSectionCode, // Section ID
+ 0x9, // Section Length
+ 0x2, // Number of Functions
+ 0x7, // Function Length
+ 0x0, // Function
+ 0x0, // 2
+ 0x0, // 3
+ 0x0, // 4
+ 0x0, // 5
+ 0x0, // 6
+ 0x0, // 7
+ 0x1, // Function Length
+ 0x0, // Function
+ };
+ ExpectFailure(Vector<const uint8_t>(data, arraysize(data)));
+}
+
+TEST_F(WasmStreamingDecoderTest, CodeSectionLengthTooLowEndsInNumFunctions) {
+ const uint8_t data[] = {
+ U32_LE(kWasmMagic), // --
+ U32_LE(kWasmVersion), // --
+ kCodeSectionCode, // Section ID
+ 0x1, // Section Length
+ 0x82, // Number of Functions
+ 0x80, // --
+ 0x00, // --
+ 0x7, // Function Length
+ 0x0, // Function
+ 0x0, // 2
+ 0x0, // 3
+ 0x0, // 4
+ 0x0, // 5
+ 0x0, // 6
+ 0x0, // 7
+ 0x1, // Function Length
+ 0x0, // Function
+ };
+ ExpectFailure(Vector<const uint8_t>(data, arraysize(data)));
+}
+
+TEST_F(WasmStreamingDecoderTest, CodeSectionLengthTooLowEndsInFunctionLength) {
+ const uint8_t data[] = {
+ U32_LE(kWasmMagic), // --
+ U32_LE(kWasmVersion), // --
+ kCodeSectionCode, // Section ID
+ 0x5, // Section Length
+ 0x82, // Number of Functions
+ 0x80, // --
+ 0x00, // --
+ 0x87, // Function Length
+ 0x80, // --
+ 0x00, // --
+ 0x0, // Function
+ 0x0, // 2
+ 0x0, // 3
+ 0x0, // 4
+ 0x0, // 5
+ 0x0, // 6
+ 0x0, // 7
+ 0x1, // Function Length
+ 0x0, // Function
+ };
+ ExpectFailure(Vector<const uint8_t>(data, arraysize(data)));
+}
+
+TEST_F(WasmStreamingDecoderTest, NumberOfFunctionsTooHigh) {
+ const uint8_t data[] = {
+ U32_LE(kWasmMagic), // --
+ U32_LE(kWasmVersion), // --
+ kCodeSectionCode, // Section ID
+ 0xb, // Section Length
+ 0x4, // Number of Functions
+ 0x7, // Function Length
+ 0x0, // Function
+ 0x0, // 2
+ 0x0, // 3
+ 0x0, // 4
+ 0x0, // 5
+ 0x0, // 6
+ 0x0, // 7
+ 0x1, // Function Length
+ 0x0, // Function
+ };
+ ExpectFailure(Vector<const uint8_t>(data, arraysize(data)));
+}
+
+TEST_F(WasmStreamingDecoderTest, NumberOfFunctionsTooLow) {
+ const uint8_t data[] = {
+ U32_LE(kWasmMagic), // --
+ U32_LE(kWasmVersion), // --
+ kCodeSectionCode, // Section ID
+ 0xe, // Section Length
+ 0x2, // Number of Functions
+ 0x1, // Function Length
+ 0x0, // Function
+ 0x2, // Function Length
+ 0x0, // Function
+ 0x0, // 2
+ 0x7, // Function Length
+ 0x0, // Function
+ 0x0, // 2
+ 0x0, // 3
+ 0x0, // 4
+ 0x0, // 5
+ 0x0, // 6
+ 0x0, // 7
+ };
+ ExpectFailure(Vector<const uint8_t>(data, arraysize(data)));
+}
+} // namespace wasm
+} // namespace internal
+} // namespace v8
diff --git a/deps/v8/test/unittests/wasm/wasm-macro-gen-unittest.cc b/deps/v8/test/unittests/wasm/wasm-macro-gen-unittest.cc
index 4f21b7e9e9..63309db078 100644
--- a/deps/v8/test/unittests/wasm/wasm-macro-gen-unittest.cc
+++ b/deps/v8/test/unittests/wasm/wasm-macro-gen-unittest.cc
@@ -4,7 +4,7 @@
#include "test/unittests/test-utils.h"
-#include "src/wasm/wasm-macro-gen.h"
+#include "test/common/wasm/wasm-macro-gen.h"
namespace v8 {
namespace internal {
diff --git a/deps/v8/test/wasm-spec-tests/OWNERS b/deps/v8/test/wasm-spec-tests/OWNERS
new file mode 100644
index 0000000000..f1e9a3c2a6
--- /dev/null
+++ b/deps/v8/test/wasm-spec-tests/OWNERS
@@ -0,0 +1,4 @@
+ahaas@chromium.org
+clemensh@chromium.org
+machenbach@chromium.org
+rossberg@chromium.org
diff --git a/deps/v8/test/wasm-spec-tests/testcfg.py b/deps/v8/test/wasm-spec-tests/testcfg.py
new file mode 100644
index 0000000000..d3b06d076b
--- /dev/null
+++ b/deps/v8/test/wasm-spec-tests/testcfg.py
@@ -0,0 +1,35 @@
+# Copyright 2017 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import os
+
+from testrunner.local import testsuite
+from testrunner.objects import testcase
+
+class WasmSpecTestsTestSuite(testsuite.TestSuite):
+ def __init__(self, name, root):
+ super(WasmSpecTestsTestSuite, self).__init__(name, root)
+
+ def ListTests(self, context):
+ tests = []
+ for dirname, dirs, files in os.walk(self.root):
+ for dotted in [x for x in dirs if x.startswith('.')]:
+ dirs.remove(dotted)
+ for filename in files:
+ if (filename.endswith(".js")):
+ fullpath = os.path.join(dirname, filename)
+ relpath = fullpath[len(self.root) + 1 : -3]
+ testname = relpath.replace(os.path.sep, "/")
+ test = testcase.TestCase(self, testname)
+ tests.append(test)
+ return tests
+
+ def GetFlagsForTestCase(self, testcase, context):
+ flags = [] + context.mode_flags
+ flags.append(os.path.join(self.root, testcase.path + self.suffix()))
+ return testcase.flags + flags
+
+
+def GetSuite(name, root):
+ return WasmSpecTestsTestSuite(name, root)
diff --git a/deps/v8/test/wasm-spec-tests/tests.tar.gz.sha1 b/deps/v8/test/wasm-spec-tests/tests.tar.gz.sha1
new file mode 100644
index 0000000000..c7c7302719
--- /dev/null
+++ b/deps/v8/test/wasm-spec-tests/tests.tar.gz.sha1
@@ -0,0 +1 @@
+5f9abe489629911cd1ea4c47f45ae2b3f9050a44 \ No newline at end of file
diff --git a/deps/v8/test/wasm-spec-tests/wasm-spec-tests.gyp b/deps/v8/test/wasm-spec-tests/wasm-spec-tests.gyp
new file mode 100644
index 0000000000..711f982c9a
--- /dev/null
+++ b/deps/v8/test/wasm-spec-tests/wasm-spec-tests.gyp
@@ -0,0 +1,26 @@
+# Copyright 2017 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'conditions': [
+ ['test_isolation_mode != "noop"', {
+ 'targets': [
+ {
+ 'target_name': 'wasm_spec_tests_run',
+ 'type': 'none',
+ 'dependencies': [
+ '../../src/d8.gyp:d8_run',
+ ],
+ 'includes': [
+ '../../gypfiles/features.gypi',
+ '../../gypfiles/isolate.gypi',
+ ],
+ 'sources': [
+ 'wasm-spec-tests.isolate',
+ ],
+ },
+ ],
+ }],
+ ],
+}
diff --git a/deps/v8/test/wasm-spec-tests/wasm-spec-tests.isolate b/deps/v8/test/wasm-spec-tests/wasm-spec-tests.isolate
new file mode 100644
index 0000000000..4c29f9fed7
--- /dev/null
+++ b/deps/v8/test/wasm-spec-tests/wasm-spec-tests.isolate
@@ -0,0 +1,15 @@
+# Copyright 2017 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+{
+ 'variables': {
+ 'files': [
+ './',
+ ],
+ },
+ 'includes': [
+ '../../src/d8.isolate',
+ '../../tools/testrunner/testrunner.isolate',
+ ],
+}
+
diff --git a/deps/v8/test/wasm-spec-tests/wasm-spec-tests.status b/deps/v8/test/wasm-spec-tests/wasm-spec-tests.status
new file mode 100644
index 0000000000..eccfbd58e3
--- /dev/null
+++ b/deps/v8/test/wasm-spec-tests/wasm-spec-tests.status
@@ -0,0 +1,37 @@
+# Copyright 2016 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+[
+[ALWAYS, {
+ # These tests fail because mips does not support the correct NaN bit patterns.
+ 'tests/float_misc': [PASS, ['arch == mipsel or arch == mips64el', SKIP]],
+ 'tests/float_exprs': [PASS, ['arch == mipsel or arch == mips64el', SKIP]],
+ 'tests/f32': [PASS, ['arch == mipsel or arch == mips64el', SKIP]],
+ 'tests/f64': [PASS, ['arch == mipsel or arch == mips64el', SKIP]],
+
+ #TODO(ahaas): Add additional stack checks on mips.
+ # Issue 6318: Stack checks for functions with huge stack frames fail on x64 and ia32
+ 'tests/skip-stack-guard-page': [PASS, ['arch == mipsel or arch == mips64el or arch == x64 or arch == ia32 or ((arch == ppc or arch == ppc64 or arch == s390 or arch == s390x) and simulator_run)', SKIP]],
+}], # ALWAYS
+
+['arch == arm and not simulator_run', {
+ # Too slow on chromebooks.
+ 'tests/br_table': [SKIP],
+}], # 'arch == arm and not simulator_run'
+
+['arch == ppc or arch == ppc64', {
+ # These tests fail because ppc float min and max doesn't convert sNaN to qNaN.
+ 'tests/f32': [SKIP],
+ 'tests/f64': [SKIP],
+ # This test fails because ppc float to double doesn't convert sNaN to qNaN.
+ 'tests/conversions': [SKIP],
+}], # 'arch == ppc or arch == ppc64'
+
+['arch == s390 or arch == s390x', {
+ # These tests fail because s390 float min and max doesn't convert sNaN to qNaN.
+ 'tests/f32': [SKIP],
+ 'tests/f64': [SKIP],
+}], # 'arch == s390 or arch == s390x'
+
+]
diff --git a/deps/v8/test/webkit/webkit.status b/deps/v8/test/webkit/webkit.status
index c2b3f73a69..60ddea7fd7 100644
--- a/deps/v8/test/webkit/webkit.status
+++ b/deps/v8/test/webkit/webkit.status
@@ -53,9 +53,9 @@
# Skip tests that are too slow for simulators.
'dfg-int-overflow-in-loop': [SKIP],
}], # 'simulator'
-['arch == arm64 and simulator_run == True', {
+['arch == arm64 and simulator_run', {
'dfg-int-overflow-in-loop': [SKIP],
-}], # 'arch == arm64 and simulator_run == True'
+}], # 'arch == arm64 and simulator_run'
['dcheck_always_on == True and (arch == arm or arch == arm64)', {
# Doesn't work with gcc 4.6 on arm or arm64 for some reason.
'reentrant-caching': [SKIP],
@@ -64,7 +64,7 @@
# Too slow for mips big-endian boards on bots (no FPU).
'dfg-int-overflow-in-loop': [SKIP],
}], # 'arch == mips'
-['(arch == ppc or arch == ppc64) and simulator_run == True', {
+['(arch == ppc or arch == ppc64) and simulator_run', {
# Too slow.
'dfg-int-overflow-in-loop': [SKIP],
}], # 'arch == ppc or arch == ppc64'