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

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

Issue 87783003: Add UInt32 and UInt31 types to better infer bit operations. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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/flat_type_mask.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/types/flat_type_mask.dart (revision 30666)
+++ sdk/lib/_internal/compiler/implementation/types/flat_type_mask.dart (working copy)
@@ -96,7 +96,10 @@
return cls == compiler.boolClass || cls == backend.boolImplementation;
}
if (containsOnlyInt(compiler)) {
- return cls == compiler.intClass || cls == backend.intImplementation;
+ return cls == compiler.intClass
+ || cls == backend.intImplementation
+ || cls == backend.uint32Implementation
+ || cls == backend.uint31Implementation;
}
if (containsOnlyDouble(compiler)) {
return cls == compiler.doubleClass
@@ -132,7 +135,9 @@
bool containsOnlyInt(Compiler compiler) {
return base == compiler.intClass
- || base == compiler.backend.intImplementation;
+ || base == compiler.backend.intImplementation
+ || base == compiler.backend.uint31Implementation
+ || base == compiler.backend.uint32Implementation;
}
bool containsOnlyDouble(Compiler compiler) {
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/nodes.dart ('k') | sdk/lib/_internal/compiler/implementation/types/types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698