OLD | NEW |
(Empty) | |
| 1 # |
| 2 # Autogenerated by generate-bytecode-expectations |
| 3 # |
| 4 |
| 5 --- |
| 6 pool type: mixed |
| 7 execute: yes |
| 8 wrap: yes |
| 9 |
| 10 --- |
| 11 snippet: " |
| 12 class Person { |
| 13 constructor(name) { this.name = name; } |
| 14 speak() { console.log(this.name + ' is speaking.'); } |
| 15 } |
| 16 " |
| 17 frame size: 9 # in multiples of sizeof(void*) |
| 18 parameter count: 1 |
| 19 bytecodes: [ |
| 20 B(LdaTheHole), |
| 21 B(Star), R(1), |
| 22 B(StackCheck), |
| 23 B(LdaTheHole), |
| 24 B(Star), R(0), |
| 25 B(LdaTheHole), |
| 26 B(Star), R(2), |
| 27 B(CreateClosure), U8(0), U8(0), |
| 28 B(Star), R(3), |
| 29 B(LdaSmi8), U8(34), |
| 30 B(Star), R(4), |
| 31 B(LdaConstant), U8(1), |
| 32 B(Star), R(5), |
| 33 B(CallRuntime), U16(62), R(2), U8(4), |
| 34 B(Star), R(2), |
| 35 B(LoadIC), R(2), U8(2), U8(1), |
| 36 B(Star), R(3), |
| 37 B(Mov), R(3), R(4), |
| 38 B(LdaConstant), U8(3), |
| 39 B(Star), R(5), |
| 40 B(CreateClosure), U8(4), U8(0), |
| 41 B(Star), R(6), |
| 42 B(LdaSmi8), U8(2), |
| 43 B(Star), R(7), |
| 44 B(LdaZero), |
| 45 B(Star), R(8), |
| 46 B(CallRuntime), U16(381), R(4), U8(5), |
| 47 B(CallRuntime), U16(63), R(2), U8(2), |
| 48 B(Star), R(0), |
| 49 B(Star), R(1), |
| 50 B(LdaUndefined), |
| 51 B(Return), |
| 52 ] |
| 53 constant pool: [ |
| 54 InstanceType::SHARED_FUNCTION_INFO_TYPE, |
| 55 kInstanceTypeDontCare, |
| 56 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
| 57 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
| 58 InstanceType::SHARED_FUNCTION_INFO_TYPE, |
| 59 ] |
| 60 handlers: [ |
| 61 ] |
| 62 |
| 63 --- |
| 64 snippet: " |
| 65 class person { |
| 66 constructor(name) { this.name = name; } |
| 67 speak() { console.log(this.name + ' is speaking.'); } |
| 68 } |
| 69 " |
| 70 frame size: 9 # in multiples of sizeof(void*) |
| 71 parameter count: 1 |
| 72 bytecodes: [ |
| 73 B(LdaTheHole), |
| 74 B(Star), R(1), |
| 75 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(LdaSmi8), U8(34), |
| 83 B(Star), R(4), |
| 84 B(LdaConstant), U8(1), |
| 85 B(Star), R(5), |
| 86 B(CallRuntime), U16(62), R(2), U8(4), |
| 87 B(Star), R(2), |
| 88 B(LoadIC), R(2), U8(2), U8(1), |
| 89 B(Star), R(3), |
| 90 B(Mov), R(3), R(4), |
| 91 B(LdaConstant), U8(3), |
| 92 B(Star), R(5), |
| 93 B(CreateClosure), U8(4), U8(0), |
| 94 B(Star), R(6), |
| 95 B(LdaSmi8), U8(2), |
| 96 B(Star), R(7), |
| 97 B(LdaZero), |
| 98 B(Star), R(8), |
| 99 B(CallRuntime), U16(381), R(4), U8(5), |
| 100 B(CallRuntime), U16(63), R(2), U8(2), |
| 101 B(Star), R(0), |
| 102 B(Star), R(1), |
| 103 B(LdaUndefined), |
| 104 B(Return), |
| 105 ] |
| 106 constant pool: [ |
| 107 InstanceType::SHARED_FUNCTION_INFO_TYPE, |
| 108 kInstanceTypeDontCare, |
| 109 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
| 110 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
| 111 InstanceType::SHARED_FUNCTION_INFO_TYPE, |
| 112 ] |
| 113 handlers: [ |
| 114 ] |
| 115 |
| 116 --- |
| 117 snippet: " |
| 118 var n0 = 'a';var n1 = 'b';class N { |
| 119 [n0]() { return n0; } |
| 120 static [n1]() { return n1; } |
| 121 } |
| 122 " |
| 123 frame size: 10 # in multiples of sizeof(void*) |
| 124 parameter count: 1 |
| 125 bytecodes: [ |
| 126 B(CallRuntime), U16(461), R(closure), U8(1), |
| 127 B(PushContext), R(2), |
| 128 B(LdaTheHole), |
| 129 B(Star), R(1), |
| 130 B(StackCheck), |
| 131 B(LdaConstant), U8(0), |
| 132 B(StaContextSlot), R(context), U8(4), |
| 133 B(LdaConstant), U8(1), |
| 134 B(StaContextSlot), R(context), U8(5), |
| 135 B(LdaTheHole), |
| 136 B(Star), R(0), |
| 137 B(LdaTheHole), |
| 138 B(Star), R(3), |
| 139 B(CreateClosure), U8(2), U8(0), |
| 140 B(Star), R(4), |
| 141 B(LdaSmi8), U8(60), |
| 142 B(Star), R(5), |
| 143 B(LdaSmi8), U8(126), |
| 144 B(Star), R(6), |
| 145 B(CallRuntime), U16(62), R(3), U8(4), |
| 146 B(Star), R(3), |
| 147 B(LoadIC), R(3), U8(3), U8(1), |
| 148 B(Star), R(4), |
| 149 B(Mov), R(4), R(5), |
| 150 B(LdaContextSlot), R(context), U8(4), |
| 151 B(ToName), |
| 152 B(Star), R(6), |
| 153 B(CreateClosure), U8(4), U8(0), |
| 154 B(Star), R(7), |
| 155 B(LdaSmi8), U8(2), |
| 156 B(Star), R(8), |
| 157 B(LdaSmi8), U8(1), |
| 158 B(Star), R(9), |
| 159 B(CallRuntime), U16(381), R(5), U8(5), |
| 160 B(Mov), R(3), R(5), |
| 161 B(LdaContextSlot), R(context), U8(5), |
| 162 B(ToName), |
| 163 B(Star), R(6), |
| 164 B(LdaConstant), U8(3), |
| 165 B(TestEqualStrict), R(6), |
| 166 B(JumpIfFalse), U8(7), |
| 167 B(CallRuntime), U16(59), R(0), U8(0), |
| 168 B(CreateClosure), U8(5), U8(0), |
| 169 B(Star), R(7), |
| 170 B(LdaSmi8), U8(1), |
| 171 B(Star), R(9), |
| 172 B(CallRuntime), U16(381), R(5), U8(5), |
| 173 B(CallRuntime), U16(63), R(3), U8(2), |
| 174 B(Star), R(0), |
| 175 B(Star), R(1), |
| 176 B(LdaUndefined), |
| 177 B(Return), |
| 178 ] |
| 179 constant 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 ] |
| 187 handlers: [ |
| 188 ] |
| 189 |
| 190 --- |
| 191 snippet: " |
| 192 var count = 0; |
| 193 class C { constructor() { count++; }} |
| 194 return new C(); |
| 195 " |
| 196 frame size: 10 # in multiples of sizeof(void*) |
| 197 parameter count: 1 |
| 198 bytecodes: [ |
| 199 B(CallRuntime), U16(461), R(closure), U8(1), |
| 200 B(PushContext), R(2), |
| 201 B(LdaTheHole), |
| 202 B(Star), R(1), |
| 203 B(StackCheck), |
| 204 B(LdaZero), |
| 205 B(StaContextSlot), R(context), U8(4), |
| 206 B(LdaTheHole), |
| 207 B(Star), R(0), |
| 208 B(LdaTheHole), |
| 209 B(Star), R(3), |
| 210 B(CreateClosure), U8(0), U8(0), |
| 211 B(Star), R(4), |
| 212 B(LdaSmi8), U8(49), |
| 213 B(Star), R(5), |
| 214 B(LdaSmi8), U8(86), |
| 215 B(Star), R(6), |
| 216 B(CallRuntime), U16(62), R(3), U8(4), |
| 217 B(Star), R(3), |
| 218 B(LoadIC), R(3), U8(1), U8(1), |
| 219 B(Star), R(4), |
| 220 B(CallRuntime), U16(63), R(3), U8(2), |
| 221 B(Star), R(0), |
| 222 B(Star), R(1), |
| 223 B(JumpIfNotHole), U8(11), |
| 224 B(LdaConstant), U8(2), |
| 225 B(Star), R(4), |
| 226 B(CallRuntime), U16(257), R(4), U8(1), |
| 227 B(Star), R(3), |
| 228 B(New), R(3), R(0), U8(0), |
| 229 B(Return), |
| 230 ] |
| 231 constant pool: [ |
| 232 InstanceType::SHARED_FUNCTION_INFO_TYPE, |
| 233 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
| 234 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
| 235 ] |
| 236 handlers: [ |
| 237 ] |
| 238 |
OLD | NEW |