Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1398)

Unified Diff: test/cctest/interpreter/bytecode_expectations/StandardForLoop.golden

Issue 2917263002: Move generator-close on exception from the generator function to the GeneratorResume builtin. (Closed)
Patch Set: Add the builtins to the uncaught exception prediction list Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/cctest/interpreter/bytecode_expectations/StandardForLoop.golden
diff --git a/test/cctest/interpreter/bytecode_expectations/StandardForLoop.golden b/test/cctest/interpreter/bytecode_expectations/StandardForLoop.golden
index e52eef4f7e35ac024725a017c75d2df67c9ff7b6..b7ac3343a707b648994d712a123ff7e76c34873a 100644
--- a/test/cctest/interpreter/bytecode_expectations/StandardForLoop.golden
+++ b/test/cctest/interpreter/bytecode_expectations/StandardForLoop.golden
@@ -271,9 +271,9 @@ snippet: "
}
f();
"
-frame size: 18
+frame size: 16
parameter count: 1
-bytecode array length: 254
+bytecode array length: 217
bytecodes: [
B(Mov), R(new_target), R(7),
B(Ldar), R(new_target),
@@ -293,36 +293,35 @@ bytecodes: [
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(10), U8(2),
B(Star), R(3),
/* 11 E> */ B(StackCheck),
- B(Star), R(7),
- B(Mov), R(context), R(12),
B(LdaZero),
- B(Mov), R(3), R(14),
- B(Mov), R(3), R(13),
- /* 11 E> */ B(SuspendGenerator), R(13), R(0), U8(14), U8(0),
- B(Ldar), R(14),
+ B(Mov), R(3), R(7),
+ B(Mov), R(3), R(11),
+ B(Mov), R(3), R(10),
+ /* 11 E> */ B(SuspendGenerator), R(10), R(0), U8(11), U8(0),
+ B(Ldar), R(11),
/* 62 S> */ B(Return),
- B(RestoreGeneratorRegisters), R(7), R(0), U8(14),
+ B(RestoreGeneratorRegisters), R(7), R(0), U8(11),
B(LdaSmi), I8(-2),
B(Star), R(8),
- 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(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(10), U8(1),
+ B(Star), R(11),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(10), U8(1),
+ B(Star), R(12),
B(LdaZero),
- B(TestEqualStrictNoFeedback), R(15),
- B(JumpIfTrue), U8(28),
+ B(TestEqualStrictNoFeedback), R(12),
+ B(JumpIfTrue), U8(30),
B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(15),
- B(JumpIfTrue), U8(19),
+ B(TestEqualStrictNoFeedback), R(12),
+ B(JumpIfTrue), U8(21),
B(LdaTrue),
- B(Star), R(17),
- B(Mov), R(14), R(16),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(16), U8(2),
- B(Star), R(11),
- B(LdaZero),
- B(Star), R(10),
- B(Jump), U8(114),
- B(Ldar), R(14),
+ B(Star), R(14),
+ B(Mov), R(11), R(13),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(13), U8(2),
+ B(Star), R(15),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(7), U8(1),
+ B(Ldar), R(15),
+ /* 62 S> */ B(Return),
+ B(Ldar), R(11),
/* 11 E> */ B(Throw),
/* 31 S> */ B(LdaZero),
B(Star), R(2),
@@ -363,43 +362,19 @@ bytecodes: [
B(Jump), U8(5),
B(JumpLoop), U8(68), I8(0),
B(LdaUndefined),
- B(Star), R(13),
- B(LdaTrue),
- B(Star), R(14),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(13), U8(2),
- B(Star), R(11),
- B(LdaZero),
B(Star), R(10),
- B(Jump), U8(14),
- B(LdaSmi), I8(-1),
- B(Star), R(10),
- B(Jump), U8(8),
+ B(LdaTrue),
B(Star), R(11),
- B(LdaSmi), I8(1),
- B(Star), R(10),
- B(LdaTheHole),
- B(SetPendingMessage),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(10), U8(2),
B(Star), R(12),
- B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(3), U8(1),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(7), U8(1),
B(Ldar), R(12),
- B(SetPendingMessage),
- B(Ldar), R(10),
- B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0),
- B(Jump), U8(8),
- B(Ldar), R(11),
- /* 62 S> */ B(Return),
- B(Ldar), R(11),
- B(ReThrow),
- B(LdaUndefined),
/* 62 S> */ B(Return),
]
constant pool: [
- Smi [50],
- Smi [6],
- Smi [9],
+ Smi [48],
]
handlers: [
- [52, 215, 221],
]
---
@@ -409,9 +384,9 @@ snippet: "
}
f();
"
-frame size: 17
+frame size: 15
parameter count: 1
-bytecode array length: 369
+bytecode array length: 333
bytecodes: [
B(Mov), R(new_target), R(6),
B(Ldar), R(new_target),
@@ -431,36 +406,35 @@ bytecodes: [
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(9), U8(2),
B(Star), R(2),
/* 11 E> */ B(StackCheck),
- B(Star), R(6),
- B(Mov), R(context), R(11),
B(LdaZero),
- B(Mov), R(2), R(13),
- B(Mov), R(2), R(12),
- /* 11 E> */ B(SuspendGenerator), R(12), R(0), U8(13), U8(0),
- B(Ldar), R(13),
+ B(Mov), R(2), R(6),
+ B(Mov), R(2), R(10),
+ B(Mov), R(2), R(9),
+ /* 11 E> */ B(SuspendGenerator), R(9), R(0), U8(10), U8(0),
+ B(Ldar), R(10),
/* 56 S> */ B(Return),
- B(RestoreGeneratorRegisters), R(6), R(0), U8(13),
+ B(RestoreGeneratorRegisters), R(6), R(0), U8(10),
B(LdaSmi), I8(-2),
B(Star), R(7),
- 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(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(14),
- B(JumpIfTrue), U8(28),
+ B(TestEqualStrictNoFeedback), R(11),
+ B(JumpIfTrue), U8(30),
B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(14),
- B(JumpIfTrue), U8(19),
+ B(TestEqualStrictNoFeedback), R(11),
+ B(JumpIfTrue), U8(21),
B(LdaTrue),
- B(Star), R(16),
- B(Mov), R(13), R(15),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(15), U8(2),
- B(Star), R(10),
- B(LdaZero),
- B(Star), R(9),
- B(Jump), U8(229),
- B(Ldar), R(13),
+ B(Star), R(13),
+ B(Mov), R(10), R(12),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(12), U8(2),
+ B(Star), R(14),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(6), U8(1),
+ B(Ldar), R(14),
+ /* 56 S> */ B(Return),
+ B(Ldar), R(10),
/* 11 E> */ B(Throw),
/* 31 S> */ B(LdaZero),
B(Star), R(1),
@@ -473,8 +447,8 @@ bytecodes: [
/* 54 E> */ B(TestEqualStrictNoFeedback), R(7),
B(JumpIfTrue), U8(11),
B(LdaSmi), I8(79),
- B(Star), R(12),
- B(CallRuntime), U16(Runtime::kAbort), R(12), U8(1),
+ B(Star), R(9),
+ B(CallRuntime), U16(Runtime::kAbort), R(9), U8(1),
B(StackCheck),
B(Mov), R(3), R(0),
B(LdaSmi), I8(1),
@@ -492,103 +466,78 @@ bytecodes: [
/* 36 E> */ B(TestLessThan), R(0), U8(5),
B(JumpIfFalse), U8(4),
B(Jump), U8(4),
- B(Jump), U8(130),
+ B(Jump), U8(131),
B(Ldar), R(7),
B(SwitchOnSmiNoFeedback), U8(3), U8(1), I8(1),
B(LdaSmi), I8(-2),
B(TestEqualStrictNoFeedback), R(7),
B(JumpIfTrue), U8(11),
B(LdaSmi), I8(79),
- B(Star), R(12),
- B(CallRuntime), U16(Runtime::kAbort), R(12), U8(1),
+ B(Star), R(9),
+ B(CallRuntime), U16(Runtime::kAbort), R(9), U8(1),
B(LdaSmi), I8(1),
B(TestEqual), R(5), U8(6),
- B(JumpIfFalse), U8(90),
+ B(JumpIfFalse), U8(91),
/* 18 E> */ B(StackCheck),
- /* 47 S> */ B(LdaFalse),
- B(Star), R(14),
- B(Mov), R(0), R(13),
- /* 53 E> */ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(13), U8(2),
- B(Star), R(13),
- B(LdaSmi), I8(1),
- B(Mov), R(2), R(12),
- B(SuspendGenerator), R(12), R(0), U8(13), U8(0),
- B(Ldar), R(13),
+ /* 47 S> */ B(LdaSmi), I8(1),
+ B(Mov), R(0), R(10),
+ B(Mov), R(2), R(9),
+ /* 53 E> */ B(SuspendGenerator), R(9), R(0), U8(10), U8(0),
+ B(LdaFalse),
+ B(Star), R(12),
+ B(Mov), R(10), R(11),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(11), U8(2),
/* 56 S> */ B(Return),
- B(RestoreGeneratorRegisters), R(6), R(0), U8(13),
+ B(RestoreGeneratorRegisters), R(6), R(0), U8(10),
B(LdaSmi), I8(-2),
B(Star), R(7),
- 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(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(14),
- B(JumpIfTrue), U8(28),
+ B(TestEqualStrictNoFeedback), R(11),
+ B(JumpIfTrue), U8(30),
B(LdaSmi), I8(2),
- B(TestEqualStrictNoFeedback), R(14),
- B(JumpIfTrue), U8(19),
+ B(TestEqualStrictNoFeedback), R(11),
+ B(JumpIfTrue), U8(21),
B(LdaTrue),
- B(Star), R(16),
- B(Mov), R(13), R(15),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(15), U8(2),
- B(Star), R(10),
- B(LdaZero),
- B(Star), R(9),
- B(Jump), U8(57),
- B(Ldar), R(13),
+ B(Star), R(13),
+ B(Mov), R(10), R(12),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(12), U8(2),
+ B(Star), R(14),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(6), U8(1),
+ B(Ldar), R(14),
+ /* 56 S> */ B(Return),
+ B(Ldar), R(10),
/* 47 E> */ B(Throw),
B(LdaZero),
B(Star), R(5),
B(Mov), R(0), R(3),
B(Ldar), R(0),
- B(JumpLoop), U8(113), I8(1),
+ B(JumpLoop), U8(114), I8(1),
B(LdaSmi), I8(1),
/* 54 E> */ B(TestEqual), R(5), U8(7),
B(JumpIfFalse), U8(4),
B(Jump), U8(5),
- B(JumpLoop), U8(183), I8(0),
+ B(JumpLoop), U8(184), I8(0),
B(LdaUndefined),
- B(Star), R(12),
- B(LdaTrue),
- B(Star), R(13),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(12), U8(2),
- B(Star), R(10),
- B(LdaZero),
- B(Star), R(9),
- B(Jump), U8(14),
- B(LdaSmi), I8(-1),
B(Star), R(9),
- B(Jump), U8(8),
+ B(LdaTrue),
B(Star), R(10),
- B(LdaSmi), I8(1),
- B(Star), R(9),
- B(LdaTheHole),
- B(SetPendingMessage),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(9), U8(2),
B(Star), R(11),
- B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(2), U8(1),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(6), U8(1),
B(Ldar), R(11),
- B(SetPendingMessage),
- B(Ldar), R(9),
- B(SwitchOnSmiNoFeedback), U8(4), U8(2), I8(0),
- B(Jump), U8(8),
- B(Ldar), R(10),
- /* 56 S> */ B(Return),
- B(Ldar), R(10),
- B(ReThrow),
- B(LdaUndefined),
/* 56 S> */ B(Return),
]
constant pool: [
- Smi [50],
+ Smi [48],
Smi [110],
Smi [56],
- Smi [52],
- Smi [6],
- Smi [9],
+ Smi [51],
]
handlers: [
- [52, 330, 336],
]
---
@@ -724,7 +673,7 @@ snippet: "
"
frame size: 19
parameter count: 1
-bytecode array length: 377
+bytecode array length: 368
bytecodes: [
B(Mov), R(new_target), R(7),
B(Ldar), R(new_target),
@@ -781,7 +730,7 @@ bytecodes: [
/* 41 E> */ B(TestLessThan), R(0), U8(5),
B(JumpIfFalse), U8(4),
B(Jump), U8(4),
- B(Jump), U8(136),
+ B(Jump), U8(127),
B(Ldar), R(8),
B(SwitchOnSmiNoFeedback), U8(2), U8(1), I8(0),
B(LdaSmi), I8(-2),
@@ -792,7 +741,7 @@ bytecodes: [
B(CallRuntime), U16(Runtime::kAbort), R(14), U8(1),
B(LdaSmi), I8(1),
B(TestEqual), R(6), U8(6),
- B(JumpIfFalse), U8(96),
+ B(JumpIfFalse), U8(87),
/* 23 E> */ B(StackCheck),
/* 52 S> */ B(LdaUndefined),
B(Star), R(15),
@@ -815,17 +764,13 @@ bytecodes: [
B(Star), R(16),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(16),
- B(JumpIfTrue), U8(28),
+ B(JumpIfTrue), U8(19),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(16),
- 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(11),
+ B(JumpIfTrue), U8(10),
B(LdaZero),
B(Star), R(10),
+ B(Mov), R(15), R(11),
B(Jump), U8(106),
B(Ldar), R(15),
/* 52 E> */ B(ReThrow),
@@ -833,12 +778,12 @@ bytecodes: [
B(Star), R(6),
B(Mov), R(0), R(4),
B(Ldar), R(0),
- B(JumpLoop), U8(119), I8(1),
+ B(JumpLoop), U8(110), I8(1),
B(LdaSmi), I8(1),
/* 59 E> */ B(TestEqual), R(6), U8(7),
B(JumpIfFalse), U8(4),
B(Jump), U8(5),
- B(JumpLoop), U8(189), I8(0),
+ B(JumpLoop), U8(180), I8(0),
B(LdaUndefined),
B(Star), R(14),
B(LdaUndefined),
@@ -906,7 +851,7 @@ constant pool: [
Smi [9],
]
handlers: [
- [62, 332, 338],
- [65, 287, 289],
+ [62, 323, 329],
+ [65, 278, 280],
]

Powered by Google App Engine
This is Rietveld 408576698