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: 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 |
| 18 | parameter count: 1 |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 19 | bytecode array length: 72 |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 20 | bytecodes: [ |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 21 | B(LdaTheHole), |
| 22 | B(Star), R(1), |
| 23 | /* 30 E> */ B(StackCheck), |
| 24 | B(LdaTheHole), |
| 25 | B(Star), R(0), |
| 26 | B(LdaTheHole), |
| 27 | B(Star), R(2), |
| 28 | B(CreateClosure), U8(0), U8(0), |
| 29 | B(Star), R(3), |
| 30 | B(LdaSmi), U8(34), |
| 31 | B(Star), R(4), |
| 32 | B(Wide), B(LdaSmi), U16(148), |
| 33 | B(Star), R(5), |
| 34 | B(CallRuntime), U16(Runtime::kDefineClass), R(2), U8(4), |
| 35 | B(Star), R(2), |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 36 | B(LdrNamedProperty), R(2), U8(1), U8(1), R(3), |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 37 | B(LdaConstant), U8(2), |
| 38 | B(Star), R(5), |
| 39 | B(CreateClosure), U8(3), U8(0), |
| 40 | B(Star), R(6), |
| 41 | B(LdaSmi), U8(2), |
| 42 | B(Star), R(7), |
| 43 | B(LdaZero), |
| 44 | B(Star), R(8), |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 45 | B(Mov), R(3), R(4), |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 46 | B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(4), U8(5), |
| 47 | B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1), |
| 48 | B(Star), R(0), |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 49 | B(Star), R(1), |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 50 | B(LdaUndefined), |
| 51 | /* 149 S> */ B(Return), |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 52 | ] |
| 53 | constant pool: [ |
| 54 | InstanceType::SHARED_FUNCTION_INFO_TYPE, |
| 55 | InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
| 56 | InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
| 57 | InstanceType::SHARED_FUNCTION_INFO_TYPE, |
| 58 | ] |
| 59 | handlers: [ |
| 60 | ] |
| 61 | |
| 62 | --- |
| 63 | snippet: " |
| 64 | class person { |
| 65 | constructor(name) { this.name = name; } |
| 66 | speak() { console.log(this.name + ' is speaking.'); } |
| 67 | } |
| 68 | " |
| 69 | frame size: 9 |
| 70 | parameter count: 1 |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 71 | bytecode array length: 72 |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 72 | bytecodes: [ |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 73 | B(LdaTheHole), |
| 74 | B(Star), R(1), |
| 75 | /* 30 E> */ 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(LdaSmi), U8(34), |
| 83 | B(Star), R(4), |
| 84 | B(Wide), B(LdaSmi), U16(148), |
| 85 | B(Star), R(5), |
| 86 | B(CallRuntime), U16(Runtime::kDefineClass), R(2), U8(4), |
| 87 | B(Star), R(2), |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 88 | B(LdrNamedProperty), R(2), U8(1), U8(1), R(3), |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 89 | B(LdaConstant), U8(2), |
| 90 | B(Star), R(5), |
| 91 | B(CreateClosure), U8(3), U8(0), |
| 92 | B(Star), R(6), |
| 93 | B(LdaSmi), U8(2), |
| 94 | B(Star), R(7), |
| 95 | B(LdaZero), |
| 96 | B(Star), R(8), |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 97 | B(Mov), R(3), R(4), |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 98 | B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(4), U8(5), |
| 99 | B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1), |
| 100 | B(Star), R(0), |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 101 | B(Star), R(1), |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 102 | B(LdaUndefined), |
| 103 | /* 149 S> */ B(Return), |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 104 | ] |
| 105 | constant pool: [ |
| 106 | InstanceType::SHARED_FUNCTION_INFO_TYPE, |
| 107 | InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
| 108 | InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
| 109 | InstanceType::SHARED_FUNCTION_INFO_TYPE, |
| 110 | ] |
| 111 | handlers: [ |
| 112 | ] |
| 113 | |
| 114 | --- |
| 115 | snippet: " |
| 116 | var n0 = 'a'; |
| 117 | var n1 = 'b'; |
| 118 | class N { |
| 119 | [n0]() { return n0; } |
| 120 | static [n1]() { return n1; } |
| 121 | } |
| 122 | " |
| 123 | frame size: 10 |
| 124 | parameter count: 1 |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 125 | bytecode array length: 126 |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 126 | bytecodes: [ |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 127 | B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1), |
| 128 | B(PushContext), R(2), |
| 129 | B(LdaTheHole), |
| 130 | B(Star), R(1), |
| 131 | /* 30 E> */ B(StackCheck), |
| 132 | /* 43 S> */ B(LdaConstant), U8(0), |
| 133 | /* 43 E> */ B(StaContextSlot), R(context), U8(4), |
| 134 | /* 57 S> */ B(LdaConstant), U8(1), |
| 135 | /* 57 E> */ B(StaContextSlot), R(context), U8(5), |
| 136 | B(LdaTheHole), |
| 137 | B(Star), R(0), |
| 138 | B(LdaTheHole), |
| 139 | B(Star), R(3), |
| 140 | B(CreateClosure), U8(2), U8(0), |
| 141 | B(Star), R(4), |
| 142 | B(LdaSmi), U8(62), |
| 143 | B(Star), R(5), |
| 144 | B(Wide), B(LdaSmi), U16(128), |
| 145 | B(Star), R(6), |
| 146 | B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4), |
| 147 | B(Star), R(3), |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 148 | B(LdrNamedProperty), R(3), U8(3), U8(1), R(4), |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 149 | /* 75 E> */ B(LdaContextSlot), R(context), U8(4), |
| 150 | B(ToName), |
| 151 | B(Star), R(6), |
| 152 | B(CreateClosure), U8(4), U8(0), |
| 153 | B(Star), R(7), |
| 154 | B(LdaSmi), U8(2), |
| 155 | B(Star), R(8), |
| 156 | B(LdaSmi), U8(1), |
| 157 | B(Star), R(9), |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 158 | B(Mov), R(4), R(5), |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 159 | B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5), U8(5), |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 160 | /* 106 E> */ B(LdaContextSlot), R(context), U8(5), |
| 161 | B(ToName), |
| 162 | B(Star), R(6), |
| 163 | B(LdaConstant), U8(3), |
| 164 | B(TestEqualStrict), R(6), |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 165 | B(Mov), R(3), R(5), |
| 166 | B(JumpIfToBooleanFalse), U8(7), |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 167 | B(CallRuntime), U16(Runtime::kThrowStaticPrototypeError), R(0), U8(0), |
| 168 | B(CreateClosure), U8(5), U8(0), |
| 169 | B(Star), R(7), |
| 170 | B(LdaSmi), U8(1), |
| 171 | B(Star), R(9), |
| 172 | B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5), U8(5), |
| 173 | B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1), |
| 174 | B(Star), R(0), |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 175 | B(Star), R(1), |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 176 | B(LdaUndefined), |
| 177 | /* 129 S> */ B(Return), |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 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 | " |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 196 | frame size: 7 |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 197 | parameter count: 1 |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 198 | bytecode array length: 73 |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 199 | bytecodes: [ |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 200 | B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1), |
| 201 | B(PushContext), R(2), |
| 202 | B(LdaTheHole), |
| 203 | B(Star), R(1), |
| 204 | /* 30 E> */ B(StackCheck), |
| 205 | /* 46 S> */ B(LdaZero), |
| 206 | /* 46 E> */ B(StaContextSlot), R(context), U8(4), |
| 207 | B(LdaTheHole), |
| 208 | B(Star), R(0), |
| 209 | B(LdaTheHole), |
| 210 | B(Star), R(3), |
| 211 | B(CreateClosure), U8(0), U8(0), |
| 212 | B(Star), R(4), |
| 213 | B(LdaSmi), U8(49), |
| 214 | B(Star), R(5), |
| 215 | B(LdaSmi), U8(86), |
| 216 | B(Star), R(6), |
| 217 | B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4), |
| 218 | B(Star), R(3), |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 219 | B(LdrNamedProperty), R(3), U8(1), U8(1), R(4), |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 220 | B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1), |
| 221 | B(Star), R(0), |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 222 | B(Star), R(1), |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 223 | /* 87 S> */ B(JumpIfNotHole), U8(11), |
| 224 | B(LdaConstant), U8(2), |
| 225 | B(Star), R(4), |
| 226 | B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1), |
| 227 | B(Star), R(3), |
| 228 | /* 94 E> */ B(New), R(3), R(0), U8(0), |
| 229 | /* 103 S> */ B(Return), |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 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 | |