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

Unified Diff: tests/language/vm/load_to_load_forwarding_vm_test.dart

Issue 184273005: VM: Fix bug in aliasing computation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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/vm/load_to_load_forwarding_vm_test.dart
===================================================================
--- tests/language/vm/load_to_load_forwarding_vm_test.dart (revision 33324)
+++ tests/language/vm/load_to_load_forwarding_vm_test.dart (working copy)
@@ -268,6 +268,23 @@
}
var indices = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
+class Z {
+ var x = 42;
+}
+
+var global_array = new List<Z>(1);
+
+side_effect() {
+ global_array[0].x++;
+}
+
+testAliasingStoreIndexed(array) {
+ var z = new Z();
+ array[0] = z;
+ side_effect();
+ return z.x;
+}
+
main() {
final fixed = new List(10);
final growable = [];
@@ -332,4 +349,9 @@
for (var i = 0; i < 20; i++) {
Expect.equals(4, testIndexedAliasedStore2(array, array, indices[1]));
}
+
+ var test_array = new List(1);
+ for (var i = 0; i < 20; i++) {
+ Expect.equals(43, testAliasingStoreIndexed(global_array));
+ }
}
« 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