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

Unified Diff: sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart

Issue 15985005: Re-apply: Fix type propagation bug by always narrowing types. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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/types/simple_types_inferrer.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart (revision 23578)
+++ sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart (working copy)
@@ -152,15 +152,19 @@
TypeMask get typeType => internal.typeType;
TypeMask getReturnTypeOfElement(Element element) {
+ if (compiler.disableTypeInference) return dynamicType;
return internal.getReturnTypeOfElement(element);
}
TypeMask getTypeOfElement(Element element) {
+ if (compiler.disableTypeInference) return dynamicType;
return internal.getTypeOfElement(element);
}
TypeMask getTypeOfNode(Element owner, Node node) {
+ if (compiler.disableTypeInference) return dynamicType;
return internal.getTypeOfNode(owner, node);
}
TypeMask getTypeOfSelector(Selector selector) {
+ if (compiler.disableTypeInference) return dynamicType;
return internal.getTypeOfSelector(selector);
}
@@ -817,7 +821,7 @@
return isTypeValuable(result);
});
if (result == null) {
- result = dynamicType;
+ result = new TypeMask.nonNullEmpty();
}
return result;
}
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/types_propagation.dart ('k') | tests/compiler/dart2js/compiler_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698