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