Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: tests/language/store_to_load_forwarding_phis_vm_test.dart

Issue 12391060: In LoadOptimizer::EmitPhis check for environment uses of phis. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+ }
+}
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698