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

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

Issue 2610683003: [ignition] Only initialize [[HomeObject]] for class constructors if needed (Closed)
Patch Set: Fix bytecode expectations Created 3 years, 11 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 wrap: yes 6 wrap: yes
7 7
8 --- 8 ---
9 snippet: " 9 snippet: "
10 class Person { 10 class Person {
11 constructor(name) { this.name = name; } 11 constructor(name) { this.name = name; }
12 speak() { console.log(this.name + ' is speaking.'); } 12 speak() { console.log(this.name + ' is speaking.'); }
13 } 13 }
14 " 14 "
15 frame size: 8 15 frame size: 8
16 parameter count: 1 16 parameter count: 1
17 bytecode array length: 72 17 bytecode array length: 69
18 bytecodes: [ 18 bytecodes: [
19 B(LdaTheHole), 19 B(LdaTheHole),
20 B(Star), R(2), 20 B(Star), R(2),
21 /* 30 E> */ B(StackCheck), 21 /* 30 E> */ B(StackCheck),
22 B(LdaTheHole), 22 B(LdaTheHole),
23 B(Star), R(0), 23 B(Star), R(0),
24 /* 34 S> */ B(LdaTheHole), 24 /* 34 S> */ B(CreateClosure), U8(0), U8(2),
25 B(Star), R(3), 25 B(Star), R(3),
26 B(CreateClosure), U8(0), U8(2), 26 B(LdaTheHole),
27 B(Star), R(4), 27 B(Star), R(4),
28 B(LdaSmi), U8(34), 28 B(LdaSmi), U8(34),
29 B(Star), R(5), 29 B(Star), R(6),
30 B(Wide), B(LdaSmi), U16(148), 30 B(Wide), B(LdaSmi), U16(148),
31 B(Star), R(6), 31 B(Star), R(7),
32 B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4), 32 B(Mov), R(3), R(5),
33 B(Star), R(3), 33 B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4),
34 B(LdaNamedProperty), R(3), U8(1), U8(2),
35 B(Star), R(4), 34 B(Star), R(4),
36 B(LdaConstant), U8(2), 35 B(LdaConstant), U8(1),
37 B(ToName), R(6), 36 B(ToName), R(6),
38 B(CreateClosure), U8(3), U8(2), 37 B(CreateClosure), U8(2), U8(2),
39 B(Star), R(7), 38 B(Star), R(7),
40 B(LdaSmi), U8(2), 39 B(LdaSmi), U8(2),
41 B(StaDataPropertyInLiteral), R(4), R(6), R(7), U8(1), 40 B(StaDataPropertyInLiteral), R(4), R(6), R(7), U8(1),
42 B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(3), U 8(1), 41 B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(3), U 8(1),
43 B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1), 42 B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1),
44 B(Star), R(0), 43 B(Star), R(0),
45 B(Star), R(1), 44 B(Star), R(1),
46 B(Star), R(2), 45 B(Star), R(2),
47 B(LdaUndefined), 46 B(LdaUndefined),
48 /* 149 S> */ B(Return), 47 /* 149 S> */ B(Return),
49 ] 48 ]
50 constant pool: [ 49 constant pool: [
51 SHARED_FUNCTION_INFO_TYPE, 50 SHARED_FUNCTION_INFO_TYPE,
52 ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"],
53 ONE_BYTE_INTERNALIZED_STRING_TYPE ["speak"], 51 ONE_BYTE_INTERNALIZED_STRING_TYPE ["speak"],
54 SHARED_FUNCTION_INFO_TYPE, 52 SHARED_FUNCTION_INFO_TYPE,
55 ] 53 ]
56 handlers: [ 54 handlers: [
57 ] 55 ]
58 56
59 --- 57 ---
60 snippet: " 58 snippet: "
61 class person { 59 class person {
62 constructor(name) { this.name = name; } 60 constructor(name) { this.name = name; }
63 speak() { console.log(this.name + ' is speaking.'); } 61 speak() { console.log(this.name + ' is speaking.'); }
64 } 62 }
65 " 63 "
66 frame size: 8 64 frame size: 8
67 parameter count: 1 65 parameter count: 1
68 bytecode array length: 72 66 bytecode array length: 69
69 bytecodes: [ 67 bytecodes: [
70 B(LdaTheHole), 68 B(LdaTheHole),
71 B(Star), R(2), 69 B(Star), R(2),
72 /* 30 E> */ B(StackCheck), 70 /* 30 E> */ B(StackCheck),
73 B(LdaTheHole), 71 B(LdaTheHole),
74 B(Star), R(0), 72 B(Star), R(0),
75 /* 34 S> */ B(LdaTheHole), 73 /* 34 S> */ B(CreateClosure), U8(0), U8(2),
76 B(Star), R(3), 74 B(Star), R(3),
77 B(CreateClosure), U8(0), U8(2), 75 B(LdaTheHole),
78 B(Star), R(4), 76 B(Star), R(4),
79 B(LdaSmi), U8(34), 77 B(LdaSmi), U8(34),
80 B(Star), R(5), 78 B(Star), R(6),
81 B(Wide), B(LdaSmi), U16(148), 79 B(Wide), B(LdaSmi), U16(148),
82 B(Star), R(6), 80 B(Star), R(7),
83 B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4), 81 B(Mov), R(3), R(5),
84 B(Star), R(3), 82 B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4),
85 B(LdaNamedProperty), R(3), U8(1), U8(2),
86 B(Star), R(4), 83 B(Star), R(4),
87 B(LdaConstant), U8(2), 84 B(LdaConstant), U8(1),
88 B(ToName), R(6), 85 B(ToName), R(6),
89 B(CreateClosure), U8(3), U8(2), 86 B(CreateClosure), U8(2), U8(2),
90 B(Star), R(7), 87 B(Star), R(7),
91 B(LdaSmi), U8(2), 88 B(LdaSmi), U8(2),
92 B(StaDataPropertyInLiteral), R(4), R(6), R(7), U8(1), 89 B(StaDataPropertyInLiteral), R(4), R(6), R(7), U8(1),
93 B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(3), U 8(1), 90 B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(3), U 8(1),
94 B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1), 91 B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1),
95 B(Star), R(0), 92 B(Star), R(0),
96 B(Star), R(1), 93 B(Star), R(1),
97 B(Star), R(2), 94 B(Star), R(2),
98 B(LdaUndefined), 95 B(LdaUndefined),
99 /* 149 S> */ B(Return), 96 /* 149 S> */ B(Return),
100 ] 97 ]
101 constant pool: [ 98 constant pool: [
102 SHARED_FUNCTION_INFO_TYPE, 99 SHARED_FUNCTION_INFO_TYPE,
103 ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"],
104 ONE_BYTE_INTERNALIZED_STRING_TYPE ["speak"], 100 ONE_BYTE_INTERNALIZED_STRING_TYPE ["speak"],
105 SHARED_FUNCTION_INFO_TYPE, 101 SHARED_FUNCTION_INFO_TYPE,
106 ] 102 ]
107 handlers: [ 103 handlers: [
108 ] 104 ]
109 105
110 --- 106 ---
111 snippet: " 107 snippet: "
112 var n0 = 'a'; 108 var n0 = 'a';
113 var n1 = 'b'; 109 var n1 = 'b';
114 class N { 110 class N {
115 [n0]() { return n0; } 111 [n0]() { return n0; }
116 static [n1]() { return n1; } 112 static [n1]() { return n1; }
117 } 113 }
118 " 114 "
119 frame size: 10 115 frame size: 10
120 parameter count: 1 116 parameter count: 1
121 bytecode array length: 115 117 bytecode array length: 112
122 bytecodes: [ 118 bytecodes: [
123 B(CreateFunctionContext), U8(2), 119 B(CreateFunctionContext), U8(2),
124 B(PushContext), R(3), 120 B(PushContext), R(3),
125 B(LdaTheHole), 121 B(LdaTheHole),
126 B(Star), R(2), 122 B(Star), R(2),
127 /* 30 E> */ B(StackCheck), 123 /* 30 E> */ B(StackCheck),
128 /* 43 S> */ B(LdaConstant), U8(0), 124 /* 43 S> */ B(LdaConstant), U8(0),
129 /* 43 E> */ B(StaCurrentContextSlot), U8(4), 125 /* 43 E> */ B(StaCurrentContextSlot), U8(4),
130 /* 57 S> */ B(LdaConstant), U8(1), 126 /* 57 S> */ B(LdaConstant), U8(1),
131 /* 57 E> */ B(StaCurrentContextSlot), U8(5), 127 /* 57 E> */ B(StaCurrentContextSlot), U8(5),
132 B(LdaTheHole), 128 B(LdaTheHole),
133 B(Star), R(0), 129 B(Star), R(0),
134 /* 62 S> */ B(LdaTheHole), 130 /* 62 S> */ B(CreateClosure), U8(2), U8(2),
135 B(Star), R(4), 131 B(Star), R(4),
136 B(CreateClosure), U8(2), U8(2), 132 B(LdaTheHole),
137 B(Star), R(5), 133 B(Star), R(5),
138 B(LdaSmi), U8(62), 134 B(LdaSmi), U8(62),
139 B(Star), R(6), 135 B(Star), R(7),
140 B(Wide), B(LdaSmi), U16(128), 136 B(Wide), B(LdaSmi), U16(128),
141 B(Star), R(7), 137 B(Star), R(8),
142 B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4), 138 B(Mov), R(4), R(6),
143 B(Star), R(4), 139 B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(4),
144 B(LdaNamedProperty), R(4), U8(3), U8(2),
145 B(Star), R(5), 140 B(Star), R(5),
146 B(LdaCurrentContextSlot), U8(4), 141 B(LdaCurrentContextSlot), U8(4),
147 /* 75 E> */ B(ToName), R(7), 142 /* 75 E> */ B(ToName), R(7),
148 B(CreateClosure), U8(4), U8(2), 143 B(CreateClosure), U8(3), U8(2),
149 B(Star), R(8), 144 B(Star), R(8),
150 B(LdaSmi), U8(2), 145 B(LdaSmi), U8(2),
151 B(StaDataPropertyInLiteral), R(5), R(7), R(8), U8(3), 146 B(StaDataPropertyInLiteral), R(5), R(7), R(8), U8(3),
152 B(Star), R(9), 147 B(Star), R(9),
153 B(LdaCurrentContextSlot), U8(5), 148 B(LdaCurrentContextSlot), U8(5),
154 /* 106 E> */ B(ToName), R(7), 149 /* 106 E> */ B(ToName), R(7),
155 B(LdaConstant), U8(3), 150 B(LdaConstant), U8(4),
156 B(TestEqualStrict), R(7), U8(0), 151 B(TestEqualStrict), R(7), U8(0),
157 B(Mov), R(4), R(6), 152 B(Mov), R(4), R(6),
158 B(JumpIfToBooleanFalse), U8(7), 153 B(JumpIfToBooleanFalse), U8(7),
159 B(CallRuntime), U16(Runtime::kThrowStaticPrototypeError), R(0), U8(0), 154 B(CallRuntime), U16(Runtime::kThrowStaticPrototypeError), R(0), U8(0),
160 B(CreateClosure), U8(5), U8(2), 155 B(CreateClosure), U8(5), U8(2),
161 B(Star), R(8), 156 B(Star), R(8),
162 B(StaDataPropertyInLiteral), R(6), R(7), R(8), U8(3), 157 B(StaDataPropertyInLiteral), R(6), R(7), R(8), U8(3),
163 B(CallRuntime), U16(Runtime::kInstallClassNameAccessorWithCheck) , R(4), U8(1), 158 B(CallRuntime), U16(Runtime::kInstallClassNameAccessorWithCheck) , R(4), U8(1),
164 B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1), 159 B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1),
165 B(Star), R(0), 160 B(Star), R(0),
166 B(Star), R(1), 161 B(Star), R(1),
167 B(Star), R(2), 162 B(Star), R(2),
168 B(LdaUndefined), 163 B(LdaUndefined),
169 /* 129 S> */ B(Return), 164 /* 129 S> */ B(Return),
170 ] 165 ]
171 constant pool: [ 166 constant pool: [
172 ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"], 167 ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"],
173 ONE_BYTE_INTERNALIZED_STRING_TYPE ["b"], 168 ONE_BYTE_INTERNALIZED_STRING_TYPE ["b"],
174 SHARED_FUNCTION_INFO_TYPE, 169 SHARED_FUNCTION_INFO_TYPE,
170 SHARED_FUNCTION_INFO_TYPE,
175 ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"], 171 ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"],
176 SHARED_FUNCTION_INFO_TYPE, 172 SHARED_FUNCTION_INFO_TYPE,
177 SHARED_FUNCTION_INFO_TYPE,
178 ] 173 ]
179 handlers: [ 174 handlers: [
180 ] 175 ]
181 176
182 --- 177 ---
183 snippet: " 178 snippet: "
184 var count = 0; 179 var count = 0;
185 class C { constructor() { count++; }} 180 class C { constructor() { count++; }}
186 return new C(); 181 return new C();
187 " 182 "
188 frame size: 8 183 frame size: 9
189 parameter count: 1 184 parameter count: 1
190 bytecode array length: 66 185 bytecode array length: 63
191 bytecodes: [ 186 bytecodes: [
192 B(CreateFunctionContext), U8(1), 187 B(CreateFunctionContext), U8(1),
193 B(PushContext), R(3), 188 B(PushContext), R(3),
194 B(LdaTheHole), 189 B(LdaTheHole),
195 B(Star), R(2), 190 B(Star), R(2),
196 /* 30 E> */ B(StackCheck), 191 /* 30 E> */ B(StackCheck),
197 /* 46 S> */ B(LdaZero), 192 /* 46 S> */ B(LdaZero),
198 /* 46 E> */ B(StaCurrentContextSlot), U8(4), 193 /* 46 E> */ B(StaCurrentContextSlot), U8(4),
199 B(LdaTheHole), 194 B(LdaTheHole),
200 B(Star), R(0), 195 B(Star), R(0),
201 /* 49 S> */ B(LdaTheHole), 196 /* 49 S> */ B(CreateClosure), U8(0), U8(2),
202 B(Star), R(4), 197 B(Star), R(4),
203 B(CreateClosure), U8(0), U8(2), 198 B(LdaTheHole),
204 B(Star), R(5), 199 B(Star), R(5),
205 B(LdaSmi), U8(49), 200 B(LdaSmi), U8(49),
206 B(Star), R(6), 201 B(Star), R(7),
207 B(LdaSmi), U8(86), 202 B(LdaSmi), U8(86),
208 B(Star), R(7), 203 B(Star), R(8),
209 B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4), 204 B(Mov), R(4), R(6),
210 B(Star), R(4), 205 B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(4),
211 B(LdaNamedProperty), R(4), U8(1), U8(2),
212 B(Star), R(5), 206 B(Star), R(5),
213 B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(4), U 8(1), 207 B(CallRuntime), U16(Runtime::kInstallClassNameAccessor), R(4), U 8(1),
214 B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1), 208 B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1),
215 B(Star), R(0), 209 B(Star), R(0),
216 B(Star), R(1), 210 B(Star), R(1),
217 B(Star), R(2), 211 B(Star), R(2),
218 /* 87 S> */ B(Nop), 212 /* 87 S> */ B(Nop),
219 /* 94 E> */ B(New), R(2), R(0), U8(0), U8(4), 213 /* 94 E> */ B(New), R(2), R(0), U8(0), U8(2),
220 /* 103 S> */ B(Return), 214 /* 103 S> */ B(Return),
221 ] 215 ]
222 constant pool: [ 216 constant pool: [
223 SHARED_FUNCTION_INFO_TYPE, 217 SHARED_FUNCTION_INFO_TYPE,
224 ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"],
225 ] 218 ]
226 handlers: [ 219 handlers: [
227 ] 220 ]
228 221
229 --- 222 ---
230 snippet: " 223 snippet: "
231 (class {}) 224 (class {})
232 class E { static name () {}} 225 class E { static name () {}}
233 " 226 "
234 frame size: 9 227 frame size: 9
235 parameter count: 1 228 parameter count: 1
236 bytecode array length: 101 229 bytecode array length: 95
237 bytecodes: [ 230 bytecodes: [
238 B(LdaTheHole), 231 B(LdaTheHole),
239 B(Star), R(3), 232 B(Star), R(3),
240 /* 30 E> */ B(StackCheck), 233 /* 30 E> */ B(StackCheck),
241 /* 35 S> */ B(LdaTheHole), 234 /* 35 S> */ B(CreateClosure), U8(0), U8(2),
242 B(Star), R(4), 235 B(Star), R(4),
243 B(CreateClosure), U8(0), U8(2), 236 B(LdaTheHole),
244 B(Star), R(5), 237 B(Star), R(5),
245 B(LdaSmi), U8(35), 238 B(LdaSmi), U8(35),
246 B(Star), R(6), 239 B(Star), R(7),
247 B(LdaSmi), U8(43), 240 B(LdaSmi), U8(43),
248 B(Star), R(7), 241 B(Star), R(8),
249 B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4), 242 B(Mov), R(4), R(6),
250 B(Star), R(4), 243 B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(4),
251 B(LdaNamedProperty), R(4), U8(1), U8(2),
252 B(Star), R(5), 244 B(Star), R(5),
253 B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1), 245 B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1),
254 B(Star), R(1), 246 B(Star), R(1),
255 B(LdaTheHole), 247 B(LdaTheHole),
256 B(Star), R(0), 248 B(Star), R(0),
257 /* 45 S> */ B(LdaTheHole), 249 /* 45 S> */ B(CreateClosure), U8(1), U8(2),
258 B(Star), R(4), 250 B(Star), R(4),
259 B(CreateClosure), U8(2), U8(2), 251 B(LdaTheHole),
260 B(Star), R(5), 252 B(Star), R(5),
261 B(LdaSmi), U8(45), 253 B(LdaSmi), U8(45),
262 B(Star), R(6), 254 B(Star), R(7),
263 B(LdaSmi), U8(73), 255 B(LdaSmi), U8(73),
264 B(Star), R(7), 256 B(Star), R(8),
265 B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4), 257 B(Mov), R(4), R(6),
266 B(Star), R(4), 258 B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(4),
267 B(LdaNamedProperty), R(4), U8(1), U8(4),
268 B(Star), R(5), 259 B(Star), R(5),
269 B(LdaConstant), U8(3), 260 B(LdaConstant), U8(2),
270 B(ToName), R(7), 261 B(ToName), R(7),
271 B(CreateClosure), U8(4), U8(2), 262 B(CreateClosure), U8(3), U8(2),
272 B(Star), R(8), 263 B(Star), R(8),
273 B(LdaSmi), U8(2), 264 B(LdaSmi), U8(2),
274 B(StaDataPropertyInLiteral), R(4), R(7), R(8), U8(1), 265 B(StaDataPropertyInLiteral), R(6), R(7), R(8), U8(1),
275 B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1), 266 B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1),
276 B(Star), R(0), 267 B(Star), R(0),
277 B(Star), R(2), 268 B(Star), R(2),
278 B(Star), R(3), 269 B(Star), R(3),
279 B(LdaUndefined), 270 B(LdaUndefined),
280 /* 74 S> */ B(Return), 271 /* 74 S> */ B(Return),
281 ] 272 ]
282 constant pool: [ 273 constant pool: [
283 SHARED_FUNCTION_INFO_TYPE, 274 SHARED_FUNCTION_INFO_TYPE,
284 ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"],
285 SHARED_FUNCTION_INFO_TYPE, 275 SHARED_FUNCTION_INFO_TYPE,
286 ONE_BYTE_INTERNALIZED_STRING_TYPE ["name"], 276 ONE_BYTE_INTERNALIZED_STRING_TYPE ["name"],
287 SHARED_FUNCTION_INFO_TYPE, 277 SHARED_FUNCTION_INFO_TYPE,
288 ] 278 ]
289 handlers: [ 279 handlers: [
290 ] 280 ]
291 281
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698