Index: test/cctest/interpreter/bytecode_expectations/BasicLoops.golden |
diff --git a/test/cctest/interpreter/bytecode_expectations/BasicLoops.golden b/test/cctest/interpreter/bytecode_expectations/BasicLoops.golden |
index f23de7c8f98af05257a907eef06b32d054b9706e..07db196044236fe02449d682f2d971159946e547 100644 |
--- a/test/cctest/interpreter/bytecode_expectations/BasicLoops.golden |
+++ b/test/cctest/interpreter/bytecode_expectations/BasicLoops.golden |
@@ -64,7 +64,7 @@ snippet: " |
" |
frame size: 2 |
parameter count: 1 |
-bytecode array length: 52 |
+bytecode array length: 53 |
bytecodes: [ |
/* 30 E> */ B(StackCheck), |
/* 42 S> */ B(LdaZero), |
@@ -73,7 +73,7 @@ bytecodes: [ |
B(Star), R(1), |
/* 65 S> */ B(LdaSmi), U8(10), |
/* 65 E> */ B(TestLessThan), R(0), U8(1), |
- B(JumpIfFalse), U8(36), |
+ B(JumpIfFalse), U8(37), |
/* 56 E> */ B(StackCheck), |
/* 75 S> */ B(LdaSmi), U8(12), |
B(Mul), R(1), U8(2), |
@@ -87,8 +87,8 @@ bytecodes: [ |
/* 126 S> */ B(LdaSmi), U8(4), |
/* 132 E> */ B(TestEqual), R(0), U8(5), |
B(JumpIfFalse), U8(4), |
- /* 138 S> */ B(Jump), U8(4), |
- B(Jump), U8(-39), |
+ /* 138 S> */ B(Jump), U8(5), |
+ B(JumpLoop), U8(-39), U8(0), |
/* 147 S> */ B(Ldar), R(1), |
/* 157 S> */ B(Return), |
] |
@@ -112,7 +112,7 @@ snippet: " |
" |
frame size: 1 |
parameter count: 1 |
-bytecode array length: 60 |
+bytecode array length: 61 |
bytecodes: [ |
/* 30 E> */ B(StackCheck), |
/* 42 S> */ B(LdaZero), |
@@ -125,11 +125,11 @@ bytecodes: [ |
/* 85 S> */ B(LdaSmi), U8(3), |
/* 91 E> */ B(TestEqual), R(0), U8(2), |
B(JumpIfFalse), U8(4), |
- /* 97 S> */ B(Jump), U8(37), |
+ /* 97 S> */ B(Jump), U8(38), |
/* 106 S> */ B(LdaSmi), U8(4), |
/* 112 E> */ B(TestEqual), R(0), U8(3), |
B(JumpIfFalse), U8(4), |
- /* 118 S> */ B(Jump), U8(28), |
+ /* 118 S> */ B(Jump), U8(29), |
/* 127 S> */ B(LdaSmi), U8(10), |
/* 133 E> */ B(TestEqual), R(0), U8(4), |
B(JumpIfFalse), U8(4), |
@@ -137,10 +137,10 @@ bytecodes: [ |
/* 152 S> */ B(LdaSmi), U8(5), |
/* 158 E> */ B(TestEqual), R(0), U8(5), |
B(JumpIfFalse), U8(4), |
- /* 164 S> */ B(Jump), U8(10), |
+ /* 164 S> */ B(Jump), U8(11), |
/* 173 S> */ B(AddSmi), U8(1), R(0), U8(6), |
B(Star), R(0), |
- B(Jump), U8(-51), |
+ B(JumpLoop), U8(-51), U8(0), |
/* 186 S> */ B(Ldar), R(0), |
/* 196 S> */ B(Return), |
] |
@@ -164,7 +164,7 @@ snippet: " |
" |
frame size: 1 |
parameter count: 1 |
-bytecode array length: 41 |
+bytecode array length: 42 |
bytecodes: [ |
/* 30 E> */ B(StackCheck), |
/* 42 S> */ B(LdaZero), |
@@ -172,15 +172,15 @@ bytecodes: [ |
/* 45 E> */ B(StackCheck), |
/* 71 S> */ B(LdaSmi), U8(3), |
/* 71 E> */ B(TestLessThan), R(0), U8(1), |
- B(JumpIfFalse), U8(20), |
+ B(JumpIfFalse), U8(21), |
/* 62 E> */ B(StackCheck), |
/* 82 S> */ B(LdaSmi), U8(2), |
/* 88 E> */ B(TestEqual), R(0), U8(2), |
B(JumpIfFalse), U8(4), |
- /* 94 S> */ B(Jump), U8(10), |
+ /* 94 S> */ B(Jump), U8(11), |
/* 105 S> */ B(AddSmi), U8(1), R(0), U8(3), |
B(Star), R(0), |
- B(Jump), U8(-23), |
+ B(JumpLoop), U8(-23), U8(1), |
/* 122 S> */ B(AddSmi), U8(1), R(0), U8(4), |
B(Star), R(0), |
/* 135 S> */ B(Jump), U8(2), |
@@ -204,7 +204,7 @@ snippet: " |
" |
frame size: 2 |
parameter count: 1 |
-bytecode array length: 32 |
+bytecode array length: 33 |
bytecodes: [ |
/* 30 E> */ B(StackCheck), |
/* 42 S> */ B(LdaSmi), U8(10), |
@@ -212,14 +212,14 @@ bytecodes: [ |
/* 54 S> */ B(LdaSmi), U8(1), |
B(Star), R(1), |
/* 64 S> */ B(Ldar), R(0), |
- B(JumpIfToBooleanFalse), U8(18), |
+ B(JumpIfToBooleanFalse), U8(19), |
/* 57 E> */ B(StackCheck), |
/* 71 S> */ B(LdaSmi), U8(12), |
B(Mul), R(1), U8(1), |
B(Star), R(1), |
/* 85 S> */ B(SubSmi), U8(1), R(0), U8(2), |
B(Star), R(0), |
- B(Jump), U8(-18), |
+ B(JumpLoop), U8(-18), U8(0), |
/* 98 S> */ B(Ldar), R(1), |
/* 108 S> */ B(Return), |
] |
@@ -241,7 +241,7 @@ snippet: " |
" |
frame size: 2 |
parameter count: 1 |
-bytecode array length: 50 |
+bytecode array length: 53 |
bytecodes: [ |
/* 30 E> */ B(StackCheck), |
/* 42 S> */ B(LdaZero), |
@@ -255,7 +255,7 @@ bytecodes: [ |
/* 77 S> */ B(LdaSmi), U8(5), |
/* 83 E> */ B(TestEqual), R(0), U8(2), |
B(JumpIfFalse), U8(4), |
- /* 89 S> */ B(Jump), U8(24), |
+ /* 89 S> */ B(Jump), U8(27), |
/* 98 S> */ B(LdaSmi), U8(6), |
/* 104 E> */ B(TestEqual), R(0), U8(3), |
B(JumpIfFalse), U8(4), |
@@ -264,7 +264,8 @@ bytecodes: [ |
B(Star), R(0), |
/* 144 S> */ B(LdaSmi), U8(10), |
/* 144 E> */ B(TestLessThan), R(0), U8(5), |
- B(JumpIfTrue), U8(-37), |
+ B(JumpIfFalse), U8(5), |
+ B(JumpLoop), U8(-39), U8(0), |
/* 151 S> */ B(Ldar), R(1), |
/* 161 S> */ B(Return), |
] |
@@ -285,7 +286,7 @@ snippet: " |
" |
frame size: 2 |
parameter count: 1 |
-bytecode array length: 28 |
+bytecode array length: 31 |
bytecodes: [ |
/* 30 E> */ B(StackCheck), |
/* 42 S> */ B(LdaSmi), U8(10), |
@@ -298,7 +299,8 @@ bytecodes: [ |
B(Star), R(1), |
/* 78 S> */ B(SubSmi), U8(1), R(0), U8(2), |
B(Star), R(0), |
- /* 98 S> */ B(JumpIfToBooleanTrue), U8(-14), |
+ /* 98 S> */ B(JumpIfToBooleanFalse), U8(5), |
+ B(JumpLoop), U8(-16), U8(0), |
/* 102 S> */ B(Ldar), R(1), |
/* 112 S> */ B(Return), |
] |
@@ -362,7 +364,7 @@ snippet: " |
" |
frame size: 2 |
parameter count: 1 |
-bytecode array length: 45 |
+bytecode array length: 46 |
bytecodes: [ |
/* 30 E> */ B(StackCheck), |
/* 42 S> */ B(LdaZero), |
@@ -376,14 +378,14 @@ bytecodes: [ |
/* 77 S> */ B(LdaSmi), U8(5), |
/* 83 E> */ B(TestEqual), R(0), U8(2), |
B(JumpIfFalse), U8(4), |
- /* 89 S> */ B(Jump), U8(19), |
+ /* 89 S> */ B(Jump), U8(20), |
/* 98 S> */ B(AddSmi), U8(1), R(0), U8(3), |
B(Star), R(0), |
/* 111 S> */ B(LdaSmi), U8(6), |
/* 117 E> */ B(TestEqual), R(0), U8(4), |
B(JumpIfFalse), U8(4), |
/* 123 S> */ B(Jump), U8(2), |
- B(Jump), U8(-32), |
+ B(JumpLoop), U8(-32), U8(0), |
/* 149 S> */ B(Ldar), R(1), |
/* 159 S> */ B(Return), |
] |
@@ -403,7 +405,7 @@ snippet: " |
" |
frame size: 1 |
parameter count: 1 |
-bytecode array length: 33 |
+bytecode array length: 34 |
bytecodes: [ |
/* 30 E> */ B(StackCheck), |
/* 42 S> */ B(LdaZero), |
@@ -412,14 +414,14 @@ bytecodes: [ |
/* 58 S> */ B(LdaSmi), U8(1), |
/* 64 E> */ B(TestEqual), R(0), U8(1), |
B(JumpIfFalse), U8(4), |
- /* 70 S> */ B(Jump), U8(19), |
+ /* 70 S> */ B(Jump), U8(20), |
/* 79 S> */ B(LdaSmi), U8(2), |
/* 85 E> */ B(TestEqual), R(0), U8(2), |
B(JumpIfFalse), U8(4), |
/* 91 S> */ B(Jump), U8(8), |
/* 103 S> */ B(AddSmi), U8(1), R(0), U8(3), |
B(Star), R(0), |
- B(Jump), U8(-25), |
+ B(JumpLoop), U8(-25), U8(0), |
B(LdaUndefined), |
/* 116 S> */ B(Return), |
] |
@@ -438,7 +440,7 @@ snippet: " |
" |
frame size: 1 |
parameter count: 1 |
-bytecode array length: 33 |
+bytecode array length: 34 |
bytecodes: [ |
/* 30 E> */ B(StackCheck), |
/* 47 S> */ B(LdaZero), |
@@ -447,14 +449,14 @@ bytecodes: [ |
/* 56 S> */ B(LdaSmi), U8(1), |
/* 62 E> */ B(TestEqual), R(0), U8(1), |
B(JumpIfFalse), U8(4), |
- /* 68 S> */ B(Jump), U8(19), |
+ /* 68 S> */ B(Jump), U8(20), |
/* 77 S> */ B(LdaSmi), U8(2), |
/* 83 E> */ B(TestEqual), R(0), U8(2), |
B(JumpIfFalse), U8(4), |
/* 89 S> */ B(Jump), U8(8), |
/* 101 S> */ B(AddSmi), U8(1), R(0), U8(3), |
B(Star), R(0), |
- B(Jump), U8(-25), |
+ B(JumpLoop), U8(-25), U8(0), |
B(LdaUndefined), |
/* 114 S> */ B(Return), |
] |
@@ -473,7 +475,7 @@ snippet: " |
" |
frame size: 1 |
parameter count: 1 |
-bytecode array length: 33 |
+bytecode array length: 34 |
bytecodes: [ |
/* 30 E> */ B(StackCheck), |
/* 42 S> */ B(LdaZero), |
@@ -482,14 +484,14 @@ bytecodes: [ |
/* 68 S> */ B(LdaSmi), U8(1), |
/* 74 E> */ B(TestEqual), R(0), U8(2), |
B(JumpIfFalse), U8(4), |
- /* 80 S> */ B(Jump), U8(19), |
+ /* 80 S> */ B(Jump), U8(20), |
/* 89 S> */ B(LdaSmi), U8(2), |
/* 95 E> */ B(TestEqual), R(0), U8(3), |
B(JumpIfFalse), U8(4), |
/* 101 S> */ B(Jump), U8(2), |
/* 55 S> */ B(AddSmi), U8(1), R(0), U8(1), |
B(Star), R(0), |
- B(Jump), U8(-25), |
+ B(JumpLoop), U8(-25), U8(0), |
B(LdaUndefined), |
/* 113 S> */ B(Return), |
] |
@@ -507,7 +509,7 @@ snippet: " |
" |
frame size: 1 |
parameter count: 1 |
-bytecode array length: 33 |
+bytecode array length: 34 |
bytecodes: [ |
/* 30 E> */ B(StackCheck), |
/* 47 S> */ B(LdaZero), |
@@ -516,14 +518,14 @@ bytecodes: [ |
/* 66 S> */ B(LdaSmi), U8(1), |
/* 72 E> */ B(TestEqual), R(0), U8(2), |
B(JumpIfFalse), U8(4), |
- /* 78 S> */ B(Jump), U8(19), |
+ /* 78 S> */ B(Jump), U8(20), |
/* 87 S> */ B(LdaSmi), U8(2), |
/* 93 E> */ B(TestEqual), R(0), U8(3), |
B(JumpIfFalse), U8(4), |
/* 99 S> */ B(Jump), U8(2), |
/* 53 S> */ B(AddSmi), U8(1), R(0), U8(1), |
B(Star), R(0), |
- B(Jump), U8(-25), |
+ B(JumpLoop), U8(-25), U8(0), |
B(LdaUndefined), |
/* 111 S> */ B(Return), |
] |
@@ -542,7 +544,7 @@ snippet: " |
" |
frame size: 2 |
parameter count: 1 |
-bytecode array length: 33 |
+bytecode array length: 34 |
bytecodes: [ |
/* 30 E> */ B(StackCheck), |
/* 42 S> */ B(LdaZero), |
@@ -551,14 +553,14 @@ bytecodes: [ |
B(Star), R(1), |
/* 63 S> */ B(LdaSmi), U8(100), |
/* 63 E> */ B(TestLessThan), R(1), U8(1), |
- B(JumpIfFalse), U8(19), |
+ B(JumpIfFalse), U8(20), |
/* 45 E> */ B(StackCheck), |
/* 85 S> */ B(AddSmi), U8(1), R(0), U8(3), |
B(Star), R(0), |
/* 98 S> */ B(Jump), U8(2), |
/* 72 S> */ B(AddSmi), U8(1), R(1), U8(2), |
B(Star), R(1), |
- B(Jump), U8(-22), |
+ B(JumpLoop), U8(-22), U8(0), |
B(LdaUndefined), |
/* 110 S> */ B(Return), |
] |
@@ -577,7 +579,7 @@ snippet: " |
" |
frame size: 2 |
parameter count: 1 |
-bytecode array length: 32 |
+bytecode array length: 33 |
bytecodes: [ |
/* 30 E> */ B(StackCheck), |
/* 42 S> */ B(LdaSmi), U8(1), |
@@ -585,7 +587,7 @@ bytecodes: [ |
/* 58 S> */ B(LdaSmi), U8(10), |
B(Star), R(1), |
/* 62 S> */ B(Ldar), R(1), |
- B(JumpIfToBooleanFalse), U8(18), |
+ B(JumpIfToBooleanFalse), U8(19), |
/* 45 E> */ B(StackCheck), |
/* 74 S> */ B(LdaSmi), U8(12), |
B(Mul), R(0), U8(2), |
@@ -593,7 +595,7 @@ bytecodes: [ |
/* 67 S> */ B(Ldar), R(1), |
B(Dec), U8(1), |
B(Star), R(1), |
- B(Jump), U8(-18), |
+ B(JumpLoop), U8(-18), U8(0), |
/* 88 S> */ B(Ldar), R(0), |
/* 98 S> */ B(Return), |
] |
@@ -638,7 +640,7 @@ snippet: " |
" |
frame size: 2 |
parameter count: 1 |
-bytecode array length: 34 |
+bytecode array length: 35 |
bytecodes: [ |
/* 30 E> */ B(StackCheck), |
/* 42 S> */ B(LdaZero), |
@@ -651,11 +653,11 @@ bytecodes: [ |
/* 89 S> */ B(LdaSmi), U8(20), |
/* 95 E> */ B(TestEqual), R(0), U8(3), |
B(JumpIfFalse), U8(4), |
- /* 102 S> */ B(Jump), U8(10), |
+ /* 102 S> */ B(Jump), U8(11), |
/* 69 S> */ B(Ldar), R(1), |
B(Inc), U8(1), |
B(Star), R(1), |
- B(Jump), U8(-22), |
+ B(JumpLoop), U8(-22), U8(0), |
/* 112 S> */ B(Ldar), R(0), |
/* 122 S> */ B(Return), |
] |
@@ -678,13 +680,13 @@ snippet: " |
" |
frame size: 6 |
parameter count: 1 |
-bytecode array length: 103 |
+bytecode array length: 104 |
bytecodes: [ |
/* 30 E> */ B(StackCheck), |
/* 42 S> */ B(LdaZero), |
B(Star), R(1), |
/* 52 S> */ B(Ldar), R(1), |
- B(JumpIfToBooleanFalse), U8(95), |
+ B(JumpIfToBooleanFalse), U8(96), |
/* 45 E> */ B(StackCheck), |
B(Ldar), R(closure), |
B(CreateBlockContext), U8(0), |
@@ -720,7 +722,7 @@ bytecodes: [ |
B(Ldar), R(4), |
B(StaContextSlot), R(context), U8(4), U8(0), |
B(PopContext), R(3), |
- B(Jump), U8(-95), |
+ B(JumpLoop), U8(-95), U8(0), |
B(LdaUndefined), |
/* 137 S> */ B(Return), |
] |