blob: c28e4742358dc0545ac850334404b574dc108164 [file] [log] [blame]
Ben Murdochda12d292016-06-02 14:46:10 +01001#
2# Autogenerated by generate-bytecode-expectations.
3#
4
5---
6pool type: mixed
7execute: yes
8wrap: yes
9
10---
11snippet: "
12 class Person {
13 constructor(name) { this.name = name; }
14 speak() { console.log(this.name + ' is speaking.'); }
15 }
16"
17frame size: 9
18parameter count: 1
Ben Murdoch61f157c2016-09-16 13:49:30 +010019bytecode array length: 72
Ben Murdochda12d292016-06-02 14:46:10 +010020bytecodes: [
Ben Murdochc5610432016-08-08 18:44:38 +010021 B(LdaTheHole),
22 B(Star), R(1),
23 /* 30 E> */ 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(LdaSmi), U8(34),
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),
Ben Murdoch61f157c2016-09-16 13:49:30 +010036 B(LdrNamedProperty), R(2), U8(1), U8(1), R(3),
Ben Murdochc5610432016-08-08 18:44:38 +010037 B(LdaConstant), U8(2),
38 B(Star), R(5),
39 B(CreateClosure), U8(3), U8(0),
40 B(Star), R(6),
41 B(LdaSmi), U8(2),
42 B(Star), R(7),
43 B(LdaZero),
44 B(Star), R(8),
Ben Murdoch61f157c2016-09-16 13:49:30 +010045 B(Mov), R(3), R(4),
Ben Murdochc5610432016-08-08 18:44:38 +010046 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(4), U8(5),
47 B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1),
48 B(Star), R(0),
Ben Murdoch61f157c2016-09-16 13:49:30 +010049 B(Star), R(1),
Ben Murdochc5610432016-08-08 18:44:38 +010050 B(LdaUndefined),
51 /* 149 S> */ B(Return),
Ben Murdochda12d292016-06-02 14:46:10 +010052]
53constant pool: [
54 InstanceType::SHARED_FUNCTION_INFO_TYPE,
55 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
56 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
57 InstanceType::SHARED_FUNCTION_INFO_TYPE,
58]
59handlers: [
60]
61
62---
63snippet: "
64 class person {
65 constructor(name) { this.name = name; }
66 speak() { console.log(this.name + ' is speaking.'); }
67 }
68"
69frame size: 9
70parameter count: 1
Ben Murdoch61f157c2016-09-16 13:49:30 +010071bytecode array length: 72
Ben Murdochda12d292016-06-02 14:46:10 +010072bytecodes: [
Ben Murdochc5610432016-08-08 18:44:38 +010073 B(LdaTheHole),
74 B(Star), R(1),
75 /* 30 E> */ B(StackCheck),
76 B(LdaTheHole),
77 B(Star), R(0),
78 B(LdaTheHole),
79 B(Star), R(2),
80 B(CreateClosure), U8(0), U8(0),
81 B(Star), R(3),
82 B(LdaSmi), U8(34),
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),
Ben Murdoch61f157c2016-09-16 13:49:30 +010088 B(LdrNamedProperty), R(2), U8(1), U8(1), R(3),
Ben Murdochc5610432016-08-08 18:44:38 +010089 B(LdaConstant), U8(2),
90 B(Star), R(5),
91 B(CreateClosure), U8(3), U8(0),
92 B(Star), R(6),
93 B(LdaSmi), U8(2),
94 B(Star), R(7),
95 B(LdaZero),
96 B(Star), R(8),
Ben Murdoch61f157c2016-09-16 13:49:30 +010097 B(Mov), R(3), R(4),
Ben Murdochc5610432016-08-08 18:44:38 +010098 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(4), U8(5),
99 B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1),
100 B(Star), R(0),
Ben Murdoch61f157c2016-09-16 13:49:30 +0100101 B(Star), R(1),
Ben Murdochc5610432016-08-08 18:44:38 +0100102 B(LdaUndefined),
103 /* 149 S> */ B(Return),
Ben Murdochda12d292016-06-02 14:46:10 +0100104]
105constant pool: [
106 InstanceType::SHARED_FUNCTION_INFO_TYPE,
107 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
108 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
109 InstanceType::SHARED_FUNCTION_INFO_TYPE,
110]
111handlers: [
112]
113
114---
115snippet: "
116 var n0 = 'a';
117 var n1 = 'b';
118 class N {
119 [n0]() { return n0; }
120 static [n1]() { return n1; }
121 }
122"
123frame size: 10
124parameter count: 1
Ben Murdoch61f157c2016-09-16 13:49:30 +0100125bytecode array length: 126
Ben Murdochda12d292016-06-02 14:46:10 +0100126bytecodes: [
Ben Murdochc5610432016-08-08 18:44:38 +0100127 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
128 B(PushContext), R(2),
129 B(LdaTheHole),
130 B(Star), R(1),
131 /* 30 E> */ B(StackCheck),
132 /* 43 S> */ B(LdaConstant), U8(0),
133 /* 43 E> */ B(StaContextSlot), R(context), U8(4),
134 /* 57 S> */ B(LdaConstant), U8(1),
135 /* 57 E> */ B(StaContextSlot), R(context), U8(5),
136 B(LdaTheHole),
137 B(Star), R(0),
138 B(LdaTheHole),
139 B(Star), R(3),
140 B(CreateClosure), U8(2), U8(0),
141 B(Star), R(4),
142 B(LdaSmi), U8(62),
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),
Ben Murdoch61f157c2016-09-16 13:49:30 +0100148 B(LdrNamedProperty), R(3), U8(3), U8(1), R(4),
Ben Murdochc5610432016-08-08 18:44:38 +0100149 /* 75 E> */ B(LdaContextSlot), R(context), U8(4),
150 B(ToName),
151 B(Star), R(6),
152 B(CreateClosure), U8(4), U8(0),
153 B(Star), R(7),
154 B(LdaSmi), U8(2),
155 B(Star), R(8),
156 B(LdaSmi), U8(1),
157 B(Star), R(9),
Ben Murdoch61f157c2016-09-16 13:49:30 +0100158 B(Mov), R(4), R(5),
Ben Murdochc5610432016-08-08 18:44:38 +0100159 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5), U8(5),
Ben Murdochc5610432016-08-08 18:44:38 +0100160 /* 106 E> */ B(LdaContextSlot), R(context), U8(5),
161 B(ToName),
162 B(Star), R(6),
163 B(LdaConstant), U8(3),
164 B(TestEqualStrict), R(6),
Ben Murdoch61f157c2016-09-16 13:49:30 +0100165 B(Mov), R(3), R(5),
166 B(JumpIfToBooleanFalse), U8(7),
Ben Murdochc5610432016-08-08 18:44:38 +0100167 B(CallRuntime), U16(Runtime::kThrowStaticPrototypeError), R(0), U8(0),
168 B(CreateClosure), U8(5), U8(0),
169 B(Star), R(7),
170 B(LdaSmi), U8(1),
171 B(Star), R(9),
172 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5), U8(5),
173 B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1),
174 B(Star), R(0),
Ben Murdoch61f157c2016-09-16 13:49:30 +0100175 B(Star), R(1),
Ben Murdochc5610432016-08-08 18:44:38 +0100176 B(LdaUndefined),
177 /* 129 S> */ B(Return),
Ben Murdochda12d292016-06-02 14:46:10 +0100178]
179constant pool: [
180 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
181 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
182 InstanceType::SHARED_FUNCTION_INFO_TYPE,
183 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
184 InstanceType::SHARED_FUNCTION_INFO_TYPE,
185 InstanceType::SHARED_FUNCTION_INFO_TYPE,
186]
187handlers: [
188]
189
190---
191snippet: "
192 var count = 0;
193 class C { constructor() { count++; }}
194 return new C();
195"
Ben Murdochc5610432016-08-08 18:44:38 +0100196frame size: 7
Ben Murdochda12d292016-06-02 14:46:10 +0100197parameter count: 1
Ben Murdoch61f157c2016-09-16 13:49:30 +0100198bytecode array length: 73
Ben Murdochda12d292016-06-02 14:46:10 +0100199bytecodes: [
Ben Murdochc5610432016-08-08 18:44:38 +0100200 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
201 B(PushContext), R(2),
202 B(LdaTheHole),
203 B(Star), R(1),
204 /* 30 E> */ B(StackCheck),
205 /* 46 S> */ B(LdaZero),
206 /* 46 E> */ B(StaContextSlot), R(context), U8(4),
207 B(LdaTheHole),
208 B(Star), R(0),
209 B(LdaTheHole),
210 B(Star), R(3),
211 B(CreateClosure), U8(0), U8(0),
212 B(Star), R(4),
213 B(LdaSmi), U8(49),
214 B(Star), R(5),
215 B(LdaSmi), U8(86),
216 B(Star), R(6),
217 B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4),
218 B(Star), R(3),
Ben Murdoch61f157c2016-09-16 13:49:30 +0100219 B(LdrNamedProperty), R(3), U8(1), U8(1), R(4),
Ben Murdochc5610432016-08-08 18:44:38 +0100220 B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1),
221 B(Star), R(0),
Ben Murdoch61f157c2016-09-16 13:49:30 +0100222 B(Star), R(1),
Ben Murdochc5610432016-08-08 18:44:38 +0100223 /* 87 S> */ B(JumpIfNotHole), U8(11),
224 B(LdaConstant), U8(2),
225 B(Star), R(4),
226 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
227 B(Star), R(3),
228 /* 94 E> */ B(New), R(3), R(0), U8(0),
229 /* 103 S> */ B(Return),
Ben Murdochda12d292016-06-02 14:46:10 +0100230]
231constant pool: [
232 InstanceType::SHARED_FUNCTION_INFO_TYPE,
233 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
234 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
235]
236handlers: [
237]
238