OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2016, 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 // |
| 5 // VMOptions=--enable_asserts --enable-inlining-annotations --optimization-count
er-threshold=10 --no-background-compilation |
| 6 |
| 7 import 'package:expect/expect.dart'; |
| 8 import 'regress_27671_other.dart'; |
| 9 |
| 10 const AlwaysInline = "AlwaysInline"; |
| 11 const NeverInline = "NeverInline"; |
| 12 |
| 13 @AlwaysInline |
| 14 bounce(x) { |
| 15 for (int i = 0; i < 10; i++) { |
| 16 check(f, x); |
| 17 } |
| 18 } |
| 19 |
| 20 @AlwaysInline |
| 21 bool f(y) => y > 0; |
| 22 |
| 23 main() { |
| 24 for (int i = 0; i < 100; i++) { |
| 25 bounce(1); |
| 26 } |
| 27 try { |
| 28 bounce(-1); |
| 29 } catch (e) { |
| 30 Expect.isTrue(e.toString().contains('f(x) && true')); |
| 31 } |
| 32 } |
OLD | NEW |