| 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 correct handling of phis with only environment uses that were inserted |
| 5 // by store to load forwarding. |
| 6 // VMOptions=--optimization_counter_threshold=100 |
| 7 |
| 8 import 'dart:async'; |
| 9 |
| 10 class A { |
| 11 var _foo; |
| 12 |
| 13 get foo { |
| 14 if (_foo == null) { |
| 15 _foo = new A(); |
| 16 } |
| 17 return _foo; |
| 18 } |
| 19 } |
| 20 |
| 21 foo(obj) { |
| 22 var a = obj.foo; |
| 23 return new Future.immediate(null).then((val) { }); |
| 24 } |
| 25 |
| 26 main() { |
| 27 final obj = new A(); |
| 28 for (var i = 0; i < 200; i++) { |
| 29 foo(obj); |
| 30 } |
| 31 } |
| OLD | NEW |