| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2017, 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=--no-background-compilation --enable-inlining-annotations |
| 5 |
| 6 const NeverInline = 'NeverInline'; |
| 7 |
| 8 @NeverInline |
| 9 doSomething() { |
| 10 print("Hello!"); |
| 11 } |
| 12 |
| 13 @NeverInline |
| 14 maybeThrow(bool doThrow) { |
| 15 if (doThrow) { |
| 16 throw new Exception(); |
| 17 } |
| 18 } |
| 19 |
| 20 @NeverInline |
| 21 run(action) { |
| 22 try { action(); } catch(e) {} |
| 23 } |
| 24 |
| 25 test(bool doThrow) { |
| 26 try { |
| 27 maybeThrow(doThrow); |
| 28 } finally { |
| 29 run(() { |
| 30 doSomething(); // Should not crash here. |
| 31 }); |
| 32 } |
| 33 } |
| 34 |
| 35 main() { |
| 36 try { test(true); } catch(e) {} |
| 37 try { test(false); } catch(e) {} |
| 38 } |
| OLD | NEW |