OLD | NEW |
(Empty) | |
| 1 # |
| 2 # Autogenerated by generate-bytecode-expectations. |
| 3 # |
| 4 |
| 5 --- |
| 6 wrap: no |
| 7 test function name: f |
| 8 |
| 9 --- |
| 10 snippet: " |
| 11 async function f() { } |
| 12 f(); |
| 13 " |
| 14 frame size: 8 |
| 15 parameter count: 1 |
| 16 bytecode array length: 100 |
| 17 bytecodes: [ |
| 18 B(Ldar), R(new_target), |
| 19 B(JumpIfUndefined), U8(22), |
| 20 B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_targe
t), U8(1), |
| 21 B(PushContext), R(2), |
| 22 B(ResumeGenerator), R(new_target), |
| 23 B(Star), R(1), |
| 24 B(LdaSmi), I8(78), |
| 25 B(Star), R(3), |
| 26 B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1), |
| 27 B(LdaSmi), I8(-2), |
| 28 B(Star), R(1), |
| 29 B(CreateFunctionContext), U8(2), |
| 30 B(PushContext), R(0), |
| 31 /* 16 E> */ B(StackCheck), |
| 32 B(LdaUndefined), |
| 33 B(Star), R(3), |
| 34 B(CallJSRuntime), U8(%UnknownIntrinsicIndex), R(3), U8(1), |
| 35 B(StaCurrentContextSlot), U8(5), |
| 36 B(Mov), R(context), R(3), |
| 37 B(Mov), R(closure), R(4), |
| 38 B(Mov), R(this), R(5), |
| 39 /* 16 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(4), U8
(2), |
| 40 B(StaCurrentContextSlot), U8(4), |
| 41 B(LdaUndefined), |
| 42 B(Star), R(4), |
| 43 B(LdaCurrentContextSlot), U8(5), |
| 44 B(Star), R(5), |
| 45 B(LdaUndefined), |
| 46 B(Star), R(6), |
| 47 B(CallJSRuntime), U8(%promise_resolve), R(4), U8(3), |
| 48 B(LdaCurrentContextSlot), U8(5), |
| 49 /* 21 S> */ B(Return), |
| 50 B(Jump), U8(23), |
| 51 B(Star), R(6), |
| 52 B(LdaTheHole), |
| 53 B(SetPendingMessage), |
| 54 B(LdaCurrentContextSlot), U8(5), |
| 55 B(Star), R(5), |
| 56 B(LdaUndefined), |
| 57 B(Star), R(4), |
| 58 B(LdaFalse), |
| 59 B(Star), R(7), |
| 60 B(CallJSRuntime), U8(%promise_internal_reject), R(4), U8(4), |
| 61 B(Ldar), R(5), |
| 62 /* 21 S> */ B(Return), |
| 63 B(LdaUndefined), |
| 64 /* 21 S> */ B(Return), |
| 65 ] |
| 66 constant pool: [ |
| 67 ] |
| 68 handlers: [ |
| 69 [45, 75, 77], |
| 70 ] |
| 71 |
| 72 --- |
| 73 snippet: " |
| 74 async function f() { await 42 } |
| 75 f(); |
| 76 " |
| 77 frame size: 10 |
| 78 parameter count: 1 |
| 79 bytecode array length: 190 |
| 80 bytecodes: [ |
| 81 B(Ldar), R(new_target), |
| 82 B(JumpIfUndefined), U8(28), |
| 83 B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_targe
t), U8(1), |
| 84 B(PushContext), R(2), |
| 85 B(ResumeGenerator), R(new_target), |
| 86 B(Star), R(1), |
| 87 B(LdaZero), |
| 88 B(TestEqualStrict), R(1), U8(0), |
| 89 B(JumpIfTrue), U8(82), |
| 90 B(LdaSmi), I8(78), |
| 91 B(Star), R(3), |
| 92 B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1), |
| 93 B(LdaSmi), I8(-2), |
| 94 B(Star), R(1), |
| 95 B(CreateFunctionContext), U8(3), |
| 96 B(PushContext), R(0), |
| 97 /* 16 E> */ B(StackCheck), |
| 98 B(LdaUndefined), |
| 99 B(Star), R(3), |
| 100 B(CallJSRuntime), U8(%UnknownIntrinsicIndex), R(3), U8(1), |
| 101 B(StaCurrentContextSlot), U8(5), |
| 102 B(Mov), R(context), R(3), |
| 103 B(Mov), R(closure), R(4), |
| 104 B(Mov), R(this), R(5), |
| 105 /* 16 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(4), U8
(2), |
| 106 B(StaCurrentContextSlot), U8(4), |
| 107 /* 21 S> */ B(LdaCurrentContextSlot), U8(4), |
| 108 B(Star), R(4), |
| 109 /* 27 S> */ B(LdaSmi), I8(42), |
| 110 B(StaCurrentContextSlot), U8(6), |
| 111 /* 21 S> */ B(LdaUndefined), |
| 112 B(Star), R(5), |
| 113 B(LdaCurrentContextSlot), U8(4), |
| 114 B(Star), R(6), |
| 115 B(LdaCurrentContextSlot), U8(6), |
| 116 B(Star), R(7), |
| 117 B(LdaCurrentContextSlot), U8(5), |
| 118 B(Star), R(8), |
| 119 B(CallJSRuntime), U8(%UnknownIntrinsicIndex), R(5), U8(4), |
| 120 B(LdaCurrentContextSlot), U8(5), |
| 121 B(Star), R(5), |
| 122 B(LdaZero), |
| 123 B(SuspendGenerator), R(4), |
| 124 B(Ldar), R(5), |
| 125 /* 30 S> */ B(Return), |
| 126 B(LdaSmi), I8(-2), |
| 127 B(Star), R(1), |
| 128 B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4
), U8(1), |
| 129 B(Star), R(6), |
| 130 B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8
(1), |
| 131 B(Star), R(7), |
| 132 B(LdaZero), |
| 133 B(TestEqualStrict), R(7), U8(0), |
| 134 B(JumpIfTrue), U8(25), |
| 135 B(LdaSmi), I8(2), |
| 136 B(TestEqualStrict), R(7), U8(0), |
| 137 B(JumpIfTrue), U8(15), |
| 138 B(Jump), U8(2), |
| 139 B(LdaTrue), |
| 140 B(Star), R(9), |
| 141 B(Mov), R(6), R(8), |
| 142 B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(8),
U8(2), |
| 143 /* 30 S> */ B(Return), |
| 144 B(Ldar), R(6), |
| 145 B(ReThrow), |
| 146 B(LdaUndefined), |
| 147 B(Star), R(4), |
| 148 B(LdaCurrentContextSlot), U8(5), |
| 149 B(Star), R(5), |
| 150 B(LdaUndefined), |
| 151 B(Star), R(6), |
| 152 B(CallJSRuntime), U8(%promise_resolve), R(4), U8(3), |
| 153 B(LdaCurrentContextSlot), U8(5), |
| 154 /* 30 S> */ B(Return), |
| 155 B(Jump), U8(23), |
| 156 B(Star), R(6), |
| 157 B(LdaTheHole), |
| 158 B(SetPendingMessage), |
| 159 B(LdaCurrentContextSlot), U8(5), |
| 160 B(Star), R(5), |
| 161 B(LdaUndefined), |
| 162 B(Star), R(4), |
| 163 B(LdaFalse), |
| 164 B(Star), R(7), |
| 165 B(CallJSRuntime), U8(%promise_internal_reject), R(4), U8(4), |
| 166 B(Ldar), R(5), |
| 167 /* 30 S> */ B(Return), |
| 168 B(LdaUndefined), |
| 169 /* 30 S> */ B(Return), |
| 170 ] |
| 171 constant pool: [ |
| 172 ] |
| 173 handlers: [ |
| 174 [51, 165, 167], |
| 175 ] |
| 176 |
| 177 --- |
| 178 snippet: " |
| 179 async function f() { for (let x of [42]) await x } |
| 180 f(); |
| 181 " |
| 182 frame size: 16 |
| 183 parameter count: 1 |
| 184 bytecode array length: 665 |
| 185 bytecodes: [ |
| 186 B(Ldar), R(new_target), |
| 187 B(JumpIfUndefined), U8(28), |
| 188 B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_targe
t), U8(1), |
| 189 B(PushContext), R(4), |
| 190 B(ResumeGenerator), R(new_target), |
| 191 B(Star), R(3), |
| 192 B(LdaZero), |
| 193 B(TestEqualStrict), R(3), U8(0), |
| 194 B(JumpIfTrue), U8(96), |
| 195 B(LdaSmi), I8(78), |
| 196 B(Star), R(5), |
| 197 B(CallRuntime), U16(Runtime::kAbort), R(5), U8(1), |
| 198 B(LdaSmi), I8(-2), |
| 199 B(Star), R(3), |
| 200 B(CreateFunctionContext), U8(10), |
| 201 B(PushContext), R(0), |
| 202 /* 16 E> */ B(StackCheck), |
| 203 B(LdaUndefined), |
| 204 B(Star), R(5), |
| 205 B(CallJSRuntime), U8(%UnknownIntrinsicIndex), R(5), U8(1), |
| 206 B(StaCurrentContextSlot), U8(5), |
| 207 B(Mov), R(context), R(5), |
| 208 B(Mov), R(closure), R(6), |
| 209 B(Mov), R(this), R(7), |
| 210 /* 16 E> */ B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(6), U8
(2), |
| 211 B(StaCurrentContextSlot), U8(4), |
| 212 B(Ldar), R(closure), |
| 213 B(CreateBlockContext), U8(0), |
| 214 B(PushContext), R(1), |
| 215 B(LdaTheHole), |
| 216 B(StaCurrentContextSlot), U8(4), |
| 217 B(LdaZero), |
| 218 B(StaContextSlot), R(1), U8(10), U8(0), |
| 219 B(Mov), R(context), R(8), |
| 220 B(Mov), R(closure), R(6), |
| 221 B(Mov), R(context), R(9), |
| 222 /* 35 S> */ B(CreateArrayLiteral), U8(1), U8(2), U8(9), |
| 223 B(Star), R(10), |
| 224 B(LdaNamedProperty), R(10), U8(2), U8(3), |
| 225 B(Star), R(11), |
| 226 B(CallProperty), R(11), R(10), U8(1), U8(5), |
| 227 B(JumpIfJSReceiver), U8(7), |
| 228 B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0),
U8(0), |
| 229 /* 35 E> */ B(StaContextSlot), R(1), U8(8), U8(0), |
| 230 B(LdaSmi), I8(-2), |
| 231 B(TestEqual), R(3), U8(0), |
| 232 B(JumpIfTrue), U8(17), |
| 233 B(LdaZero), |
| 234 B(TestEqualStrict), R(3), U8(0), |
| 235 B(JumpIfTrue), U8(157), |
| 236 B(LdaSmi), I8(78), |
| 237 B(Star), R(10), |
| 238 B(CallRuntime), U16(Runtime::kAbort), R(10), U8(1), |
| 239 /* 32 S> */ B(LdaContextSlot), R(1), U8(8), U8(0), |
| 240 B(Star), R(11), |
| 241 B(LdaNamedProperty), R(11), U8(3), U8(9), |
| 242 B(Star), R(10), |
| 243 /* 32 E> */ B(CallProperty), R(10), R(11), U8(1), U8(7), |
| 244 /* 32 E> */ B(StaContextSlot), R(1), U8(9), U8(0), |
| 245 B(Star), R(10), |
| 246 B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(10), U8(1), |
| 247 B(ToBooleanLogicalNot), |
| 248 B(JumpIfFalse), U8(13), |
| 249 B(LdaContextSlot), R(1), U8(9), U8(0), |
| 250 B(Star), R(10), |
| 251 B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R
(10), U8(1), |
| 252 B(LdaContextSlot), R(1), U8(9), U8(0), |
| 253 B(Star), R(10), |
| 254 B(LdaNamedProperty), R(10), U8(4), U8(11), |
| 255 B(JumpIfToBooleanTrue), U8(170), |
| 256 B(LdaContextSlot), R(1), U8(9), U8(0), |
| 257 B(Star), R(10), |
| 258 B(LdaNamedProperty), R(10), U8(5), U8(13), |
| 259 B(StaContextSlot), R(1), U8(11), U8(0), |
| 260 B(LdaSmi), I8(2), |
| 261 B(StaContextSlot), R(1), U8(10), U8(0), |
| 262 B(LdaContextSlot), R(1), U8(11), U8(0), |
| 263 B(StaContextSlot), R(1), U8(7), U8(0), |
| 264 /* 21 E> */ B(StackCheck), |
| 265 B(Ldar), R(closure), |
| 266 B(CreateBlockContext), U8(6), |
| 267 B(PushContext), R(2), |
| 268 B(LdaTheHole), |
| 269 B(StaCurrentContextSlot), U8(4), |
| 270 B(LdaContextSlot), R(1), U8(7), U8(0), |
| 271 B(StaCurrentContextSlot), U8(4), |
| 272 /* 41 S> */ B(LdaContextSlot), R(1), U8(4), U8(0), |
| 273 B(Star), R(10), |
| 274 /* 47 S> */ B(LdaCurrentContextSlot), U8(4), |
| 275 B(StaContextSlot), R(1), U8(6), U8(0), |
| 276 /* 41 S> */ B(LdaUndefined), |
| 277 B(Star), R(11), |
| 278 B(LdaContextSlot), R(1), U8(4), U8(0), |
| 279 B(Star), R(12), |
| 280 B(LdaContextSlot), R(1), U8(6), U8(0), |
| 281 B(Star), R(13), |
| 282 B(LdaContextSlot), R(1), U8(5), U8(0), |
| 283 B(Star), R(14), |
| 284 B(CallJSRuntime), U8(%UnknownIntrinsicIndex), R(11), U8(4), |
| 285 B(LdaContextSlot), R(1), U8(5), U8(0), |
| 286 B(Star), R(11), |
| 287 B(LdaZero), |
| 288 B(SuspendGenerator), R(10), |
| 289 B(Ldar), R(11), |
| 290 /* 49 S> */ B(Return), |
| 291 B(LdaSmi), I8(-2), |
| 292 B(Star), R(3), |
| 293 B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(1
0), U8(1), |
| 294 B(Star), R(12), |
| 295 B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(10), U
8(1), |
| 296 B(Star), R(13), |
| 297 B(LdaZero), |
| 298 B(TestEqualStrict), R(13), U8(0), |
| 299 B(JumpIfTrue), U8(43), |
| 300 B(LdaSmi), I8(2), |
| 301 B(TestEqualStrict), R(13), U8(0), |
| 302 B(JumpIfTrue), U8(33), |
| 303 B(Jump), U8(2), |
| 304 B(LdaTrue), |
| 305 B(Star), R(15), |
| 306 B(Mov), R(12), R(14), |
| 307 B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(14)
, U8(2), |
| 308 B(PopContext), R(2), |
| 309 B(PopContext), R(2), |
| 310 B(PopContext), R(2), |
| 311 B(PopContext), R(2), |
| 312 B(PopContext), R(2), |
| 313 B(PopContext), R(2), |
| 314 B(Star), R(7), |
| 315 B(LdaZero), |
| 316 B(Star), R(6), |
| 317 B(Jump), U8(75), |
| 318 B(Ldar), R(12), |
| 319 B(ReThrow), |
| 320 B(PopContext), R(2), |
| 321 B(LdaZero), |
| 322 B(StaContextSlot), R(1), U8(10), U8(0), |
| 323 B(JumpLoop), U8(240), I8(0), |
| 324 B(Jump), U8(48), |
| 325 B(Star), R(10), |
| 326 B(Ldar), R(closure), |
| 327 B(CreateCatchContext), R(10), U8(7), U8(8), |
| 328 B(Star), R(9), |
| 329 B(LdaTheHole), |
| 330 B(SetPendingMessage), |
| 331 B(Ldar), R(9), |
| 332 B(PushContext), R(2), |
| 333 B(LdaContextSlot), R(1), U8(10), U8(0), |
| 334 B(Star), R(10), |
| 335 B(LdaSmi), I8(2), |
| 336 B(TestEqualStrict), R(10), U8(15), |
| 337 B(JumpIfFalse), U8(8), |
| 338 B(LdaSmi), I8(1), |
| 339 B(StaContextSlot), R(1), U8(10), U8(0), |
| 340 B(LdaCurrentContextSlot), U8(4), |
| 341 B(Star), R(10), |
| 342 B(CallRuntime), U16(Runtime::kReThrow), R(10), U8(1), |
| 343 B(PopContext), R(2), |
| 344 B(LdaSmi), I8(-1), |
| 345 B(Star), R(6), |
| 346 B(Jump), U8(8), |
| 347 B(Star), R(7), |
| 348 B(LdaSmi), I8(1), |
| 349 B(Star), R(6), |
| 350 B(LdaTheHole), |
| 351 B(SetPendingMessage), |
| 352 B(Star), R(8), |
| 353 B(LdaContextSlot), R(1), U8(10), U8(0), |
| 354 B(Star), R(9), |
| 355 B(LdaZero), |
| 356 B(TestEqualStrict), R(9), U8(16), |
| 357 B(JumpIfTrue), U8(159), |
| 358 B(LdaContextSlot), R(1), U8(8), U8(0), |
| 359 B(Star), R(9), |
| 360 B(LdaNamedProperty), R(9), U8(9), U8(17), |
| 361 B(StaContextSlot), R(1), U8(12), U8(0), |
| 362 B(LdaContextSlot), R(1), U8(12), U8(0), |
| 363 B(Star), R(9), |
| 364 B(TestUndetectable), R(9), |
| 365 B(JumpIfFalse), U8(4), |
| 366 B(Jump), U8(133), |
| 367 B(LdaContextSlot), R(1), U8(10), U8(0), |
| 368 B(Star), R(9), |
| 369 B(LdaSmi), I8(1), |
| 370 B(TestEqualStrict), R(9), U8(20), |
| 371 B(JumpIfFalse), U8(75), |
| 372 B(LdaContextSlot), R(1), U8(12), U8(0), |
| 373 B(TypeOf), |
| 374 B(Star), R(9), |
| 375 B(LdaConstant), U8(10), |
| 376 B(TestEqualStrict), R(9), U8(21), |
| 377 B(JumpIfFalse), U8(4), |
| 378 B(Jump), U8(18), |
| 379 B(Wide), B(LdaSmi), I16(131), |
| 380 B(Star), R(9), |
| 381 B(LdaConstant), U8(11), |
| 382 B(Star), R(10), |
| 383 B(CallRuntime), U16(Runtime::kNewTypeError), R(9), U8(2), |
| 384 B(Throw), |
| 385 B(Mov), R(context), R(9), |
| 386 B(LdaContextSlot), R(1), U8(12), U8(0), |
| 387 B(Star), R(10), |
| 388 B(LdaContextSlot), R(1), U8(8), U8(0), |
| 389 B(Star), R(11), |
| 390 B(InvokeIntrinsic), U8(Runtime::k_Call), R(10), U8(2), |
| 391 B(Jump), U8(20), |
| 392 B(Star), R(10), |
| 393 B(Ldar), R(closure), |
| 394 B(CreateCatchContext), R(10), U8(7), U8(12), |
| 395 B(Star), R(9), |
| 396 B(LdaTheHole), |
| 397 B(SetPendingMessage), |
| 398 B(Ldar), R(9), |
| 399 B(PushContext), R(2), |
| 400 B(PopContext), R(2), |
| 401 B(Jump), U8(47), |
| 402 B(LdaContextSlot), R(1), U8(12), U8(0), |
| 403 B(Star), R(9), |
| 404 B(LdaContextSlot), R(1), U8(8), U8(0), |
| 405 B(Star), R(10), |
| 406 B(InvokeIntrinsic), U8(Runtime::k_Call), R(9), U8(2), |
| 407 B(StaContextSlot), R(1), U8(13), U8(0), |
| 408 B(LdaContextSlot), R(1), U8(13), U8(0), |
| 409 B(Star), R(9), |
| 410 B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(9), U8(1), |
| 411 B(JumpIfToBooleanFalse), U8(4), |
| 412 B(Jump), U8(13), |
| 413 B(LdaContextSlot), R(1), U8(13), U8(0), |
| 414 B(Star), R(9), |
| 415 B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R
(9), U8(1), |
| 416 B(Ldar), R(8), |
| 417 B(SetPendingMessage), |
| 418 B(LdaZero), |
| 419 B(TestEqualStrict), R(6), U8(0), |
| 420 B(JumpIfTrue), U8(11), |
| 421 B(LdaSmi), I8(1), |
| 422 B(TestEqualStrict), R(6), U8(0), |
| 423 B(JumpIfTrue), U8(11), |
| 424 B(Jump), U8(14), |
| 425 B(PopContext), R(1), |
| 426 B(PopContext), R(0), |
| 427 B(Ldar), R(7), |
| 428 /* 49 S> */ B(Return), |
| 429 B(PopContext), R(1), |
| 430 B(Ldar), R(7), |
| 431 B(ReThrow), |
| 432 B(PopContext), R(1), |
| 433 B(LdaUndefined), |
| 434 B(Star), R(6), |
| 435 B(LdaCurrentContextSlot), U8(5), |
| 436 B(Star), R(7), |
| 437 B(LdaUndefined), |
| 438 B(Star), R(8), |
| 439 B(CallJSRuntime), U8(%promise_resolve), R(6), U8(3), |
| 440 B(LdaCurrentContextSlot), U8(5), |
| 441 /* 49 S> */ B(Return), |
| 442 B(Jump), U8(23), |
| 443 B(Star), R(8), |
| 444 B(LdaTheHole), |
| 445 B(SetPendingMessage), |
| 446 B(LdaCurrentContextSlot), U8(5), |
| 447 B(Star), R(7), |
| 448 B(LdaUndefined), |
| 449 B(Star), R(6), |
| 450 B(LdaFalse), |
| 451 B(Star), R(9), |
| 452 B(CallJSRuntime), U8(%promise_internal_reject), R(6), U8(4), |
| 453 B(Ldar), R(7), |
| 454 /* 49 S> */ B(Return), |
| 455 B(LdaUndefined), |
| 456 /* 49 S> */ B(Return), |
| 457 ] |
| 458 constant pool: [ |
| 459 FIXED_ARRAY_TYPE, |
| 460 CONSTANT_ELEMENTS_PAIR_TYPE, |
| 461 SYMBOL_TYPE, |
| 462 ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"], |
| 463 ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"], |
| 464 ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"], |
| 465 FIXED_ARRAY_TYPE, |
| 466 ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"], |
| 467 FIXED_ARRAY_TYPE, |
| 468 ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"], |
| 469 ONE_BYTE_INTERNALIZED_STRING_TYPE ["function"], |
| 470 ONE_BYTE_INTERNALIZED_STRING_TYPE [""], |
| 471 FIXED_ARRAY_TYPE, |
| 472 ] |
| 473 handlers: [ |
| 474 [51, 640, 642], |
| 475 [84, 406, 412], |
| 476 [87, 358, 360], |
| 477 [508, 524, 526], |
| 478 ] |
| 479 |
OLD | NEW |