| Index: tests/lib/typeddata/float32x4_unbox_regress_test.dart
|
| diff --git a/tests/lib/typeddata/float32x4_unbox_regress_test.dart b/tests/lib/typeddata/float32x4_unbox_regress_test.dart
|
| index 48563e2adef5bdf8b3be86c5e6d1d3c4905668ea..dd84dfce67b6a82026ea67590c71aede2f7ddbda 100644
|
| --- a/tests/lib/typeddata/float32x4_unbox_regress_test.dart
|
| +++ b/tests/lib/typeddata/float32x4_unbox_regress_test.dart
|
| @@ -1,6 +1,7 @@
|
| // 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.
|
| +// VMOptions=--deoptimization_counter_threshold=1000
|
|
|
| // Library tag to be able to run in html test framework.
|
| library float32x4_unbox_regress_test;
|
| @@ -12,7 +13,7 @@ testListStore(array, index, value) {
|
| array[index] = value;
|
| }
|
|
|
| -main() {
|
| +void testListStoreDeopt() {
|
| var list;
|
| var value = new Float32x4(1.0, 2.0, 3.0, 4.0);
|
| var smi = 12;
|
| @@ -27,3 +28,29 @@ main() {
|
| testListStore(list, 0, smi);
|
| } catch (_) { }
|
| }
|
| +
|
| +testAdd(a, b) {
|
| + var c = a + b;
|
| + Expect.equals(3.0, c.x);
|
| + Expect.equals(5.0, c.y);
|
| + Expect.equals(7.0, c.z);
|
| + Expect.equals(9.0, c.w);
|
| +}
|
| +
|
| +void testAddDeopt() {
|
| + var a = new Float32x4(1.0, 2.0, 3.0, 4.0);
|
| + var b = new Float32x4(2.0, 3.0, 4.0, 5.0);
|
| + var smi = 12;
|
| + for (int i = 0; i < 3000; i++) {
|
| + testAdd(a, b);
|
| + }
|
| +
|
| + try {
|
| + testAdd(a, smi);
|
| + } catch (_) {}
|
| +}
|
| +
|
| +main() {
|
| + testListStoreDeopt();
|
| + testAddDeopt();
|
| +}
|
|
|