Chromium Code Reviews| 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 // Test that branch fusion correctly sets branch environment for comparisons | |
| 5 // that require unboxing. | |
| 6 | |
| 7 barDouble(a, b) => a == b; | |
| 8 fooDouble(a, b) => barDouble(a, b) ? 1 : 0; | |
| 9 | |
| 10 barMint(a, b) => a == b; | |
| 11 fooMint(a, b) => barMint(a, b) ? 1 : 0; | |
| 12 | |
| 13 main () { | |
| 14 final a = 1.0; | |
| 15 final b = 1 << 62; | |
| 16 for (var i = 0; i < 10000; i++) { | |
| 17 Expect.equals(1, fooDouble(a, a)); | |
| 18 Expect.equals(0, fooMint(b, 0)); | |
|
Florian Schneider
2013/02/13 11:22:11
Thanks for adding the test. Do we have a test cove
| |
| 19 } | |
| 20 } | |
| 21 | |
| 22 | |
| 23 | |
| OLD | NEW |