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

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

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

Powered by Google App Engine
This is Rietveld 408576698