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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/optimize.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/optimize.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/optimize.dart (revision 18249)
+++ sdk/lib/_internal/compiler/implementation/ssa/optimize.dart (working copy)
@@ -386,8 +386,7 @@
if (node.isInterceptorCall) return handleInterceptorCall(node);
HType receiverType = types[node.receiver];
if (receiverType.isExact()) {
- HBoundedType type = receiverType;
- Element element = type.lookupMember(node.selector.name);
+ Element element = receiverType.lookupMember(node.selector.name, compiler);
// TODO(ngeoffray): Also fold if it's a getter or variable.
if (element != null && element.isFunction()) {
if (node.selector.applies(element, compiler)) {
@@ -1276,8 +1275,12 @@
void visitIs(HIs instruction) {
HInstruction input = instruction.expression;
- HType convertedType =
- new HType.fromBoundedType(instruction.typeExpression, compiler);
+ HType convertedType = new HType.fromBoundedType(
+ instruction.typeExpression,
+ compiler,
+ canBeNull: false,
+ isExact: false,
+ isInterfaceType: true);
List<HInstruction> ifUsers = <HInstruction>[];
List<HInstruction> notIfUsers = <HInstruction>[];

Powered by Google App Engine
This is Rietveld 408576698