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

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

Issue 1112563002: Refactor SsaBuilder.visitStaticSend and visitGetterSend. (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 4c6110f45336cbdda68492f7a983551a6cbca205..b8eeb2fed37369f53c94d4f66365632b04a4e9ed 100644
--- a/pkg/compiler/lib/src/resolution/send_resolver.dart
+++ b/pkg/compiler/lib/src/resolution/send_resolver.dart
@@ -234,12 +234,17 @@ 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);
- }
+ switch (semantics.kind) {
+ case AccessKind.STATIC_METHOD:
+ case AccessKind.SUPER_METHOD:
+ case AccessKind.TOPLEVEL_METHOD:
+ // TODO(johnniwinther): Should local function also be handled here?
+ if (!selector.callStructure.signatureApplies(semantics.element)) {
+ return new IncompatibleInvokeStructure(semantics, selector);
+ }
+ break;
+ default:
+ break;
}
return new InvokeStructure(semantics, selector);
case SendStructureKind.UNARY:
« 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