| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // Test correctness of side effects tracking used by load to load forwarding. | 4 // Test correctness of side effects tracking used by load to load forwarding. |
| 5 | 5 |
| 6 // VMOptions=--no-use-osr --optimization-counter-threshold=10 --enable-inlining-
annotations | 6 // VMOptions=--no-use-osr --optimization-counter-threshold=10 --enable-inlining-
annotations --no-background-compilation |
| 7 | 7 |
| 8 import "package:expect/expect.dart"; | 8 import "package:expect/expect.dart"; |
| 9 | 9 |
| 10 const alwaysInline = "AlwaysInline"; | 10 const alwaysInline = "AlwaysInline"; |
| 11 const noInline = "NeverInline"; | 11 const noInline = "NeverInline"; |
| 12 | 12 |
| 13 B G; | 13 B G; |
| 14 | 14 |
| 15 @noInline | 15 @noInline |
| 16 modify() { | 16 modify() { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 43 foo(b); | 43 foo(b); |
| 44 return b.bval; | 44 return b.bval; |
| 45 } | 45 } |
| 46 | 46 |
| 47 main() { | 47 main() { |
| 48 foo(new C()); | 48 foo(new C()); |
| 49 foo(new B()); | 49 foo(new B()); |
| 50 for (var i = 0; i < 100; i++) test(); | 50 for (var i = 0; i < 100; i++) test(); |
| 51 Expect.equals(123, test()); | 51 Expect.equals(123, test()); |
| 52 } | 52 } |
| OLD | NEW |