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

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 register allocation scope 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
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/Modules.golden ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e317b266483a63df1f1067dad64267d34ef0a99c..90ac60aa92529aba760eface3f9dbb1839cabc02 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: 16
+frame size: 11
parameter count: 1
-bytecode array length: 242
+bytecode array length: 184
bytecodes: [
B(Mov), R(new_target), R(7),
B(Ldar), R(new_target),
@@ -284,39 +284,33 @@ bytecodes: [
B(Star), R(8),
B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
B(LdaSmi), I8(79),
- B(Star), R(10),
- B(CallRuntime), U16(Runtime::kAbort), R(10), U8(1),
+ B(Star), R(9),
+ B(CallRuntime), U16(Runtime::kAbort), R(9), U8(1),
B(LdaSmi), I8(-2),
B(Star), R(8),
- B(Mov), R(closure), R(10),
- B(Mov), R(this), R(11),
- B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(10), U8(2),
+ B(Mov), R(closure), R(9),
+ B(Mov), R(this), R(10),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(9), 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(13),
- /* 11 E> */ B(SuspendGenerator), R(7), R(0), U8(13), U8(0),
- B(Ldar), R(13),
+ B(Mov), R(3), R(7),
+ B(Mov), R(3), R(9),
+ /* 11 E> */ B(SuspendGenerator), R(7), R(0), U8(9), U8(0),
+ B(Ldar), R(9),
/* 62 S> */ B(Return),
- B(RestoreGeneratorRegisters), R(7), R(0), U8(13),
+ B(RestoreGeneratorRegisters), R(7), R(0), U8(9),
B(LdaSmi), I8(-2),
B(Star), R(8),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(7), U8(1),
- B(Star), R(13),
+ B(Star), R(9),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(7), U8(1),
B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0),
- B(Ldar), R(13),
+ B(Ldar), R(9),
/* 11 E> */ B(Throw),
- B(LdaTrue),
- B(Star), R(15),
- B(Mov), R(13), R(14),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(14), U8(2),
- B(Star), R(11),
- B(LdaZero),
- B(Star), R(10),
- B(Jump), U8(111),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(7), U8(1),
+ B(Ldar), R(9),
+ /* 62 S> */ B(Return),
/* 31 S> */ B(LdaZero),
B(Star), R(2),
B(Star), R(4),
@@ -356,45 +350,17 @@ 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(Star), R(11),
- B(LdaSmi), I8(1),
- B(Star), R(10),
- B(LdaTheHole),
- B(SetPendingMessage),
- B(Star), R(12),
- B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(3), U8(1),
- B(Ldar), R(12),
- B(SetPendingMessage),
- B(Ldar), R(10),
- B(SwitchOnSmiNoFeedback), U8(3), U8(2), I8(0),
- B(Jump), U8(8),
- B(Ldar), R(11),
- /* 62 S> */ B(Return),
- B(Ldar), R(11),
- B(ReThrow),
- B(LdaUndefined),
+ B(Star), R(9),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(7), U8(1),
+ B(Ldar), R(9),
/* 62 S> */ B(Return),
]
constant pool: [
- Smi [47],
- Smi [24],
+ Smi [45],
+ Smi [14],
Smi [7],
- Smi [6],
- Smi [9],
]
handlers: [
- [52, 203, 209],
]
---
@@ -404,9 +370,9 @@ snippet: "
}
f();
"
-frame size: 15
+frame size: 11
parameter count: 1
-bytecode array length: 345
+bytecode array length: 276
bytecodes: [
B(Mov), R(new_target), R(6),
B(Ldar), R(new_target),
@@ -417,39 +383,33 @@ bytecodes: [
B(Star), R(7),
B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0),
B(LdaSmi), I8(79),
- B(Star), R(9),
- B(CallRuntime), U16(Runtime::kAbort), R(9), U8(1),
+ B(Star), R(8),
+ B(CallRuntime), U16(Runtime::kAbort), R(8), U8(1),
B(LdaSmi), I8(-2),
B(Star), R(7),
- B(Mov), R(closure), R(9),
- B(Mov), R(this), R(10),
- B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(9), U8(2),
+ B(Mov), R(closure), R(8),
+ B(Mov), R(this), R(9),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(8), 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(12),
- /* 11 E> */ B(SuspendGenerator), R(6), R(0), U8(12), U8(0),
- B(Ldar), R(12),
+ B(Mov), R(2), R(6),
+ B(Mov), R(2), R(8),
+ /* 11 E> */ B(SuspendGenerator), R(6), R(0), U8(8), U8(0),
+ B(Ldar), R(8),
/* 56 S> */ B(Return),
- B(RestoreGeneratorRegisters), R(6), R(0), U8(12),
+ B(RestoreGeneratorRegisters), R(6), R(0), U8(8),
B(LdaSmi), I8(-2),
B(Star), R(7),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(6), U8(1),
- B(Star), R(12),
+ B(Star), R(8),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(6), U8(1),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
- B(Ldar), R(12),
+ B(Ldar), R(8),
/* 11 E> */ B(Throw),
- B(LdaTrue),
- B(Star), R(14),
- B(Mov), R(12), R(13),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(13), U8(2),
- B(Star), R(10),
- B(LdaZero),
- B(Star), R(9),
- B(Jump), U8(214),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(6), U8(1),
+ B(Ldar), R(8),
+ /* 56 S> */ B(Return),
/* 31 S> */ B(LdaZero),
B(Star), R(1),
B(Star), R(3),
@@ -461,8 +421,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(8),
+ B(CallRuntime), U16(Runtime::kAbort), R(8), U8(1),
B(StackCheck),
B(Mov), R(3), R(0),
B(LdaSmi), I8(1),
@@ -480,100 +440,66 @@ bytecodes: [
/* 36 E> */ B(TestLessThan), R(0), U8(5),
B(JumpIfFalse), U8(4),
B(Jump), U8(4),
- B(Jump), U8(118),
+ B(Jump), U8(107),
B(Ldar), R(7),
B(SwitchOnSmiNoFeedback), U8(5), 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(8),
+ B(CallRuntime), U16(Runtime::kAbort), R(8), U8(1),
B(LdaSmi), I8(1),
B(TestEqual), R(5), U8(6),
- B(JumpIfFalse), U8(78),
+ B(JumpIfFalse), U8(67),
/* 18 E> */ B(StackCheck),
- /* 47 S> */ B(LdaFalse),
- B(Star), R(13),
- B(Mov), R(0), R(12),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(12), U8(2),
- B(Star), R(12),
- B(LdaSmi), I8(1),
- B(SuspendGenerator), R(6), R(0), U8(12), U8(0),
- B(Ldar), R(12),
+ /* 47 S> */ B(LdaSmi), I8(1),
+ B(Mov), R(0), R(8),
+ B(SuspendGenerator), R(6), R(0), U8(8), U8(0),
+ B(LdaFalse),
+ B(Star), R(10),
+ B(Mov), R(8), R(9),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(9), U8(2),
/* 56 S> */ B(Return),
- B(RestoreGeneratorRegisters), R(6), R(0), U8(12),
+ B(RestoreGeneratorRegisters), R(6), R(0), U8(8),
B(LdaSmi), I8(-2),
B(Star), R(7),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(6), U8(1),
- B(Star), R(12),
+ B(Star), R(8),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(6), U8(1),
B(SwitchOnSmiNoFeedback), U8(6), U8(2), I8(0),
- B(Ldar), R(12),
+ B(Ldar), R(8),
/* 47 E> */ B(Throw),
- B(LdaTrue),
- B(Star), R(14),
- B(Mov), R(12), R(13),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(13), U8(2),
- B(Star), R(10),
- B(LdaZero),
- B(Star), R(9),
- B(Jump), U8(54),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(6), U8(1),
+ B(Ldar), R(8),
+ /* 56 S> */ B(Return),
B(LdaZero),
B(Star), R(5),
B(Mov), R(0), R(3),
B(Ldar), R(0),
- B(JumpLoop), U8(101), I8(1),
+ B(JumpLoop), U8(90), 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(171), 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(Star), R(10),
- B(LdaSmi), I8(1),
- B(Star), R(9),
- B(LdaTheHole),
- B(SetPendingMessage),
- B(Star), R(11),
- B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(2), U8(1),
- B(Ldar), R(11),
- B(SetPendingMessage),
- B(Ldar), R(9),
- B(SwitchOnSmiNoFeedback), U8(8), U8(2), I8(0),
- B(Jump), U8(8),
- B(Ldar), R(10),
- /* 56 S> */ B(Return),
- B(Ldar), R(10),
- B(ReThrow),
+ B(JumpLoop), U8(160), I8(0),
B(LdaUndefined),
+ B(Star), R(8),
+ B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(6), U8(1),
+ B(Ldar), R(8),
/* 56 S> */ B(Return),
]
constant pool: [
- Smi [47],
- Smi [98],
- Smi [24],
+ Smi [45],
+ Smi [86],
+ Smi [14],
Smi [7],
Smi [56],
- Smi [49],
- Smi [24],
+ Smi [48],
+ Smi [14],
Smi [7],
- Smi [6],
- Smi [9],
]
handlers: [
- [52, 306, 312],
]
---
@@ -707,9 +633,9 @@ snippet: "
}
f();
"
-frame size: 19
+frame size: 18
parameter count: 1
-bytecode array length: 365
+bytecode array length: 356
bytecodes: [
B(Mov), R(new_target), R(7),
B(Ldar), R(new_target),
@@ -720,22 +646,22 @@ bytecodes: [
B(Star), R(8),
B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
B(LdaSmi), I8(79),
- B(Star), R(10),
- B(CallRuntime), U16(Runtime::kAbort), R(10), U8(1),
+ B(Star), R(9),
+ B(CallRuntime), U16(Runtime::kAbort), R(9), U8(1),
B(LdaSmi), I8(-2),
B(Star), R(8),
- B(Mov), R(closure), R(10),
- B(Mov), R(this), R(11),
- B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(10), U8(2),
+ B(Mov), R(closure), R(9),
+ B(Mov), R(this), R(10),
+ B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(9), U8(2),
B(Star), R(2),
/* 16 E> */ B(StackCheck),
B(LdaUndefined),
- B(Star), R(10),
- B(CallJSRuntime), U8(%async_function_promise_create), R(10), U8(1),
+ B(Star), R(9),
+ B(CallJSRuntime), U8(%async_function_promise_create), R(9), U8(1),
B(Star), R(3),
- B(Mov), R(context), R(12),
+ B(Mov), R(context), R(11),
B(Mov), R(2), R(7),
- B(Mov), R(context), R(13),
+ B(Mov), R(context), R(12),
/* 36 S> */ B(LdaZero),
B(Star), R(1),
B(Star), R(4),
@@ -747,8 +673,8 @@ bytecodes: [
/* 59 E> */ B(TestEqualStrictNoFeedback), R(8),
B(JumpIfTrue), U8(11),
B(LdaSmi), I8(79),
- B(Star), R(14),
- B(CallRuntime), U16(Runtime::kAbort), R(14), U8(1),
+ B(Star), R(13),
+ B(CallRuntime), U16(Runtime::kAbort), R(13), U8(1),
B(StackCheck),
B(Mov), R(4), R(0),
B(LdaSmi), I8(1),
@@ -766,110 +692,106 @@ bytecodes: [
/* 41 E> */ B(TestLessThan), R(0), U8(5),
B(JumpIfFalse), U8(4),
B(Jump), U8(4),
- B(Jump), U8(124),
+ B(Jump), U8(115),
B(Ldar), R(8),
B(SwitchOnSmiNoFeedback), U8(2), U8(1), I8(0),
B(LdaSmi), I8(-2),
B(TestEqualStrictNoFeedback), R(8),
B(JumpIfTrue), U8(11),
B(LdaSmi), I8(79),
- B(Star), R(14),
- B(CallRuntime), U16(Runtime::kAbort), R(14), U8(1),
+ B(Star), R(13),
+ B(CallRuntime), U16(Runtime::kAbort), R(13), U8(1),
B(LdaSmi), I8(1),
B(TestEqual), R(6), U8(6),
- B(JumpIfFalse), U8(84),
+ B(JumpIfFalse), U8(75),
/* 23 E> */ B(StackCheck),
/* 52 S> */ B(LdaUndefined),
- B(Star), R(14),
- B(Mov), R(2), R(15),
- B(Mov), R(0), R(16),
- B(Mov), R(3), R(17),
- /* 58 E> */ B(CallJSRuntime), U8(%async_function_await_uncaught), R(14), U8(4),
+ B(Star), R(13),
+ B(Mov), R(2), R(14),
+ B(Mov), R(0), R(15),
+ B(Mov), R(3), R(16),
+ /* 58 E> */ B(CallJSRuntime), U8(%async_function_await_uncaught), R(13), U8(4),
B(LdaZero),
- B(Mov), R(3), R(14),
- B(SuspendGenerator), R(7), R(0), U8(14), U8(2),
- B(Ldar), R(14),
+ B(Mov), R(3), R(13),
+ B(SuspendGenerator), R(7), R(0), U8(13), U8(2),
+ B(Ldar), R(13),
/* 61 S> */ B(Return),
- B(RestoreGeneratorRegisters), R(7), R(0), U8(14),
+ B(RestoreGeneratorRegisters), R(7), R(0), U8(13),
B(LdaSmi), I8(-2),
B(Star), R(8),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(7), U8(1),
- B(Star), R(14),
+ B(Star), R(13),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(7), U8(1),
B(SwitchOnSmiNoFeedback), U8(3), U8(2), I8(0),
- B(Ldar), R(14),
+ B(Ldar), R(13),
/* 52 E> */ B(ReThrow),
- B(LdaTrue),
- B(Star), R(16),
- B(Mov), R(14), R(15),
- B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(15), U8(2),
- B(Star), R(11),
B(LdaZero),
- B(Star), R(10),
+ B(Star), R(9),
+ B(Mov), R(13), R(10),
B(Jump), U8(103),
B(LdaZero),
B(Star), R(6),
B(Mov), R(0), R(4),
B(Ldar), R(0),
- B(JumpLoop), U8(107), I8(1),
+ B(JumpLoop), U8(98), 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(177), I8(0),
+ B(JumpLoop), U8(168), I8(0),
B(LdaUndefined),
- B(Star), R(14),
+ B(Star), R(13),
B(LdaUndefined),
- B(Star), R(16),
- B(Mov), R(3), R(15),
- B(CallJSRuntime), U8(%promise_resolve), R(14), U8(3),
+ B(Star), R(15),
+ B(Mov), R(3), R(14),
+ B(CallJSRuntime), U8(%promise_resolve), R(13), U8(3),
B(LdaZero),
- B(Star), R(10),
- B(Mov), R(3), R(11),
+ B(Star), R(9),
+ B(Mov), R(3), R(10),
B(Jump), U8(59),
B(Jump), U8(45),
- B(Star), R(14),
- B(Ldar), R(closure),
- B(CreateCatchContext), R(14), U8(5), U8(6),
B(Star), R(13),
+ B(Ldar), R(closure),
+ B(CreateCatchContext), R(13), U8(5), U8(6),
+ B(Star), R(12),
B(LdaTheHole),
B(SetPendingMessage),
- B(Ldar), R(13),
- B(PushContext), R(14),
+ B(Ldar), R(12),
+ B(PushContext), R(13),
B(LdaUndefined),
- B(Star), R(15),
+ B(Star), R(14),
B(LdaImmutableCurrentContextSlot), U8(4),
- B(Star), R(17),
+ B(Star), R(16),
B(LdaFalse),
- B(Star), R(18),
- B(Mov), R(3), R(16),
- B(CallJSRuntime), U8(%promise_internal_reject), R(15), U8(4),
- B(PopContext), R(14),
+ B(Star), R(17),
+ B(Mov), R(3), R(15),
+ B(CallJSRuntime), U8(%promise_internal_reject), R(14), U8(4),
+ B(PopContext), R(13),
B(LdaZero),
- B(Star), R(10),
- B(Mov), R(3), R(11),
+ B(Star), R(9),
+ B(Mov), R(3), R(10),
B(Jump), U8(14),
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(LdaUndefined),
- B(Star), R(13),
- B(Mov), R(3), R(14),
- B(CallJSRuntime), U8(%async_function_promise_release), R(13), U8(2),
- B(Ldar), R(12),
+ B(Star), R(12),
+ B(Mov), R(3), R(13),
+ B(CallJSRuntime), U8(%async_function_promise_release), R(12), U8(2),
+ B(Ldar), R(11),
B(SetPendingMessage),
- B(Ldar), R(10),
+ B(Ldar), R(9),
B(SwitchOnSmiNoFeedback), U8(7), U8(2), I8(0),
B(Jump), U8(8),
- B(Ldar), R(11),
+ B(Ldar), R(10),
/* 61 S> */ B(Return),
- B(Ldar), R(11),
+ B(Ldar), R(10),
B(ReThrow),
B(LdaUndefined),
/* 61 S> */ B(Return),
@@ -878,7 +800,7 @@ constant pool: [
Smi [57],
Smi [56],
Smi [55],
- Smi [24],
+ Smi [15],
Smi [7],
ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
FIXED_ARRAY_TYPE,
@@ -886,7 +808,7 @@ constant pool: [
Smi [9],
]
handlers: [
- [62, 320, 326],
- [65, 275, 277],
+ [62, 311, 317],
+ [65, 266, 268],
]
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/Modules.golden ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698