Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 1bc9bbc

Browse files
peter-ahe-googlecommit-bot@chromium.org
authored andcommitted
Remove StaticInvocationJudgment
Change-Id: I52da9574e99307bd7afad440100491ac5264f1a0 Reviewed-on: https://dart-review.googlesource.com/c/80602 Commit-Queue: Peter von der Ahé <ahe@google.com> Reviewed-by: Kevin Millikin <kmillikin@google.com>
1 parent 1610356 commit 1bc9bbc

5 files changed

Lines changed: 14 additions & 29 deletions

File tree

pkg/front_end/lib/src/fasta/kernel/body_builder.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3068,7 +3068,7 @@ abstract class BodyBuilder extends ScopeListener<JumpTarget>
30683068
library.checkBoundsInFactoryInvocation(node, typeEnvironment);
30693069
return node;
30703070
} else {
3071-
StaticInvocation node = new StaticInvocationJudgment(
3071+
StaticInvocation node = new StaticInvocation(
30723072
target, forest.castArguments(arguments),
30733073
isConst: isConst)
30743074
..fileOffset = charOffset;

pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,21 +1060,18 @@ class InferenceVistor extends BodyVisitor1<void, DartType> {
10601060
inferrer.storeInferredType(node, type);
10611061
}
10621062

1063-
void visitStaticInvocationJudgment(
1064-
StaticInvocationJudgment node, DartType typeContext) {
1063+
@override
1064+
void visitStaticInvocation(StaticInvocation node, DartType typeContext) {
10651065
FunctionType calleeType = node.target != null
10661066
? node.target.function.functionType
10671067
: new FunctionType([], const DynamicType());
10681068
bool hadExplicitTypeArguments =
1069-
getExplicitTypeArguments(node.argumentJudgments) != null;
1069+
getExplicitTypeArguments(node.arguments) != null;
10701070
var inferenceResult = inferrer.inferInvocation(typeContext, node.fileOffset,
1071-
calleeType, calleeType.returnType, node.argumentJudgments);
1072-
node.inferredType = inferenceResult.type;
1073-
KernelLibraryBuilder inferrerLibrary = inferrer.library;
1074-
if (!hadExplicitTypeArguments &&
1075-
node.target != null &&
1076-
inferrerLibrary is KernelLibraryBuilder) {
1077-
inferrerLibrary.checkBoundsInStaticInvocation(
1071+
calleeType, calleeType.returnType, node.arguments);
1072+
inferrer.storeInferredType(node, inferenceResult.type);
1073+
if (!hadExplicitTypeArguments && node.target != null) {
1074+
inferrer.library?.checkBoundsInStaticInvocation(
10781075
node, inferrer.typeSchemaEnvironment,
10791076
inferred: true);
10801077
}

pkg/front_end/lib/src/fasta/kernel/inferred_type_visitor.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,4 +142,10 @@ class InferredTypeVisitor
142142
DartType visitStaticGet(StaticGet node, TypeInferrerImpl inferrer) {
143143
return inferrer.readInferredType(node);
144144
}
145+
146+
@override
147+
DartType visitStaticInvocation(
148+
StaticInvocation node, TypeInferrerImpl inferrer) {
149+
return inferrer.readInferredType(node);
150+
}
145151
}

pkg/front_end/lib/src/fasta/kernel/kernel_ast_api.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ export 'kernel_shadow_ast.dart'
115115
ReturnJudgment,
116116
ShadowLargeIntLiteral,
117117
StaticAssignmentJudgment,
118-
StaticInvocationJudgment,
119118
SuperInitializerJudgment,
120119
SuperMethodInvocationJudgment,
121120
SuperPropertyGetJudgment,

pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,23 +1329,6 @@ class StaticAssignmentJudgment extends ComplexAssignmentJudgment {
13291329
}
13301330
}
13311331

1332-
/// Shadow object for [StaticInvocation].
1333-
class StaticInvocationJudgment extends StaticInvocation
1334-
implements ExpressionJudgment {
1335-
DartType inferredType;
1336-
1337-
StaticInvocationJudgment(Procedure target, ArgumentsJudgment arguments,
1338-
{bool isConst: false})
1339-
: super(target, arguments, isConst: isConst);
1340-
1341-
ArgumentsJudgment get argumentJudgments => arguments;
1342-
1343-
@override
1344-
void acceptInference(InferenceVistor visitor, DartType typeContext) {
1345-
return visitor.visitStaticInvocationJudgment(this, typeContext);
1346-
}
1347-
}
1348-
13491332
/// Concrete shadow object representing a super initializer in kernel form.
13501333
class SuperInitializerJudgment extends SuperInitializer
13511334
implements InitializerJudgment {

0 commit comments

Comments
 (0)