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

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

Issue 2423053002: Install the 'name' property in classes at runtime (Closed)
Patch Set: Created 4 years, 2 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
1 # 1 #
2 # Autogenerated by generate-bytecode-expectations. 2 # Autogenerated by generate-bytecode-expectations.
3 # 3 #
4 4
5 --- 5 ---
6 execute: yes 6 execute: yes
7 wrap: yes 7 wrap: yes
8 8
9 --- 9 ---
10 snippet: " 10 snippet: "
11 class Person { 11 class Person {
12 constructor(name) { this.name = name; } 12 constructor(name) { this.name = name; }
13 speak() { console.log(this.name + ' is speaking.'); } 13 speak() { console.log(this.name + ' is speaking.'); }
14 } 14 }
15 " 15 "
16 frame size: 10 16 frame size: 10
17 parameter count: 1 17 parameter count: 1
18 bytecode array length: 74 18 bytecode array length: 104
19 bytecodes: [ 19 bytecodes: [
20 B(LdaTheHole), 20 B(LdaTheHole),
21 B(Star), R(2), 21 B(Star), R(2),
22 /* 30 E> */ B(StackCheck), 22 /* 30 E> */ B(StackCheck),
23 B(LdaTheHole), 23 B(LdaTheHole),
24 B(Star), R(0), 24 B(Star), R(0),
25 /* 34 S> */ B(LdaTheHole), 25 /* 34 S> */ B(LdaTheHole),
26 B(Star), R(3), 26 B(Star), R(3),
27 B(CreateClosure), U8(0), U8(2), 27 B(CreateClosure), U8(0), U8(2),
28 B(Star), R(4), 28 B(Star), R(4),
29 B(LdaSmi), U8(34), 29 B(LdaSmi), U8(34),
30 B(Star), R(5), 30 B(Star), R(5),
31 B(Wide), B(LdaSmi), U16(148), 31 B(Wide), B(LdaSmi), U16(148),
32 B(Star), R(6), 32 B(Star), R(6),
33 B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4), 33 B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
34 B(Star), R(3), 34 B(Star), R(3),
35 B(LdrNamedProperty), R(3), U8(1), U8(2), R(4), 35 B(LdrNamedProperty), R(3), U8(1), U8(2), R(4),
36 B(LdaConstant), U8(2), 36 B(LdaConstant), U8(2),
37 B(ToName), R(6), 37 B(ToName), R(6),
38 B(CreateClosure), U8(3), U8(2), 38 B(CreateClosure), U8(3), U8(2),
39 B(Star), R(7), 39 B(Star), R(7),
40 B(LdaSmi), U8(2), 40 B(LdaSmi), U8(2),
41 B(Star), R(8), 41 B(Star), R(8),
42 B(LdaZero), 42 B(LdaZero),
43 B(Star), R(9), 43 B(Star), R(9),
44 B(Mov), R(4), R(5), 44 B(Mov), R(4), R(5),
45 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5) , U8(5), 45 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5) , U8(5),
46 B(LdaConstant), U8(4),
47 B(Star), R(6),
48 B(Mov), R(3), R(5),
49 B(CallRuntime), U16(Runtime::kObjectHasOwnProperty), R(5), U8(2) ,
50 B(JumpIfToBooleanTrue), U8(18),
51 B(LdaConstant), U8(5),
52 B(Star), R(7),
53 B(LdaSmi), U8(3),
54 B(Star), R(8),
55 B(LdaZero),
56 B(Star), R(9),
57 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5) , U8(5),
46 B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1), 58 B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1),
47 B(Star), R(0), 59 B(Star), R(0),
48 B(Star), R(1), 60 B(Star), R(1),
49 B(Star), R(2), 61 B(Star), R(2),
50 B(LdaUndefined), 62 B(LdaUndefined),
51 /* 149 S> */ B(Return), 63 /* 149 S> */ B(Return),
52 ] 64 ]
53 constant pool: [ 65 constant pool: [
54 SHARED_FUNCTION_INFO_TYPE, 66 SHARED_FUNCTION_INFO_TYPE,
55 ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"], 67 ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"],
56 ONE_BYTE_INTERNALIZED_STRING_TYPE ["speak"], 68 ONE_BYTE_INTERNALIZED_STRING_TYPE ["speak"],
57 SHARED_FUNCTION_INFO_TYPE, 69 SHARED_FUNCTION_INFO_TYPE,
70 ONE_BYTE_INTERNALIZED_STRING_TYPE ["name"],
71 ONE_BYTE_INTERNALIZED_STRING_TYPE ["Person"],
58 ] 72 ]
59 handlers: [ 73 handlers: [
60 ] 74 ]
61 75
62 --- 76 ---
63 snippet: " 77 snippet: "
64 class person { 78 class person {
65 constructor(name) { this.name = name; } 79 constructor(name) { this.name = name; }
66 speak() { console.log(this.name + ' is speaking.'); } 80 speak() { console.log(this.name + ' is speaking.'); }
67 } 81 }
68 " 82 "
69 frame size: 10 83 frame size: 10
70 parameter count: 1 84 parameter count: 1
71 bytecode array length: 74 85 bytecode array length: 104
72 bytecodes: [ 86 bytecodes: [
73 B(LdaTheHole), 87 B(LdaTheHole),
74 B(Star), R(2), 88 B(Star), R(2),
75 /* 30 E> */ B(StackCheck), 89 /* 30 E> */ B(StackCheck),
76 B(LdaTheHole), 90 B(LdaTheHole),
77 B(Star), R(0), 91 B(Star), R(0),
78 /* 34 S> */ B(LdaTheHole), 92 /* 34 S> */ B(LdaTheHole),
79 B(Star), R(3), 93 B(Star), R(3),
80 B(CreateClosure), U8(0), U8(2), 94 B(CreateClosure), U8(0), U8(2),
81 B(Star), R(4), 95 B(Star), R(4),
82 B(LdaSmi), U8(34), 96 B(LdaSmi), U8(34),
83 B(Star), R(5), 97 B(Star), R(5),
84 B(Wide), B(LdaSmi), U16(148), 98 B(Wide), B(LdaSmi), U16(148),
85 B(Star), R(6), 99 B(Star), R(6),
86 B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4), 100 B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
87 B(Star), R(3), 101 B(Star), R(3),
88 B(LdrNamedProperty), R(3), U8(1), U8(2), R(4), 102 B(LdrNamedProperty), R(3), U8(1), U8(2), R(4),
89 B(LdaConstant), U8(2), 103 B(LdaConstant), U8(2),
90 B(ToName), R(6), 104 B(ToName), R(6),
91 B(CreateClosure), U8(3), U8(2), 105 B(CreateClosure), U8(3), U8(2),
92 B(Star), R(7), 106 B(Star), R(7),
93 B(LdaSmi), U8(2), 107 B(LdaSmi), U8(2),
94 B(Star), R(8), 108 B(Star), R(8),
95 B(LdaZero), 109 B(LdaZero),
96 B(Star), R(9), 110 B(Star), R(9),
97 B(Mov), R(4), R(5), 111 B(Mov), R(4), R(5),
98 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5) , U8(5), 112 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5) , U8(5),
113 B(LdaConstant), U8(4),
114 B(Star), R(6),
115 B(Mov), R(3), R(5),
116 B(CallRuntime), U16(Runtime::kObjectHasOwnProperty), R(5), U8(2) ,
117 B(JumpIfToBooleanTrue), U8(18),
118 B(LdaConstant), U8(5),
119 B(Star), R(7),
120 B(LdaSmi), U8(3),
121 B(Star), R(8),
122 B(LdaZero),
123 B(Star), R(9),
124 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5) , U8(5),
99 B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1), 125 B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1),
100 B(Star), R(0), 126 B(Star), R(0),
101 B(Star), R(1), 127 B(Star), R(1),
102 B(Star), R(2), 128 B(Star), R(2),
103 B(LdaUndefined), 129 B(LdaUndefined),
104 /* 149 S> */ B(Return), 130 /* 149 S> */ B(Return),
105 ] 131 ]
106 constant pool: [ 132 constant pool: [
107 SHARED_FUNCTION_INFO_TYPE, 133 SHARED_FUNCTION_INFO_TYPE,
108 ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"], 134 ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"],
109 ONE_BYTE_INTERNALIZED_STRING_TYPE ["speak"], 135 ONE_BYTE_INTERNALIZED_STRING_TYPE ["speak"],
110 SHARED_FUNCTION_INFO_TYPE, 136 SHARED_FUNCTION_INFO_TYPE,
137 ONE_BYTE_INTERNALIZED_STRING_TYPE ["name"],
138 ONE_BYTE_INTERNALIZED_STRING_TYPE ["person"],
111 ] 139 ]
112 handlers: [ 140 handlers: [
113 ] 141 ]
114 142
115 --- 143 ---
116 snippet: " 144 snippet: "
117 var n0 = 'a'; 145 var n0 = 'a';
118 var n1 = 'b'; 146 var n1 = 'b';
119 class N { 147 class N {
120 [n0]() { return n0; } 148 [n0]() { return n0; }
121 static [n1]() { return n1; } 149 static [n1]() { return n1; }
122 } 150 }
123 " 151 "
124 frame size: 11 152 frame size: 11
125 parameter count: 1 153 parameter count: 1
126 bytecode array length: 128 154 bytecode array length: 158
127 bytecodes: [ 155 bytecodes: [
128 B(CreateFunctionContext), U8(2), 156 B(CreateFunctionContext), U8(2),
129 B(PushContext), R(3), 157 B(PushContext), R(3),
130 B(LdaTheHole), 158 B(LdaTheHole),
131 B(Star), R(2), 159 B(Star), R(2),
132 /* 30 E> */ B(StackCheck), 160 /* 30 E> */ B(StackCheck),
133 /* 43 S> */ B(LdaConstant), U8(0), 161 /* 43 S> */ B(LdaConstant), U8(0),
134 /* 43 E> */ B(StaContextSlot), R(context), U8(4), U8(0), 162 /* 43 E> */ B(StaContextSlot), R(context), U8(4), U8(0),
135 /* 57 S> */ B(LdaConstant), U8(1), 163 /* 57 S> */ B(LdaConstant), U8(1),
136 /* 57 E> */ B(StaContextSlot), R(context), U8(5), U8(0), 164 /* 57 E> */ B(StaContextSlot), R(context), U8(5), U8(0),
(...skipping 25 matching lines...) Expand all
162 B(LdaConstant), U8(3), 190 B(LdaConstant), U8(3),
163 B(TestEqualStrict), R(7), U8(0), 191 B(TestEqualStrict), R(7), U8(0),
164 B(Mov), R(4), R(6), 192 B(Mov), R(4), R(6),
165 B(JumpIfToBooleanFalse), U8(7), 193 B(JumpIfToBooleanFalse), U8(7),
166 B(CallRuntime), U16(Runtime::kThrowStaticPrototypeError), R(0), U8(0), 194 B(CallRuntime), U16(Runtime::kThrowStaticPrototypeError), R(0), U8(0),
167 B(CreateClosure), U8(5), U8(2), 195 B(CreateClosure), U8(5), U8(2),
168 B(Star), R(8), 196 B(Star), R(8),
169 B(LdaSmi), U8(1), 197 B(LdaSmi), U8(1),
170 B(Star), R(10), 198 B(Star), R(10),
171 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(6) , U8(5), 199 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(6) , U8(5),
200 B(LdaConstant), U8(6),
201 B(Star), R(7),
202 B(Mov), R(4), R(6),
203 B(CallRuntime), U16(Runtime::kObjectHasOwnProperty), R(6), U8(2) ,
204 B(JumpIfToBooleanTrue), U8(18),
205 B(LdaConstant), U8(7),
206 B(Star), R(8),
207 B(LdaSmi), U8(3),
208 B(Star), R(9),
209 B(LdaZero),
210 B(Star), R(10),
211 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(6) , U8(5),
172 B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1), 212 B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1),
173 B(Star), R(0), 213 B(Star), R(0),
174 B(Star), R(1), 214 B(Star), R(1),
175 B(Star), R(2), 215 B(Star), R(2),
176 B(LdaUndefined), 216 B(LdaUndefined),
177 /* 129 S> */ B(Return), 217 /* 129 S> */ B(Return),
178 ] 218 ]
179 constant pool: [ 219 constant pool: [
180 ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"], 220 ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"],
181 ONE_BYTE_INTERNALIZED_STRING_TYPE ["b"], 221 ONE_BYTE_INTERNALIZED_STRING_TYPE ["b"],
182 SHARED_FUNCTION_INFO_TYPE, 222 SHARED_FUNCTION_INFO_TYPE,
183 ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"], 223 ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"],
184 SHARED_FUNCTION_INFO_TYPE, 224 SHARED_FUNCTION_INFO_TYPE,
185 SHARED_FUNCTION_INFO_TYPE, 225 SHARED_FUNCTION_INFO_TYPE,
226 ONE_BYTE_INTERNALIZED_STRING_TYPE ["name"],
227 ONE_BYTE_INTERNALIZED_STRING_TYPE ["N"],
186 ] 228 ]
187 handlers: [ 229 handlers: [
188 ] 230 ]
189 231
190 --- 232 ---
191 snippet: " 233 snippet: "
192 var count = 0; 234 var count = 0;
193 class C { constructor() { count++; }} 235 class C { constructor() { count++; }}
194 return new C(); 236 return new C();
195 " 237 "
196 frame size: 8 238 frame size: 11
197 parameter count: 1 239 parameter count: 1
198 bytecode array length: 74 240 bytecode array length: 104
199 bytecodes: [ 241 bytecodes: [
200 B(CreateFunctionContext), U8(1), 242 B(CreateFunctionContext), U8(1),
201 B(PushContext), R(3), 243 B(PushContext), R(3),
202 B(LdaTheHole), 244 B(LdaTheHole),
203 B(Star), R(2), 245 B(Star), R(2),
204 /* 30 E> */ B(StackCheck), 246 /* 30 E> */ B(StackCheck),
205 /* 46 S> */ B(LdaZero), 247 /* 46 S> */ B(LdaZero),
206 /* 46 E> */ B(StaContextSlot), R(context), U8(4), U8(0), 248 /* 46 E> */ B(StaContextSlot), R(context), U8(4), U8(0),
207 B(LdaTheHole), 249 B(LdaTheHole),
208 B(Star), R(0), 250 B(Star), R(0),
209 /* 49 S> */ B(LdaTheHole), 251 /* 49 S> */ B(LdaTheHole),
210 B(Star), R(4), 252 B(Star), R(4),
211 B(CreateClosure), U8(0), U8(2), 253 B(CreateClosure), U8(0), U8(2),
212 B(Star), R(5), 254 B(Star), R(5),
213 B(LdaSmi), U8(49), 255 B(LdaSmi), U8(49),
214 B(Star), R(6), 256 B(Star), R(6),
215 B(LdaSmi), U8(86), 257 B(LdaSmi), U8(86),
216 B(Star), R(7), 258 B(Star), R(7),
217 B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4), 259 B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4),
218 B(Star), R(4), 260 B(Star), R(4),
219 B(LdrNamedProperty), R(4), U8(1), U8(2), R(5), 261 B(LdrNamedProperty), R(4), U8(1), U8(2), R(5),
262 B(LdaConstant), U8(2),
263 B(Star), R(7),
264 B(Mov), R(4), R(6),
265 B(CallRuntime), U16(Runtime::kObjectHasOwnProperty), R(6), U8(2) ,
266 B(JumpIfToBooleanTrue), U8(18),
267 B(LdaConstant), U8(3),
268 B(Star), R(8),
269 B(LdaSmi), U8(3),
270 B(Star), R(9),
271 B(LdaZero),
272 B(Star), R(10),
273 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(6) , U8(5),
220 B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1), 274 B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1),
221 B(Star), R(0), 275 B(Star), R(0),
222 B(Star), R(1), 276 B(Star), R(1),
223 B(Star), R(2), 277 B(Star), R(2),
224 /* 87 S> */ B(JumpIfNotHole), U8(11), 278 /* 87 S> */ B(JumpIfNotHole), U8(11),
225 B(LdaConstant), U8(2), 279 B(LdaConstant), U8(3),
226 B(Star), R(5), 280 B(Star), R(5),
227 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1), 281 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1),
228 B(Star), R(4), 282 B(Star), R(4),
229 /* 94 E> */ B(New), R(4), R(0), U8(0), U8(4), 283 /* 94 E> */ B(New), R(4), R(0), U8(0), U8(4),
230 /* 103 S> */ B(Return), 284 /* 103 S> */ B(Return),
231 ] 285 ]
232 constant pool: [ 286 constant pool: [
233 SHARED_FUNCTION_INFO_TYPE, 287 SHARED_FUNCTION_INFO_TYPE,
234 ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"], 288 ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"],
289 ONE_BYTE_INTERNALIZED_STRING_TYPE ["name"],
235 ONE_BYTE_INTERNALIZED_STRING_TYPE ["C"], 290 ONE_BYTE_INTERNALIZED_STRING_TYPE ["C"],
236 ] 291 ]
237 handlers: [ 292 handlers: [
238 ] 293 ]
239 294
295 ---
296 snippet: "
297 (class {})
298 class E { static name () {}}
299 "
300 frame size: 11
301 parameter count: 1
302 bytecode array length: 137
303 bytecodes: [
304 B(LdaTheHole),
305 B(Star), R(3),
306 /* 30 E> */ B(StackCheck),
307 /* 35 S> */ B(LdaTheHole),
308 B(Star), R(4),
309 B(CreateClosure), U8(0), U8(2),
310 B(Star), R(5),
311 B(LdaSmi), U8(35),
312 B(Star), R(6),
313 B(LdaSmi), U8(43),
314 B(Star), R(7),
315 B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4),
316 B(Star), R(4),
317 B(LdrNamedProperty), R(4), U8(1), U8(2), R(5),
318 B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1),
319 B(Star), R(1),
320 B(LdaTheHole),
321 B(Star), R(0),
322 /* 45 S> */ B(LdaTheHole),
323 B(Star), R(4),
324 B(CreateClosure), U8(2), U8(2),
325 B(Star), R(5),
326 B(LdaSmi), U8(45),
327 B(Star), R(6),
328 B(LdaSmi), U8(73),
329 B(Star), R(7),
330 B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4),
331 B(Star), R(4),
332 B(LdrNamedProperty), R(4), U8(1), U8(4), R(5),
333 B(LdaConstant), U8(3),
334 B(ToName), R(7),
335 B(CreateClosure), U8(4), U8(2),
336 B(Star), R(8),
337 B(LdaSmi), U8(2),
338 B(Star), R(9),
339 B(LdaZero),
340 B(Star), R(10),
341 B(Mov), R(4), R(6),
342 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(6) , U8(5),
343 B(LdaConstant), U8(3),
344 B(Star), R(7),
345 B(Mov), R(4), R(6),
346 B(CallRuntime), U16(Runtime::kObjectHasOwnProperty), R(6), U8(2) ,
347 B(JumpIfToBooleanTrue), U8(18),
348 B(LdaConstant), U8(5),
349 B(Star), R(8),
350 B(LdaSmi), U8(3),
351 B(Star), R(9),
352 B(LdaZero),
353 B(Star), R(10),
354 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(6) , U8(5),
355 B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1),
356 B(Star), R(0),
357 B(Star), R(2),
358 B(Star), R(3),
359 B(LdaUndefined),
360 /* 74 S> */ B(Return),
361 ]
362 constant pool: [
363 SHARED_FUNCTION_INFO_TYPE,
364 ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"],
365 SHARED_FUNCTION_INFO_TYPE,
366 ONE_BYTE_INTERNALIZED_STRING_TYPE ["name"],
367 SHARED_FUNCTION_INFO_TYPE,
368 ONE_BYTE_INTERNALIZED_STRING_TYPE ["E"],
369 ]
370 handlers: [
371 ]
372
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698