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

Side by Side Diff: test/cctest/interpreter/ForIn.golden

Issue 1717293002: [Interpreter] Refactor bytecode generator test suite. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: std::vector instead of initializer_list, golden path as constant. Created 4 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
1 #
2 # Autogenerated by generate-bytecode-expectations
3 #
4
5 ---
6 pool type: mixed
7 execute: yes
8 wrap: yes
9
10 ---
11 snippet: "
12 for (var p in null) {}
13 "
14 frame size: 2 # in multiples of sizeof(void*)
15 parameter count: 1
16 bytecodes: [
17 B(StackCheck),
18 B(LdaUndefined),
19 B(Return),
20 ]
21 constant pool: [
22 ]
23 handlers: [
24 ]
25
26 ---
27 snippet: "
28 for (var p in undefined) {}
29 "
30 frame size: 2 # in multiples of sizeof(void*)
31 parameter count: 1
32 bytecodes: [
33 B(StackCheck),
34 B(LdaUndefined),
35 B(Return),
36 ]
37 constant pool: [
38 ]
39 handlers: [
40 ]
41
42 ---
43 snippet: "
44 for (var p in undefined) {}
45 "
46 frame size: 2 # in multiples of sizeof(void*)
47 parameter count: 1
48 bytecodes: [
49 B(StackCheck),
50 B(LdaUndefined),
51 B(Return),
52 ]
53 constant pool: [
54 ]
55 handlers: [
56 ]
57
58 ---
59 snippet: "
60 var x = 'potatoes';
61 for (var p in x) { return p; }
62 "
63 frame size: 8 # in multiples of sizeof(void*)
64 parameter count: 1
65 bytecodes: [
66 B(StackCheck),
67 B(LdaConstant), U8(0),
68 B(Star), R(1),
69 B(JumpIfUndefined), U8(39),
70 B(JumpIfNull), U8(37),
71 B(ToObject),
72 B(JumpIfNull), U8(34),
73 B(Star), R(3),
74 B(ForInPrepare), R(4),
75 B(LdaZero),
76 B(Star), R(7),
77 B(ForInDone), R(7), R(6),
78 B(JumpIfTrue), U8(22),
79 B(ForInNext), R(3), R(7), R(4),
80 B(JumpIfUndefined), U8(10),
81 B(Star), R(0),
82 B(StackCheck),
83 B(Ldar), R(0),
84 B(Star), R(2),
85 B(Return),
86 B(ForInStep), R(7),
87 B(Star), R(7),
88 B(Jump), U8(-23),
89 B(LdaUndefined),
90 B(Return),
91 ]
92 constant pool: [
93 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
94 ]
95 handlers: [
96 ]
97
98 ---
99 snippet: "
100 var x = 0;
101 for (var p in [1,2,3]) { x += p; }
102 "
103 frame size: 9 # in multiples of sizeof(void*)
104 parameter count: 1
105 bytecodes: [
106 B(StackCheck),
107 B(LdaZero),
108 B(Star), R(1),
109 B(CreateArrayLiteral), U8(0), U8(0), U8(3),
110 B(JumpIfUndefined), U8(48),
111 B(JumpIfNull), U8(46),
112 B(ToObject),
113 B(JumpIfNull), U8(43),
114 B(Star), R(3),
115 B(ForInPrepare), R(4),
116 B(LdaZero),
117 B(Star), R(7),
118 B(ForInDone), R(7), R(6),
119 B(JumpIfTrue), U8(31),
120 B(ForInNext), R(3), R(7), R(4),
121 B(JumpIfUndefined), U8(19),
122 B(Star), R(0),
123 B(StackCheck),
124 B(Ldar), R(0),
125 B(Star), R(2),
126 B(Ldar), R(1),
127 B(Star), R(8),
128 B(Ldar), R(2),
129 B(Add), R(8),
130 B(Star), R(1),
131 B(ForInStep), R(7),
132 B(Star), R(7),
133 B(Jump), U8(-32),
134 B(LdaUndefined),
135 B(Return),
136 ]
137 constant pool: [
138 InstanceType::FIXED_ARRAY_TYPE,
139 ]
140 handlers: [
141 ]
142
143 ---
144 snippet: "
145 var x = { 'a': 1, 'b': 2 };
146 for (x['a'] in [10, 20, 30]) {
147 if (x['a'] == 10) continue;
148 if (x['a'] == 20) break;
149 }
150 "
151 frame size: 8 # in multiples of sizeof(void*)
152 parameter count: 1
153 bytecodes: [
154 B(StackCheck),
155 B(CreateObjectLiteral), U8(0), U8(0), U8(9),
156 B(Star), R(1),
157 B(Star), R(0),
158 B(CreateArrayLiteral), U8(1), U8(1), U8(3),
159 B(JumpIfUndefined), U8(80),
160 B(JumpIfNull), U8(78),
161 B(ToObject),
162 B(JumpIfNull), U8(75),
163 B(Star), R(1),
164 B(ForInPrepare), R(2),
165 B(LdaZero),
166 B(Star), R(5),
167 B(ForInDone), R(5), R(4),
168 B(JumpIfTrue), U8(63),
169 B(ForInNext), R(1), R(5), R(2),
170 B(JumpIfUndefined), U8(51),
171 B(Star), R(6),
172 B(Ldar), R(0),
173 B(Star), R(7),
174 B(Ldar), R(6),
175 B(StoreICSloppy), R(7), U8(2), U8(7),
176 B(StackCheck),
177 B(Ldar), R(0),
178 B(Star), R(6),
179 B(LoadIC), R(6), U8(2), U8(3),
180 B(Star), R(7),
181 B(LdaSmi8), U8(10),
182 B(TestEqual), R(7),
183 B(JumpIfFalse), U8(4),
184 B(Jump), U8(20),
185 B(Ldar), R(0),
186 B(Star), R(6),
187 B(LoadIC), R(6), U8(2), U8(5),
188 B(Star), R(7),
189 B(LdaSmi8), U8(20),
190 B(TestEqual), R(7),
191 B(JumpIfFalse), U8(4),
192 B(Jump), U8(8),
193 B(ForInStep), R(5),
194 B(Star), R(5),
195 B(Jump), U8(-64),
196 B(LdaUndefined),
197 B(Return),
198 ]
199 constant pool: [
200 InstanceType::FIXED_ARRAY_TYPE,
201 InstanceType::FIXED_ARRAY_TYPE,
202 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
203 ]
204 handlers: [
205 ]
206
207 ---
208 snippet: "
209 var x = [ 10, 11, 12 ] ;
210 for (x[0] in [1,2,3]) { return x[3]; }
211 "
212 frame size: 9 # in multiples of sizeof(void*)
213 parameter count: 1
214 bytecodes: [
215 B(StackCheck),
216 B(CreateArrayLiteral), U8(0), U8(0), U8(3),
217 B(Star), R(0),
218 B(CreateArrayLiteral), U8(1), U8(1), U8(3),
219 B(JumpIfUndefined), U8(57),
220 B(JumpIfNull), U8(55),
221 B(ToObject),
222 B(JumpIfNull), U8(52),
223 B(Star), R(1),
224 B(ForInPrepare), R(2),
225 B(LdaZero),
226 B(Star), R(5),
227 B(ForInDone), R(5), R(4),
228 B(JumpIfTrue), U8(40),
229 B(ForInNext), R(1), R(5), R(2),
230 B(JumpIfUndefined), U8(28),
231 B(Star), R(6),
232 B(Ldar), R(0),
233 B(Star), R(7),
234 B(LdaZero),
235 B(Star), R(8),
236 B(Ldar), R(6),
237 B(KeyedStoreICSloppy), R(7), R(8), U8(5),
238 B(StackCheck),
239 B(Ldar), R(0),
240 B(Star), R(6),
241 B(LdaSmi8), U8(3),
242 B(KeyedLoadIC), R(6), U8(3),
243 B(Return),
244 B(ForInStep), R(5),
245 B(Star), R(5),
246 B(Jump), U8(-41),
247 B(LdaUndefined),
248 B(Return),
249 ]
250 constant pool: [
251 InstanceType::FIXED_ARRAY_TYPE,
252 InstanceType::FIXED_ARRAY_TYPE,
253 ]
254 handlers: [
255 ]
256
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698