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

Unified Diff: pkg/compiler/lib/src/resolution/members.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/resolution/members.dart
diff --git a/pkg/compiler/lib/src/resolution/members.dart b/pkg/compiler/lib/src/resolution/members.dart
index 9fb5495a263d791b6bbe0190fd8af48b046d14ed..a3c33ba4c1d9319bcc44ca233d53930cee21afec 100644
--- a/pkg/compiler/lib/src/resolution/members.dart
+++ b/pkg/compiler/lib/src/resolution/members.dart
@@ -3886,11 +3886,14 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
if (!isInvalid) {
// [constructor] might be the implementation element
// and only declaration elements may be registered.
- registry.registerStaticUse(new StaticUse.constructorInvoke(
- constructor.declaration, callStructure));
// TODO(johniwinther): Avoid registration of `type` in face of redirecting
// factory constructors.
- registry.registerTypeUse(new TypeUse.instantiation(type));
+ registry.registerStaticUse(
+ node.isConst
+ ? new StaticUse.constConstructorInvoke(
Harry Terkelsen 2016/10/07 15:53:21 this is the output of dartfmt? looks weird
Johnni Winther 2016/10/10 09:58:12 No. Forgot to dartfmt this CL.
+ constructor.declaration, callStructure, type)
+ : new StaticUse.typedConstructorInvoke(
+ constructor.declaration, callStructure, type));
InterfaceType interfaceType = type;
if (interfaceType.typeArguments.any((DartType type) => !type.isDynamic)) {
registry.registerFeature(Feature.TYPE_VARIABLE_BOUNDS_CHECK);

Powered by Google App Engine
This is Rietveld 408576698