OLD | NEW |
1 # | 1 # |
2 # Autogenerated by generate-bytecode-expectations. | 2 # Autogenerated by generate-bytecode-expectations. |
3 # | 3 # |
4 | 4 |
5 --- | 5 --- |
6 execute: yes | 6 execute: yes |
7 wrap: yes | 7 wrap: yes |
| 8 test function name: f |
8 | 9 |
9 --- | 10 --- |
10 snippet: " | 11 snippet: " |
11 eval('var x = 10;'); return x; | 12 eval('var x = 10;'); return x; |
12 " | 13 " |
13 frame size: 10 | 14 frame size: 10 |
14 parameter count: 1 | 15 parameter count: 1 |
15 bytecode array length: 71 | 16 bytecode array length: 71 |
16 bytecodes: [ | 17 bytecodes: [ |
17 B(CreateFunctionContext), U8(3), | 18 B(CreateFunctionContext), U8(3), |
18 B(PushContext), R(0), | 19 B(PushContext), R(0), |
19 B(Ldar), R(this), | 20 B(Ldar), R(this), |
20 B(StaContextSlot), R(context), U8(4), U8(0), | 21 B(StaContextSlot), R(context), U8(4), U8(0), |
21 B(CreateMappedArguments), | 22 B(CreateMappedArguments), |
22 B(StaContextSlot), R(context), U8(6), U8(0), | 23 B(StaContextSlot), R(context), U8(6), U8(0), |
23 B(Ldar), R(new_target), | 24 B(Ldar), R(new_target), |
24 B(StaContextSlot), R(context), U8(5), U8(0), | 25 B(StaContextSlot), R(context), U8(5), U8(0), |
25 /* 30 E> */ B(StackCheck), | 26 /* 10 E> */ B(StackCheck), |
26 /* 34 S> */ B(LdaConstant), U8(0), | 27 /* 14 S> */ B(LdaConstant), U8(0), |
27 B(Star), R(3), | 28 B(Star), R(3), |
28 B(CallRuntimeForPair), U16(Runtime::kLoadLookupSlotForCall), R(3
), U8(1), R(1), | 29 B(CallRuntimeForPair), U16(Runtime::kLoadLookupSlotForCall), R(3
), U8(1), R(1), |
29 B(LdaConstant), U8(1), | 30 B(LdaConstant), U8(1), |
30 B(Star), R(3), | 31 B(Star), R(3), |
31 B(LdaZero), | 32 B(LdaZero), |
32 B(Star), R(7), | 33 B(Star), R(7), |
33 B(LdaSmi), U8(30), | 34 B(LdaSmi), U8(10), |
34 B(Star), R(8), | 35 B(Star), R(8), |
35 B(LdaSmi), U8(34), | 36 B(LdaSmi), U8(14), |
36 B(Star), R(9), | 37 B(Star), R(9), |
37 B(Mov), R(1), R(4), | 38 B(Mov), R(1), R(4), |
38 B(Mov), R(3), R(5), | 39 B(Mov), R(3), R(5), |
39 B(Mov), R(closure), R(6), | 40 B(Mov), R(closure), R(6), |
40 B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(4),
U8(6), | 41 B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(4),
U8(6), |
41 B(Star), R(1), | 42 B(Star), R(1), |
42 /* 34 E> */ B(Call), R(1), R(2), U8(2), U8(0), | 43 /* 14 E> */ B(Call), R(1), R(2), U8(2), U8(0), |
43 /* 55 S> */ B(LdaLookupSlot), U8(2), | 44 /* 35 S> */ B(LdaLookupSlot), U8(2), |
44 /* 65 S> */ B(Return), | 45 /* 45 S> */ B(Return), |
45 ] | 46 ] |
46 constant pool: [ | 47 constant pool: [ |
47 ONE_BYTE_INTERNALIZED_STRING_TYPE ["eval"], | 48 ONE_BYTE_INTERNALIZED_STRING_TYPE ["eval"], |
48 ONE_BYTE_INTERNALIZED_STRING_TYPE ["var x = 10;"], | 49 ONE_BYTE_INTERNALIZED_STRING_TYPE ["var x = 10;"], |
49 ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"], | 50 ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"], |
50 ] | 51 ] |
51 handlers: [ | 52 handlers: [ |
52 ] | 53 ] |
53 | 54 |
54 --- | 55 --- |
55 snippet: " | 56 snippet: " |
56 eval('var x = 10;'); return typeof x; | 57 eval('var x = 10;'); return typeof x; |
57 " | 58 " |
58 frame size: 10 | 59 frame size: 10 |
59 parameter count: 1 | 60 parameter count: 1 |
60 bytecode array length: 72 | 61 bytecode array length: 72 |
61 bytecodes: [ | 62 bytecodes: [ |
62 B(CreateFunctionContext), U8(3), | 63 B(CreateFunctionContext), U8(3), |
63 B(PushContext), R(0), | 64 B(PushContext), R(0), |
64 B(Ldar), R(this), | 65 B(Ldar), R(this), |
65 B(StaContextSlot), R(context), U8(4), U8(0), | 66 B(StaContextSlot), R(context), U8(4), U8(0), |
66 B(CreateMappedArguments), | 67 B(CreateMappedArguments), |
67 B(StaContextSlot), R(context), U8(6), U8(0), | 68 B(StaContextSlot), R(context), U8(6), U8(0), |
68 B(Ldar), R(new_target), | 69 B(Ldar), R(new_target), |
69 B(StaContextSlot), R(context), U8(5), U8(0), | 70 B(StaContextSlot), R(context), U8(5), U8(0), |
70 /* 30 E> */ B(StackCheck), | 71 /* 10 E> */ B(StackCheck), |
71 /* 34 S> */ B(LdaConstant), U8(0), | 72 /* 14 S> */ B(LdaConstant), U8(0), |
72 B(Star), R(3), | 73 B(Star), R(3), |
73 B(CallRuntimeForPair), U16(Runtime::kLoadLookupSlotForCall), R(3
), U8(1), R(1), | 74 B(CallRuntimeForPair), U16(Runtime::kLoadLookupSlotForCall), R(3
), U8(1), R(1), |
74 B(LdaConstant), U8(1), | 75 B(LdaConstant), U8(1), |
75 B(Star), R(3), | 76 B(Star), R(3), |
76 B(LdaZero), | 77 B(LdaZero), |
77 B(Star), R(7), | 78 B(Star), R(7), |
78 B(LdaSmi), U8(30), | 79 B(LdaSmi), U8(10), |
79 B(Star), R(8), | 80 B(Star), R(8), |
80 B(LdaSmi), U8(34), | 81 B(LdaSmi), U8(14), |
81 B(Star), R(9), | 82 B(Star), R(9), |
82 B(Mov), R(1), R(4), | 83 B(Mov), R(1), R(4), |
83 B(Mov), R(3), R(5), | 84 B(Mov), R(3), R(5), |
84 B(Mov), R(closure), R(6), | 85 B(Mov), R(closure), R(6), |
85 B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(4),
U8(6), | 86 B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(4),
U8(6), |
86 B(Star), R(1), | 87 B(Star), R(1), |
87 /* 34 E> */ B(Call), R(1), R(2), U8(2), U8(0), | 88 /* 14 E> */ B(Call), R(1), R(2), U8(2), U8(0), |
88 /* 55 S> */ B(LdaLookupSlotInsideTypeof), U8(2), | 89 /* 35 S> */ B(LdaLookupSlotInsideTypeof), U8(2), |
89 B(TypeOf), | 90 B(TypeOf), |
90 /* 72 S> */ B(Return), | 91 /* 52 S> */ B(Return), |
91 ] | 92 ] |
92 constant pool: [ | 93 constant pool: [ |
93 ONE_BYTE_INTERNALIZED_STRING_TYPE ["eval"], | 94 ONE_BYTE_INTERNALIZED_STRING_TYPE ["eval"], |
94 ONE_BYTE_INTERNALIZED_STRING_TYPE ["var x = 10;"], | 95 ONE_BYTE_INTERNALIZED_STRING_TYPE ["var x = 10;"], |
95 ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"], | 96 ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"], |
96 ] | 97 ] |
97 handlers: [ | 98 handlers: [ |
98 ] | 99 ] |
99 | 100 |
100 --- | 101 --- |
101 snippet: " | 102 snippet: " |
102 x = 20; return eval(''); | 103 x = 20; return eval(''); |
103 " | 104 " |
104 frame size: 10 | 105 frame size: 10 |
105 parameter count: 1 | 106 parameter count: 1 |
106 bytecode array length: 73 | 107 bytecode array length: 73 |
107 bytecodes: [ | 108 bytecodes: [ |
108 B(CreateFunctionContext), U8(3), | 109 B(CreateFunctionContext), U8(3), |
109 B(PushContext), R(0), | 110 B(PushContext), R(0), |
110 B(Ldar), R(this), | 111 B(Ldar), R(this), |
111 B(StaContextSlot), R(context), U8(4), U8(0), | 112 B(StaContextSlot), R(context), U8(4), U8(0), |
112 B(CreateMappedArguments), | 113 B(CreateMappedArguments), |
113 B(StaContextSlot), R(context), U8(6), U8(0), | 114 B(StaContextSlot), R(context), U8(6), U8(0), |
114 B(Ldar), R(new_target), | 115 B(Ldar), R(new_target), |
115 B(StaContextSlot), R(context), U8(5), U8(0), | 116 B(StaContextSlot), R(context), U8(5), U8(0), |
116 /* 30 E> */ B(StackCheck), | 117 /* 10 E> */ B(StackCheck), |
117 /* 34 S> */ B(LdaSmi), U8(20), | 118 /* 14 S> */ B(LdaSmi), U8(20), |
118 /* 36 E> */ B(StaLookupSlotSloppy), U8(0), | 119 /* 16 E> */ B(StaLookupSlotSloppy), U8(0), |
119 /* 42 S> */ B(LdaConstant), U8(1), | 120 /* 22 S> */ B(LdaConstant), U8(1), |
120 B(Star), R(3), | 121 B(Star), R(3), |
121 B(CallRuntimeForPair), U16(Runtime::kLoadLookupSlotForCall), R(3
), U8(1), R(1), | 122 B(CallRuntimeForPair), U16(Runtime::kLoadLookupSlotForCall), R(3
), U8(1), R(1), |
122 B(LdaConstant), U8(2), | 123 B(LdaConstant), U8(2), |
123 B(Star), R(3), | 124 B(Star), R(3), |
124 B(LdaZero), | 125 B(LdaZero), |
125 B(Star), R(7), | 126 B(Star), R(7), |
126 B(LdaSmi), U8(30), | 127 B(LdaSmi), U8(10), |
127 B(Star), R(8), | 128 B(Star), R(8), |
128 B(LdaSmi), U8(49), | 129 B(LdaSmi), U8(29), |
129 B(Star), R(9), | 130 B(Star), R(9), |
130 B(Mov), R(1), R(4), | 131 B(Mov), R(1), R(4), |
131 B(Mov), R(3), R(5), | 132 B(Mov), R(3), R(5), |
132 B(Mov), R(closure), R(6), | 133 B(Mov), R(closure), R(6), |
133 B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(4),
U8(6), | 134 B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(4),
U8(6), |
134 B(Star), R(1), | 135 B(Star), R(1), |
135 /* 49 E> */ B(Call), R(1), R(2), U8(2), U8(0), | 136 /* 29 E> */ B(Call), R(1), R(2), U8(2), U8(0), |
136 /* 59 S> */ B(Return), | 137 /* 39 S> */ B(Return), |
137 ] | 138 ] |
138 constant pool: [ | 139 constant pool: [ |
139 ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"], | 140 ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"], |
140 ONE_BYTE_INTERNALIZED_STRING_TYPE ["eval"], | 141 ONE_BYTE_INTERNALIZED_STRING_TYPE ["eval"], |
141 ONE_BYTE_INTERNALIZED_STRING_TYPE [""], | 142 ONE_BYTE_INTERNALIZED_STRING_TYPE [""], |
142 ] | 143 ] |
143 handlers: [ | 144 handlers: [ |
144 ] | 145 ] |
145 | 146 |
| 147 --- |
| 148 snippet: " |
| 149 var x = 20; |
| 150 f = function(){ |
| 151 eval('var x = 10'); |
| 152 return x; |
| 153 } |
| 154 f(); |
| 155 " |
| 156 frame size: 10 |
| 157 parameter count: 1 |
| 158 bytecode array length: 73 |
| 159 bytecodes: [ |
| 160 B(CreateFunctionContext), U8(3), |
| 161 B(PushContext), R(0), |
| 162 B(Ldar), R(this), |
| 163 B(StaContextSlot), R(context), U8(4), U8(0), |
| 164 B(CreateMappedArguments), |
| 165 B(StaContextSlot), R(context), U8(6), U8(0), |
| 166 B(Ldar), R(new_target), |
| 167 B(StaContextSlot), R(context), U8(5), U8(0), |
| 168 /* 38 E> */ B(StackCheck), |
| 169 /* 44 S> */ B(LdaConstant), U8(0), |
| 170 B(Star), R(3), |
| 171 B(CallRuntimeForPair), U16(Runtime::kLoadLookupSlotForCall), R(3
), U8(1), R(1), |
| 172 B(LdaConstant), U8(1), |
| 173 B(Star), R(3), |
| 174 B(LdaZero), |
| 175 B(Star), R(7), |
| 176 B(LdaSmi), U8(38), |
| 177 B(Star), R(8), |
| 178 B(LdaSmi), U8(44), |
| 179 B(Star), R(9), |
| 180 B(Mov), R(1), R(4), |
| 181 B(Mov), R(3), R(5), |
| 182 B(Mov), R(closure), R(6), |
| 183 B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(4),
U8(6), |
| 184 B(Star), R(1), |
| 185 /* 44 E> */ B(Call), R(1), R(2), U8(2), U8(0), |
| 186 /* 66 S> */ B(LdaLookupContextSlot), U8(2), U8(6), U8(1), |
| 187 /* 76 S> */ B(Return), |
| 188 ] |
| 189 constant pool: [ |
| 190 ONE_BYTE_INTERNALIZED_STRING_TYPE ["eval"], |
| 191 ONE_BYTE_INTERNALIZED_STRING_TYPE ["var x = 10"], |
| 192 ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"], |
| 193 ] |
| 194 handlers: [ |
| 195 ] |
| 196 |
OLD | NEW |