mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
* Properly cache shared flow node types * Add test Co-authored-by: Anders Hejlsberg <andersh@microsoft.com>
This commit is contained in:
co-authored by
Anders Hejlsberg
parent
1e9518cb35
commit
3c736255e4
@@ -21702,6 +21702,7 @@ namespace ts {
|
||||
return errorType;
|
||||
}
|
||||
flowDepth++;
|
||||
let sharedFlow: FlowNode | undefined;
|
||||
while (true) {
|
||||
const flags = flow.flags;
|
||||
if (flags & FlowFlags.Shared) {
|
||||
@@ -21714,6 +21715,7 @@ namespace ts {
|
||||
return sharedFlowTypes[i];
|
||||
}
|
||||
}
|
||||
sharedFlow = flow;
|
||||
}
|
||||
let type: FlowType | undefined;
|
||||
if (flags & FlowFlags.Assignment) {
|
||||
@@ -21777,9 +21779,9 @@ namespace ts {
|
||||
// simply return the non-auto declared type to reduce follow-on errors.
|
||||
type = convertAutoToAny(declaredType);
|
||||
}
|
||||
if (flags & FlowFlags.Shared) {
|
||||
if (sharedFlow) {
|
||||
// Record visited node and the associated type in the cache.
|
||||
sharedFlowNodes[sharedFlowCount] = flow;
|
||||
sharedFlowNodes[sharedFlowCount] = sharedFlow;
|
||||
sharedFlowTypes[sharedFlowCount] = type;
|
||||
sharedFlowCount++;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
//// [controlFlowManyCallExpressionStatementsPerf.ts]
|
||||
function test(x: boolean): boolean { return x; }
|
||||
|
||||
let state = true;
|
||||
|
||||
if (state) {
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
}
|
||||
|
||||
|
||||
//// [controlFlowManyCallExpressionStatementsPerf.js]
|
||||
"use strict";
|
||||
function test(x) { return x; }
|
||||
var state = true;
|
||||
if (state) {
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
test(state && state);
|
||||
}
|
||||
@@ -0,0 +1,293 @@
|
||||
=== tests/cases/compiler/controlFlowManyCallExpressionStatementsPerf.ts ===
|
||||
function test(x: boolean): boolean { return x; }
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>x : Symbol(x, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 14))
|
||||
>x : Symbol(x, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 14))
|
||||
|
||||
let state = true;
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
if (state) {
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
|
||||
test(state as any && state);
|
||||
>test : Symbol(test, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 0, 0))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
>state : Symbol(state, Decl(controlFlowManyCallExpressionStatementsPerf.ts, 2, 3))
|
||||
}
|
||||
|
||||
@@ -0,0 +1,462 @@
|
||||
=== tests/cases/compiler/controlFlowManyCallExpressionStatementsPerf.ts ===
|
||||
function test(x: boolean): boolean { return x; }
|
||||
>test : (x: boolean) => boolean
|
||||
>x : boolean
|
||||
>x : boolean
|
||||
|
||||
let state = true;
|
||||
>state : boolean
|
||||
>true : true
|
||||
|
||||
if (state) {
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
|
||||
test(state as any && state);
|
||||
>test(state as any && state) : boolean
|
||||
>test : (x: boolean) => boolean
|
||||
>state as any && state : any
|
||||
>state as any : any
|
||||
>state : true
|
||||
>state : true
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
// @strict: true
|
||||
|
||||
function test(x: boolean): boolean { return x; }
|
||||
|
||||
let state = true;
|
||||
|
||||
if (state) {
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
test(state as any && state);
|
||||
}
|
||||
Reference in New Issue
Block a user