OLD | NEW |
(Empty) | |
| 1 # |
| 2 # Autogenerated by generate-bytecode-expectations. |
| 3 # |
| 4 |
| 5 --- |
| 6 wrap: no |
| 7 test function name: test |
| 8 |
| 9 --- |
| 10 snippet: " |
| 11 var test; |
| 12 (function() { |
| 13 class A { |
| 14 constructor(...args) { this.baseArgs = args; } |
| 15 } |
| 16 class B extends A {} |
| 17 test = new B(1, 2, 3).constructor; |
| 18 })(); |
| 19 " |
| 20 frame size: 9 |
| 21 parameter count: 1 |
| 22 bytecode array length: 40 |
| 23 bytecodes: [ |
| 24 B(CreateRestParameter), |
| 25 B(Star), R(2), |
| 26 B(Mov), R(closure), R(1), |
| 27 B(Mov), R(new_target), R(0), |
| 28 B(Ldar), R(new_target), |
| 29 /* 93 E> */ B(StackCheck), |
| 30 /* 93 S> */ B(CallRuntime), U16(Runtime::k_GetSuperConstructor), R(1), U8(1)
, |
| 31 B(Star), R(3), |
| 32 B(CallRuntime), U16(Runtime::kSpreadIterablePrepareVarargs), R(2
), U8(1), |
| 33 B(Star), R(7), |
| 34 B(LdaUndefined), |
| 35 B(Star), R(5), |
| 36 B(Mov), R(3), R(6), |
| 37 B(Mov), R(0), R(8), |
| 38 /* 93 E> */ B(CallJSRuntime), U8(150), R(5), U8(4), |
| 39 /* 93 S> */ B(Return), |
| 40 ] |
| 41 constant pool: [ |
| 42 ] |
| 43 handlers: [ |
| 44 ] |
| 45 |
| 46 --- |
| 47 snippet: " |
| 48 var test; |
| 49 (function() { |
| 50 class A { |
| 51 constructor(...args) { this.baseArgs = args; } |
| 52 } |
| 53 class B extends A { |
| 54 constructor(...args) { super(1, ...args); } |
| 55 } |
| 56 test = new B(1, 2, 3).constructor; |
| 57 })(); |
| 58 " |
| 59 frame size: 10 |
| 60 parameter count: 1 |
| 61 bytecode array length: 80 |
| 62 bytecodes: [ |
| 63 B(CreateRestParameter), |
| 64 B(Star), R(2), |
| 65 B(Mov), R(closure), R(1), |
| 66 B(Mov), R(new_target), R(0), |
| 67 B(Ldar), R(new_target), |
| 68 /* 128 E> */ B(StackCheck), |
| 69 /* 140 S> */ B(CallRuntime), U16(Runtime::k_GetSuperConstructor), R(1), U8(1)
, |
| 70 B(Star), R(3), |
| 71 B(LdaSmi), U8(1), |
| 72 B(Star), R(4), |
| 73 B(Mov), R(2), R(5), |
| 74 /* 152 E> */ B(CallRuntime), U16(Runtime::kSpreadIterablePrepareVarargs), R(4
), U8(2), |
| 75 B(Star), R(8), |
| 76 B(LdaUndefined), |
| 77 B(Star), R(6), |
| 78 B(Mov), R(3), R(7), |
| 79 B(Mov), R(0), R(9), |
| 80 /* 140 E> */ B(CallJSRuntime), U8(150), R(6), U8(4), |
| 81 B(Star), R(3), |
| 82 B(Ldar), R(this), |
| 83 B(JumpIfNotHole), U8(4), |
| 84 B(Jump), U8(11), |
| 85 B(LdaConstant), U8(0), |
| 86 B(Star), R(4), |
| 87 /* 140 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1), |
| 88 B(Mov), R(3), R(this), |
| 89 B(Ldar), R(this), |
| 90 B(JumpIfNotHole), U8(11), |
| 91 B(LdaConstant), U8(0), |
| 92 B(Star), R(3), |
| 93 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1), |
| 94 /* 159 S> */ B(Return), |
| 95 ] |
| 96 constant pool: [ |
| 97 ONE_BYTE_INTERNALIZED_STRING_TYPE ["this"], |
| 98 ] |
| 99 handlers: [ |
| 100 ] |
| 101 |
| 102 --- |
| 103 snippet: " |
| 104 var test; |
| 105 (function() { |
| 106 class A { |
| 107 constructor(...args) { this.baseArgs = args; } |
| 108 } |
| 109 class B extends A { |
| 110 constructor(...args) { super(1, ...args, 1); } |
| 111 } |
| 112 test = new B(1, 2, 3).constructor; |
| 113 })(); |
| 114 " |
| 115 frame size: 13 |
| 116 parameter count: 1 |
| 117 bytecode array length: 96 |
| 118 bytecodes: [ |
| 119 B(CreateRestParameter), |
| 120 B(Star), R(2), |
| 121 B(Mov), R(closure), R(1), |
| 122 B(Mov), R(new_target), R(0), |
| 123 B(Ldar), R(new_target), |
| 124 /* 128 E> */ B(StackCheck), |
| 125 /* 140 S> */ B(LdaUndefined), |
| 126 B(Star), R(3), |
| 127 /* 140 E> */ B(CallRuntime), U16(Runtime::k_GetSuperConstructor), R(1), U8(1)
, |
| 128 B(Star), R(4), |
| 129 B(LdaUndefined), |
| 130 B(Star), R(7), |
| 131 B(CreateArrayLiteral), U8(0), U8(0), U8(9), |
| 132 B(Star), R(8), |
| 133 B(LdaUndefined), |
| 134 B(Star), R(11), |
| 135 B(Mov), R(2), R(12), |
| 136 /* 152 E> */ B(CallJSRuntime), U8(154), R(11), U8(2), |
| 137 B(Star), R(9), |
| 138 B(CreateArrayLiteral), U8(1), U8(1), U8(9), |
| 139 B(Star), R(10), |
| 140 B(CallJSRuntime), U8(153), R(7), U8(4), |
| 141 B(Star), R(5), |
| 142 B(Mov), R(0), R(6), |
| 143 /* 140 E> */ B(CallJSRuntime), U8(150), R(3), U8(4), |
| 144 B(Star), R(3), |
| 145 B(Ldar), R(this), |
| 146 B(JumpIfNotHole), U8(4), |
| 147 B(Jump), U8(11), |
| 148 B(LdaConstant), U8(2), |
| 149 B(Star), R(4), |
| 150 /* 140 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1), |
| 151 B(Mov), R(3), R(this), |
| 152 B(Ldar), R(this), |
| 153 B(JumpIfNotHole), U8(11), |
| 154 B(LdaConstant), U8(2), |
| 155 B(Star), R(3), |
| 156 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1), |
| 157 /* 162 S> */ B(Return), |
| 158 ] |
| 159 constant pool: [ |
| 160 FIXED_ARRAY_TYPE, |
| 161 FIXED_ARRAY_TYPE, |
| 162 ONE_BYTE_INTERNALIZED_STRING_TYPE ["this"], |
| 163 ] |
| 164 handlers: [ |
| 165 ] |
| 166 |
OLD | NEW |