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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart

Issue 12207081: Add a type kind to TypedSelector. A typed selector can either be (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/ssa/codegen.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/codegen.dart (revision 18249)
+++ sdk/lib/_internal/compiler/implementation/ssa/codegen.dart (working copy)
@@ -1567,9 +1567,16 @@
int receiverIndex = node.isInterceptorCall ? 1 : 0;
HType receiverHType = types[node.inputs[receiverIndex]];
DartType receiverType = receiverHType.computeType(compiler);
- if (receiverType != null &&
- !identical(receiverType.kind, TypeKind.MALFORMED_TYPE)) {
- return new TypedSelector(receiverType, defaultSelector);
+ if (receiverType != null && !receiverType.isMalformed) {
+ TypedSelectorKind kind;
+ if (receiverHType.isExact()) {
+ kind = TypedSelectorKind.EXACT;
+ } else if (receiverHType.isInterfaceType()) {
+ kind = TypedSelectorKind.INTERFACE;
+ } else {
+ kind = TypedSelectorKind.SUBCLASS;
+ }
+ return new TypedSelector(receiverType, kind, defaultSelector);
} else {
return defaultSelector;
}

Powered by Google App Engine
This is Rietveld 408576698