Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Unified Diff: pkg/compiler/lib/src/ssa/kernel_impact.dart

Issue 2392943003: Handle const constructor invocation in kernel_impact. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/ssa/kernel_impact.dart
diff --git a/pkg/compiler/lib/src/ssa/kernel_impact.dart b/pkg/compiler/lib/src/ssa/kernel_impact.dart
index ed0516763a300dba1a5bab37077c4d496bfc0ffb..4149291e819c35b3db4d9ef124976c027a06b6b6 100644
--- a/pkg/compiler/lib/src/ssa/kernel_impact.dart
+++ b/pkg/compiler/lib/src/ssa/kernel_impact.dart
@@ -221,13 +221,12 @@ class KernelImpactBuilder extends ir.Visitor {
void handleNew(ir.InvocationExpression node, ir.Member target) {
_visitArguments(node.arguments);
Element element = astAdapter.getElement(target).declaration;
- impactBuilder.registerStaticUse(new StaticUse.constructorInvoke(
- element, astAdapter.getCallStructure(node.arguments)));
ClassElement cls = astAdapter.getElement(target.enclosingClass);
List<DartType> typeArguments =
astAdapter.getDartTypes(node.arguments.types);
- impactBuilder.registerTypeUse(
- new TypeUse.instantiation(new InterfaceType(cls, typeArguments)));
+ InterfaceType type = new InterfaceType(cls, typeArguments);
+ impactBuilder.registerStaticUse(new StaticUse.typedConstructorInvoke(
+ element, astAdapter.getCallStructure(node.arguments), type));
if (typeArguments.any((DartType type) => !type.isDynamic)) {
impactBuilder.registerFeature(Feature.TYPE_VARIABLE_BOUNDS_CHECK);
}

Powered by Google App Engine
This is Rietveld 408576698