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); |
} |