| OLD | NEW |
| 1 # | 1 # |
| 2 # Autogenerated by generate-bytecode-expectations. | 2 # Autogenerated by generate-bytecode-expectations. |
| 3 # | 3 # |
| 4 | 4 |
| 5 --- | 5 --- |
| 6 wrap: yes | 6 wrap: yes |
| 7 | 7 |
| 8 --- | 8 --- |
| 9 snippet: " | 9 snippet: " |
| 10 for (var p in null) {} | 10 for (var p in null) {} |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 constant pool: [ | 54 constant pool: [ |
| 55 ] | 55 ] |
| 56 handlers: [ | 56 handlers: [ |
| 57 ] | 57 ] |
| 58 | 58 |
| 59 --- | 59 --- |
| 60 snippet: " | 60 snippet: " |
| 61 var x = 'potatoes'; | 61 var x = 'potatoes'; |
| 62 for (var p in x) { return p; } | 62 for (var p in x) { return p; } |
| 63 " | 63 " |
| 64 frame size: 8 | 64 frame size: 9 |
| 65 parameter count: 1 | 65 parameter count: 1 |
| 66 bytecode array length: 45 | 66 bytecode array length: 55 |
| 67 bytecodes: [ | 67 bytecodes: [ |
| 68 /* 30 E> */ B(StackCheck), | 68 /* 30 E> */ B(StackCheck), |
| 69 /* 42 S> */ B(LdaConstant), U8(0), | 69 /* 42 S> */ B(LdaConstant), U8(0), |
| 70 B(Star), R(3), |
| 71 B(LdaConstant), U8(1), |
| 70 B(Star), R(0), | 72 B(Star), R(0), |
| 71 /* 68 S> */ B(JumpIfUndefined), U8(38), | 73 /* 68 S> */ B(JumpIfUndefined), U8(44), |
| 72 B(JumpIfNull), U8(36), | 74 B(JumpIfNull), U8(42), |
| 73 B(ToObject), R(3), | 75 B(ToObject), R(3), |
| 74 B(ForInPrepare), R(3), R(4), | 76 B(ForInPrepare), R(3), R(4), |
| 75 B(LdaZero), | 77 B(LdaZero), |
| 76 B(Star), R(7), | 78 B(Star), R(7), |
| 77 /* 63 S> */ B(ForInContinue), R(7), R(6), | 79 /* 63 S> */ B(ForInContinue), R(7), R(6), |
| 78 B(JumpIfFalse), U8(23), | 80 B(JumpIfFalse), U8(29), |
| 79 B(ForInNext), R(3), R(7), R(4), U8(2), | 81 B(ForInNext), R(3), R(7), R(4), U8(6), |
| 80 B(JumpIfUndefined), U8(9), | 82 B(JumpIfUndefined), U8(15), |
| 81 B(Star), R(1), | 83 B(Star), R(1), |
| 82 /* 54 E> */ B(StackCheck), | 84 /* 54 E> */ B(StackCheck), |
| 83 B(Star), R(2), | 85 B(LdaConstant), U8(2), |
| 84 /* 73 S> */ B(Nop), | 86 B(Star), R(8), |
| 87 B(Mov), R(1), R(2), |
| 88 /* 73 S> */ B(Ldar), R(2), |
| 85 /* 85 S> */ B(Return), | 89 /* 85 S> */ B(Return), |
| 86 B(ForInStep), R(7), | 90 B(ForInStep), R(7), |
| 87 B(Star), R(7), | 91 B(Star), R(7), |
| 88 B(JumpLoop), U8(23), I8(0), | 92 B(JumpLoop), U8(29), I8(0), |
| 89 B(LdaUndefined), | 93 B(LdaUndefined), |
| 90 /* 85 S> */ B(Return), | 94 /* 85 S> */ B(Return), |
| 91 ] | 95 ] |
| 92 constant pool: [ | 96 constant pool: [ |
| 97 ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"], |
| 93 ONE_BYTE_INTERNALIZED_STRING_TYPE ["potatoes"], | 98 ONE_BYTE_INTERNALIZED_STRING_TYPE ["potatoes"], |
| 99 ONE_BYTE_INTERNALIZED_STRING_TYPE ["p"], |
| 94 ] | 100 ] |
| 95 handlers: [ | 101 handlers: [ |
| 96 ] | 102 ] |
| 97 | 103 |
| 98 --- | 104 --- |
| 99 snippet: " | 105 snippet: " |
| 100 var x = 0; | 106 var x = 0; |
| 101 for (var p in [1,2,3]) { x += p; } | 107 for (var p in [1,2,3]) { x += p; } |
| 102 " | 108 " |
| 103 frame size: 9 | 109 frame size: 10 |
| 104 parameter count: 1 | 110 parameter count: 1 |
| 105 bytecode array length: 56 | 111 bytecode array length: 69 |
| 106 bytecodes: [ | 112 bytecodes: [ |
| 107 /* 30 E> */ B(StackCheck), | 113 /* 30 E> */ B(StackCheck), |
| 108 /* 42 S> */ B(LdaZero), | 114 /* 42 S> */ B(LdaConstant), U8(0), |
| 115 B(Star), R(3), |
| 116 B(LdaZero), |
| 109 B(Star), R(0), | 117 B(Star), R(0), |
| 110 /* 59 S> */ B(CreateArrayLiteral), U8(0), U8(2), U8(9), | 118 /* 59 S> */ B(CreateArrayLiteral), U8(1), U8(4), U8(9), |
| 111 B(JumpIfUndefined), U8(46), | 119 B(JumpIfUndefined), U8(55), |
| 112 B(JumpIfNull), U8(44), | 120 B(JumpIfNull), U8(53), |
| 113 B(ToObject), R(3), | 121 B(ToObject), R(3), |
| 114 B(ForInPrepare), R(3), R(4), | 122 B(ForInPrepare), R(3), R(4), |
| 115 B(LdaZero), | 123 B(LdaZero), |
| 116 B(Star), R(7), | 124 B(Star), R(7), |
| 117 /* 54 S> */ B(ForInContinue), R(7), R(6), | 125 /* 54 S> */ B(ForInContinue), R(7), R(6), |
| 118 B(JumpIfFalse), U8(31), | 126 B(JumpIfFalse), U8(40), |
| 119 B(ForInNext), R(3), R(7), R(4), U8(4), | 127 B(ForInNext), R(3), R(7), R(4), U8(10), |
| 120 B(JumpIfUndefined), U8(17), | 128 B(JumpIfUndefined), U8(26), |
| 121 B(Star), R(1), | 129 B(Star), R(1), |
| 122 /* 45 E> */ B(StackCheck), | 130 /* 45 E> */ B(StackCheck), |
| 123 B(Star), R(2), | 131 B(LdaConstant), U8(2), |
| 124 /* 70 S> */ B(Ldar), R(1), | 132 B(Star), R(8), |
| 125 /* 75 E> */ B(Add), R(0), U8(3), | 133 B(Mov), R(1), R(2), |
| 126 B(Mov), R(0), R(8), | 134 /* 70 S> */ B(LdaConstant), U8(0), |
| 135 B(Star), R(8), |
| 136 B(Ldar), R(1), |
| 137 /* 75 E> */ B(Add), R(0), U8(7), |
| 138 B(Mov), R(0), R(9), |
| 127 B(Star), R(0), | 139 B(Star), R(0), |
| 128 /* 72 E> */ B(ForInStep), R(7), | 140 /* 72 E> */ B(ForInStep), R(7), |
| 129 B(Star), R(7), | 141 B(Star), R(7), |
| 130 B(JumpLoop), U8(31), I8(0), | 142 B(JumpLoop), U8(40), I8(0), |
| 131 B(LdaUndefined), | 143 B(LdaUndefined), |
| 132 /* 80 S> */ B(Return), | 144 /* 80 S> */ B(Return), |
| 133 ] | 145 ] |
| 134 constant pool: [ | 146 constant pool: [ |
| 147 ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"], |
| 135 CONSTANT_ELEMENTS_PAIR_TYPE, | 148 CONSTANT_ELEMENTS_PAIR_TYPE, |
| 149 ONE_BYTE_INTERNALIZED_STRING_TYPE ["p"], |
| 136 ] | 150 ] |
| 137 handlers: [ | 151 handlers: [ |
| 138 ] | 152 ] |
| 139 | 153 |
| 140 --- | 154 --- |
| 141 snippet: " | 155 snippet: " |
| 142 var x = { 'a': 1, 'b': 2 }; | 156 var x = { 'a': 1, 'b': 2 }; |
| 143 for (x['a'] in [10, 20, 30]) { | 157 for (x['a'] in [10, 20, 30]) { |
| 144 if (x['a'] == 10) continue; | 158 if (x['a'] == 10) continue; |
| 145 if (x['a'] == 20) break; | 159 if (x['a'] == 20) break; |
| 146 } | 160 } |
| 147 " | 161 " |
| 148 frame size: 7 | 162 frame size: 7 |
| 149 parameter count: 1 | 163 parameter count: 1 |
| 150 bytecode array length: 85 | 164 bytecode array length: 89 |
| 151 bytecodes: [ | 165 bytecodes: [ |
| 152 /* 30 E> */ B(StackCheck), | 166 /* 30 E> */ B(StackCheck), |
| 153 /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(1), | 167 /* 42 S> */ B(LdaConstant), U8(0), |
| 154 B(Mov), R(1), R(0), | 168 B(CreateObjectLiteral), U8(1), U8(2), U8(1), R(2), |
| 155 /* 77 S> */ B(CreateArrayLiteral), U8(1), U8(3), U8(9), | 169 B(Star), R(1), |
| 170 B(Mov), R(2), R(0), |
| 171 /* 77 S> */ B(CreateArrayLiteral), U8(2), U8(5), U8(9), |
| 156 B(JumpIfUndefined), U8(70), | 172 B(JumpIfUndefined), U8(70), |
| 157 B(JumpIfNull), U8(68), | 173 B(JumpIfNull), U8(68), |
| 158 B(ToObject), R(1), | 174 B(ToObject), R(1), |
| 159 B(ForInPrepare), R(1), R(2), | 175 B(ForInPrepare), R(1), R(2), |
| 160 B(LdaZero), | 176 B(LdaZero), |
| 161 B(Star), R(5), | 177 B(Star), R(5), |
| 162 /* 68 S> */ B(ForInContinue), R(5), R(4), | 178 /* 68 S> */ B(ForInContinue), R(5), R(4), |
| 163 B(JumpIfFalse), U8(55), | 179 B(JumpIfFalse), U8(55), |
| 164 B(ForInNext), R(1), R(5), R(2), U8(14), | 180 B(ForInNext), R(1), R(5), R(2), U8(16), |
| 165 B(JumpIfUndefined), U8(41), | 181 B(JumpIfUndefined), U8(41), |
| 166 B(Star), R(6), | 182 B(Star), R(6), |
| 167 /* 67 E> */ B(StaNamedPropertySloppy), R(0), U8(2), U8(12), | 183 /* 67 E> */ B(StaNamedPropertySloppy), R(0), U8(3), U8(14), |
| 168 /* 62 E> */ B(StackCheck), | 184 /* 62 E> */ B(StackCheck), |
| 169 /* 95 S> */ B(Nop), | 185 /* 95 S> */ B(Nop), |
| 170 /* 100 E> */ B(LdaNamedProperty), R(0), U8(2), U8(6), | 186 /* 100 E> */ B(LdaNamedProperty), R(0), U8(3), U8(8), |
| 171 B(Star), R(6), | 187 B(Star), R(6), |
| 172 B(LdaSmi), I8(10), | 188 B(LdaSmi), I8(10), |
| 173 /* 106 E> */ B(TestEqual), R(6), U8(8), | 189 /* 106 E> */ B(TestEqual), R(6), U8(10), |
| 174 B(JumpIfFalse), U8(4), | 190 B(JumpIfFalse), U8(4), |
| 175 /* 113 S> */ B(Jump), U8(18), | 191 /* 113 S> */ B(Jump), U8(18), |
| 176 /* 125 S> */ B(Nop), | 192 /* 125 S> */ B(Nop), |
| 177 /* 130 E> */ B(LdaNamedProperty), R(0), U8(2), U8(9), | 193 /* 130 E> */ B(LdaNamedProperty), R(0), U8(3), U8(11), |
| 178 B(Star), R(6), | 194 B(Star), R(6), |
| 179 B(LdaSmi), I8(20), | 195 B(LdaSmi), I8(20), |
| 180 /* 136 E> */ B(TestEqual), R(6), U8(11), | 196 /* 136 E> */ B(TestEqual), R(6), U8(13), |
| 181 B(JumpIfFalse), U8(4), | 197 B(JumpIfFalse), U8(4), |
| 182 /* 143 S> */ B(Jump), U8(9), | 198 /* 143 S> */ B(Jump), U8(9), |
| 183 B(ForInStep), R(5), | 199 B(ForInStep), R(5), |
| 184 B(Star), R(5), | 200 B(Star), R(5), |
| 185 B(JumpLoop), U8(55), I8(0), | 201 B(JumpLoop), U8(55), I8(0), |
| 186 B(LdaUndefined), | 202 B(LdaUndefined), |
| 187 /* 152 S> */ B(Return), | 203 /* 152 S> */ B(Return), |
| 188 ] | 204 ] |
| 189 constant pool: [ | 205 constant pool: [ |
| 206 ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"], |
| 190 FIXED_ARRAY_TYPE, | 207 FIXED_ARRAY_TYPE, |
| 191 CONSTANT_ELEMENTS_PAIR_TYPE, | 208 CONSTANT_ELEMENTS_PAIR_TYPE, |
| 192 ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"], | 209 ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"], |
| 193 ] | 210 ] |
| 194 handlers: [ | 211 handlers: [ |
| 195 ] | 212 ] |
| 196 | 213 |
| 197 --- | 214 --- |
| 198 snippet: " | 215 snippet: " |
| 199 var x = [ 10, 11, 12 ] ; | 216 var x = [ 10, 11, 12 ] ; |
| 200 for (x[0] in [1,2,3]) { return x[3]; } | 217 for (x[0] in [1,2,3]) { return x[3]; } |
| 201 " | 218 " |
| 202 frame size: 9 | 219 frame size: 9 |
| 203 parameter count: 1 | 220 parameter count: 1 |
| 204 bytecode array length: 62 | 221 bytecode array length: 66 |
| 205 bytecodes: [ | 222 bytecodes: [ |
| 206 /* 30 E> */ B(StackCheck), | 223 /* 30 E> */ B(StackCheck), |
| 207 /* 42 S> */ B(CreateArrayLiteral), U8(0), U8(2), U8(9), | 224 /* 42 S> */ B(LdaConstant), U8(0), |
| 225 B(Star), R(1), |
| 226 B(CreateArrayLiteral), U8(1), U8(2), U8(9), |
| 208 B(Star), R(0), | 227 B(Star), R(0), |
| 209 /* 72 S> */ B(CreateArrayLiteral), U8(1), U8(3), U8(9), | 228 /* 72 S> */ B(CreateArrayLiteral), U8(2), U8(5), U8(9), |
| 210 B(JumpIfUndefined), U8(49), | 229 B(JumpIfUndefined), U8(49), |
| 211 B(JumpIfNull), U8(47), | 230 B(JumpIfNull), U8(47), |
| 212 B(ToObject), R(1), | 231 B(ToObject), R(1), |
| 213 B(ForInPrepare), R(1), R(2), | 232 B(ForInPrepare), R(1), R(2), |
| 214 B(LdaZero), | 233 B(LdaZero), |
| 215 B(Star), R(5), | 234 B(Star), R(5), |
| 216 /* 65 S> */ B(ForInContinue), R(5), R(4), | 235 /* 65 S> */ B(ForInContinue), R(5), R(4), |
| 217 B(JumpIfFalse), U8(34), | 236 B(JumpIfFalse), U8(34), |
| 218 B(ForInNext), R(1), R(5), R(2), U8(10), | 237 B(ForInNext), R(1), R(5), R(2), U8(12), |
| 219 B(JumpIfUndefined), U8(20), | 238 B(JumpIfUndefined), U8(20), |
| 220 B(Star), R(6), | 239 B(Star), R(6), |
| 221 B(LdaZero), | 240 B(LdaZero), |
| 222 B(Star), R(8), | 241 B(Star), R(8), |
| 223 B(Ldar), R(6), | 242 B(Ldar), R(6), |
| 224 /* 64 E> */ B(StaKeyedPropertySloppy), R(0), R(8), U8(8), | 243 /* 64 E> */ B(StaKeyedPropertySloppy), R(0), R(8), U8(10), |
| 225 /* 59 E> */ B(StackCheck), | 244 /* 59 E> */ B(StackCheck), |
| 226 /* 83 S> */ B(LdaSmi), I8(3), | 245 /* 83 S> */ B(LdaSmi), I8(3), |
| 227 /* 91 E> */ B(LdaKeyedProperty), R(0), U8(6), | 246 /* 91 E> */ B(LdaKeyedProperty), R(0), U8(8), |
| 228 /* 98 S> */ B(Return), | 247 /* 98 S> */ B(Return), |
| 229 B(ForInStep), R(5), | 248 B(ForInStep), R(5), |
| 230 B(Star), R(5), | 249 B(Star), R(5), |
| 231 B(JumpLoop), U8(34), I8(0), | 250 B(JumpLoop), U8(34), I8(0), |
| 232 B(LdaUndefined), | 251 B(LdaUndefined), |
| 233 /* 98 S> */ B(Return), | 252 /* 98 S> */ B(Return), |
| 234 ] | 253 ] |
| 235 constant pool: [ | 254 constant pool: [ |
| 255 ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"], |
| 236 CONSTANT_ELEMENTS_PAIR_TYPE, | 256 CONSTANT_ELEMENTS_PAIR_TYPE, |
| 237 CONSTANT_ELEMENTS_PAIR_TYPE, | 257 CONSTANT_ELEMENTS_PAIR_TYPE, |
| 238 ] | 258 ] |
| 239 handlers: [ | 259 handlers: [ |
| 240 ] | 260 ] |
| 241 | 261 |
| OLD | NEW |