| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 // VMOptions=--optimization-counter-threshold=10 |
| 5 |
| 6 import "package:expect/expect.dart"; |
| 7 |
| 8 // Test correct register allocation with a value used twice at the same |
| 9 // instruction. |
| 10 test(List a, int v) { |
| 11 a[v] = v; |
| 12 } |
| 13 |
| 14 main() { |
| 15 var list = new List(2); |
| 16 for (var i = 0; i < 20; i++) test(list, 1); |
| 17 Expect.equals(null, list[0]); |
| 18 Expect.equals(1, list[1]); |
| 19 } |
| OLD | NEW |