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

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

Issue 2396173003: Handle constructor declarations. (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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/kernel_impact.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a3c33ba4c1d9319bcc44ca233d53930cee21afec..838224db374c6dd84f8139f42e49caa4da6f4e2c 100644
--- a/pkg/compiler/lib/src/resolution/members.dart
+++ b/pkg/compiler/lib/src/resolution/members.dart
@@ -3445,12 +3445,13 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
registry.setSelector(node, setterSelector);
registry.setOperatorSelectorInComplexSendSet(node, operatorSelector);
- registry.registerDynamicUse(new DynamicUse(operatorSelector, null));
-
SendStructure sendStructure;
if (operator.kind == AssignmentOperatorKind.IF_NULL) {
+ registry.registerConstantLiteral(new NullConstantExpression());
+ registry.registerDynamicUse(new DynamicUse(Selectors.equals, null));
sendStructure = new SetIfNullStructure(semantics);
} else {
+ registry.registerDynamicUse(new DynamicUse(operatorSelector, null));
sendStructure = new CompoundStructure(semantics, operator);
}
registry.registerSendStructure(node, sendStructure);
@@ -3888,11 +3889,10 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
// and only declaration elements may be registered.
// TODO(johniwinther): Avoid registration of `type` in face of redirecting
// factory constructors.
- registry.registerStaticUse(
- node.isConst
- ? new StaticUse.constConstructorInvoke(
+ registry.registerStaticUse(node.isConst
+ ? new StaticUse.constConstructorInvoke(
constructor.declaration, callStructure, type)
- : new StaticUse.typedConstructorInvoke(
+ : new StaticUse.typedConstructorInvoke(
constructor.declaration, callStructure, type));
InterfaceType interfaceType = type;
if (interfaceType.typeArguments.any((DartType type) => !type.isDynamic)) {
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/kernel_impact.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698