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

Unified Diff: sdk/lib/_internal/compiler/implementation/resolution/members.dart

Issue 12374094: Implement complex super assignment. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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: sdk/lib/_internal/compiler/implementation/resolution/members.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/resolution/members.dart (revision 19450)
+++ sdk/lib/_internal/compiler/implementation/resolution/members.dart (working copy)
@@ -2005,7 +2005,7 @@
}
// TODO(johnniwinther): Ensure correct behavior if currentClass is a
// patch.
- target = currentClass.lookupSuperMember(name);
+ target = currentClass.lookupSuperSelector(selector);
// [target] may be null which means invoking noSuchMethod on
// super.
if (target == null) {
@@ -2292,14 +2292,6 @@
setter = warnAndCreateErroneousElement(
node.selector, target.name, MessageKind.CANNOT_RESOLVE_SETTER);
compiler.backend.registerThrowNoSuchMethod();
- } else if (isComplex && target.name == const SourceString('[]=')) {
- getter = target.getEnclosingClass().lookupMember(
- const SourceString('[]'));
- if (getter == null) {
- getter = warnAndCreateErroneousElement(
- node, setter.name, MessageKind.CANNOT_RESOLVE_INDEX);
- compiler.backend.registerThrowNoSuchMethod();
- }
}
}
@@ -2320,6 +2312,15 @@
}
registerSend(getterSelector, getter);
mapping.setGetterSelectorInComplexSendSet(node, getterSelector);
+ if (node.isSuperCall) {
+ getter = currentClass.lookupSuperSelector(getterSelector);
+ if (getter == null) {
+ target = warnAndCreateErroneousElement(
+ node, selector.name, MessageKind.NO_SUCH_SUPER_MEMBER,
+ {'className': currentClass, 'memberName': selector.name});
+ compiler.backend.registerSuperNoSuchMethod();
+ }
+ }
useElement(node.selector, getter);
// Make sure we include the + and - operators if we are using
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/enqueue.dart ('k') | sdk/lib/_internal/compiler/implementation/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698