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

Unified Diff: tests/language/range_analysis_test.dart

Issue 10972003: Fix convergence issues in range analysis. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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
« runtime/vm/flow_graph_optimizer.cc ('K') | « runtime/vm/intermediate_language.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/range_analysis_test.dart
diff --git a/tests/language/range_analysis_test.dart b/tests/language/range_analysis_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..7aa2f9427f5075c926c2d567ac5981efbf340ce5
--- /dev/null
+++ b/tests/language/range_analysis_test.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// Dart test program for constructors and initializers.
+
+// Checks that range analysis does not enter infinite loop trying to propagate
+// ranges through dependant phis.
+
+test() {
+ var sum = 0;
+ for (var i = 0; i < 10; i++) {
+ for (var j = i - 1; j >= 0; j--) {
+ for (var k = j; k < i; k++) {
+ sum += (i + j + k);
+ }
+ }
+ }
+ return sum;
+}
+
+main() {
+ for (var i = 0; i < 1000; i++) test();
+}
« runtime/vm/flow_graph_optimizer.cc ('K') | « runtime/vm/intermediate_language.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698