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