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 var a = 1; return ++a; 13 " 14 frame size: 1 15 parameter count: 1 16 bytecode array length: 9 17 bytecodes: [ 18 /* 30 E> */ B(StackCheck), 19 /* 42 S> */ B(LdaSmi), U8(1), 20 B(Star), R(0), 21 /* 45 S> */ B(Inc), 22 B(Star), R(0), 23 /* 57 S> */ B(Return), 24 ] 25 constant pool: [ 26 ] 27 handlers: [ 28 ] 29 30 --- 31 snippet: " 32 var a = 1; return a++; 33 " 34 frame size: 2 35 parameter count: 1 36 bytecode array length: 14 37 bytecodes: [ 38 /* 30 E> */ B(StackCheck), 39 /* 42 S> */ B(LdaSmi), U8(1), 40 B(Star), R(0), 41 /* 45 S> */ B(ToNumber), 42 B(Star), R(1), 43 B(Inc), 44 B(Star), R(0), 45 B(Ldar), R(1), 46 /* 57 S> */ B(Return), 47 ] 48 constant pool: [ 49 ] 50 handlers: [ 51 ] 52 53 --- 54 snippet: " 55 var a = 1; return --a; 56 " 57 frame size: 1 58 parameter count: 1 59 bytecode array length: 9 60 bytecodes: [ 61 /* 30 E> */ B(StackCheck), 62 /* 42 S> */ B(LdaSmi), U8(1), 63 B(Star), R(0), 64 /* 45 S> */ B(Dec), 65 B(Star), R(0), 66 /* 57 S> */ B(Return), 67 ] 68 constant pool: [ 69 ] 70 handlers: [ 71 ] 72 73 --- 74 snippet: " 75 var a = 1; return a--; 76 " 77 frame size: 2 78 parameter count: 1 79 bytecode array length: 14 80 bytecodes: [ 81 /* 30 E> */ B(StackCheck), 82 /* 42 S> */ B(LdaSmi), U8(1), 83 B(Star), R(0), 84 /* 45 S> */ B(ToNumber), 85 B(Star), R(1), 86 B(Dec), 87 B(Star), R(0), 88 B(Ldar), R(1), 89 /* 57 S> */ B(Return), 90 ] 91 constant pool: [ 92 ] 93 handlers: [ 94 ] 95 96 --- 97 snippet: " 98 var a = { val: 1 }; return a.val++; 99 " 100 frame size: 3 101 parameter count: 1 102 bytecode array length: 24 103 bytecodes: [ 104 /* 30 E> */ B(StackCheck), 105 /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1), 106 B(Star), R(1), 107 B(Star), R(0), 108 /* 54 S> */ B(LdaNamedProperty), R(0), U8(1), U8(1), 109 B(ToNumber), 110 B(Star), R(2), 111 B(Inc), 112 /* 66 E> */ B(StaNamedPropertySloppy), R(0), U8(1), U8(3), 113 B(Ldar), R(2), 114 /* 70 S> */ B(Return), 115 ] 116 constant pool: [ 117 InstanceType::FIXED_ARRAY_TYPE, 118 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 119 ] 120 handlers: [ 121 ] 122 123 --- 124 snippet: " 125 var a = { val: 1 }; return --a.val; 126 " 127 frame size: 2 128 parameter count: 1 129 bytecode array length: 19 130 bytecodes: [ 131 /* 30 E> */ B(StackCheck), 132 /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1), 133 B(Star), R(1), 134 B(Star), R(0), 135 /* 54 S> */ B(LdaNamedProperty), R(0), U8(1), U8(1), 136 B(Dec), 137 /* 65 E> */ B(StaNamedPropertySloppy), R(0), U8(1), U8(3), 138 /* 70 S> */ B(Return), 139 ] 140 constant pool: [ 141 InstanceType::FIXED_ARRAY_TYPE, 142 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 143 ] 144 handlers: [ 145 ] 146 147 --- 148 snippet: " 149 var name = 'var'; var a = { val: 1 }; return a[name]--; 150 " 151 frame size: 5 152 parameter count: 1 153 bytecode array length: 29 154 bytecodes: [ 155 /* 30 E> */ B(StackCheck), 156 /* 45 S> */ B(LdaConstant), U8(0), 157 B(Star), R(0), 158 /* 60 S> */ B(CreateObjectLiteral), U8(1), U8(0), U8(1), 159 B(Star), R(2), 160 B(Star), R(1), 161 /* 72 S> */ B(Ldar), R(0), 162 /* 81 E> */ B(LdaKeyedProperty), R(1), U8(1), 163 B(ToNumber), 164 B(Star), R(4), 165 B(Dec), 166 /* 86 E> */ B(StaKeyedPropertySloppy), R(1), R(0), U8(3), 167 B(Ldar), R(4), 168 /* 90 S> */ B(Return), 169 ] 170 constant pool: [ 171 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 172 InstanceType::FIXED_ARRAY_TYPE, 173 ] 174 handlers: [ 175 ] 176 177 --- 178 snippet: " 179 var name = 'var'; var a = { val: 1 }; return ++a[name]; 180 " 181 frame size: 3 182 parameter count: 1 183 bytecode array length: 24 184 bytecodes: [ 185 /* 30 E> */ B(StackCheck), 186 /* 45 S> */ B(LdaConstant), U8(0), 187 B(Star), R(0), 188 /* 60 S> */ B(CreateObjectLiteral), U8(1), U8(0), U8(1), 189 B(Star), R(2), 190 B(Star), R(1), 191 /* 72 S> */ B(Ldar), R(0), 192 /* 83 E> */ B(LdaKeyedProperty), R(1), U8(1), 193 B(Inc), 194 /* 87 E> */ B(StaKeyedPropertySloppy), R(1), R(0), U8(3), 195 /* 90 S> */ B(Return), 196 ] 197 constant pool: [ 198 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 199 InstanceType::FIXED_ARRAY_TYPE, 200 ] 201 handlers: [ 202 ] 203 204 --- 205 snippet: " 206 var a = 1; var b = function() { return a }; return ++a; 207 " 208 frame size: 2 209 parameter count: 1 210 bytecode array length: 26 211 bytecodes: [ 212 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1), 213 B(PushContext), R(1), 214 /* 30 E> */ B(StackCheck), 215 /* 42 S> */ B(LdaSmi), U8(1), 216 /* 42 E> */ B(StaContextSlot), R(context), U8(4), 217 /* 53 S> */ B(CreateClosure), U8(0), U8(0), 218 B(Star), R(0), 219 /* 78 S> */ B(LdaContextSlot), R(context), U8(4), 220 B(Inc), 221 /* 87 E> */ B(StaContextSlot), R(context), U8(4), 222 /* 90 S> */ B(Return), 223 ] 224 constant pool: [ 225 InstanceType::SHARED_FUNCTION_INFO_TYPE, 226 ] 227 handlers: [ 228 ] 229 230 --- 231 snippet: " 232 var a = 1; var b = function() { return a }; return a--; 233 " 234 frame size: 3 235 parameter count: 1 236 bytecode array length: 31 237 bytecodes: [ 238 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1), 239 B(PushContext), R(1), 240 /* 30 E> */ B(StackCheck), 241 /* 42 S> */ B(LdaSmi), U8(1), 242 /* 42 E> */ B(StaContextSlot), R(context), U8(4), 243 /* 53 S> */ B(CreateClosure), U8(0), U8(0), 244 B(Star), R(0), 245 /* 78 S> */ B(LdaContextSlot), R(context), U8(4), 246 B(ToNumber), 247 B(Star), R(2), 248 B(Dec), 249 /* 86 E> */ B(StaContextSlot), R(context), U8(4), 250 B(Ldar), R(2), 251 /* 90 S> */ B(Return), 252 ] 253 constant pool: [ 254 InstanceType::SHARED_FUNCTION_INFO_TYPE, 255 ] 256 handlers: [ 257 ] 258 259 --- 260 snippet: " 261 var idx = 1; var a = [1, 2]; return a[idx++] = 2; 262 " 263 frame size: 4 264 parameter count: 1 265 bytecode array length: 26 266 bytecodes: [ 267 /* 30 E> */ B(StackCheck), 268 /* 44 S> */ B(LdaSmi), U8(1), 269 B(Star), R(0), 270 /* 55 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(3), 271 B(Star), R(1), 272 /* 63 S> */ B(Ldar), R(0), 273 B(ToNumber), 274 B(Star), R(3), 275 B(Inc), 276 B(Star), R(0), 277 B(LdaSmi), U8(2), 278 /* 79 E> */ B(StaKeyedPropertySloppy), R(1), R(3), U8(1), 279 /* 84 S> */ B(Return), 280 ] 281 constant pool: [ 282 InstanceType::FIXED_ARRAY_TYPE, 283 ] 284 handlers: [ 285 ] 286 287