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

Unified Diff: tests/language/branch_canonicalization_test.dart

Issue 2985243002: Migrate block 44. (Closed)
Patch Set: Created 3 years, 5 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: tests/language/branch_canonicalization_test.dart
diff --git a/tests/language/branch_canonicalization_test.dart b/tests/language/branch_canonicalization_test.dart
deleted file mode 100644
index dfb35f6c62fa20759ab272a1a13bb302d2498110..0000000000000000000000000000000000000000
--- a/tests/language/branch_canonicalization_test.dart
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 2013, 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.
-
-// Test that branch fusion correctly sets branch environment for comparisons
-// that require unboxing and does not fuse branches that can deoptimize.
-// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation
-
-import "package:expect/expect.dart";
-
-var sideEffect = true;
-
-barDouble(a, b) {
- sideEffect = false;
- final result = (a == b);
- sideEffect = !sideEffect;
- return result;
-}
-
-fooDouble(a, b) => barDouble(a, b) ? 1 : 0;
-
-barMint(a, b) {
- sideEffect = false;
- final result = (a == b);
- sideEffect = !sideEffect;
- return result;
-}
-
-fooMint(a, b) => barMint(a, b) ? 1 : 0;
-
-class A {
- operator ==(other) => identical(this, other);
-}
-
-class B extends A {}
-
-class C extends A {}
-
-barPoly(a, b) {
- sideEffect = false;
- final result = a == b;
- sideEffect = !sideEffect;
- return result;
-}
-
-fooPoly(a, b) => barPoly(a, b) ? 1 : 0;
-
-main() {
- final a = 1.0;
- final b = 1 << 62;
- final x = new A(), y = new B(), z = new C();
- for (var i = 0; i < 20; i++) {
- Expect.equals(1, fooDouble(a, a));
- Expect.isTrue(sideEffect);
- Expect.equals(0, fooMint(b, 0));
- Expect.isTrue(sideEffect);
- Expect.equals(1, fooPoly(x, x));
- Expect.equals(0, fooPoly(y, x));
- }
- Expect.equals(1, fooDouble(z, z));
- Expect.isTrue(sideEffect);
- Expect.equals(1, fooMint(z, z));
- Expect.isTrue(sideEffect);
- Expect.equals(1, fooPoly(z, z));
- Expect.isTrue(sideEffect);
-}

Powered by Google App Engine
This is Rietveld 408576698