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

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

Issue 2176653003: Wrap ClassLiterals in DoExpressions instead of giving them BlockScopes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: address comments Created 4 years, 4 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
« no previous file with comments | « src/parsing/parser.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 1 #
2 # Autogenerated by generate-bytecode-expectations. 2 # Autogenerated by generate-bytecode-expectations.
3 # 3 #
4 4
5 --- 5 ---
6 pool type: mixed 6 pool type: mixed
7 execute: yes 7 execute: yes
8 wrap: yes 8 wrap: yes
9 9
10 --- 10 ---
11 snippet: " 11 snippet: "
12 class Person { 12 class Person {
13 constructor(name) { this.name = name; } 13 constructor(name) { this.name = name; }
14 speak() { console.log(this.name + ' is speaking.'); } 14 speak() { console.log(this.name + ' is speaking.'); }
15 } 15 }
16 " 16 "
17 frame size: 9 17 frame size: 10
18 parameter count: 1 18 parameter count: 1
19 bytecode array length: 72 19 bytecode array length: 74
20 bytecodes: [ 20 bytecodes: [
21 B(LdaTheHole), 21 B(LdaTheHole),
22 B(Star), R(1), 22 B(Star), R(2),
23 /* 30 E> */ B(StackCheck), 23 /* 30 E> */ B(StackCheck),
24 B(LdaTheHole), 24 B(LdaTheHole),
25 B(Star), R(0), 25 B(Star), R(0),
26 B(LdaTheHole), 26 /* 34 S> */ B(LdaTheHole),
27 B(Star), R(2), 27 B(Star), R(3),
28 B(CreateClosure), U8(0), U8(2), 28 B(CreateClosure), U8(0), U8(2),
29 B(Star), R(4),
30 B(LdaSmi), U8(34),
31 B(Star), R(5),
32 B(Wide), B(LdaSmi), U16(148),
33 B(Star), R(6),
34 B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
29 B(Star), R(3), 35 B(Star), R(3),
30 B(LdaSmi), U8(34), 36 B(LdrNamedProperty), R(3), U8(1), U8(1), R(4),
31 B(Star), R(4),
32 B(Wide), B(LdaSmi), U16(148),
33 B(Star), R(5),
34 B(CallRuntime), U16(Runtime::kDefineClass), R(2), U8(4),
35 B(Star), R(2),
36 B(LdrNamedProperty), R(2), U8(1), U8(1), R(3),
37 B(LdaConstant), U8(2), 37 B(LdaConstant), U8(2),
38 B(Star), R(5), 38 B(Star), R(6),
39 B(CreateClosure), U8(3), U8(2), 39 B(CreateClosure), U8(3), U8(2),
40 B(Star), R(6), 40 B(Star), R(7),
41 B(LdaSmi), U8(2), 41 B(LdaSmi), U8(2),
42 B(Star), R(7), 42 B(Star), R(8),
43 B(LdaZero), 43 B(LdaZero),
44 B(Star), R(8), 44 B(Star), R(9),
45 B(Mov), R(3), R(4), 45 B(Mov), R(4), R(5),
46 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(4) , U8(5), 46 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5) , U8(5),
47 B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1), 47 B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1),
48 B(Star), R(0), 48 B(Star), R(0),
49 B(Star), R(1), 49 B(Star), R(1),
50 B(Star), R(2),
50 B(LdaUndefined), 51 B(LdaUndefined),
51 /* 149 S> */ B(Return), 52 /* 149 S> */ B(Return),
52 ] 53 ]
53 constant pool: [ 54 constant pool: [
54 InstanceType::SHARED_FUNCTION_INFO_TYPE, 55 InstanceType::SHARED_FUNCTION_INFO_TYPE,
55 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 56 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
56 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 57 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
57 InstanceType::SHARED_FUNCTION_INFO_TYPE, 58 InstanceType::SHARED_FUNCTION_INFO_TYPE,
58 ] 59 ]
59 handlers: [ 60 handlers: [
60 ] 61 ]
61 62
62 --- 63 ---
63 snippet: " 64 snippet: "
64 class person { 65 class person {
65 constructor(name) { this.name = name; } 66 constructor(name) { this.name = name; }
66 speak() { console.log(this.name + ' is speaking.'); } 67 speak() { console.log(this.name + ' is speaking.'); }
67 } 68 }
68 " 69 "
69 frame size: 9 70 frame size: 10
70 parameter count: 1 71 parameter count: 1
71 bytecode array length: 72 72 bytecode array length: 74
72 bytecodes: [ 73 bytecodes: [
73 B(LdaTheHole), 74 B(LdaTheHole),
74 B(Star), R(1), 75 B(Star), R(2),
75 /* 30 E> */ B(StackCheck), 76 /* 30 E> */ B(StackCheck),
76 B(LdaTheHole), 77 B(LdaTheHole),
77 B(Star), R(0), 78 B(Star), R(0),
78 B(LdaTheHole), 79 /* 34 S> */ B(LdaTheHole),
79 B(Star), R(2), 80 B(Star), R(3),
80 B(CreateClosure), U8(0), U8(2), 81 B(CreateClosure), U8(0), U8(2),
82 B(Star), R(4),
83 B(LdaSmi), U8(34),
84 B(Star), R(5),
85 B(Wide), B(LdaSmi), U16(148),
86 B(Star), R(6),
87 B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
81 B(Star), R(3), 88 B(Star), R(3),
82 B(LdaSmi), U8(34), 89 B(LdrNamedProperty), R(3), U8(1), U8(1), R(4),
83 B(Star), R(4),
84 B(Wide), B(LdaSmi), U16(148),
85 B(Star), R(5),
86 B(CallRuntime), U16(Runtime::kDefineClass), R(2), U8(4),
87 B(Star), R(2),
88 B(LdrNamedProperty), R(2), U8(1), U8(1), R(3),
89 B(LdaConstant), U8(2), 90 B(LdaConstant), U8(2),
90 B(Star), R(5), 91 B(Star), R(6),
91 B(CreateClosure), U8(3), U8(2), 92 B(CreateClosure), U8(3), U8(2),
92 B(Star), R(6), 93 B(Star), R(7),
93 B(LdaSmi), U8(2), 94 B(LdaSmi), U8(2),
94 B(Star), R(7), 95 B(Star), R(8),
95 B(LdaZero), 96 B(LdaZero),
96 B(Star), R(8), 97 B(Star), R(9),
97 B(Mov), R(3), R(4), 98 B(Mov), R(4), R(5),
98 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(4) , U8(5), 99 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5) , U8(5),
99 B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1), 100 B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1),
100 B(Star), R(0), 101 B(Star), R(0),
101 B(Star), R(1), 102 B(Star), R(1),
103 B(Star), R(2),
102 B(LdaUndefined), 104 B(LdaUndefined),
103 /* 149 S> */ B(Return), 105 /* 149 S> */ B(Return),
104 ] 106 ]
105 constant pool: [ 107 constant pool: [
106 InstanceType::SHARED_FUNCTION_INFO_TYPE, 108 InstanceType::SHARED_FUNCTION_INFO_TYPE,
107 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 109 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
108 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 110 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
109 InstanceType::SHARED_FUNCTION_INFO_TYPE, 111 InstanceType::SHARED_FUNCTION_INFO_TYPE,
110 ] 112 ]
111 handlers: [ 113 handlers: [
112 ] 114 ]
113 115
114 --- 116 ---
115 snippet: " 117 snippet: "
116 var n0 = 'a'; 118 var n0 = 'a';
117 var n1 = 'b'; 119 var n1 = 'b';
118 class N { 120 class N {
119 [n0]() { return n0; } 121 [n0]() { return n0; }
120 static [n1]() { return n1; } 122 static [n1]() { return n1; }
121 } 123 }
122 " 124 "
123 frame size: 10 125 frame size: 11
124 parameter count: 1 126 parameter count: 1
125 bytecode array length: 124 127 bytecode array length: 126
126 bytecodes: [ 128 bytecodes: [
127 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U 8(1), 129 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U 8(1),
128 B(PushContext), R(2), 130 B(PushContext), R(3),
129 B(LdaTheHole), 131 B(LdaTheHole),
130 B(Star), R(1), 132 B(Star), R(2),
131 /* 30 E> */ B(StackCheck), 133 /* 30 E> */ B(StackCheck),
132 /* 43 S> */ B(LdaConstant), U8(0), 134 /* 43 S> */ B(LdaConstant), U8(0),
133 /* 43 E> */ B(StaContextSlot), R(context), U8(4), 135 /* 43 E> */ B(StaContextSlot), R(context), U8(4),
134 /* 57 S> */ B(LdaConstant), U8(1), 136 /* 57 S> */ B(LdaConstant), U8(1),
135 /* 57 E> */ B(StaContextSlot), R(context), U8(5), 137 /* 57 E> */ B(StaContextSlot), R(context), U8(5),
136 B(LdaTheHole), 138 B(LdaTheHole),
137 B(Star), R(0), 139 B(Star), R(0),
138 B(LdaTheHole), 140 /* 62 S> */ B(LdaTheHole),
139 B(Star), R(3), 141 B(Star), R(4),
140 B(CreateClosure), U8(2), U8(2), 142 B(CreateClosure), U8(2), U8(2),
143 B(Star), R(5),
144 B(LdaSmi), U8(62),
145 B(Star), R(6),
146 B(Wide), B(LdaSmi), U16(128),
147 B(Star), R(7),
148 B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4),
141 B(Star), R(4), 149 B(Star), R(4),
142 B(LdaSmi), U8(62), 150 B(LdrNamedProperty), R(4), U8(3), U8(1), R(5),
143 B(Star), R(5),
144 B(Wide), B(LdaSmi), U16(128),
145 B(Star), R(6),
146 B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
147 B(Star), R(3),
148 B(LdrNamedProperty), R(3), U8(3), U8(1), R(4),
149 /* 75 E> */ B(LdaContextSlot), R(context), U8(4), 151 /* 75 E> */ B(LdaContextSlot), R(context), U8(4),
150 B(ToName), R(6), 152 B(ToName), R(7),
151 B(CreateClosure), U8(4), U8(2), 153 B(CreateClosure), U8(4), U8(2),
152 B(Star), R(7), 154 B(Star), R(8),
153 B(LdaSmi), U8(2), 155 B(LdaSmi), U8(2),
154 B(Star), R(8), 156 B(Star), R(9),
155 B(LdaSmi), U8(1), 157 B(LdaSmi), U8(1),
156 B(Star), R(9), 158 B(Star), R(10),
157 B(Mov), R(4), R(5), 159 B(Mov), R(5), R(6),
158 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5) , U8(5), 160 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(6) , U8(5),
159 /* 106 E> */ B(LdaContextSlot), R(context), U8(5), 161 /* 106 E> */ B(LdaContextSlot), R(context), U8(5),
160 B(ToName), R(6), 162 B(ToName), R(7),
161 B(LdaConstant), U8(3), 163 B(LdaConstant), U8(3),
162 B(TestEqualStrict), R(6), 164 B(TestEqualStrict), R(7),
163 B(Mov), R(3), R(5), 165 B(Mov), R(4), R(6),
164 B(JumpIfToBooleanFalse), U8(7), 166 B(JumpIfToBooleanFalse), U8(7),
165 B(CallRuntime), U16(Runtime::kThrowStaticPrototypeError), R(0), U8(0), 167 B(CallRuntime), U16(Runtime::kThrowStaticPrototypeError), R(0), U8(0),
166 B(CreateClosure), U8(5), U8(2), 168 B(CreateClosure), U8(5), U8(2),
167 B(Star), R(7), 169 B(Star), R(8),
168 B(LdaSmi), U8(1), 170 B(LdaSmi), U8(1),
169 B(Star), R(9), 171 B(Star), R(10),
170 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5) , U8(5), 172 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(6) , U8(5),
171 B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1), 173 B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1),
172 B(Star), R(0), 174 B(Star), R(0),
173 B(Star), R(1), 175 B(Star), R(1),
176 B(Star), R(2),
174 B(LdaUndefined), 177 B(LdaUndefined),
175 /* 129 S> */ B(Return), 178 /* 129 S> */ B(Return),
176 ] 179 ]
177 constant pool: [ 180 constant pool: [
178 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 181 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
179 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 182 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
180 InstanceType::SHARED_FUNCTION_INFO_TYPE, 183 InstanceType::SHARED_FUNCTION_INFO_TYPE,
181 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 184 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
182 InstanceType::SHARED_FUNCTION_INFO_TYPE, 185 InstanceType::SHARED_FUNCTION_INFO_TYPE,
183 InstanceType::SHARED_FUNCTION_INFO_TYPE, 186 InstanceType::SHARED_FUNCTION_INFO_TYPE,
184 ] 187 ]
185 handlers: [ 188 handlers: [
186 ] 189 ]
187 190
188 --- 191 ---
189 snippet: " 192 snippet: "
190 var count = 0; 193 var count = 0;
191 class C { constructor() { count++; }} 194 class C { constructor() { count++; }}
192 return new C(); 195 return new C();
193 " 196 "
194 frame size: 7 197 frame size: 8
195 parameter count: 1 198 parameter count: 1
196 bytecode array length: 73 199 bytecode array length: 75
197 bytecodes: [ 200 bytecodes: [
198 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U 8(1), 201 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U 8(1),
199 B(PushContext), R(2), 202 B(PushContext), R(3),
200 B(LdaTheHole), 203 B(LdaTheHole),
201 B(Star), R(1), 204 B(Star), R(2),
202 /* 30 E> */ B(StackCheck), 205 /* 30 E> */ B(StackCheck),
203 /* 46 S> */ B(LdaZero), 206 /* 46 S> */ B(LdaZero),
204 /* 46 E> */ B(StaContextSlot), R(context), U8(4), 207 /* 46 E> */ B(StaContextSlot), R(context), U8(4),
205 B(LdaTheHole), 208 B(LdaTheHole),
206 B(Star), R(0), 209 B(Star), R(0),
207 B(LdaTheHole), 210 /* 49 S> */ B(LdaTheHole),
208 B(Star), R(3), 211 B(Star), R(4),
209 B(CreateClosure), U8(0), U8(2), 212 B(CreateClosure), U8(0), U8(2),
213 B(Star), R(5),
214 B(LdaSmi), U8(49),
215 B(Star), R(6),
216 B(LdaSmi), U8(86),
217 B(Star), R(7),
218 B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(4),
210 B(Star), R(4), 219 B(Star), R(4),
211 B(LdaSmi), U8(49), 220 B(LdrNamedProperty), R(4), U8(1), U8(1), R(5),
212 B(Star), R(5), 221 B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1),
213 B(LdaSmi), U8(86),
214 B(Star), R(6),
215 B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
216 B(Star), R(3),
217 B(LdrNamedProperty), R(3), U8(1), U8(1), R(4),
218 B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1),
219 B(Star), R(0), 222 B(Star), R(0),
220 B(Star), R(1), 223 B(Star), R(1),
224 B(Star), R(2),
221 /* 87 S> */ B(JumpIfNotHole), U8(11), 225 /* 87 S> */ B(JumpIfNotHole), U8(11),
222 B(LdaConstant), U8(2), 226 B(LdaConstant), U8(2),
227 B(Star), R(5),
228 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1),
223 B(Star), R(4), 229 B(Star), R(4),
224 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1), 230 /* 94 E> */ B(New), R(4), R(0), U8(0),
225 B(Star), R(3),
226 /* 94 E> */ B(New), R(3), R(0), U8(0),
227 /* 103 S> */ B(Return), 231 /* 103 S> */ B(Return),
228 ] 232 ]
229 constant pool: [ 233 constant pool: [
230 InstanceType::SHARED_FUNCTION_INFO_TYPE, 234 InstanceType::SHARED_FUNCTION_INFO_TYPE,
231 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 235 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
232 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 236 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
233 ] 237 ]
234 handlers: [ 238 handlers: [
235 ] 239 ]
236 240
OLDNEW
« no previous file with comments | « src/parsing/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698