Commit 244d9ccd authored by bgeron's avatar bgeron Committed by Commit bot

[turbofan] Tests for inlining calls, constructors, property access inside try..catch..finally.

These tests were spliced out of changelist 2216353002 and extended.

BUG=

Review-Url: https://codereview.chromium.org/2245263003
Cr-Commit-Position: refs/heads/master@{#38906}
parent bcac03e6
// Shard 1.
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --turbo --no-always-opt
// This test file was generated by tools/gen-inlining-tests.py .
// Global variables
var deopt = undefined; // either true or false
var counter = 0;
function resetState() {
counter = 0;
}
function warmUp(f) {
try {
f();
} catch (ex) {
// ok
}
try {
f();
} catch (ex) {
// ok
}
}
function resetOptAndAssertResultEquals(expected, f) {
warmUp(f);
resetState();
// %DebugPrint(f);
eval("'dont optimize this function itself please, but do optimize f'");
%OptimizeFunctionOnNextCall(f);
assertEquals(expected, f());
}
function resetOptAndAssertThrowsWith(expected, f) {
warmUp(f);
resetState();
// %DebugPrint(f);
eval("'dont optimize this function itself please, but do optimize f'");
%OptimizeFunctionOnNextCall(f);
try {
var result = f();
fail("resetOptAndAssertThrowsWith",
"exception: " + expected,
"result: " + result);
} catch (ex) {
assertEquals(expected, ex);
}
}
function increaseAndReturn15() {
if (deopt) %DeoptimizeFunction(f);
counter++;
return 15;
}
function increaseAndThrow42() {
if (deopt) %DeoptimizeFunction(f);
counter++;
throw 42;
}
function returnOrThrow(doReturn) {
if (doReturn) {
return increaseAndReturn15();
} else {
return increaseAndThrow42();
}
}
// When passed either {increaseAndReturn15} or {increaseAndThrow42}, it acts
// as the other one.
function invertFunctionCall(f) {
var result;
try {
result = f();
} catch (ex) {
return ex - 27;
}
throw result + 27;
}
function increaseAndStore15Constructor() {
if (deopt) %DeoptimizeFunction(f);
++counter;
this.x = 15;
}
function increaseAndThrow42Constructor() {
if (deopt) %DeoptimizeFunction(f);
++counter;
this.x = 42;
throw this.x;
}
var magic = {};
Object.defineProperty(magic, 'prop', {
get: function () {
if (deopt) %DeoptimizeFunction(f);
return 15 + 0 * ++counter;
},
set: function(x) {
// argument should be 37
if (deopt) %DeoptimizeFunction(f);
counter -= 36 - x; // increments counter
throw 42;
}
})
// Generate type feedback.
assertEquals(15, (new increaseAndStore15Constructor()).x);
assertThrowsEquals(function() {
return (new increaseAndThrow42Constructor()).x;
},
42);
function runThisShard() {
// Variant flags: [tryReturns, doFinally]
f = function f______r______f____ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
counter++;
} finally {
counter++;
local += 2;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(4, counter);
// Variant flags: [tryReturns, doFinally, finallyThrows]
f = function f______r______f_t__ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
counter++;
} finally {
counter++;
throw 25;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(25, f);
assertEquals(3, counter);
// Variant flags: [tryReturns, doFinally, finallyReturns]
f = function f______r______fr___ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
counter++;
} finally {
counter++;
return 3 + local;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(6, f);
assertEquals(3, counter);
// Variant flags: [tryReturns, doCatch]
f = function f______r__c________ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [tryReturns, doCatch, deopt]
f = function f______r__c_______d () {
var local = 3;
deopt = true;
try {
counter++;
return increaseAndReturn15();
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [tryReturns, doCatch, doFinally]
f = function f______r__c___f____ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
counter++;
} catch (ex) {
counter++;
counter++;
} finally {
counter++;
local += 2;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(4, counter);
// Variant flags: [tryReturns, doCatch, doFinally, finallyThrows]
f = function f______r__c___f_t__ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
counter++;
} catch (ex) {
counter++;
counter++;
} finally {
counter++;
throw 25;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(25, f);
assertEquals(3, counter);
// Variant flags: [tryReturns, doCatch, doFinally, finallyReturns]
f = function f______r__c___fr___ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
counter++;
} catch (ex) {
counter++;
counter++;
} finally {
counter++;
return 3 + local;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(6, f);
assertEquals(3, counter);
// Variant flags: [tryReturns, doCatch, catchThrows]
f = function f______r__c__t_____ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [tryReturns, doCatch, catchThrows, deopt]
f = function f______r__c__t____d () {
var local = 3;
deopt = true;
try {
counter++;
return increaseAndReturn15();
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [tryReturns, doCatch, catchThrows, doFinally]
f = function f______r__c__tf____ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
} finally {
counter++;
local += 2;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(4, counter);
// Variant flags: [tryReturns, doCatch, catchThrows, doFinally,
// finallyThrows]
f = function f______r__c__tf_t__ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
} finally {
counter++;
throw 25;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(25, f);
assertEquals(3, counter);
// Variant flags: [tryReturns, doCatch, catchThrows, doFinally,
// finallyReturns]
f = function f______r__c__tfr___ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
} finally {
counter++;
return 3 + local;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(6, f);
assertEquals(3, counter);
// Variant flags: [tryReturns, doCatch, catchReturns]
f = function f______r__cr_______ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [tryReturns, doCatch, catchReturns, deopt]
f = function f______r__cr______d () {
var local = 3;
deopt = true;
try {
counter++;
return increaseAndReturn15();
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [tryReturns, doCatch, catchReturns, doFinally]
f = function f______r__cr__f____ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
} finally {
counter++;
local += 2;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(4, counter);
// Variant flags: [tryReturns, doCatch, catchReturns, doFinally,
// finallyThrows]
f = function f______r__cr__f_t__ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
} finally {
counter++;
throw 25;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(25, f);
assertEquals(3, counter);
// Variant flags: [tryReturns, doCatch, catchReturns, doFinally,
// finallyReturns]
f = function f______r__cr__fr___ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
} finally {
counter++;
return 3 + local;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(6, f);
assertEquals(3, counter);
// Variant flags: [tryThrows, doFinally]
f = function f_____t_______f____ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
counter++;
} finally {
counter++;
local += 2;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(42, f);
assertEquals(4, counter);
// Variant flags: [tryThrows, doFinally, finallyThrows]
f = function f_____t_______f_t__ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
counter++;
} finally {
counter++;
throw 25;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(25, f);
assertEquals(3, counter);
// Variant flags: [tryThrows, doFinally, finallyReturns]
f = function f_____t_______fr___ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
counter++;
} finally {
counter++;
return 3 + local;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(6, f);
assertEquals(3, counter);
// Variant flags: [tryThrows, doCatch]
f = function f_____t___c________ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(5, counter);
// Variant flags: [tryThrows, doCatch, deopt]
f = function f_____t___c_______d () {
var local = 3;
deopt = true;
try {
counter++;
return increaseAndThrow42();
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(5, counter);
// Variant flags: [tryThrows, doCatch, doFinally]
f = function f_____t___c___f____ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
counter++;
} catch (ex) {
counter++;
counter++;
} finally {
counter++;
local += 2;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(7, counter);
// Variant flags: [tryThrows, doCatch, doFinally, finallyThrows]
f = function f_____t___c___f_t__ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
counter++;
} catch (ex) {
counter++;
counter++;
} finally {
counter++;
throw 25;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(25, f);
assertEquals(5, counter);
// Variant flags: [tryThrows, doCatch, doFinally, finallyReturns]
f = function f_____t___c___fr___ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
counter++;
} catch (ex) {
counter++;
counter++;
} finally {
counter++;
return 3 + local;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(6, f);
assertEquals(5, counter);
// Variant flags: [tryThrows, doCatch, catchThrows]
f = function f_____t___c__t_____ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(44, f);
assertEquals(3, counter);
// Variant flags: [tryThrows, doCatch, catchThrows, deopt]
f = function f_____t___c__t____d () {
var local = 3;
deopt = true;
try {
counter++;
return increaseAndThrow42();
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(44, f);
assertEquals(3, counter);
// Variant flags: [tryThrows, doCatch, catchThrows, doFinally]
f = function f_____t___c__tf____ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
} finally {
counter++;
local += 2;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(44, f);
assertEquals(5, counter);
// Variant flags: [tryThrows, doCatch, catchThrows, doFinally,
// finallyThrows]
f = function f_____t___c__tf_t__ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
} finally {
counter++;
throw 25;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(25, f);
assertEquals(4, counter);
// Variant flags: [tryThrows, doCatch, catchThrows, doFinally,
// finallyReturns]
f = function f_____t___c__tfr___ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
} finally {
counter++;
return 3 + local;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(6, f);
assertEquals(4, counter);
// Variant flags: [tryThrows, doCatch, catchReturns]
f = function f_____t___cr_______ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(44, f);
assertEquals(3, counter);
// Variant flags: [tryThrows, doCatch, catchReturns, deopt]
f = function f_____t___cr______d () {
var local = 3;
deopt = true;
try {
counter++;
return increaseAndThrow42();
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(44, f);
assertEquals(3, counter);
// Variant flags: [tryThrows, doCatch, catchReturns, doFinally]
f = function f_____t___cr__f____ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
} finally {
counter++;
local += 2;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(44, f);
assertEquals(5, counter);
// Variant flags: [tryThrows, doCatch, catchReturns, doFinally,
// finallyThrows]
f = function f_____t___cr__f_t__ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
} finally {
counter++;
throw 25;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(25, f);
assertEquals(4, counter);
// Variant flags: [tryThrows, doCatch, catchReturns, doFinally,
// finallyReturns]
f = function f_____t___cr__fr___ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
} finally {
counter++;
return 3 + local;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(6, f);
assertEquals(4, counter);
// Variant flags: [tryThrows, tryReturns, doFinally]
f = function f_____tr______f____ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
return increaseAndReturn15();
counter++;
} finally {
counter++;
local += 2;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(42, f);
assertEquals(4, counter);
// Variant flags: [tryThrows, tryReturns, doFinally, finallyThrows]
f = function f_____tr______f_t__ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
return increaseAndReturn15();
counter++;
} finally {
counter++;
throw 25;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(25, f);
assertEquals(3, counter);
// Variant flags: [tryThrows, tryReturns, doFinally, finallyReturns]
f = function f_____tr______fr___ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
return increaseAndReturn15();
counter++;
} finally {
counter++;
return 3 + local;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(6, f);
assertEquals(3, counter);
// Variant flags: [tryThrows, tryReturns, doCatch]
f = function f_____tr__c________ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
return increaseAndReturn15();
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(5, counter);
// Variant flags: [tryThrows, tryReturns, doCatch, doFinally]
f = function f_____tr__c___f____ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
return increaseAndReturn15();
counter++;
} catch (ex) {
counter++;
counter++;
} finally {
counter++;
local += 2;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(7, counter);
// Variant flags: [tryThrows, tryReturns, doCatch, doFinally,
// finallyThrows]
f = function f_____tr__c___f_t__ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
return increaseAndReturn15();
counter++;
} catch (ex) {
counter++;
counter++;
} finally {
counter++;
throw 25;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(25, f);
assertEquals(5, counter);
// Variant flags: [tryThrows, tryReturns, doCatch, doFinally,
// finallyReturns]
f = function f_____tr__c___fr___ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
return increaseAndReturn15();
counter++;
} catch (ex) {
counter++;
counter++;
} finally {
counter++;
return 3 + local;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(6, f);
assertEquals(5, counter);
// Variant flags: [tryThrows, tryReturns, doCatch, catchThrows]
f = function f_____tr__c__t_____ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
return increaseAndReturn15();
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(44, f);
assertEquals(3, counter);
// Variant flags: [tryThrows, tryReturns, doCatch, catchThrows,
// doFinally]
f = function f_____tr__c__tf____ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
return increaseAndReturn15();
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
} finally {
counter++;
local += 2;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(44, f);
assertEquals(5, counter);
// Variant flags: [tryThrows, tryReturns, doCatch, catchThrows,
// doFinally, finallyThrows]
f = function f_____tr__c__tf_t__ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
return increaseAndReturn15();
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
} finally {
counter++;
throw 25;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(25, f);
assertEquals(4, counter);
// Variant flags: [tryThrows, tryReturns, doCatch, catchThrows,
// doFinally, finallyReturns]
f = function f_____tr__c__tfr___ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
return increaseAndReturn15();
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
} finally {
counter++;
return 3 + local;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(6, f);
assertEquals(4, counter);
// Variant flags: [tryThrows, tryReturns, doCatch, catchReturns]
f = function f_____tr__cr_______ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
return increaseAndReturn15();
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(44, f);
assertEquals(3, counter);
// Variant flags: [tryThrows, tryReturns, doCatch, catchReturns,
// doFinally]
f = function f_____tr__cr__f____ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
return increaseAndReturn15();
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
} finally {
counter++;
local += 2;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(44, f);
assertEquals(5, counter);
// Variant flags: [tryThrows, tryReturns, doCatch, catchReturns,
// doFinally, finallyThrows]
f = function f_____tr__cr__f_t__ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
return increaseAndReturn15();
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
} finally {
counter++;
throw 25;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(25, f);
assertEquals(4, counter);
// Variant flags: [tryThrows, tryReturns, doCatch, catchReturns,
// doFinally, finallyReturns]
f = function f_____tr__cr__fr___ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndThrow42();
return increaseAndReturn15();
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
} finally {
counter++;
return 3 + local;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(6, f);
assertEquals(4, counter);
// Variant flags: [tryThrows, tryReturns, tryFirstReturns,
// doFinally]
f = function f_____trf_____f____ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
return increaseAndThrow42();
counter++;
} finally {
counter++;
local += 2;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(4, counter);
// Variant flags: [tryThrows, tryReturns, tryFirstReturns,
// doFinally, finallyThrows]
f = function f_____trf_____f_t__ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
return increaseAndThrow42();
counter++;
} finally {
counter++;
throw 25;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(25, f);
assertEquals(3, counter);
// Variant flags: [tryThrows, tryReturns, tryFirstReturns,
// doFinally, finallyReturns]
f = function f_____trf_____fr___ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
return increaseAndThrow42();
counter++;
} finally {
counter++;
return 3 + local;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(6, f);
assertEquals(3, counter);
// Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch]
f = function f_____trf_c________ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
return increaseAndThrow42();
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch,
// doFinally]
f = function f_____trf_c___f____ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
return increaseAndThrow42();
counter++;
} catch (ex) {
counter++;
counter++;
} finally {
counter++;
local += 2;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(4, counter);
// Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch,
// doFinally, finallyThrows]
f = function f_____trf_c___f_t__ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
return increaseAndThrow42();
counter++;
} catch (ex) {
counter++;
counter++;
} finally {
counter++;
throw 25;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(25, f);
assertEquals(3, counter);
// Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch,
// doFinally, finallyReturns]
f = function f_____trf_c___fr___ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
return increaseAndThrow42();
counter++;
} catch (ex) {
counter++;
counter++;
} finally {
counter++;
return 3 + local;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(6, f);
assertEquals(3, counter);
// Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch,
// catchThrows]
f = function f_____trf_c__t_____ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
return increaseAndThrow42();
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch,
// catchThrows, doFinally]
f = function f_____trf_c__tf____ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
return increaseAndThrow42();
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
} finally {
counter++;
local += 2;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(4, counter);
// Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch,
// catchThrows, doFinally, finallyThrows]
f = function f_____trf_c__tf_t__ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
return increaseAndThrow42();
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
} finally {
counter++;
throw 25;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(25, f);
assertEquals(3, counter);
// Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch,
// catchThrows, doFinally, finallyReturns]
f = function f_____trf_c__tfr___ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
return increaseAndThrow42();
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
} finally {
counter++;
return 3 + local;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(6, f);
assertEquals(3, counter);
// Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch,
// catchReturns]
f = function f_____trf_cr_______ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
return increaseAndThrow42();
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch,
// catchReturns, doFinally]
f = function f_____trf_cr__f____ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
return increaseAndThrow42();
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
} finally {
counter++;
local += 2;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(4, counter);
// Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch,
// catchReturns, doFinally, finallyThrows]
f = function f_____trf_cr__f_t__ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
return increaseAndThrow42();
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
} finally {
counter++;
throw 25;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(25, f);
assertEquals(3, counter);
// Variant flags: [tryThrows, tryReturns, tryFirstReturns, doCatch,
// catchReturns, doFinally, finallyReturns]
f = function f_____trf_cr__fr___ () {
var local = 3;
deopt = false;
try {
counter++;
return increaseAndReturn15();
return increaseAndThrow42();
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
} finally {
counter++;
return 3 + local;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(6, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn1, tryReturns, doCatch]
f = function f____1_r__c________ () {
var local = 3;
deopt = false;
try {
counter++;
return returnOrThrow(true);
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn1, tryReturns, doCatch, deopt]
f = function f____1_r__c_______d () {
var local = 3;
deopt = true;
try {
counter++;
return returnOrThrow(true);
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn1, tryReturns, doCatch, catchThrows]
f = function f____1_r__c__t_____ () {
var local = 3;
deopt = false;
try {
counter++;
return returnOrThrow(true);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn1, tryReturns, doCatch, catchThrows,
// deopt]
f = function f____1_r__c__t____d () {
var local = 3;
deopt = true;
try {
counter++;
return returnOrThrow(true);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn1, tryReturns, doCatch,
// catchReturns]
f = function f____1_r__cr_______ () {
var local = 3;
deopt = false;
try {
counter++;
return returnOrThrow(true);
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn1, tryReturns, doCatch,
// catchReturns, deopt]
f = function f____1_r__cr______d () {
var local = 3;
deopt = true;
try {
counter++;
return returnOrThrow(true);
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn1, tryThrows, doCatch]
f = function f____1t___c________ () {
var local = 3;
deopt = false;
try {
counter++;
return returnOrThrow(false);
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(5, counter);
// Variant flags: [alternativeFn1, tryThrows, doCatch, deopt]
f = function f____1t___c_______d () {
var local = 3;
deopt = true;
try {
counter++;
return returnOrThrow(false);
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(5, counter);
// Variant flags: [alternativeFn1, tryThrows, doCatch, catchThrows]
f = function f____1t___c__t_____ () {
var local = 3;
deopt = false;
try {
counter++;
return returnOrThrow(false);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn1, tryThrows, doCatch, catchThrows,
// deopt]
f = function f____1t___c__t____d () {
var local = 3;
deopt = true;
try {
counter++;
return returnOrThrow(false);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn1, tryThrows, doCatch, catchReturns]
f = function f____1t___cr_______ () {
var local = 3;
deopt = false;
try {
counter++;
return returnOrThrow(false);
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn1, tryThrows, doCatch, catchReturns,
// deopt]
f = function f____1t___cr______d () {
var local = 3;
deopt = true;
try {
counter++;
return returnOrThrow(false);
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn2, tryReturns, doCatch]
f = function f___2__r__c________ () {
var local = 3;
deopt = false;
try {
counter++;
return invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn2, tryReturns, doCatch, deopt]
f = function f___2__r__c_______d () {
var local = 3;
deopt = true;
try {
counter++;
return invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn2, tryReturns, doCatch, catchThrows]
f = function f___2__r__c__t_____ () {
var local = 3;
deopt = false;
try {
counter++;
return invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn2, tryReturns, doCatch, catchThrows,
// deopt]
f = function f___2__r__c__t____d () {
var local = 3;
deopt = true;
try {
counter++;
return invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn2, tryReturns, doCatch,
// catchWithLocal]
f = function f___2__r__c_l______ () {
var local = 3;
deopt = false;
try {
counter++;
return invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
local += ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn2, tryReturns, doCatch,
// catchWithLocal, deopt]
f = function f___2__r__c_l_____d () {
var local = 3;
deopt = true;
try {
counter++;
return invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
local += ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn2, tryReturns, doCatch,
// catchWithLocal, endReturnLocal]
f = function f___2__r__c_l____l_ () {
var local = 3;
deopt = false;
try {
counter++;
return invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
local += ex;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn2, tryReturns, doCatch,
// catchWithLocal, endReturnLocal, deopt]
f = function f___2__r__c_l____ld () {
var local = 3;
deopt = true;
try {
counter++;
return invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
local += ex;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn2, tryReturns, doCatch,
// catchWithLocal, catchThrows]
f = function f___2__r__c_lt_____ () {
var local = 3;
deopt = false;
try {
counter++;
return invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn2, tryReturns, doCatch,
// catchWithLocal, catchThrows, deopt]
f = function f___2__r__c_lt____d () {
var local = 3;
deopt = true;
try {
counter++;
return invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn2, tryReturns, doCatch,
// catchWithLocal, catchThrows, endReturnLocal]
f = function f___2__r__c_lt___l_ () {
var local = 3;
deopt = false;
try {
counter++;
return invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn2, tryReturns, doCatch,
// catchWithLocal, catchThrows, endReturnLocal, deopt]
f = function f___2__r__c_lt___ld () {
var local = 3;
deopt = true;
try {
counter++;
return invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn2, tryReturns, doCatch,
// catchReturns]
f = function f___2__r__cr_______ () {
var local = 3;
deopt = false;
try {
counter++;
return invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn2, tryReturns, doCatch,
// catchReturns, deopt]
f = function f___2__r__cr______d () {
var local = 3;
deopt = true;
try {
counter++;
return invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn2, tryReturns, doCatch,
// catchReturns, catchWithLocal]
f = function f___2__r__crl______ () {
var local = 3;
deopt = false;
try {
counter++;
return invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
return 2 + local;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn2, tryReturns, doCatch,
// catchReturns, catchWithLocal, deopt]
f = function f___2__r__crl_____d () {
var local = 3;
deopt = true;
try {
counter++;
return invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
return 2 + local;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
}
%NeverOptimizeFunction(runThisShard);
// 94 tests in this shard.
// 94 tests up to here.
runThisShard();
// Shard 2.
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --turbo --no-always-opt
// This test file was generated by tools/gen-inlining-tests.py .
// Global variables
var deopt = undefined; // either true or false
var counter = 0;
function resetState() {
counter = 0;
}
function warmUp(f) {
try {
f();
} catch (ex) {
// ok
}
try {
f();
} catch (ex) {
// ok
}
}
function resetOptAndAssertResultEquals(expected, f) {
warmUp(f);
resetState();
// %DebugPrint(f);
eval("'dont optimize this function itself please, but do optimize f'");
%OptimizeFunctionOnNextCall(f);
assertEquals(expected, f());
}
function resetOptAndAssertThrowsWith(expected, f) {
warmUp(f);
resetState();
// %DebugPrint(f);
eval("'dont optimize this function itself please, but do optimize f'");
%OptimizeFunctionOnNextCall(f);
try {
var result = f();
fail("resetOptAndAssertThrowsWith",
"exception: " + expected,
"result: " + result);
} catch (ex) {
assertEquals(expected, ex);
}
}
function increaseAndReturn15() {
if (deopt) %DeoptimizeFunction(f);
counter++;
return 15;
}
function increaseAndThrow42() {
if (deopt) %DeoptimizeFunction(f);
counter++;
throw 42;
}
function returnOrThrow(doReturn) {
if (doReturn) {
return increaseAndReturn15();
} else {
return increaseAndThrow42();
}
}
// When passed either {increaseAndReturn15} or {increaseAndThrow42}, it acts
// as the other one.
function invertFunctionCall(f) {
var result;
try {
result = f();
} catch (ex) {
return ex - 27;
}
throw result + 27;
}
function increaseAndStore15Constructor() {
if (deopt) %DeoptimizeFunction(f);
++counter;
this.x = 15;
}
function increaseAndThrow42Constructor() {
if (deopt) %DeoptimizeFunction(f);
++counter;
this.x = 42;
throw this.x;
}
var magic = {};
Object.defineProperty(magic, 'prop', {
get: function () {
if (deopt) %DeoptimizeFunction(f);
return 15 + 0 * ++counter;
},
set: function(x) {
// argument should be 37
if (deopt) %DeoptimizeFunction(f);
counter -= 36 - x; // increments counter
throw 42;
}
})
// Generate type feedback.
assertEquals(15, (new increaseAndStore15Constructor()).x);
assertThrowsEquals(function() {
return (new increaseAndThrow42Constructor()).x;
},
42);
function runThisShard() {
// Variant flags: [alternativeFn2, tryReturns, doCatch,
// catchReturns, catchWithLocal, endReturnLocal]
f = function f___2__r__crl____l_ () {
var local = 3;
deopt = false;
try {
counter++;
return invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
return 2 + local;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn2, tryReturns, doCatch,
// catchReturns, catchWithLocal, endReturnLocal, deopt]
f = function f___2__r__crl____ld () {
var local = 3;
deopt = true;
try {
counter++;
return invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
return 2 + local;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn2, tryReturns, tryResultToLocal,
// doCatch]
f = function f___2__r_lc________ () {
var local = 3;
deopt = false;
try {
counter++;
local += invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(4, counter);
// Variant flags: [alternativeFn2, tryReturns, tryResultToLocal,
// doCatch, deopt]
f = function f___2__r_lc_______d () {
var local = 3;
deopt = true;
try {
counter++;
local += invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(4, counter);
// Variant flags: [alternativeFn2, tryReturns, tryResultToLocal,
// doCatch, endReturnLocal]
f = function f___2__r_lc______l_ () {
var local = 3;
deopt = false;
try {
counter++;
local += invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(23, f);
assertEquals(4, counter);
// Variant flags: [alternativeFn2, tryReturns, tryResultToLocal,
// doCatch, endReturnLocal, deopt]
f = function f___2__r_lc______ld () {
var local = 3;
deopt = true;
try {
counter++;
local += invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(23, f);
assertEquals(4, counter);
// Variant flags: [alternativeFn2, tryReturns, tryResultToLocal,
// doCatch, catchThrows]
f = function f___2__r_lc__t_____ () {
var local = 3;
deopt = false;
try {
counter++;
local += invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(4, counter);
// Variant flags: [alternativeFn2, tryReturns, tryResultToLocal,
// doCatch, catchThrows, deopt]
f = function f___2__r_lc__t____d () {
var local = 3;
deopt = true;
try {
counter++;
local += invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(4, counter);
// Variant flags: [alternativeFn2, tryReturns, tryResultToLocal,
// doCatch, catchThrows, endReturnLocal]
f = function f___2__r_lc__t___l_ () {
var local = 3;
deopt = false;
try {
counter++;
local += invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(23, f);
assertEquals(4, counter);
// Variant flags: [alternativeFn2, tryReturns, tryResultToLocal,
// doCatch, catchThrows, endReturnLocal, deopt]
f = function f___2__r_lc__t___ld () {
var local = 3;
deopt = true;
try {
counter++;
local += invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(23, f);
assertEquals(4, counter);
// Variant flags: [alternativeFn2, tryReturns, tryResultToLocal,
// doCatch, catchWithLocal]
f = function f___2__r_lc_l______ () {
var local = 3;
deopt = false;
try {
counter++;
local += invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
local += ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(4, counter);
// Variant flags: [alternativeFn2, tryReturns, tryResultToLocal,
// doCatch, catchWithLocal, deopt]
f = function f___2__r_lc_l_____d () {
var local = 3;
deopt = true;
try {
counter++;
local += invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
local += ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(4, counter);
// Variant flags: [alternativeFn2, tryReturns, tryResultToLocal,
// doCatch, catchWithLocal, endReturnLocal]
f = function f___2__r_lc_l____l_ () {
var local = 3;
deopt = false;
try {
counter++;
local += invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
local += ex;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(23, f);
assertEquals(4, counter);
// Variant flags: [alternativeFn2, tryReturns, tryResultToLocal,
// doCatch, catchWithLocal, endReturnLocal, deopt]
f = function f___2__r_lc_l____ld () {
var local = 3;
deopt = true;
try {
counter++;
local += invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
local += ex;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(23, f);
assertEquals(4, counter);
// Variant flags: [alternativeFn2, tryReturns, tryResultToLocal,
// doCatch, catchWithLocal, catchThrows]
f = function f___2__r_lc_lt_____ () {
var local = 3;
deopt = false;
try {
counter++;
local += invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(4, counter);
// Variant flags: [alternativeFn2, tryReturns, tryResultToLocal,
// doCatch, catchWithLocal, catchThrows, deopt]
f = function f___2__r_lc_lt____d () {
var local = 3;
deopt = true;
try {
counter++;
local += invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(4, counter);
// Variant flags: [alternativeFn2, tryReturns, tryResultToLocal,
// doCatch, catchWithLocal, catchThrows, endReturnLocal]
f = function f___2__r_lc_lt___l_ () {
var local = 3;
deopt = false;
try {
counter++;
local += invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(23, f);
assertEquals(4, counter);
// Variant flags: [alternativeFn2, tryReturns, tryResultToLocal,
// doCatch, catchWithLocal, catchThrows, endReturnLocal, deopt]
f = function f___2__r_lc_lt___ld () {
var local = 3;
deopt = true;
try {
counter++;
local += invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(23, f);
assertEquals(4, counter);
// Variant flags: [alternativeFn2, tryReturns, tryResultToLocal,
// doCatch, catchReturns]
f = function f___2__r_lcr_______ () {
var local = 3;
deopt = false;
try {
counter++;
local += invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(4, counter);
// Variant flags: [alternativeFn2, tryReturns, tryResultToLocal,
// doCatch, catchReturns, deopt]
f = function f___2__r_lcr______d () {
var local = 3;
deopt = true;
try {
counter++;
local += invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(4, counter);
// Variant flags: [alternativeFn2, tryReturns, tryResultToLocal,
// doCatch, catchReturns, endReturnLocal]
f = function f___2__r_lcr_____l_ () {
var local = 3;
deopt = false;
try {
counter++;
local += invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(23, f);
assertEquals(4, counter);
// Variant flags: [alternativeFn2, tryReturns, tryResultToLocal,
// doCatch, catchReturns, endReturnLocal, deopt]
f = function f___2__r_lcr_____ld () {
var local = 3;
deopt = true;
try {
counter++;
local += invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(23, f);
assertEquals(4, counter);
// Variant flags: [alternativeFn2, tryReturns, tryResultToLocal,
// doCatch, catchReturns, catchWithLocal]
f = function f___2__r_lcrl______ () {
var local = 3;
deopt = false;
try {
counter++;
local += invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
return 2 + local;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(4, counter);
// Variant flags: [alternativeFn2, tryReturns, tryResultToLocal,
// doCatch, catchReturns, catchWithLocal, deopt]
f = function f___2__r_lcrl_____d () {
var local = 3;
deopt = true;
try {
counter++;
local += invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
return 2 + local;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(4, counter);
// Variant flags: [alternativeFn2, tryReturns, tryResultToLocal,
// doCatch, catchReturns, catchWithLocal, endReturnLocal]
f = function f___2__r_lcrl____l_ () {
var local = 3;
deopt = false;
try {
counter++;
local += invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
return 2 + local;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(23, f);
assertEquals(4, counter);
// Variant flags: [alternativeFn2, tryReturns, tryResultToLocal,
// doCatch, catchReturns, catchWithLocal, endReturnLocal, deopt]
f = function f___2__r_lcrl____ld () {
var local = 3;
deopt = true;
try {
counter++;
local += invertFunctionCall(increaseAndThrow42);
counter++;
} catch (ex) {
counter++;
return 2 + local;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(23, f);
assertEquals(4, counter);
// Variant flags: [alternativeFn2, tryThrows, doCatch]
f = function f___2_t___c________ () {
var local = 3;
deopt = false;
try {
counter++;
return invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(5, counter);
// Variant flags: [alternativeFn2, tryThrows, doCatch, deopt]
f = function f___2_t___c_______d () {
var local = 3;
deopt = true;
try {
counter++;
return invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(5, counter);
// Variant flags: [alternativeFn2, tryThrows, doCatch, catchThrows]
f = function f___2_t___c__t_____ () {
var local = 3;
deopt = false;
try {
counter++;
return invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn2, tryThrows, doCatch, catchThrows,
// deopt]
f = function f___2_t___c__t____d () {
var local = 3;
deopt = true;
try {
counter++;
return invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn2, tryThrows, doCatch,
// catchWithLocal]
f = function f___2_t___c_l______ () {
var local = 3;
deopt = false;
try {
counter++;
return invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
local += ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(5, counter);
// Variant flags: [alternativeFn2, tryThrows, doCatch,
// catchWithLocal, deopt]
f = function f___2_t___c_l_____d () {
var local = 3;
deopt = true;
try {
counter++;
return invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
local += ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(5, counter);
// Variant flags: [alternativeFn2, tryThrows, doCatch,
// catchWithLocal, endReturnLocal]
f = function f___2_t___c_l____l_ () {
var local = 3;
deopt = false;
try {
counter++;
return invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
local += ex;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(50, f);
assertEquals(5, counter);
// Variant flags: [alternativeFn2, tryThrows, doCatch,
// catchWithLocal, endReturnLocal, deopt]
f = function f___2_t___c_l____ld () {
var local = 3;
deopt = true;
try {
counter++;
return invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
local += ex;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(50, f);
assertEquals(5, counter);
// Variant flags: [alternativeFn2, tryThrows, doCatch,
// catchWithLocal, catchThrows]
f = function f___2_t___c_lt_____ () {
var local = 3;
deopt = false;
try {
counter++;
return invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn2, tryThrows, doCatch,
// catchWithLocal, catchThrows, deopt]
f = function f___2_t___c_lt____d () {
var local = 3;
deopt = true;
try {
counter++;
return invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn2, tryThrows, doCatch,
// catchWithLocal, catchThrows, endReturnLocal]
f = function f___2_t___c_lt___l_ () {
var local = 3;
deopt = false;
try {
counter++;
return invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertThrowsWith(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn2, tryThrows, doCatch,
// catchWithLocal, catchThrows, endReturnLocal, deopt]
f = function f___2_t___c_lt___ld () {
var local = 3;
deopt = true;
try {
counter++;
return invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertThrowsWith(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn2, tryThrows, doCatch, catchReturns]
f = function f___2_t___cr_______ () {
var local = 3;
deopt = false;
try {
counter++;
return invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn2, tryThrows, doCatch, catchReturns,
// deopt]
f = function f___2_t___cr______d () {
var local = 3;
deopt = true;
try {
counter++;
return invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn2, tryThrows, doCatch, catchReturns,
// catchWithLocal]
f = function f___2_t___crl______ () {
var local = 3;
deopt = false;
try {
counter++;
return invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
return 2 + local;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(5, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn2, tryThrows, doCatch, catchReturns,
// catchWithLocal, deopt]
f = function f___2_t___crl_____d () {
var local = 3;
deopt = true;
try {
counter++;
return invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
return 2 + local;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(5, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn2, tryThrows, doCatch, catchReturns,
// catchWithLocal, endReturnLocal]
f = function f___2_t___crl____l_ () {
var local = 3;
deopt = false;
try {
counter++;
return invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
return 2 + local;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(5, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn2, tryThrows, doCatch, catchReturns,
// catchWithLocal, endReturnLocal, deopt]
f = function f___2_t___crl____ld () {
var local = 3;
deopt = true;
try {
counter++;
return invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
return 2 + local;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(5, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn2, tryThrows, tryResultToLocal,
// doCatch]
f = function f___2_t__lc________ () {
var local = 3;
deopt = false;
try {
counter++;
local += invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(5, counter);
// Variant flags: [alternativeFn2, tryThrows, tryResultToLocal,
// doCatch, deopt]
f = function f___2_t__lc_______d () {
var local = 3;
deopt = true;
try {
counter++;
local += invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(5, counter);
// Variant flags: [alternativeFn2, tryThrows, tryResultToLocal,
// doCatch, endReturnLocal]
f = function f___2_t__lc______l_ () {
var local = 3;
deopt = false;
try {
counter++;
local += invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(8, f);
assertEquals(5, counter);
// Variant flags: [alternativeFn2, tryThrows, tryResultToLocal,
// doCatch, endReturnLocal, deopt]
f = function f___2_t__lc______ld () {
var local = 3;
deopt = true;
try {
counter++;
local += invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(8, f);
assertEquals(5, counter);
// Variant flags: [alternativeFn2, tryThrows, tryResultToLocal,
// doCatch, catchThrows]
f = function f___2_t__lc__t_____ () {
var local = 3;
deopt = false;
try {
counter++;
local += invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn2, tryThrows, tryResultToLocal,
// doCatch, catchThrows, deopt]
f = function f___2_t__lc__t____d () {
var local = 3;
deopt = true;
try {
counter++;
local += invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn2, tryThrows, tryResultToLocal,
// doCatch, catchThrows, endReturnLocal]
f = function f___2_t__lc__t___l_ () {
var local = 3;
deopt = false;
try {
counter++;
local += invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertThrowsWith(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn2, tryThrows, tryResultToLocal,
// doCatch, catchThrows, endReturnLocal, deopt]
f = function f___2_t__lc__t___ld () {
var local = 3;
deopt = true;
try {
counter++;
local += invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertThrowsWith(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn2, tryThrows, tryResultToLocal,
// doCatch, catchWithLocal]
f = function f___2_t__lc_l______ () {
var local = 3;
deopt = false;
try {
counter++;
local += invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
local += ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(5, counter);
// Variant flags: [alternativeFn2, tryThrows, tryResultToLocal,
// doCatch, catchWithLocal, deopt]
f = function f___2_t__lc_l_____d () {
var local = 3;
deopt = true;
try {
counter++;
local += invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
local += ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(5, counter);
// Variant flags: [alternativeFn2, tryThrows, tryResultToLocal,
// doCatch, catchWithLocal, endReturnLocal]
f = function f___2_t__lc_l____l_ () {
var local = 3;
deopt = false;
try {
counter++;
local += invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
local += ex;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(50, f);
assertEquals(5, counter);
// Variant flags: [alternativeFn2, tryThrows, tryResultToLocal,
// doCatch, catchWithLocal, endReturnLocal, deopt]
f = function f___2_t__lc_l____ld () {
var local = 3;
deopt = true;
try {
counter++;
local += invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
local += ex;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(50, f);
assertEquals(5, counter);
// Variant flags: [alternativeFn2, tryThrows, tryResultToLocal,
// doCatch, catchWithLocal, catchThrows]
f = function f___2_t__lc_lt_____ () {
var local = 3;
deopt = false;
try {
counter++;
local += invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn2, tryThrows, tryResultToLocal,
// doCatch, catchWithLocal, catchThrows, deopt]
f = function f___2_t__lc_lt____d () {
var local = 3;
deopt = true;
try {
counter++;
local += invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn2, tryThrows, tryResultToLocal,
// doCatch, catchWithLocal, catchThrows, endReturnLocal]
f = function f___2_t__lc_lt___l_ () {
var local = 3;
deopt = false;
try {
counter++;
local += invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertThrowsWith(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn2, tryThrows, tryResultToLocal,
// doCatch, catchWithLocal, catchThrows, endReturnLocal, deopt]
f = function f___2_t__lc_lt___ld () {
var local = 3;
deopt = true;
try {
counter++;
local += invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertThrowsWith(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn2, tryThrows, tryResultToLocal,
// doCatch, catchReturns]
f = function f___2_t__lcr_______ () {
var local = 3;
deopt = false;
try {
counter++;
local += invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn2, tryThrows, tryResultToLocal,
// doCatch, catchReturns, deopt]
f = function f___2_t__lcr______d () {
var local = 3;
deopt = true;
try {
counter++;
local += invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn2, tryThrows, tryResultToLocal,
// doCatch, catchReturns, endReturnLocal]
f = function f___2_t__lcr_____l_ () {
var local = 3;
deopt = false;
try {
counter++;
local += invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn2, tryThrows, tryResultToLocal,
// doCatch, catchReturns, endReturnLocal, deopt]
f = function f___2_t__lcr_____ld () {
var local = 3;
deopt = true;
try {
counter++;
local += invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn2, tryThrows, tryResultToLocal,
// doCatch, catchReturns, catchWithLocal]
f = function f___2_t__lcrl______ () {
var local = 3;
deopt = false;
try {
counter++;
local += invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
return 2 + local;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(5, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn2, tryThrows, tryResultToLocal,
// doCatch, catchReturns, catchWithLocal, deopt]
f = function f___2_t__lcrl_____d () {
var local = 3;
deopt = true;
try {
counter++;
local += invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
return 2 + local;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(5, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn2, tryThrows, tryResultToLocal,
// doCatch, catchReturns, catchWithLocal, endReturnLocal]
f = function f___2_t__lcrl____l_ () {
var local = 3;
deopt = false;
try {
counter++;
local += invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
return 2 + local;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(5, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn2, tryThrows, tryResultToLocal,
// doCatch, catchReturns, catchWithLocal, endReturnLocal, deopt]
f = function f___2_t__lcrl____ld () {
var local = 3;
deopt = true;
try {
counter++;
local += invertFunctionCall(increaseAndReturn15);
counter++;
} catch (ex) {
counter++;
return 2 + local;
counter++;
}
counter++;
return 5 + local;
}
resetOptAndAssertResultEquals(5, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn3, tryReturns, doCatch]
f = function f__3___r__c________ () {
var local = 3;
deopt = false;
try {
counter++;
return (new increaseAndStore15Constructor()).x;
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn3, tryReturns, doCatch, deopt]
f = function f__3___r__c_______d () {
var local = 3;
deopt = true;
try {
counter++;
return (new increaseAndStore15Constructor()).x;
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn3, tryReturns, doCatch, catchThrows]
f = function f__3___r__c__t_____ () {
var local = 3;
deopt = false;
try {
counter++;
return (new increaseAndStore15Constructor()).x;
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn3, tryReturns, doCatch, catchThrows,
// deopt]
f = function f__3___r__c__t____d () {
var local = 3;
deopt = true;
try {
counter++;
return (new increaseAndStore15Constructor()).x;
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn3, tryReturns, doCatch,
// catchReturns]
f = function f__3___r__cr_______ () {
var local = 3;
deopt = false;
try {
counter++;
return (new increaseAndStore15Constructor()).x;
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn3, tryReturns, doCatch,
// catchReturns, deopt]
f = function f__3___r__cr______d () {
var local = 3;
deopt = true;
try {
counter++;
return (new increaseAndStore15Constructor()).x;
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn3, tryThrows, doCatch]
f = function f__3__t___c________ () {
var local = 3;
deopt = false;
try {
counter++;
return (new increaseAndThrow42Constructor()).x;
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(5, counter);
// Variant flags: [alternativeFn3, tryThrows, doCatch, deopt]
f = function f__3__t___c_______d () {
var local = 3;
deopt = true;
try {
counter++;
return (new increaseAndThrow42Constructor()).x;
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(5, counter);
// Variant flags: [alternativeFn3, tryThrows, doCatch, catchThrows]
f = function f__3__t___c__t_____ () {
var local = 3;
deopt = false;
try {
counter++;
return (new increaseAndThrow42Constructor()).x;
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn3, tryThrows, doCatch, catchThrows,
// deopt]
f = function f__3__t___c__t____d () {
var local = 3;
deopt = true;
try {
counter++;
return (new increaseAndThrow42Constructor()).x;
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn3, tryThrows, doCatch, catchReturns]
f = function f__3__t___cr_______ () {
var local = 3;
deopt = false;
try {
counter++;
return (new increaseAndThrow42Constructor()).x;
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn3, tryThrows, doCatch, catchReturns,
// deopt]
f = function f__3__t___cr______d () {
var local = 3;
deopt = true;
try {
counter++;
return (new increaseAndThrow42Constructor()).x;
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn4, tryReturns, doCatch]
f = function f_4____r__c________ () {
var local = 3;
deopt = false;
try {
counter++;
return magic.prop /* returns 15 */;
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn4, tryReturns, doCatch, deopt]
f = function f_4____r__c_______d () {
var local = 3;
deopt = true;
try {
counter++;
return magic.prop /* returns 15 */;
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn4, tryReturns, doCatch, catchThrows]
f = function f_4____r__c__t_____ () {
var local = 3;
deopt = false;
try {
counter++;
return magic.prop /* returns 15 */;
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn4, tryReturns, doCatch, catchThrows,
// deopt]
f = function f_4____r__c__t____d () {
var local = 3;
deopt = true;
try {
counter++;
return magic.prop /* returns 15 */;
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn4, tryReturns, doCatch,
// catchReturns]
f = function f_4____r__cr_______ () {
var local = 3;
deopt = false;
try {
counter++;
return magic.prop /* returns 15 */;
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn4, tryReturns, doCatch,
// catchReturns, deopt]
f = function f_4____r__cr______d () {
var local = 3;
deopt = true;
try {
counter++;
return magic.prop /* returns 15 */;
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(15, f);
assertEquals(2, counter);
// Variant flags: [alternativeFn4, tryThrows, doCatch]
f = function f_4___t___c________ () {
var local = 3;
deopt = false;
try {
counter++;
return (magic.prop = 37 /* throws 42 */);
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(5, counter);
// Variant flags: [alternativeFn4, tryThrows, doCatch, deopt]
f = function f_4___t___c_______d () {
var local = 3;
deopt = true;
try {
counter++;
return (magic.prop = 37 /* throws 42 */);
counter++;
} catch (ex) {
counter++;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(undefined, f);
assertEquals(5, counter);
// Variant flags: [alternativeFn4, tryThrows, doCatch, catchThrows]
f = function f_4___t___c__t_____ () {
var local = 3;
deopt = false;
try {
counter++;
return (magic.prop = 37 /* throws 42 */);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn4, tryThrows, doCatch, catchThrows,
// deopt]
f = function f_4___t___c__t____d () {
var local = 3;
deopt = true;
try {
counter++;
return (magic.prop = 37 /* throws 42 */);
counter++;
} catch (ex) {
counter++;
throw 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertThrowsWith(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn4, tryThrows, doCatch, catchReturns]
f = function f_4___t___cr_______ () {
var local = 3;
deopt = false;
try {
counter++;
return (magic.prop = 37 /* throws 42 */);
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(44, f);
assertEquals(3, counter);
// Variant flags: [alternativeFn4, tryThrows, doCatch, catchReturns,
// deopt]
f = function f_4___t___cr______d () {
var local = 3;
deopt = true;
try {
counter++;
return (magic.prop = 37 /* throws 42 */);
counter++;
} catch (ex) {
counter++;
return 2 + ex;
counter++;
}
counter++;
}
resetOptAndAssertResultEquals(44, f);
assertEquals(3, counter);
}
%NeverOptimizeFunction(runThisShard);
// 92 tests in this shard.
// 186 tests up to here.
runThisShard();
#!/usr/bin/env python3
# Copyright 2016 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from collections import namedtuple
import textwrap
import sys
SHARD_FILENAME_TEMPLATE = "test/mjsunit/compiler/inline-exception-{shard}.js"
# Generates 2 files. Found by trial and error.
SHARD_SIZE = 94
PREAMBLE = """
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax --turbo --no-always-opt
// This test file was generated by tools/gen-inlining-tests.py .
// Global variables
var deopt = undefined; // either true or false
var counter = 0;
function resetState() {
counter = 0;
}
function warmUp(f) {
try {
f();
} catch (ex) {
// ok
}
try {
f();
} catch (ex) {
// ok
}
}
function resetOptAndAssertResultEquals(expected, f) {
warmUp(f);
resetState();
// %DebugPrint(f);
eval("'dont optimize this function itself please, but do optimize f'");
%OptimizeFunctionOnNextCall(f);
assertEquals(expected, f());
}
function resetOptAndAssertThrowsWith(expected, f) {
warmUp(f);
resetState();
// %DebugPrint(f);
eval("'dont optimize this function itself please, but do optimize f'");
%OptimizeFunctionOnNextCall(f);
try {
var result = f();
fail("resetOptAndAssertThrowsWith",
"exception: " + expected,
"result: " + result);
} catch (ex) {
assertEquals(expected, ex);
}
}
function increaseAndReturn15() {
if (deopt) %DeoptimizeFunction(f);
counter++;
return 15;
}
function increaseAndThrow42() {
if (deopt) %DeoptimizeFunction(f);
counter++;
throw 42;
}
function returnOrThrow(doReturn) {
if (doReturn) {
return increaseAndReturn15();
} else {
return increaseAndThrow42();
}
}
// When passed either {increaseAndReturn15} or {increaseAndThrow42}, it acts
// as the other one.
function invertFunctionCall(f) {
var result;
try {
result = f();
} catch (ex) {
return ex - 27;
}
throw result + 27;
}
function increaseAndStore15Constructor() {
if (deopt) %DeoptimizeFunction(f);
++counter;
this.x = 15;
}
function increaseAndThrow42Constructor() {
if (deopt) %DeoptimizeFunction(f);
++counter;
this.x = 42;
throw this.x;
}
var magic = {};
Object.defineProperty(magic, 'prop', {
get: function () {
if (deopt) %DeoptimizeFunction(f);
return 15 + 0 * ++counter;
},
set: function(x) {
// argument should be 37
if (deopt) %DeoptimizeFunction(f);
counter -= 36 - x; // increments counter
throw 42;
}
})
// Generate type feedback.
assertEquals(15, (new increaseAndStore15Constructor()).x);
assertThrowsEquals(function() {
return (new increaseAndThrow42Constructor()).x;
},
42);
function runThisShard() {
""".strip()
def booltuples(n):
"""booltuples(2) yields 4 tuples: (False, False), (False, True),
(True, False), (True, True)."""
assert isinstance(n, int)
if n <= 0:
yield ()
else:
for initial in booltuples(n-1):
yield initial + (False,)
yield initial + (True,)
FLAGLETTERS="4321trflcrltfrtld"
def fnname(flags):
assert len(FLAGLETTERS) == len(flags)
return "f_" + ''.join(
FLAGLETTERS[i] if b else '_'
for (i, b) in enumerate(flags))
NUM_TESTS_PRINTED = 0
NUM_TESTS_IN_SHARD = 0
def printtest(flags):
"""Print a test case. Takes a couple of boolean flags, on which the
printed Javascript code depends."""
assert all(isinstance(flag, bool) for flag in flags)
# The alternative flags are in reverse order so that if we take all possible
# tuples, ordered lexicographically from false to true, we get first the
# default, then alternative 1, then 2, etc.
(
alternativeFn4, # use alternative #4 for returning/throwing.
alternativeFn3, # use alternative #3 for returning/throwing.
alternativeFn2, # use alternative #2 for returning/throwing.
alternativeFn1, # use alternative #1 for returning/throwing.
tryThrows, # in try block, call throwing function
tryReturns, # in try block, call returning function
tryFirstReturns, # in try block, returning goes before throwing
tryResultToLocal, # in try block, result goes to local variable
doCatch, # include catch block
catchReturns, # in catch block, return
catchWithLocal, # in catch block, modify or return the local variable
catchThrows, # in catch block, throw
doFinally, # include finally block
finallyReturns, # in finally block, return local variable
finallyThrows, # in finally block, throw
endReturnLocal, # at very end, return variable local
deopt, # deopt inside inlined function
) = flags
# BASIC RULES
# Only one alternative can be applied at any time.
if alternativeFn1 + alternativeFn2 + alternativeFn3 + alternativeFn4 > 1:
return
# In try, return or throw, or both.
if not (tryReturns or tryThrows): return
# Either doCatch or doFinally.
if not doCatch and not doFinally: return
# Catch flags only make sense when catching
if not doCatch and (catchReturns or catchWithLocal or catchThrows):
return
# Finally flags only make sense when finallying
if not doFinally and (finallyReturns or finallyThrows):
return
# tryFirstReturns is only relevant when both tryReturns and tryThrows are
# true.
if tryFirstReturns and not (tryReturns and tryThrows): return
# From the try and finally block, we can return or throw, but not both.
if catchReturns and catchThrows: return
if finallyReturns and finallyThrows: return
# If at the end we return the local, we need to have touched it.
if endReturnLocal and not (tryResultToLocal or catchWithLocal): return
# PRUNING
anyAlternative = any([alternativeFn1, alternativeFn2, alternativeFn3,
alternativeFn4])
rareAlternative = any([alternativeFn1, alternativeFn3, alternativeFn4])
# If try returns and throws, then don't catchWithLocal, endReturnLocal, or
# deopt, or do any alternative.
if (tryReturns and tryThrows and
(catchWithLocal or endReturnLocal or deopt or anyAlternative)):
return
# We don't do any alternative if we do a finally.
if doFinally and anyAlternative: return
# We only use the local variable if we do alternative #2.
if ((tryResultToLocal or catchWithLocal or endReturnLocal) and
not alternativeFn2):
return
# We don't need to test deopting into a finally.
if doFinally and deopt: return
# Flag check succeeded.
trueFlagNames = [name for (name, value) in flags._asdict().items() if value]
flagsMsgLine = " // Variant flags: [{}]".format(', '.join(trueFlagNames))
write(textwrap.fill(flagsMsgLine, subsequent_indent=' // '))
write("")
if not anyAlternative:
fragments = {
'increaseAndReturn15': 'increaseAndReturn15()',
'increaseAndThrow42': 'increaseAndThrow42()',
}
elif alternativeFn1:
fragments = {
'increaseAndReturn15': 'returnOrThrow(true)',
'increaseAndThrow42': 'returnOrThrow(false)',
}
elif alternativeFn2:
fragments = {
'increaseAndReturn15': 'invertFunctionCall(increaseAndThrow42)',
'increaseAndThrow42': 'invertFunctionCall(increaseAndReturn15)',
}
elif alternativeFn3:
fragments = {
'increaseAndReturn15': '(new increaseAndStore15Constructor()).x',
'increaseAndThrow42': '(new increaseAndThrow42Constructor()).x',
}
else:
assert alternativeFn4
fragments = {
'increaseAndReturn15': 'magic.prop /* returns 15 */',
'increaseAndThrow42': '(magic.prop = 37 /* throws 42 */)',
}
# As we print code, we also maintain what the result should be. Variable
# {result} can be one of three things:
#
# - None, indicating returning JS null
# - ("return", n) with n an integer
# - ("throw", n), with n an integer
result = None
# We also maintain what the counter should be at the end.
# The counter is reset just before f is called.
counter = 0
write( " f = function {} () {{".format(fnname(flags)))
write( " var local = 3;")
write( " deopt = {};".format("true" if deopt else "false"))
local = 3
write( " try {")
write( " counter++;")
counter += 1
resultTo = "local +=" if tryResultToLocal else "return"
if tryReturns and not (tryThrows and not tryFirstReturns):
write( " {} {increaseAndReturn15};".format(resultTo, **fragments))
if result == None:
counter += 1
if tryResultToLocal:
local += 15
else:
result = ("return", 15)
if tryThrows:
write( " {} {increaseAndThrow42};".format(resultTo, **fragments))
if result == None:
counter += 1
result = ("throw", 42)
if tryReturns and tryThrows and not tryFirstReturns:
write( " {} {increaseAndReturn15};".format(resultTo, **fragments))
if result == None:
counter += 1
if tryResultToLocal:
local += 15
else:
result = ("return", 15)
write( " counter++;")
if result == None:
counter += 1
if doCatch:
write( " } catch (ex) {")
write( " counter++;")
if isinstance(result, tuple) and result[0] == 'throw':
counter += 1
if catchThrows:
write(" throw 2 + ex;")
if isinstance(result, tuple) and result[0] == "throw":
result = ('throw', 2 + result[1])
elif catchReturns and catchWithLocal:
write(" return 2 + local;")
if isinstance(result, tuple) and result[0] == "throw":
result = ('return', 2 + local)
elif catchReturns and not catchWithLocal:
write(" return 2 + ex;");
if isinstance(result, tuple) and result[0] == "throw":
result = ('return', 2 + result[1])
elif catchWithLocal:
write(" local += ex;");
if isinstance(result, tuple) and result[0] == "throw":
local += result[1]
result = None
counter += 1
else:
if isinstance(result, tuple) and result[0] == "throw":
result = None
counter += 1
write( " counter++;")
if doFinally:
write( " } finally {")
write( " counter++;")
counter += 1
if finallyThrows:
write(" throw 25;")
result = ('throw', 25)
elif finallyReturns:
write(" return 3 + local;")
result = ('return', 3 + local)
elif not finallyReturns and not finallyThrows:
write(" local += 2;")
local += 2
counter += 1
else: assert False # unreachable
write( " counter++;")
write( " }")
write( " counter++;")
if result == None:
counter += 1
if endReturnLocal:
write( " return 5 + local;")
if result == None:
result = ('return', 5 + local)
write( " }")
if result == None:
write( " resetOptAndAssertResultEquals(undefined, f);")
else:
tag, value = result
if tag == "return":
write( " resetOptAndAssertResultEquals({}, f);".format(value))
else:
assert tag == "throw"
write( " resetOptAndAssertThrowsWith({}, f);".format(value))
write( " assertEquals({}, counter);".format(counter))
write( "")
global NUM_TESTS_PRINTED, NUM_TESTS_IN_SHARD
NUM_TESTS_PRINTED += 1
NUM_TESTS_IN_SHARD += 1
FILE = None # to be initialised to an open file
SHARD_NUM = 1
def write(*args):
return print(*args, file=FILE)
def rotateshard():
global FILE, NUM_TESTS_IN_SHARD, SHARD_SIZE
if MODE != 'shard':
return
if FILE != None and NUM_TESTS_IN_SHARD < SHARD_SIZE:
return
if FILE != None:
finishshard()
assert FILE == None
FILE = open(SHARD_FILENAME_TEMPLATE.format(shard=SHARD_NUM), 'w')
write_shard_header()
NUM_TESTS_IN_SHARD = 0
def finishshard():
global FILE, SHARD_NUM, MODE
assert FILE
write_shard_footer()
if MODE == 'shard':
print("Wrote shard {}.".format(SHARD_NUM))
FILE.close()
FILE = None
SHARD_NUM += 1
def write_shard_header():
if MODE == 'shard':
write("// Shard {}.".format(SHARD_NUM))
write("")
write(PREAMBLE)
write("")
def write_shard_footer():
write("}")
write("%NeverOptimizeFunction(runThisShard);")
write("")
write("// {} tests in this shard.".format(NUM_TESTS_IN_SHARD))
write("// {} tests up to here.".format(NUM_TESTS_PRINTED))
write("")
write("runThisShard();")
flagtuple = namedtuple('flagtuple', (
"alternativeFn4",
"alternativeFn3",
"alternativeFn2",
"alternativeFn1",
"tryThrows",
"tryReturns",
"tryFirstReturns",
"tryResultToLocal",
"doCatch",
"catchReturns",
"catchWithLocal",
"catchThrows",
"doFinally",
"finallyReturns",
"finallyThrows",
"endReturnLocal",
"deopt"
))
emptyflags = flagtuple(*((False,) * len(flagtuple._fields)))
f1 = emptyflags._replace(tryReturns=True, doCatch=True)
# You can test function printtest with f1.
allFlagCombinations = [
flagtuple(*bools)
for bools in booltuples(len(flagtuple._fields))
]
if __name__ == '__main__':
global MODE
if sys.argv[1:] == []:
MODE = 'stdout'
print("// Printing all shards together to stdout.")
print("")
write_shard_header()
FILE = sys.stdout
elif sys.argv[1:] == ['--shard-and-overwrite']:
MODE = 'shard'
else:
print("Usage:")
print("")
print(" python {}".format(sys.argv[0]))
print(" print all tests to standard output")
print(" python {} --shard-and-overwrite".format(sys.argv[0]))
print(" print all tests to {}".format(SHARD_FILENAME_TEMPLATE))
print("")
print(sys.argv[1:])
print("")
sys.exit(1)
rotateshard()
for flags in allFlagCombinations:
printtest(flags)
rotateshard()
finishshard()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment