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

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

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

Powered by Google App Engine
This is Rietveld 408576698