| OLD | NEW |
| 1 // Shard 1. | 1 // Shard 1. |
| 2 | 2 |
| 3 // Copyright 2016 the V8 project authors. All rights reserved. | 3 // Copyright 2016 the V8 project authors. All rights reserved. |
| 4 // Use of this source code is governed by a BSD-style license that can be | 4 // Use of this source code is governed by a BSD-style license that can be |
| 5 // found in the LICENSE file. | 5 // found in the LICENSE file. |
| 6 | 6 |
| 7 // Flags: --allow-natives-syntax --turbo --no-always-opt | 7 // Flags: --allow-natives-syntax --turbo --no-always-opt |
| 8 | 8 |
| 9 // This test file was generated by tools/gen-inlining-tests.py . | 9 // This test file was generated by tools/gen-inlining-tests.py . |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 counter++; | 59 counter++; |
| 60 return 15; | 60 return 15; |
| 61 } | 61 } |
| 62 | 62 |
| 63 function increaseAndThrow42() { | 63 function increaseAndThrow42() { |
| 64 if (deopt) %DeoptimizeFunction(f); | 64 if (deopt) %DeoptimizeFunction(f); |
| 65 counter++; | 65 counter++; |
| 66 throw 42; | 66 throw 42; |
| 67 } | 67 } |
| 68 | 68 |
| 69 function increaseAndReturn15_noopt_inner() { |
| 70 if (deopt) %DeoptimizeFunction(f); |
| 71 counter++; |
| 72 return 15; |
| 73 } |
| 74 |
| 75 %NeverOptimizeFunction(increaseAndReturn15_noopt_inner); |
| 76 |
| 77 function increaseAndThrow42_noopt_inner() { |
| 78 if (deopt) %DeoptimizeFunction(f); |
| 79 counter++; |
| 80 throw 42; |
| 81 } |
| 82 |
| 83 %NeverOptimizeFunction(increaseAndThrow42_noopt_inner); |
| 84 |
| 85 // Alternative 1 |
| 86 |
| 69 function returnOrThrow(doReturn) { | 87 function returnOrThrow(doReturn) { |
| 70 if (doReturn) { | 88 if (doReturn) { |
| 71 return increaseAndReturn15(); | 89 return increaseAndReturn15(); |
| 72 } else { | 90 } else { |
| 73 return increaseAndThrow42(); | 91 return increaseAndThrow42(); |
| 74 } | 92 } |
| 75 } | 93 } |
| 76 | 94 |
| 95 // Alternative 2 |
| 96 |
| 97 function increaseAndReturn15_calls_noopt() { |
| 98 return increaseAndReturn15_noopt_inner(); |
| 99 } |
| 100 |
| 101 function increaseAndThrow42_calls_noopt() { |
| 102 return increaseAndThrow42_noopt_inner(); |
| 103 } |
| 104 |
| 105 // Alternative 3. |
| 77 // When passed either {increaseAndReturn15} or {increaseAndThrow42}, it acts | 106 // When passed either {increaseAndReturn15} or {increaseAndThrow42}, it acts |
| 78 // as the other one. | 107 // as the other one. |
| 79 function invertFunctionCall(f) { | 108 function invertFunctionCall(f) { |
| 80 var result; | 109 var result; |
| 81 try { | 110 try { |
| 82 result = f(); | 111 result = f(); |
| 83 } catch (ex) { | 112 } catch (ex) { |
| 84 return ex - 27; | 113 return ex - 27; |
| 85 } | 114 } |
| 86 throw result + 27; | 115 throw result + 27; |
| 87 } | 116 } |
| 88 | 117 |
| 118 // Alternative 4: constructor |
| 89 function increaseAndStore15Constructor() { | 119 function increaseAndStore15Constructor() { |
| 90 if (deopt) %DeoptimizeFunction(f); | 120 if (deopt) %DeoptimizeFunction(f); |
| 91 ++counter; | 121 ++counter; |
| 92 this.x = 15; | 122 this.x = 15; |
| 93 } | 123 } |
| 94 | 124 |
| 95 function increaseAndThrow42Constructor() { | 125 function increaseAndThrow42Constructor() { |
| 96 if (deopt) %DeoptimizeFunction(f); | 126 if (deopt) %DeoptimizeFunction(f); |
| 97 ++counter; | 127 ++counter; |
| 98 this.x = 42; | 128 this.x = 42; |
| 99 throw this.x; | 129 throw this.x; |
| 100 } | 130 } |
| 101 | 131 |
| 132 // Alternative 5: property |
| 102 var magic = {}; | 133 var magic = {}; |
| 103 Object.defineProperty(magic, 'prop', { | 134 Object.defineProperty(magic, 'prop', { |
| 104 get: function () { | 135 get: function () { |
| 105 if (deopt) %DeoptimizeFunction(f); | 136 if (deopt) %DeoptimizeFunction(f); |
| 106 return 15 + 0 * ++counter; | 137 return 15 + 0 * ++counter; |
| 107 }, | 138 }, |
| 108 | 139 |
| 109 set: function(x) { | 140 set: function(x) { |
| 110 // argument should be 37 | 141 // argument should be 37 |
| 111 if (deopt) %DeoptimizeFunction(f); | 142 if (deopt) %DeoptimizeFunction(f); |
| 112 counter -= 36 - x; // increments counter | 143 counter -= 36 - x; // increments counter |
| 113 throw 42; | 144 throw 42; |
| 114 } | 145 } |
| 115 }) | 146 }) |
| 116 | 147 |
| 117 // Generate type feedback. | 148 // Generate type feedback. |
| 118 | 149 |
| 150 assertEquals(15, increaseAndReturn15_calls_noopt()); |
| 151 assertThrowsEquals(function() { return increaseAndThrow42_noopt_inner() }, 42); |
| 152 |
| 119 assertEquals(15, (new increaseAndStore15Constructor()).x); | 153 assertEquals(15, (new increaseAndStore15Constructor()).x); |
| 120 assertThrowsEquals(function() { | 154 assertThrowsEquals(function() { |
| 121 return (new increaseAndThrow42Constructor()).x; | 155 return (new increaseAndThrow42Constructor()).x; |
| 122 }, | 156 }, |
| 123 42); | 157 42); |
| 124 | 158 |
| 125 function runThisShard() { | 159 function runThisShard() { |
| 126 | 160 |
| 127 // Variant flags: [tryReturns, doFinally] | 161 // Variant flags: [tryReturns, doFinally] |
| 128 | 162 |
| 129 f = function f______r______f____ () { | 163 f = function f_______r______f____ () { |
| 130 var local = 3; | 164 var local = 888; |
| 131 deopt = false; | 165 deopt = false; |
| 132 try { | 166 try { |
| 133 counter++; | 167 counter++; |
| 134 return increaseAndReturn15(); | 168 return 4 + increaseAndReturn15(); |
| 135 counter++; | 169 counter++; |
| 136 } finally { | 170 } finally { |
| 137 counter++; | 171 counter++; |
| 138 local += 2; | 172 local += 2; |
| 139 counter++; | 173 counter++; |
| 140 } | 174 } |
| 141 counter++; | 175 counter++; |
| 142 } | 176 } |
| 143 resetOptAndAssertResultEquals(15, f); | 177 resetOptAndAssertResultEquals(19, f); |
| 144 assertEquals(4, counter); | 178 assertEquals(4, counter); |
| 145 | 179 |
| 146 // Variant flags: [tryReturns, doFinally, finallyThrows] | 180 // Variant flags: [tryReturns, doFinally, finallyThrows] |
| 147 | 181 |
| 148 f = function f______r______f_t__ () { | 182 f = function f_______r______f_t__ () { |
| 149 var local = 3; | 183 var local = 888; |
| 150 deopt = false; | 184 deopt = false; |
| 151 try { | 185 try { |
| 152 counter++; | 186 counter++; |
| 153 return increaseAndReturn15(); | 187 return 4 + increaseAndReturn15(); |
| 154 counter++; | 188 counter++; |
| 155 } finally { | 189 } finally { |
| 156 counter++; | 190 counter++; |
| 157 throw 25; | 191 throw 25; |
| 158 counter++; | 192 counter++; |
| 159 } | 193 } |
| 160 counter++; | 194 counter++; |
| 161 } | 195 } |
| 162 resetOptAndAssertThrowsWith(25, f); | 196 resetOptAndAssertThrowsWith(25, f); |
| 163 assertEquals(3, counter); | 197 assertEquals(3, counter); |
| 164 | 198 |
| 165 // Variant flags: [tryReturns, doFinally, finallyReturns] | 199 // Variant flags: [tryReturns, doFinally, finallyReturns] |
| 166 | 200 |
| 167 f = function f______r______fr___ () { | 201 f = function f_______r______fr___ () { |
| 168 var local = 3; | 202 var local = 888; |
| 169 deopt = false; | 203 deopt = false; |
| 170 try { | 204 try { |
| 171 counter++; | 205 counter++; |
| 172 return increaseAndReturn15(); | 206 return 4 + increaseAndReturn15(); |
| 173 counter++; | 207 counter++; |
| 174 } finally { | 208 } finally { |
| 175 counter++; | 209 counter++; |
| 176 return 3 + local; | 210 return 3 + local; |
| 177 counter++; | 211 counter++; |
| 178 } | 212 } |
| 179 counter++; | 213 counter++; |
| 180 } | 214 } |
| 181 resetOptAndAssertResultEquals(6, f); | 215 resetOptAndAssertResultEquals(891, f); |
| 182 assertEquals(3, counter); | 216 assertEquals(3, counter); |
| 183 | 217 |
| 184 // Variant flags: [tryReturns, doCatch] | 218 // Variant flags: [tryReturns, doCatch] |
| 185 | 219 |
| 186 f = function f______r__c________ () { | 220 f = function f_______r__c________ () { |
| 187 var local = 3; | 221 var local = 888; |
| 188 deopt = false; | 222 deopt = false; |
| 189 try { | 223 try { |
| 190 counter++; | 224 counter++; |
| 191 return increaseAndReturn15(); | 225 return 4 + increaseAndReturn15(); |
| 192 counter++; | 226 counter++; |
| 193 } catch (ex) { | 227 } catch (ex) { |
| 194 counter++; | 228 counter++; |
| 195 counter++; | 229 counter++; |
| 196 } | 230 } |
| 197 counter++; | 231 counter++; |
| 198 } | 232 } |
| 199 resetOptAndAssertResultEquals(15, f); | 233 resetOptAndAssertResultEquals(19, f); |
| 200 assertEquals(2, counter); | 234 assertEquals(2, counter); |
| 201 | 235 |
| 202 // Variant flags: [tryReturns, doCatch, deopt] | 236 // Variant flags: [tryReturns, doCatch, deopt] |
| 203 | 237 |
| 204 f = function f______r__c_______d () { | 238 f = function f_______r__c_______d () { |
| 205 var local = 3; | 239 var local = 888; |
| 206 deopt = true; | 240 deopt = true; |
| 207 try { | 241 try { |
| 208 counter++; | 242 counter++; |
| 209 return increaseAndReturn15(); | 243 return 4 + increaseAndReturn15(); |
| 210 counter++; | 244 counter++; |
| 211 } catch (ex) { | 245 } catch (ex) { |
| 212 counter++; | 246 counter++; |
| 213 counter++; | 247 counter++; |
| 214 } | 248 } |
| 215 counter++; | 249 counter++; |
| 216 } | 250 } |
| 217 resetOptAndAssertResultEquals(15, f); | 251 resetOptAndAssertResultEquals(19, f); |
| 218 assertEquals(2, counter); | 252 assertEquals(2, counter); |
| 219 | 253 |
| 220 // Variant flags: [tryReturns, doCatch, doFinally] | 254 // Variant flags: [tryReturns, doCatch, doFinally] |
| 221 | 255 |
| 222 f = function f______r__c___f____ () { | 256 f = function f_______r__c___f____ () { |
| 223 var local = 3; | 257 var local = 888; |
| 224 deopt = false; | 258 deopt = false; |
| 225 try { | 259 try { |
| 226 counter++; | 260 counter++; |
| 227 return increaseAndReturn15(); | 261 return 4 + increaseAndReturn15(); |
| 228 counter++; | 262 counter++; |
| 229 } catch (ex) { | 263 } catch (ex) { |
| 230 counter++; | 264 counter++; |
| 231 counter++; | 265 counter++; |
| 232 } finally { | 266 } finally { |
| 233 counter++; | 267 counter++; |
| 234 local += 2; | 268 local += 2; |
| 235 counter++; | 269 counter++; |
| 236 } | 270 } |
| 237 counter++; | 271 counter++; |
| 238 } | 272 } |
| 239 resetOptAndAssertResultEquals(15, f); | 273 resetOptAndAssertResultEquals(19, f); |
| 240 assertEquals(4, counter); | 274 assertEquals(4, counter); |
| 241 | 275 |
| 242 // Variant flags: [tryReturns, doCatch, doFinally, finallyThrows] | 276 // Variant flags: [tryReturns, doCatch, doFinally, finallyThrows] |
| 243 | 277 |
| 244 f = function f______r__c___f_t__ () { | 278 f = function f_______r__c___f_t__ () { |
| 245 var local = 3; | 279 var local = 888; |
| 246 deopt = false; | 280 deopt = false; |
| 247 try { | 281 try { |
| 248 counter++; | 282 counter++; |
| 249 return increaseAndReturn15(); | 283 return 4 + increaseAndReturn15(); |
| 250 counter++; | 284 counter++; |
| 251 } catch (ex) { | 285 } catch (ex) { |
| 252 counter++; | 286 counter++; |
| 253 counter++; | 287 counter++; |
| 254 } finally { | 288 } finally { |
| 255 counter++; | 289 counter++; |
| 256 throw 25; | 290 throw 25; |
| 257 counter++; | 291 counter++; |
| 258 } | 292 } |
| 259 counter++; | 293 counter++; |
| 260 } | 294 } |
| 261 resetOptAndAssertThrowsWith(25, f); | 295 resetOptAndAssertThrowsWith(25, f); |
| 262 assertEquals(3, counter); | 296 assertEquals(3, counter); |
| 263 | 297 |
| 264 // Variant flags: [tryReturns, doCatch, doFinally, finallyReturns] | 298 // Variant flags: [tryReturns, doCatch, doFinally, finallyReturns] |
| 265 | 299 |
| 266 f = function f______r__c___fr___ () { | 300 f = function f_______r__c___fr___ () { |
| 267 var local = 3; | 301 var local = 888; |
| 268 deopt = false; | 302 deopt = false; |
| 269 try { | 303 try { |
| 270 counter++; | 304 counter++; |
| 271 return increaseAndReturn15(); | 305 return 4 + increaseAndReturn15(); |
| 272 counter++; | 306 counter++; |
| 273 } catch (ex) { | 307 } catch (ex) { |
| 274 counter++; | 308 counter++; |
| 275 counter++; | 309 counter++; |
| 276 } finally { | 310 } finally { |
| 277 counter++; | 311 counter++; |
| 278 return 3 + local; | 312 return 3 + local; |
| 279 counter++; | 313 counter++; |
| 280 } | 314 } |
| 281 counter++; | 315 counter++; |
| 282 } | 316 } |
| 283 resetOptAndAssertResultEquals(6, f); | 317 resetOptAndAssertResultEquals(891, f); |
| 284 assertEquals(3, counter); | 318 assertEquals(3, counter); |
| 285 | 319 |
| 286 // Variant flags: [tryReturns, doCatch, catchThrows] | 320 // Variant flags: [tryReturns, doCatch, catchThrows] |
| 287 | 321 |
| 288 f = function f______r__c__t_____ () { | 322 f = function f_______r__c__t_____ () { |
| 289 var local = 3; | 323 var local = 888; |
| 290 deopt = false; | 324 deopt = false; |
| 291 try { | 325 try { |
| 292 counter++; | 326 counter++; |
| 293 return increaseAndReturn15(); | 327 return 4 + increaseAndReturn15(); |
| 294 counter++; | 328 counter++; |
| 295 } catch (ex) { | 329 } catch (ex) { |
| 296 counter++; | 330 counter++; |
| 297 throw 2 + ex; | 331 throw 2 + ex; |
| 298 counter++; | 332 counter++; |
| 299 } | 333 } |
| 300 counter++; | 334 counter++; |
| 301 } | 335 } |
| 302 resetOptAndAssertResultEquals(15, f); | 336 resetOptAndAssertResultEquals(19, f); |
| 303 assertEquals(2, counter); | 337 assertEquals(2, counter); |
| 304 | 338 |
| 305 // Variant flags: [tryReturns, doCatch, catchThrows, deopt] | 339 // Variant flags: [tryReturns, doCatch, catchThrows, deopt] |
| 306 | 340 |
| 307 f = function f______r__c__t____d () { | 341 f = function f_______r__c__t____d () { |
| 308 var local = 3; | 342 var local = 888; |
| 309 deopt = true; | 343 deopt = true; |
| 310 try { | 344 try { |
| 311 counter++; | 345 counter++; |
| 312 return increaseAndReturn15(); | 346 return 4 + increaseAndReturn15(); |
| 313 counter++; | 347 counter++; |
| 314 } catch (ex) { | 348 } catch (ex) { |
| 315 counter++; | 349 counter++; |
| 316 throw 2 + ex; | 350 throw 2 + ex; |
| 317 counter++; | 351 counter++; |
| 318 } | 352 } |
| 319 counter++; | 353 counter++; |
| 320 } | 354 } |
| 321 resetOptAndAssertResultEquals(15, f); | 355 resetOptAndAssertResultEquals(19, f); |
| 322 assertEquals(2, counter); | 356 assertEquals(2, counter); |
| 323 | 357 |
| 324 // Variant flags: [tryReturns, doCatch, catchThrows, doFinally] | 358 // Variant flags: [tryReturns, doCatch, catchThrows, doFinally] |
| 325 | 359 |
| 326 f = function f______r__c__tf____ () { | 360 f = function f_______r__c__tf____ () { |
| 327 var local = 3; | 361 var local = 888; |
| 328 deopt = false; | 362 deopt = false; |
| 329 try { | 363 try { |
| 330 counter++; | 364 counter++; |
| 331 return increaseAndReturn15(); | 365 return 4 + increaseAndReturn15(); |
| 332 counter++; | 366 counter++; |
| 333 } catch (ex) { | 367 } catch (ex) { |
| 334 counter++; | 368 counter++; |
| 335 throw 2 + ex; | 369 throw 2 + ex; |
| 336 counter++; | 370 counter++; |
| 337 } finally { | 371 } finally { |
| 338 counter++; | 372 counter++; |
| 339 local += 2; | 373 local += 2; |
| 340 counter++; | 374 counter++; |
| 341 } | 375 } |
| 342 counter++; | 376 counter++; |
| 343 } | 377 } |
| 344 resetOptAndAssertResultEquals(15, f); | 378 resetOptAndAssertResultEquals(19, f); |
| 345 assertEquals(4, counter); | 379 assertEquals(4, counter); |
| 346 | 380 |
| 347 // Variant flags: [tryReturns, doCatch, catchThrows, doFinally, | 381 // Variant flags: [tryReturns, doCatch, catchThrows, doFinally, |
| 348 // finallyThrows] | 382 // finallyThrows] |
| 349 | 383 |
| 350 f = function f______r__c__tf_t__ () { | 384 f = function f_______r__c__tf_t__ () { |
| 351 var local = 3; | 385 var local = 888; |
| 352 deopt = false; | 386 deopt = false; |
| 353 try { | 387 try { |
| 354 counter++; | 388 counter++; |
| 355 return increaseAndReturn15(); | 389 return 4 + increaseAndReturn15(); |
| 356 counter++; | 390 counter++; |
| 357 } catch (ex) { | 391 } catch (ex) { |
| 358 counter++; | 392 counter++; |
| 359 throw 2 + ex; | 393 throw 2 + ex; |
| 360 counter++; | 394 counter++; |
| 361 } finally { | 395 } finally { |
| 362 counter++; | 396 counter++; |
| 363 throw 25; | 397 throw 25; |
| 364 counter++; | 398 counter++; |
| 365 } | 399 } |
| 366 counter++; | 400 counter++; |
| 367 } | 401 } |
| 368 resetOptAndAssertThrowsWith(25, f); | 402 resetOptAndAssertThrowsWith(25, f); |
| 369 assertEquals(3, counter); | 403 assertEquals(3, counter); |
| 370 | 404 |
| 371 // Variant flags: [tryReturns, doCatch, catchThrows, doFinally, | 405 // Variant flags: [tryReturns, doCatch, catchThrows, doFinally, |
| 372 // finallyReturns] | 406 // finallyReturns] |
| 373 | 407 |
| 374 f = function f______r__c__tfr___ () { | 408 f = function f_______r__c__tfr___ () { |
| 375 var local = 3; | 409 var local = 888; |
| 376 deopt = false; | 410 deopt = false; |
| 377 try { | 411 try { |
| 378 counter++; | 412 counter++; |
| 379 return increaseAndReturn15(); | 413 return 4 + increaseAndReturn15(); |
| 380 counter++; | 414 counter++; |
| 381 } catch (ex) { | 415 } catch (ex) { |
| 382 counter++; | 416 counter++; |
| 383 throw 2 + ex; | 417 throw 2 + ex; |
| 384 counter++; | 418 counter++; |
| 385 } finally { | 419 } finally { |
| 386 counter++; | 420 counter++; |
| 387 return 3 + local; | 421 return 3 + local; |
| 388 counter++; | 422 counter++; |
| 389 } | 423 } |
| 390 counter++; | 424 counter++; |
| 391 } | 425 } |
| 392 resetOptAndAssertResultEquals(6, f); | 426 resetOptAndAssertResultEquals(891, f); |
| 393 assertEquals(3, counter); | 427 assertEquals(3, counter); |
| 394 | 428 |
| 395 // Variant flags: [tryReturns, doCatch, catchReturns] | 429 // Variant flags: [tryReturns, doCatch, catchReturns] |
| 396 | 430 |
| 397 f = function f______r__cr_______ () { | 431 f = function f_______r__cr_______ () { |
| 398 var local = 3; | 432 var local = 888; |
| 399 deopt = false; | 433 deopt = false; |
| 400 try { | 434 try { |
| 401 counter++; | 435 counter++; |
| 402 return increaseAndReturn15(); | 436 return 4 + increaseAndReturn15(); |
| 403 counter++; | 437 counter++; |
| 404 } catch (ex) { | 438 } catch (ex) { |
| 405 counter++; | 439 counter++; |
| 406 return 2 + ex; | 440 return 2 + ex; |
| 407 counter++; | 441 counter++; |
| 408 } | 442 } |
| 409 counter++; | 443 counter++; |
| 410 } | 444 } |
| 411 resetOptAndAssertResultEquals(15, f); | 445 resetOptAndAssertResultEquals(19, f); |
| 412 assertEquals(2, counter); | 446 assertEquals(2, counter); |
| 413 | 447 |
| 414 // Variant flags: [tryReturns, doCatch, catchReturns, deopt] | 448 // Variant flags: [tryReturns, doCatch, catchReturns, deopt] |
| 415 | 449 |
| 416 f = function f______r__cr______d () { | 450 f = function f_______r__cr______d () { |
| 417 var local = 3; | 451 var local = 888; |
| 418 deopt = true; | 452 deopt = true; |
| 419 try { | 453 try { |
| 420 counter++; | 454 counter++; |
| 421 return increaseAndReturn15(); | 455 return 4 + increaseAndReturn15(); |
| 422 counter++; | 456 counter++; |
| 423 } catch (ex) { | 457 } catch (ex) { |
| 424 counter++; | 458 counter++; |
| 425 return 2 + ex; | 459 return 2 + ex; |
| 426 counter++; | 460 counter++; |
| 427 } | 461 } |
| 428 counter++; | 462 counter++; |
| 429 } | 463 } |
| 430 resetOptAndAssertResultEquals(15, f); | 464 resetOptAndAssertResultEquals(19, f); |
| 431 assertEquals(2, counter); | 465 assertEquals(2, counter); |
| 432 | 466 |
| 433 // Variant flags: [tryReturns, doCatch, catchReturns, doFinally] | 467 // Variant flags: [tryReturns, doCatch, catchReturns, doFinally] |
| 434 | 468 |
| 435 f = function f______r__cr__f____ () { | 469 f = function f_______r__cr__f____ () { |
| 436 var local = 3; | 470 var local = 888; |
| 437 deopt = false; | 471 deopt = false; |
| 438 try { | 472 try { |
| 439 counter++; | 473 counter++; |
| 440 return increaseAndReturn15(); | 474 return 4 + increaseAndReturn15(); |
| 441 counter++; | 475 counter++; |
| 442 } catch (ex) { | 476 } catch (ex) { |
| 443 counter++; | 477 counter++; |
| 444 return 2 + ex; | 478 return 2 + ex; |
| 445 counter++; | 479 counter++; |
| 446 } finally { | 480 } finally { |
| 447 counter++; | 481 counter++; |
| 448 local += 2; | 482 local += 2; |
| 449 counter++; | 483 counter++; |
| 450 } | 484 } |
| 451 counter++; | 485 counter++; |
| 452 } | 486 } |
| 453 resetOptAndAssertResultEquals(15, f); | 487 resetOptAndAssertResultEquals(19, f); |
| 454 assertEquals(4, counter); | 488 assertEquals(4, counter); |
| 455 | 489 |
| 456 // Variant flags: [tryReturns, doCatch, catchReturns, doFinally, | 490 // Variant flags: [tryReturns, doCatch, catchReturns, doFinally, |
| 457 // finallyThrows] | 491 // finallyThrows] |
| 458 | 492 |
| 459 f = function f______r__cr__f_t__ () { | 493 f = function f_______r__cr__f_t__ () { |
| 460 var local = 3; | 494 var local = 888; |
| 461 deopt = false; | 495 deopt = false; |
| 462 try { | 496 try { |
| 463 counter++; | 497 counter++; |
| 464 return increaseAndReturn15(); | 498 return 4 + increaseAndReturn15(); |
| 465 counter++; | 499 counter++; |
| 466 } catch (ex) { | 500 } catch (ex) { |
| 467 counter++; | 501 counter++; |
| 468 return 2 + ex; | 502 return 2 + ex; |
| 469 counter++; | 503 counter++; |
| 470 } finally { | 504 } finally { |
| 471 counter++; | 505 counter++; |
| 472 throw 25; | 506 throw 25; |
| 473 counter++; | 507 counter++; |
| 474 } | 508 } |
| 475 counter++; | 509 counter++; |
| 476 } | 510 } |
| 477 resetOptAndAssertThrowsWith(25, f); | 511 resetOptAndAssertThrowsWith(25, f); |
| 478 assertEquals(3, counter); | 512 assertEquals(3, counter); |
| 479 | 513 |
| 480 // Variant flags: [tryReturns, doCatch, catchReturns, doFinally, | 514 // Variant flags: [tryReturns, doCatch, catchReturns, doFinally, |
| 481 // finallyReturns] | 515 // finallyReturns] |
| 482 | 516 |
| 483 f = function f______r__cr__fr___ () { | 517 f = function f_______r__cr__fr___ () { |
| 484 var local = 3; | 518 var local = 888; |
| 485 deopt = false; | 519 deopt = false; |
| 486 try { | 520 try { |
| 487 counter++; | 521 counter++; |
| 488 return increaseAndReturn15(); | 522 return 4 + increaseAndReturn15(); |
| 489 counter++; | 523 counter++; |
| 490 } catch (ex) { | 524 } catch (ex) { |
| 491 counter++; | 525 counter++; |
| 492 return 2 + ex; | 526 return 2 + ex; |
| 493 counter++; | 527 counter++; |
| 494 } finally { | 528 } finally { |
| 495 counter++; | 529 counter++; |
| 496 return 3 + local; | 530 return 3 + local; |
| 497 counter++; | 531 counter++; |
| 498 } | 532 } |
| 499 counter++; | 533 counter++; |
| 500 } | 534 } |
| 501 resetOptAndAssertResultEquals(6, f); | 535 resetOptAndAssertResultEquals(891, f); |
| 502 assertEquals(3, counter); | 536 assertEquals(3, counter); |
| 503 | 537 |
| 504 // Variant flags: [tryThrows, doFinally] | 538 // Variant flags: [tryThrows, doFinally] |
| 505 | 539 |
| 506 f = function f_____t_______f____ () { | 540 f = function f______t_______f____ () { |
| 507 var local = 3; | 541 var local = 888; |
| 508 deopt = false; | 542 deopt = false; |
| 509 try { | 543 try { |
| 510 counter++; | 544 counter++; |
| 511 return increaseAndThrow42(); | 545 return 4 + increaseAndThrow42(); |
| 512 counter++; | 546 counter++; |
| 513 } finally { | 547 } finally { |
| 514 counter++; | 548 counter++; |
| 515 local += 2; | 549 local += 2; |
| 516 counter++; | 550 counter++; |
| 517 } | 551 } |
| 518 counter++; | 552 counter++; |
| 519 } | 553 } |
| 520 resetOptAndAssertThrowsWith(42, f); | 554 resetOptAndAssertThrowsWith(42, f); |
| 521 assertEquals(4, counter); | 555 assertEquals(4, counter); |
| 522 | 556 |
| 523 // Variant flags: [tryThrows, doFinally, finallyThrows] | 557 // Variant flags: [tryThrows, doFinally, finallyThrows] |
| 524 | 558 |
| 525 f = function f_____t_______f_t__ () { | 559 f = function f______t_______f_t__ () { |
| 526 var local = 3; | 560 var local = 888; |
| 527 deopt = false; | 561 deopt = false; |
| 528 try { | 562 try { |
| 529 counter++; | 563 counter++; |
| 530 return increaseAndThrow42(); | 564 return 4 + increaseAndThrow42(); |
| 531 counter++; | 565 counter++; |
| 532 } finally { | 566 } finally { |
| 533 counter++; | 567 counter++; |
| 534 throw 25; | 568 throw 25; |
| 535 counter++; | 569 counter++; |
| 536 } | 570 } |
| 537 counter++; | 571 counter++; |
| 538 } | 572 } |
| 539 resetOptAndAssertThrowsWith(25, f); | 573 resetOptAndAssertThrowsWith(25, f); |
| 540 assertEquals(3, counter); | 574 assertEquals(3, counter); |
| 541 | 575 |
| 542 // Variant flags: [tryThrows, doFinally, finallyReturns] | 576 // Variant flags: [tryThrows, doFinally, finallyReturns] |
| 543 | 577 |
| 544 f = function f_____t_______fr___ () { | 578 f = function f______t_______fr___ () { |
| 545 var local = 3; | 579 var local = 888; |
| 546 deopt = false; | 580 deopt = false; |
| 547 try { | 581 try { |
| 548 counter++; | 582 counter++; |
| 549 return increaseAndThrow42(); | 583 return 4 + increaseAndThrow42(); |
| 550 counter++; | 584 counter++; |
| 551 } finally { | 585 } finally { |
| 552 counter++; | 586 counter++; |
| 553 return 3 + local; | 587 return 3 + local; |
| 554 counter++; | 588 counter++; |
| 555 } | 589 } |
| 556 counter++; | 590 counter++; |
| 557 } | 591 } |
| 558 resetOptAndAssertResultEquals(6, f); | 592 resetOptAndAssertResultEquals(891, f); |
| 559 assertEquals(3, counter); | 593 assertEquals(3, counter); |
| 560 | 594 |
| 561 // Variant flags: [tryThrows, doCatch] | 595 // Variant flags: [tryThrows, doCatch] |
| 562 | 596 |
| 563 f = function f_____t___c________ () { | 597 f = function f______t___c________ () { |
| 564 var local = 3; | 598 var local = 888; |
| 565 deopt = false; | 599 deopt = false; |
| 566 try { | 600 try { |
| 567 counter++; | 601 counter++; |
| 568 return increaseAndThrow42(); | 602 return 4 + increaseAndThrow42(); |
| 569 counter++; | 603 counter++; |
| 570 } catch (ex) { | 604 } catch (ex) { |
| 571 counter++; | 605 counter++; |
| 572 counter++; | 606 counter++; |
| 573 } | 607 } |
| 574 counter++; | 608 counter++; |
| 575 } | 609 } |
| 576 resetOptAndAssertResultEquals(undefined, f); | 610 resetOptAndAssertResultEquals(undefined, f); |
| 577 assertEquals(5, counter); | 611 assertEquals(5, counter); |
| 578 | 612 |
| 579 // Variant flags: [tryThrows, doCatch, deopt] | 613 // Variant flags: [tryThrows, doCatch, deopt] |
| 580 | 614 |
| 581 f = function f_____t___c_______d () { | 615 f = function f______t___c_______d () { |
| 582 var local = 3; | 616 var local = 888; |
| 583 deopt = true; | 617 deopt = true; |
| 584 try { | 618 try { |
| 585 counter++; | 619 counter++; |
| 586 return increaseAndThrow42(); | 620 return 4 + increaseAndThrow42(); |
| 587 counter++; | 621 counter++; |
| 588 } catch (ex) { | 622 } catch (ex) { |
| 589 counter++; | 623 counter++; |
| 590 counter++; | 624 counter++; |
| 591 } | 625 } |
| 592 counter++; | 626 counter++; |
| 593 } | 627 } |
| 594 resetOptAndAssertResultEquals(undefined, f); | 628 resetOptAndAssertResultEquals(undefined, f); |
| 595 assertEquals(5, counter); | 629 assertEquals(5, counter); |
| 596 | 630 |
| 597 // Variant flags: [tryThrows, doCatch, doFinally] | 631 // Variant flags: [tryThrows, doCatch, doFinally] |
| 598 | 632 |
| 599 f = function f_____t___c___f____ () { | 633 f = function f______t___c___f____ () { |
| 600 var local = 3; | 634 var local = 888; |
| 601 deopt = false; | 635 deopt = false; |
| 602 try { | 636 try { |
| 603 counter++; | 637 counter++; |
| 604 return increaseAndThrow42(); | 638 return 4 + increaseAndThrow42(); |
| 605 counter++; | 639 counter++; |
| 606 } catch (ex) { | 640 } catch (ex) { |
| 607 counter++; | 641 counter++; |
| 608 counter++; | 642 counter++; |
| 609 } finally { | 643 } finally { |
| 610 counter++; | 644 counter++; |
| 611 local += 2; | 645 local += 2; |
| 612 counter++; | 646 counter++; |
| 613 } | 647 } |
| 614 counter++; | 648 counter++; |
| 615 } | 649 } |
| 616 resetOptAndAssertResultEquals(undefined, f); | 650 resetOptAndAssertResultEquals(undefined, f); |
| 617 assertEquals(7, counter); | 651 assertEquals(7, counter); |
| 618 | 652 |
| 619 // Variant flags: [tryThrows, doCatch, doFinally, finallyThrows] | 653 // Variant flags: [tryThrows, doCatch, doFinally, finallyThrows] |
| 620 | 654 |
| 621 f = function f_____t___c___f_t__ () { | 655 f = function f______t___c___f_t__ () { |
| 622 var local = 3; | 656 var local = 888; |
| 623 deopt = false; | 657 deopt = false; |
| 624 try { | 658 try { |
| 625 counter++; | 659 counter++; |
| 626 return increaseAndThrow42(); | 660 return 4 + increaseAndThrow42(); |
| 627 counter++; | 661 counter++; |
| 628 } catch (ex) { | 662 } catch (ex) { |
| 629 counter++; | 663 counter++; |
| 630 counter++; | 664 counter++; |
| 631 } finally { | 665 } finally { |
| 632 counter++; | 666 counter++; |
| 633 throw 25; | 667 throw 25; |
| 634 counter++; | 668 counter++; |
| 635 } | 669 } |
| 636 counter++; | 670 counter++; |
| 637 } | 671 } |
| 638 resetOptAndAssertThrowsWith(25, f); | 672 resetOptAndAssertThrowsWith(25, f); |
| 639 assertEquals(5, counter); | 673 assertEquals(5, counter); |
| 640 | 674 |
| 641 // Variant flags: [tryThrows, doCatch, doFinally, finallyReturns] | 675 // Variant flags: [tryThrows, doCatch, doFinally, finallyReturns] |
| 642 | 676 |
| 643 f = function f_____t___c___fr___ () { | 677 f = function f______t___c___fr___ () { |
| 644 var local = 3; | 678 var local = 888; |
| 645 deopt = false; | 679 deopt = false; |
| 646 try { | 680 try { |
| 647 counter++; | 681 counter++; |
| 648 return increaseAndThrow42(); | 682 return 4 + increaseAndThrow42(); |
| 649 counter++; | 683 counter++; |
| 650 } catch (ex) { | 684 } catch (ex) { |
| 651 counter++; | 685 counter++; |
| 652 counter++; | 686 counter++; |
| 653 } finally { | 687 } finally { |
| 654 counter++; | 688 counter++; |
| 655 return 3 + local; | 689 return 3 + local; |
| 656 counter++; | 690 counter++; |
| 657 } | 691 } |
| 658 counter++; | 692 counter++; |
| 659 } | 693 } |
| 660 resetOptAndAssertResultEquals(6, f); | 694 resetOptAndAssertResultEquals(891, f); |
| 661 assertEquals(5, counter); | 695 assertEquals(5, counter); |
| 662 | 696 |
| 663 // Variant flags: [tryThrows, doCatch, catchThrows] | 697 // Variant flags: [tryThrows, doCatch, catchThrows] |
| 664 | 698 |
| 665 f = function f_____t___c__t_____ () { | 699 f = function f______t___c__t_____ () { |
| 666 var local = 3; | 700 var local = 888; |
| 667 deopt = false; | 701 deopt = false; |
| 668 try { | 702 try { |
| 669 counter++; | 703 counter++; |
| 670 return increaseAndThrow42(); | 704 return 4 + increaseAndThrow42(); |
| 671 counter++; | 705 counter++; |
| 672 } catch (ex) { | 706 } catch (ex) { |
| 673 counter++; | 707 counter++; |
| 674 throw 2 + ex; | 708 throw 2 + ex; |
| 675 counter++; | 709 counter++; |
| 676 } | 710 } |
| 677 counter++; | 711 counter++; |
| 678 } | 712 } |
| 679 resetOptAndAssertThrowsWith(44, f); | 713 resetOptAndAssertThrowsWith(44, f); |
| 680 assertEquals(3, counter); | 714 assertEquals(3, counter); |
| 681 | 715 |
| 682 // Variant flags: [tryThrows, doCatch, catchThrows, deopt] | 716 // Variant flags: [tryThrows, doCatch, catchThrows, deopt] |
| 683 | 717 |
| 684 f = function f_____t___c__t____d () { | 718 f = function f______t___c__t____d () { |
| 685 var local = 3; | 719 var local = 888; |
| 686 deopt = true; | 720 deopt = true; |
| 687 try { | 721 try { |
| 688 counter++; | 722 counter++; |
| 689 return increaseAndThrow42(); | 723 return 4 + increaseAndThrow42(); |
| 690 counter++; | 724 counter++; |
| 691 } catch (ex) { | 725 } catch (ex) { |
| 692 counter++; | 726 counter++; |
| 693 throw 2 + ex; | 727 throw 2 + ex; |
| 694 counter++; | 728 counter++; |
| 695 } | 729 } |
| 696 counter++; | 730 counter++; |
| 697 } | 731 } |
| 698 resetOptAndAssertThrowsWith(44, f); | 732 resetOptAndAssertThrowsWith(44, f); |
| 699 assertEquals(3, counter); | 733 assertEquals(3, counter); |
| 700 | 734 |
| 701 // Variant flags: [tryThrows, doCatch, catchThrows, doFinally] | 735 // Variant flags: [tryThrows, doCatch, catchThrows, doFinally] |
| 702 | 736 |
| 703 f = function f_____t___c__tf____ () { | 737 f = function f______t___c__tf____ () { |
| 704 var local = 3; | 738 var local = 888; |
| 705 deopt = false; | 739 deopt = false; |
| 706 try { | 740 try { |
| 707 counter++; | 741 counter++; |
| 708 return increaseAndThrow42(); | 742 return 4 + increaseAndThrow42(); |
| 709 counter++; | 743 counter++; |
| 710 } catch (ex) { | 744 } catch (ex) { |
| 711 counter++; | 745 counter++; |
| 712 throw 2 + ex; | 746 throw 2 + ex; |
| 713 counter++; | 747 counter++; |
| 714 } finally { | 748 } finally { |
| 715 counter++; | 749 counter++; |
| 716 local += 2; | 750 local += 2; |
| 717 counter++; | 751 counter++; |
| 718 } | 752 } |
| 719 counter++; | 753 counter++; |
| 720 } | 754 } |
| 721 resetOptAndAssertThrowsWith(44, f); | 755 resetOptAndAssertThrowsWith(44, f); |
| 722 assertEquals(5, counter); | 756 assertEquals(5, counter); |
| 723 | 757 |
| 724 // Variant flags: [tryThrows, doCatch, catchThrows, doFinally, | 758 // Variant flags: [tryThrows, doCatch, catchThrows, doFinally, |
| 725 // finallyThrows] | 759 // finallyThrows] |
| 726 | 760 |
| 727 f = function f_____t___c__tf_t__ () { | 761 f = function f______t___c__tf_t__ () { |
| 728 var local = 3; | 762 var local = 888; |
| 729 deopt = false; | 763 deopt = false; |
| 730 try { | 764 try { |
| 731 counter++; | 765 counter++; |
| 732 return increaseAndThrow42(); | 766 return 4 + increaseAndThrow42(); |
| 733 counter++; | 767 counter++; |
| 734 } catch (ex) { | 768 } catch (ex) { |
| 735 counter++; | 769 counter++; |
| 736 throw 2 + ex; | 770 throw 2 + ex; |
| 737 counter++; | 771 counter++; |
| 738 } finally { | 772 } finally { |
| 739 counter++; | 773 counter++; |
| 740 throw 25; | 774 throw 25; |
| 741 counter++; | 775 counter++; |
| 742 } | 776 } |
| 743 counter++; | 777 counter++; |
| 744 } | 778 } |
| 745 resetOptAndAssertThrowsWith(25, f); | 779 resetOptAndAssertThrowsWith(25, f); |
| 746 assertEquals(4, counter); | 780 assertEquals(4, counter); |
| 747 | 781 |
| 748 // Variant flags: [tryThrows, doCatch, catchThrows, doFinally, | 782 // Variant flags: [tryThrows, doCatch, catchThrows, doFinally, |
| 749 // finallyReturns] | 783 // finallyReturns] |
| 750 | 784 |
| 751 f = function f_____t___c__tfr___ () { | 785 f = function f______t___c__tfr___ () { |
| 752 var local = 3; | 786 var local = 888; |
| 753 deopt = false; | 787 deopt = false; |
| 754 try { | 788 try { |
| 755 counter++; | 789 counter++; |
| 756 return increaseAndThrow42(); | 790 return 4 + increaseAndThrow42(); |
| 757 counter++; | 791 counter++; |
| 758 } catch (ex) { | 792 } catch (ex) { |
| 759 counter++; | 793 counter++; |
| 760 throw 2 + ex; | 794 throw 2 + ex; |
| 761 counter++; | 795 counter++; |
| 762 } finally { | 796 } finally { |
| 763 counter++; | 797 counter++; |
| 764 return 3 + local; | 798 return 3 + local; |
| 765 counter++; | 799 counter++; |
| 766 } | 800 } |
| 767 counter++; | 801 counter++; |
| 768 } | 802 } |
| 769 resetOptAndAssertResultEquals(6, f); | 803 resetOptAndAssertResultEquals(891, f); |
| 770 assertEquals(4, counter); | 804 assertEquals(4, counter); |
| 771 | 805 |
| 772 // Variant flags: [tryThrows, doCatch, catchReturns] | 806 // Variant flags: [tryThrows, doCatch, catchReturns] |
| 773 | 807 |
| 774 f = function f_____t___cr_______ () { | 808 f = function f______t___cr_______ () { |
| 775 var local = 3; | 809 var local = 888; |
| 776 deopt = false; | 810 deopt = false; |
| 777 try { | 811 try { |
| 778 counter++; | 812 counter++; |
| 779 return increaseAndThrow42(); | 813 return 4 + increaseAndThrow42(); |
| 780 counter++; | 814 counter++; |
| 781 } catch (ex) { | 815 } catch (ex) { |
| 782 counter++; | 816 counter++; |
| 783 return 2 + ex; | 817 return 2 + ex; |
| 784 counter++; | 818 counter++; |
| 785 } | 819 } |
| 786 counter++; | 820 counter++; |
| 787 } | 821 } |
| 788 resetOptAndAssertResultEquals(44, f); | 822 resetOptAndAssertResultEquals(44, f); |
| 789 assertEquals(3, counter); | 823 assertEquals(3, counter); |
| 790 | 824 |
| 791 // Variant flags: [tryThrows, doCatch, catchReturns, deopt] | 825 // Variant flags: [tryThrows, doCatch, catchReturns, deopt] |
| 792 | 826 |
| 793 f = function f_____t___cr______d () { | 827 f = function f______t___cr______d () { |
| 794 var local = 3; | 828 var local = 888; |
| 795 deopt = true; | 829 deopt = true; |
| 796 try { | 830 try { |
| 797 counter++; | 831 counter++; |
| 798 return increaseAndThrow42(); | 832 return 4 + increaseAndThrow42(); |
| 799 counter++; | 833 counter++; |
| 800 } catch (ex) { | 834 } catch (ex) { |
| 801 counter++; | 835 counter++; |
| 802 return 2 + ex; | 836 return 2 + ex; |
| 803 counter++; | 837 counter++; |
| 804 } | 838 } |
| 805 counter++; | 839 counter++; |
| 806 } | 840 } |
| 807 resetOptAndAssertResultEquals(44, f); | 841 resetOptAndAssertResultEquals(44, f); |
| 808 assertEquals(3, counter); | 842 assertEquals(3, counter); |
| 809 | 843 |
| 810 // Variant flags: [tryThrows, doCatch, catchReturns, doFinally] | 844 // Variant flags: [tryThrows, doCatch, catchReturns, doFinally] |
| 811 | 845 |
| 812 f = function f_____t___cr__f____ () { | 846 f = function f______t___cr__f____ () { |
| 813 var local = 3; | 847 var local = 888; |
| 814 deopt = false; | 848 deopt = false; |
| 815 try { | 849 try { |
| 816 counter++; | 850 counter++; |
| 817 return increaseAndThrow42(); | 851 return 4 + increaseAndThrow42(); |
| 818 counter++; | 852 counter++; |
| 819 } catch (ex) { | 853 } catch (ex) { |
| 820 counter++; | 854 counter++; |
| 821 return 2 + ex; | 855 return 2 + ex; |
| 822 counter++; | 856 counter++; |
| 823 } finally { | 857 } finally { |
| 824 counter++; | 858 counter++; |
| 825 local += 2; | 859 local += 2; |
| 826 counter++; | 860 counter++; |
| 827 } | 861 } |
| 828 counter++; | 862 counter++; |
| 829 } | 863 } |
| 830 resetOptAndAssertResultEquals(44, f); | 864 resetOptAndAssertResultEquals(44, f); |
| 831 assertEquals(5, counter); | 865 assertEquals(5, counter); |
| 832 | 866 |
| 833 // Variant flags: [tryThrows, doCatch, catchReturns, doFinally, | 867 // Variant flags: [tryThrows, doCatch, catchReturns, doFinally, |
| 834 // finallyThrows] | 868 // finallyThrows] |
| 835 | 869 |
| 836 f = function f_____t___cr__f_t__ () { | 870 f = function f______t___cr__f_t__ () { |
| 837 var local = 3; | 871 var local = 888; |
| 838 deopt = false; | 872 deopt = false; |
| 839 try { | 873 try { |
| 840 counter++; | 874 counter++; |
| 841 return increaseAndThrow42(); | 875 return 4 + increaseAndThrow42(); |
| 842 counter++; | 876 counter++; |
| 843 } catch (ex) { | 877 } catch (ex) { |
| 844 counter++; | 878 counter++; |
| 845 return 2 + ex; | 879 return 2 + ex; |
| 846 counter++; | 880 counter++; |
| 847 } finally { | 881 } finally { |
| 848 counter++; | 882 counter++; |
| 849 throw 25; | 883 throw 25; |
| 850 counter++; | 884 counter++; |
| 851 } | 885 } |
| 852 counter++; | 886 counter++; |
| 853 } | 887 } |
| 854 resetOptAndAssertThrowsWith(25, f); | 888 resetOptAndAssertThrowsWith(25, f); |
| 855 assertEquals(4, counter); | 889 assertEquals(4, counter); |
| 856 | 890 |
| 857 // Variant flags: [tryThrows, doCatch, catchReturns, doFinally, | 891 // Variant flags: [tryThrows, doCatch, catchReturns, doFinally, |
| 858 // finallyReturns] | 892 // finallyReturns] |
| 859 | 893 |
| 860 f = function f_____t___cr__fr___ () { | 894 f = function f______t___cr__fr___ () { |
| 861 var local = 3; | 895 var local = 888; |
| 862 deopt = false; | 896 deopt = false; |
| 863 try { | 897 try { |
| 864 counter++; | 898 counter++; |
| 865 return increaseAndThrow42(); | 899 return 4 + increaseAndThrow42(); |
| 866 counter++; | 900 counter++; |
| 867 } catch (ex) { | 901 } catch (ex) { |
| 868 counter++; | 902 counter++; |
| 869 return 2 + ex; | 903 return 2 + ex; |
| 870 counter++; | 904 counter++; |
| 871 } finally { | 905 } finally { |
| 872 counter++; | 906 counter++; |
| 873 return 3 + local; | 907 return 3 + local; |
| 874 counter++; | 908 counter++; |
| 875 } | 909 } |
| 876 counter++; | 910 counter++; |
| 877 } | 911 } |
| 878 resetOptAndAssertResultEquals(6, f); | 912 resetOptAndAssertResultEquals(891, f); |
| 879 assertEquals(4, counter); | 913 assertEquals(4, counter); |
| 880 | 914 |
| 881 // Variant flags: [tryThrows, tryReturns, doFinally] | 915 // Variant flags: [tryThrows, tryReturns, doFinally] |
| 882 | 916 |
| 883 f = function f_____tr______f____ () { | 917 f = function f______tr______f____ () { |
| 884 var local = 3; | 918 var local = 888; |
| 885 deopt = false; | 919 deopt = false; |
| 886 try { | 920 try { |
| 887 counter++; | 921 counter++; |
| 888 return increaseAndThrow42(); | 922 return 4 + increaseAndThrow42(); |
| 889 return increaseAndReturn15(); | 923 return 4 + increaseAndReturn15(); |
| 890 counter++; | 924 counter++; |
| 891 } finally { | 925 } finally { |
| 892 counter++; | 926 counter++; |
| 893 local += 2; | 927 local += 2; |
| 894 counter++; | 928 counter++; |
| 895 } | 929 } |
| 896 counter++; | 930 counter++; |
| 897 } | 931 } |
| 898 resetOptAndAssertThrowsWith(42, f); | 932 resetOptAndAssertThrowsWith(42, f); |
| 899 assertEquals(4, counter); | 933 assertEquals(4, counter); |
| 900 | 934 |
| 901 // Variant flags: [tryThrows, tryReturns, doFinally, finallyThrows] | 935 // Variant flags: [tryThrows, tryReturns, doFinally, finallyThrows] |
| 902 | 936 |
| 903 f = function f_____tr______f_t__ () { | 937 f = function f______tr______f_t__ () { |
| 904 var local = 3; | 938 var local = 888; |
| 905 deopt = false; | 939 deopt = false; |
| 906 try { | 940 try { |
| 907 counter++; | 941 counter++; |
| 908 return increaseAndThrow42(); | 942 return 4 + increaseAndThrow42(); |
| 909 return increaseAndReturn15(); | 943 return 4 + increaseAndReturn15(); |
| 910 counter++; | 944 counter++; |
| 911 } finally { | 945 } finally { |
| 912 counter++; | 946 counter++; |
| 913 throw 25; | 947 throw 25; |
| 914 counter++; | 948 counter++; |
| 915 } | 949 } |
| 916 counter++; | 950 counter++; |
| 917 } | 951 } |
| 918 resetOptAndAssertThrowsWith(25, f); | 952 resetOptAndAssertThrowsWith(25, f); |
| 919 assertEquals(3, counter); | 953 assertEquals(3, counter); |
| 920 | 954 |
| 921 // Variant flags: [tryThrows, tryReturns, doFinally, finallyReturns] | 955 // Variant flags: [tryThrows, tryReturns, doFinally, finallyReturns] |
| 922 | 956 |
| 923 f = function f_____tr______fr___ () { | 957 f = function f______tr______fr___ () { |
| 924 var local = 3; | 958 var local = 888; |
| 925 deopt = false; | 959 deopt = false; |
| 926 try { | 960 try { |
| 927 counter++; | 961 counter++; |
| 928 return increaseAndThrow42(); | 962 return 4 + increaseAndThrow42(); |
| 929 return increaseAndReturn15(); | 963 return 4 + increaseAndReturn15(); |
| 930 counter++; | 964 counter++; |
| 931 } finally { | 965 } finally { |
| 932 counter++; | 966 counter++; |
| 933 return 3 + local; | 967 return 3 + local; |
| 934 counter++; | 968 counter++; |
| 935 } | 969 } |
| 936 counter++; | 970 counter++; |
| 937 } | 971 } |
| 938 resetOptAndAssertResultEquals(6, f); | 972 resetOptAndAssertResultEquals(891, f); |
| 939 assertEquals(3, counter); | 973 assertEquals(3, counter); |
| 940 | 974 |
| 941 // Variant flags: [tryThrows, tryReturns, doCatch] | 975 // Variant flags: [tryThrows, tryReturns, doCatch] |
| 942 | 976 |
| 943 f = function f_____tr__c________ () { | 977 f = function f______tr__c________ () { |
| 944 var local = 3; | 978 var local = 888; |
| 945 deopt = false; | 979 deopt = false; |
| 946 try { | 980 try { |
| 947 counter++; | 981 counter++; |
| 948 return increaseAndThrow42(); | 982 return 4 + increaseAndThrow42(); |
| 949 return increaseAndReturn15(); | 983 return 4 + increaseAndReturn15(); |
| 950 counter++; | 984 counter++; |
| 951 } catch (ex) { | 985 } catch (ex) { |
| 952 counter++; | 986 counter++; |
| 953 counter++; | 987 counter++; |
| 954 } | 988 } |
| 955 counter++; | 989 counter++; |
| 956 } | 990 } |
| 957 resetOptAndAssertResultEquals(undefined, f); | 991 resetOptAndAssertResultEquals(undefined, f); |
| 958 assertEquals(5, counter); | 992 assertEquals(5, counter); |
| 959 | 993 |
| 960 // Variant flags: [tryThrows, tryReturns, doCatch, doFinally] | 994 // Variant flags: [tryThrows, tryReturns, doCatch, doFinally] |
| 961 | 995 |
| 962 f = function f_____tr__c___f____ () { | 996 f = function f______tr__c___f____ () { |
| 963 var local = 3; | 997 var local = 888; |
| 964 deopt = false; | 998 deopt = false; |
| 965 try { | 999 try { |
| 966 counter++; | 1000 counter++; |
| 967 return increaseAndThrow42(); | 1001 return 4 + increaseAndThrow42(); |
| 968 return increaseAndReturn15(); | 1002 return 4 + increaseAndReturn15(); |
| 969 counter++; | 1003 counter++; |
| 970 } catch (ex) { | 1004 } catch (ex) { |
| 971 counter++; | 1005 counter++; |
| 972 counter++; | 1006 counter++; |
| 973 } finally { | 1007 } finally { |
| 974 counter++; | 1008 counter++; |
| 975 local += 2; | 1009 local += 2; |
| 976 counter++; | 1010 counter++; |
| 977 } | 1011 } |
| 978 counter++; | 1012 counter++; |
| 979 } | 1013 } |
| 980 resetOptAndAssertResultEquals(undefined, f); | 1014 resetOptAndAssertResultEquals(undefined, f); |
| 981 assertEquals(7, counter); | 1015 assertEquals(7, counter); |
| 982 | 1016 |
| 983 // Variant flags: [tryThrows, tryReturns, doCatch, doFinally, | 1017 // Variant flags: [tryThrows, tryReturns, doCatch, doFinally, |
| 984 // finallyThrows] | 1018 // finallyThrows] |
| 985 | 1019 |
| 986 f = function f_____tr__c___f_t__ () { | 1020 f = function f______tr__c___f_t__ () { |
| 987 var local = 3; | 1021 var local = 888; |
| 988 deopt = false; | 1022 deopt = false; |
| 989 try { | 1023 try { |
| 990 counter++; | 1024 counter++; |
| 991 return increaseAndThrow42(); | 1025 return 4 + increaseAndThrow42(); |
| 992 return increaseAndReturn15(); | 1026 return 4 + increaseAndReturn15(); |
| 993 counter++; | 1027 counter++; |
| 994 } catch (ex) { | 1028 } catch (ex) { |
| 995 counter++; | 1029 counter++; |
| 996 counter++; | 1030 counter++; |
| 997 } finally { | 1031 } finally { |
| 998 counter++; | 1032 counter++; |
| 999 throw 25; | 1033 throw 25; |
| 1000 counter++; | 1034 counter++; |
| 1001 } | 1035 } |
| 1002 counter++; | 1036 counter++; |
| 1003 } | 1037 } |
| 1004 resetOptAndAssertThrowsWith(25, f); | 1038 resetOptAndAssertThrowsWith(25, f); |
| 1005 assertEquals(5, counter); | 1039 assertEquals(5, counter); |
| 1006 | 1040 |
| 1007 // Variant flags: [tryThrows, tryReturns, doCatch, doFinally, | 1041 // Variant flags: [tryThrows, tryReturns, doCatch, doFinally, |
| 1008 // finallyReturns] | 1042 // finallyReturns] |
| 1009 | 1043 |
| 1010 f = function f_____tr__c___fr___ () { | 1044 f = function f______tr__c___fr___ () { |
| 1011 var local = 3; | 1045 var local = 888; |
| 1012 deopt = false; | 1046 deopt = false; |
| 1013 try { | 1047 try { |
| 1014 counter++; | 1048 counter++; |
| 1015 return increaseAndThrow42(); | 1049 return 4 + increaseAndThrow42(); |
| 1016 return increaseAndReturn15(); | 1050 return 4 + increaseAndReturn15(); |
| 1017 counter++; | 1051 counter++; |
| 1018 } catch (ex) { | 1052 } catch (ex) { |
| 1019 counter++; | 1053 counter++; |
| 1020 counter++; | 1054 counter++; |
| 1021 } finally { | 1055 } finally { |
| 1022 counter++; | 1056 counter++; |
| 1023 return 3 + local; | 1057 return 3 + local; |
| 1024 counter++; | 1058 counter++; |
| 1025 } | 1059 } |
| 1026 counter++; | 1060 counter++; |
| 1027 } | 1061 } |
| 1028 resetOptAndAssertResultEquals(6, f); | 1062 resetOptAndAssertResultEquals(891, f); |
| 1029 assertEquals(5, counter); | 1063 assertEquals(5, counter); |
| 1030 | 1064 |
| 1031 // Variant flags: [tryThrows, tryReturns, doCatch, catchThrows] | 1065 // Variant flags: [tryThrows, tryReturns, doCatch, catchThrows] |
| 1032 | 1066 |
| 1033 f = function f_____tr__c__t_____ () { | 1067 f = function f______tr__c__t_____ () { |
| 1034 var local = 3; | 1068 var local = 888; |
| 1035 deopt = false; | 1069 deopt = false; |
| 1036 try { | 1070 try { |
| 1037 counter++; | 1071 counter++; |
| 1038 return increaseAndThrow42(); | 1072 return 4 + increaseAndThrow42(); |
| 1039 return increaseAndReturn15(); | 1073 return 4 + increaseAndReturn15(); |
| 1040 counter++; | 1074 counter++; |
| 1041 } catch (ex) { | 1075 } catch (ex) { |
| 1042 counter++; | 1076 counter++; |
| 1043 throw 2 + ex; | 1077 throw 2 + ex; |
| 1044 counter++; | 1078 counter++; |
| 1045 } | 1079 } |
| 1046 counter++; | 1080 counter++; |
| 1047 } | 1081 } |
| 1048 resetOptAndAssertThrowsWith(44, f); | 1082 resetOptAndAssertThrowsWith(44, f); |
| 1049 assertEquals(3, counter); | 1083 assertEquals(3, counter); |
| 1050 | 1084 |
| 1051 // Variant flags: [tryThrows, tryReturns, doCatch, catchThrows, | 1085 // Variant flags: [tryThrows, tryReturns, doCatch, catchThrows, |
| 1052 // doFinally] | 1086 // doFinally] |
| 1053 | 1087 |
| 1054 f = function f_____tr__c__tf____ () { | 1088 f = function f______tr__c__tf____ () { |
| 1055 var local = 3; | 1089 var local = 888; |
| 1056 deopt = false; | 1090 deopt = false; |
| 1057 try { | 1091 try { |
| 1058 counter++; | 1092 counter++; |
| 1059 return increaseAndThrow42(); | 1093 return 4 + increaseAndThrow42(); |
| 1060 return increaseAndReturn15(); | 1094 return 4 + increaseAndReturn15(); |
| 1061 counter++; | 1095 counter++; |
| 1062 } catch (ex) { | 1096 } catch (ex) { |
| 1063 counter++; | 1097 counter++; |
| 1064 throw 2 + ex; | 1098 throw 2 + ex; |
| 1065 counter++; | 1099 counter++; |
| 1066 } finally { | 1100 } finally { |
| 1067 counter++; | 1101 counter++; |
| 1068 local += 2; | 1102 local += 2; |
| 1069 counter++; | 1103 counter++; |
| 1070 } | 1104 } |
| 1071 counter++; | 1105 counter++; |
| 1072 } | 1106 } |
| 1073 resetOptAndAssertThrowsWith(44, f); | 1107 resetOptAndAssertThrowsWith(44, f); |
| 1074 assertEquals(5, counter); | 1108 assertEquals(5, counter); |
| 1075 | 1109 |
| 1076 // Variant flags: [tryThrows, tryReturns, doCatch, catchThrows, | 1110 // Variant flags: [tryThrows, tryReturns, doCatch, catchThrows, |
| 1077 // doFinally, finallyThrows] | 1111 // doFinally, finallyThrows] |
| 1078 | 1112 |
| 1079 f = function f_____tr__c__tf_t__ () { | 1113 f = function f______tr__c__tf_t__ () { |
| 1080 var local = 3; | 1114 var local = 888; |
| 1081 deopt = false; | 1115 deopt = false; |
| 1082 try { | 1116 try { |
| 1083 counter++; | 1117 counter++; |
| 1084 return increaseAndThrow42(); | 1118 return 4 + increaseAndThrow42(); |
| 1085 return increaseAndReturn15(); | 1119 return 4 + increaseAndReturn15(); |
| 1086 counter++; | 1120 counter++; |
| 1087 } catch (ex) { | 1121 } catch (ex) { |
| 1088 counter++; | 1122 counter++; |
| 1089 throw 2 + ex; | 1123 throw 2 + ex; |
| 1090 counter++; | 1124 counter++; |
| 1091 } finally { | 1125 } finally { |
| 1092 counter++; | 1126 counter++; |
| 1093 throw 25; | 1127 throw 25; |
| 1094 counter++; | 1128 counter++; |
| 1095 } | 1129 } |
| 1096 counter++; | 1130 counter++; |
| 1097 } | 1131 } |
| 1098 resetOptAndAssertThrowsWith(25, f); | 1132 resetOptAndAssertThrowsWith(25, f); |
| 1099 assertEquals(4, counter); | 1133 assertEquals(4, counter); |
| 1100 | 1134 |
| 1101 // Variant flags: [tryThrows, tryReturns, doCatch, catchThrows, | 1135 // Variant flags: [tryThrows, tryReturns, doCatch, catchThrows, |
| 1102 // doFinally, finallyReturns] | 1136 // doFinally, finallyReturns] |
| 1103 | 1137 |
| 1104 f = function f_____tr__c__tfr___ () { | 1138 f = function f______tr__c__tfr___ () { |
| 1105 var local = 3; | 1139 var local = 888; |
| 1106 deopt = false; | 1140 deopt = false; |
| 1107 try { | 1141 try { |
| 1108 counter++; | 1142 counter++; |
| 1109 return increaseAndThrow42(); | 1143 return 4 + increaseAndThrow42(); |
| 1110 return increaseAndReturn15(); | 1144 return 4 + increaseAndReturn15(); |
| 1111 counter++; | 1145 counter++; |
| 1112 } catch (ex) { | 1146 } catch (ex) { |
| 1113 counter++; | 1147 counter++; |
| 1114 throw 2 + ex; | 1148 throw 2 + ex; |
| 1115 counter++; | 1149 counter++; |
| 1116 } finally { | 1150 } finally { |
| 1117 counter++; | 1151 counter++; |
| 1118 return 3 + local; | 1152 return 3 + local; |
| 1119 counter++; | 1153 counter++; |
| 1120 } | 1154 } |
| 1121 counter++; | 1155 counter++; |
| 1122 } | 1156 } |
| 1123 resetOptAndAssertResultEquals(6, f); | 1157 resetOptAndAssertResultEquals(891, f); |
| 1124 assertEquals(4, counter); | 1158 assertEquals(4, counter); |
| 1125 | 1159 |
| 1126 // Variant flags: [tryThrows, tryReturns, doCatch, catchReturns] | 1160 // Variant flags: [tryThrows, tryReturns, doCatch, catchReturns] |
| 1127 | 1161 |
| 1128 f = function f_____tr__cr_______ () { | 1162 f = function f______tr__cr_______ () { |
| 1129 var local = 3; | 1163 var local = 888; |
| 1130 deopt = false; | 1164 deopt = false; |
| 1131 try { | 1165 try { |
| 1132 counter++; | 1166 counter++; |
| 1133 return increaseAndThrow42(); | 1167 return 4 + increaseAndThrow42(); |
| 1134 return increaseAndReturn15(); | 1168 return 4 + increaseAndReturn15(); |
| 1135 counter++; | 1169 counter++; |
| 1136 } catch (ex) { | 1170 } catch (ex) { |
| 1137 counter++; | 1171 counter++; |
| 1138 return 2 + ex; | 1172 return 2 + ex; |
| 1139 counter++; | 1173 counter++; |
| 1140 } | 1174 } |
| 1141 counter++; | 1175 counter++; |
| 1142 } | 1176 } |
| 1143 resetOptAndAssertResultEquals(44, f); | 1177 resetOptAndAssertResultEquals(44, f); |
| 1144 assertEquals(3, counter); | 1178 assertEquals(3, counter); |
| 1145 | 1179 |
| 1146 // Variant flags: [tryThrows, tryReturns, doCatch, catchReturns, | 1180 // Variant flags: [tryThrows, tryReturns, doCatch, catchReturns, |
| 1147 // doFinally] | 1181 // doFinally] |
| 1148 | 1182 |
| 1149 f = function f_____tr__cr__f____ () { | 1183 f = function f______tr__cr__f____ () { |
| 1150 var local = 3; | 1184 var local = 888; |
| 1151 deopt = false; | 1185 deopt = false; |
| 1152 try { | 1186 try { |
| 1153 counter++; | 1187 counter++; |
| 1154 return increaseAndThrow42(); | 1188 return 4 + increaseAndThrow42(); |
| 1155 return increaseAndReturn15(); | 1189 return 4 + increaseAndReturn15(); |
| 1156 counter++; | 1190 counter++; |
| 1157 } catch (ex) { | 1191 } catch (ex) { |
| 1158 counter++; | 1192 counter++; |
| 1159 return 2 + ex; | 1193 return 2 + ex; |
| 1160 counter++; | 1194 counter++; |
| 1161 } finally { | 1195 } finally { |
| 1162 counter++; | 1196 counter++; |
| 1163 local += 2; | 1197 local += 2; |
| 1164 counter++; | 1198 counter++; |
| 1165 } | 1199 } |
| 1166 counter++; | 1200 counter++; |
| 1167 } | 1201 } |
| 1168 resetOptAndAssertResultEquals(44, f); | 1202 resetOptAndAssertResultEquals(44, f); |
| 1169 assertEquals(5, counter); | 1203 assertEquals(5, counter); |
| 1170 | 1204 |
| 1171 // Variant flags: [tryThrows, tryReturns, doCatch, catchReturns, | 1205 // Variant flags: [tryThrows, tryReturns, doCatch, catchReturns, |
| 1172 // doFinally, finallyThrows] | 1206 // doFinally, finallyThrows] |
| 1173 | 1207 |
| 1174 f = function f_____tr__cr__f_t__ () { | 1208 f = function f______tr__cr__f_t__ () { |
| 1175 var local = 3; | 1209 var local = 888; |
| 1176 deopt = false; | 1210 deopt = false; |
| 1177 try { | 1211 try { |
| 1178 counter++; | 1212 counter++; |
| 1179 return increaseAndThrow42(); | 1213 return 4 + increaseAndThrow42(); |
| 1180 return increaseAndReturn15(); | 1214 return 4 + increaseAndReturn15(); |
| 1181 counter++; | 1215 counter++; |
| 1182 } catch (ex) { | 1216 } catch (ex) { |
| 1183 counter++; | 1217 counter++; |
| 1184 return 2 + ex; | 1218 return 2 + ex; |
| 1185 counter++; | 1219 counter++; |
| 1186 } finally { | 1220 } finally { |
| 1187 counter++; | 1221 counter++; |
| 1188 throw 25; | 1222 throw 25; |
| 1189 counter++; | 1223 counter++; |
| 1190 } | 1224 } |
| 1191 counter++; | 1225 counter++; |
| 1192 } | 1226 } |
| 1193 resetOptAndAssertThrowsWith(25, f); | 1227 resetOptAndAssertThrowsWith(25, f); |
| 1194 assertEquals(4, counter); | 1228 assertEquals(4, counter); |
| 1195 | 1229 |
| 1196 // Variant flags: [tryThrows, tryReturns, doCatch, catchReturns, | 1230 // Variant flags: [tryThrows, tryReturns, doCatch, catchReturns, |
| 1197 // doFinally, finallyReturns] | 1231 // doFinally, finallyReturns] |
| 1198 | 1232 |
| 1199 f = function f_____tr__cr__fr___ () { | 1233 f = function f______tr__cr__fr___ () { |
| 1200 var local = 3; | 1234 var local = 888; |
| 1201 deopt = false; | 1235 deopt = false; |
| 1202 try { | 1236 try { |
| 1203 counter++; | 1237 counter++; |
| 1204 return increaseAndThrow42(); | 1238 return 4 + increaseAndThrow42(); |
| 1205 return increaseAndReturn15(); | 1239 return 4 + increaseAndReturn15(); |
| 1206 counter++; | 1240 counter++; |
| 1207 } catch (ex) { | 1241 } catch (ex) { |
| 1208 counter++; | 1242 counter++; |
| 1209 return 2 + ex; | 1243 return 2 + ex; |
| 1210 counter++; | 1244 counter++; |
| 1211 } finally { | 1245 } finally { |
| 1212 counter++; | 1246 counter++; |
| 1213 return 3 + local; | 1247 return 3 + local; |
| 1214 counter++; | 1248 counter++; |
| 1215 } | 1249 } |
| 1216 counter++; | 1250 counter++; |
| 1217 } | 1251 } |
| 1218 resetOptAndAssertResultEquals(6, f); | 1252 resetOptAndAssertResultEquals(891, f); |
| 1219 assertEquals(4, counter); | 1253 assertEquals(4, counter); |
| 1220 | 1254 |
| 1221 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, | 1255 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, |
| 1222 // doFinally] | 1256 // doFinally] |
| 1223 | 1257 |
| 1224 f = function f_____trf_____f____ () { | 1258 f = function f______trf_____f____ () { |
| 1225 var local = 3; | 1259 var local = 888; |
| 1226 deopt = false; | 1260 deopt = false; |
| 1227 try { | 1261 try { |
| 1228 counter++; | 1262 counter++; |
| 1229 return increaseAndReturn15(); | 1263 return 4 + increaseAndReturn15(); |
| 1230 return increaseAndThrow42(); | 1264 return 4 + increaseAndThrow42(); |
| 1231 counter++; | 1265 counter++; |
| 1232 } finally { | 1266 } finally { |
| 1233 counter++; | 1267 counter++; |
| 1234 local += 2; | 1268 local += 2; |
| 1235 counter++; | 1269 counter++; |
| 1236 } | 1270 } |
| 1237 counter++; | 1271 counter++; |
| 1238 } | 1272 } |
| 1239 resetOptAndAssertResultEquals(15, f); | 1273 resetOptAndAssertResultEquals(19, f); |
| 1240 assertEquals(4, counter); | 1274 assertEquals(4, counter); |
| 1241 | 1275 |
| 1242 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, | 1276 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, |
| 1243 // doFinally, finallyThrows] | 1277 // doFinally, finallyThrows] |
| 1244 | 1278 |
| 1245 f = function f_____trf_____f_t__ () { | 1279 f = function f______trf_____f_t__ () { |
| 1246 var local = 3; | 1280 var local = 888; |
| 1247 deopt = false; | 1281 deopt = false; |
| 1248 try { | 1282 try { |
| 1249 counter++; | 1283 counter++; |
| 1250 return increaseAndReturn15(); | 1284 return 4 + increaseAndReturn15(); |
| 1251 return increaseAndThrow42(); | 1285 return 4 + increaseAndThrow42(); |
| 1252 counter++; | 1286 counter++; |
| 1253 } finally { | 1287 } finally { |
| 1254 counter++; | 1288 counter++; |
| 1255 throw 25; | 1289 throw 25; |
| 1256 counter++; | 1290 counter++; |
| 1257 } | 1291 } |
| 1258 counter++; | 1292 counter++; |
| 1259 } | 1293 } |
| 1260 resetOptAndAssertThrowsWith(25, f); | 1294 resetOptAndAssertThrowsWith(25, f); |
| 1261 assertEquals(3, counter); | 1295 assertEquals(3, counter); |
| 1262 | 1296 |
| 1263 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, | 1297 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, |
| 1264 // doFinally, finallyReturns] | 1298 // doFinally, finallyReturns] |
| 1265 | 1299 |
| 1266 f = function f_____trf_____fr___ () { | 1300 f = function f______trf_____fr___ () { |
| 1267 var local = 3; | 1301 var local = 888; |
| 1268 deopt = false; | 1302 deopt = false; |
| 1269 try { | 1303 try { |
| 1270 counter++; | 1304 counter++; |
| 1271 return increaseAndReturn15(); | 1305 return 4 + increaseAndReturn15(); |
| 1272 return increaseAndThrow42(); | 1306 return 4 + increaseAndThrow42(); |
| 1273 counter++; | 1307 counter++; |
| 1274 } finally { | 1308 } finally { |
| 1275 counter++; | 1309 counter++; |
| 1276 return 3 + local; | 1310 return 3 + local; |
| 1277 counter++; | 1311 counter++; |
| 1278 } | 1312 } |
| 1279 counter++; | 1313 counter++; |
| 1280 } | 1314 } |
| 1281 resetOptAndAssertResultEquals(6, f); | 1315 resetOptAndAssertResultEquals(891, f); |
| 1282 assertEquals(3, counter); | 1316 assertEquals(3, counter); |
| 1283 | 1317 |
| 1284 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch] | 1318 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch] |
| 1285 | 1319 |
| 1286 f = function f_____trf_c________ () { | 1320 f = function f______trf_c________ () { |
| 1287 var local = 3; | 1321 var local = 888; |
| 1288 deopt = false; | 1322 deopt = false; |
| 1289 try { | 1323 try { |
| 1290 counter++; | 1324 counter++; |
| 1291 return increaseAndReturn15(); | 1325 return 4 + increaseAndReturn15(); |
| 1292 return increaseAndThrow42(); | 1326 return 4 + increaseAndThrow42(); |
| 1293 counter++; | 1327 counter++; |
| 1294 } catch (ex) { | 1328 } catch (ex) { |
| 1295 counter++; | 1329 counter++; |
| 1296 counter++; | 1330 counter++; |
| 1297 } | 1331 } |
| 1298 counter++; | 1332 counter++; |
| 1299 } | 1333 } |
| 1300 resetOptAndAssertResultEquals(15, f); | 1334 resetOptAndAssertResultEquals(19, f); |
| 1301 assertEquals(2, counter); | 1335 assertEquals(2, counter); |
| 1302 | 1336 |
| 1303 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch, | 1337 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch, |
| 1304 // doFinally] | 1338 // doFinally] |
| 1305 | 1339 |
| 1306 f = function f_____trf_c___f____ () { | 1340 f = function f______trf_c___f____ () { |
| 1307 var local = 3; | 1341 var local = 888; |
| 1308 deopt = false; | 1342 deopt = false; |
| 1309 try { | 1343 try { |
| 1310 counter++; | 1344 counter++; |
| 1311 return increaseAndReturn15(); | 1345 return 4 + increaseAndReturn15(); |
| 1312 return increaseAndThrow42(); | 1346 return 4 + increaseAndThrow42(); |
| 1313 counter++; | 1347 counter++; |
| 1314 } catch (ex) { | 1348 } catch (ex) { |
| 1315 counter++; | 1349 counter++; |
| 1316 counter++; | 1350 counter++; |
| 1317 } finally { | 1351 } finally { |
| 1318 counter++; | 1352 counter++; |
| 1319 local += 2; | 1353 local += 2; |
| 1320 counter++; | 1354 counter++; |
| 1321 } | 1355 } |
| 1322 counter++; | 1356 counter++; |
| 1323 } | 1357 } |
| 1324 resetOptAndAssertResultEquals(15, f); | 1358 resetOptAndAssertResultEquals(19, f); |
| 1325 assertEquals(4, counter); | 1359 assertEquals(4, counter); |
| 1326 | 1360 |
| 1327 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch, | 1361 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch, |
| 1328 // doFinally, finallyThrows] | 1362 // doFinally, finallyThrows] |
| 1329 | 1363 |
| 1330 f = function f_____trf_c___f_t__ () { | 1364 f = function f______trf_c___f_t__ () { |
| 1331 var local = 3; | 1365 var local = 888; |
| 1332 deopt = false; | 1366 deopt = false; |
| 1333 try { | 1367 try { |
| 1334 counter++; | 1368 counter++; |
| 1335 return increaseAndReturn15(); | 1369 return 4 + increaseAndReturn15(); |
| 1336 return increaseAndThrow42(); | 1370 return 4 + increaseAndThrow42(); |
| 1337 counter++; | 1371 counter++; |
| 1338 } catch (ex) { | 1372 } catch (ex) { |
| 1339 counter++; | 1373 counter++; |
| 1340 counter++; | 1374 counter++; |
| 1341 } finally { | 1375 } finally { |
| 1342 counter++; | 1376 counter++; |
| 1343 throw 25; | 1377 throw 25; |
| 1344 counter++; | 1378 counter++; |
| 1345 } | 1379 } |
| 1346 counter++; | 1380 counter++; |
| 1347 } | 1381 } |
| 1348 resetOptAndAssertThrowsWith(25, f); | 1382 resetOptAndAssertThrowsWith(25, f); |
| 1349 assertEquals(3, counter); | 1383 assertEquals(3, counter); |
| 1350 | 1384 |
| 1351 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch, | 1385 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch, |
| 1352 // doFinally, finallyReturns] | 1386 // doFinally, finallyReturns] |
| 1353 | 1387 |
| 1354 f = function f_____trf_c___fr___ () { | 1388 f = function f______trf_c___fr___ () { |
| 1355 var local = 3; | 1389 var local = 888; |
| 1356 deopt = false; | 1390 deopt = false; |
| 1357 try { | 1391 try { |
| 1358 counter++; | 1392 counter++; |
| 1359 return increaseAndReturn15(); | 1393 return 4 + increaseAndReturn15(); |
| 1360 return increaseAndThrow42(); | 1394 return 4 + increaseAndThrow42(); |
| 1361 counter++; | 1395 counter++; |
| 1362 } catch (ex) { | 1396 } catch (ex) { |
| 1363 counter++; | 1397 counter++; |
| 1364 counter++; | 1398 counter++; |
| 1365 } finally { | 1399 } finally { |
| 1366 counter++; | 1400 counter++; |
| 1367 return 3 + local; | 1401 return 3 + local; |
| 1368 counter++; | 1402 counter++; |
| 1369 } | 1403 } |
| 1370 counter++; | 1404 counter++; |
| 1371 } | 1405 } |
| 1372 resetOptAndAssertResultEquals(6, f); | 1406 resetOptAndAssertResultEquals(891, f); |
| 1373 assertEquals(3, counter); | 1407 assertEquals(3, counter); |
| 1374 | 1408 |
| 1375 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch, | 1409 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch, |
| 1376 // catchThrows] | 1410 // catchThrows] |
| 1377 | 1411 |
| 1378 f = function f_____trf_c__t_____ () { | 1412 f = function f______trf_c__t_____ () { |
| 1379 var local = 3; | 1413 var local = 888; |
| 1380 deopt = false; | 1414 deopt = false; |
| 1381 try { | 1415 try { |
| 1382 counter++; | 1416 counter++; |
| 1383 return increaseAndReturn15(); | 1417 return 4 + increaseAndReturn15(); |
| 1384 return increaseAndThrow42(); | 1418 return 4 + increaseAndThrow42(); |
| 1385 counter++; | 1419 counter++; |
| 1386 } catch (ex) { | 1420 } catch (ex) { |
| 1387 counter++; | 1421 counter++; |
| 1388 throw 2 + ex; | 1422 throw 2 + ex; |
| 1389 counter++; | 1423 counter++; |
| 1390 } | 1424 } |
| 1391 counter++; | 1425 counter++; |
| 1392 } | 1426 } |
| 1393 resetOptAndAssertResultEquals(15, f); | 1427 resetOptAndAssertResultEquals(19, f); |
| 1394 assertEquals(2, counter); | 1428 assertEquals(2, counter); |
| 1395 | 1429 |
| 1396 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch, | 1430 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch, |
| 1397 // catchThrows, doFinally] | 1431 // catchThrows, doFinally] |
| 1398 | 1432 |
| 1399 f = function f_____trf_c__tf____ () { | 1433 f = function f______trf_c__tf____ () { |
| 1400 var local = 3; | 1434 var local = 888; |
| 1401 deopt = false; | 1435 deopt = false; |
| 1402 try { | 1436 try { |
| 1403 counter++; | 1437 counter++; |
| 1404 return increaseAndReturn15(); | 1438 return 4 + increaseAndReturn15(); |
| 1405 return increaseAndThrow42(); | 1439 return 4 + increaseAndThrow42(); |
| 1406 counter++; | 1440 counter++; |
| 1407 } catch (ex) { | 1441 } catch (ex) { |
| 1408 counter++; | 1442 counter++; |
| 1409 throw 2 + ex; | 1443 throw 2 + ex; |
| 1410 counter++; | 1444 counter++; |
| 1411 } finally { | 1445 } finally { |
| 1412 counter++; | 1446 counter++; |
| 1413 local += 2; | 1447 local += 2; |
| 1414 counter++; | 1448 counter++; |
| 1415 } | 1449 } |
| 1416 counter++; | 1450 counter++; |
| 1417 } | 1451 } |
| 1418 resetOptAndAssertResultEquals(15, f); | 1452 resetOptAndAssertResultEquals(19, f); |
| 1419 assertEquals(4, counter); | 1453 assertEquals(4, counter); |
| 1420 | 1454 |
| 1421 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch, | 1455 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch, |
| 1422 // catchThrows, doFinally, finallyThrows] | 1456 // catchThrows, doFinally, finallyThrows] |
| 1423 | 1457 |
| 1424 f = function f_____trf_c__tf_t__ () { | 1458 f = function f______trf_c__tf_t__ () { |
| 1425 var local = 3; | 1459 var local = 888; |
| 1426 deopt = false; | 1460 deopt = false; |
| 1427 try { | 1461 try { |
| 1428 counter++; | 1462 counter++; |
| 1429 return increaseAndReturn15(); | 1463 return 4 + increaseAndReturn15(); |
| 1430 return increaseAndThrow42(); | 1464 return 4 + increaseAndThrow42(); |
| 1431 counter++; | 1465 counter++; |
| 1432 } catch (ex) { | 1466 } catch (ex) { |
| 1433 counter++; | 1467 counter++; |
| 1434 throw 2 + ex; | 1468 throw 2 + ex; |
| 1435 counter++; | 1469 counter++; |
| 1436 } finally { | 1470 } finally { |
| 1437 counter++; | 1471 counter++; |
| 1438 throw 25; | 1472 throw 25; |
| 1439 counter++; | 1473 counter++; |
| 1440 } | 1474 } |
| 1441 counter++; | 1475 counter++; |
| 1442 } | 1476 } |
| 1443 resetOptAndAssertThrowsWith(25, f); | 1477 resetOptAndAssertThrowsWith(25, f); |
| 1444 assertEquals(3, counter); | 1478 assertEquals(3, counter); |
| 1445 | 1479 |
| 1446 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch, | 1480 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch, |
| 1447 // catchThrows, doFinally, finallyReturns] | 1481 // catchThrows, doFinally, finallyReturns] |
| 1448 | 1482 |
| 1449 f = function f_____trf_c__tfr___ () { | 1483 f = function f______trf_c__tfr___ () { |
| 1450 var local = 3; | 1484 var local = 888; |
| 1451 deopt = false; | 1485 deopt = false; |
| 1452 try { | 1486 try { |
| 1453 counter++; | 1487 counter++; |
| 1454 return increaseAndReturn15(); | 1488 return 4 + increaseAndReturn15(); |
| 1455 return increaseAndThrow42(); | 1489 return 4 + increaseAndThrow42(); |
| 1456 counter++; | 1490 counter++; |
| 1457 } catch (ex) { | 1491 } catch (ex) { |
| 1458 counter++; | 1492 counter++; |
| 1459 throw 2 + ex; | 1493 throw 2 + ex; |
| 1460 counter++; | 1494 counter++; |
| 1461 } finally { | 1495 } finally { |
| 1462 counter++; | 1496 counter++; |
| 1463 return 3 + local; | 1497 return 3 + local; |
| 1464 counter++; | 1498 counter++; |
| 1465 } | 1499 } |
| 1466 counter++; | 1500 counter++; |
| 1467 } | 1501 } |
| 1468 resetOptAndAssertResultEquals(6, f); | 1502 resetOptAndAssertResultEquals(891, f); |
| 1469 assertEquals(3, counter); | 1503 assertEquals(3, counter); |
| 1470 | 1504 |
| 1471 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch, | 1505 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch, |
| 1472 // catchReturns] | 1506 // catchReturns] |
| 1473 | 1507 |
| 1474 f = function f_____trf_cr_______ () { | 1508 f = function f______trf_cr_______ () { |
| 1475 var local = 3; | 1509 var local = 888; |
| 1476 deopt = false; | 1510 deopt = false; |
| 1477 try { | 1511 try { |
| 1478 counter++; | 1512 counter++; |
| 1479 return increaseAndReturn15(); | 1513 return 4 + increaseAndReturn15(); |
| 1480 return increaseAndThrow42(); | 1514 return 4 + increaseAndThrow42(); |
| 1481 counter++; | 1515 counter++; |
| 1482 } catch (ex) { | 1516 } catch (ex) { |
| 1483 counter++; | 1517 counter++; |
| 1484 return 2 + ex; | 1518 return 2 + ex; |
| 1485 counter++; | 1519 counter++; |
| 1486 } | 1520 } |
| 1487 counter++; | 1521 counter++; |
| 1488 } | 1522 } |
| 1489 resetOptAndAssertResultEquals(15, f); | 1523 resetOptAndAssertResultEquals(19, f); |
| 1490 assertEquals(2, counter); | 1524 assertEquals(2, counter); |
| 1491 | 1525 |
| 1492 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch, | 1526 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch, |
| 1493 // catchReturns, doFinally] | 1527 // catchReturns, doFinally] |
| 1494 | 1528 |
| 1495 f = function f_____trf_cr__f____ () { | 1529 f = function f______trf_cr__f____ () { |
| 1496 var local = 3; | 1530 var local = 888; |
| 1497 deopt = false; | 1531 deopt = false; |
| 1498 try { | 1532 try { |
| 1499 counter++; | 1533 counter++; |
| 1500 return increaseAndReturn15(); | 1534 return 4 + increaseAndReturn15(); |
| 1501 return increaseAndThrow42(); | 1535 return 4 + increaseAndThrow42(); |
| 1502 counter++; | 1536 counter++; |
| 1503 } catch (ex) { | 1537 } catch (ex) { |
| 1504 counter++; | 1538 counter++; |
| 1505 return 2 + ex; | 1539 return 2 + ex; |
| 1506 counter++; | 1540 counter++; |
| 1507 } finally { | 1541 } finally { |
| 1508 counter++; | 1542 counter++; |
| 1509 local += 2; | 1543 local += 2; |
| 1510 counter++; | 1544 counter++; |
| 1511 } | 1545 } |
| 1512 counter++; | 1546 counter++; |
| 1513 } | 1547 } |
| 1514 resetOptAndAssertResultEquals(15, f); | 1548 resetOptAndAssertResultEquals(19, f); |
| 1515 assertEquals(4, counter); | 1549 assertEquals(4, counter); |
| 1516 | 1550 |
| 1517 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch, | 1551 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch, |
| 1518 // catchReturns, doFinally, finallyThrows] | 1552 // catchReturns, doFinally, finallyThrows] |
| 1519 | 1553 |
| 1520 f = function f_____trf_cr__f_t__ () { | 1554 f = function f______trf_cr__f_t__ () { |
| 1521 var local = 3; | 1555 var local = 888; |
| 1522 deopt = false; | 1556 deopt = false; |
| 1523 try { | 1557 try { |
| 1524 counter++; | 1558 counter++; |
| 1525 return increaseAndReturn15(); | 1559 return 4 + increaseAndReturn15(); |
| 1526 return increaseAndThrow42(); | 1560 return 4 + increaseAndThrow42(); |
| 1527 counter++; | 1561 counter++; |
| 1528 } catch (ex) { | 1562 } catch (ex) { |
| 1529 counter++; | 1563 counter++; |
| 1530 return 2 + ex; | 1564 return 2 + ex; |
| 1531 counter++; | 1565 counter++; |
| 1532 } finally { | 1566 } finally { |
| 1533 counter++; | 1567 counter++; |
| 1534 throw 25; | 1568 throw 25; |
| 1535 counter++; | 1569 counter++; |
| 1536 } | 1570 } |
| 1537 counter++; | 1571 counter++; |
| 1538 } | 1572 } |
| 1539 resetOptAndAssertThrowsWith(25, f); | 1573 resetOptAndAssertThrowsWith(25, f); |
| 1540 assertEquals(3, counter); | 1574 assertEquals(3, counter); |
| 1541 | 1575 |
| 1542 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch, | 1576 // Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch, |
| 1543 // catchReturns, doFinally, finallyReturns] | 1577 // catchReturns, doFinally, finallyReturns] |
| 1544 | 1578 |
| 1545 f = function f_____trf_cr__fr___ () { | 1579 f = function f______trf_cr__fr___ () { |
| 1546 var local = 3; | 1580 var local = 888; |
| 1547 deopt = false; | 1581 deopt = false; |
| 1548 try { | 1582 try { |
| 1549 counter++; | 1583 counter++; |
| 1550 return increaseAndReturn15(); | 1584 return 4 + increaseAndReturn15(); |
| 1551 return increaseAndThrow42(); | 1585 return 4 + increaseAndThrow42(); |
| 1552 counter++; | 1586 counter++; |
| 1553 } catch (ex) { | 1587 } catch (ex) { |
| 1554 counter++; | 1588 counter++; |
| 1555 return 2 + ex; | 1589 return 2 + ex; |
| 1556 counter++; | 1590 counter++; |
| 1557 } finally { | 1591 } finally { |
| 1558 counter++; | 1592 counter++; |
| 1559 return 3 + local; | 1593 return 3 + local; |
| 1560 counter++; | 1594 counter++; |
| 1561 } | 1595 } |
| 1562 counter++; | 1596 counter++; |
| 1563 } | 1597 } |
| 1564 resetOptAndAssertResultEquals(6, f); | 1598 resetOptAndAssertResultEquals(891, f); |
| 1565 assertEquals(3, counter); | 1599 assertEquals(3, counter); |
| 1566 | 1600 |
| 1567 // Variant flags: [alternativeFn1, tryReturns, doCatch] | 1601 // Variant flags: [alternativeFn1, tryReturns, doCatch] |
| 1568 | 1602 |
| 1569 f = function f____1_r__c________ () { | 1603 f = function f_____1_r__c________ () { |
| 1570 var local = 3; | 1604 var local = 888; |
| 1571 deopt = false; | 1605 deopt = false; |
| 1572 try { | 1606 try { |
| 1573 counter++; | 1607 counter++; |
| 1574 return returnOrThrow(true); | 1608 return 4 + returnOrThrow(true); |
| 1575 counter++; | 1609 counter++; |
| 1576 } catch (ex) { | 1610 } catch (ex) { |
| 1577 counter++; | 1611 counter++; |
| 1578 counter++; | 1612 counter++; |
| 1579 } | 1613 } |
| 1580 counter++; | 1614 counter++; |
| 1581 } | 1615 } |
| 1582 resetOptAndAssertResultEquals(15, f); | 1616 resetOptAndAssertResultEquals(19, f); |
| 1583 assertEquals(2, counter); | 1617 assertEquals(2, counter); |
| 1584 | 1618 |
| 1585 // Variant flags: [alternativeFn1, tryReturns, doCatch, deopt] | 1619 // Variant flags: [alternativeFn1, tryReturns, doCatch, deopt] |
| 1586 | 1620 |
| 1587 f = function f____1_r__c_______d () { | 1621 f = function f_____1_r__c_______d () { |
| 1588 var local = 3; | 1622 var local = 888; |
| 1589 deopt = true; | 1623 deopt = true; |
| 1590 try { | 1624 try { |
| 1591 counter++; | 1625 counter++; |
| 1592 return returnOrThrow(true); | 1626 return 4 + returnOrThrow(true); |
| 1593 counter++; | 1627 counter++; |
| 1594 } catch (ex) { | 1628 } catch (ex) { |
| 1595 counter++; | 1629 counter++; |
| 1596 counter++; | 1630 counter++; |
| 1597 } | 1631 } |
| 1598 counter++; | 1632 counter++; |
| 1599 } | 1633 } |
| 1600 resetOptAndAssertResultEquals(15, f); | 1634 resetOptAndAssertResultEquals(19, f); |
| 1601 assertEquals(2, counter); | 1635 assertEquals(2, counter); |
| 1602 | 1636 |
| 1603 // Variant flags: [alternativeFn1, tryReturns, doCatch, catchThrows] | 1637 // Variant flags: [alternativeFn1, tryReturns, doCatch, catchThrows] |
| 1604 | 1638 |
| 1605 f = function f____1_r__c__t_____ () { | 1639 f = function f_____1_r__c__t_____ () { |
| 1606 var local = 3; | 1640 var local = 888; |
| 1607 deopt = false; | 1641 deopt = false; |
| 1608 try { | 1642 try { |
| 1609 counter++; | 1643 counter++; |
| 1610 return returnOrThrow(true); | 1644 return 4 + returnOrThrow(true); |
| 1611 counter++; | 1645 counter++; |
| 1612 } catch (ex) { | 1646 } catch (ex) { |
| 1613 counter++; | 1647 counter++; |
| 1614 throw 2 + ex; | 1648 throw 2 + ex; |
| 1615 counter++; | 1649 counter++; |
| 1616 } | 1650 } |
| 1617 counter++; | 1651 counter++; |
| 1618 } | 1652 } |
| 1619 resetOptAndAssertResultEquals(15, f); | 1653 resetOptAndAssertResultEquals(19, f); |
| 1620 assertEquals(2, counter); | 1654 assertEquals(2, counter); |
| 1621 | 1655 |
| 1622 // Variant flags: [alternativeFn1, tryReturns, doCatch, catchThrows, | 1656 // Variant flags: [alternativeFn1, tryReturns, doCatch, catchThrows, |
| 1623 // deopt] | 1657 // deopt] |
| 1624 | 1658 |
| 1625 f = function f____1_r__c__t____d () { | 1659 f = function f_____1_r__c__t____d () { |
| 1626 var local = 3; | 1660 var local = 888; |
| 1627 deopt = true; | 1661 deopt = true; |
| 1628 try { | 1662 try { |
| 1629 counter++; | 1663 counter++; |
| 1630 return returnOrThrow(true); | 1664 return 4 + returnOrThrow(true); |
| 1631 counter++; | 1665 counter++; |
| 1632 } catch (ex) { | 1666 } catch (ex) { |
| 1633 counter++; | 1667 counter++; |
| 1634 throw 2 + ex; | 1668 throw 2 + ex; |
| 1635 counter++; | 1669 counter++; |
| 1636 } | 1670 } |
| 1637 counter++; | 1671 counter++; |
| 1638 } | 1672 } |
| 1639 resetOptAndAssertResultEquals(15, f); | 1673 resetOptAndAssertResultEquals(19, f); |
| 1640 assertEquals(2, counter); | 1674 assertEquals(2, counter); |
| 1641 | 1675 |
| 1642 // Variant flags: [alternativeFn1, tryReturns, doCatch, | 1676 // Variant flags: [alternativeFn1, tryReturns, doCatch, |
| 1643 // catchReturns] | 1677 // catchReturns] |
| 1644 | 1678 |
| 1645 f = function f____1_r__cr_______ () { | 1679 f = function f_____1_r__cr_______ () { |
| 1646 var local = 3; | 1680 var local = 888; |
| 1647 deopt = false; | 1681 deopt = false; |
| 1648 try { | 1682 try { |
| 1649 counter++; | 1683 counter++; |
| 1650 return returnOrThrow(true); | 1684 return 4 + returnOrThrow(true); |
| 1651 counter++; | 1685 counter++; |
| 1652 } catch (ex) { | 1686 } catch (ex) { |
| 1653 counter++; | 1687 counter++; |
| 1654 return 2 + ex; | 1688 return 2 + ex; |
| 1655 counter++; | 1689 counter++; |
| 1656 } | 1690 } |
| 1657 counter++; | 1691 counter++; |
| 1658 } | 1692 } |
| 1659 resetOptAndAssertResultEquals(15, f); | 1693 resetOptAndAssertResultEquals(19, f); |
| 1660 assertEquals(2, counter); | 1694 assertEquals(2, counter); |
| 1661 | 1695 |
| 1662 // Variant flags: [alternativeFn1, tryReturns, doCatch, | 1696 // Variant flags: [alternativeFn1, tryReturns, doCatch, |
| 1663 // catchReturns, deopt] | 1697 // catchReturns, deopt] |
| 1664 | 1698 |
| 1665 f = function f____1_r__cr______d () { | 1699 f = function f_____1_r__cr______d () { |
| 1666 var local = 3; | 1700 var local = 888; |
| 1667 deopt = true; | 1701 deopt = true; |
| 1668 try { | 1702 try { |
| 1669 counter++; | 1703 counter++; |
| 1670 return returnOrThrow(true); | 1704 return 4 + returnOrThrow(true); |
| 1671 counter++; | 1705 counter++; |
| 1672 } catch (ex) { | 1706 } catch (ex) { |
| 1673 counter++; | 1707 counter++; |
| 1674 return 2 + ex; | 1708 return 2 + ex; |
| 1675 counter++; | 1709 counter++; |
| 1676 } | 1710 } |
| 1677 counter++; | 1711 counter++; |
| 1678 } | 1712 } |
| 1679 resetOptAndAssertResultEquals(15, f); | 1713 resetOptAndAssertResultEquals(19, f); |
| 1680 assertEquals(2, counter); | 1714 assertEquals(2, counter); |
| 1681 | 1715 |
| 1682 // Variant flags: [alternativeFn1, tryThrows, doCatch] | 1716 // Variant flags: [alternativeFn1, tryThrows, doCatch] |
| 1683 | 1717 |
| 1684 f = function f____1t___c________ () { | 1718 f = function f_____1t___c________ () { |
| 1685 var local = 3; | 1719 var local = 888; |
| 1686 deopt = false; | 1720 deopt = false; |
| 1687 try { | 1721 try { |
| 1688 counter++; | 1722 counter++; |
| 1689 return returnOrThrow(false); | 1723 return 4 + returnOrThrow(false); |
| 1690 counter++; | 1724 counter++; |
| 1691 } catch (ex) { | 1725 } catch (ex) { |
| 1692 counter++; | 1726 counter++; |
| 1693 counter++; | 1727 counter++; |
| 1694 } | 1728 } |
| 1695 counter++; | 1729 counter++; |
| 1696 } | 1730 } |
| 1697 resetOptAndAssertResultEquals(undefined, f); | 1731 resetOptAndAssertResultEquals(undefined, f); |
| 1698 assertEquals(5, counter); | 1732 assertEquals(5, counter); |
| 1699 | 1733 |
| 1700 // Variant flags: [alternativeFn1, tryThrows, doCatch, deopt] | 1734 // Variant flags: [alternativeFn1, tryThrows, doCatch, deopt] |
| 1701 | 1735 |
| 1702 f = function f____1t___c_______d () { | 1736 f = function f_____1t___c_______d () { |
| 1703 var local = 3; | 1737 var local = 888; |
| 1704 deopt = true; | 1738 deopt = true; |
| 1705 try { | 1739 try { |
| 1706 counter++; | 1740 counter++; |
| 1707 return returnOrThrow(false); | 1741 return 4 + returnOrThrow(false); |
| 1708 counter++; | 1742 counter++; |
| 1709 } catch (ex) { | 1743 } catch (ex) { |
| 1710 counter++; | 1744 counter++; |
| 1711 counter++; | 1745 counter++; |
| 1712 } | 1746 } |
| 1713 counter++; | 1747 counter++; |
| 1714 } | 1748 } |
| 1715 resetOptAndAssertResultEquals(undefined, f); | 1749 resetOptAndAssertResultEquals(undefined, f); |
| 1716 assertEquals(5, counter); | 1750 assertEquals(5, counter); |
| 1717 | 1751 |
| 1718 // Variant flags: [alternativeFn1, tryThrows, doCatch, catchThrows] | 1752 // Variant flags: [alternativeFn1, tryThrows, doCatch, catchThrows] |
| 1719 | 1753 |
| 1720 f = function f____1t___c__t_____ () { | 1754 f = function f_____1t___c__t_____ () { |
| 1721 var local = 3; | 1755 var local = 888; |
| 1722 deopt = false; | 1756 deopt = false; |
| 1723 try { | 1757 try { |
| 1724 counter++; | 1758 counter++; |
| 1725 return returnOrThrow(false); | 1759 return 4 + returnOrThrow(false); |
| 1726 counter++; | 1760 counter++; |
| 1727 } catch (ex) { | 1761 } catch (ex) { |
| 1728 counter++; | 1762 counter++; |
| 1729 throw 2 + ex; | 1763 throw 2 + ex; |
| 1730 counter++; | 1764 counter++; |
| 1731 } | 1765 } |
| 1732 counter++; | 1766 counter++; |
| 1733 } | 1767 } |
| 1734 resetOptAndAssertThrowsWith(44, f); | 1768 resetOptAndAssertThrowsWith(44, f); |
| 1735 assertEquals(3, counter); | 1769 assertEquals(3, counter); |
| 1736 | 1770 |
| 1737 // Variant flags: [alternativeFn1, tryThrows, doCatch, catchThrows, | 1771 // Variant flags: [alternativeFn1, tryThrows, doCatch, catchThrows, |
| 1738 // deopt] | 1772 // deopt] |
| 1739 | 1773 |
| 1740 f = function f____1t___c__t____d () { | 1774 f = function f_____1t___c__t____d () { |
| 1741 var local = 3; | 1775 var local = 888; |
| 1742 deopt = true; | 1776 deopt = true; |
| 1743 try { | 1777 try { |
| 1744 counter++; | 1778 counter++; |
| 1745 return returnOrThrow(false); | 1779 return 4 + returnOrThrow(false); |
| 1746 counter++; | 1780 counter++; |
| 1747 } catch (ex) { | 1781 } catch (ex) { |
| 1748 counter++; | 1782 counter++; |
| 1749 throw 2 + ex; | 1783 throw 2 + ex; |
| 1750 counter++; | 1784 counter++; |
| 1751 } | 1785 } |
| 1752 counter++; | 1786 counter++; |
| 1753 } | 1787 } |
| 1754 resetOptAndAssertThrowsWith(44, f); | 1788 resetOptAndAssertThrowsWith(44, f); |
| 1755 assertEquals(3, counter); | 1789 assertEquals(3, counter); |
| 1756 | 1790 |
| 1757 // Variant flags: [alternativeFn1, tryThrows, doCatch, catchReturns] | 1791 // Variant flags: [alternativeFn1, tryThrows, doCatch, catchReturns] |
| 1758 | 1792 |
| 1759 f = function f____1t___cr_______ () { | 1793 f = function f_____1t___cr_______ () { |
| 1760 var local = 3; | 1794 var local = 888; |
| 1761 deopt = false; | 1795 deopt = false; |
| 1762 try { | 1796 try { |
| 1763 counter++; | 1797 counter++; |
| 1764 return returnOrThrow(false); | 1798 return 4 + returnOrThrow(false); |
| 1765 counter++; | 1799 counter++; |
| 1766 } catch (ex) { | 1800 } catch (ex) { |
| 1767 counter++; | 1801 counter++; |
| 1768 return 2 + ex; | 1802 return 2 + ex; |
| 1769 counter++; | 1803 counter++; |
| 1770 } | 1804 } |
| 1771 counter++; | 1805 counter++; |
| 1772 } | 1806 } |
| 1773 resetOptAndAssertResultEquals(44, f); | 1807 resetOptAndAssertResultEquals(44, f); |
| 1774 assertEquals(3, counter); | 1808 assertEquals(3, counter); |
| 1775 | 1809 |
| 1776 // Variant flags: [alternativeFn1, tryThrows, doCatch, catchReturns, | 1810 // Variant flags: [alternativeFn1, tryThrows, doCatch, catchReturns, |
| 1777 // deopt] | 1811 // deopt] |
| 1778 | 1812 |
| 1779 f = function f____1t___cr______d () { | 1813 f = function f_____1t___cr______d () { |
| 1780 var local = 3; | 1814 var local = 888; |
| 1781 deopt = true; | 1815 deopt = true; |
| 1782 try { | 1816 try { |
| 1783 counter++; | 1817 counter++; |
| 1784 return returnOrThrow(false); | 1818 return 4 + returnOrThrow(false); |
| 1785 counter++; | 1819 counter++; |
| 1786 } catch (ex) { | 1820 } catch (ex) { |
| 1787 counter++; | 1821 counter++; |
| 1788 return 2 + ex; | 1822 return 2 + ex; |
| 1789 counter++; | 1823 counter++; |
| 1790 } | 1824 } |
| 1791 counter++; | 1825 counter++; |
| 1792 } | 1826 } |
| 1793 resetOptAndAssertResultEquals(44, f); | 1827 resetOptAndAssertResultEquals(44, f); |
| 1794 assertEquals(3, counter); | 1828 assertEquals(3, counter); |
| 1795 | 1829 |
| 1796 // Variant flags: [alternativeFn2, tryReturns, doCatch] | 1830 // Variant flags: [alternativeFn2, tryReturns, doCatch, |
| 1831 // catchWithLocal, endReturnLocal, deopt] |
| 1797 | 1832 |
| 1798 f = function f___2__r__c________ () { | 1833 f = function f____2__r__c_l____ld () { |
| 1799 var local = 3; | 1834 var local = 888; |
| 1800 deopt = false; | |
| 1801 try { | |
| 1802 counter++; | |
| 1803 return invertFunctionCall(increaseAndThrow42); | |
| 1804 counter++; | |
| 1805 } catch (ex) { | |
| 1806 counter++; | |
| 1807 counter++; | |
| 1808 } | |
| 1809 counter++; | |
| 1810 } | |
| 1811 resetOptAndAssertResultEquals(15, f); | |
| 1812 assertEquals(2, counter); | |
| 1813 | |
| 1814 // Variant flags: [alternativeFn2, tryReturns, doCatch, deopt] | |
| 1815 | |
| 1816 f = function f___2__r__c_______d () { | |
| 1817 var local = 3; | |
| 1818 deopt = true; | 1835 deopt = true; |
| 1819 try { | 1836 try { |
| 1820 counter++; | 1837 counter++; |
| 1821 return invertFunctionCall(increaseAndThrow42); | 1838 return 4 + increaseAndReturn15_calls_noopt(); |
| 1822 counter++; | |
| 1823 } catch (ex) { | |
| 1824 counter++; | |
| 1825 counter++; | |
| 1826 } | |
| 1827 counter++; | |
| 1828 } | |
| 1829 resetOptAndAssertResultEquals(15, f); | |
| 1830 assertEquals(2, counter); | |
| 1831 | |
| 1832 // Variant flags: [alternativeFn2, tryReturns, doCatch, catchThrows] | |
| 1833 | |
| 1834 f = function f___2__r__c__t_____ () { | |
| 1835 var local = 3; | |
| 1836 deopt = false; | |
| 1837 try { | |
| 1838 counter++; | |
| 1839 return invertFunctionCall(increaseAndThrow42); | |
| 1840 counter++; | |
| 1841 } catch (ex) { | |
| 1842 counter++; | |
| 1843 throw 2 + ex; | |
| 1844 counter++; | |
| 1845 } | |
| 1846 counter++; | |
| 1847 } | |
| 1848 resetOptAndAssertResultEquals(15, f); | |
| 1849 assertEquals(2, counter); | |
| 1850 | |
| 1851 // Variant flags: [alternativeFn2, tryReturns, doCatch, catchThrows, | |
| 1852 // deopt] | |
| 1853 | |
| 1854 f = function f___2__r__c__t____d () { | |
| 1855 var local = 3; | |
| 1856 deopt = true; | |
| 1857 try { | |
| 1858 counter++; | |
| 1859 return invertFunctionCall(increaseAndThrow42); | |
| 1860 counter++; | |
| 1861 } catch (ex) { | |
| 1862 counter++; | |
| 1863 throw 2 + ex; | |
| 1864 counter++; | |
| 1865 } | |
| 1866 counter++; | |
| 1867 } | |
| 1868 resetOptAndAssertResultEquals(15, f); | |
| 1869 assertEquals(2, counter); | |
| 1870 | |
| 1871 // Variant flags: [alternativeFn2, tryReturns, doCatch, | |
| 1872 // catchWithLocal] | |
| 1873 | |
| 1874 f = function f___2__r__c_l______ () { | |
| 1875 var local = 3; | |
| 1876 deopt = false; | |
| 1877 try { | |
| 1878 counter++; | |
| 1879 return invertFunctionCall(increaseAndThrow42); | |
| 1880 counter++; | 1839 counter++; |
| 1881 } catch (ex) { | 1840 } catch (ex) { |
| 1882 counter++; | 1841 counter++; |
| 1883 local += ex; | 1842 local += ex; |
| 1884 counter++; | 1843 counter++; |
| 1885 } | 1844 } |
| 1886 counter++; | 1845 counter++; |
| 1846 return 5 + local; |
| 1887 } | 1847 } |
| 1888 resetOptAndAssertResultEquals(15, f); | 1848 resetOptAndAssertResultEquals(19, f); |
| 1889 assertEquals(2, counter); | 1849 assertEquals(2, counter); |
| 1890 | 1850 |
| 1891 // Variant flags: [alternativeFn2, tryReturns, doCatch, | 1851 // Variant flags: [alternativeFn2, tryReturns, tryResultToLocal, |
| 1892 // catchWithLocal, deopt] | 1852 // doCatch, endReturnLocal, deopt] |
| 1893 | 1853 |
| 1894 f = function f___2__r__c_l_____d () { | 1854 f = function f____2__r_lc______ld () { |
| 1895 var local = 3; | 1855 var local = 888; |
| 1896 deopt = true; | 1856 deopt = true; |
| 1897 try { | 1857 try { |
| 1898 counter++; | 1858 counter++; |
| 1899 return invertFunctionCall(increaseAndThrow42); | 1859 local += 4 + increaseAndReturn15_calls_noopt(); |
| 1900 counter++; | 1860 counter++; |
| 1901 } catch (ex) { | 1861 } catch (ex) { |
| 1902 counter++; | 1862 counter++; |
| 1863 counter++; |
| 1864 } |
| 1865 counter++; |
| 1866 return 5 + local; |
| 1867 } |
| 1868 resetOptAndAssertResultEquals(912, f); |
| 1869 assertEquals(4, counter); |
| 1870 |
| 1871 // Variant flags: [alternativeFn2, tryReturns, tryResultToLocal, |
| 1872 // doCatch, catchWithLocal, endReturnLocal, deopt] |
| 1873 |
| 1874 f = function f____2__r_lc_l____ld () { |
| 1875 var local = 888; |
| 1876 deopt = true; |
| 1877 try { |
| 1878 counter++; |
| 1879 local += 4 + increaseAndReturn15_calls_noopt(); |
| 1880 counter++; |
| 1881 } catch (ex) { |
| 1882 counter++; |
| 1883 local += ex; |
| 1884 counter++; |
| 1885 } |
| 1886 counter++; |
| 1887 return 5 + local; |
| 1888 } |
| 1889 resetOptAndAssertResultEquals(912, f); |
| 1890 assertEquals(4, counter); |
| 1891 |
| 1892 // Variant flags: [alternativeFn2, tryThrows, doCatch, |
| 1893 // catchWithLocal, endReturnLocal, deopt] |
| 1894 |
| 1895 f = function f____2_t___c_l____ld () { |
| 1896 var local = 888; |
| 1897 deopt = true; |
| 1898 try { |
| 1899 counter++; |
| 1900 return 4 + increaseAndThrow42_calls_noopt(); |
| 1901 counter++; |
| 1902 } catch (ex) { |
| 1903 counter++; |
| 1904 local += ex; |
| 1905 counter++; |
| 1906 } |
| 1907 counter++; |
| 1908 return 5 + local; |
| 1909 } |
| 1910 resetOptAndAssertResultEquals(935, f); |
| 1911 assertEquals(5, counter); |
| 1912 |
| 1913 // Variant flags: [alternativeFn2, tryThrows, tryResultToLocal, |
| 1914 // doCatch, endReturnLocal, deopt] |
| 1915 |
| 1916 f = function f____2_t__lc______ld () { |
| 1917 var local = 888; |
| 1918 deopt = true; |
| 1919 try { |
| 1920 counter++; |
| 1921 local += 4 + increaseAndThrow42_calls_noopt(); |
| 1922 counter++; |
| 1923 } catch (ex) { |
| 1924 counter++; |
| 1925 counter++; |
| 1926 } |
| 1927 counter++; |
| 1928 return 5 + local; |
| 1929 } |
| 1930 resetOptAndAssertResultEquals(893, f); |
| 1931 assertEquals(5, counter); |
| 1932 |
| 1933 // Variant flags: [alternativeFn2, tryThrows, tryResultToLocal, |
| 1934 // doCatch, catchWithLocal, endReturnLocal, deopt] |
| 1935 |
| 1936 f = function f____2_t__lc_l____ld () { |
| 1937 var local = 888; |
| 1938 deopt = true; |
| 1939 try { |
| 1940 counter++; |
| 1941 local += 4 + increaseAndThrow42_calls_noopt(); |
| 1942 counter++; |
| 1943 } catch (ex) { |
| 1944 counter++; |
| 1903 local += ex; | 1945 local += ex; |
| 1904 counter++; | 1946 counter++; |
| 1905 } | 1947 } |
| 1906 counter++; | 1948 counter++; |
| 1907 } | |
| 1908 resetOptAndAssertResultEquals(15, f); | |
| 1909 assertEquals(2, counter); | |
| 1910 | |
| 1911 // Variant flags: [alternativeFn2, tryReturns, doCatch, | |
| 1912 // catchWithLocal, endReturnLocal] | |
| 1913 | |
| 1914 f = function f___2__r__c_l____l_ () { | |
| 1915 var local = 3; | |
| 1916 deopt = false; | |
| 1917 try { | |
| 1918 counter++; | |
| 1919 return invertFunctionCall(increaseAndThrow42); | |
| 1920 counter++; | |
| 1921 } catch (ex) { | |
| 1922 counter++; | |
| 1923 local += ex; | |
| 1924 counter++; | |
| 1925 } | |
| 1926 counter++; | |
| 1927 return 5 + local; | 1949 return 5 + local; |
| 1928 } | 1950 } |
| 1929 resetOptAndAssertResultEquals(15, f); | 1951 resetOptAndAssertResultEquals(935, f); |
| 1952 assertEquals(5, counter); |
| 1953 |
| 1954 // Variant flags: [alternativeFn3, tryReturns, doCatch] |
| 1955 |
| 1956 f = function f___3___r__c________ () { |
| 1957 var local = 888; |
| 1958 deopt = false; |
| 1959 try { |
| 1960 counter++; |
| 1961 return 4 + invertFunctionCall(increaseAndThrow42); |
| 1962 counter++; |
| 1963 } catch (ex) { |
| 1964 counter++; |
| 1965 counter++; |
| 1966 } |
| 1967 counter++; |
| 1968 } |
| 1969 resetOptAndAssertResultEquals(19, f); |
| 1930 assertEquals(2, counter); | 1970 assertEquals(2, counter); |
| 1931 | 1971 |
| 1932 // Variant flags: [alternativeFn2, tryReturns, doCatch, | 1972 // Variant flags: [alternativeFn3, tryReturns, doCatch, deopt] |
| 1933 // catchWithLocal, endReturnLocal, deopt] | |
| 1934 | 1973 |
| 1935 f = function f___2__r__c_l____ld () { | 1974 f = function f___3___r__c_______d () { |
| 1936 var local = 3; | 1975 var local = 888; |
| 1937 deopt = true; | 1976 deopt = true; |
| 1938 try { | 1977 try { |
| 1939 counter++; | 1978 counter++; |
| 1940 return invertFunctionCall(increaseAndThrow42); | 1979 return 4 + invertFunctionCall(increaseAndThrow42); |
| 1941 counter++; | 1980 counter++; |
| 1942 } catch (ex) { | 1981 } catch (ex) { |
| 1943 counter++; | 1982 counter++; |
| 1944 local += ex; | |
| 1945 counter++; | 1983 counter++; |
| 1946 } | 1984 } |
| 1947 counter++; | 1985 counter++; |
| 1948 return 5 + local; | |
| 1949 } | 1986 } |
| 1950 resetOptAndAssertResultEquals(15, f); | 1987 resetOptAndAssertResultEquals(19, f); |
| 1951 assertEquals(2, counter); | 1988 assertEquals(2, counter); |
| 1952 | 1989 |
| 1953 // Variant flags: [alternativeFn2, tryReturns, doCatch, | 1990 // Variant flags: [alternativeFn3, tryReturns, doCatch, catchThrows] |
| 1954 // catchWithLocal, catchThrows] | |
| 1955 | 1991 |
| 1956 f = function f___2__r__c_lt_____ () { | 1992 f = function f___3___r__c__t_____ () { |
| 1957 var local = 3; | 1993 var local = 888; |
| 1958 deopt = false; | 1994 deopt = false; |
| 1959 try { | 1995 try { |
| 1960 counter++; | 1996 counter++; |
| 1961 return invertFunctionCall(increaseAndThrow42); | 1997 return 4 + invertFunctionCall(increaseAndThrow42); |
| 1962 counter++; | 1998 counter++; |
| 1963 } catch (ex) { | 1999 } catch (ex) { |
| 1964 counter++; | 2000 counter++; |
| 1965 throw 2 + ex; | 2001 throw 2 + ex; |
| 1966 counter++; | 2002 counter++; |
| 1967 } | 2003 } |
| 1968 counter++; | 2004 counter++; |
| 1969 } | 2005 } |
| 1970 resetOptAndAssertResultEquals(15, f); | 2006 resetOptAndAssertResultEquals(19, f); |
| 1971 assertEquals(2, counter); | 2007 assertEquals(2, counter); |
| 1972 | 2008 |
| 1973 // Variant flags: [alternativeFn2, tryReturns, doCatch, | 2009 // Variant flags: [alternativeFn3, tryReturns, doCatch, catchThrows, |
| 1974 // catchWithLocal, catchThrows, deopt] | 2010 // deopt] |
| 1975 | 2011 |
| 1976 f = function f___2__r__c_lt____d () { | 2012 f = function f___3___r__c__t____d () { |
| 1977 var local = 3; | 2013 var local = 888; |
| 1978 deopt = true; | 2014 deopt = true; |
| 1979 try { | 2015 try { |
| 1980 counter++; | 2016 counter++; |
| 1981 return invertFunctionCall(increaseAndThrow42); | 2017 return 4 + invertFunctionCall(increaseAndThrow42); |
| 1982 counter++; | 2018 counter++; |
| 1983 } catch (ex) { | 2019 } catch (ex) { |
| 1984 counter++; | 2020 counter++; |
| 1985 throw 2 + ex; | 2021 throw 2 + ex; |
| 1986 counter++; | 2022 counter++; |
| 1987 } | 2023 } |
| 1988 counter++; | 2024 counter++; |
| 1989 } | 2025 } |
| 1990 resetOptAndAssertResultEquals(15, f); | 2026 resetOptAndAssertResultEquals(19, f); |
| 1991 assertEquals(2, counter); | 2027 assertEquals(2, counter); |
| 1992 | 2028 |
| 1993 // Variant flags: [alternativeFn2, tryReturns, doCatch, | 2029 // Variant flags: [alternativeFn3, tryReturns, doCatch, |
| 1994 // catchWithLocal, catchThrows, endReturnLocal] | 2030 // catchWithLocal] |
| 1995 | 2031 |
| 1996 f = function f___2__r__c_lt___l_ () { | 2032 f = function f___3___r__c_l______ () { |
| 1997 var local = 3; | 2033 var local = 888; |
| 1998 deopt = false; | 2034 deopt = false; |
| 1999 try { | 2035 try { |
| 2000 counter++; | 2036 counter++; |
| 2001 return invertFunctionCall(increaseAndThrow42); | 2037 return 4 + invertFunctionCall(increaseAndThrow42); |
| 2038 counter++; |
| 2039 } catch (ex) { |
| 2040 counter++; |
| 2041 local += ex; |
| 2042 counter++; |
| 2043 } |
| 2044 counter++; |
| 2045 } |
| 2046 resetOptAndAssertResultEquals(19, f); |
| 2047 assertEquals(2, counter); |
| 2048 |
| 2049 // Variant flags: [alternativeFn3, tryReturns, doCatch, |
| 2050 // catchWithLocal, deopt] |
| 2051 |
| 2052 f = function f___3___r__c_l_____d () { |
| 2053 var local = 888; |
| 2054 deopt = true; |
| 2055 try { |
| 2056 counter++; |
| 2057 return 4 + invertFunctionCall(increaseAndThrow42); |
| 2058 counter++; |
| 2059 } catch (ex) { |
| 2060 counter++; |
| 2061 local += ex; |
| 2062 counter++; |
| 2063 } |
| 2064 counter++; |
| 2065 } |
| 2066 resetOptAndAssertResultEquals(19, f); |
| 2067 assertEquals(2, counter); |
| 2068 |
| 2069 // Variant flags: [alternativeFn3, tryReturns, doCatch, |
| 2070 // catchWithLocal, endReturnLocal] |
| 2071 |
| 2072 f = function f___3___r__c_l____l_ () { |
| 2073 var local = 888; |
| 2074 deopt = false; |
| 2075 try { |
| 2076 counter++; |
| 2077 return 4 + invertFunctionCall(increaseAndThrow42); |
| 2078 counter++; |
| 2079 } catch (ex) { |
| 2080 counter++; |
| 2081 local += ex; |
| 2082 counter++; |
| 2083 } |
| 2084 counter++; |
| 2085 return 5 + local; |
| 2086 } |
| 2087 resetOptAndAssertResultEquals(19, f); |
| 2088 assertEquals(2, counter); |
| 2089 |
| 2090 // Variant flags: [alternativeFn3, tryReturns, doCatch, |
| 2091 // catchWithLocal, endReturnLocal, deopt] |
| 2092 |
| 2093 f = function f___3___r__c_l____ld () { |
| 2094 var local = 888; |
| 2095 deopt = true; |
| 2096 try { |
| 2097 counter++; |
| 2098 return 4 + invertFunctionCall(increaseAndThrow42); |
| 2099 counter++; |
| 2100 } catch (ex) { |
| 2101 counter++; |
| 2102 local += ex; |
| 2103 counter++; |
| 2104 } |
| 2105 counter++; |
| 2106 return 5 + local; |
| 2107 } |
| 2108 resetOptAndAssertResultEquals(19, f); |
| 2109 assertEquals(2, counter); |
| 2110 |
| 2111 // Variant flags: [alternativeFn3, tryReturns, doCatch, |
| 2112 // catchWithLocal, catchThrows] |
| 2113 |
| 2114 f = function f___3___r__c_lt_____ () { |
| 2115 var local = 888; |
| 2116 deopt = false; |
| 2117 try { |
| 2118 counter++; |
| 2119 return 4 + invertFunctionCall(increaseAndThrow42); |
| 2120 counter++; |
| 2121 } catch (ex) { |
| 2122 counter++; |
| 2123 throw 2 + ex; |
| 2124 counter++; |
| 2125 } |
| 2126 counter++; |
| 2127 } |
| 2128 resetOptAndAssertResultEquals(19, f); |
| 2129 assertEquals(2, counter); |
| 2130 |
| 2131 // Variant flags: [alternativeFn3, tryReturns, doCatch, |
| 2132 // catchWithLocal, catchThrows, deopt] |
| 2133 |
| 2134 f = function f___3___r__c_lt____d () { |
| 2135 var local = 888; |
| 2136 deopt = true; |
| 2137 try { |
| 2138 counter++; |
| 2139 return 4 + invertFunctionCall(increaseAndThrow42); |
| 2140 counter++; |
| 2141 } catch (ex) { |
| 2142 counter++; |
| 2143 throw 2 + ex; |
| 2144 counter++; |
| 2145 } |
| 2146 counter++; |
| 2147 } |
| 2148 resetOptAndAssertResultEquals(19, f); |
| 2149 assertEquals(2, counter); |
| 2150 |
| 2151 // Variant flags: [alternativeFn3, tryReturns, doCatch, |
| 2152 // catchWithLocal, catchThrows, endReturnLocal] |
| 2153 |
| 2154 f = function f___3___r__c_lt___l_ () { |
| 2155 var local = 888; |
| 2156 deopt = false; |
| 2157 try { |
| 2158 counter++; |
| 2159 return 4 + invertFunctionCall(increaseAndThrow42); |
| 2002 counter++; | 2160 counter++; |
| 2003 } catch (ex) { | 2161 } catch (ex) { |
| 2004 counter++; | 2162 counter++; |
| 2005 throw 2 + ex; | 2163 throw 2 + ex; |
| 2006 counter++; | 2164 counter++; |
| 2007 } | 2165 } |
| 2008 counter++; | 2166 counter++; |
| 2009 return 5 + local; | 2167 return 5 + local; |
| 2010 } | 2168 } |
| 2011 resetOptAndAssertResultEquals(15, f); | 2169 resetOptAndAssertResultEquals(19, f); |
| 2012 assertEquals(2, counter); | 2170 assertEquals(2, counter); |
| 2013 | 2171 |
| 2014 // Variant flags: [alternativeFn2, tryReturns, doCatch, | 2172 // Variant flags: [alternativeFn3, tryReturns, doCatch, |
| 2015 // catchWithLocal, catchThrows, endReturnLocal, deopt] | 2173 // catchWithLocal, catchThrows, endReturnLocal, deopt] |
| 2016 | 2174 |
| 2017 f = function f___2__r__c_lt___ld () { | 2175 f = function f___3___r__c_lt___ld () { |
| 2018 var local = 3; | 2176 var local = 888; |
| 2019 deopt = true; | 2177 deopt = true; |
| 2020 try { | 2178 try { |
| 2021 counter++; | 2179 counter++; |
| 2022 return invertFunctionCall(increaseAndThrow42); | 2180 return 4 + invertFunctionCall(increaseAndThrow42); |
| 2023 counter++; | 2181 counter++; |
| 2024 } catch (ex) { | 2182 } catch (ex) { |
| 2025 counter++; | 2183 counter++; |
| 2026 throw 2 + ex; | 2184 throw 2 + ex; |
| 2027 counter++; | 2185 counter++; |
| 2028 } | 2186 } |
| 2029 counter++; | 2187 counter++; |
| 2030 return 5 + local; | 2188 return 5 + local; |
| 2031 } | 2189 } |
| 2032 resetOptAndAssertResultEquals(15, f); | 2190 resetOptAndAssertResultEquals(19, f); |
| 2033 assertEquals(2, counter); | 2191 assertEquals(2, counter); |
| 2034 | 2192 |
| 2035 // Variant flags: [alternativeFn2, tryReturns, doCatch, | 2193 // Variant flags: [alternativeFn3, tryReturns, doCatch, |
| 2036 // catchReturns] | 2194 // catchReturns] |
| 2037 | 2195 |
| 2038 f = function f___2__r__cr_______ () { | 2196 f = function f___3___r__cr_______ () { |
| 2039 var local = 3; | 2197 var local = 888; |
| 2040 deopt = false; | 2198 deopt = false; |
| 2041 try { | 2199 try { |
| 2042 counter++; | 2200 counter++; |
| 2043 return invertFunctionCall(increaseAndThrow42); | 2201 return 4 + invertFunctionCall(increaseAndThrow42); |
| 2044 counter++; | 2202 counter++; |
| 2045 } catch (ex) { | 2203 } catch (ex) { |
| 2046 counter++; | 2204 counter++; |
| 2047 return 2 + ex; | 2205 return 2 + ex; |
| 2048 counter++; | 2206 counter++; |
| 2049 } | 2207 } |
| 2050 counter++; | 2208 counter++; |
| 2051 } | 2209 } |
| 2052 resetOptAndAssertResultEquals(15, f); | 2210 resetOptAndAssertResultEquals(19, f); |
| 2053 assertEquals(2, counter); | |
| 2054 | |
| 2055 // Variant flags: [alternativeFn2, tryReturns, doCatch, | |
| 2056 // catchReturns, deopt] | |
| 2057 | |
| 2058 f = function f___2__r__cr______d () { | |
| 2059 var local = 3; | |
| 2060 deopt = true; | |
| 2061 try { | |
| 2062 counter++; | |
| 2063 return invertFunctionCall(increaseAndThrow42); | |
| 2064 counter++; | |
| 2065 } catch (ex) { | |
| 2066 counter++; | |
| 2067 return 2 + ex; | |
| 2068 counter++; | |
| 2069 } | |
| 2070 counter++; | |
| 2071 } | |
| 2072 resetOptAndAssertResultEquals(15, f); | |
| 2073 assertEquals(2, counter); | |
| 2074 | |
| 2075 // Variant flags: [alternativeFn2, tryReturns, doCatch, | |
| 2076 // catchReturns, catchWithLocal] | |
| 2077 | |
| 2078 f = function f___2__r__crl______ () { | |
| 2079 var local = 3; | |
| 2080 deopt = false; | |
| 2081 try { | |
| 2082 counter++; | |
| 2083 return invertFunctionCall(increaseAndThrow42); | |
| 2084 counter++; | |
| 2085 } catch (ex) { | |
| 2086 counter++; | |
| 2087 return 2 + local; | |
| 2088 counter++; | |
| 2089 } | |
| 2090 counter++; | |
| 2091 } | |
| 2092 resetOptAndAssertResultEquals(15, f); | |
| 2093 assertEquals(2, counter); | |
| 2094 | |
| 2095 // Variant flags: [alternativeFn2, tryReturns, doCatch, | |
| 2096 // catchReturns, catchWithLocal, deopt] | |
| 2097 | |
| 2098 f = function f___2__r__crl_____d () { | |
| 2099 var local = 3; | |
| 2100 deopt = true; | |
| 2101 try { | |
| 2102 counter++; | |
| 2103 return invertFunctionCall(increaseAndThrow42); | |
| 2104 counter++; | |
| 2105 } catch (ex) { | |
| 2106 counter++; | |
| 2107 return 2 + local; | |
| 2108 counter++; | |
| 2109 } | |
| 2110 counter++; | |
| 2111 } | |
| 2112 resetOptAndAssertResultEquals(15, f); | |
| 2113 assertEquals(2, counter); | 2211 assertEquals(2, counter); |
| 2114 | 2212 |
| 2115 } | 2213 } |
| 2116 %NeverOptimizeFunction(runThisShard); | 2214 %NeverOptimizeFunction(runThisShard); |
| 2117 | 2215 |
| 2118 // 94 tests in this shard. | 2216 // 97 tests in this shard. |
| 2119 // 94 tests up to here. | 2217 // 97 tests up to here. |
| 2120 | 2218 |
| 2121 runThisShard(); | 2219 runThisShard(); |
| OLD | NEW |