| 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 const x = 10; function f1() {return x;} | 10 const x = 10; function f1() {return x;} |
| 11 " | 11 " |
| 12 frame size: 2 | 12 frame size: 2 |
| 13 parameter count: 1 | 13 parameter count: 1 |
| 14 bytecode array length: 23 | 14 bytecode array length: 19 |
| 15 bytecodes: [ | 15 bytecodes: [ |
| 16 B(CreateFunctionContext), U8(1), | 16 B(CreateFunctionContext), U8(1), |
| 17 B(PushContext), R(1), | 17 B(PushContext), R(1), |
| 18 B(LdaTheHole), | 18 B(LdaTheHole), |
| 19 B(StaContextSlot), R(context), U8(4), U8(0), | 19 B(StaCurrentContextSlot), U8(4), |
| 20 B(CreateClosure), U8(0), U8(2), | 20 B(CreateClosure), U8(0), U8(2), |
| 21 B(Star), R(0), | 21 B(Star), R(0), |
| 22 /* 30 E> */ B(StackCheck), | 22 /* 30 E> */ B(StackCheck), |
| 23 /* 44 S> */ B(LdaSmi), U8(10), | 23 /* 44 S> */ B(LdaSmi), U8(10), |
| 24 /* 44 E> */ B(StaContextSlot), R(context), U8(4), U8(0), | 24 /* 44 E> */ B(StaCurrentContextSlot), U8(4), |
| 25 B(LdaUndefined), | 25 B(LdaUndefined), |
| 26 /* 74 S> */ B(Return), | 26 /* 74 S> */ B(Return), |
| 27 ] | 27 ] |
| 28 constant pool: [ | 28 constant pool: [ |
| 29 SHARED_FUNCTION_INFO_TYPE, | 29 SHARED_FUNCTION_INFO_TYPE, |
| 30 ] | 30 ] |
| 31 handlers: [ | 31 handlers: [ |
| 32 ] | 32 ] |
| 33 | 33 |
| 34 --- | 34 --- |
| 35 snippet: " | 35 snippet: " |
| 36 const x = 10; function f1() {return x;} return x; | 36 const x = 10; function f1() {return x;} return x; |
| 37 " | 37 " |
| 38 frame size: 2 | 38 frame size: 2 |
| 39 parameter count: 1 | 39 parameter count: 1 |
| 40 bytecode array length: 26 | 40 bytecode array length: 20 |
| 41 bytecodes: [ | 41 bytecodes: [ |
| 42 B(CreateFunctionContext), U8(1), | 42 B(CreateFunctionContext), U8(1), |
| 43 B(PushContext), R(1), | 43 B(PushContext), R(1), |
| 44 B(LdaTheHole), | 44 B(LdaTheHole), |
| 45 B(StaContextSlot), R(context), U8(4), U8(0), | 45 B(StaCurrentContextSlot), U8(4), |
| 46 B(CreateClosure), U8(0), U8(2), | 46 B(CreateClosure), U8(0), U8(2), |
| 47 B(Star), R(0), | 47 B(Star), R(0), |
| 48 /* 30 E> */ B(StackCheck), | 48 /* 30 E> */ B(StackCheck), |
| 49 /* 44 S> */ B(LdaSmi), U8(10), | 49 /* 44 S> */ B(LdaSmi), U8(10), |
| 50 /* 44 E> */ B(StaContextSlot), R(context), U8(4), U8(0), | 50 /* 44 E> */ B(StaCurrentContextSlot), U8(4), |
| 51 /* 74 S> */ B(LdaContextSlot), R(context), U8(4), U8(0), | 51 /* 74 S> */ B(LdaCurrentContextSlot), U8(4), |
| 52 /* 84 S> */ B(Return), | 52 /* 84 S> */ B(Return), |
| 53 ] | 53 ] |
| 54 constant pool: [ | 54 constant pool: [ |
| 55 SHARED_FUNCTION_INFO_TYPE, | 55 SHARED_FUNCTION_INFO_TYPE, |
| 56 ] | 56 ] |
| 57 handlers: [ | 57 handlers: [ |
| 58 ] | 58 ] |
| 59 | 59 |
| 60 --- | 60 --- |
| 61 snippet: " | 61 snippet: " |
| 62 const x = (x = 20); function f1() {return x;} | 62 const x = (x = 20); function f1() {return x;} |
| 63 " | 63 " |
| 64 frame size: 4 | 64 frame size: 4 |
| 65 parameter count: 1 | 65 parameter count: 1 |
| 66 bytecode array length: 45 | 66 bytecode array length: 39 |
| 67 bytecodes: [ | 67 bytecodes: [ |
| 68 B(CreateFunctionContext), U8(1), | 68 B(CreateFunctionContext), U8(1), |
| 69 B(PushContext), R(1), | 69 B(PushContext), R(1), |
| 70 B(LdaTheHole), | 70 B(LdaTheHole), |
| 71 B(StaContextSlot), R(context), U8(4), U8(0), | 71 B(StaCurrentContextSlot), U8(4), |
| 72 B(CreateClosure), U8(0), U8(2), | 72 B(CreateClosure), U8(0), U8(2), |
| 73 B(Star), R(0), | 73 B(Star), R(0), |
| 74 /* 30 E> */ B(StackCheck), | 74 /* 30 E> */ B(StackCheck), |
| 75 /* 47 S> */ B(LdaSmi), U8(20), | 75 /* 47 S> */ B(LdaSmi), U8(20), |
| 76 B(Star), R(2), | 76 B(Star), R(2), |
| 77 /* 47 E> */ B(LdaContextSlot), R(context), U8(4), U8(0), | 77 /* 47 E> */ B(LdaCurrentContextSlot), U8(4), |
| 78 B(JumpIfNotHole), U8(11), | 78 B(JumpIfNotHole), U8(11), |
| 79 B(LdaConstant), U8(1), | 79 B(LdaConstant), U8(1), |
| 80 B(Star), R(3), | 80 B(Star), R(3), |
| 81 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1), | 81 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1), |
| 82 B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0
), | 82 B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0
), |
| 83 /* 47 E> */ B(StaContextSlot), R(context), U8(4), U8(0), | 83 /* 47 E> */ B(StaCurrentContextSlot), U8(4), |
| 84 B(LdaUndefined), | 84 B(LdaUndefined), |
| 85 /* 80 S> */ B(Return), | 85 /* 80 S> */ B(Return), |
| 86 ] | 86 ] |
| 87 constant pool: [ | 87 constant pool: [ |
| 88 SHARED_FUNCTION_INFO_TYPE, | 88 SHARED_FUNCTION_INFO_TYPE, |
| 89 ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"], | 89 ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"], |
| 90 ] | 90 ] |
| 91 handlers: [ | 91 handlers: [ |
| 92 ] | 92 ] |
| 93 | 93 |
| 94 --- | 94 --- |
| 95 snippet: " | 95 snippet: " |
| 96 const x = 10; x = 20; function f1() {return x;} | 96 const x = 10; x = 20; function f1() {return x;} |
| 97 " | 97 " |
| 98 frame size: 2 | 98 frame size: 2 |
| 99 parameter count: 1 | 99 parameter count: 1 |
| 100 bytecode array length: 30 | 100 bytecode array length: 26 |
| 101 bytecodes: [ | 101 bytecodes: [ |
| 102 B(CreateFunctionContext), U8(1), | 102 B(CreateFunctionContext), U8(1), |
| 103 B(PushContext), R(1), | 103 B(PushContext), R(1), |
| 104 B(LdaTheHole), | 104 B(LdaTheHole), |
| 105 B(StaContextSlot), R(context), U8(4), U8(0), | 105 B(StaCurrentContextSlot), U8(4), |
| 106 B(CreateClosure), U8(0), U8(2), | 106 B(CreateClosure), U8(0), U8(2), |
| 107 B(Star), R(0), | 107 B(Star), R(0), |
| 108 /* 30 E> */ B(StackCheck), | 108 /* 30 E> */ B(StackCheck), |
| 109 /* 44 S> */ B(LdaSmi), U8(10), | 109 /* 44 S> */ B(LdaSmi), U8(10), |
| 110 /* 44 E> */ B(StaContextSlot), R(context), U8(4), U8(0), | 110 /* 44 E> */ B(StaCurrentContextSlot), U8(4), |
| 111 /* 48 S> */ B(LdaSmi), U8(20), | 111 /* 48 S> */ B(LdaSmi), U8(20), |
| 112 /* 50 E> */ B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0
), | 112 /* 50 E> */ B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0
), |
| 113 B(LdaUndefined), | 113 B(LdaUndefined), |
| 114 /* 82 S> */ B(Return), | 114 /* 82 S> */ B(Return), |
| 115 ] | 115 ] |
| 116 constant pool: [ | 116 constant pool: [ |
| 117 SHARED_FUNCTION_INFO_TYPE, | 117 SHARED_FUNCTION_INFO_TYPE, |
| 118 ] | 118 ] |
| 119 handlers: [ | 119 handlers: [ |
| 120 ] | 120 ] |
| 121 | 121 |
| OLD | NEW |