| Index: pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
|
| diff --git a/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart b/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
|
| index 7ee6e778ba93b21f51d842ca73a40b475a7dfc6a..a7e6db6d2be7cabd9b55012bd00e68b309653f4d 100644
|
| --- a/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
|
| +++ b/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart
|
| @@ -202,8 +202,18 @@ class KernelAstAdapter implements KernelElementAdapter {
|
| }
|
|
|
| Selector getSelector(ir.Expression node) {
|
| - if (node is ir.PropertyGet) return getGetterSelector(node);
|
| - if (node is ir.PropertySet) return getSetterSelector(node);
|
| + // TODO(efortuna): This is screaming for a common interface between
|
| + // PropertyGet and SuperPropertyGet (and same for *Get). Talk to kernel
|
| + // folks.
|
| + if (node is ir.PropertyGet) {
|
| + return getGetterSelector((node as ir.PropertyGet).name);
|
| + }
|
| + if (node is ir.SuperPropertyGet) {
|
| + return getGetterSelector((node as ir.SuperPropertyGet).name);
|
| + }
|
| + if (node is ir.PropertySet || node is ir.SuperPropertySet) {
|
| + return getSetterSelector(node);
|
| + }
|
| if (node is ir.InvocationExpression) return getInvocationSelector(node);
|
| _compiler.reporter.internalError(getNode(node),
|
| "Can only get the selector for a property get or an invocation.");
|
| @@ -227,8 +237,7 @@ class KernelAstAdapter implements KernelElementAdapter {
|
| return new Selector(kind, name, callStructure);
|
| }
|
|
|
| - Selector getGetterSelector(ir.PropertyGet getter) {
|
| - ir.Name irName = getter.name;
|
| + Selector getGetterSelector(ir.Name irName) {
|
| Name name = new Name(
|
| irName.name, irName.isPrivate ? getElement(irName.library) : null);
|
| return new Selector.getter(name);
|
|
|