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

Unified Diff: pkg/compiler/lib/src/resolution/members.dart

Issue 2392943003: Handle const constructor invocation in kernel_impact. (Closed)
Patch Set: Updated cf. comments. 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..fa3ada58f415b2261198db7e48c06fa34fb2020e 100644
--- a/pkg/compiler/lib/src/resolution/members.dart
+++ b/pkg/compiler/lib/src/resolution/members.dart
@@ -3886,11 +3886,13 @@ 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(
+ 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);
« no previous file with comments | « pkg/compiler/lib/src/resolution/constructors.dart ('k') | pkg/compiler/lib/src/serialization/impact_serialization.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698