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

Unified Diff: frog/tests/leg_only/regression_2913_test.dart

Issue 10375048: Don't allow phi equivalences along back-edges. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added test. Updated other tests. Simplified isPhiBefore. Created 8 years, 7 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
Index: frog/tests/leg_only/regression_2913_test.dart
diff --git a/frog/tests/leg_only/regression_2913_test.dart b/frog/tests/leg_only/regression_2913_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..0099a6a436ea4465c7fa3fe9b60d6b8b5dbf9d83
--- /dev/null
+++ b/frog/tests/leg_only/regression_2913_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.
+
+main() {
+ var a = 10;
+ var b = 11;
+
+ for (var i = 0; i < 1; i++) {
+ print('--------');
+ print('a $a');
+ print('b $b');
+ var t = 1;
+ if (i < 20) {
+ t = 2;
+ }
+
+ b = a;
+ a = t;
+ }
+ Expect.equals(2, a);
+ Expect.equals(10, b);
+}

Powered by Google App Engine
This is Rietveld 408576698