| Index: tests/language/store_to_load_forwarding_phis_vm_test.dart
|
| diff --git a/tests/language/store_to_load_forwarding_phis_vm_test.dart b/tests/language/store_to_load_forwarding_phis_vm_test.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f8e7aef88a6f2eda514180ed83c15413ee736157
|
| --- /dev/null
|
| +++ b/tests/language/store_to_load_forwarding_phis_vm_test.dart
|
| @@ -0,0 +1,31 @@
|
| +// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
|
| +// for details. All rights reserved. Use of this source code is governed by a
|
| +// BSD-style license that can be found in the LICENSE file.
|
| +// Test correct handling of phis with only environment uses that were inserted
|
| +// by store to load forwarding.
|
| +// VMOptions=--optimization_counter_threshold=100
|
| +
|
| +import 'dart:async';
|
| +
|
| +class A {
|
| + var _foo;
|
| +
|
| + get foo {
|
| + if (_foo == null) {
|
| + _foo = new A();
|
| + }
|
| + return _foo;
|
| + }
|
| +}
|
| +
|
| +foo(obj) {
|
| + var a = obj.foo;
|
| + return new Future.immediate(null).then((val) { });
|
| +}
|
| +
|
| +main() {
|
| + final obj = new A();
|
| + for (var i = 0; i < 200; i++) {
|
| + foo(obj);
|
| + }
|
| +}
|
|
|