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

Unified Diff: pkg/compiler/lib/src/ssa/value_range_analyzer.dart

Issue 2673513003: dart2js: Introduce HGetLength to replace strange use of HFieldGet (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « pkg/compiler/lib/src/ssa/ssa_tracer.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/value_range_analyzer.dart
diff --git a/pkg/compiler/lib/src/ssa/value_range_analyzer.dart b/pkg/compiler/lib/src/ssa/value_range_analyzer.dart
index 23d50870e339f6db27be4370ae36908812454fd5..b4a9d55cc6e8f4d89431c3032c795fcf98847060 100644
--- a/pkg/compiler/lib/src/ssa/value_range_analyzer.dart
+++ b/pkg/compiler/lib/src/ssa/value_range_analyzer.dart
@@ -698,12 +698,11 @@ class SsaValueRangeAnalyzer extends HBaseVisitor implements OptimizationPhase {
}
Range visitFieldGet(HFieldGet fieldGet) {
- if (!fieldGet.isInteger(closedWorld)) return info.newUnboundRange();
Johnni Winther 2017/02/02 08:33:36 Why is this case removed?
- if (!fieldGet.receiver.isIndexablePrimitive(closedWorld)) {
- return visitInstruction(fieldGet);
- }
- assert(fieldGet.element == backendHelpers.jsIndexableLength);
- PositiveValue value = info.newPositiveValue(fieldGet);
+ return visitInstruction(fieldGet);
+ }
+
+ Range visitGetLength(HGetLength node) {
+ PositiveValue value = info.newPositiveValue(node);
// We know this range is above zero. To simplify the analysis, we
// put the zero value as the lower bound of this range. This
// allows to easily remove the second bound check in the following
« no previous file with comments | « pkg/compiler/lib/src/ssa/ssa_tracer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698