1# 2# Autogenerated by generate-bytecode-expectations. 3# 4 5--- 6pool type: mixed 7execute: yes 8wrap: yes 9 10--- 11snippet: " 12 var x = 0; 13 label: { 14 x = x + 1; 15 break label; 16 x = x + 1; 17 } 18 return x; 19" 20frame size: 1 21parameter count: 1 22bytecode array length: 15 23bytecodes: [ 24 /* 30 E> */ B(StackCheck), 25 /* 42 S> */ B(LdaZero), 26 B(Star), R(0), 27 /* 56 S> */ B(LdaSmi), U8(1), 28 B(Add), R(0), 29 B(Star), R(0), 30 /* 69 S> */ B(Jump), U8(2), 31 /* 97 S> */ B(Ldar), R(0), 32 /* 107 S> */ B(Return), 33] 34constant pool: [ 35] 36handlers: [ 37] 38 39--- 40snippet: " 41 var sum = 0; 42 outer: { 43 for (var x = 0; x < 10; ++x) { 44 for (var y = 0; y < 3; ++y) { 45 ++sum; 46 if (x + y == 12) { break outer; } 47 } 48 } 49 } 50 return sum; 51" 52frame size: 5 53parameter count: 1 54bytecode array length: 60 55bytecodes: [ 56 /* 30 E> */ B(StackCheck), 57 /* 44 S> */ B(LdaZero), 58 B(Star), R(0), 59 /* 71 S> */ B(LdaZero), 60 B(Star), R(1), 61 /* 76 S> */ B(LdaSmi), U8(10), 62 /* 76 E> */ B(TestLessThan), R(1), 63 B(JumpIfFalse), U8(46), 64 /* 58 E> */ B(StackCheck), 65 /* 106 S> */ B(LdaZero), 66 B(Star), R(2), 67 /* 111 S> */ B(LdaSmi), U8(3), 68 /* 111 E> */ B(TestLessThan), R(2), 69 B(JumpIfFalse), U8(29), 70 /* 93 E> */ B(StackCheck), 71 /* 129 S> */ B(Ldar), R(0), 72 B(Inc), 73 B(Star), R(0), 74 /* 142 S> */ B(Ldar), R(2), 75 /* 150 E> */ B(Add), R(1), 76 B(Star), R(4), 77 B(LdaSmi), U8(12), 78 /* 152 E> */ B(TestEqual), R(4), 79 B(JumpIfFalse), U8(4), 80 /* 161 S> */ B(Jump), U8(16), 81 /* 118 S> */ B(Ldar), R(2), 82 B(Inc), 83 B(Star), R(2), 84 B(Jump), U8(-31), 85 /* 84 S> */ B(Ldar), R(1), 86 B(Inc), 87 B(Star), R(1), 88 B(Jump), U8(-48), 89 /* 188 S> */ B(Ldar), R(0), 90 /* 200 S> */ B(Return), 91] 92constant pool: [ 93] 94handlers: [ 95] 96 97--- 98snippet: " 99 outer: { 100 let y = 10; 101 function f() { return y; } 102 break outer; 103 } 104" 105frame size: 5 106parameter count: 1 107bytecode array length: 50 108bytecodes: [ 109 /* 30 E> */ B(StackCheck), 110 B(LdaConstant), U8(0), 111 B(Star), R(3), 112 B(Mov), R(closure), R(4), 113 B(CallRuntime), U16(Runtime::kPushBlockContext), R(3), U8(2), 114 B(PushContext), R(2), 115 B(LdaTheHole), 116 B(StaContextSlot), R(context), U8(4), 117 B(CreateClosure), U8(1), U8(0), 118 B(Star), R(0), 119 /* 53 S> */ B(LdaSmi), U8(10), 120 /* 53 E> */ B(StaContextSlot), R(context), U8(4), 121 B(Ldar), R(0), 122 B(JumpIfNotHole), U8(11), 123 B(LdaConstant), U8(2), 124 B(Star), R(3), 125 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1), 126 B(Star), R(1), 127 /* 88 S> */ B(Jump), U8(2), 128 B(PopContext), R(2), 129 B(LdaUndefined), 130 /* 103 S> */ B(Return), 131] 132constant pool: [ 133 InstanceType::FIXED_ARRAY_TYPE, 134 InstanceType::SHARED_FUNCTION_INFO_TYPE, 135 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 136] 137handlers: [ 138] 139 140--- 141snippet: " 142 let x = 1; 143 outer: { 144 inner: { 145 let y = 2; 146 function f() { return x + y; } 147 if (y) break outer; 148 y = 3; 149 } 150 } 151 x = 4; 152" 153frame size: 6 154parameter count: 1 155bytecode array length: 130 156bytecodes: [ 157 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1), 158 B(PushContext), R(2), 159 B(LdaTheHole), 160 B(StaContextSlot), R(context), U8(4), 161 /* 30 E> */ B(StackCheck), 162 /* 42 S> */ B(LdaSmi), U8(1), 163 /* 42 E> */ B(StaContextSlot), R(context), U8(4), 164 B(LdaConstant), U8(0), 165 B(Star), R(4), 166 B(Mov), R(closure), R(5), 167 B(CallRuntime), U16(Runtime::kPushBlockContext), R(4), U8(2), 168 B(PushContext), R(3), 169 B(LdaTheHole), 170 B(StaContextSlot), R(context), U8(4), 171 B(CreateClosure), U8(1), U8(0), 172 B(Star), R(0), 173 /* 76 S> */ B(LdaSmi), U8(2), 174 /* 76 E> */ B(StaContextSlot), R(context), U8(4), 175 B(Ldar), R(0), 176 B(JumpIfNotHole), U8(11), 177 B(LdaConstant), U8(2), 178 B(Star), R(4), 179 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1), 180 B(Star), R(1), 181 /* 118 S> */ B(LdaContextSlot), R(context), U8(4), 182 B(JumpIfNotHole), U8(11), 183 B(LdaConstant), U8(3), 184 B(Star), R(4), 185 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1), 186 B(JumpIfToBooleanFalse), U8(6), 187 /* 125 S> */ B(PopContext), R(3), 188 B(Jump), U8(27), 189 /* 142 S> */ B(LdaSmi), U8(3), 190 B(Star), R(4), 191 /* 144 E> */ B(LdaContextSlot), R(context), U8(4), 192 B(JumpIfNotHole), U8(11), 193 B(LdaConstant), U8(3), 194 B(Star), R(5), 195 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1), 196 B(Ldar), R(4), 197 B(StaContextSlot), R(context), U8(4), 198 B(PopContext), R(3), 199 /* 155 S> */ B(LdaSmi), U8(4), 200 B(Star), R(4), 201 /* 157 E> */ B(LdaContextSlot), R(context), U8(4), 202 B(JumpIfNotHole), U8(11), 203 B(LdaConstant), U8(4), 204 B(Star), R(5), 205 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1), 206 B(Ldar), R(4), 207 B(StaContextSlot), R(context), U8(4), 208 B(LdaUndefined), 209 /* 162 S> */ B(Return), 210] 211constant pool: [ 212 InstanceType::FIXED_ARRAY_TYPE, 213 InstanceType::SHARED_FUNCTION_INFO_TYPE, 214 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 215 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 216 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 217] 218handlers: [ 219] 220 221