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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/value_range_analyzer.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/ssa/value_range_analyzer.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/value_range_analyzer.dart (revision 30754)
+++ sdk/lib/_internal/compiler/implementation/ssa/value_range_analyzer.dart (working copy)
@@ -634,7 +634,7 @@
}
Range visitInstruction(HInstruction instruction) {
- if (instruction.isUInt32(compiler)) {
+ if (instruction.isPositiveInteger(compiler)) {
return info.newNormalizedRange(
info.intZero, info.newPositiveValue(instruction));
} else if (instruction.isInteger(compiler)) {
@@ -824,7 +824,7 @@
Range visitCheck(HCheck instruction) {
if (ranges[instruction.checkedInput] == null) {
- return info.newUnboundRange();
+ return visitInstruction(instruction);
}
return ranges[instruction.checkedInput];
}

Powered by Google App Engine
This is Rietveld 408576698