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

Unified Diff: tests/language/vm/canonicalization_preserves_deopt_test.dart

Issue 726593002: Reland "Suppress canonicalization of Unbox() instruction that can deoptimize." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
« runtime/vm/intermediate_language.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/vm/canonicalization_preserves_deopt_test.dart
diff --git a/tests/language/vm/regress_21245_test.dart b/tests/language/vm/canonicalization_preserves_deopt_test.dart
similarity index 57%
copy from tests/language/vm/regress_21245_test.dart
copy to tests/language/vm/canonicalization_preserves_deopt_test.dart
index 8fa7bb086c4d2ffafd8e061c246373f04f419b61..b36e0eab71588150e5f4e8c284297016633b3513 100644
--- a/tests/language/vm/regress_21245_test.dart
+++ b/tests/language/vm/canonicalization_preserves_deopt_test.dart
@@ -3,21 +3,18 @@
// BSD-style license that can be found in the LICENSE file.
// VMOptions=--optimization_counter_threshold=10 --no-use-osr
-test(a) {
- var e;
- for (var i = 0; i < a.length; i++) {
- e = a[i];
- for (var j = 0; j < i; j++) {
- e = a[j];
- }
- }
- return e;
+import "package:expect/expect.dart";
+
+class X {
+ operator * (other) => "NaNNaNNaNNaNBatman";
}
+foo(x) => (x * 1.0) is double;
+
main() {
- var a = [0, 1, 2, 3, 4, 5];
- for (var i = 0; i < 20; i++) {
- test(a);
+ for (var i = 0; i < 100; i++) {
+ Expect.isTrue(foo(1.0));
}
+ Expect.isFalse(foo(new X()));
}
« runtime/vm/intermediate_language.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