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