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

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

Issue 1282773002: Refactor and clean up AccessSemantics (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 | « pkg/compiler/lib/src/resolution/members.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/send_resolver.dart
diff --git a/pkg/compiler/lib/src/resolution/send_resolver.dart b/pkg/compiler/lib/src/resolution/send_resolver.dart
index d3f4e61a0de559b90d27e64d3d9d8df4771f6b1b..e23def359d5c2c93c8c3438af76d69ff2a54a68c 100644
--- a/pkg/compiler/lib/src/resolution/send_resolver.dart
+++ b/pkg/compiler/lib/src/resolution/send_resolver.dart
@@ -504,15 +504,15 @@ abstract class SendResolverMixin {
// Conditional sends (e?.x) are treated as dynamic property reads because
// they are equivalent to do ((a) => a == null ? null : a.x)(e). If `e` is
// a type `A`, this is equivalent to write `(A).x`.
- return new DynamicAccess.ifNotNullProperty(node.receiver);
+ return const DynamicAccess.ifNotNullProperty();
} else if (node.isOperator) {
- return new DynamicAccess.dynamicProperty(node.receiver);
+ return const DynamicAccess.dynamicProperty();
} else if (Elements.isClosureSend(node, element)) {
if (element == null) {
if (node.selector.isThis()) {
- return new AccessSemantics.thisAccess();
+ return new DynamicAccess.thisAccess();
} else {
- return new AccessSemantics.expression();
+ return new DynamicAccess.expression();
}
} else if (Elements.isErroneous(element)) {
return new StaticAccess.unresolved(element);
@@ -526,9 +526,9 @@ abstract class SendResolverMixin {
if (isDynamicAccess(element) &&
(!isCompound || isDynamicAccess(getter))) {
if (node.receiver == null || node.receiver.isThis()) {
- return new AccessSemantics.thisProperty();
+ return const DynamicAccess.thisProperty();
} else {
- return new DynamicAccess.dynamicProperty(node.receiver);
+ return const DynamicAccess.dynamicProperty();
}
} else if (element != null && element.impliesType) {
// TODO(johnniwinther): Provide an [ErroneousElement].
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698