| Index: tests/language/deopt_hoisted_smi_check_vm_test.dart
|
| diff --git a/tests/language/deopt_hoisted_smi_check_test.dart b/tests/language/deopt_hoisted_smi_check_vm_test.dart
|
| similarity index 57%
|
| rename from tests/language/deopt_hoisted_smi_check_test.dart
|
| rename to tests/language/deopt_hoisted_smi_check_vm_test.dart
|
| index 5ed53374c15eaa54512c87b62008ba1d19ec0854..6fab79ca99d3dc081b4248f14fe6dd4dbe103826 100644
|
| --- a/tests/language/deopt_hoisted_smi_check_test.dart
|
| +++ b/tests/language/deopt_hoisted_smi_check_vm_test.dart
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
|
| +// 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 deoptimization on an optimistically hoisted smi check.
|
| @@ -13,7 +13,20 @@ sum(a, b) {
|
| return sum;
|
| }
|
|
|
| +mask(x) {
|
| + for (var i = 0; i < 10; i++) {
|
| + if (i == 1) {
|
| + return x;
|
| + }
|
| + x = x & 0xFF;
|
| + }
|
| +}
|
| +
|
| main() {
|
| - for (var i = 0; i < 2000; i++) Expect.equals(9, sum(1, 2));
|
| + for (var i = 0; i < 2000; i++) {
|
| + Expect.equals(9, sum(1, 2));
|
| + Expect.equals(0xAB, mask(0xAB));
|
| + }
|
| Expect.equals(9, sum(1.0, 2.0)); // Passing double causes deoptimization.
|
| + Expect.equals(0xAB, mask(0x1000000AB));
|
| }
|
|
|