| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 | 4 |
| 5 import "package:expect/expect.dart"; | |
| 6 | |
| 7 // Test that the return type of a method is being registered for both | 5 // Test that the return type of a method is being registered for both |
| 8 // its bailout and optimized version in dart2js. | 6 // its bailout and optimized version in dart2js. |
| 9 | 7 |
| 10 var a; | 8 var a; |
| 11 | 9 |
| 12 bar() { | 10 bar() { |
| 13 if (a[0] == 0) { | 11 if (a[0] == 0) { |
| 14 // Force bailout version. | 12 // Force bailout version. |
| 15 bar(); | 13 bar(); |
| 16 // Avoid inlining. | 14 // Avoid inlining. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 32 // This check used to fail because dart2js was assuming [a] was an | 30 // This check used to fail because dart2js was assuming [a] was an |
| 33 // array. | 31 // array. |
| 34 Expect.equals(1, a.length); | 32 Expect.equals(1, a.length); |
| 35 } | 33 } |
| 36 | 34 |
| 37 main() { | 35 main() { |
| 38 a = new Map(); | 36 a = new Map(); |
| 39 bar(); | 37 bar(); |
| 40 foo(); | 38 foo(); |
| 41 } | 39 } |
| OLD | NEW |