blob: dc1e110a713746a496c6cfb8816cb1421f72f463 [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: no
9test function name: test
10
11---
12snippet: "
13 var test;
14 (function() {
15 class A {
16 method() { return 2; }
17 }
18 class B extends A {
19 method() { return super.method() + 1; }
20 }
21 test = new B().method;
22 test();
23 })();
24"
25frame size: 7
26parameter count: 1
Ben Murdoch61f157c2016-09-16 13:49:30 +010027bytecode array length: 54
Ben Murdochda12d292016-06-02 14:46:10 +010028bytecodes: [
Ben Murdoch61f157c2016-09-16 13:49:30 +010029 B(Mov), R(closure), R(0),
Ben Murdochc5610432016-08-08 18:44:38 +010030 /* 99 E> */ B(StackCheck),
Ben Murdoch61f157c2016-09-16 13:49:30 +010031 /* 104 S> */ B(Mov), R(this), R(3),
32 B(Ldar), R(closure),
Ben Murdochc5610432016-08-08 18:44:38 +010033 B(JumpIfNotHole), U8(11),
34 B(LdaConstant), U8(0),
35 B(Star), R(6),
Ben Murdoch61f157c2016-09-16 13:49:30 +010036 /* 111 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(6), U8(1),
Ben Murdochc5610432016-08-08 18:44:38 +010037 B(Star), R(6),
Ben Murdoch61f157c2016-09-16 13:49:30 +010038 B(LdaConstant), U8(1),
39 /* 111 E> */ B(LdrKeyedProperty), R(6), U8(3), R(4),
Ben Murdochc5610432016-08-08 18:44:38 +010040 B(LdaConstant), U8(2),
41 B(Star), R(5),
42 B(CallRuntime), U16(Runtime::kLoadFromSuper), R(3), U8(3),
43 B(Mov), R(3), R(2),
44 B(Star), R(1),
45 /* 117 E> */ B(Call), R(1), R(2), U8(1), U8(1),
46 B(Star), R(3),
47 B(LdaSmi), U8(1),
48 B(Add), R(3),
49 /* 131 S> */ B(Return),
Ben Murdochda12d292016-06-02 14:46:10 +010050]
51constant pool: [
52 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
53 InstanceType::SYMBOL_TYPE,
54 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
55]
56handlers: [
57]
58
59---
60snippet: "
61 var test;
62 (function() {
63 class A {
64 get x() { return 1; }
65 set x(val) { return; }
66 }
67 class B extends A {
68 method() { super.x = 2; return super.x; }
69 }
70 test = new B().method;
71 test();
72 })();
73"
74frame size: 6
75parameter count: 1
Ben Murdoch61f157c2016-09-16 13:49:30 +010076bytecode array length: 75
Ben Murdochda12d292016-06-02 14:46:10 +010077bytecodes: [
Ben Murdoch61f157c2016-09-16 13:49:30 +010078 B(Mov), R(closure), R(0),
Ben Murdochc5610432016-08-08 18:44:38 +010079 /* 125 E> */ B(StackCheck),
Ben Murdoch61f157c2016-09-16 13:49:30 +010080 /* 130 S> */ B(Mov), R(this), R(1),
81 B(Ldar), R(closure),
Ben Murdochc5610432016-08-08 18:44:38 +010082 B(JumpIfNotHole), U8(11),
83 B(LdaConstant), U8(0),
84 B(Star), R(5),
Ben Murdoch61f157c2016-09-16 13:49:30 +010085 /* 130 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1),
Ben Murdochc5610432016-08-08 18:44:38 +010086 B(Star), R(5),
Ben Murdoch61f157c2016-09-16 13:49:30 +010087 B(LdaConstant), U8(1),
88 /* 130 E> */ B(LdrKeyedProperty), R(5), U8(1), R(2),
Ben Murdochc5610432016-08-08 18:44:38 +010089 B(LdaConstant), U8(2),
90 B(Star), R(3),
91 B(LdaSmi), U8(2),
Ben Murdoch61f157c2016-09-16 13:49:30 +010092 B(Star), R(4),
93 /* 138 E> */ B(CallRuntime), U16(Runtime::kStoreToSuper_Strict), R(1), U8(4),
94 /* 143 S> */ B(Mov), R(this), R(1),
95 B(Ldar), R(0),
Ben Murdochc5610432016-08-08 18:44:38 +010096 B(JumpIfNotHole), U8(11),
97 B(LdaConstant), U8(0),
98 B(Star), R(4),
Ben Murdoch61f157c2016-09-16 13:49:30 +010099 /* 150 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
Ben Murdochc5610432016-08-08 18:44:38 +0100100 B(Star), R(4),
Ben Murdoch61f157c2016-09-16 13:49:30 +0100101 B(LdaConstant), U8(1),
102 /* 150 E> */ B(LdrKeyedProperty), R(4), U8(3), R(2),
Ben Murdochc5610432016-08-08 18:44:38 +0100103 B(LdaConstant), U8(2),
104 B(Star), R(3),
105 B(CallRuntime), U16(Runtime::kLoadFromSuper), R(1), U8(3),
106 /* 159 S> */ B(Return),
Ben Murdochda12d292016-06-02 14:46:10 +0100107]
108constant pool: [
109 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
110 InstanceType::SYMBOL_TYPE,
111 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
112]
113handlers: [
114]
115
116---
117snippet: "
118 var test;
119 (function() {
120 class A {
121 constructor(x) { this.x_ = x; }
122 }
123 class B extends A {
124 constructor() { super(1); this.y_ = 2; }
125 }
126 test = new B().constructor;
127 })();
128"
129frame size: 5
130parameter count: 1
Ben Murdoch61f157c2016-09-16 13:49:30 +0100131bytecode array length: 105
Ben Murdochda12d292016-06-02 14:46:10 +0100132bytecodes: [
Ben Murdoch61f157c2016-09-16 13:49:30 +0100133 B(Mov), R(closure), R(1),
134 B(Mov), R(new_target), R(0),
Ben Murdochc5610432016-08-08 18:44:38 +0100135 /* 113 E> */ B(StackCheck),
Ben Murdoch61f157c2016-09-16 13:49:30 +0100136 /* 118 S> */ B(Ldar), R(closure),
Ben Murdochc5610432016-08-08 18:44:38 +0100137 B(JumpIfNotHole), U8(11),
138 B(LdaConstant), U8(0),
139 B(Star), R(3),
140 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
141 B(Star), R(2),
142 B(CallRuntime), U16(Runtime::k_GetSuperConstructor), R(2), U8(1),
143 B(Star), R(2),
144 B(LdaSmi), U8(1),
145 B(Star), R(3),
Ben Murdoch61f157c2016-09-16 13:49:30 +0100146 B(Ldar), R(0),
Ben Murdochc5610432016-08-08 18:44:38 +0100147 B(JumpIfNotHole), U8(11),
148 B(LdaConstant), U8(1),
149 B(Star), R(4),
Ben Murdoch61f157c2016-09-16 13:49:30 +0100150 /* 118 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
Ben Murdochc5610432016-08-08 18:44:38 +0100151 /* 118 E> */ B(New), R(2), R(3), U8(1),
Ben Murdoch61f157c2016-09-16 13:49:30 +0100152 B(Star), R(2),
Ben Murdochc5610432016-08-08 18:44:38 +0100153 B(Ldar), R(this),
154 B(JumpIfNotHole), U8(4),
155 B(Jump), U8(11),
156 B(LdaConstant), U8(2),
157 B(Star), R(3),
Ben Murdoch61f157c2016-09-16 13:49:30 +0100158 /* 118 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
159 B(Mov), R(2), R(this),
160 /* 128 S> */ B(Ldar), R(this),
161 B(JumpIfNotHole), U8(11),
Ben Murdochc5610432016-08-08 18:44:38 +0100162 B(LdaConstant), U8(2),
163 B(Star), R(2),
164 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
165 B(Star), R(2),
166 B(LdaSmi), U8(2),
Ben Murdoch61f157c2016-09-16 13:49:30 +0100167 /* 136 E> */ B(StaNamedPropertyStrict), R(2), U8(3), U8(4),
Ben Murdochc5610432016-08-08 18:44:38 +0100168 B(Ldar), R(this),
169 B(JumpIfNotHole), U8(11),
170 B(LdaConstant), U8(2),
171 B(Star), R(2),
172 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
173 /* 141 S> */ B(Return),
Ben Murdochda12d292016-06-02 14:46:10 +0100174]
175constant pool: [
176 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
177 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
178 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
179 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
180]
181handlers: [
182]
183
184---
185snippet: "
186 var test;
187 (function() {
188 class A {
189 constructor() { this.x_ = 1; }
190 }
191 class B extends A {
192 constructor() { super(); this.y_ = 2; }
193 }
194 test = new B().constructor;
195 })();
196"
197frame size: 4
198parameter count: 1
Ben Murdoch61f157c2016-09-16 13:49:30 +0100199bytecode array length: 101
Ben Murdochda12d292016-06-02 14:46:10 +0100200bytecodes: [
Ben Murdoch61f157c2016-09-16 13:49:30 +0100201 B(Mov), R(closure), R(1),
202 B(Mov), R(new_target), R(0),
Ben Murdochc5610432016-08-08 18:44:38 +0100203 /* 112 E> */ B(StackCheck),
Ben Murdoch61f157c2016-09-16 13:49:30 +0100204 /* 117 S> */ B(Ldar), R(closure),
Ben Murdochc5610432016-08-08 18:44:38 +0100205 B(JumpIfNotHole), U8(11),
206 B(LdaConstant), U8(0),
207 B(Star), R(3),
208 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
209 B(Star), R(2),
210 B(CallRuntime), U16(Runtime::k_GetSuperConstructor), R(2), U8(1),
211 B(Star), R(2),
Ben Murdoch61f157c2016-09-16 13:49:30 +0100212 B(Ldar), R(0),
Ben Murdochc5610432016-08-08 18:44:38 +0100213 B(JumpIfNotHole), U8(11),
214 B(LdaConstant), U8(1),
215 B(Star), R(3),
Ben Murdoch61f157c2016-09-16 13:49:30 +0100216 /* 117 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
Ben Murdochc5610432016-08-08 18:44:38 +0100217 /* 117 E> */ B(New), R(2), R(0), U8(0),
Ben Murdoch61f157c2016-09-16 13:49:30 +0100218 B(Star), R(2),
Ben Murdochc5610432016-08-08 18:44:38 +0100219 B(Ldar), R(this),
220 B(JumpIfNotHole), U8(4),
221 B(Jump), U8(11),
222 B(LdaConstant), U8(2),
223 B(Star), R(3),
Ben Murdoch61f157c2016-09-16 13:49:30 +0100224 /* 117 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
225 B(Mov), R(2), R(this),
226 /* 126 S> */ B(Ldar), R(this),
227 B(JumpIfNotHole), U8(11),
Ben Murdochc5610432016-08-08 18:44:38 +0100228 B(LdaConstant), U8(2),
229 B(Star), R(2),
230 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
231 B(Star), R(2),
232 B(LdaSmi), U8(2),
Ben Murdoch61f157c2016-09-16 13:49:30 +0100233 /* 134 E> */ B(StaNamedPropertyStrict), R(2), U8(3), U8(4),
Ben Murdochc5610432016-08-08 18:44:38 +0100234 B(Ldar), R(this),
235 B(JumpIfNotHole), U8(11),
236 B(LdaConstant), U8(2),
237 B(Star), R(2),
238 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1),
239 /* 139 S> */ B(Return),
Ben Murdochda12d292016-06-02 14:46:10 +0100240]
241constant pool: [
242 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
243 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
244 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
245 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
246]
247handlers: [
248]
249