| 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()));
|
| }
|
|
|
|
|