Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(508)

Side by Side Diff: test/cctest/interpreter/bytecode_expectations/GenerateTestUndetectable.golden

Issue 2793923002: [Interpreter] Optimize code of the form 'if (x === undefined)'. (Closed)
Patch Set: Rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 var obj_a = {val:1}; 10 var obj_a = {val:1};
11 var b = 10; 11 var b = 10;
12 if (obj_a == null) { b = 20;} 12 if (obj_a == null) { b = 20;}
13 return b; 13 return b;
14 " 14 "
15 frame size: 3 15 frame size: 3
16 parameter count: 1 16 parameter count: 1
17 bytecode array length: 24 17 bytecode array length: 25
18 bytecodes: [ 18 bytecodes: [
19 /* 30 E> */ B(StackCheck), 19 /* 30 E> */ B(StackCheck),
20 /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(2), 20 /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(2),
21 B(Mov), R(2), R(0), 21 B(Mov), R(2), R(0),
22 /* 63 S> */ B(LdaSmi), I8(10), 22 /* 63 S> */ B(LdaSmi), I8(10),
23 B(Star), R(1), 23 B(Star), R(1),
24 /* 67 S> */ B(TestUndetectable), R(0), 24 /* 67 S> */ B(Ldar), R(0),
25 B(JumpIfFalse), U8(6), 25 B(TestUndetectable),
26 /* 77 E> */ B(JumpIfFalse), U8(6),
26 /* 88 S> */ B(LdaSmi), I8(20), 27 /* 88 S> */ B(LdaSmi), I8(20),
27 B(Star), R(1), 28 B(Star), R(1),
28 /* 97 S> */ B(Ldar), R(1), 29 /* 97 S> */ B(Ldar), R(1),
29 /* 107 S> */ B(Return), 30 /* 107 S> */ B(Return),
30 ] 31 ]
31 constant pool: [ 32 constant pool: [
32 FIXED_ARRAY_TYPE, 33 FIXED_ARRAY_TYPE,
33 ] 34 ]
34 handlers: [ 35 handlers: [
35 ] 36 ]
36 37
37 --- 38 ---
38 snippet: " 39 snippet: "
39 var obj_a = {val:1}; 40 var obj_a = {val:1};
40 var b = 10; 41 var b = 10;
41 if (obj_a == undefined) { b = 20;} 42 if (obj_a == undefined) { b = 20;}
42 return b; 43 return b;
43 " 44 "
44 frame size: 3 45 frame size: 3
45 parameter count: 1 46 parameter count: 1
46 bytecode array length: 24 47 bytecode array length: 25
47 bytecodes: [ 48 bytecodes: [
48 /* 30 E> */ B(StackCheck), 49 /* 30 E> */ B(StackCheck),
49 /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(2), 50 /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(2),
50 B(Mov), R(2), R(0), 51 B(Mov), R(2), R(0),
51 /* 63 S> */ B(LdaSmi), I8(10), 52 /* 63 S> */ B(LdaSmi), I8(10),
52 B(Star), R(1), 53 B(Star), R(1),
53 /* 67 S> */ B(TestUndetectable), R(0), 54 /* 67 S> */ B(Ldar), R(0),
54 B(JumpIfFalse), U8(6), 55 B(TestUndetectable),
56 /* 77 E> */ B(JumpIfFalse), U8(6),
55 /* 93 S> */ B(LdaSmi), I8(20), 57 /* 93 S> */ B(LdaSmi), I8(20),
56 B(Star), R(1), 58 B(Star), R(1),
57 /* 102 S> */ B(Ldar), R(1), 59 /* 102 S> */ B(Ldar), R(1),
58 /* 112 S> */ B(Return), 60 /* 112 S> */ B(Return),
59 ] 61 ]
60 constant pool: [ 62 constant pool: [
61 FIXED_ARRAY_TYPE, 63 FIXED_ARRAY_TYPE,
62 ] 64 ]
63 handlers: [ 65 handlers: [
64 ] 66 ]
65 67
66 --- 68 ---
67 snippet: " 69 snippet: "
68 var obj_a = {val:1}; 70 var obj_a = {val:1};
69 var b = 10; 71 var b = 10;
70 if (obj_a != null) { b = 20;} 72 if (obj_a != null) { b = 20;}
71 return b; 73 return b;
72 " 74 "
73 frame size: 3 75 frame size: 3
74 parameter count: 1 76 parameter count: 1
75 bytecode array length: 24 77 bytecode array length: 25
76 bytecodes: [ 78 bytecodes: [
77 /* 30 E> */ B(StackCheck), 79 /* 30 E> */ B(StackCheck),
78 /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(2), 80 /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(2),
79 B(Mov), R(2), R(0), 81 B(Mov), R(2), R(0),
80 /* 63 S> */ B(LdaSmi), I8(10), 82 /* 63 S> */ B(LdaSmi), I8(10),
81 B(Star), R(1), 83 B(Star), R(1),
82 /* 67 S> */ B(TestUndetectable), R(0), 84 /* 67 S> */ B(Ldar), R(0),
83 B(JumpIfTrue), U8(6), 85 B(TestUndetectable),
86 /* 77 E> */ B(JumpIfTrue), U8(6),
84 /* 88 S> */ B(LdaSmi), I8(20), 87 /* 88 S> */ B(LdaSmi), I8(20),
85 B(Star), R(1), 88 B(Star), R(1),
86 /* 97 S> */ B(Ldar), R(1), 89 /* 97 S> */ B(Ldar), R(1),
87 /* 107 S> */ B(Return), 90 /* 107 S> */ B(Return),
88 ] 91 ]
89 constant pool: [ 92 constant pool: [
90 FIXED_ARRAY_TYPE, 93 FIXED_ARRAY_TYPE,
91 ] 94 ]
92 handlers: [ 95 handlers: [
93 ] 96 ]
94 97
95 --- 98 ---
96 snippet: " 99 snippet: "
97 var obj_a = {val:1}; 100 var obj_a = {val:1};
98 var b = 10; 101 var b = 10;
99 if (obj_a != undefined) { b = 20;} 102 if (obj_a != undefined) { b = 20;}
100 return b; 103 return b;
101 " 104 "
102 frame size: 3 105 frame size: 3
103 parameter count: 1 106 parameter count: 1
104 bytecode array length: 24 107 bytecode array length: 25
105 bytecodes: [ 108 bytecodes: [
106 /* 30 E> */ B(StackCheck), 109 /* 30 E> */ B(StackCheck),
107 /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(2), 110 /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(2),
108 B(Mov), R(2), R(0), 111 B(Mov), R(2), R(0),
109 /* 63 S> */ B(LdaSmi), I8(10), 112 /* 63 S> */ B(LdaSmi), I8(10),
110 B(Star), R(1), 113 B(Star), R(1),
111 /* 67 S> */ B(TestUndetectable), R(0), 114 /* 67 S> */ B(Ldar), R(0),
112 B(JumpIfTrue), U8(6), 115 B(TestUndetectable),
116 /* 77 E> */ B(JumpIfTrue), U8(6),
113 /* 93 S> */ B(LdaSmi), I8(20), 117 /* 93 S> */ B(LdaSmi), I8(20),
114 B(Star), R(1), 118 B(Star), R(1),
115 /* 102 S> */ B(Ldar), R(1), 119 /* 102 S> */ B(Ldar), R(1),
116 /* 112 S> */ B(Return), 120 /* 112 S> */ B(Return),
117 ] 121 ]
118 constant pool: [ 122 constant pool: [
119 FIXED_ARRAY_TYPE, 123 FIXED_ARRAY_TYPE,
120 ] 124 ]
121 handlers: [ 125 handlers: [
122 ] 126 ]
123 127
124 --- 128 ---
125 snippet: " 129 snippet: "
126 var obj_a = {val:1}; 130 var obj_a = {val:1};
127 var b = 10; 131 var b = 10;
128 if (obj_a === null) { b = 20;} 132 if (obj_a === null) { b = 20;}
129 return b; 133 return b;
130 " 134 "
131 frame size: 3 135 frame size: 3
132 parameter count: 1 136 parameter count: 1
133 bytecode array length: 24 137 bytecode array length: 24
134 bytecodes: [ 138 bytecodes: [
135 /* 30 E> */ B(StackCheck), 139 /* 30 E> */ B(StackCheck),
136 /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(2), 140 /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(2),
137 B(Mov), R(2), R(0), 141 B(Mov), R(2), R(0),
138 /* 63 S> */ B(LdaSmi), I8(10), 142 /* 63 S> */ B(LdaSmi), I8(10),
139 B(Star), R(1), 143 B(Star), R(1),
140 /* 67 S> */ B(TestNull), R(0), 144 /* 67 S> */ B(Ldar), R(0),
141 B(JumpIfFalse), U8(6), 145 B(JumpIfNotNull), U8(6),
142 /* 89 S> */ B(LdaSmi), I8(20), 146 /* 89 S> */ B(LdaSmi), I8(20),
143 B(Star), R(1), 147 B(Star), R(1),
144 /* 98 S> */ B(Ldar), R(1), 148 /* 98 S> */ B(Ldar), R(1),
145 /* 108 S> */ B(Return), 149 /* 108 S> */ B(Return),
146 ] 150 ]
147 constant pool: [ 151 constant pool: [
148 FIXED_ARRAY_TYPE, 152 FIXED_ARRAY_TYPE,
149 ] 153 ]
150 handlers: [ 154 handlers: [
151 ] 155 ]
152 156
153 --- 157 ---
154 snippet: " 158 snippet: "
155 var obj_a = {val:1}; 159 var obj_a = {val:1};
156 var b = 10; 160 var b = 10;
157 if (obj_a === undefined) { b = 20;} 161 if (obj_a === undefined) { b = 20;}
158 return b; 162 return b;
159 " 163 "
160 frame size: 3 164 frame size: 3
161 parameter count: 1 165 parameter count: 1
162 bytecode array length: 24 166 bytecode array length: 24
163 bytecodes: [ 167 bytecodes: [
164 /* 30 E> */ B(StackCheck), 168 /* 30 E> */ B(StackCheck),
165 /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(2), 169 /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(2),
166 B(Mov), R(2), R(0), 170 B(Mov), R(2), R(0),
167 /* 63 S> */ B(LdaSmi), I8(10), 171 /* 63 S> */ B(LdaSmi), I8(10),
168 B(Star), R(1), 172 B(Star), R(1),
169 /* 67 S> */ B(TestUndefined), R(0), 173 /* 67 S> */ B(Ldar), R(0),
170 B(JumpIfFalse), U8(6), 174 B(JumpIfNotUndefined), U8(6),
171 /* 94 S> */ B(LdaSmi), I8(20), 175 /* 94 S> */ B(LdaSmi), I8(20),
172 B(Star), R(1), 176 B(Star), R(1),
173 /* 103 S> */ B(Ldar), R(1), 177 /* 103 S> */ B(Ldar), R(1),
174 /* 113 S> */ B(Return), 178 /* 113 S> */ B(Return),
175 ] 179 ]
176 constant pool: [ 180 constant pool: [
177 FIXED_ARRAY_TYPE, 181 FIXED_ARRAY_TYPE,
178 ] 182 ]
179 handlers: [ 183 handlers: [
180 ] 184 ]
181 185
182 --- 186 ---
183 snippet: " 187 snippet: "
184 var obj_a = {val:1}; 188 var obj_a = {val:1};
185 var b = 10; 189 var b = 10;
186 if (obj_a !== null) { b = 20;} 190 if (obj_a !== null) { b = 20;}
187 return b; 191 return b;
188 " 192 "
189 frame size: 3 193 frame size: 3
190 parameter count: 1 194 parameter count: 1
191 bytecode array length: 24 195 bytecode array length: 24
192 bytecodes: [ 196 bytecodes: [
193 /* 30 E> */ B(StackCheck), 197 /* 30 E> */ B(StackCheck),
194 /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(2), 198 /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(2),
195 B(Mov), R(2), R(0), 199 B(Mov), R(2), R(0),
196 /* 63 S> */ B(LdaSmi), I8(10), 200 /* 63 S> */ B(LdaSmi), I8(10),
197 B(Star), R(1), 201 B(Star), R(1),
198 /* 67 S> */ B(TestNull), R(0), 202 /* 67 S> */ B(Ldar), R(0),
199 B(JumpIfTrue), U8(6), 203 B(JumpIfNull), U8(6),
200 /* 89 S> */ B(LdaSmi), I8(20), 204 /* 89 S> */ B(LdaSmi), I8(20),
201 B(Star), R(1), 205 B(Star), R(1),
202 /* 98 S> */ B(Ldar), R(1), 206 /* 98 S> */ B(Ldar), R(1),
203 /* 108 S> */ B(Return), 207 /* 108 S> */ B(Return),
204 ] 208 ]
205 constant pool: [ 209 constant pool: [
206 FIXED_ARRAY_TYPE, 210 FIXED_ARRAY_TYPE,
207 ] 211 ]
208 handlers: [ 212 handlers: [
209 ] 213 ]
210 214
211 --- 215 ---
212 snippet: " 216 snippet: "
213 var obj_a = {val:1}; 217 var obj_a = {val:1};
214 var b = 10; 218 var b = 10;
215 if (obj_a !== undefined) { b = 20;} 219 if (obj_a !== undefined) { b = 20;}
216 return b; 220 return b;
217 " 221 "
218 frame size: 3 222 frame size: 3
219 parameter count: 1 223 parameter count: 1
220 bytecode array length: 24 224 bytecode array length: 24
221 bytecodes: [ 225 bytecodes: [
222 /* 30 E> */ B(StackCheck), 226 /* 30 E> */ B(StackCheck),
223 /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(2), 227 /* 46 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(2),
224 B(Mov), R(2), R(0), 228 B(Mov), R(2), R(0),
225 /* 63 S> */ B(LdaSmi), I8(10), 229 /* 63 S> */ B(LdaSmi), I8(10),
226 B(Star), R(1), 230 B(Star), R(1),
227 /* 67 S> */ B(TestUndefined), R(0), 231 /* 67 S> */ B(Ldar), R(0),
228 B(JumpIfTrue), U8(6), 232 B(JumpIfUndefined), U8(6),
229 /* 94 S> */ B(LdaSmi), I8(20), 233 /* 94 S> */ B(LdaSmi), I8(20),
230 B(Star), R(1), 234 B(Star), R(1),
231 /* 103 S> */ B(Ldar), R(1), 235 /* 103 S> */ B(Ldar), R(1),
232 /* 113 S> */ B(Return), 236 /* 113 S> */ B(Return),
233 ] 237 ]
234 constant pool: [ 238 constant pool: [
235 FIXED_ARRAY_TYPE, 239 FIXED_ARRAY_TYPE,
236 ] 240 ]
237 handlers: [ 241 handlers: [
238 ] 242 ]
239 243
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698