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

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

Issue 1108783003: Refactor SsaBuilder.visitSuperSend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 5 years, 8 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/send_resolver.dart
diff --git a/pkg/compiler/lib/src/resolution/send_resolver.dart b/pkg/compiler/lib/src/resolution/send_resolver.dart
index c63b20d963bf1be4e0522031fd341bd766f6c829..4c6110f45336cbdda68492f7a983551a6cbca205 100644
--- a/pkg/compiler/lib/src/resolution/send_resolver.dart
+++ b/pkg/compiler/lib/src/resolution/send_resolver.dart
@@ -234,6 +234,13 @@ abstract class SendResolverMixin {
case SendStructureKind.SET:
return new SetStructure(semantics, selector);
case SendStructureKind.INVOKE:
+ if (semantics.kind == AccessKind.SUPER_METHOD) {
+ // TODO(johnniwinther): Find all statically resolved case that should
+ // go here (top level, static, local, ...).
+ if (!selector.callStructure.signatureApplies(semantics.element)) {
+ return new IncompatibleInvokeStructure(semantics, selector);
+ }
+ }
return new InvokeStructure(semantics, selector);
case SendStructureKind.UNARY:
return new UnaryStructure(semantics, unaryOperator, selector);
@@ -328,7 +335,7 @@ abstract class SendResolverMixin {
}
} else if (node.isSuperCall) {
if (Elements.isUnresolved(element)) {
- return new StaticAccess.unresolved(element);
+ return new StaticAccess.unresolvedSuper(element);
} else if (isCompound && Elements.isUnresolved(getter)) {
// TODO(johnniwinther): Ensure that [getter] is not null. This happens
// in the case of missing super getter.
« no previous file with comments | « pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart ('k') | pkg/compiler/lib/src/resolution/send_structure.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698