| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 // VMOptions=--optimization-counter-threshold=10 | 4 // VMOptions=--optimization-counter-threshold=10 --no-background-compilation |
| 5 | 5 |
| 6 import "package:expect/expect.dart"; | 6 import "package:expect/expect.dart"; |
| 7 | 7 |
| 8 // Test correct register allocation with a value used twice at the same | 8 // Test correct register allocation with a value used twice at the same |
| 9 // instruction. | 9 // instruction. |
| 10 test(List a, int v) { | 10 test(List a, int v) { |
| 11 a[v] = v; | 11 a[v] = v; |
| 12 } | 12 } |
| 13 | 13 |
| 14 main() { | 14 main() { |
| 15 var list = new List(2); | 15 var list = new List(2); |
| 16 for (var i = 0; i < 20; i++) test(list, 1); | 16 for (var i = 0; i < 20; i++) test(list, 1); |
| 17 Expect.equals(null, list[0]); | 17 Expect.equals(null, list[0]); |
| 18 Expect.equals(1, list[1]); | 18 Expect.equals(1, list[1]); |
| 19 } | 19 } |
| OLD | NEW |