Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 1 | # |
| 2 | # Autogenerated by generate-bytecode-expectations. |
| 3 | # |
| 4 | |
| 5 | --- |
| 6 | pool type: mixed |
| 7 | execute: yes |
| 8 | wrap: no |
| 9 | test function name: test |
| 10 | |
| 11 | --- |
| 12 | snippet: " |
| 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 | " |
| 25 | frame size: 7 |
| 26 | parameter count: 1 |
| 27 | bytecode array length: 57 |
| 28 | bytecodes: [ |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame^] | 29 | B(Ldar), R(closure), |
| 30 | B(Star), R(0), |
| 31 | /* 99 E> */ B(StackCheck), |
| 32 | /* 104 S> */ B(Ldar), R(this), |
| 33 | B(Star), R(3), |
| 34 | /* 111 E> */ B(Ldar), R(0), |
| 35 | B(JumpIfNotHole), U8(11), |
| 36 | B(LdaConstant), U8(0), |
| 37 | B(Star), R(6), |
| 38 | B(CallRuntime), U16(Runtime::kThrowReferenceError), R(6), U8(1), |
| 39 | B(Star), R(6), |
| 40 | /* 111 E> */ B(LdaConstant), U8(1), |
| 41 | B(KeyedLoadIC), R(6), U8(3), |
| 42 | B(Star), R(4), |
| 43 | B(LdaConstant), U8(2), |
| 44 | B(Star), R(5), |
| 45 | B(CallRuntime), U16(Runtime::kLoadFromSuper), R(3), U8(3), |
| 46 | B(Mov), R(3), R(2), |
| 47 | B(Star), R(1), |
| 48 | /* 117 E> */ B(Call), R(1), R(2), U8(1), U8(1), |
| 49 | B(Star), R(3), |
| 50 | B(LdaSmi), U8(1), |
| 51 | B(Add), R(3), |
| 52 | /* 131 S> */ B(Return), |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 53 | ] |
| 54 | constant pool: [ |
| 55 | InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
| 56 | InstanceType::SYMBOL_TYPE, |
| 57 | InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
| 58 | ] |
| 59 | handlers: [ |
| 60 | ] |
| 61 | |
| 62 | --- |
| 63 | snippet: " |
| 64 | var test; |
| 65 | (function() { |
| 66 | class A { |
| 67 | get x() { return 1; } |
| 68 | set x(val) { return; } |
| 69 | } |
| 70 | class B extends A { |
| 71 | method() { super.x = 2; return super.x; } |
| 72 | } |
| 73 | test = new B().method; |
| 74 | test(); |
| 75 | })(); |
| 76 | " |
| 77 | frame size: 6 |
| 78 | parameter count: 1 |
| 79 | bytecode array length: 80 |
| 80 | bytecodes: [ |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame^] | 81 | B(Ldar), R(closure), |
| 82 | B(Star), R(0), |
| 83 | /* 125 E> */ B(StackCheck), |
| 84 | /* 130 S> */ B(Ldar), R(this), |
| 85 | B(Star), R(1), |
| 86 | /* 130 E> */ B(Ldar), R(0), |
| 87 | B(JumpIfNotHole), U8(11), |
| 88 | B(LdaConstant), U8(0), |
| 89 | B(Star), R(5), |
| 90 | B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1), |
| 91 | B(Star), R(5), |
| 92 | /* 130 E> */ B(LdaConstant), U8(1), |
| 93 | B(KeyedLoadIC), R(5), U8(1), |
| 94 | B(Star), R(2), |
| 95 | B(LdaConstant), U8(2), |
| 96 | B(Star), R(3), |
| 97 | B(LdaSmi), U8(2), |
| 98 | /* 138 E> */ B(Star), R(4), |
| 99 | B(CallRuntime), U16(Runtime::kStoreToSuper_Strict), R(1), U8(4), |
| 100 | /* 143 S> */ B(Ldar), R(this), |
| 101 | B(Star), R(1), |
| 102 | /* 150 E> */ B(Ldar), R(0), |
| 103 | B(JumpIfNotHole), U8(11), |
| 104 | B(LdaConstant), U8(0), |
| 105 | B(Star), R(4), |
| 106 | B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1), |
| 107 | B(Star), R(4), |
| 108 | /* 150 E> */ B(LdaConstant), U8(1), |
| 109 | B(KeyedLoadIC), R(4), U8(3), |
| 110 | B(Star), R(2), |
| 111 | B(LdaConstant), U8(2), |
| 112 | B(Star), R(3), |
| 113 | B(CallRuntime), U16(Runtime::kLoadFromSuper), R(1), U8(3), |
| 114 | /* 159 S> */ B(Return), |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 115 | ] |
| 116 | constant pool: [ |
| 117 | InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
| 118 | InstanceType::SYMBOL_TYPE, |
| 119 | InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
| 120 | ] |
| 121 | handlers: [ |
| 122 | ] |
| 123 | |
| 124 | --- |
| 125 | snippet: " |
| 126 | var test; |
| 127 | (function() { |
| 128 | class A { |
| 129 | constructor(x) { this.x_ = x; } |
| 130 | } |
| 131 | class B extends A { |
| 132 | constructor() { super(1); this.y_ = 2; } |
| 133 | } |
| 134 | test = new B().constructor; |
| 135 | })(); |
| 136 | " |
| 137 | frame size: 5 |
| 138 | parameter count: 1 |
| 139 | bytecode array length: 106 |
| 140 | bytecodes: [ |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame^] | 141 | B(Ldar), R(closure), |
| 142 | B(Star), R(1), |
| 143 | B(Ldar), R(new_target), |
| 144 | B(Star), R(0), |
| 145 | /* 113 E> */ B(StackCheck), |
| 146 | /* 118 S> */ B(Ldar), R(1), |
| 147 | B(JumpIfNotHole), U8(11), |
| 148 | B(LdaConstant), U8(0), |
| 149 | B(Star), R(3), |
| 150 | B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1), |
| 151 | B(Star), R(2), |
| 152 | B(CallRuntime), U16(Runtime::k_GetSuperConstructor), R(2), U8(1), |
| 153 | B(Star), R(2), |
| 154 | B(LdaSmi), U8(1), |
| 155 | B(Star), R(3), |
| 156 | /* 118 E> */ B(Ldar), R(0), |
| 157 | B(JumpIfNotHole), U8(11), |
| 158 | B(LdaConstant), U8(1), |
| 159 | B(Star), R(4), |
| 160 | B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1), |
| 161 | /* 118 E> */ B(New), R(2), R(3), U8(1), |
| 162 | /* 118 E> */ B(Star), R(2), |
| 163 | B(Ldar), R(this), |
| 164 | B(JumpIfNotHole), U8(4), |
| 165 | B(Jump), U8(11), |
| 166 | B(LdaConstant), U8(2), |
| 167 | B(Star), R(3), |
| 168 | B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1), |
| 169 | B(Ldar), R(2), |
| 170 | B(Star), R(this), |
| 171 | /* 128 S> */ B(JumpIfNotHole), U8(11), |
| 172 | B(LdaConstant), U8(2), |
| 173 | B(Star), R(2), |
| 174 | B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1), |
| 175 | B(Star), R(2), |
| 176 | B(LdaSmi), U8(2), |
| 177 | /* 136 E> */ B(StoreICStrict), R(2), U8(3), U8(4), |
| 178 | B(Ldar), R(this), |
| 179 | B(JumpIfNotHole), U8(11), |
| 180 | B(LdaConstant), U8(2), |
| 181 | B(Star), R(2), |
| 182 | B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1), |
| 183 | /* 141 S> */ B(Return), |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 184 | ] |
| 185 | constant pool: [ |
| 186 | InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
| 187 | InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
| 188 | InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
| 189 | InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
| 190 | ] |
| 191 | handlers: [ |
| 192 | ] |
| 193 | |
| 194 | --- |
| 195 | snippet: " |
| 196 | var test; |
| 197 | (function() { |
| 198 | class A { |
| 199 | constructor() { this.x_ = 1; } |
| 200 | } |
| 201 | class B extends A { |
| 202 | constructor() { super(); this.y_ = 2; } |
| 203 | } |
| 204 | test = new B().constructor; |
| 205 | })(); |
| 206 | " |
| 207 | frame size: 4 |
| 208 | parameter count: 1 |
| 209 | bytecode array length: 102 |
| 210 | bytecodes: [ |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame^] | 211 | B(Ldar), R(closure), |
| 212 | B(Star), R(1), |
| 213 | B(Ldar), R(new_target), |
| 214 | B(Star), R(0), |
| 215 | /* 112 E> */ B(StackCheck), |
| 216 | /* 117 S> */ B(Ldar), R(1), |
| 217 | B(JumpIfNotHole), U8(11), |
| 218 | B(LdaConstant), U8(0), |
| 219 | B(Star), R(3), |
| 220 | B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1), |
| 221 | B(Star), R(2), |
| 222 | B(CallRuntime), U16(Runtime::k_GetSuperConstructor), R(2), U8(1), |
| 223 | B(Star), R(2), |
| 224 | /* 117 E> */ B(Ldar), R(0), |
| 225 | B(JumpIfNotHole), U8(11), |
| 226 | B(LdaConstant), U8(1), |
| 227 | B(Star), R(3), |
| 228 | B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1), |
| 229 | /* 117 E> */ B(New), R(2), R(0), U8(0), |
| 230 | /* 117 E> */ B(Star), R(2), |
| 231 | B(Ldar), R(this), |
| 232 | B(JumpIfNotHole), U8(4), |
| 233 | B(Jump), U8(11), |
| 234 | B(LdaConstant), U8(2), |
| 235 | B(Star), R(3), |
| 236 | B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1), |
| 237 | B(Ldar), R(2), |
| 238 | B(Star), R(this), |
| 239 | /* 126 S> */ B(JumpIfNotHole), U8(11), |
| 240 | B(LdaConstant), U8(2), |
| 241 | B(Star), R(2), |
| 242 | B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1), |
| 243 | B(Star), R(2), |
| 244 | B(LdaSmi), U8(2), |
| 245 | /* 134 E> */ B(StoreICStrict), R(2), U8(3), U8(4), |
| 246 | B(Ldar), R(this), |
| 247 | B(JumpIfNotHole), U8(11), |
| 248 | B(LdaConstant), U8(2), |
| 249 | B(Star), R(2), |
| 250 | B(CallRuntime), U16(Runtime::kThrowReferenceError), R(2), U8(1), |
| 251 | /* 139 S> */ B(Return), |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 252 | ] |
| 253 | constant pool: [ |
| 254 | InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
| 255 | InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
| 256 | InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
| 257 | InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
| 258 | ] |
| 259 | handlers: [ |
| 260 | ] |
| 261 | |