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 let x = 10; function f1() {return x;} | 10 let 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 /* 42 S> */ B(LdaSmi), I8(10), | 23 /* 42 S> */ B(LdaConstant), U8(1), |
| 24 B(Star), R(2), |
| 25 B(LdaSmi), I8(10), |
24 /* 42 E> */ B(StaCurrentContextSlot), U8(4), | 26 /* 42 E> */ B(StaCurrentContextSlot), U8(4), |
25 B(LdaUndefined), | 27 B(LdaUndefined), |
26 /* 72 S> */ B(Return), | 28 /* 72 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 let x = 10; function f1() {return x;} return x; | 39 let 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 /* 42 S> */ B(LdaSmi), I8(10), | 52 /* 42 S> */ B(LdaConstant), U8(1), |
| 53 B(Star), R(2), |
| 54 B(LdaSmi), I8(10), |
50 /* 42 E> */ B(StaCurrentContextSlot), U8(4), | 55 /* 42 E> */ B(StaCurrentContextSlot), U8(4), |
51 /* 72 S> */ B(LdaImmutableCurrentContextSlot), U8(4), | 56 /* 72 S> */ B(LdaImmutableCurrentContextSlot), U8(4), |
52 /* 82 S> */ B(Return), | 57 /* 82 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 let x = (x = 20); function f1() {return x;} | 68 let 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: 39 | 72 bytecode array length: 47 |
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 /* 45 S> */ B(LdaSmi), I8(20), | 81 /* 45 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 /* 45 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1), | 91 /* 45 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1), |
82 B(Ldar), R(2), | 92 B(Ldar), R(4), |
83 B(StaCurrentContextSlot), U8(4), | 93 B(StaCurrentContextSlot), U8(4), |
84 /* 45 E> */ B(StaCurrentContextSlot), U8(4), | 94 /* 45 E> */ B(StaCurrentContextSlot), U8(4), |
85 B(LdaUndefined), | 95 B(LdaUndefined), |
86 /* 78 S> */ B(Return), | 96 /* 78 S> */ B(Return), |
87 ] | 97 ] |
88 constant pool: [ | 98 constant pool: [ |
89 SHARED_FUNCTION_INFO_TYPE, | 99 SHARED_FUNCTION_INFO_TYPE, |
90 ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"], | 100 ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"], |
91 ] | 101 ] |
92 handlers: [ | 102 handlers: [ |
93 ] | 103 ] |
94 | 104 |
95 --- | 105 --- |
96 snippet: " | 106 snippet: " |
97 let x = 10; x = 20; function f1() {return x;} | 107 let x = 10; x = 20; function f1() {return x;} |
98 " | 108 " |
99 frame size: 2 | 109 frame size: 3 |
100 parameter count: 1 | 110 parameter count: 1 |
101 bytecode array length: 24 | 111 bytecode array length: 32 |
102 bytecodes: [ | 112 bytecodes: [ |
103 B(CreateFunctionContext), U8(1), | 113 B(CreateFunctionContext), U8(1), |
104 B(PushContext), R(1), | 114 B(PushContext), R(1), |
105 B(LdaTheHole), | 115 B(LdaTheHole), |
106 B(StaCurrentContextSlot), U8(4), | 116 B(StaCurrentContextSlot), U8(4), |
107 B(CreateClosure), U8(0), U8(2), U8(2), | 117 B(CreateClosure), U8(0), U8(2), U8(2), |
108 B(Star), R(0), | 118 B(Star), R(0), |
109 /* 30 E> */ B(StackCheck), | 119 /* 30 E> */ B(StackCheck), |
110 /* 42 S> */ B(LdaSmi), I8(10), | 120 /* 42 S> */ B(LdaConstant), U8(1), |
| 121 B(Star), R(2), |
| 122 B(LdaSmi), I8(10), |
111 /* 42 E> */ B(StaCurrentContextSlot), U8(4), | 123 /* 42 E> */ B(StaCurrentContextSlot), U8(4), |
112 /* 46 S> */ B(LdaSmi), I8(20), | 124 /* 46 S> */ B(LdaConstant), U8(1), |
| 125 B(Star), R(2), |
| 126 B(LdaSmi), I8(20), |
113 /* 48 E> */ B(StaCurrentContextSlot), U8(4), | 127 /* 48 E> */ B(StaCurrentContextSlot), U8(4), |
114 B(LdaUndefined), | 128 B(LdaUndefined), |
115 /* 80 S> */ B(Return), | 129 /* 80 S> */ B(Return), |
116 ] | 130 ] |
117 constant pool: [ | 131 constant pool: [ |
118 SHARED_FUNCTION_INFO_TYPE, | 132 SHARED_FUNCTION_INFO_TYPE, |
| 133 ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"], |
119 ] | 134 ] |
120 handlers: [ | 135 handlers: [ |
121 ] | 136 ] |
122 | 137 |
OLD | NEW |