OLD | NEW |
1 // Shard 2. | 1 // Shard 2. |
2 | 2 |
3 // Copyright 2016 the V8 project authors. All rights reserved. | 3 // Copyright 2016 the V8 project authors. All rights reserved. |
4 // Use of this source code is governed by a BSD-style license that can be | 4 // Use of this source code is governed by a BSD-style license that can be |
5 // found in the LICENSE file. | 5 // found in the LICENSE file. |
6 | 6 |
7 // Flags: --allow-natives-syntax --turbo --no-always-opt | 7 // Flags: --allow-natives-syntax --turbo --no-always-opt |
8 | 8 |
9 // This test file was generated by tools/gen-inlining-tests.py . | 9 // This test file was generated by tools/gen-inlining-tests.py . |
10 | 10 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 counter++; | 59 counter++; |
60 return 15; | 60 return 15; |
61 } | 61 } |
62 | 62 |
63 function increaseAndThrow42() { | 63 function increaseAndThrow42() { |
64 if (deopt) %DeoptimizeFunction(f); | 64 if (deopt) %DeoptimizeFunction(f); |
65 counter++; | 65 counter++; |
66 throw 42; | 66 throw 42; |
67 } | 67 } |
68 | 68 |
| 69 function increaseAndReturn15_noopt_inner() { |
| 70 if (deopt) %DeoptimizeFunction(f); |
| 71 counter++; |
| 72 return 15; |
| 73 } |
| 74 |
| 75 %NeverOptimizeFunction(increaseAndReturn15_noopt_inner); |
| 76 |
| 77 function increaseAndThrow42_noopt_inner() { |
| 78 if (deopt) %DeoptimizeFunction(f); |
| 79 counter++; |
| 80 throw 42; |
| 81 } |
| 82 |
| 83 %NeverOptimizeFunction(increaseAndThrow42_noopt_inner); |
| 84 |
| 85 // Alternative 1 |
| 86 |
69 function returnOrThrow(doReturn) { | 87 function returnOrThrow(doReturn) { |
70 if (doReturn) { | 88 if (doReturn) { |
71 return increaseAndReturn15(); | 89 return increaseAndReturn15(); |
72 } else { | 90 } else { |
73 return increaseAndThrow42(); | 91 return increaseAndThrow42(); |
74 } | 92 } |
75 } | 93 } |
76 | 94 |
| 95 // Alternative 2 |
| 96 |
| 97 function increaseAndReturn15_calls_noopt() { |
| 98 return increaseAndReturn15_noopt_inner(); |
| 99 } |
| 100 |
| 101 function increaseAndThrow42_calls_noopt() { |
| 102 return increaseAndThrow42_noopt_inner(); |
| 103 } |
| 104 |
| 105 // Alternative 3. |
77 // When passed either {increaseAndReturn15} or {increaseAndThrow42}, it acts | 106 // When passed either {increaseAndReturn15} or {increaseAndThrow42}, it acts |
78 // as the other one. | 107 // as the other one. |
79 function invertFunctionCall(f) { | 108 function invertFunctionCall(f) { |
80 var result; | 109 var result; |
81 try { | 110 try { |
82 result = f(); | 111 result = f(); |
83 } catch (ex) { | 112 } catch (ex) { |
84 return ex - 27; | 113 return ex - 27; |
85 } | 114 } |
86 throw result + 27; | 115 throw result + 27; |
87 } | 116 } |
88 | 117 |
| 118 // Alternative 4: constructor |
89 function increaseAndStore15Constructor() { | 119 function increaseAndStore15Constructor() { |
90 if (deopt) %DeoptimizeFunction(f); | 120 if (deopt) %DeoptimizeFunction(f); |
91 ++counter; | 121 ++counter; |
92 this.x = 15; | 122 this.x = 15; |
93 } | 123 } |
94 | 124 |
95 function increaseAndThrow42Constructor() { | 125 function increaseAndThrow42Constructor() { |
96 if (deopt) %DeoptimizeFunction(f); | 126 if (deopt) %DeoptimizeFunction(f); |
97 ++counter; | 127 ++counter; |
98 this.x = 42; | 128 this.x = 42; |
99 throw this.x; | 129 throw this.x; |
100 } | 130 } |
101 | 131 |
| 132 // Alternative 5: property |
102 var magic = {}; | 133 var magic = {}; |
103 Object.defineProperty(magic, 'prop', { | 134 Object.defineProperty(magic, 'prop', { |
104 get: function () { | 135 get: function () { |
105 if (deopt) %DeoptimizeFunction(f); | 136 if (deopt) %DeoptimizeFunction(f); |
106 return 15 + 0 * ++counter; | 137 return 15 + 0 * ++counter; |
107 }, | 138 }, |
108 | 139 |
109 set: function(x) { | 140 set: function(x) { |
110 // argument should be 37 | 141 // argument should be 37 |
111 if (deopt) %DeoptimizeFunction(f); | 142 if (deopt) %DeoptimizeFunction(f); |
112 counter -= 36 - x; // increments counter | 143 counter -= 36 - x; // increments counter |
113 throw 42; | 144 throw 42; |
114 } | 145 } |
115 }) | 146 }) |
116 | 147 |
117 // Generate type feedback. | 148 // Generate type feedback. |
118 | 149 |
| 150 assertEquals(15, increaseAndReturn15_calls_noopt()); |
| 151 assertThrowsEquals(function() { return increaseAndThrow42_noopt_inner() }, 42); |
| 152 |
119 assertEquals(15, (new increaseAndStore15Constructor()).x); | 153 assertEquals(15, (new increaseAndStore15Constructor()).x); |
120 assertThrowsEquals(function() { | 154 assertThrowsEquals(function() { |
121 return (new increaseAndThrow42Constructor()).x; | 155 return (new increaseAndThrow42Constructor()).x; |
122 }, | 156 }, |
123 42); | 157 42); |
124 | 158 |
125 function runThisShard() { | 159 function runThisShard() { |
126 | 160 |
127 // Variant flags: [alternativeFn2, tryReturns, doCatch, | 161 // Variant flags: [alternativeFn3, tryReturns, doCatch, |
128 // catchReturns, catchWithLocal, endReturnLocal] | 162 // catchReturns, deopt] |
129 | 163 |
130 f = function f___2__r__crl____l_ () { | 164 f = function f___3___r__cr______d () { |
131 var local = 3; | 165 var local = 888; |
| 166 deopt = true; |
| 167 try { |
| 168 counter++; |
| 169 return 4 + invertFunctionCall(increaseAndThrow42); |
| 170 counter++; |
| 171 } catch (ex) { |
| 172 counter++; |
| 173 return 2 + ex; |
| 174 counter++; |
| 175 } |
| 176 counter++; |
| 177 } |
| 178 resetOptAndAssertResultEquals(19, f); |
| 179 assertEquals(2, counter); |
| 180 |
| 181 // Variant flags: [alternativeFn3, tryReturns, doCatch, |
| 182 // catchReturns, catchWithLocal] |
| 183 |
| 184 f = function f___3___r__crl______ () { |
| 185 var local = 888; |
132 deopt = false; | 186 deopt = false; |
133 try { | 187 try { |
134 counter++; | 188 counter++; |
135 return invertFunctionCall(increaseAndThrow42); | 189 return 4 + invertFunctionCall(increaseAndThrow42); |
136 counter++; | 190 counter++; |
137 } catch (ex) { | 191 } catch (ex) { |
138 counter++; | 192 counter++; |
| 193 return 2 + local; |
| 194 counter++; |
| 195 } |
| 196 counter++; |
| 197 } |
| 198 resetOptAndAssertResultEquals(19, f); |
| 199 assertEquals(2, counter); |
| 200 |
| 201 // Variant flags: [alternativeFn3, tryReturns, doCatch, |
| 202 // catchReturns, catchWithLocal, deopt] |
| 203 |
| 204 f = function f___3___r__crl_____d () { |
| 205 var local = 888; |
| 206 deopt = true; |
| 207 try { |
| 208 counter++; |
| 209 return 4 + invertFunctionCall(increaseAndThrow42); |
| 210 counter++; |
| 211 } catch (ex) { |
| 212 counter++; |
| 213 return 2 + local; |
| 214 counter++; |
| 215 } |
| 216 counter++; |
| 217 } |
| 218 resetOptAndAssertResultEquals(19, f); |
| 219 assertEquals(2, counter); |
| 220 |
| 221 // Variant flags: [alternativeFn3, tryReturns, doCatch, |
| 222 // catchReturns, catchWithLocal, endReturnLocal] |
| 223 |
| 224 f = function f___3___r__crl____l_ () { |
| 225 var local = 888; |
| 226 deopt = false; |
| 227 try { |
| 228 counter++; |
| 229 return 4 + invertFunctionCall(increaseAndThrow42); |
| 230 counter++; |
| 231 } catch (ex) { |
| 232 counter++; |
139 return 2 + local; | 233 return 2 + local; |
140 counter++; | 234 counter++; |
141 } | 235 } |
142 counter++; | 236 counter++; |
143 return 5 + local; | 237 return 5 + local; |
144 } | 238 } |
145 resetOptAndAssertResultEquals(15, f); | 239 resetOptAndAssertResultEquals(19, f); |
146 assertEquals(2, counter); | 240 assertEquals(2, counter); |
147 | 241 |
148 // Variant flags: [alternativeFn2, tryReturns, doCatch, | 242 // Variant flags: [alternativeFn3, tryReturns, doCatch, |
149 // catchReturns, catchWithLocal, endReturnLocal, deopt] | 243 // catchReturns, catchWithLocal, endReturnLocal, deopt] |
150 | 244 |
151 f = function f___2__r__crl____ld () { | 245 f = function f___3___r__crl____ld () { |
152 var local = 3; | 246 var local = 888; |
153 deopt = true; | 247 deopt = true; |
154 try { | 248 try { |
155 counter++; | 249 counter++; |
156 return invertFunctionCall(increaseAndThrow42); | 250 return 4 + invertFunctionCall(increaseAndThrow42); |
157 counter++; | 251 counter++; |
158 } catch (ex) { | 252 } catch (ex) { |
159 counter++; | 253 counter++; |
160 return 2 + local; | 254 return 2 + local; |
161 counter++; | 255 counter++; |
162 } | 256 } |
163 counter++; | 257 counter++; |
164 return 5 + local; | 258 return 5 + local; |
165 } | 259 } |
166 resetOptAndAssertResultEquals(15, f); | 260 resetOptAndAssertResultEquals(19, f); |
167 assertEquals(2, counter); | 261 assertEquals(2, counter); |
168 | 262 |
169 // Variant flags: [alternativeFn2, tryReturns, tryResultToLocal, | 263 // Variant flags: [alternativeFn3, tryReturns, tryResultToLocal, |
170 // doCatch] | 264 // doCatch] |
171 | 265 |
172 f = function f___2__r_lc________ () { | 266 f = function f___3___r_lc________ () { |
173 var local = 3; | 267 var local = 888; |
174 deopt = false; | 268 deopt = false; |
175 try { | 269 try { |
176 counter++; | 270 counter++; |
177 local += invertFunctionCall(increaseAndThrow42); | 271 local += 4 + invertFunctionCall(increaseAndThrow42); |
178 counter++; | 272 counter++; |
179 } catch (ex) { | 273 } catch (ex) { |
180 counter++; | 274 counter++; |
181 counter++; | 275 counter++; |
182 } | 276 } |
183 counter++; | 277 counter++; |
184 } | 278 } |
185 resetOptAndAssertResultEquals(undefined, f); | 279 resetOptAndAssertResultEquals(undefined, f); |
186 assertEquals(4, counter); | 280 assertEquals(4, counter); |
187 | 281 |
188 // Variant flags: [alternativeFn2, tryReturns, tryResultToLocal, | 282 // Variant flags: [alternativeFn3, tryReturns, tryResultToLocal, |
189 // doCatch, deopt] | 283 // doCatch, deopt] |
190 | 284 |
191 f = function f___2__r_lc_______d () { | 285 f = function f___3___r_lc_______d () { |
192 var local = 3; | 286 var local = 888; |
193 deopt = true; | 287 deopt = true; |
194 try { | 288 try { |
195 counter++; | 289 counter++; |
196 local += invertFunctionCall(increaseAndThrow42); | 290 local += 4 + invertFunctionCall(increaseAndThrow42); |
197 counter++; | 291 counter++; |
198 } catch (ex) { | 292 } catch (ex) { |
199 counter++; | 293 counter++; |
200 counter++; | 294 counter++; |
201 } | 295 } |
202 counter++; | 296 counter++; |
203 } | 297 } |
204 resetOptAndAssertResultEquals(undefined, f); | 298 resetOptAndAssertResultEquals(undefined, f); |
205 assertEquals(4, counter); | 299 assertEquals(4, counter); |
206 | 300 |
207 // Variant flags: [alternativeFn2, tryReturns, tryResultToLocal, | 301 // Variant flags: [alternativeFn3, tryReturns, tryResultToLocal, |
208 // doCatch, endReturnLocal] | 302 // doCatch, endReturnLocal] |
209 | 303 |
210 f = function f___2__r_lc______l_ () { | 304 f = function f___3___r_lc______l_ () { |
211 var local = 3; | 305 var local = 888; |
212 deopt = false; | 306 deopt = false; |
213 try { | 307 try { |
214 counter++; | 308 counter++; |
215 local += invertFunctionCall(increaseAndThrow42); | 309 local += 4 + invertFunctionCall(increaseAndThrow42); |
216 counter++; | 310 counter++; |
217 } catch (ex) { | 311 } catch (ex) { |
218 counter++; | 312 counter++; |
219 counter++; | 313 counter++; |
220 } | 314 } |
221 counter++; | 315 counter++; |
222 return 5 + local; | 316 return 5 + local; |
223 } | 317 } |
224 resetOptAndAssertResultEquals(23, f); | 318 resetOptAndAssertResultEquals(912, f); |
225 assertEquals(4, counter); | 319 assertEquals(4, counter); |
226 | 320 |
227 // Variant flags: [alternativeFn2, tryReturns, tryResultToLocal, | 321 // Variant flags: [alternativeFn3, tryReturns, tryResultToLocal, |
228 // doCatch, endReturnLocal, deopt] | 322 // doCatch, endReturnLocal, deopt] |
229 | 323 |
230 f = function f___2__r_lc______ld () { | 324 f = function f___3___r_lc______ld () { |
231 var local = 3; | 325 var local = 888; |
232 deopt = true; | 326 deopt = true; |
233 try { | 327 try { |
234 counter++; | 328 counter++; |
235 local += invertFunctionCall(increaseAndThrow42); | 329 local += 4 + invertFunctionCall(increaseAndThrow42); |
236 counter++; | 330 counter++; |
237 } catch (ex) { | 331 } catch (ex) { |
238 counter++; | 332 counter++; |
239 counter++; | 333 counter++; |
240 } | 334 } |
241 counter++; | 335 counter++; |
242 return 5 + local; | 336 return 5 + local; |
243 } | 337 } |
244 resetOptAndAssertResultEquals(23, f); | 338 resetOptAndAssertResultEquals(912, f); |
245 assertEquals(4, counter); | 339 assertEquals(4, counter); |
246 | 340 |
247 // Variant flags: [alternativeFn2, tryReturns, tryResultToLocal, | 341 // Variant flags: [alternativeFn3, tryReturns, tryResultToLocal, |
248 // doCatch, catchThrows] | 342 // doCatch, catchThrows] |
249 | 343 |
250 f = function f___2__r_lc__t_____ () { | 344 f = function f___3___r_lc__t_____ () { |
251 var local = 3; | 345 var local = 888; |
252 deopt = false; | 346 deopt = false; |
253 try { | 347 try { |
254 counter++; | 348 counter++; |
255 local += invertFunctionCall(increaseAndThrow42); | 349 local += 4 + invertFunctionCall(increaseAndThrow42); |
256 counter++; | 350 counter++; |
257 } catch (ex) { | 351 } catch (ex) { |
258 counter++; | 352 counter++; |
259 throw 2 + ex; | 353 throw 2 + ex; |
260 counter++; | 354 counter++; |
261 } | 355 } |
262 counter++; | 356 counter++; |
263 } | 357 } |
264 resetOptAndAssertResultEquals(undefined, f); | 358 resetOptAndAssertResultEquals(undefined, f); |
265 assertEquals(4, counter); | 359 assertEquals(4, counter); |
266 | 360 |
267 // Variant flags: [alternativeFn2, tryReturns, tryResultToLocal, | 361 // Variant flags: [alternativeFn3, tryReturns, tryResultToLocal, |
268 // doCatch, catchThrows, deopt] | 362 // doCatch, catchThrows, deopt] |
269 | 363 |
270 f = function f___2__r_lc__t____d () { | 364 f = function f___3___r_lc__t____d () { |
271 var local = 3; | 365 var local = 888; |
272 deopt = true; | 366 deopt = true; |
273 try { | 367 try { |
274 counter++; | 368 counter++; |
275 local += invertFunctionCall(increaseAndThrow42); | 369 local += 4 + invertFunctionCall(increaseAndThrow42); |
276 counter++; | 370 counter++; |
277 } catch (ex) { | 371 } catch (ex) { |
278 counter++; | 372 counter++; |
279 throw 2 + ex; | 373 throw 2 + ex; |
280 counter++; | 374 counter++; |
281 } | 375 } |
282 counter++; | 376 counter++; |
283 } | 377 } |
284 resetOptAndAssertResultEquals(undefined, f); | 378 resetOptAndAssertResultEquals(undefined, f); |
285 assertEquals(4, counter); | 379 assertEquals(4, counter); |
286 | 380 |
287 // Variant flags: [alternativeFn2, tryReturns, tryResultToLocal, | 381 // Variant flags: [alternativeFn3, tryReturns, tryResultToLocal, |
288 // doCatch, catchThrows, endReturnLocal] | 382 // doCatch, catchThrows, endReturnLocal] |
289 | 383 |
290 f = function f___2__r_lc__t___l_ () { | 384 f = function f___3___r_lc__t___l_ () { |
291 var local = 3; | 385 var local = 888; |
292 deopt = false; | 386 deopt = false; |
293 try { | 387 try { |
294 counter++; | 388 counter++; |
295 local += invertFunctionCall(increaseAndThrow42); | 389 local += 4 + invertFunctionCall(increaseAndThrow42); |
296 counter++; | 390 counter++; |
297 } catch (ex) { | 391 } catch (ex) { |
298 counter++; | 392 counter++; |
299 throw 2 + ex; | 393 throw 2 + ex; |
300 counter++; | 394 counter++; |
301 } | 395 } |
302 counter++; | 396 counter++; |
303 return 5 + local; | 397 return 5 + local; |
304 } | 398 } |
305 resetOptAndAssertResultEquals(23, f); | 399 resetOptAndAssertResultEquals(912, f); |
306 assertEquals(4, counter); | 400 assertEquals(4, counter); |
307 | 401 |
308 // Variant flags: [alternativeFn2, tryReturns, tryResultToLocal, | 402 // Variant flags: [alternativeFn3, tryReturns, tryResultToLocal, |
309 // doCatch, catchThrows, endReturnLocal, deopt] | 403 // doCatch, catchThrows, endReturnLocal, deopt] |
310 | 404 |
311 f = function f___2__r_lc__t___ld () { | 405 f = function f___3___r_lc__t___ld () { |
312 var local = 3; | 406 var local = 888; |
313 deopt = true; | 407 deopt = true; |
314 try { | 408 try { |
315 counter++; | 409 counter++; |
316 local += invertFunctionCall(increaseAndThrow42); | 410 local += 4 + invertFunctionCall(increaseAndThrow42); |
317 counter++; | 411 counter++; |
318 } catch (ex) { | 412 } catch (ex) { |
319 counter++; | 413 counter++; |
320 throw 2 + ex; | 414 throw 2 + ex; |
321 counter++; | 415 counter++; |
322 } | 416 } |
323 counter++; | 417 counter++; |
324 return 5 + local; | 418 return 5 + local; |
325 } | 419 } |
326 resetOptAndAssertResultEquals(23, f); | 420 resetOptAndAssertResultEquals(912, f); |
327 assertEquals(4, counter); | 421 assertEquals(4, counter); |
328 | 422 |
329 // Variant flags: [alternativeFn2, tryReturns, tryResultToLocal, | 423 // Variant flags: [alternativeFn3, tryReturns, tryResultToLocal, |
330 // doCatch, catchWithLocal] | 424 // doCatch, catchWithLocal] |
331 | 425 |
332 f = function f___2__r_lc_l______ () { | 426 f = function f___3___r_lc_l______ () { |
333 var local = 3; | 427 var local = 888; |
334 deopt = false; | 428 deopt = false; |
335 try { | 429 try { |
336 counter++; | 430 counter++; |
337 local += invertFunctionCall(increaseAndThrow42); | 431 local += 4 + invertFunctionCall(increaseAndThrow42); |
338 counter++; | 432 counter++; |
339 } catch (ex) { | 433 } catch (ex) { |
340 counter++; | 434 counter++; |
341 local += ex; | 435 local += ex; |
342 counter++; | 436 counter++; |
343 } | 437 } |
344 counter++; | 438 counter++; |
345 } | 439 } |
346 resetOptAndAssertResultEquals(undefined, f); | 440 resetOptAndAssertResultEquals(undefined, f); |
347 assertEquals(4, counter); | 441 assertEquals(4, counter); |
348 | 442 |
349 // Variant flags: [alternativeFn2, tryReturns, tryResultToLocal, | 443 // Variant flags: [alternativeFn3, tryReturns, tryResultToLocal, |
350 // doCatch, catchWithLocal, deopt] | 444 // doCatch, catchWithLocal, deopt] |
351 | 445 |
352 f = function f___2__r_lc_l_____d () { | 446 f = function f___3___r_lc_l_____d () { |
353 var local = 3; | 447 var local = 888; |
354 deopt = true; | 448 deopt = true; |
355 try { | 449 try { |
356 counter++; | 450 counter++; |
357 local += invertFunctionCall(increaseAndThrow42); | 451 local += 4 + invertFunctionCall(increaseAndThrow42); |
358 counter++; | 452 counter++; |
359 } catch (ex) { | 453 } catch (ex) { |
360 counter++; | 454 counter++; |
361 local += ex; | 455 local += ex; |
362 counter++; | 456 counter++; |
363 } | 457 } |
364 counter++; | 458 counter++; |
365 } | 459 } |
366 resetOptAndAssertResultEquals(undefined, f); | 460 resetOptAndAssertResultEquals(undefined, f); |
367 assertEquals(4, counter); | 461 assertEquals(4, counter); |
368 | 462 |
369 // Variant flags: [alternativeFn2, tryReturns, tryResultToLocal, | 463 // Variant flags: [alternativeFn3, tryReturns, tryResultToLocal, |
370 // doCatch, catchWithLocal, endReturnLocal] | 464 // doCatch, catchWithLocal, endReturnLocal] |
371 | 465 |
372 f = function f___2__r_lc_l____l_ () { | 466 f = function f___3___r_lc_l____l_ () { |
373 var local = 3; | 467 var local = 888; |
374 deopt = false; | 468 deopt = false; |
375 try { | 469 try { |
376 counter++; | 470 counter++; |
377 local += invertFunctionCall(increaseAndThrow42); | 471 local += 4 + invertFunctionCall(increaseAndThrow42); |
378 counter++; | 472 counter++; |
379 } catch (ex) { | 473 } catch (ex) { |
380 counter++; | 474 counter++; |
381 local += ex; | 475 local += ex; |
382 counter++; | 476 counter++; |
383 } | 477 } |
384 counter++; | 478 counter++; |
385 return 5 + local; | 479 return 5 + local; |
386 } | 480 } |
387 resetOptAndAssertResultEquals(23, f); | 481 resetOptAndAssertResultEquals(912, f); |
388 assertEquals(4, counter); | 482 assertEquals(4, counter); |
389 | 483 |
390 // Variant flags: [alternativeFn2, tryReturns, tryResultToLocal, | 484 // Variant flags: [alternativeFn3, tryReturns, tryResultToLocal, |
391 // doCatch, catchWithLocal, endReturnLocal, deopt] | 485 // doCatch, catchWithLocal, endReturnLocal, deopt] |
392 | 486 |
393 f = function f___2__r_lc_l____ld () { | 487 f = function f___3___r_lc_l____ld () { |
394 var local = 3; | 488 var local = 888; |
395 deopt = true; | 489 deopt = true; |
396 try { | 490 try { |
397 counter++; | 491 counter++; |
398 local += invertFunctionCall(increaseAndThrow42); | 492 local += 4 + invertFunctionCall(increaseAndThrow42); |
399 counter++; | 493 counter++; |
400 } catch (ex) { | 494 } catch (ex) { |
401 counter++; | 495 counter++; |
402 local += ex; | 496 local += ex; |
403 counter++; | 497 counter++; |
404 } | 498 } |
405 counter++; | 499 counter++; |
406 return 5 + local; | 500 return 5 + local; |
407 } | 501 } |
408 resetOptAndAssertResultEquals(23, f); | 502 resetOptAndAssertResultEquals(912, f); |
409 assertEquals(4, counter); | 503 assertEquals(4, counter); |
410 | 504 |
411 // Variant flags: [alternativeFn2, tryReturns, tryResultToLocal, | 505 // Variant flags: [alternativeFn3, tryReturns, tryResultToLocal, |
412 // doCatch, catchWithLocal, catchThrows] | 506 // doCatch, catchWithLocal, catchThrows] |
413 | 507 |
414 f = function f___2__r_lc_lt_____ () { | 508 f = function f___3___r_lc_lt_____ () { |
415 var local = 3; | 509 var local = 888; |
416 deopt = false; | 510 deopt = false; |
417 try { | 511 try { |
418 counter++; | 512 counter++; |
419 local += invertFunctionCall(increaseAndThrow42); | 513 local += 4 + invertFunctionCall(increaseAndThrow42); |
420 counter++; | 514 counter++; |
421 } catch (ex) { | 515 } catch (ex) { |
422 counter++; | 516 counter++; |
423 throw 2 + ex; | 517 throw 2 + ex; |
424 counter++; | 518 counter++; |
425 } | 519 } |
426 counter++; | 520 counter++; |
427 } | 521 } |
428 resetOptAndAssertResultEquals(undefined, f); | 522 resetOptAndAssertResultEquals(undefined, f); |
429 assertEquals(4, counter); | 523 assertEquals(4, counter); |
430 | 524 |
431 // Variant flags: [alternativeFn2, tryReturns, tryResultToLocal, | 525 // Variant flags: [alternativeFn3, tryReturns, tryResultToLocal, |
432 // doCatch, catchWithLocal, catchThrows, deopt] | 526 // doCatch, catchWithLocal, catchThrows, deopt] |
433 | 527 |
434 f = function f___2__r_lc_lt____d () { | 528 f = function f___3___r_lc_lt____d () { |
435 var local = 3; | 529 var local = 888; |
436 deopt = true; | 530 deopt = true; |
437 try { | 531 try { |
438 counter++; | 532 counter++; |
439 local += invertFunctionCall(increaseAndThrow42); | 533 local += 4 + invertFunctionCall(increaseAndThrow42); |
440 counter++; | 534 counter++; |
441 } catch (ex) { | 535 } catch (ex) { |
442 counter++; | 536 counter++; |
443 throw 2 + ex; | 537 throw 2 + ex; |
444 counter++; | 538 counter++; |
445 } | 539 } |
446 counter++; | 540 counter++; |
447 } | 541 } |
448 resetOptAndAssertResultEquals(undefined, f); | 542 resetOptAndAssertResultEquals(undefined, f); |
449 assertEquals(4, counter); | 543 assertEquals(4, counter); |
450 | 544 |
451 // Variant flags: [alternativeFn2, tryReturns, tryResultToLocal, | 545 // Variant flags: [alternativeFn3, tryReturns, tryResultToLocal, |
452 // doCatch, catchWithLocal, catchThrows, endReturnLocal] | 546 // doCatch, catchWithLocal, catchThrows, endReturnLocal] |
453 | 547 |
454 f = function f___2__r_lc_lt___l_ () { | 548 f = function f___3___r_lc_lt___l_ () { |
455 var local = 3; | 549 var local = 888; |
456 deopt = false; | 550 deopt = false; |
457 try { | 551 try { |
458 counter++; | 552 counter++; |
459 local += invertFunctionCall(increaseAndThrow42); | 553 local += 4 + invertFunctionCall(increaseAndThrow42); |
460 counter++; | 554 counter++; |
461 } catch (ex) { | 555 } catch (ex) { |
462 counter++; | 556 counter++; |
463 throw 2 + ex; | 557 throw 2 + ex; |
464 counter++; | 558 counter++; |
465 } | 559 } |
466 counter++; | 560 counter++; |
467 return 5 + local; | 561 return 5 + local; |
468 } | 562 } |
469 resetOptAndAssertResultEquals(23, f); | 563 resetOptAndAssertResultEquals(912, f); |
470 assertEquals(4, counter); | 564 assertEquals(4, counter); |
471 | 565 |
472 // Variant flags: [alternativeFn2, tryReturns, tryResultToLocal, | 566 // Variant flags: [alternativeFn3, tryReturns, tryResultToLocal, |
473 // doCatch, catchWithLocal, catchThrows, endReturnLocal, deopt] | 567 // doCatch, catchWithLocal, catchThrows, endReturnLocal, deopt] |
474 | 568 |
475 f = function f___2__r_lc_lt___ld () { | 569 f = function f___3___r_lc_lt___ld () { |
476 var local = 3; | 570 var local = 888; |
477 deopt = true; | 571 deopt = true; |
478 try { | 572 try { |
479 counter++; | 573 counter++; |
480 local += invertFunctionCall(increaseAndThrow42); | 574 local += 4 + invertFunctionCall(increaseAndThrow42); |
481 counter++; | 575 counter++; |
482 } catch (ex) { | 576 } catch (ex) { |
483 counter++; | 577 counter++; |
484 throw 2 + ex; | 578 throw 2 + ex; |
485 counter++; | 579 counter++; |
486 } | 580 } |
487 counter++; | 581 counter++; |
488 return 5 + local; | 582 return 5 + local; |
489 } | 583 } |
490 resetOptAndAssertResultEquals(23, f); | 584 resetOptAndAssertResultEquals(912, f); |
491 assertEquals(4, counter); | 585 assertEquals(4, counter); |
492 | 586 |
493 // Variant flags: [alternativeFn2, tryReturns, tryResultToLocal, | 587 // Variant flags: [alternativeFn3, tryReturns, tryResultToLocal, |
494 // doCatch, catchReturns] | 588 // doCatch, catchReturns] |
495 | 589 |
496 f = function f___2__r_lcr_______ () { | 590 f = function f___3___r_lcr_______ () { |
497 var local = 3; | 591 var local = 888; |
498 deopt = false; | 592 deopt = false; |
499 try { | 593 try { |
500 counter++; | 594 counter++; |
501 local += invertFunctionCall(increaseAndThrow42); | 595 local += 4 + invertFunctionCall(increaseAndThrow42); |
502 counter++; | 596 counter++; |
503 } catch (ex) { | 597 } catch (ex) { |
504 counter++; | 598 counter++; |
505 return 2 + ex; | 599 return 2 + ex; |
506 counter++; | 600 counter++; |
507 } | 601 } |
508 counter++; | 602 counter++; |
509 } | 603 } |
510 resetOptAndAssertResultEquals(undefined, f); | 604 resetOptAndAssertResultEquals(undefined, f); |
511 assertEquals(4, counter); | 605 assertEquals(4, counter); |
512 | 606 |
513 // Variant flags: [alternativeFn2, tryReturns, tryResultToLocal, | 607 // Variant flags: [alternativeFn3, tryReturns, tryResultToLocal, |
514 // doCatch, catchReturns, deopt] | 608 // doCatch, catchReturns, deopt] |
515 | 609 |
516 f = function f___2__r_lcr______d () { | 610 f = function f___3___r_lcr______d () { |
517 var local = 3; | 611 var local = 888; |
518 deopt = true; | 612 deopt = true; |
519 try { | 613 try { |
520 counter++; | 614 counter++; |
521 local += invertFunctionCall(increaseAndThrow42); | 615 local += 4 + invertFunctionCall(increaseAndThrow42); |
522 counter++; | 616 counter++; |
523 } catch (ex) { | 617 } catch (ex) { |
524 counter++; | 618 counter++; |
525 return 2 + ex; | 619 return 2 + ex; |
526 counter++; | 620 counter++; |
527 } | 621 } |
528 counter++; | 622 counter++; |
529 } | 623 } |
530 resetOptAndAssertResultEquals(undefined, f); | 624 resetOptAndAssertResultEquals(undefined, f); |
531 assertEquals(4, counter); | 625 assertEquals(4, counter); |
532 | 626 |
533 // Variant flags: [alternativeFn2, tryReturns, tryResultToLocal, | 627 // Variant flags: [alternativeFn3, tryReturns, tryResultToLocal, |
534 // doCatch, catchReturns, endReturnLocal] | 628 // doCatch, catchReturns, endReturnLocal] |
535 | 629 |
536 f = function f___2__r_lcr_____l_ () { | 630 f = function f___3___r_lcr_____l_ () { |
537 var local = 3; | 631 var local = 888; |
538 deopt = false; | 632 deopt = false; |
539 try { | 633 try { |
540 counter++; | 634 counter++; |
541 local += invertFunctionCall(increaseAndThrow42); | 635 local += 4 + invertFunctionCall(increaseAndThrow42); |
542 counter++; | 636 counter++; |
543 } catch (ex) { | 637 } catch (ex) { |
544 counter++; | 638 counter++; |
545 return 2 + ex; | 639 return 2 + ex; |
546 counter++; | 640 counter++; |
547 } | 641 } |
548 counter++; | 642 counter++; |
549 return 5 + local; | 643 return 5 + local; |
550 } | 644 } |
551 resetOptAndAssertResultEquals(23, f); | 645 resetOptAndAssertResultEquals(912, f); |
552 assertEquals(4, counter); | 646 assertEquals(4, counter); |
553 | 647 |
554 // Variant flags: [alternativeFn2, tryReturns, tryResultToLocal, | 648 // Variant flags: [alternativeFn3, tryReturns, tryResultToLocal, |
555 // doCatch, catchReturns, endReturnLocal, deopt] | 649 // doCatch, catchReturns, endReturnLocal, deopt] |
556 | 650 |
557 f = function f___2__r_lcr_____ld () { | 651 f = function f___3___r_lcr_____ld () { |
558 var local = 3; | 652 var local = 888; |
559 deopt = true; | 653 deopt = true; |
560 try { | 654 try { |
561 counter++; | 655 counter++; |
562 local += invertFunctionCall(increaseAndThrow42); | 656 local += 4 + invertFunctionCall(increaseAndThrow42); |
563 counter++; | 657 counter++; |
564 } catch (ex) { | 658 } catch (ex) { |
565 counter++; | 659 counter++; |
566 return 2 + ex; | 660 return 2 + ex; |
567 counter++; | 661 counter++; |
568 } | 662 } |
569 counter++; | 663 counter++; |
570 return 5 + local; | 664 return 5 + local; |
571 } | 665 } |
572 resetOptAndAssertResultEquals(23, f); | 666 resetOptAndAssertResultEquals(912, f); |
573 assertEquals(4, counter); | 667 assertEquals(4, counter); |
574 | 668 |
575 // Variant flags: [alternativeFn2, tryReturns, tryResultToLocal, | 669 // Variant flags: [alternativeFn3, tryReturns, tryResultToLocal, |
576 // doCatch, catchReturns, catchWithLocal] | 670 // doCatch, catchReturns, catchWithLocal] |
577 | 671 |
578 f = function f___2__r_lcrl______ () { | 672 f = function f___3___r_lcrl______ () { |
579 var local = 3; | 673 var local = 888; |
580 deopt = false; | 674 deopt = false; |
581 try { | 675 try { |
582 counter++; | 676 counter++; |
583 local += invertFunctionCall(increaseAndThrow42); | 677 local += 4 + invertFunctionCall(increaseAndThrow42); |
584 counter++; | 678 counter++; |
585 } catch (ex) { | 679 } catch (ex) { |
586 counter++; | 680 counter++; |
587 return 2 + local; | 681 return 2 + local; |
588 counter++; | 682 counter++; |
589 } | 683 } |
590 counter++; | 684 counter++; |
591 } | 685 } |
592 resetOptAndAssertResultEquals(undefined, f); | 686 resetOptAndAssertResultEquals(undefined, f); |
593 assertEquals(4, counter); | 687 assertEquals(4, counter); |
594 | 688 |
595 // Variant flags: [alternativeFn2, tryReturns, tryResultToLocal, | 689 // Variant flags: [alternativeFn3, tryReturns, tryResultToLocal, |
596 // doCatch, catchReturns, catchWithLocal, deopt] | 690 // doCatch, catchReturns, catchWithLocal, deopt] |
597 | 691 |
598 f = function f___2__r_lcrl_____d () { | 692 f = function f___3___r_lcrl_____d () { |
599 var local = 3; | 693 var local = 888; |
600 deopt = true; | 694 deopt = true; |
601 try { | 695 try { |
602 counter++; | 696 counter++; |
603 local += invertFunctionCall(increaseAndThrow42); | 697 local += 4 + invertFunctionCall(increaseAndThrow42); |
604 counter++; | 698 counter++; |
605 } catch (ex) { | 699 } catch (ex) { |
606 counter++; | 700 counter++; |
607 return 2 + local; | 701 return 2 + local; |
608 counter++; | 702 counter++; |
609 } | 703 } |
610 counter++; | 704 counter++; |
611 } | 705 } |
612 resetOptAndAssertResultEquals(undefined, f); | 706 resetOptAndAssertResultEquals(undefined, f); |
613 assertEquals(4, counter); | 707 assertEquals(4, counter); |
614 | 708 |
615 // Variant flags: [alternativeFn2, tryReturns, tryResultToLocal, | 709 // Variant flags: [alternativeFn3, tryReturns, tryResultToLocal, |
616 // doCatch, catchReturns, catchWithLocal, endReturnLocal] | 710 // doCatch, catchReturns, catchWithLocal, endReturnLocal] |
617 | 711 |
618 f = function f___2__r_lcrl____l_ () { | 712 f = function f___3___r_lcrl____l_ () { |
619 var local = 3; | 713 var local = 888; |
620 deopt = false; | 714 deopt = false; |
621 try { | 715 try { |
622 counter++; | 716 counter++; |
623 local += invertFunctionCall(increaseAndThrow42); | 717 local += 4 + invertFunctionCall(increaseAndThrow42); |
624 counter++; | 718 counter++; |
625 } catch (ex) { | 719 } catch (ex) { |
626 counter++; | 720 counter++; |
627 return 2 + local; | 721 return 2 + local; |
628 counter++; | 722 counter++; |
629 } | 723 } |
630 counter++; | 724 counter++; |
631 return 5 + local; | 725 return 5 + local; |
632 } | 726 } |
633 resetOptAndAssertResultEquals(23, f); | 727 resetOptAndAssertResultEquals(912, f); |
634 assertEquals(4, counter); | 728 assertEquals(4, counter); |
635 | 729 |
636 // Variant flags: [alternativeFn2, tryReturns, tryResultToLocal, | 730 // Variant flags: [alternativeFn3, tryReturns, tryResultToLocal, |
637 // doCatch, catchReturns, catchWithLocal, endReturnLocal, deopt] | 731 // doCatch, catchReturns, catchWithLocal, endReturnLocal, deopt] |
638 | 732 |
639 f = function f___2__r_lcrl____ld () { | 733 f = function f___3___r_lcrl____ld () { |
640 var local = 3; | 734 var local = 888; |
641 deopt = true; | 735 deopt = true; |
642 try { | 736 try { |
643 counter++; | 737 counter++; |
644 local += invertFunctionCall(increaseAndThrow42); | 738 local += 4 + invertFunctionCall(increaseAndThrow42); |
645 counter++; | 739 counter++; |
646 } catch (ex) { | 740 } catch (ex) { |
647 counter++; | 741 counter++; |
648 return 2 + local; | 742 return 2 + local; |
649 counter++; | 743 counter++; |
650 } | 744 } |
651 counter++; | 745 counter++; |
652 return 5 + local; | 746 return 5 + local; |
653 } | 747 } |
654 resetOptAndAssertResultEquals(23, f); | 748 resetOptAndAssertResultEquals(912, f); |
655 assertEquals(4, counter); | 749 assertEquals(4, counter); |
656 | 750 |
657 // Variant flags: [alternativeFn2, tryThrows, doCatch] | 751 // Variant flags: [alternativeFn3, tryThrows, doCatch] |
658 | 752 |
659 f = function f___2_t___c________ () { | 753 f = function f___3__t___c________ () { |
660 var local = 3; | 754 var local = 888; |
661 deopt = false; | 755 deopt = false; |
662 try { | 756 try { |
663 counter++; | 757 counter++; |
664 return invertFunctionCall(increaseAndReturn15); | 758 return 4 + invertFunctionCall(increaseAndReturn15); |
665 counter++; | 759 counter++; |
666 } catch (ex) { | 760 } catch (ex) { |
667 counter++; | 761 counter++; |
668 counter++; | 762 counter++; |
669 } | 763 } |
670 counter++; | 764 counter++; |
671 } | 765 } |
672 resetOptAndAssertResultEquals(undefined, f); | 766 resetOptAndAssertResultEquals(undefined, f); |
673 assertEquals(5, counter); | 767 assertEquals(5, counter); |
674 | 768 |
675 // Variant flags: [alternativeFn2, tryThrows, doCatch, deopt] | 769 // Variant flags: [alternativeFn3, tryThrows, doCatch, deopt] |
676 | 770 |
677 f = function f___2_t___c_______d () { | 771 f = function f___3__t___c_______d () { |
678 var local = 3; | 772 var local = 888; |
679 deopt = true; | 773 deopt = true; |
680 try { | 774 try { |
681 counter++; | 775 counter++; |
682 return invertFunctionCall(increaseAndReturn15); | 776 return 4 + invertFunctionCall(increaseAndReturn15); |
683 counter++; | 777 counter++; |
684 } catch (ex) { | 778 } catch (ex) { |
685 counter++; | 779 counter++; |
686 counter++; | 780 counter++; |
687 } | 781 } |
688 counter++; | 782 counter++; |
689 } | 783 } |
690 resetOptAndAssertResultEquals(undefined, f); | 784 resetOptAndAssertResultEquals(undefined, f); |
691 assertEquals(5, counter); | 785 assertEquals(5, counter); |
692 | 786 |
693 // Variant flags: [alternativeFn2, tryThrows, doCatch, catchThrows] | 787 // Variant flags: [alternativeFn3, tryThrows, doCatch, catchThrows] |
694 | 788 |
695 f = function f___2_t___c__t_____ () { | 789 f = function f___3__t___c__t_____ () { |
696 var local = 3; | 790 var local = 888; |
697 deopt = false; | 791 deopt = false; |
698 try { | 792 try { |
699 counter++; | 793 counter++; |
700 return invertFunctionCall(increaseAndReturn15); | 794 return 4 + invertFunctionCall(increaseAndReturn15); |
701 counter++; | 795 counter++; |
702 } catch (ex) { | 796 } catch (ex) { |
703 counter++; | 797 counter++; |
704 throw 2 + ex; | 798 throw 2 + ex; |
705 counter++; | 799 counter++; |
706 } | 800 } |
707 counter++; | 801 counter++; |
708 } | 802 } |
709 resetOptAndAssertThrowsWith(44, f); | 803 resetOptAndAssertThrowsWith(44, f); |
710 assertEquals(3, counter); | 804 assertEquals(3, counter); |
711 | 805 |
712 // Variant flags: [alternativeFn2, tryThrows, doCatch, catchThrows, | 806 // Variant flags: [alternativeFn3, tryThrows, doCatch, catchThrows, |
713 // deopt] | 807 // deopt] |
714 | 808 |
715 f = function f___2_t___c__t____d () { | 809 f = function f___3__t___c__t____d () { |
716 var local = 3; | 810 var local = 888; |
717 deopt = true; | 811 deopt = true; |
718 try { | 812 try { |
719 counter++; | 813 counter++; |
720 return invertFunctionCall(increaseAndReturn15); | 814 return 4 + invertFunctionCall(increaseAndReturn15); |
721 counter++; | 815 counter++; |
722 } catch (ex) { | 816 } catch (ex) { |
723 counter++; | 817 counter++; |
724 throw 2 + ex; | 818 throw 2 + ex; |
725 counter++; | 819 counter++; |
726 } | 820 } |
727 counter++; | 821 counter++; |
728 } | 822 } |
729 resetOptAndAssertThrowsWith(44, f); | 823 resetOptAndAssertThrowsWith(44, f); |
730 assertEquals(3, counter); | 824 assertEquals(3, counter); |
731 | 825 |
732 // Variant flags: [alternativeFn2, tryThrows, doCatch, | 826 // Variant flags: [alternativeFn3, tryThrows, doCatch, |
733 // catchWithLocal] | 827 // catchWithLocal] |
734 | 828 |
735 f = function f___2_t___c_l______ () { | 829 f = function f___3__t___c_l______ () { |
736 var local = 3; | 830 var local = 888; |
737 deopt = false; | 831 deopt = false; |
738 try { | 832 try { |
739 counter++; | 833 counter++; |
740 return invertFunctionCall(increaseAndReturn15); | 834 return 4 + invertFunctionCall(increaseAndReturn15); |
741 counter++; | 835 counter++; |
742 } catch (ex) { | 836 } catch (ex) { |
743 counter++; | 837 counter++; |
744 local += ex; | 838 local += ex; |
745 counter++; | 839 counter++; |
746 } | 840 } |
747 counter++; | 841 counter++; |
748 } | 842 } |
749 resetOptAndAssertResultEquals(undefined, f); | 843 resetOptAndAssertResultEquals(undefined, f); |
750 assertEquals(5, counter); | 844 assertEquals(5, counter); |
751 | 845 |
752 // Variant flags: [alternativeFn2, tryThrows, doCatch, | 846 // Variant flags: [alternativeFn3, tryThrows, doCatch, |
753 // catchWithLocal, deopt] | 847 // catchWithLocal, deopt] |
754 | 848 |
755 f = function f___2_t___c_l_____d () { | 849 f = function f___3__t___c_l_____d () { |
756 var local = 3; | 850 var local = 888; |
757 deopt = true; | 851 deopt = true; |
758 try { | 852 try { |
759 counter++; | 853 counter++; |
760 return invertFunctionCall(increaseAndReturn15); | 854 return 4 + invertFunctionCall(increaseAndReturn15); |
761 counter++; | 855 counter++; |
762 } catch (ex) { | 856 } catch (ex) { |
763 counter++; | 857 counter++; |
764 local += ex; | 858 local += ex; |
765 counter++; | 859 counter++; |
766 } | 860 } |
767 counter++; | 861 counter++; |
768 } | 862 } |
769 resetOptAndAssertResultEquals(undefined, f); | 863 resetOptAndAssertResultEquals(undefined, f); |
770 assertEquals(5, counter); | 864 assertEquals(5, counter); |
771 | 865 |
772 // Variant flags: [alternativeFn2, tryThrows, doCatch, | 866 // Variant flags: [alternativeFn3, tryThrows, doCatch, |
773 // catchWithLocal, endReturnLocal] | 867 // catchWithLocal, endReturnLocal] |
774 | 868 |
775 f = function f___2_t___c_l____l_ () { | 869 f = function f___3__t___c_l____l_ () { |
776 var local = 3; | 870 var local = 888; |
777 deopt = false; | 871 deopt = false; |
778 try { | 872 try { |
779 counter++; | 873 counter++; |
780 return invertFunctionCall(increaseAndReturn15); | 874 return 4 + invertFunctionCall(increaseAndReturn15); |
781 counter++; | 875 counter++; |
782 } catch (ex) { | 876 } catch (ex) { |
783 counter++; | 877 counter++; |
784 local += ex; | 878 local += ex; |
785 counter++; | 879 counter++; |
786 } | 880 } |
787 counter++; | 881 counter++; |
788 return 5 + local; | 882 return 5 + local; |
789 } | 883 } |
790 resetOptAndAssertResultEquals(50, f); | 884 resetOptAndAssertResultEquals(935, f); |
791 assertEquals(5, counter); | 885 assertEquals(5, counter); |
792 | 886 |
793 // Variant flags: [alternativeFn2, tryThrows, doCatch, | 887 // Variant flags: [alternativeFn3, tryThrows, doCatch, |
794 // catchWithLocal, endReturnLocal, deopt] | 888 // catchWithLocal, endReturnLocal, deopt] |
795 | 889 |
796 f = function f___2_t___c_l____ld () { | 890 f = function f___3__t___c_l____ld () { |
797 var local = 3; | 891 var local = 888; |
798 deopt = true; | 892 deopt = true; |
799 try { | 893 try { |
800 counter++; | 894 counter++; |
801 return invertFunctionCall(increaseAndReturn15); | 895 return 4 + invertFunctionCall(increaseAndReturn15); |
802 counter++; | 896 counter++; |
803 } catch (ex) { | 897 } catch (ex) { |
804 counter++; | 898 counter++; |
805 local += ex; | 899 local += ex; |
806 counter++; | 900 counter++; |
807 } | 901 } |
808 counter++; | 902 counter++; |
809 return 5 + local; | 903 return 5 + local; |
810 } | 904 } |
811 resetOptAndAssertResultEquals(50, f); | 905 resetOptAndAssertResultEquals(935, f); |
812 assertEquals(5, counter); | 906 assertEquals(5, counter); |
813 | 907 |
814 // Variant flags: [alternativeFn2, tryThrows, doCatch, | 908 // Variant flags: [alternativeFn3, tryThrows, doCatch, |
815 // catchWithLocal, catchThrows] | 909 // catchWithLocal, catchThrows] |
816 | 910 |
817 f = function f___2_t___c_lt_____ () { | 911 f = function f___3__t___c_lt_____ () { |
818 var local = 3; | 912 var local = 888; |
819 deopt = false; | 913 deopt = false; |
820 try { | 914 try { |
821 counter++; | 915 counter++; |
822 return invertFunctionCall(increaseAndReturn15); | 916 return 4 + invertFunctionCall(increaseAndReturn15); |
823 counter++; | 917 counter++; |
824 } catch (ex) { | 918 } catch (ex) { |
825 counter++; | 919 counter++; |
826 throw 2 + ex; | 920 throw 2 + ex; |
827 counter++; | 921 counter++; |
828 } | 922 } |
829 counter++; | 923 counter++; |
830 } | 924 } |
831 resetOptAndAssertThrowsWith(44, f); | 925 resetOptAndAssertThrowsWith(44, f); |
832 assertEquals(3, counter); | 926 assertEquals(3, counter); |
833 | 927 |
834 // Variant flags: [alternativeFn2, tryThrows, doCatch, | 928 // Variant flags: [alternativeFn3, tryThrows, doCatch, |
835 // catchWithLocal, catchThrows, deopt] | 929 // catchWithLocal, catchThrows, deopt] |
836 | 930 |
837 f = function f___2_t___c_lt____d () { | 931 f = function f___3__t___c_lt____d () { |
838 var local = 3; | 932 var local = 888; |
839 deopt = true; | 933 deopt = true; |
840 try { | 934 try { |
841 counter++; | 935 counter++; |
842 return invertFunctionCall(increaseAndReturn15); | 936 return 4 + invertFunctionCall(increaseAndReturn15); |
843 counter++; | 937 counter++; |
844 } catch (ex) { | 938 } catch (ex) { |
845 counter++; | 939 counter++; |
846 throw 2 + ex; | 940 throw 2 + ex; |
847 counter++; | 941 counter++; |
848 } | 942 } |
849 counter++; | 943 counter++; |
850 } | 944 } |
851 resetOptAndAssertThrowsWith(44, f); | 945 resetOptAndAssertThrowsWith(44, f); |
852 assertEquals(3, counter); | 946 assertEquals(3, counter); |
853 | 947 |
854 // Variant flags: [alternativeFn2, tryThrows, doCatch, | 948 // Variant flags: [alternativeFn3, tryThrows, doCatch, |
855 // catchWithLocal, catchThrows, endReturnLocal] | 949 // catchWithLocal, catchThrows, endReturnLocal] |
856 | 950 |
857 f = function f___2_t___c_lt___l_ () { | 951 f = function f___3__t___c_lt___l_ () { |
858 var local = 3; | 952 var local = 888; |
859 deopt = false; | 953 deopt = false; |
860 try { | 954 try { |
861 counter++; | 955 counter++; |
862 return invertFunctionCall(increaseAndReturn15); | 956 return 4 + invertFunctionCall(increaseAndReturn15); |
863 counter++; | 957 counter++; |
864 } catch (ex) { | 958 } catch (ex) { |
865 counter++; | 959 counter++; |
866 throw 2 + ex; | 960 throw 2 + ex; |
867 counter++; | 961 counter++; |
868 } | 962 } |
869 counter++; | 963 counter++; |
870 return 5 + local; | 964 return 5 + local; |
871 } | 965 } |
872 resetOptAndAssertThrowsWith(44, f); | 966 resetOptAndAssertThrowsWith(44, f); |
873 assertEquals(3, counter); | 967 assertEquals(3, counter); |
874 | 968 |
875 // Variant flags: [alternativeFn2, tryThrows, doCatch, | 969 // Variant flags: [alternativeFn3, tryThrows, doCatch, |
876 // catchWithLocal, catchThrows, endReturnLocal, deopt] | 970 // catchWithLocal, catchThrows, endReturnLocal, deopt] |
877 | 971 |
878 f = function f___2_t___c_lt___ld () { | 972 f = function f___3__t___c_lt___ld () { |
879 var local = 3; | 973 var local = 888; |
880 deopt = true; | 974 deopt = true; |
881 try { | 975 try { |
882 counter++; | 976 counter++; |
883 return invertFunctionCall(increaseAndReturn15); | 977 return 4 + invertFunctionCall(increaseAndReturn15); |
884 counter++; | 978 counter++; |
885 } catch (ex) { | 979 } catch (ex) { |
886 counter++; | 980 counter++; |
887 throw 2 + ex; | 981 throw 2 + ex; |
888 counter++; | 982 counter++; |
889 } | 983 } |
890 counter++; | 984 counter++; |
891 return 5 + local; | 985 return 5 + local; |
892 } | 986 } |
893 resetOptAndAssertThrowsWith(44, f); | 987 resetOptAndAssertThrowsWith(44, f); |
894 assertEquals(3, counter); | 988 assertEquals(3, counter); |
895 | 989 |
896 // Variant flags: [alternativeFn2, tryThrows, doCatch, catchReturns] | 990 // Variant flags: [alternativeFn3, tryThrows, doCatch, catchReturns] |
897 | 991 |
898 f = function f___2_t___cr_______ () { | 992 f = function f___3__t___cr_______ () { |
899 var local = 3; | 993 var local = 888; |
900 deopt = false; | 994 deopt = false; |
901 try { | 995 try { |
902 counter++; | 996 counter++; |
903 return invertFunctionCall(increaseAndReturn15); | 997 return 4 + invertFunctionCall(increaseAndReturn15); |
904 counter++; | 998 counter++; |
905 } catch (ex) { | 999 } catch (ex) { |
906 counter++; | 1000 counter++; |
907 return 2 + ex; | 1001 return 2 + ex; |
908 counter++; | 1002 counter++; |
909 } | 1003 } |
910 counter++; | 1004 counter++; |
911 } | 1005 } |
912 resetOptAndAssertResultEquals(44, f); | 1006 resetOptAndAssertResultEquals(44, f); |
913 assertEquals(3, counter); | 1007 assertEquals(3, counter); |
914 | 1008 |
915 // Variant flags: [alternativeFn2, tryThrows, doCatch, catchReturns, | 1009 // Variant flags: [alternativeFn3, tryThrows, doCatch, catchReturns, |
916 // deopt] | 1010 // deopt] |
917 | 1011 |
918 f = function f___2_t___cr______d () { | 1012 f = function f___3__t___cr______d () { |
919 var local = 3; | 1013 var local = 888; |
920 deopt = true; | 1014 deopt = true; |
921 try { | 1015 try { |
922 counter++; | 1016 counter++; |
923 return invertFunctionCall(increaseAndReturn15); | 1017 return 4 + invertFunctionCall(increaseAndReturn15); |
924 counter++; | 1018 counter++; |
925 } catch (ex) { | 1019 } catch (ex) { |
926 counter++; | 1020 counter++; |
927 return 2 + ex; | 1021 return 2 + ex; |
928 counter++; | 1022 counter++; |
929 } | 1023 } |
930 counter++; | 1024 counter++; |
931 } | 1025 } |
932 resetOptAndAssertResultEquals(44, f); | 1026 resetOptAndAssertResultEquals(44, f); |
933 assertEquals(3, counter); | 1027 assertEquals(3, counter); |
934 | 1028 |
935 // Variant flags: [alternativeFn2, tryThrows, doCatch, catchReturns, | 1029 // Variant flags: [alternativeFn3, tryThrows, doCatch, catchReturns, |
936 // catchWithLocal] | 1030 // catchWithLocal] |
937 | 1031 |
938 f = function f___2_t___crl______ () { | 1032 f = function f___3__t___crl______ () { |
939 var local = 3; | 1033 var local = 888; |
940 deopt = false; | 1034 deopt = false; |
941 try { | 1035 try { |
942 counter++; | 1036 counter++; |
943 return invertFunctionCall(increaseAndReturn15); | 1037 return 4 + invertFunctionCall(increaseAndReturn15); |
944 counter++; | 1038 counter++; |
945 } catch (ex) { | 1039 } catch (ex) { |
946 counter++; | 1040 counter++; |
947 return 2 + local; | 1041 return 2 + local; |
948 counter++; | 1042 counter++; |
949 } | 1043 } |
950 counter++; | 1044 counter++; |
951 } | 1045 } |
952 resetOptAndAssertResultEquals(5, f); | 1046 resetOptAndAssertResultEquals(890, f); |
953 assertEquals(3, counter); | 1047 assertEquals(3, counter); |
954 | 1048 |
955 // Variant flags: [alternativeFn2, tryThrows, doCatch, catchReturns, | 1049 // Variant flags: [alternativeFn3, tryThrows, doCatch, catchReturns, |
956 // catchWithLocal, deopt] | 1050 // catchWithLocal, deopt] |
957 | 1051 |
958 f = function f___2_t___crl_____d () { | 1052 f = function f___3__t___crl_____d () { |
959 var local = 3; | 1053 var local = 888; |
960 deopt = true; | 1054 deopt = true; |
961 try { | 1055 try { |
962 counter++; | 1056 counter++; |
963 return invertFunctionCall(increaseAndReturn15); | 1057 return 4 + invertFunctionCall(increaseAndReturn15); |
964 counter++; | 1058 counter++; |
965 } catch (ex) { | 1059 } catch (ex) { |
966 counter++; | 1060 counter++; |
967 return 2 + local; | 1061 return 2 + local; |
968 counter++; | 1062 counter++; |
969 } | 1063 } |
970 counter++; | 1064 counter++; |
971 } | 1065 } |
972 resetOptAndAssertResultEquals(5, f); | 1066 resetOptAndAssertResultEquals(890, f); |
973 assertEquals(3, counter); | 1067 assertEquals(3, counter); |
974 | 1068 |
975 // Variant flags: [alternativeFn2, tryThrows, doCatch, catchReturns, | 1069 // Variant flags: [alternativeFn3, tryThrows, doCatch, catchReturns, |
976 // catchWithLocal, endReturnLocal] | 1070 // catchWithLocal, endReturnLocal] |
977 | 1071 |
978 f = function f___2_t___crl____l_ () { | 1072 f = function f___3__t___crl____l_ () { |
979 var local = 3; | 1073 var local = 888; |
980 deopt = false; | 1074 deopt = false; |
981 try { | 1075 try { |
982 counter++; | 1076 counter++; |
983 return invertFunctionCall(increaseAndReturn15); | 1077 return 4 + invertFunctionCall(increaseAndReturn15); |
984 counter++; | 1078 counter++; |
985 } catch (ex) { | 1079 } catch (ex) { |
986 counter++; | 1080 counter++; |
987 return 2 + local; | 1081 return 2 + local; |
988 counter++; | 1082 counter++; |
989 } | 1083 } |
990 counter++; | 1084 counter++; |
991 return 5 + local; | 1085 return 5 + local; |
992 } | 1086 } |
993 resetOptAndAssertResultEquals(5, f); | 1087 resetOptAndAssertResultEquals(890, f); |
994 assertEquals(3, counter); | 1088 assertEquals(3, counter); |
995 | 1089 |
996 // Variant flags: [alternativeFn2, tryThrows, doCatch, catchReturns, | 1090 // Variant flags: [alternativeFn3, tryThrows, doCatch, catchReturns, |
997 // catchWithLocal, endReturnLocal, deopt] | 1091 // catchWithLocal, endReturnLocal, deopt] |
998 | 1092 |
999 f = function f___2_t___crl____ld () { | 1093 f = function f___3__t___crl____ld () { |
1000 var local = 3; | 1094 var local = 888; |
1001 deopt = true; | 1095 deopt = true; |
1002 try { | 1096 try { |
1003 counter++; | 1097 counter++; |
1004 return invertFunctionCall(increaseAndReturn15); | 1098 return 4 + invertFunctionCall(increaseAndReturn15); |
1005 counter++; | 1099 counter++; |
1006 } catch (ex) { | 1100 } catch (ex) { |
1007 counter++; | 1101 counter++; |
1008 return 2 + local; | 1102 return 2 + local; |
1009 counter++; | 1103 counter++; |
1010 } | 1104 } |
1011 counter++; | 1105 counter++; |
1012 return 5 + local; | 1106 return 5 + local; |
1013 } | 1107 } |
1014 resetOptAndAssertResultEquals(5, f); | 1108 resetOptAndAssertResultEquals(890, f); |
1015 assertEquals(3, counter); | 1109 assertEquals(3, counter); |
1016 | 1110 |
1017 // Variant flags: [alternativeFn2, tryThrows, tryResultToLocal, | 1111 // Variant flags: [alternativeFn3, tryThrows, tryResultToLocal, |
1018 // doCatch] | 1112 // doCatch] |
1019 | 1113 |
1020 f = function f___2_t__lc________ () { | 1114 f = function f___3__t__lc________ () { |
1021 var local = 3; | 1115 var local = 888; |
1022 deopt = false; | 1116 deopt = false; |
1023 try { | 1117 try { |
1024 counter++; | 1118 counter++; |
1025 local += invertFunctionCall(increaseAndReturn15); | 1119 local += 4 + invertFunctionCall(increaseAndReturn15); |
1026 counter++; | 1120 counter++; |
1027 } catch (ex) { | 1121 } catch (ex) { |
1028 counter++; | 1122 counter++; |
1029 counter++; | 1123 counter++; |
1030 } | 1124 } |
1031 counter++; | 1125 counter++; |
1032 } | 1126 } |
1033 resetOptAndAssertResultEquals(undefined, f); | 1127 resetOptAndAssertResultEquals(undefined, f); |
1034 assertEquals(5, counter); | 1128 assertEquals(5, counter); |
1035 | 1129 |
1036 // Variant flags: [alternativeFn2, tryThrows, tryResultToLocal, | 1130 // Variant flags: [alternativeFn3, tryThrows, tryResultToLocal, |
1037 // doCatch, deopt] | 1131 // doCatch, deopt] |
1038 | 1132 |
1039 f = function f___2_t__lc_______d () { | 1133 f = function f___3__t__lc_______d () { |
1040 var local = 3; | 1134 var local = 888; |
1041 deopt = true; | 1135 deopt = true; |
1042 try { | 1136 try { |
1043 counter++; | 1137 counter++; |
1044 local += invertFunctionCall(increaseAndReturn15); | 1138 local += 4 + invertFunctionCall(increaseAndReturn15); |
1045 counter++; | 1139 counter++; |
1046 } catch (ex) { | 1140 } catch (ex) { |
1047 counter++; | 1141 counter++; |
1048 counter++; | 1142 counter++; |
1049 } | 1143 } |
1050 counter++; | 1144 counter++; |
1051 } | 1145 } |
1052 resetOptAndAssertResultEquals(undefined, f); | 1146 resetOptAndAssertResultEquals(undefined, f); |
1053 assertEquals(5, counter); | 1147 assertEquals(5, counter); |
1054 | 1148 |
1055 // Variant flags: [alternativeFn2, tryThrows, tryResultToLocal, | 1149 // Variant flags: [alternativeFn3, tryThrows, tryResultToLocal, |
1056 // doCatch, endReturnLocal] | 1150 // doCatch, endReturnLocal] |
1057 | 1151 |
1058 f = function f___2_t__lc______l_ () { | 1152 f = function f___3__t__lc______l_ () { |
1059 var local = 3; | 1153 var local = 888; |
1060 deopt = false; | 1154 deopt = false; |
1061 try { | 1155 try { |
1062 counter++; | 1156 counter++; |
1063 local += invertFunctionCall(increaseAndReturn15); | 1157 local += 4 + invertFunctionCall(increaseAndReturn15); |
1064 counter++; | 1158 counter++; |
1065 } catch (ex) { | 1159 } catch (ex) { |
1066 counter++; | 1160 counter++; |
1067 counter++; | 1161 counter++; |
1068 } | 1162 } |
1069 counter++; | 1163 counter++; |
1070 return 5 + local; | 1164 return 5 + local; |
1071 } | 1165 } |
1072 resetOptAndAssertResultEquals(8, f); | 1166 resetOptAndAssertResultEquals(893, f); |
1073 assertEquals(5, counter); | 1167 assertEquals(5, counter); |
1074 | 1168 |
1075 // Variant flags: [alternativeFn2, tryThrows, tryResultToLocal, | 1169 // Variant flags: [alternativeFn3, tryThrows, tryResultToLocal, |
1076 // doCatch, endReturnLocal, deopt] | 1170 // doCatch, endReturnLocal, deopt] |
1077 | 1171 |
1078 f = function f___2_t__lc______ld () { | 1172 f = function f___3__t__lc______ld () { |
1079 var local = 3; | 1173 var local = 888; |
1080 deopt = true; | 1174 deopt = true; |
1081 try { | 1175 try { |
1082 counter++; | 1176 counter++; |
1083 local += invertFunctionCall(increaseAndReturn15); | 1177 local += 4 + invertFunctionCall(increaseAndReturn15); |
1084 counter++; | 1178 counter++; |
1085 } catch (ex) { | 1179 } catch (ex) { |
1086 counter++; | 1180 counter++; |
1087 counter++; | 1181 counter++; |
1088 } | 1182 } |
1089 counter++; | 1183 counter++; |
1090 return 5 + local; | 1184 return 5 + local; |
1091 } | 1185 } |
1092 resetOptAndAssertResultEquals(8, f); | 1186 resetOptAndAssertResultEquals(893, f); |
1093 assertEquals(5, counter); | 1187 assertEquals(5, counter); |
1094 | 1188 |
1095 // Variant flags: [alternativeFn2, tryThrows, tryResultToLocal, | 1189 // Variant flags: [alternativeFn3, tryThrows, tryResultToLocal, |
1096 // doCatch, catchThrows] | 1190 // doCatch, catchThrows] |
1097 | 1191 |
1098 f = function f___2_t__lc__t_____ () { | 1192 f = function f___3__t__lc__t_____ () { |
1099 var local = 3; | 1193 var local = 888; |
1100 deopt = false; | 1194 deopt = false; |
1101 try { | 1195 try { |
1102 counter++; | 1196 counter++; |
1103 local += invertFunctionCall(increaseAndReturn15); | 1197 local += 4 + invertFunctionCall(increaseAndReturn15); |
1104 counter++; | 1198 counter++; |
1105 } catch (ex) { | 1199 } catch (ex) { |
1106 counter++; | 1200 counter++; |
1107 throw 2 + ex; | 1201 throw 2 + ex; |
1108 counter++; | 1202 counter++; |
1109 } | 1203 } |
1110 counter++; | 1204 counter++; |
1111 } | 1205 } |
1112 resetOptAndAssertThrowsWith(44, f); | 1206 resetOptAndAssertThrowsWith(44, f); |
1113 assertEquals(3, counter); | 1207 assertEquals(3, counter); |
1114 | 1208 |
1115 // Variant flags: [alternativeFn2, tryThrows, tryResultToLocal, | 1209 // Variant flags: [alternativeFn3, tryThrows, tryResultToLocal, |
1116 // doCatch, catchThrows, deopt] | 1210 // doCatch, catchThrows, deopt] |
1117 | 1211 |
1118 f = function f___2_t__lc__t____d () { | 1212 f = function f___3__t__lc__t____d () { |
1119 var local = 3; | 1213 var local = 888; |
1120 deopt = true; | 1214 deopt = true; |
1121 try { | 1215 try { |
1122 counter++; | 1216 counter++; |
1123 local += invertFunctionCall(increaseAndReturn15); | 1217 local += 4 + invertFunctionCall(increaseAndReturn15); |
1124 counter++; | 1218 counter++; |
1125 } catch (ex) { | 1219 } catch (ex) { |
1126 counter++; | 1220 counter++; |
1127 throw 2 + ex; | 1221 throw 2 + ex; |
1128 counter++; | 1222 counter++; |
1129 } | 1223 } |
1130 counter++; | 1224 counter++; |
1131 } | 1225 } |
1132 resetOptAndAssertThrowsWith(44, f); | 1226 resetOptAndAssertThrowsWith(44, f); |
1133 assertEquals(3, counter); | 1227 assertEquals(3, counter); |
1134 | 1228 |
1135 // Variant flags: [alternativeFn2, tryThrows, tryResultToLocal, | 1229 // Variant flags: [alternativeFn3, tryThrows, tryResultToLocal, |
1136 // doCatch, catchThrows, endReturnLocal] | 1230 // doCatch, catchThrows, endReturnLocal] |
1137 | 1231 |
1138 f = function f___2_t__lc__t___l_ () { | 1232 f = function f___3__t__lc__t___l_ () { |
1139 var local = 3; | 1233 var local = 888; |
1140 deopt = false; | 1234 deopt = false; |
1141 try { | 1235 try { |
1142 counter++; | 1236 counter++; |
1143 local += invertFunctionCall(increaseAndReturn15); | 1237 local += 4 + invertFunctionCall(increaseAndReturn15); |
1144 counter++; | 1238 counter++; |
1145 } catch (ex) { | 1239 } catch (ex) { |
1146 counter++; | 1240 counter++; |
1147 throw 2 + ex; | 1241 throw 2 + ex; |
1148 counter++; | 1242 counter++; |
1149 } | 1243 } |
1150 counter++; | 1244 counter++; |
1151 return 5 + local; | 1245 return 5 + local; |
1152 } | 1246 } |
1153 resetOptAndAssertThrowsWith(44, f); | 1247 resetOptAndAssertThrowsWith(44, f); |
1154 assertEquals(3, counter); | 1248 assertEquals(3, counter); |
1155 | 1249 |
1156 // Variant flags: [alternativeFn2, tryThrows, tryResultToLocal, | 1250 // Variant flags: [alternativeFn3, tryThrows, tryResultToLocal, |
1157 // doCatch, catchThrows, endReturnLocal, deopt] | 1251 // doCatch, catchThrows, endReturnLocal, deopt] |
1158 | 1252 |
1159 f = function f___2_t__lc__t___ld () { | 1253 f = function f___3__t__lc__t___ld () { |
1160 var local = 3; | 1254 var local = 888; |
1161 deopt = true; | 1255 deopt = true; |
1162 try { | 1256 try { |
1163 counter++; | 1257 counter++; |
1164 local += invertFunctionCall(increaseAndReturn15); | 1258 local += 4 + invertFunctionCall(increaseAndReturn15); |
1165 counter++; | 1259 counter++; |
1166 } catch (ex) { | 1260 } catch (ex) { |
1167 counter++; | 1261 counter++; |
1168 throw 2 + ex; | 1262 throw 2 + ex; |
1169 counter++; | 1263 counter++; |
1170 } | 1264 } |
1171 counter++; | 1265 counter++; |
1172 return 5 + local; | 1266 return 5 + local; |
1173 } | 1267 } |
1174 resetOptAndAssertThrowsWith(44, f); | 1268 resetOptAndAssertThrowsWith(44, f); |
1175 assertEquals(3, counter); | 1269 assertEquals(3, counter); |
1176 | 1270 |
1177 // Variant flags: [alternativeFn2, tryThrows, tryResultToLocal, | 1271 // Variant flags: [alternativeFn3, tryThrows, tryResultToLocal, |
1178 // doCatch, catchWithLocal] | 1272 // doCatch, catchWithLocal] |
1179 | 1273 |
1180 f = function f___2_t__lc_l______ () { | 1274 f = function f___3__t__lc_l______ () { |
1181 var local = 3; | 1275 var local = 888; |
1182 deopt = false; | 1276 deopt = false; |
1183 try { | 1277 try { |
1184 counter++; | 1278 counter++; |
1185 local += invertFunctionCall(increaseAndReturn15); | 1279 local += 4 + invertFunctionCall(increaseAndReturn15); |
1186 counter++; | 1280 counter++; |
1187 } catch (ex) { | 1281 } catch (ex) { |
1188 counter++; | 1282 counter++; |
1189 local += ex; | 1283 local += ex; |
1190 counter++; | 1284 counter++; |
1191 } | 1285 } |
1192 counter++; | 1286 counter++; |
1193 } | 1287 } |
1194 resetOptAndAssertResultEquals(undefined, f); | 1288 resetOptAndAssertResultEquals(undefined, f); |
1195 assertEquals(5, counter); | 1289 assertEquals(5, counter); |
1196 | 1290 |
1197 // Variant flags: [alternativeFn2, tryThrows, tryResultToLocal, | 1291 // Variant flags: [alternativeFn3, tryThrows, tryResultToLocal, |
1198 // doCatch, catchWithLocal, deopt] | 1292 // doCatch, catchWithLocal, deopt] |
1199 | 1293 |
1200 f = function f___2_t__lc_l_____d () { | 1294 f = function f___3__t__lc_l_____d () { |
1201 var local = 3; | 1295 var local = 888; |
1202 deopt = true; | 1296 deopt = true; |
1203 try { | 1297 try { |
1204 counter++; | 1298 counter++; |
1205 local += invertFunctionCall(increaseAndReturn15); | 1299 local += 4 + invertFunctionCall(increaseAndReturn15); |
1206 counter++; | 1300 counter++; |
1207 } catch (ex) { | 1301 } catch (ex) { |
1208 counter++; | 1302 counter++; |
1209 local += ex; | 1303 local += ex; |
1210 counter++; | 1304 counter++; |
1211 } | 1305 } |
1212 counter++; | 1306 counter++; |
1213 } | 1307 } |
1214 resetOptAndAssertResultEquals(undefined, f); | 1308 resetOptAndAssertResultEquals(undefined, f); |
1215 assertEquals(5, counter); | 1309 assertEquals(5, counter); |
1216 | 1310 |
1217 // Variant flags: [alternativeFn2, tryThrows, tryResultToLocal, | 1311 // Variant flags: [alternativeFn3, tryThrows, tryResultToLocal, |
1218 // doCatch, catchWithLocal, endReturnLocal] | 1312 // doCatch, catchWithLocal, endReturnLocal] |
1219 | 1313 |
1220 f = function f___2_t__lc_l____l_ () { | 1314 f = function f___3__t__lc_l____l_ () { |
1221 var local = 3; | 1315 var local = 888; |
1222 deopt = false; | 1316 deopt = false; |
1223 try { | 1317 try { |
1224 counter++; | 1318 counter++; |
1225 local += invertFunctionCall(increaseAndReturn15); | 1319 local += 4 + invertFunctionCall(increaseAndReturn15); |
1226 counter++; | 1320 counter++; |
1227 } catch (ex) { | 1321 } catch (ex) { |
1228 counter++; | 1322 counter++; |
1229 local += ex; | 1323 local += ex; |
1230 counter++; | 1324 counter++; |
1231 } | 1325 } |
1232 counter++; | 1326 counter++; |
1233 return 5 + local; | 1327 return 5 + local; |
1234 } | 1328 } |
1235 resetOptAndAssertResultEquals(50, f); | 1329 resetOptAndAssertResultEquals(935, f); |
1236 assertEquals(5, counter); | 1330 assertEquals(5, counter); |
1237 | 1331 |
1238 // Variant flags: [alternativeFn2, tryThrows, tryResultToLocal, | 1332 // Variant flags: [alternativeFn3, tryThrows, tryResultToLocal, |
1239 // doCatch, catchWithLocal, endReturnLocal, deopt] | 1333 // doCatch, catchWithLocal, endReturnLocal, deopt] |
1240 | 1334 |
1241 f = function f___2_t__lc_l____ld () { | 1335 f = function f___3__t__lc_l____ld () { |
1242 var local = 3; | 1336 var local = 888; |
1243 deopt = true; | 1337 deopt = true; |
1244 try { | 1338 try { |
1245 counter++; | 1339 counter++; |
1246 local += invertFunctionCall(increaseAndReturn15); | 1340 local += 4 + invertFunctionCall(increaseAndReturn15); |
1247 counter++; | 1341 counter++; |
1248 } catch (ex) { | 1342 } catch (ex) { |
1249 counter++; | 1343 counter++; |
1250 local += ex; | 1344 local += ex; |
1251 counter++; | 1345 counter++; |
1252 } | 1346 } |
1253 counter++; | 1347 counter++; |
1254 return 5 + local; | 1348 return 5 + local; |
1255 } | 1349 } |
1256 resetOptAndAssertResultEquals(50, f); | 1350 resetOptAndAssertResultEquals(935, f); |
1257 assertEquals(5, counter); | 1351 assertEquals(5, counter); |
1258 | 1352 |
1259 // Variant flags: [alternativeFn2, tryThrows, tryResultToLocal, | 1353 // Variant flags: [alternativeFn3, tryThrows, tryResultToLocal, |
1260 // doCatch, catchWithLocal, catchThrows] | 1354 // doCatch, catchWithLocal, catchThrows] |
1261 | 1355 |
1262 f = function f___2_t__lc_lt_____ () { | 1356 f = function f___3__t__lc_lt_____ () { |
1263 var local = 3; | 1357 var local = 888; |
1264 deopt = false; | 1358 deopt = false; |
1265 try { | 1359 try { |
1266 counter++; | 1360 counter++; |
1267 local += invertFunctionCall(increaseAndReturn15); | 1361 local += 4 + invertFunctionCall(increaseAndReturn15); |
1268 counter++; | 1362 counter++; |
1269 } catch (ex) { | 1363 } catch (ex) { |
1270 counter++; | 1364 counter++; |
1271 throw 2 + ex; | 1365 throw 2 + ex; |
1272 counter++; | 1366 counter++; |
1273 } | 1367 } |
1274 counter++; | 1368 counter++; |
1275 } | 1369 } |
1276 resetOptAndAssertThrowsWith(44, f); | 1370 resetOptAndAssertThrowsWith(44, f); |
1277 assertEquals(3, counter); | 1371 assertEquals(3, counter); |
1278 | 1372 |
1279 // Variant flags: [alternativeFn2, tryThrows, tryResultToLocal, | 1373 // Variant flags: [alternativeFn3, tryThrows, tryResultToLocal, |
1280 // doCatch, catchWithLocal, catchThrows, deopt] | 1374 // doCatch, catchWithLocal, catchThrows, deopt] |
1281 | 1375 |
1282 f = function f___2_t__lc_lt____d () { | 1376 f = function f___3__t__lc_lt____d () { |
1283 var local = 3; | 1377 var local = 888; |
1284 deopt = true; | 1378 deopt = true; |
1285 try { | 1379 try { |
1286 counter++; | 1380 counter++; |
1287 local += invertFunctionCall(increaseAndReturn15); | 1381 local += 4 + invertFunctionCall(increaseAndReturn15); |
1288 counter++; | 1382 counter++; |
1289 } catch (ex) { | 1383 } catch (ex) { |
1290 counter++; | 1384 counter++; |
1291 throw 2 + ex; | 1385 throw 2 + ex; |
1292 counter++; | 1386 counter++; |
1293 } | 1387 } |
1294 counter++; | 1388 counter++; |
1295 } | 1389 } |
1296 resetOptAndAssertThrowsWith(44, f); | 1390 resetOptAndAssertThrowsWith(44, f); |
1297 assertEquals(3, counter); | 1391 assertEquals(3, counter); |
1298 | 1392 |
1299 // Variant flags: [alternativeFn2, tryThrows, tryResultToLocal, | 1393 // Variant flags: [alternativeFn3, tryThrows, tryResultToLocal, |
1300 // doCatch, catchWithLocal, catchThrows, endReturnLocal] | 1394 // doCatch, catchWithLocal, catchThrows, endReturnLocal] |
1301 | 1395 |
1302 f = function f___2_t__lc_lt___l_ () { | 1396 f = function f___3__t__lc_lt___l_ () { |
1303 var local = 3; | 1397 var local = 888; |
1304 deopt = false; | 1398 deopt = false; |
1305 try { | 1399 try { |
1306 counter++; | 1400 counter++; |
1307 local += invertFunctionCall(increaseAndReturn15); | 1401 local += 4 + invertFunctionCall(increaseAndReturn15); |
1308 counter++; | 1402 counter++; |
1309 } catch (ex) { | 1403 } catch (ex) { |
1310 counter++; | 1404 counter++; |
1311 throw 2 + ex; | 1405 throw 2 + ex; |
1312 counter++; | 1406 counter++; |
1313 } | 1407 } |
1314 counter++; | 1408 counter++; |
1315 return 5 + local; | 1409 return 5 + local; |
1316 } | 1410 } |
1317 resetOptAndAssertThrowsWith(44, f); | 1411 resetOptAndAssertThrowsWith(44, f); |
1318 assertEquals(3, counter); | 1412 assertEquals(3, counter); |
1319 | 1413 |
1320 // Variant flags: [alternativeFn2, tryThrows, tryResultToLocal, | 1414 // Variant flags: [alternativeFn3, tryThrows, tryResultToLocal, |
1321 // doCatch, catchWithLocal, catchThrows, endReturnLocal, deopt] | 1415 // doCatch, catchWithLocal, catchThrows, endReturnLocal, deopt] |
1322 | 1416 |
1323 f = function f___2_t__lc_lt___ld () { | 1417 f = function f___3__t__lc_lt___ld () { |
1324 var local = 3; | 1418 var local = 888; |
1325 deopt = true; | 1419 deopt = true; |
1326 try { | 1420 try { |
1327 counter++; | 1421 counter++; |
1328 local += invertFunctionCall(increaseAndReturn15); | 1422 local += 4 + invertFunctionCall(increaseAndReturn15); |
1329 counter++; | 1423 counter++; |
1330 } catch (ex) { | 1424 } catch (ex) { |
1331 counter++; | 1425 counter++; |
1332 throw 2 + ex; | 1426 throw 2 + ex; |
1333 counter++; | 1427 counter++; |
1334 } | 1428 } |
1335 counter++; | 1429 counter++; |
1336 return 5 + local; | 1430 return 5 + local; |
1337 } | 1431 } |
1338 resetOptAndAssertThrowsWith(44, f); | 1432 resetOptAndAssertThrowsWith(44, f); |
1339 assertEquals(3, counter); | 1433 assertEquals(3, counter); |
1340 | 1434 |
1341 // Variant flags: [alternativeFn2, tryThrows, tryResultToLocal, | 1435 // Variant flags: [alternativeFn3, tryThrows, tryResultToLocal, |
1342 // doCatch, catchReturns] | 1436 // doCatch, catchReturns] |
1343 | 1437 |
1344 f = function f___2_t__lcr_______ () { | 1438 f = function f___3__t__lcr_______ () { |
1345 var local = 3; | 1439 var local = 888; |
1346 deopt = false; | 1440 deopt = false; |
1347 try { | 1441 try { |
1348 counter++; | 1442 counter++; |
1349 local += invertFunctionCall(increaseAndReturn15); | 1443 local += 4 + invertFunctionCall(increaseAndReturn15); |
1350 counter++; | 1444 counter++; |
1351 } catch (ex) { | 1445 } catch (ex) { |
1352 counter++; | 1446 counter++; |
1353 return 2 + ex; | 1447 return 2 + ex; |
1354 counter++; | 1448 counter++; |
1355 } | 1449 } |
1356 counter++; | 1450 counter++; |
1357 } | 1451 } |
1358 resetOptAndAssertResultEquals(44, f); | 1452 resetOptAndAssertResultEquals(44, f); |
1359 assertEquals(3, counter); | 1453 assertEquals(3, counter); |
1360 | 1454 |
1361 // Variant flags: [alternativeFn2, tryThrows, tryResultToLocal, | 1455 // Variant flags: [alternativeFn3, tryThrows, tryResultToLocal, |
1362 // doCatch, catchReturns, deopt] | 1456 // doCatch, catchReturns, deopt] |
1363 | 1457 |
1364 f = function f___2_t__lcr______d () { | 1458 f = function f___3__t__lcr______d () { |
1365 var local = 3; | 1459 var local = 888; |
1366 deopt = true; | 1460 deopt = true; |
1367 try { | 1461 try { |
1368 counter++; | 1462 counter++; |
1369 local += invertFunctionCall(increaseAndReturn15); | 1463 local += 4 + invertFunctionCall(increaseAndReturn15); |
1370 counter++; | 1464 counter++; |
1371 } catch (ex) { | 1465 } catch (ex) { |
1372 counter++; | 1466 counter++; |
1373 return 2 + ex; | 1467 return 2 + ex; |
1374 counter++; | 1468 counter++; |
1375 } | 1469 } |
1376 counter++; | 1470 counter++; |
1377 } | 1471 } |
1378 resetOptAndAssertResultEquals(44, f); | 1472 resetOptAndAssertResultEquals(44, f); |
1379 assertEquals(3, counter); | 1473 assertEquals(3, counter); |
1380 | 1474 |
1381 // Variant flags: [alternativeFn2, tryThrows, tryResultToLocal, | 1475 // Variant flags: [alternativeFn3, tryThrows, tryResultToLocal, |
1382 // doCatch, catchReturns, endReturnLocal] | 1476 // doCatch, catchReturns, endReturnLocal] |
1383 | 1477 |
1384 f = function f___2_t__lcr_____l_ () { | 1478 f = function f___3__t__lcr_____l_ () { |
1385 var local = 3; | 1479 var local = 888; |
1386 deopt = false; | 1480 deopt = false; |
1387 try { | 1481 try { |
1388 counter++; | 1482 counter++; |
1389 local += invertFunctionCall(increaseAndReturn15); | 1483 local += 4 + invertFunctionCall(increaseAndReturn15); |
1390 counter++; | 1484 counter++; |
1391 } catch (ex) { | 1485 } catch (ex) { |
1392 counter++; | 1486 counter++; |
1393 return 2 + ex; | 1487 return 2 + ex; |
1394 counter++; | 1488 counter++; |
1395 } | 1489 } |
1396 counter++; | 1490 counter++; |
1397 return 5 + local; | 1491 return 5 + local; |
1398 } | 1492 } |
1399 resetOptAndAssertResultEquals(44, f); | 1493 resetOptAndAssertResultEquals(44, f); |
1400 assertEquals(3, counter); | 1494 assertEquals(3, counter); |
1401 | 1495 |
1402 // Variant flags: [alternativeFn2, tryThrows, tryResultToLocal, | 1496 // Variant flags: [alternativeFn3, tryThrows, tryResultToLocal, |
1403 // doCatch, catchReturns, endReturnLocal, deopt] | 1497 // doCatch, catchReturns, endReturnLocal, deopt] |
1404 | 1498 |
1405 f = function f___2_t__lcr_____ld () { | 1499 f = function f___3__t__lcr_____ld () { |
1406 var local = 3; | 1500 var local = 888; |
1407 deopt = true; | 1501 deopt = true; |
1408 try { | 1502 try { |
1409 counter++; | 1503 counter++; |
1410 local += invertFunctionCall(increaseAndReturn15); | 1504 local += 4 + invertFunctionCall(increaseAndReturn15); |
1411 counter++; | 1505 counter++; |
1412 } catch (ex) { | 1506 } catch (ex) { |
1413 counter++; | 1507 counter++; |
1414 return 2 + ex; | 1508 return 2 + ex; |
1415 counter++; | 1509 counter++; |
1416 } | 1510 } |
1417 counter++; | 1511 counter++; |
1418 return 5 + local; | 1512 return 5 + local; |
1419 } | 1513 } |
1420 resetOptAndAssertResultEquals(44, f); | 1514 resetOptAndAssertResultEquals(44, f); |
1421 assertEquals(3, counter); | 1515 assertEquals(3, counter); |
1422 | 1516 |
1423 // Variant flags: [alternativeFn2, tryThrows, tryResultToLocal, | 1517 // Variant flags: [alternativeFn3, tryThrows, tryResultToLocal, |
1424 // doCatch, catchReturns, catchWithLocal] | 1518 // doCatch, catchReturns, catchWithLocal] |
1425 | 1519 |
1426 f = function f___2_t__lcrl______ () { | 1520 f = function f___3__t__lcrl______ () { |
1427 var local = 3; | 1521 var local = 888; |
1428 deopt = false; | 1522 deopt = false; |
1429 try { | 1523 try { |
1430 counter++; | 1524 counter++; |
1431 local += invertFunctionCall(increaseAndReturn15); | 1525 local += 4 + invertFunctionCall(increaseAndReturn15); |
1432 counter++; | 1526 counter++; |
1433 } catch (ex) { | 1527 } catch (ex) { |
1434 counter++; | 1528 counter++; |
1435 return 2 + local; | 1529 return 2 + local; |
1436 counter++; | 1530 counter++; |
1437 } | 1531 } |
1438 counter++; | 1532 counter++; |
1439 } | 1533 } |
1440 resetOptAndAssertResultEquals(5, f); | 1534 resetOptAndAssertResultEquals(890, f); |
1441 assertEquals(3, counter); | 1535 assertEquals(3, counter); |
1442 | 1536 |
1443 // Variant flags: [alternativeFn2, tryThrows, tryResultToLocal, | 1537 // Variant flags: [alternativeFn3, tryThrows, tryResultToLocal, |
1444 // doCatch, catchReturns, catchWithLocal, deopt] | 1538 // doCatch, catchReturns, catchWithLocal, deopt] |
1445 | 1539 |
1446 f = function f___2_t__lcrl_____d () { | 1540 f = function f___3__t__lcrl_____d () { |
1447 var local = 3; | 1541 var local = 888; |
1448 deopt = true; | 1542 deopt = true; |
1449 try { | 1543 try { |
1450 counter++; | 1544 counter++; |
1451 local += invertFunctionCall(increaseAndReturn15); | 1545 local += 4 + invertFunctionCall(increaseAndReturn15); |
1452 counter++; | 1546 counter++; |
1453 } catch (ex) { | 1547 } catch (ex) { |
1454 counter++; | 1548 counter++; |
1455 return 2 + local; | 1549 return 2 + local; |
1456 counter++; | 1550 counter++; |
1457 } | 1551 } |
1458 counter++; | 1552 counter++; |
1459 } | 1553 } |
1460 resetOptAndAssertResultEquals(5, f); | 1554 resetOptAndAssertResultEquals(890, f); |
1461 assertEquals(3, counter); | 1555 assertEquals(3, counter); |
1462 | 1556 |
1463 // Variant flags: [alternativeFn2, tryThrows, tryResultToLocal, | 1557 // Variant flags: [alternativeFn3, tryThrows, tryResultToLocal, |
1464 // doCatch, catchReturns, catchWithLocal, endReturnLocal] | 1558 // doCatch, catchReturns, catchWithLocal, endReturnLocal] |
1465 | 1559 |
1466 f = function f___2_t__lcrl____l_ () { | 1560 f = function f___3__t__lcrl____l_ () { |
1467 var local = 3; | 1561 var local = 888; |
1468 deopt = false; | 1562 deopt = false; |
1469 try { | 1563 try { |
1470 counter++; | 1564 counter++; |
1471 local += invertFunctionCall(increaseAndReturn15); | 1565 local += 4 + invertFunctionCall(increaseAndReturn15); |
1472 counter++; | 1566 counter++; |
1473 } catch (ex) { | 1567 } catch (ex) { |
1474 counter++; | 1568 counter++; |
1475 return 2 + local; | 1569 return 2 + local; |
1476 counter++; | 1570 counter++; |
1477 } | 1571 } |
1478 counter++; | 1572 counter++; |
1479 return 5 + local; | 1573 return 5 + local; |
1480 } | 1574 } |
1481 resetOptAndAssertResultEquals(5, f); | 1575 resetOptAndAssertResultEquals(890, f); |
1482 assertEquals(3, counter); | 1576 assertEquals(3, counter); |
1483 | 1577 |
1484 // Variant flags: [alternativeFn2, tryThrows, tryResultToLocal, | 1578 // Variant flags: [alternativeFn3, tryThrows, tryResultToLocal, |
1485 // doCatch, catchReturns, catchWithLocal, endReturnLocal, deopt] | 1579 // doCatch, catchReturns, catchWithLocal, endReturnLocal, deopt] |
1486 | 1580 |
1487 f = function f___2_t__lcrl____ld () { | 1581 f = function f___3__t__lcrl____ld () { |
1488 var local = 3; | 1582 var local = 888; |
1489 deopt = true; | 1583 deopt = true; |
1490 try { | 1584 try { |
1491 counter++; | 1585 counter++; |
1492 local += invertFunctionCall(increaseAndReturn15); | 1586 local += 4 + invertFunctionCall(increaseAndReturn15); |
1493 counter++; | 1587 counter++; |
1494 } catch (ex) { | 1588 } catch (ex) { |
1495 counter++; | 1589 counter++; |
1496 return 2 + local; | 1590 return 2 + local; |
1497 counter++; | 1591 counter++; |
1498 } | 1592 } |
1499 counter++; | 1593 counter++; |
1500 return 5 + local; | 1594 return 5 + local; |
1501 } | 1595 } |
1502 resetOptAndAssertResultEquals(5, f); | 1596 resetOptAndAssertResultEquals(890, f); |
1503 assertEquals(3, counter); | 1597 assertEquals(3, counter); |
1504 | 1598 |
1505 // Variant flags: [alternativeFn3, tryReturns, doCatch] | 1599 // Variant flags: [alternativeFn4, tryReturns, doCatch] |
1506 | 1600 |
1507 f = function f__3___r__c________ () { | 1601 f = function f__4____r__c________ () { |
1508 var local = 3; | 1602 var local = 888; |
1509 deopt = false; | 1603 deopt = false; |
1510 try { | 1604 try { |
1511 counter++; | 1605 counter++; |
1512 return (new increaseAndStore15Constructor()).x; | 1606 return 4 + (new increaseAndStore15Constructor()).x; |
1513 counter++; | 1607 counter++; |
1514 } catch (ex) { | 1608 } catch (ex) { |
1515 counter++; | 1609 counter++; |
1516 counter++; | 1610 counter++; |
1517 } | 1611 } |
1518 counter++; | 1612 counter++; |
1519 } | 1613 } |
1520 resetOptAndAssertResultEquals(15, f); | 1614 resetOptAndAssertResultEquals(19, f); |
1521 assertEquals(2, counter); | 1615 assertEquals(2, counter); |
1522 | 1616 |
1523 // Variant flags: [alternativeFn3, tryReturns, doCatch, deopt] | 1617 // Variant flags: [alternativeFn4, tryReturns, doCatch, deopt] |
1524 | 1618 |
1525 f = function f__3___r__c_______d () { | 1619 f = function f__4____r__c_______d () { |
1526 var local = 3; | 1620 var local = 888; |
1527 deopt = true; | 1621 deopt = true; |
1528 try { | 1622 try { |
1529 counter++; | 1623 counter++; |
1530 return (new increaseAndStore15Constructor()).x; | 1624 return 4 + (new increaseAndStore15Constructor()).x; |
1531 counter++; | 1625 counter++; |
1532 } catch (ex) { | 1626 } catch (ex) { |
1533 counter++; | 1627 counter++; |
1534 counter++; | 1628 counter++; |
1535 } | 1629 } |
1536 counter++; | 1630 counter++; |
1537 } | 1631 } |
1538 resetOptAndAssertResultEquals(15, f); | 1632 resetOptAndAssertResultEquals(19, f); |
1539 assertEquals(2, counter); | 1633 assertEquals(2, counter); |
1540 | 1634 |
1541 // Variant flags: [alternativeFn3, tryReturns, doCatch, catchThrows] | 1635 // Variant flags: [alternativeFn4, tryReturns, doCatch, catchThrows] |
1542 | 1636 |
1543 f = function f__3___r__c__t_____ () { | 1637 f = function f__4____r__c__t_____ () { |
1544 var local = 3; | 1638 var local = 888; |
1545 deopt = false; | 1639 deopt = false; |
1546 try { | 1640 try { |
1547 counter++; | 1641 counter++; |
1548 return (new increaseAndStore15Constructor()).x; | 1642 return 4 + (new increaseAndStore15Constructor()).x; |
1549 counter++; | 1643 counter++; |
1550 } catch (ex) { | 1644 } catch (ex) { |
1551 counter++; | 1645 counter++; |
1552 throw 2 + ex; | 1646 throw 2 + ex; |
1553 counter++; | 1647 counter++; |
1554 } | 1648 } |
1555 counter++; | 1649 counter++; |
1556 } | 1650 } |
1557 resetOptAndAssertResultEquals(15, f); | 1651 resetOptAndAssertResultEquals(19, f); |
1558 assertEquals(2, counter); | 1652 assertEquals(2, counter); |
1559 | 1653 |
1560 // Variant flags: [alternativeFn3, tryReturns, doCatch, catchThrows, | 1654 // Variant flags: [alternativeFn4, tryReturns, doCatch, catchThrows, |
1561 // deopt] | 1655 // deopt] |
1562 | 1656 |
1563 f = function f__3___r__c__t____d () { | 1657 f = function f__4____r__c__t____d () { |
1564 var local = 3; | 1658 var local = 888; |
1565 deopt = true; | 1659 deopt = true; |
1566 try { | 1660 try { |
1567 counter++; | 1661 counter++; |
1568 return (new increaseAndStore15Constructor()).x; | 1662 return 4 + (new increaseAndStore15Constructor()).x; |
1569 counter++; | 1663 counter++; |
1570 } catch (ex) { | 1664 } catch (ex) { |
1571 counter++; | 1665 counter++; |
1572 throw 2 + ex; | 1666 throw 2 + ex; |
1573 counter++; | 1667 counter++; |
1574 } | 1668 } |
1575 counter++; | 1669 counter++; |
1576 } | 1670 } |
1577 resetOptAndAssertResultEquals(15, f); | 1671 resetOptAndAssertResultEquals(19, f); |
1578 assertEquals(2, counter); | 1672 assertEquals(2, counter); |
1579 | 1673 |
1580 // Variant flags: [alternativeFn3, tryReturns, doCatch, | 1674 // Variant flags: [alternativeFn4, tryReturns, doCatch, |
1581 // catchReturns] | 1675 // catchReturns] |
1582 | 1676 |
1583 f = function f__3___r__cr_______ () { | 1677 f = function f__4____r__cr_______ () { |
1584 var local = 3; | 1678 var local = 888; |
1585 deopt = false; | 1679 deopt = false; |
1586 try { | 1680 try { |
1587 counter++; | 1681 counter++; |
1588 return (new increaseAndStore15Constructor()).x; | 1682 return 4 + (new increaseAndStore15Constructor()).x; |
1589 counter++; | 1683 counter++; |
1590 } catch (ex) { | 1684 } catch (ex) { |
1591 counter++; | 1685 counter++; |
1592 return 2 + ex; | 1686 return 2 + ex; |
1593 counter++; | 1687 counter++; |
1594 } | 1688 } |
1595 counter++; | 1689 counter++; |
1596 } | 1690 } |
1597 resetOptAndAssertResultEquals(15, f); | 1691 resetOptAndAssertResultEquals(19, f); |
1598 assertEquals(2, counter); | 1692 assertEquals(2, counter); |
1599 | 1693 |
1600 // Variant flags: [alternativeFn3, tryReturns, doCatch, | 1694 // Variant flags: [alternativeFn4, tryReturns, doCatch, |
1601 // catchReturns, deopt] | 1695 // catchReturns, deopt] |
1602 | 1696 |
1603 f = function f__3___r__cr______d () { | 1697 f = function f__4____r__cr______d () { |
1604 var local = 3; | 1698 var local = 888; |
1605 deopt = true; | 1699 deopt = true; |
1606 try { | 1700 try { |
1607 counter++; | 1701 counter++; |
1608 return (new increaseAndStore15Constructor()).x; | 1702 return 4 + (new increaseAndStore15Constructor()).x; |
1609 counter++; | 1703 counter++; |
1610 } catch (ex) { | 1704 } catch (ex) { |
1611 counter++; | 1705 counter++; |
1612 return 2 + ex; | 1706 return 2 + ex; |
1613 counter++; | 1707 counter++; |
1614 } | 1708 } |
1615 counter++; | 1709 counter++; |
1616 } | 1710 } |
1617 resetOptAndAssertResultEquals(15, f); | 1711 resetOptAndAssertResultEquals(19, f); |
1618 assertEquals(2, counter); | 1712 assertEquals(2, counter); |
1619 | 1713 |
1620 // Variant flags: [alternativeFn3, tryThrows, doCatch] | 1714 // Variant flags: [alternativeFn4, tryThrows, doCatch] |
1621 | 1715 |
1622 f = function f__3__t___c________ () { | 1716 f = function f__4___t___c________ () { |
1623 var local = 3; | 1717 var local = 888; |
1624 deopt = false; | 1718 deopt = false; |
1625 try { | 1719 try { |
1626 counter++; | 1720 counter++; |
1627 return (new increaseAndThrow42Constructor()).x; | 1721 return 4 + (new increaseAndThrow42Constructor()).x; |
1628 counter++; | 1722 counter++; |
1629 } catch (ex) { | 1723 } catch (ex) { |
1630 counter++; | 1724 counter++; |
1631 counter++; | 1725 counter++; |
1632 } | 1726 } |
1633 counter++; | 1727 counter++; |
1634 } | 1728 } |
1635 resetOptAndAssertResultEquals(undefined, f); | 1729 resetOptAndAssertResultEquals(undefined, f); |
1636 assertEquals(5, counter); | 1730 assertEquals(5, counter); |
1637 | 1731 |
1638 // Variant flags: [alternativeFn3, tryThrows, doCatch, deopt] | 1732 // Variant flags: [alternativeFn4, tryThrows, doCatch, deopt] |
1639 | 1733 |
1640 f = function f__3__t___c_______d () { | 1734 f = function f__4___t___c_______d () { |
1641 var local = 3; | 1735 var local = 888; |
1642 deopt = true; | 1736 deopt = true; |
1643 try { | 1737 try { |
1644 counter++; | 1738 counter++; |
1645 return (new increaseAndThrow42Constructor()).x; | 1739 return 4 + (new increaseAndThrow42Constructor()).x; |
1646 counter++; | 1740 counter++; |
1647 } catch (ex) { | 1741 } catch (ex) { |
1648 counter++; | 1742 counter++; |
1649 counter++; | 1743 counter++; |
1650 } | 1744 } |
1651 counter++; | 1745 counter++; |
1652 } | 1746 } |
1653 resetOptAndAssertResultEquals(undefined, f); | 1747 resetOptAndAssertResultEquals(undefined, f); |
1654 assertEquals(5, counter); | 1748 assertEquals(5, counter); |
1655 | 1749 |
1656 // Variant flags: [alternativeFn3, tryThrows, doCatch, catchThrows] | 1750 // Variant flags: [alternativeFn4, tryThrows, doCatch, catchThrows] |
1657 | 1751 |
1658 f = function f__3__t___c__t_____ () { | 1752 f = function f__4___t___c__t_____ () { |
1659 var local = 3; | 1753 var local = 888; |
1660 deopt = false; | 1754 deopt = false; |
1661 try { | 1755 try { |
1662 counter++; | 1756 counter++; |
1663 return (new increaseAndThrow42Constructor()).x; | 1757 return 4 + (new increaseAndThrow42Constructor()).x; |
1664 counter++; | 1758 counter++; |
1665 } catch (ex) { | 1759 } catch (ex) { |
1666 counter++; | 1760 counter++; |
1667 throw 2 + ex; | 1761 throw 2 + ex; |
1668 counter++; | 1762 counter++; |
1669 } | 1763 } |
1670 counter++; | 1764 counter++; |
1671 } | 1765 } |
1672 resetOptAndAssertThrowsWith(44, f); | 1766 resetOptAndAssertThrowsWith(44, f); |
1673 assertEquals(3, counter); | 1767 assertEquals(3, counter); |
1674 | 1768 |
1675 // Variant flags: [alternativeFn3, tryThrows, doCatch, catchThrows, | 1769 // Variant flags: [alternativeFn4, tryThrows, doCatch, catchThrows, |
1676 // deopt] | 1770 // deopt] |
1677 | 1771 |
1678 f = function f__3__t___c__t____d () { | 1772 f = function f__4___t___c__t____d () { |
1679 var local = 3; | 1773 var local = 888; |
1680 deopt = true; | 1774 deopt = true; |
1681 try { | 1775 try { |
1682 counter++; | 1776 counter++; |
1683 return (new increaseAndThrow42Constructor()).x; | 1777 return 4 + (new increaseAndThrow42Constructor()).x; |
1684 counter++; | 1778 counter++; |
1685 } catch (ex) { | 1779 } catch (ex) { |
1686 counter++; | 1780 counter++; |
1687 throw 2 + ex; | 1781 throw 2 + ex; |
1688 counter++; | 1782 counter++; |
1689 } | 1783 } |
1690 counter++; | 1784 counter++; |
1691 } | 1785 } |
1692 resetOptAndAssertThrowsWith(44, f); | 1786 resetOptAndAssertThrowsWith(44, f); |
1693 assertEquals(3, counter); | 1787 assertEquals(3, counter); |
1694 | 1788 |
1695 // Variant flags: [alternativeFn3, tryThrows, doCatch, catchReturns] | 1789 // Variant flags: [alternativeFn4, tryThrows, doCatch, catchReturns] |
1696 | 1790 |
1697 f = function f__3__t___cr_______ () { | 1791 f = function f__4___t___cr_______ () { |
1698 var local = 3; | 1792 var local = 888; |
1699 deopt = false; | 1793 deopt = false; |
1700 try { | 1794 try { |
1701 counter++; | 1795 counter++; |
1702 return (new increaseAndThrow42Constructor()).x; | 1796 return 4 + (new increaseAndThrow42Constructor()).x; |
1703 counter++; | 1797 counter++; |
1704 } catch (ex) { | 1798 } catch (ex) { |
1705 counter++; | 1799 counter++; |
1706 return 2 + ex; | 1800 return 2 + ex; |
1707 counter++; | 1801 counter++; |
1708 } | 1802 } |
1709 counter++; | 1803 counter++; |
1710 } | 1804 } |
1711 resetOptAndAssertResultEquals(44, f); | 1805 resetOptAndAssertResultEquals(44, f); |
1712 assertEquals(3, counter); | 1806 assertEquals(3, counter); |
1713 | 1807 |
1714 // Variant flags: [alternativeFn3, tryThrows, doCatch, catchReturns, | 1808 // Variant flags: [alternativeFn4, tryThrows, doCatch, catchReturns, |
1715 // deopt] | 1809 // deopt] |
1716 | 1810 |
1717 f = function f__3__t___cr______d () { | 1811 f = function f__4___t___cr______d () { |
1718 var local = 3; | 1812 var local = 888; |
1719 deopt = true; | 1813 deopt = true; |
1720 try { | 1814 try { |
1721 counter++; | 1815 counter++; |
1722 return (new increaseAndThrow42Constructor()).x; | 1816 return 4 + (new increaseAndThrow42Constructor()).x; |
1723 counter++; | 1817 counter++; |
1724 } catch (ex) { | 1818 } catch (ex) { |
1725 counter++; | 1819 counter++; |
1726 return 2 + ex; | 1820 return 2 + ex; |
1727 counter++; | 1821 counter++; |
1728 } | 1822 } |
1729 counter++; | 1823 counter++; |
1730 } | 1824 } |
1731 resetOptAndAssertResultEquals(44, f); | 1825 resetOptAndAssertResultEquals(44, f); |
1732 assertEquals(3, counter); | 1826 assertEquals(3, counter); |
1733 | 1827 |
1734 // Variant flags: [alternativeFn4, tryReturns, doCatch] | 1828 // Variant flags: [alternativeFn5, tryReturns, doCatch] |
1735 | 1829 |
1736 f = function f_4____r__c________ () { | 1830 f = function f_5_____r__c________ () { |
1737 var local = 3; | 1831 var local = 888; |
1738 deopt = false; | 1832 deopt = false; |
1739 try { | 1833 try { |
1740 counter++; | 1834 counter++; |
1741 return magic.prop /* returns 15 */; | 1835 return 4 + magic.prop /* returns 15 */; |
1742 counter++; | 1836 counter++; |
1743 } catch (ex) { | 1837 } catch (ex) { |
1744 counter++; | 1838 counter++; |
1745 counter++; | 1839 counter++; |
1746 } | 1840 } |
1747 counter++; | 1841 counter++; |
1748 } | 1842 } |
1749 resetOptAndAssertResultEquals(15, f); | 1843 resetOptAndAssertResultEquals(19, f); |
1750 assertEquals(2, counter); | 1844 assertEquals(2, counter); |
1751 | 1845 |
1752 // Variant flags: [alternativeFn4, tryReturns, doCatch, deopt] | 1846 // Variant flags: [alternativeFn5, tryReturns, doCatch, deopt] |
1753 | 1847 |
1754 f = function f_4____r__c_______d () { | 1848 f = function f_5_____r__c_______d () { |
1755 var local = 3; | 1849 var local = 888; |
1756 deopt = true; | 1850 deopt = true; |
1757 try { | 1851 try { |
1758 counter++; | 1852 counter++; |
1759 return magic.prop /* returns 15 */; | 1853 return 4 + magic.prop /* returns 15 */; |
1760 counter++; | 1854 counter++; |
1761 } catch (ex) { | 1855 } catch (ex) { |
1762 counter++; | 1856 counter++; |
1763 counter++; | 1857 counter++; |
1764 } | 1858 } |
1765 counter++; | 1859 counter++; |
1766 } | 1860 } |
1767 resetOptAndAssertResultEquals(15, f); | 1861 resetOptAndAssertResultEquals(19, f); |
1768 assertEquals(2, counter); | 1862 assertEquals(2, counter); |
1769 | 1863 |
1770 // Variant flags: [alternativeFn4, tryReturns, doCatch, catchThrows] | 1864 // Variant flags: [alternativeFn5, tryReturns, doCatch, catchThrows] |
1771 | 1865 |
1772 f = function f_4____r__c__t_____ () { | 1866 f = function f_5_____r__c__t_____ () { |
1773 var local = 3; | 1867 var local = 888; |
1774 deopt = false; | 1868 deopt = false; |
1775 try { | 1869 try { |
1776 counter++; | 1870 counter++; |
1777 return magic.prop /* returns 15 */; | 1871 return 4 + magic.prop /* returns 15 */; |
1778 counter++; | 1872 counter++; |
1779 } catch (ex) { | 1873 } catch (ex) { |
1780 counter++; | 1874 counter++; |
1781 throw 2 + ex; | 1875 throw 2 + ex; |
1782 counter++; | 1876 counter++; |
1783 } | 1877 } |
1784 counter++; | 1878 counter++; |
1785 } | 1879 } |
1786 resetOptAndAssertResultEquals(15, f); | 1880 resetOptAndAssertResultEquals(19, f); |
1787 assertEquals(2, counter); | 1881 assertEquals(2, counter); |
1788 | 1882 |
1789 // Variant flags: [alternativeFn4, tryReturns, doCatch, catchThrows, | 1883 // Variant flags: [alternativeFn5, tryReturns, doCatch, catchThrows, |
1790 // deopt] | 1884 // deopt] |
1791 | 1885 |
1792 f = function f_4____r__c__t____d () { | 1886 f = function f_5_____r__c__t____d () { |
1793 var local = 3; | 1887 var local = 888; |
1794 deopt = true; | 1888 deopt = true; |
1795 try { | 1889 try { |
1796 counter++; | 1890 counter++; |
1797 return magic.prop /* returns 15 */; | 1891 return 4 + magic.prop /* returns 15 */; |
1798 counter++; | 1892 counter++; |
1799 } catch (ex) { | 1893 } catch (ex) { |
1800 counter++; | 1894 counter++; |
1801 throw 2 + ex; | 1895 throw 2 + ex; |
1802 counter++; | 1896 counter++; |
1803 } | 1897 } |
1804 counter++; | 1898 counter++; |
1805 } | 1899 } |
1806 resetOptAndAssertResultEquals(15, f); | 1900 resetOptAndAssertResultEquals(19, f); |
1807 assertEquals(2, counter); | 1901 assertEquals(2, counter); |
1808 | 1902 |
1809 // Variant flags: [alternativeFn4, tryReturns, doCatch, | 1903 // Variant flags: [alternativeFn5, tryReturns, doCatch, |
1810 // catchReturns] | 1904 // catchReturns] |
1811 | 1905 |
1812 f = function f_4____r__cr_______ () { | 1906 f = function f_5_____r__cr_______ () { |
1813 var local = 3; | 1907 var local = 888; |
1814 deopt = false; | 1908 deopt = false; |
1815 try { | 1909 try { |
1816 counter++; | 1910 counter++; |
1817 return magic.prop /* returns 15 */; | 1911 return 4 + magic.prop /* returns 15 */; |
1818 counter++; | 1912 counter++; |
1819 } catch (ex) { | 1913 } catch (ex) { |
1820 counter++; | 1914 counter++; |
1821 return 2 + ex; | 1915 return 2 + ex; |
1822 counter++; | 1916 counter++; |
1823 } | 1917 } |
1824 counter++; | 1918 counter++; |
1825 } | 1919 } |
1826 resetOptAndAssertResultEquals(15, f); | 1920 resetOptAndAssertResultEquals(19, f); |
1827 assertEquals(2, counter); | 1921 assertEquals(2, counter); |
1828 | 1922 |
1829 // Variant flags: [alternativeFn4, tryReturns, doCatch, | 1923 // Variant flags: [alternativeFn5, tryReturns, doCatch, |
1830 // catchReturns, deopt] | 1924 // catchReturns, deopt] |
1831 | 1925 |
1832 f = function f_4____r__cr______d () { | 1926 f = function f_5_____r__cr______d () { |
1833 var local = 3; | 1927 var local = 888; |
1834 deopt = true; | 1928 deopt = true; |
1835 try { | 1929 try { |
1836 counter++; | 1930 counter++; |
1837 return magic.prop /* returns 15 */; | 1931 return 4 + magic.prop /* returns 15 */; |
1838 counter++; | 1932 counter++; |
1839 } catch (ex) { | 1933 } catch (ex) { |
1840 counter++; | 1934 counter++; |
1841 return 2 + ex; | 1935 return 2 + ex; |
1842 counter++; | 1936 counter++; |
1843 } | 1937 } |
1844 counter++; | 1938 counter++; |
1845 } | 1939 } |
1846 resetOptAndAssertResultEquals(15, f); | 1940 resetOptAndAssertResultEquals(19, f); |
1847 assertEquals(2, counter); | 1941 assertEquals(2, counter); |
1848 | 1942 |
1849 // Variant flags: [alternativeFn4, tryThrows, doCatch] | 1943 // Variant flags: [alternativeFn5, tryThrows, doCatch] |
1850 | 1944 |
1851 f = function f_4___t___c________ () { | 1945 f = function f_5____t___c________ () { |
1852 var local = 3; | 1946 var local = 888; |
1853 deopt = false; | 1947 deopt = false; |
1854 try { | 1948 try { |
1855 counter++; | 1949 counter++; |
1856 return (magic.prop = 37 /* throws 42 */); | 1950 return 4 + (magic.prop = 37 /* throws 42 */); |
1857 counter++; | 1951 counter++; |
1858 } catch (ex) { | 1952 } catch (ex) { |
1859 counter++; | 1953 counter++; |
1860 counter++; | 1954 counter++; |
1861 } | 1955 } |
1862 counter++; | 1956 counter++; |
1863 } | 1957 } |
1864 resetOptAndAssertResultEquals(undefined, f); | 1958 resetOptAndAssertResultEquals(undefined, f); |
1865 assertEquals(5, counter); | 1959 assertEquals(5, counter); |
1866 | 1960 |
1867 // Variant flags: [alternativeFn4, tryThrows, doCatch, deopt] | 1961 // Variant flags: [alternativeFn5, tryThrows, doCatch, deopt] |
1868 | 1962 |
1869 f = function f_4___t___c_______d () { | 1963 f = function f_5____t___c_______d () { |
1870 var local = 3; | 1964 var local = 888; |
1871 deopt = true; | 1965 deopt = true; |
1872 try { | 1966 try { |
1873 counter++; | 1967 counter++; |
1874 return (magic.prop = 37 /* throws 42 */); | 1968 return 4 + (magic.prop = 37 /* throws 42 */); |
1875 counter++; | 1969 counter++; |
1876 } catch (ex) { | 1970 } catch (ex) { |
1877 counter++; | 1971 counter++; |
1878 counter++; | 1972 counter++; |
1879 } | 1973 } |
1880 counter++; | 1974 counter++; |
1881 } | 1975 } |
1882 resetOptAndAssertResultEquals(undefined, f); | 1976 resetOptAndAssertResultEquals(undefined, f); |
1883 assertEquals(5, counter); | 1977 assertEquals(5, counter); |
1884 | 1978 |
1885 // Variant flags: [alternativeFn4, tryThrows, doCatch, catchThrows] | 1979 // Variant flags: [alternativeFn5, tryThrows, doCatch, catchThrows] |
1886 | 1980 |
1887 f = function f_4___t___c__t_____ () { | 1981 f = function f_5____t___c__t_____ () { |
1888 var local = 3; | 1982 var local = 888; |
1889 deopt = false; | 1983 deopt = false; |
1890 try { | 1984 try { |
1891 counter++; | 1985 counter++; |
1892 return (magic.prop = 37 /* throws 42 */); | 1986 return 4 + (magic.prop = 37 /* throws 42 */); |
1893 counter++; | 1987 counter++; |
1894 } catch (ex) { | 1988 } catch (ex) { |
1895 counter++; | 1989 counter++; |
1896 throw 2 + ex; | 1990 throw 2 + ex; |
1897 counter++; | 1991 counter++; |
1898 } | 1992 } |
1899 counter++; | 1993 counter++; |
1900 } | 1994 } |
1901 resetOptAndAssertThrowsWith(44, f); | 1995 resetOptAndAssertThrowsWith(44, f); |
1902 assertEquals(3, counter); | 1996 assertEquals(3, counter); |
1903 | 1997 |
1904 // Variant flags: [alternativeFn4, tryThrows, doCatch, catchThrows, | 1998 // Variant flags: [alternativeFn5, tryThrows, doCatch, catchThrows, |
1905 // deopt] | 1999 // deopt] |
1906 | 2000 |
1907 f = function f_4___t___c__t____d () { | 2001 f = function f_5____t___c__t____d () { |
1908 var local = 3; | 2002 var local = 888; |
1909 deopt = true; | 2003 deopt = true; |
1910 try { | 2004 try { |
1911 counter++; | 2005 counter++; |
1912 return (magic.prop = 37 /* throws 42 */); | 2006 return 4 + (magic.prop = 37 /* throws 42 */); |
1913 counter++; | 2007 counter++; |
1914 } catch (ex) { | 2008 } catch (ex) { |
1915 counter++; | 2009 counter++; |
1916 throw 2 + ex; | 2010 throw 2 + ex; |
1917 counter++; | 2011 counter++; |
1918 } | 2012 } |
1919 counter++; | 2013 counter++; |
1920 } | 2014 } |
1921 resetOptAndAssertThrowsWith(44, f); | 2015 resetOptAndAssertThrowsWith(44, f); |
1922 assertEquals(3, counter); | 2016 assertEquals(3, counter); |
1923 | 2017 |
1924 // Variant flags: [alternativeFn4, tryThrows, doCatch, catchReturns] | 2018 // Variant flags: [alternativeFn5, tryThrows, doCatch, catchReturns] |
1925 | 2019 |
1926 f = function f_4___t___cr_______ () { | 2020 f = function f_5____t___cr_______ () { |
1927 var local = 3; | 2021 var local = 888; |
1928 deopt = false; | 2022 deopt = false; |
1929 try { | 2023 try { |
1930 counter++; | 2024 counter++; |
1931 return (magic.prop = 37 /* throws 42 */); | 2025 return 4 + (magic.prop = 37 /* throws 42 */); |
1932 counter++; | 2026 counter++; |
1933 } catch (ex) { | 2027 } catch (ex) { |
1934 counter++; | 2028 counter++; |
1935 return 2 + ex; | 2029 return 2 + ex; |
1936 counter++; | 2030 counter++; |
1937 } | 2031 } |
1938 counter++; | 2032 counter++; |
1939 } | 2033 } |
1940 resetOptAndAssertResultEquals(44, f); | 2034 resetOptAndAssertResultEquals(44, f); |
1941 assertEquals(3, counter); | 2035 assertEquals(3, counter); |
1942 | 2036 |
1943 // Variant flags: [alternativeFn4, tryThrows, doCatch, catchReturns, | 2037 // Variant flags: [alternativeFn5, tryThrows, doCatch, catchReturns, |
1944 // deopt] | 2038 // deopt] |
1945 | 2039 |
1946 f = function f_4___t___cr______d () { | 2040 f = function f_5____t___cr______d () { |
1947 var local = 3; | 2041 var local = 888; |
1948 deopt = true; | 2042 deopt = true; |
1949 try { | 2043 try { |
1950 counter++; | 2044 counter++; |
1951 return (magic.prop = 37 /* throws 42 */); | 2045 return 4 + (magic.prop = 37 /* throws 42 */); |
1952 counter++; | 2046 counter++; |
1953 } catch (ex) { | 2047 } catch (ex) { |
1954 counter++; | 2048 counter++; |
1955 return 2 + ex; | 2049 return 2 + ex; |
1956 counter++; | 2050 counter++; |
1957 } | 2051 } |
1958 counter++; | 2052 counter++; |
1959 } | 2053 } |
1960 resetOptAndAssertResultEquals(44, f); | 2054 resetOptAndAssertResultEquals(44, f); |
1961 assertEquals(3, counter); | 2055 assertEquals(3, counter); |
1962 | 2056 |
1963 } | 2057 } |
1964 %NeverOptimizeFunction(runThisShard); | 2058 %NeverOptimizeFunction(runThisShard); |
1965 | 2059 |
1966 // 92 tests in this shard. | 2060 // 95 tests in this shard. |
1967 // 186 tests up to here. | 2061 // 192 tests up to here. |
1968 | 2062 |
1969 runThisShard(); | 2063 runThisShard(); |
OLD | NEW |