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

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

Issue 1314573002: Use Name instead of Selector in SemanticSendVisitor (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
Index: pkg/compiler/lib/src/resolution/access_semantics.dart
diff --git a/pkg/compiler/lib/src/resolution/access_semantics.dart b/pkg/compiler/lib/src/resolution/access_semantics.dart
index fc1b1ea9627fbcfe7dc559561cc03be9c1babad2..ffe974eef1af3e0db16a1f82b7d72e36c2b0ef74 100644
--- a/pkg/compiler/lib/src/resolution/access_semantics.dart
+++ b/pkg/compiler/lib/src/resolution/access_semantics.dart
@@ -7,6 +7,8 @@
*/
library dart2js.access_semantics;
+import '../common/names.dart' show
+ Names;
import '../constants/expressions.dart';
import '../elements/elements.dart';
import '../dart_types.dart';
@@ -212,6 +214,8 @@ abstract class AccessSemantics {
/// [element] otherwise.
Element get setter => element;
+ Name get name => null;
+
const AccessSemantics._(this.kind);
String toString() {
@@ -219,11 +223,18 @@ abstract class AccessSemantics {
sb.write('AccessSemantics[');
sb.write('kind=$kind,');
if (element != null) {
- sb.write('element=');
- if (element.enclosingClass != null) {
- sb.write('${element.enclosingClass.name}.');
+ if (getter != setter) {
+ sb.write('getter=');
+ sb.write('${getter}');
floitsch 2015/08/24 14:15:13 $getter
+ sb.write(',setter=');
+ sb.write('${setter}');
floitsch 2015/08/24 14:15:13 $setter
+ } else {
+ sb.write('element=');
+ sb.write('${element}');
floitsch 2015/08/24 14:15:13 $element
}
- sb.write('${element}');
+ } else if (name != null) {
+ sb.write('name=');
+ sb.write(name);
}
sb.write(']');
return sb.toString();
@@ -232,19 +243,23 @@ abstract class AccessSemantics {
class DynamicAccess extends AccessSemantics {
+ final Name name;
+
const DynamicAccess.expression()
- : super._(AccessKind.EXPRESSION);
+ : name = null,
+ super._(AccessKind.EXPRESSION);
const DynamicAccess.thisAccess()
- : super._(AccessKind.THIS);
+ : name = null,
+ super._(AccessKind.THIS);
- const DynamicAccess.thisProperty()
+ const DynamicAccess.thisProperty(this.name)
: super._(AccessKind.THIS_PROPERTY);
- const DynamicAccess.dynamicProperty()
+ const DynamicAccess.dynamicProperty(this.name)
: super._(AccessKind.DYNAMIC_PROPERTY);
- const DynamicAccess.ifNotNullProperty()
+ const DynamicAccess.ifNotNullProperty(this.name)
: super._(AccessKind.CONDITIONAL_DYNAMIC_PROPERTY);
}

Powered by Google App Engine
This is Rietveld 408576698