Reviewers: jbrosenberg, zundel,
Please review this at http://gwt-code-reviews.appspot.com/1446814/
Affected files:
M dev/core/src/com/google/gwt/dev/jjs/impl/TypeTightener.java
Index: dev/core/src/com/google/gwt/dev/jjs/impl/TypeTightener.java
diff --git a/dev/core/src/com/google/gwt/dev/jjs/impl/TypeTightener.java
b/dev/core/src/com/google/gwt/dev/jjs/impl/TypeTightener.java
index
5894420fb09afa527cefd056d487eca467369ea1..63124acb7d6ca003607bfb88f13787d2a82f772f
100644
--- a/dev/core/src/com/google/gwt/dev/jjs/impl/TypeTightener.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/impl/TypeTightener.java
@@ -560,8 +560,11 @@ public class TypeTightener {
x = newCall;
}
- if (x.canBePolymorphic()) {
- // See if we can remove virtualization from this call.
+ /*
+ * Mark a call as non-polymorphic if the targeted method is the only
+ * possible dispatch, given the qualifying instance type.
+ */
+ if (x.canBePolymorphic() && !target.isAbstract()) {
JExpression instance = x.getInstance();
assert (instance != null);
JReferenceType instanceType = (JReferenceType) instance.getType();
@@ -575,6 +578,7 @@ public class TypeTightener {
return;
}
}
+ // The instance type is incompatible with all overrides.
}
x.setCannotBePolymorphic();
madeChanges();
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors