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

Side by Side Diff: test/cctest/interpreter/bytecode_expectations/ObjectLiterals.golden

Issue 1717293002: [Interpreter] Refactor bytecode generator test suite. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move golden files to subdir, update golden format. 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 return { };
13 "
14 frame size: 1
15 parameter count: 1
16 bytecode array length: 8
17 bytecodes: [
18 B(StackCheck),
19 B(CreateObjectLiteral), U8(0), U8(0), U8(13),
20 B(Star), R(0),
21 B(Return),
22 ]
23 constant pool: [
24 InstanceType::FIXED_ARRAY_TYPE,
25 ]
26 handlers: [
27 ]
28
29 ---
30 snippet: "
31 return { name: 'string', val: 9.2 };
32 "
33 frame size: 1
34 parameter count: 1
35 bytecode array length: 8
36 bytecodes: [
37 B(StackCheck),
38 B(CreateObjectLiteral), U8(0), U8(0), U8(9),
39 B(Star), R(0),
40 B(Return),
41 ]
42 constant pool: [
43 InstanceType::FIXED_ARRAY_TYPE,
44 ]
45 handlers: [
46 ]
47
48 ---
49 snippet: "
50 var a = 1; return { name: 'string', val: a };
51 "
52 frame size: 2
53 parameter count: 1
54 bytecode array length: 20
55 bytecodes: [
56 B(StackCheck),
57 B(LdaSmi8), U8(1),
58 B(Star), R(0),
59 B(CreateObjectLiteral), U8(0), U8(0), U8(9),
60 B(Star), R(1),
61 B(Ldar), R(0),
62 B(StoreICSloppy), R(1), U8(1), U8(1),
63 B(Ldar), R(1),
64 B(Return),
65 ]
66 constant pool: [
67 InstanceType::FIXED_ARRAY_TYPE,
68 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
69 ]
70 handlers: [
71 ]
72
73 ---
74 snippet: "
75 var a = 1; return { val: a, val: a + 1 };
76 "
77 frame size: 3
78 parameter count: 1
79 bytecode array length: 26
80 bytecodes: [
81 B(StackCheck),
82 B(LdaSmi8), U8(1),
83 B(Star), R(0),
84 B(CreateObjectLiteral), U8(0), U8(0), U8(9),
85 B(Star), R(1),
86 B(Ldar), R(0),
87 B(Star), R(2),
88 B(LdaSmi8), U8(1),
89 B(Add), R(2),
90 B(StoreICSloppy), R(1), U8(1), U8(1),
91 B(Ldar), R(1),
92 B(Return),
93 ]
94 constant pool: [
95 InstanceType::FIXED_ARRAY_TYPE,
96 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
97 ]
98 handlers: [
99 ]
100
101 ---
102 snippet: "
103 return { func: function() { } };
104 "
105 frame size: 1
106 parameter count: 1
107 bytecode array length: 17
108 bytecodes: [
109 B(StackCheck),
110 B(CreateObjectLiteral), U8(0), U8(0), U8(9),
111 B(Star), R(0),
112 B(CreateClosure), U8(1), U8(0),
113 B(StoreICSloppy), R(0), U8(2), U8(1),
114 B(Ldar), R(0),
115 B(Return),
116 ]
117 constant pool: [
118 InstanceType::FIXED_ARRAY_TYPE,
119 InstanceType::SHARED_FUNCTION_INFO_TYPE,
120 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
121 ]
122 handlers: [
123 ]
124
125 ---
126 snippet: "
127 return { func(a) { return a; } };
128 "
129 frame size: 1
130 parameter count: 1
131 bytecode array length: 17
132 bytecodes: [
133 B(StackCheck),
134 B(CreateObjectLiteral), U8(0), U8(0), U8(9),
135 B(Star), R(0),
136 B(CreateClosure), U8(1), U8(0),
137 B(StoreICSloppy), R(0), U8(2), U8(1),
138 B(Ldar), R(0),
139 B(Return),
140 ]
141 constant pool: [
142 InstanceType::FIXED_ARRAY_TYPE,
143 InstanceType::SHARED_FUNCTION_INFO_TYPE,
144 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
145 ]
146 handlers: [
147 ]
148
149 ---
150 snippet: "
151 return { get a() { return 2; } };
152 "
153 frame size: 6
154 parameter count: 1
155 bytecode array length: 33
156 bytecodes: [
157 B(StackCheck),
158 B(CreateObjectLiteral), U8(0), U8(0), U8(9),
159 B(Star), R(0),
160 B(Mov), R(0), R(1),
161 B(LdaConstant), U8(1),
162 B(Star), R(2),
163 B(CreateClosure), U8(2), U8(0),
164 B(Star), R(3),
165 B(LdaNull),
166 B(Star), R(4),
167 B(LdaZero),
168 B(Star), R(5),
169 B(CallRuntime), U16(Runtime::kDefineAccessorPropertyUnchecked), R(1), U8(5),
170 B(Ldar), R(0),
171 B(Return),
172 ]
173 constant pool: [
174 InstanceType::FIXED_ARRAY_TYPE,
175 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
176 InstanceType::SHARED_FUNCTION_INFO_TYPE,
177 ]
178 handlers: [
179 ]
180
181 ---
182 snippet: "
183 return { get a() { return this.x; }, set a(val) { this.x = val } };
184 "
185 frame size: 6
186 parameter count: 1
187 bytecode array length: 35
188 bytecodes: [
189 B(StackCheck),
190 B(CreateObjectLiteral), U8(0), U8(0), U8(9),
191 B(Star), R(0),
192 B(Mov), R(0), R(1),
193 B(LdaConstant), U8(1),
194 B(Star), R(2),
195 B(CreateClosure), U8(2), U8(0),
196 B(Star), R(3),
197 B(CreateClosure), U8(3), U8(0),
198 B(Star), R(4),
199 B(LdaZero),
200 B(Star), R(5),
201 B(CallRuntime), U16(Runtime::kDefineAccessorPropertyUnchecked), R(1), U8(5),
202 B(Ldar), R(0),
203 B(Return),
204 ]
205 constant pool: [
206 InstanceType::FIXED_ARRAY_TYPE,
207 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
208 InstanceType::SHARED_FUNCTION_INFO_TYPE,
209 InstanceType::SHARED_FUNCTION_INFO_TYPE,
210 ]
211 handlers: [
212 ]
213
214 ---
215 snippet: "
216 return { set b(val) { this.y = val } };
217 "
218 frame size: 6
219 parameter count: 1
220 bytecode array length: 33
221 bytecodes: [
222 B(StackCheck),
223 B(CreateObjectLiteral), U8(0), U8(0), U8(9),
224 B(Star), R(0),
225 B(Mov), R(0), R(1),
226 B(LdaConstant), U8(1),
227 B(Star), R(2),
228 B(LdaNull),
229 B(Star), R(3),
230 B(CreateClosure), U8(2), U8(0),
231 B(Star), R(4),
232 B(LdaZero),
233 B(Star), R(5),
234 B(CallRuntime), U16(Runtime::kDefineAccessorPropertyUnchecked), R(1), U8(5),
235 B(Ldar), R(0),
236 B(Return),
237 ]
238 constant pool: [
239 InstanceType::FIXED_ARRAY_TYPE,
240 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
241 InstanceType::SHARED_FUNCTION_INFO_TYPE,
242 ]
243 handlers: [
244 ]
245
246 ---
247 snippet: "
248 var a = 1; return { 1: a };
249 "
250 frame size: 6
251 parameter count: 1
252 bytecode array length: 33
253 bytecodes: [
254 B(StackCheck),
255 B(LdaSmi8), U8(1),
256 B(Star), R(0),
257 B(CreateObjectLiteral), U8(0), U8(0), U8(9),
258 B(Star), R(1),
259 B(Mov), R(1), R(2),
260 B(LdaSmi8), U8(1),
261 B(Star), R(3),
262 B(Ldar), R(0),
263 B(Star), R(4),
264 B(LdaZero),
265 B(Star), R(5),
266 B(CallRuntime), U16(Runtime::kSetProperty), R(2), U8(4),
267 B(Ldar), R(1),
268 B(Return),
269 ]
270 constant pool: [
271 InstanceType::FIXED_ARRAY_TYPE,
272 ]
273 handlers: [
274 ]
275
276 ---
277 snippet: "
278 return { __proto__: null }
279 "
280 frame size: 3
281 parameter count: 1
282 bytecode array length: 21
283 bytecodes: [
284 B(StackCheck),
285 B(CreateObjectLiteral), U8(0), U8(0), U8(13),
286 B(Star), R(0),
287 B(Mov), R(0), R(1),
288 B(LdaNull),
289 B(Star), R(2),
290 B(CallRuntime), U16(Runtime::kInternalSetPrototype), R(1), U8(2),
291 B(Ldar), R(0),
292 B(Return),
293 ]
294 constant pool: [
295 InstanceType::FIXED_ARRAY_TYPE,
296 ]
297 handlers: [
298 ]
299
300 ---
301 snippet: "
302 var a = 'test'; return { [a]: 1 }
303 "
304 frame size: 7
305 parameter count: 1
306 bytecode array length: 37
307 bytecodes: [
308 B(StackCheck),
309 B(LdaConstant), U8(0),
310 B(Star), R(0),
311 B(CreateObjectLiteral), U8(1), U8(0), U8(13),
312 B(Star), R(1),
313 B(Mov), R(1), R(2),
314 B(Ldar), R(0),
315 B(ToName),
316 B(Star), R(3),
317 B(LdaSmi8), U8(1),
318 B(Star), R(4),
319 B(LdaZero),
320 B(Star), R(5),
321 B(LdaZero),
322 B(Star), R(6),
323 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(2), U8(5),
324 B(Ldar), R(1),
325 B(Return),
326 ]
327 constant pool: [
328 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
329 InstanceType::FIXED_ARRAY_TYPE,
330 ]
331 handlers: [
332 ]
333
334 ---
335 snippet: "
336 var a = 'test'; return { val: a, [a]: 1 }
337 "
338 frame size: 7
339 parameter count: 1
340 bytecode array length: 43
341 bytecodes: [
342 B(StackCheck),
343 B(LdaConstant), U8(0),
344 B(Star), R(0),
345 B(CreateObjectLiteral), U8(1), U8(0), U8(9),
346 B(Star), R(1),
347 B(Ldar), R(0),
348 B(StoreICSloppy), R(1), U8(2), U8(1),
349 B(Mov), R(1), R(2),
350 B(Ldar), R(0),
351 B(ToName),
352 B(Star), R(3),
353 B(LdaSmi8), U8(1),
354 B(Star), R(4),
355 B(LdaZero),
356 B(Star), R(5),
357 B(LdaZero),
358 B(Star), R(6),
359 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(2), U8(5),
360 B(Ldar), R(1),
361 B(Return),
362 ]
363 constant pool: [
364 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
365 InstanceType::FIXED_ARRAY_TYPE,
366 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
367 ]
368 handlers: [
369 ]
370
371 ---
372 snippet: "
373 var a = 'test'; return { [a]: 1, __proto__: {} }
374 "
375 frame size: 7
376 parameter count: 1
377 bytecode array length: 53
378 bytecodes: [
379 B(StackCheck),
380 B(LdaConstant), U8(0),
381 B(Star), R(0),
382 B(CreateObjectLiteral), U8(1), U8(1), U8(13),
383 B(Star), R(1),
384 B(Mov), R(1), R(2),
385 B(Ldar), R(0),
386 B(ToName),
387 B(Star), R(3),
388 B(LdaSmi8), U8(1),
389 B(Star), R(4),
390 B(LdaZero),
391 B(Star), R(5),
392 B(LdaZero),
393 B(Star), R(6),
394 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(2), U8(5),
395 B(Mov), R(1), R(2),
396 B(CreateObjectLiteral), U8(1), U8(0), U8(13),
397 B(Star), R(4),
398 B(Star), R(3),
399 B(CallRuntime), U16(Runtime::kInternalSetPrototype), R(2), U8(2),
400 B(Ldar), R(1),
401 B(Return),
402 ]
403 constant pool: [
404 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
405 InstanceType::FIXED_ARRAY_TYPE,
406 ]
407 handlers: [
408 ]
409
410 ---
411 snippet: "
412 var n = 'name'; return { [n]: 'val', get a() { }, set a(b) {} };
413 "
414 frame size: 7
415 parameter count: 1
416 bytecode array length: 77
417 bytecodes: [
418 B(StackCheck),
419 B(LdaConstant), U8(0),
420 B(Star), R(0),
421 B(CreateObjectLiteral), U8(1), U8(0), U8(13),
422 B(Star), R(1),
423 B(Mov), R(1), R(2),
424 B(Ldar), R(0),
425 B(ToName),
426 B(Star), R(3),
427 B(LdaConstant), U8(2),
428 B(Star), R(4),
429 B(LdaZero),
430 B(Star), R(5),
431 B(LdaZero),
432 B(Star), R(6),
433 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(2), U8(5),
434 B(Mov), R(1), R(2),
435 B(LdaConstant), U8(3),
436 B(Star), R(3),
437 B(CreateClosure), U8(4), U8(0),
438 B(Star), R(4),
439 B(LdaZero),
440 B(Star), R(5),
441 B(CallRuntime), U16(Runtime::kDefineGetterPropertyUnchecked), R(2), U8(4),
442 B(Mov), R(1), R(2),
443 B(LdaConstant), U8(3),
444 B(Star), R(3),
445 B(CreateClosure), U8(5), U8(0),
446 B(Star), R(4),
447 B(LdaZero),
448 B(Star), R(5),
449 B(CallRuntime), U16(Runtime::kDefineSetterPropertyUnchecked), R(2), U8(4),
450 B(Ldar), R(1),
451 B(Return),
452 ]
453 constant pool: [
454 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
455 InstanceType::FIXED_ARRAY_TYPE,
456 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
457 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
458 InstanceType::SHARED_FUNCTION_INFO_TYPE,
459 InstanceType::SHARED_FUNCTION_INFO_TYPE,
460 ]
461 handlers: [
462 ]
463
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698