OLD | NEW |
1 # | 1 # |
2 # Autogenerated by generate-bytecode-expectations. | 2 # Autogenerated by generate-bytecode-expectations. |
3 # | 3 # |
4 | 4 |
5 --- | 5 --- |
6 pool type: mixed | 6 pool type: mixed |
7 execute: yes | 7 execute: yes |
8 wrap: yes | 8 wrap: yes |
9 | 9 |
10 --- | 10 --- |
11 snippet: " | 11 snippet: " |
12 var x = 0; | 12 var x = 0; |
13 label: { | 13 label: { |
14 x = x + 1; | 14 x = x + 1; |
15 break label; | 15 break label; |
16 x = x + 1; | 16 x = x + 1; |
17 } | 17 } |
18 return x; | 18 return x; |
19 " | 19 " |
20 frame size: 2 | 20 frame size: 2 |
21 parameter count: 1 | 21 parameter count: 1 |
22 bytecode array length: 17 | 22 bytecode array length: 17 |
23 bytecodes: [ | 23 bytecodes: [ |
24 B(StackCheck), | 24 /* 30 E> */ B(StackCheck), |
25 B(LdaZero), | 25 /* 42 S> */ B(LdaZero), |
26 B(Star), R(0), | 26 /* 42 E> */ B(Star), R(0), |
27 B(Star), R(1), | 27 /* 56 S> */ B(Star), R(1), |
28 B(LdaSmi), U8(1), | 28 B(LdaSmi), U8(1), |
29 B(Add), R(1), | 29 B(Add), R(1), |
30 B(Star), R(0), | 30 /* 58 E> */ B(Star), R(0), |
31 B(Jump), U8(2), | 31 /* 69 S> */ B(Jump), U8(2), |
32 B(Ldar), R(0), | 32 /* 97 S> */ B(Ldar), R(0), |
33 B(Return), | 33 /* 107 S> */ B(Return), |
34 ] | 34 ] |
35 constant pool: [ | 35 constant pool: [ |
36 ] | 36 ] |
37 handlers: [ | 37 handlers: [ |
38 ] | 38 ] |
39 | 39 |
40 --- | 40 --- |
41 snippet: " | 41 snippet: " |
42 var sum = 0; | 42 var sum = 0; |
43 outer: { | 43 outer: { |
44 for (var x = 0; x < 10; ++x) { | 44 for (var x = 0; x < 10; ++x) { |
45 for (var y = 0; y < 3; ++y) { | 45 for (var y = 0; y < 3; ++y) { |
46 ++sum; | 46 ++sum; |
47 if (x + y == 12) { break outer; } | 47 if (x + y == 12) { break outer; } |
48 } | 48 } |
49 } | 49 } |
50 } | 50 } |
51 return sum; | 51 return sum; |
52 " | 52 " |
53 frame size: 5 | 53 frame size: 5 |
54 parameter count: 1 | 54 parameter count: 1 |
55 bytecode array length: 72 | 55 bytecode array length: 72 |
56 bytecodes: [ | 56 bytecodes: [ |
57 B(StackCheck), | 57 /* 30 E> */ B(StackCheck), |
58 B(LdaZero), | 58 /* 44 S> */ B(LdaZero), |
59 B(Star), R(0), | 59 /* 44 E> */ B(Star), R(0), |
60 B(LdaZero), | 60 /* 71 S> */ B(LdaZero), |
61 B(Star), R(1), | 61 /* 71 E> */ B(Star), R(1), |
62 B(Ldar), R(1), | 62 /* 76 S> */ B(Ldar), R(1), |
63 B(Star), R(3), | 63 B(Star), R(3), |
64 B(LdaSmi), U8(10), | 64 B(LdaSmi), U8(10), |
65 B(TestLessThan), R(3), | 65 /* 76 E> */ B(TestLessThan), R(3), |
66 B(JumpIfFalse), U8(54), | 66 B(JumpIfFalse), U8(54), |
67 B(StackCheck), | 67 /* 58 E> */ B(StackCheck), |
68 B(LdaZero), | 68 /* 106 S> */ B(LdaZero), |
69 B(Star), R(2), | 69 /* 106 E> */ B(Star), R(2), |
70 B(Ldar), R(2), | 70 /* 111 S> */ B(Ldar), R(2), |
71 B(Star), R(3), | 71 B(Star), R(3), |
72 B(LdaSmi), U8(3), | 72 B(LdaSmi), U8(3), |
73 B(TestLessThan), R(3), | 73 /* 111 E> */ B(TestLessThan), R(3), |
74 B(JumpIfFalse), U8(33), | 74 B(JumpIfFalse), U8(33), |
75 B(StackCheck), | 75 /* 93 E> */ B(StackCheck), |
76 B(Ldar), R(0), | 76 /* 129 S> */ B(Ldar), R(0), |
77 B(Inc), | 77 B(Inc), |
78 B(Star), R(0), | 78 /* 131 E> */ B(Star), R(0), |
79 B(Ldar), R(1), | 79 /* 142 S> */ B(Ldar), R(1), |
80 B(Star), R(3), | 80 B(Star), R(3), |
81 B(Ldar), R(2), | 81 /* 150 E> */ B(Ldar), R(2), |
82 B(Add), R(3), | 82 B(Add), R(3), |
83 B(Star), R(4), | 83 B(Star), R(4), |
84 B(LdaSmi), U8(12), | 84 B(LdaSmi), U8(12), |
85 B(TestEqual), R(4), | 85 /* 152 E> */ B(TestEqual), R(4), |
86 B(JumpIfFalse), U8(4), | 86 B(JumpIfFalse), U8(4), |
87 B(Jump), U8(16), | 87 /* 161 S> */ B(Jump), U8(16), |
88 B(Ldar), R(2), | 88 /* 118 S> */ B(Ldar), R(2), |
89 B(Inc), | 89 B(Inc), |
90 B(Star), R(2), | 90 /* 118 E> */ B(Star), R(2), |
91 B(Jump), U8(-39), | 91 B(Jump), U8(-39), |
92 B(Ldar), R(1), | 92 /* 84 S> */ B(Ldar), R(1), |
93 B(Inc), | 93 B(Inc), |
94 B(Star), R(1), | 94 /* 84 E> */ B(Star), R(1), |
95 B(Jump), U8(-60), | 95 B(Jump), U8(-60), |
96 B(Ldar), R(0), | 96 /* 188 S> */ B(Ldar), R(0), |
97 B(Return), | 97 /* 200 S> */ B(Return), |
98 ] | 98 ] |
99 constant pool: [ | 99 constant pool: [ |
100 ] | 100 ] |
101 handlers: [ | 101 handlers: [ |
102 ] | 102 ] |
103 | 103 |
104 --- | 104 --- |
105 snippet: " | 105 snippet: " |
106 outer: { | 106 outer: { |
107 let y = 10; | 107 let y = 10; |
108 function f() { return y; } | 108 function f() { return y; } |
109 break outer; | 109 break outer; |
110 } | 110 } |
111 " | 111 " |
112 frame size: 5 | 112 frame size: 5 |
113 parameter count: 1 | 113 parameter count: 1 |
114 bytecode array length: 51 | 114 bytecode array length: 51 |
115 bytecodes: [ | 115 bytecodes: [ |
116 B(StackCheck), | 116 /* 30 E> */ B(StackCheck), |
117 B(LdaConstant), U8(0), | 117 B(LdaConstant), U8(0), |
118 B(Star), R(3), | 118 B(Star), R(3), |
119 B(Ldar), R(closure), | 119 B(Ldar), R(closure), |
120 B(Star), R(4), | 120 B(Star), R(4), |
121 B(CallRuntime), U16(Runtime::kPushBlockContext), R(3), U8(2), | 121 B(CallRuntime), U16(Runtime::kPushBlockContext), R(3), U8(2), |
122 B(PushContext), R(2), | 122 B(PushContext), R(2), |
123 B(LdaTheHole), | 123 B(LdaTheHole), |
124 B(StaContextSlot), R(context), U8(4), | 124 B(StaContextSlot), R(context), U8(4), |
125 B(CreateClosure), U8(1), U8(0), | 125 B(CreateClosure), U8(1), U8(0), |
126 B(Star), R(0), | 126 B(Star), R(0), |
127 B(LdaSmi), U8(10), | 127 /* 53 S> */ B(LdaSmi), U8(10), |
128 B(StaContextSlot), R(context), U8(4), | 128 /* 53 E> */ B(StaContextSlot), R(context), U8(4), |
129 B(Ldar), R(0), | 129 B(Ldar), R(0), |
130 B(JumpIfNotHole), U8(11), | 130 B(JumpIfNotHole), U8(11), |
131 B(LdaConstant), U8(2), | 131 B(LdaConstant), U8(2), |
132 B(Star), R(3), | 132 B(Star), R(3), |
133 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1), | 133 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1), |
134 B(Star), R(1), | 134 B(Star), R(1), |
135 B(Jump), U8(2), | 135 /* 88 S> */ B(Jump), U8(2), |
136 B(PopContext), R(2), | 136 B(PopContext), R(2), |
137 B(LdaUndefined), | 137 B(LdaUndefined), |
138 B(Return), | 138 /* 103 S> */ B(Return), |
139 ] | 139 ] |
140 constant pool: [ | 140 constant pool: [ |
141 InstanceType::FIXED_ARRAY_TYPE, | 141 InstanceType::FIXED_ARRAY_TYPE, |
142 InstanceType::SHARED_FUNCTION_INFO_TYPE, | 142 InstanceType::SHARED_FUNCTION_INFO_TYPE, |
143 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, | 143 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
144 ] | 144 ] |
145 handlers: [ | 145 handlers: [ |
146 ] | 146 ] |
147 | 147 |
148 --- | 148 --- |
149 snippet: " | 149 snippet: " |
150 let x = 1; | 150 let x = 1; |
151 outer: { | 151 outer: { |
152 inner: { | 152 inner: { |
153 let y = 2; | 153 let y = 2; |
154 function f() { return x + y; } | 154 function f() { return x + y; } |
155 if (y) break outer; | 155 if (y) break outer; |
156 y = 3; | 156 y = 3; |
157 } | 157 } |
158 } | 158 } |
159 x = 4; | 159 x = 4; |
160 " | 160 " |
161 frame size: 6 | 161 frame size: 6 |
162 parameter count: 1 | 162 parameter count: 1 |
163 bytecode array length: 131 | 163 bytecode array length: 131 |
164 bytecodes: [ | 164 bytecodes: [ |
165 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1), | 165 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U
8(1), |
166 B(PushContext), R(2), | 166 B(PushContext), R(2), |
167 B(LdaTheHole), | 167 B(LdaTheHole), |
168 B(StaContextSlot), R(context), U8(4), | 168 B(StaContextSlot), R(context), U8(4), |
169 B(StackCheck), | 169 /* 30 E> */ B(StackCheck), |
170 B(LdaSmi), U8(1), | 170 /* 42 S> */ B(LdaSmi), U8(1), |
171 B(StaContextSlot), R(context), U8(4), | 171 /* 42 E> */ B(StaContextSlot), R(context), U8(4), |
172 B(LdaConstant), U8(0), | 172 B(LdaConstant), U8(0), |
173 B(Star), R(4), | 173 B(Star), R(4), |
174 B(Ldar), R(closure), | 174 B(Ldar), R(closure), |
175 B(Star), R(5), | 175 B(Star), R(5), |
176 B(CallRuntime), U16(Runtime::kPushBlockContext), R(4), U8(2), | 176 B(CallRuntime), U16(Runtime::kPushBlockContext), R(4), U8(2), |
177 B(PushContext), R(3), | 177 B(PushContext), R(3), |
178 B(LdaTheHole), | 178 B(LdaTheHole), |
179 B(StaContextSlot), R(context), U8(4), | 179 B(StaContextSlot), R(context), U8(4), |
180 B(CreateClosure), U8(1), U8(0), | 180 B(CreateClosure), U8(1), U8(0), |
181 B(Star), R(0), | 181 B(Star), R(0), |
182 B(LdaSmi), U8(2), | 182 /* 76 S> */ B(LdaSmi), U8(2), |
183 B(StaContextSlot), R(context), U8(4), | 183 /* 76 E> */ B(StaContextSlot), R(context), U8(4), |
184 B(Ldar), R(0), | 184 B(Ldar), R(0), |
185 B(JumpIfNotHole), U8(11), | 185 B(JumpIfNotHole), U8(11), |
186 B(LdaConstant), U8(2), | 186 B(LdaConstant), U8(2), |
187 B(Star), R(4), | 187 B(Star), R(4), |
188 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1), | 188 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1), |
189 B(Star), R(1), | 189 B(Star), R(1), |
190 B(LdaContextSlot), R(context), U8(4), | 190 /* 118 S> */ B(LdaContextSlot), R(context), U8(4), |
191 B(JumpIfNotHole), U8(11), | 191 B(JumpIfNotHole), U8(11), |
192 B(LdaConstant), U8(3), | 192 B(LdaConstant), U8(3), |
193 B(Star), R(4), | 193 B(Star), R(4), |
194 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1), | 194 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1), |
195 B(JumpIfToBooleanFalse), U8(6), | 195 B(JumpIfToBooleanFalse), U8(6), |
196 B(PopContext), R(3), | 196 /* 125 S> */ B(PopContext), R(3), |
197 B(Jump), U8(27), | 197 B(Jump), U8(27), |
198 B(LdaSmi), U8(3), | 198 /* 142 S> */ B(LdaSmi), U8(3), |
199 B(Star), R(4), | 199 /* 144 E> */ B(Star), R(4), |
200 B(LdaContextSlot), R(context), U8(4), | 200 B(LdaContextSlot), R(context), U8(4), |
201 B(JumpIfNotHole), U8(11), | 201 B(JumpIfNotHole), U8(11), |
202 B(LdaConstant), U8(3), | 202 B(LdaConstant), U8(3), |
203 B(Star), R(5), | 203 B(Star), R(5), |
204 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1), | 204 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1), |
205 B(Ldar), R(4), | 205 B(Ldar), R(4), |
206 B(StaContextSlot), R(context), U8(4), | 206 B(StaContextSlot), R(context), U8(4), |
207 B(PopContext), R(3), | 207 B(PopContext), R(3), |
208 B(LdaSmi), U8(4), | 208 /* 155 S> */ B(LdaSmi), U8(4), |
209 B(Star), R(4), | 209 /* 157 E> */ B(Star), R(4), |
210 B(LdaContextSlot), R(context), U8(4), | 210 B(LdaContextSlot), R(context), U8(4), |
211 B(JumpIfNotHole), U8(11), | 211 B(JumpIfNotHole), U8(11), |
212 B(LdaConstant), U8(4), | 212 B(LdaConstant), U8(4), |
213 B(Star), R(5), | 213 B(Star), R(5), |
214 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1), | 214 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1), |
215 B(Ldar), R(4), | 215 B(Ldar), R(4), |
216 B(StaContextSlot), R(context), U8(4), | 216 B(StaContextSlot), R(context), U8(4), |
217 B(LdaUndefined), | 217 B(LdaUndefined), |
218 B(Return), | 218 /* 162 S> */ B(Return), |
219 ] | 219 ] |
220 constant pool: [ | 220 constant pool: [ |
221 InstanceType::FIXED_ARRAY_TYPE, | 221 InstanceType::FIXED_ARRAY_TYPE, |
222 InstanceType::SHARED_FUNCTION_INFO_TYPE, | 222 InstanceType::SHARED_FUNCTION_INFO_TYPE, |
223 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, | 223 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
224 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, | 224 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
225 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, | 225 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
226 ] | 226 ] |
227 handlers: [ | 227 handlers: [ |
228 ] | 228 ] |
229 | 229 |
OLD | NEW |