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..361b929b151db6b43511aa887172df18b05a8436 100644 |
--- a/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart |
+++ b/pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart |
@@ -202,8 +202,12 @@ 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); |
+ if (node is ir.PropertyGet || node is ir.SuperPropertyGet) { |
+ return getGetterSelector(node); |
+ } |
+ 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,14 +231,18 @@ class KernelAstAdapter implements KernelElementAdapter { |
return new Selector(kind, name, callStructure); |
} |
- Selector getGetterSelector(ir.PropertyGet getter) { |
+ Selector getGetterSelector(ir.Expression getter) { |
+ // Getter is a PropertyGet or SuperPropertyGet. |
+ // TODO(efortuna): Common interface? |
Emily Fortuna
2017/01/31 00:17:16
these are clearly screaming out for a common inter
|
ir.Name irName = getter.name; |
Name name = new Name( |
irName.name, irName.isPrivate ? getElement(irName.library) : null); |
return new Selector.getter(name); |
} |
- Selector getSetterSelector(ir.PropertySet setter) { |
+ Selector getSetterSelector(ir.Expression setter) { |
+ // Getter is a PropertySet or SuperPropertySet. |
+ // TODO(efortuna): Common interface? |
ir.Name irName = setter.name; |
Name name = new Name( |
irName.name, irName.isPrivate ? getElement(irName.library) : null); |