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

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

Issue 94303002: Add another type JSPositiveInt to show a range analysis in the inferrer would be very beneficial :-… (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/types.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/types/types.dart (revision 30754)
+++ sdk/lib/_internal/compiler/implementation/types/types.dart (working copy)
@@ -58,6 +58,7 @@
TypeMask intTypeCache;
TypeMask uint32TypeCache;
TypeMask uint31TypeCache;
+ TypeMask positiveIntTypeCache;
TypeMask doubleTypeCache;
TypeMask numTypeCache;
TypeMask boolTypeCache;
@@ -109,6 +110,14 @@
return uint31TypeCache;
}
+ TypeMask get positiveIntType {
+ if (positiveIntTypeCache == null) {
+ positiveIntTypeCache = new TypeMask.nonNullSubclass(
+ compiler.backend.positiveIntImplementation);
+ }
+ return positiveIntTypeCache;
+ }
+
TypeMask get doubleType {
if (doubleTypeCache == null) {
doubleTypeCache = new TypeMask.nonNullExact(
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/types/flat_type_mask.dart ('k') | sdk/lib/_internal/lib/js_array.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698