Commit b7e935c5 authored by Joshua Litt's avatar Joshua Litt Committed by Commit Bot

[parser] Fix async generator bytecode to only await on explicit return

Per ECMA-262 25.5.3.2, step 5.e: |generatorBody| execution ends with a normal completion.

Bug: v8:9050
Change-Id: If2ecc7d104e0b905a4b2b4695522be740e0d0349
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1611011Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Joshua Litt <joshualitt@google.com>
Cr-Commit-Position: refs/heads/master@{#61589}
parent 15a7e04e
...@@ -1717,7 +1717,7 @@ void Parser::ParseAndRewriteAsyncGeneratorFunctionBody( ...@@ -1717,7 +1717,7 @@ void Parser::ParseAndRewriteAsyncGeneratorFunctionBody(
// try { // try {
// InitialYield; // InitialYield;
// ...body...; // ...body...;
// return undefined; // See comment below // // fall through to the implicit return after the try-finally
// } catch (.catch) { // } catch (.catch) {
// %AsyncGeneratorReject(generator, .catch); // %AsyncGeneratorReject(generator, .catch);
// } finally { // } finally {
...@@ -1744,12 +1744,6 @@ void Parser::ParseAndRewriteAsyncGeneratorFunctionBody( ...@@ -1744,12 +1744,6 @@ void Parser::ParseAndRewriteAsyncGeneratorFunctionBody(
// Don't create iterator result for async generators, as the resume methods // Don't create iterator result for async generators, as the resume methods
// will create it. // will create it.
// TODO(leszeks): This will create another suspend point, which is
// unnecessary if there is already an unconditional return in the body.
Statement* final_return = BuildReturnStatement(
factory()->NewUndefinedLiteral(kNoSourcePosition), kNoSourcePosition);
statements.Add(final_return);
try_block = factory()->NewBlock(false, statements); try_block = factory()->NewBlock(false, statements);
} }
......
...@@ -14,9 +14,9 @@ snippet: " ...@@ -14,9 +14,9 @@ snippet: "
" "
frame size: 8 frame size: 8
parameter count: 1 parameter count: 1
bytecode array length: 180 bytecode array length: 148
bytecodes: [ bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(2), B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(Mov), R(closure), R(1), B(Mov), R(closure), R(1),
B(Mov), R(this), R(2), B(Mov), R(this), R(2),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(1), U8(2), B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(1), U8(2),
...@@ -29,33 +29,17 @@ bytecodes: [ ...@@ -29,33 +29,17 @@ bytecodes: [
B(ResumeGenerator), R(0), R(0), U8(5), B(ResumeGenerator), R(0), R(0), U8(5),
B(Star), R(5), B(Star), R(5),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0),
B(Ldar), R(5), B(Ldar), R(5),
/* 17 E> */ B(Throw), /* 17 E> */ B(Throw),
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(Star), R(1), B(Star), R(1),
B(Mov), R(5), R(2), B(Mov), R(5), R(2),
B(Jump), U8(85), B(Jump), U8(53),
B(LdaUndefined),
B(Star), R(6),
B(Mov), R(0), R(5),
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorAwaitUncaught), R(5), U8(2),
B(SuspendGenerator), R(0), R(0), U8(5), U8(1),
B(ResumeGenerator), R(0), R(0), U8(5),
B(Star), R(5),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(Star), R(6),
B(LdaZero),
B(TestReferenceEqual), R(6),
B(JumpIfTrue), U8(5),
B(Ldar), R(5), B(Ldar), R(5),
B(ReThrow), B(Jump), U8(36),
B(LdaSmi), I8(1),
B(Star), R(1),
B(Mov), R(5), R(2),
B(Jump), U8(41),
B(Star), R(5), B(Star), R(5),
B(CreateCatchContext), R(5), U8(4), B(CreateCatchContext), R(5), U8(3),
B(Star), R(4), B(Star), R(4),
B(LdaTheHole), B(LdaTheHole),
B(SetPendingMessage), B(SetPendingMessage),
...@@ -69,6 +53,10 @@ bytecodes: [ ...@@ -69,6 +53,10 @@ bytecodes: [
B(Star), R(2), B(Star), R(2),
B(LdaSmi), I8(2), B(LdaSmi), I8(2),
B(Star), R(1), B(Star), R(1),
B(Jump), U8(15),
B(LdaSmi), I8(-1),
B(Star), R(2),
B(Star), R(1),
B(Jump), U8(7), B(Jump), U8(7),
B(Star), R(2), B(Star), R(2),
B(LdaZero), B(LdaZero),
...@@ -80,7 +68,7 @@ bytecodes: [ ...@@ -80,7 +68,7 @@ bytecodes: [
B(Ldar), R(3), B(Ldar), R(3),
B(SetPendingMessage), B(SetPendingMessage),
B(Ldar), R(1), B(Ldar), R(1),
B(SwitchOnSmiNoFeedback), U8(5), U8(3), I8(0), B(SwitchOnSmiNoFeedback), U8(4), U8(3), I8(0),
B(Jump), U8(22), B(Jump), U8(22),
B(Ldar), R(2), B(Ldar), R(2),
B(ReThrow), B(ReThrow),
...@@ -97,7 +85,6 @@ bytecodes: [ ...@@ -97,7 +85,6 @@ bytecodes: [
] ]
constant pool: [ constant pool: [
Smi [30], Smi [30],
Smi [71],
Smi [16], Smi [16],
Smi [7], Smi [7],
SCOPE_INFO_TYPE, SCOPE_INFO_TYPE,
...@@ -106,8 +93,8 @@ constant pool: [ ...@@ -106,8 +93,8 @@ constant pool: [
Smi [23], Smi [23],
] ]
handlers: [ handlers: [
[20, 134, 134], [20, 94, 102],
[23, 100, 100], [23, 56, 60],
] ]
--- ---
...@@ -117,9 +104,9 @@ snippet: " ...@@ -117,9 +104,9 @@ snippet: "
" "
frame size: 8 frame size: 8
parameter count: 1 parameter count: 1
bytecode array length: 225 bytecode array length: 193
bytecodes: [ bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(3), B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(1), B(Mov), R(closure), R(1),
B(Mov), R(this), R(2), B(Mov), R(this), R(2),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(1), U8(2), B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(1), U8(2),
...@@ -132,13 +119,13 @@ bytecodes: [ ...@@ -132,13 +119,13 @@ bytecodes: [
B(ResumeGenerator), R(0), R(0), U8(5), B(ResumeGenerator), R(0), R(0), U8(5),
B(Star), R(5), B(Star), R(5),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(3), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
B(Ldar), R(5), B(Ldar), R(5),
/* 17 E> */ B(Throw), /* 17 E> */ B(Throw),
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(Star), R(1), B(Star), R(1),
B(Mov), R(5), R(2), B(Mov), R(5), R(2),
B(Jump), U8(130), B(Jump), U8(98),
/* 22 S> */ B(LdaSmi), I8(42), /* 22 S> */ B(LdaSmi), I8(42),
B(Star), R(6), B(Star), R(6),
B(LdaFalse), B(LdaFalse),
...@@ -149,33 +136,17 @@ bytecodes: [ ...@@ -149,33 +136,17 @@ bytecodes: [
B(ResumeGenerator), R(0), R(0), U8(5), B(ResumeGenerator), R(0), R(0), U8(5),
B(Star), R(5), B(Star), R(5),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(5), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(4), U8(2), I8(0),
B(Ldar), R(5), B(Ldar), R(5),
/* 22 E> */ B(Throw), /* 22 E> */ B(Throw),
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(Star), R(1), B(Star), R(1),
B(Mov), R(5), R(2), B(Mov), R(5), R(2),
B(Jump), U8(85), B(Jump), U8(53),
B(LdaUndefined),
B(Star), R(6),
B(Mov), R(0), R(5),
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorAwaitUncaught), R(5), U8(2),
B(SuspendGenerator), R(0), R(0), U8(5), U8(2),
B(ResumeGenerator), R(0), R(0), U8(5),
B(Star), R(5),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(Star), R(6),
B(LdaZero),
B(TestReferenceEqual), R(6),
B(JumpIfTrue), U8(5),
B(Ldar), R(5), B(Ldar), R(5),
B(ReThrow), B(Jump), U8(36),
B(LdaSmi), I8(1),
B(Star), R(1),
B(Mov), R(5), R(2),
B(Jump), U8(41),
B(Star), R(5), B(Star), R(5),
B(CreateCatchContext), R(5), U8(7), B(CreateCatchContext), R(5), U8(6),
B(Star), R(4), B(Star), R(4),
B(LdaTheHole), B(LdaTheHole),
B(SetPendingMessage), B(SetPendingMessage),
...@@ -189,6 +160,10 @@ bytecodes: [ ...@@ -189,6 +160,10 @@ bytecodes: [
B(Star), R(2), B(Star), R(2),
B(LdaSmi), I8(2), B(LdaSmi), I8(2),
B(Star), R(1), B(Star), R(1),
B(Jump), U8(15),
B(LdaSmi), I8(-1),
B(Star), R(2),
B(Star), R(1),
B(Jump), U8(7), B(Jump), U8(7),
B(Star), R(2), B(Star), R(2),
B(LdaZero), B(LdaZero),
...@@ -200,7 +175,7 @@ bytecodes: [ ...@@ -200,7 +175,7 @@ bytecodes: [
B(Ldar), R(3), B(Ldar), R(3),
B(SetPendingMessage), B(SetPendingMessage),
B(Ldar), R(1), B(Ldar), R(1),
B(SwitchOnSmiNoFeedback), U8(8), U8(3), I8(0), B(SwitchOnSmiNoFeedback), U8(7), U8(3), I8(0),
B(Jump), U8(22), B(Jump), U8(22),
B(Ldar), R(2), B(Ldar), R(2),
B(ReThrow), B(ReThrow),
...@@ -218,7 +193,6 @@ bytecodes: [ ...@@ -218,7 +193,6 @@ bytecodes: [
constant pool: [ constant pool: [
Smi [30], Smi [30],
Smi [75], Smi [75],
Smi [116],
Smi [16], Smi [16],
Smi [7], Smi [7],
Smi [16], Smi [16],
...@@ -229,8 +203,8 @@ constant pool: [ ...@@ -229,8 +203,8 @@ constant pool: [
Smi [23], Smi [23],
] ]
handlers: [ handlers: [
[20, 179, 179], [20, 139, 147],
[23, 145, 145], [23, 101, 105],
] ]
--- ---
...@@ -240,9 +214,9 @@ snippet: " ...@@ -240,9 +214,9 @@ snippet: "
" "
frame size: 20 frame size: 20
parameter count: 1 parameter count: 1
bytecode array length: 406 bytecode array length: 372
bytecodes: [ bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(3), B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(Mov), R(closure), R(4), B(Mov), R(closure), R(4),
B(Mov), R(this), R(5), B(Mov), R(this), R(5),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(4), U8(2), B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(4), U8(2),
...@@ -255,22 +229,22 @@ bytecodes: [ ...@@ -255,22 +229,22 @@ bytecodes: [
B(ResumeGenerator), R(0), R(0), U8(8), B(ResumeGenerator), R(0), R(0), U8(8),
B(Star), R(8), B(Star), R(8),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(3), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
B(Ldar), R(8), B(Ldar), R(8),
/* 17 E> */ B(Throw), /* 17 E> */ B(Throw),
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(Star), R(4), B(Star), R(4),
B(Mov), R(8), R(5), B(Mov), R(8), R(5),
B(JumpConstant), U8(17), B(JumpConstant), U8(16),
/* 36 S> */ B(CreateArrayLiteral), U8(5), U8(0), U8(37), /* 36 S> */ B(CreateArrayLiteral), U8(4), U8(0), U8(37),
B(Star), R(10), B(Star), R(10),
B(LdaNamedProperty), R(10), U8(6), U8(1), B(LdaNamedProperty), R(10), U8(5), U8(1),
B(Star), R(11), B(Star), R(11),
B(CallProperty0), R(11), R(10), U8(3), B(CallProperty0), R(11), R(10), U8(3),
B(JumpIfJSReceiver), U8(7), B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0), B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
B(Star), R(9), B(Star), R(9),
B(LdaNamedProperty), R(9), U8(7), U8(5), B(LdaNamedProperty), R(9), U8(6), U8(5),
B(Star), R(8), B(Star), R(8),
B(LdaFalse), B(LdaFalse),
B(Star), R(12), B(Star), R(12),
...@@ -281,9 +255,9 @@ bytecodes: [ ...@@ -281,9 +255,9 @@ bytecodes: [
B(Star), R(16), B(Star), R(16),
B(JumpIfJSReceiver), U8(7), B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(16), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(16), U8(1),
B(LdaNamedProperty), R(16), U8(8), U8(9), B(LdaNamedProperty), R(16), U8(7), U8(9),
B(JumpIfToBooleanTrue), U8(67), B(JumpIfToBooleanTrue), U8(67),
B(LdaNamedProperty), R(16), U8(9), U8(11), B(LdaNamedProperty), R(16), U8(8), U8(11),
B(Star), R(16), B(Star), R(16),
B(LdaFalse), B(LdaFalse),
B(Star), R(12), B(Star), R(12),
...@@ -299,7 +273,7 @@ bytecodes: [ ...@@ -299,7 +273,7 @@ bytecodes: [
B(ResumeGenerator), R(0), R(0), U8(17), B(ResumeGenerator), R(0), R(0), U8(17),
B(Star), R(17), B(Star), R(17),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(10), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(9), U8(2), I8(0),
B(Ldar), R(17), B(Ldar), R(17),
/* 42 E> */ B(Throw), /* 42 E> */ B(Throw),
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
...@@ -320,7 +294,7 @@ bytecodes: [ ...@@ -320,7 +294,7 @@ bytecodes: [
B(Star), R(15), B(Star), R(15),
B(Ldar), R(12), B(Ldar), R(12),
B(JumpIfToBooleanTrue), U8(60), B(JumpIfToBooleanTrue), U8(60),
B(LdaNamedProperty), R(9), U8(12), U8(13), B(LdaNamedProperty), R(9), U8(11), U8(13),
B(Star), R(17), B(Star), R(17),
B(JumpIfUndefined), U8(52), B(JumpIfUndefined), U8(52),
B(JumpIfNull), U8(50), B(JumpIfNull), U8(50),
...@@ -328,7 +302,7 @@ bytecodes: [ ...@@ -328,7 +302,7 @@ bytecodes: [
B(JumpIfTrue), U8(18), B(JumpIfTrue), U8(18),
B(Wide), B(LdaSmi), I16(155), B(Wide), B(LdaSmi), I16(155),
B(Star), R(18), B(Star), R(18),
B(LdaConstant), U8(13), B(LdaConstant), U8(12),
B(Star), R(19), B(Star), R(19),
B(CallRuntime), U16(Runtime::kNewTypeError), R(18), U8(2), B(CallRuntime), U16(Runtime::kNewTypeError), R(18), U8(2),
B(Throw), B(Throw),
...@@ -347,34 +321,17 @@ bytecodes: [ ...@@ -347,34 +321,17 @@ bytecodes: [
B(Ldar), R(15), B(Ldar), R(15),
B(SetPendingMessage), B(SetPendingMessage),
B(Ldar), R(13), B(Ldar), R(13),
B(SwitchOnSmiNoFeedback), U8(14), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(13), U8(2), I8(0),
B(Jump), U8(14), B(Jump), U8(14),
B(Ldar), R(14), B(Ldar), R(14),
B(ReThrow), B(ReThrow),
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(Star), R(4), B(Star), R(4),
B(Mov), R(14), R(5), B(Mov), R(14), R(5),
B(Jump), U8(85), B(Jump), U8(51),
B(LdaUndefined), B(Jump), U8(36),
B(Star), R(9),
B(Mov), R(0), R(8),
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorAwaitUncaught), R(8), U8(2),
B(SuspendGenerator), R(0), R(0), U8(8), U8(2),
B(ResumeGenerator), R(0), R(0), U8(8),
B(Star), R(8),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(Star), R(9),
B(LdaZero),
B(TestReferenceEqual), R(9),
B(JumpIfTrue), U8(5),
B(Ldar), R(8),
B(ReThrow),
B(LdaSmi), I8(1),
B(Star), R(4),
B(Mov), R(8), R(5),
B(Jump), U8(41),
B(Star), R(8), B(Star), R(8),
B(CreateCatchContext), R(8), U8(16), B(CreateCatchContext), R(8), U8(15),
B(Star), R(7), B(Star), R(7),
B(LdaTheHole), B(LdaTheHole),
B(SetPendingMessage), B(SetPendingMessage),
...@@ -388,6 +345,10 @@ bytecodes: [ ...@@ -388,6 +345,10 @@ bytecodes: [
B(Star), R(5), B(Star), R(5),
B(LdaSmi), I8(2), B(LdaSmi), I8(2),
B(Star), R(4), B(Star), R(4),
B(Jump), U8(15),
B(LdaSmi), I8(-1),
B(Star), R(5),
B(Star), R(4),
B(Jump), U8(7), B(Jump), U8(7),
B(Star), R(5), B(Star), R(5),
B(LdaZero), B(LdaZero),
...@@ -399,7 +360,7 @@ bytecodes: [ ...@@ -399,7 +360,7 @@ bytecodes: [
B(Ldar), R(6), B(Ldar), R(6),
B(SetPendingMessage), B(SetPendingMessage),
B(Ldar), R(4), B(Ldar), R(4),
B(SwitchOnSmiNoFeedback), U8(18), U8(3), I8(0), B(SwitchOnSmiNoFeedback), U8(17), U8(3), I8(0),
B(Jump), U8(22), B(Jump), U8(22),
B(Ldar), R(5), B(Ldar), R(5),
B(ReThrow), B(ReThrow),
...@@ -417,7 +378,6 @@ bytecodes: [ ...@@ -417,7 +378,6 @@ bytecodes: [
constant pool: [ constant pool: [
Smi [30], Smi [30],
Smi [149], Smi [149],
Smi [297],
Smi [16], Smi [16],
Smi [7], Smi [7],
ARRAY_BOILERPLATE_DESCRIPTION_TYPE, ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
...@@ -432,14 +392,14 @@ constant pool: [ ...@@ -432,14 +392,14 @@ constant pool: [
Smi [6], Smi [6],
Smi [9], Smi [9],
SCOPE_INFO_TYPE, SCOPE_INFO_TYPE,
Smi [311], Smi [277],
Smi [6], Smi [6],
Smi [9], Smi [9],
Smi [23], Smi [23],
] ]
handlers: [ handlers: [
[20, 360, 360], [20, 318, 326],
[23, 326, 326], [23, 282, 284],
[93, 180, 188], [93, 180, 188],
[234, 247, 249], [234, 247, 249],
] ]
...@@ -452,9 +412,9 @@ snippet: " ...@@ -452,9 +412,9 @@ snippet: "
" "
frame size: 19 frame size: 19
parameter count: 1 parameter count: 1
bytecode array length: 507 bytecode array length: 475
bytecodes: [ bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(6), B(SwitchOnGeneratorState), R(0), U8(0), U8(5),
B(Mov), R(closure), R(1), B(Mov), R(closure), R(1),
B(Mov), R(this), R(2), B(Mov), R(this), R(2),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(1), U8(2), B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(1), U8(2),
...@@ -467,41 +427,41 @@ bytecodes: [ ...@@ -467,41 +427,41 @@ bytecodes: [
B(ResumeGenerator), R(0), R(0), U8(5), B(ResumeGenerator), R(0), R(0), U8(5),
B(Star), R(5), B(Star), R(5),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(SwitchOnSmiNoFeedback), U8(6), U8(2), I8(0), B(SwitchOnSmiNoFeedback), U8(5), U8(2), I8(0),
B(Ldar), R(5), B(Ldar), R(5),
/* 44 E> */ B(Throw), /* 44 E> */ B(Throw),
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(Star), R(1), B(Star), R(1),
B(Mov), R(5), R(2), B(Mov), R(5), R(2),
B(JumpConstant), U8(19), B(JumpConstant), U8(18),
/* 49 S> */ B(LdaGlobal), U8(8), U8(0), /* 49 S> */ B(LdaGlobal), U8(7), U8(0),
B(Star), R(9), B(Star), R(9),
/* 56 E> */ B(CallUndefinedReceiver0), R(9), U8(2), /* 56 E> */ B(CallUndefinedReceiver0), R(9), U8(2),
B(Star), R(10), B(Star), R(10),
B(LdaNamedProperty), R(10), U8(9), U8(4), B(LdaNamedProperty), R(10), U8(8), U8(4),
B(JumpIfUndefined), U8(17), B(JumpIfUndefined), U8(17),
B(JumpIfNull), U8(15), B(JumpIfNull), U8(15),
B(Star), R(11), B(Star), R(11),
B(CallProperty0), R(11), R(10), U8(6), B(CallProperty0), R(11), R(10), U8(6),
B(JumpIfJSReceiver), U8(23), B(JumpIfJSReceiver), U8(23),
B(CallRuntime), U16(Runtime::kThrowSymbolAsyncIteratorInvalid), R(0), U8(0), B(CallRuntime), U16(Runtime::kThrowSymbolAsyncIteratorInvalid), R(0), U8(0),
B(LdaNamedProperty), R(10), U8(10), U8(8), B(LdaNamedProperty), R(10), U8(9), U8(8),
B(Star), R(11), B(Star), R(11),
B(CallProperty0), R(11), R(10), U8(10), B(CallProperty0), R(11), R(10), U8(10),
B(Star), R(11), B(Star), R(11),
B(InvokeIntrinsic), U8(Runtime::k_CreateAsyncFromSyncIterator), R(11), U8(1), B(InvokeIntrinsic), U8(Runtime::k_CreateAsyncFromSyncIterator), R(11), U8(1),
B(Star), R(7), B(Star), R(7),
B(LdaNamedProperty), R(7), U8(11), U8(12), B(LdaNamedProperty), R(7), U8(10), U8(12),
B(Star), R(9), B(Star), R(9),
B(LdaUndefined), B(LdaUndefined),
B(Star), R(8), B(Star), R(8),
B(LdaZero), B(LdaZero),
B(Star), R(6), B(Star), R(6),
B(Ldar), R(6), B(Ldar), R(6),
B(SwitchOnSmiNoFeedback), U8(12), U8(2), I8(1), B(SwitchOnSmiNoFeedback), U8(11), U8(2), I8(1),
B(CallProperty1), R(9), R(7), R(8), U8(14), B(CallProperty1), R(9), R(7), R(8), U8(14),
B(Jump), U8(146), B(Jump), U8(146),
B(LdaNamedProperty), R(7), U8(14), U8(16), B(LdaNamedProperty), R(7), U8(13), U8(16),
B(JumpIfUndefined), U8(13), B(JumpIfUndefined), U8(13),
B(JumpIfNull), U8(11), B(JumpIfNull), U8(11),
B(Star), R(12), B(Star), R(12),
...@@ -523,14 +483,14 @@ bytecodes: [ ...@@ -523,14 +483,14 @@ bytecodes: [
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(Star), R(1), B(Star), R(1),
B(Mov), R(12), R(2), B(Mov), R(12), R(2),
B(JumpConstant), U8(20), B(Jump), U8(245),
B(LdaNamedProperty), R(7), U8(15), U8(20), B(LdaNamedProperty), R(7), U8(14), U8(20),
B(JumpIfUndefined), U8(13), B(JumpIfUndefined), U8(13),
B(JumpIfNull), U8(11), B(JumpIfNull), U8(11),
B(Star), R(14), B(Star), R(14),
B(CallProperty1), R(14), R(7), R(8), U8(22), B(CallProperty1), R(14), R(7), R(8), U8(22),
B(Jump), U8(68), B(Jump), U8(68),
B(LdaNamedProperty), R(7), U8(14), U8(24), B(LdaNamedProperty), R(7), U8(13), U8(24),
B(JumpIfUndefined), U8(57), B(JumpIfUndefined), U8(57),
B(JumpIfNull), U8(55), B(JumpIfNull), U8(55),
B(Star), R(14), B(Star), R(14),
...@@ -571,9 +531,9 @@ bytecodes: [ ...@@ -571,9 +531,9 @@ bytecodes: [
B(Mov), R(14), R(5), B(Mov), R(14), R(5),
B(JumpIfJSReceiver), U8(7), B(JumpIfJSReceiver), U8(7),
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1), B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
B(LdaNamedProperty), R(5), U8(16), U8(28), B(LdaNamedProperty), R(5), U8(15), U8(28),
B(JumpIfToBooleanTrue), U8(38), B(JumpIfToBooleanTrue), U8(38),
B(LdaNamedProperty), R(5), U8(17), U8(30), B(LdaNamedProperty), R(5), U8(16), U8(30),
B(Star), R(17), B(Star), R(17),
B(LdaFalse), B(LdaFalse),
B(Star), R(18), B(Star), R(18),
...@@ -585,7 +545,7 @@ bytecodes: [ ...@@ -585,7 +545,7 @@ bytecodes: [
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1), B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(Star), R(6), B(Star), R(6),
B(JumpLoop), U8(242), I8(0), B(JumpLoop), U8(242), I8(0),
B(LdaNamedProperty), R(5), U8(17), U8(32), B(LdaNamedProperty), R(5), U8(16), U8(32),
B(Star), R(7), B(Star), R(7),
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(TestReferenceEqual), R(6), B(TestReferenceEqual), R(6),
...@@ -593,27 +553,11 @@ bytecodes: [ ...@@ -593,27 +553,11 @@ bytecodes: [
B(LdaSmi), I8(1), B(LdaSmi), I8(1),
B(Star), R(1), B(Star), R(1),
B(Mov), R(7), R(2), B(Mov), R(7), R(2),
B(Jump), U8(85), B(Jump), U8(53),
B(LdaUndefined), B(Ldar), R(7),
B(Star), R(6), B(Jump), U8(36),
B(Mov), R(0), R(5),
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorAwaitUncaught), R(5), U8(2),
B(SuspendGenerator), R(0), R(0), U8(5), U8(5),
B(ResumeGenerator), R(0), R(0), U8(5),
B(Star), R(5),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(Star), R(6),
B(LdaZero),
B(TestReferenceEqual), R(6),
B(JumpIfTrue), U8(5),
B(Ldar), R(5),
B(ReThrow),
B(LdaSmi), I8(1),
B(Star), R(1),
B(Mov), R(5), R(2),
B(Jump), U8(41),
B(Star), R(5), B(Star), R(5),
B(CreateCatchContext), R(5), U8(18), B(CreateCatchContext), R(5), U8(17),
B(Star), R(4), B(Star), R(4),
B(LdaTheHole), B(LdaTheHole),
B(SetPendingMessage), B(SetPendingMessage),
...@@ -627,6 +571,10 @@ bytecodes: [ ...@@ -627,6 +571,10 @@ bytecodes: [
B(Star), R(2), B(Star), R(2),
B(LdaSmi), I8(2), B(LdaSmi), I8(2),
B(Star), R(1), B(Star), R(1),
B(Jump), U8(15),
B(LdaSmi), I8(-1),
B(Star), R(2),
B(Star), R(1),
B(Jump), U8(7), B(Jump), U8(7),
B(Star), R(2), B(Star), R(2),
B(LdaZero), B(LdaZero),
...@@ -638,7 +586,7 @@ bytecodes: [ ...@@ -638,7 +586,7 @@ bytecodes: [
B(Ldar), R(3), B(Ldar), R(3),
B(SetPendingMessage), B(SetPendingMessage),
B(Ldar), R(1), B(Ldar), R(1),
B(SwitchOnSmiNoFeedback), U8(21), U8(3), I8(0), B(SwitchOnSmiNoFeedback), U8(19), U8(3), I8(0),
B(Jump), U8(22), B(Jump), U8(22),
B(Ldar), R(2), B(Ldar), R(2),
B(ReThrow), B(ReThrow),
...@@ -659,7 +607,6 @@ constant pool: [ ...@@ -659,7 +607,6 @@ constant pool: [
Smi [238], Smi [238],
Smi [288], Smi [288],
Smi [347], Smi [347],
Smi [398],
Smi [16], Smi [16],
Smi [7], Smi [7],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["g"], ONE_BYTE_INTERNALIZED_STRING_TYPE ["g"],
...@@ -673,14 +620,13 @@ constant pool: [ ...@@ -673,14 +620,13 @@ constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"], ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"], ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
SCOPE_INFO_TYPE, SCOPE_INFO_TYPE,
Smi [412], Smi [380],
Smi [277],
Smi [6], Smi [6],
Smi [9], Smi [9],
Smi [23], Smi [23],
] ]
handlers: [ handlers: [
[20, 461, 461], [20, 421, 429],
[23, 427, 427], [23, 383, 387],
] ]
...@@ -524,9 +524,6 @@ ...@@ -524,9 +524,6 @@
# https://bugs.chromium.org/p/v8/issues/detail?id=9049 # https://bugs.chromium.org/p/v8/issues/detail?id=9049
'language/comments/hashbang/use-strict': [SKIP], 'language/comments/hashbang/use-strict': [SKIP],
# https://bugs.chromium.org/p/v8/issues/detail?id=9050
'language/statements/async-generator/return-undefined-implicit-and-explicit': [FAIL],
# https://bugs.chromium.org/p/v8/issues/detail?id=9228 # https://bugs.chromium.org/p/v8/issues/detail?id=9228
'built-ins/Proxy/defineProperty/targetdesc-not-configurable-writable-desc-not-writable': [FAIL], 'built-ins/Proxy/defineProperty/targetdesc-not-configurable-writable-desc-not-writable': [FAIL],
'built-ins/Proxy/deleteProperty/targetdesc-is-configurable-target-is-not-extensible': [FAIL], 'built-ins/Proxy/deleteProperty/targetdesc-is-configurable-target-is-not-extensible': [FAIL],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment