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

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

Issue 395943003: Support allocation sinking for compound objects. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address comments Created 6 years, 5 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
Index: tests/language/vm/load_to_load_forwarding_vm_test.dart
diff --git a/tests/language/vm/load_to_load_forwarding_vm_test.dart b/tests/language/vm/load_to_load_forwarding_vm_test.dart
index 5926305c36f8c7f76ddb37fcaba08d85e3d3fbf0..01dcabd48736baffd3b668dcd04180623da14f56 100644
--- a/tests/language/vm/load_to_load_forwarding_vm_test.dart
+++ b/tests/language/vm/load_to_load_forwarding_vm_test.dart
@@ -284,6 +284,63 @@ testIndexedAliasedStore4(b) {
}
+testIndexedAliasedStore5(b) {
+ var a = new List(2),
+ c = new List(2);
+ a[0] = 1;
+ b[0] = 3;
+ c[0] = 4;
+ b[0] = 5;
+ return a[0] << 8 | c[0];
+}
+
+
+testIndexedAliasedStore6(x, b) {
+ var a = new List(2),
+ c = new List(2);
+ b = x ? b : c;
+ a[0] = 1;
+ b[0] = 3;
+ c[0] = 4;
+ b[0] = 5;
+ return a[0] << 8 | c[0];
+}
+
+testIndexedAliasedStore7(x, b, i) {
+ var a = new List(2),
+ c = new List(2);
+ b = x ? b : c;
+ a[0] = 1;
+ b[0] = 3;
+ c[0] = 4;
+ b[i] = 5;
+ return a[0] << 8 | c[0];
+}
+
+
+testIndexedAliasedStore8(x, b, i) {
+ var a = new List(2),
+ c = new List(2);
+ b = x ? b : c;
+ a[i] = 1;
+ b[0] = 3;
+ c[i] = 4;
+ b[0] = 5;
+ return a[i] << 8 | c[i];
+}
+
+
+testIndexedAliasedStore9(b, i) {
+ var a = new List(2),
+ c = new List(2);
+ a[i] = 1;
+ b[0] = 3;
+ c[i] = 4;
+ b[0] = 5;
+ return a[i] << 8 | c[i];
+}
+
+
var indices = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
class Z {
@@ -316,7 +373,7 @@ main() {
final obj = new X(new X(new X(null)));
- final cs = new C(0, new C(1, new C(2, null)));
+ final cs = new C(0, new C(1, new C(2, null)));
for (var i = 0; i < 20; i++) {
Expect.listEquals([0x02010000, 0x03020100], foo(new A(0, 0)));
@@ -378,6 +435,34 @@ main() {
Expect.equals(1, testIndexedAliasedStore4(array));
}
+ for (var i = 0; i < 20; i++) {
+ Expect.equals(1 << 8 | 4, testIndexedAliasedStore5(array));
+ }
+
+ for (var i = 0; i < 20; i++) {
+ Expect.equals(1 << 8 | 4, testIndexedAliasedStore6(true, array));
+ Expect.equals(1 << 8 | 5, testIndexedAliasedStore6(false, array));
+ }
+
+ for (var i = 0; i < 20; i++) {
+ Expect.equals(1 << 8 | 4, testIndexedAliasedStore7(true, array, 0));
+ Expect.equals(1 << 8 | 4, testIndexedAliasedStore7(true, array, 1));
+ Expect.equals(1 << 8 | 5, testIndexedAliasedStore7(false, array, 0));
+ Expect.equals(1 << 8 | 4, testIndexedAliasedStore7(false, array, 1));
+ }
+
+ for (var i = 0; i < 20; i++) {
+ Expect.equals(1 << 8 | 4, testIndexedAliasedStore8(true, array, 0));
+ Expect.equals(1 << 8 | 4, testIndexedAliasedStore8(true, array, 1));
+ Expect.equals(1 << 8 | 5, testIndexedAliasedStore8(false, array, 0));
+ Expect.equals(1 << 8 | 4, testIndexedAliasedStore8(false, array, 1));
+ }
+
+ for (var i = 0; i < 20; i++) {
+ Expect.equals(1 << 8 | 4, testIndexedAliasedStore9(array, 0));
+ Expect.equals(1 << 8 | 4, testIndexedAliasedStore9(array, 1));
+ }
+
var test_array = new List(1);
for (var i = 0; i < 20; i++) {
Expect.equals(43, testAliasingStoreIndexed(global_array));
« runtime/vm/intermediate_language.h ('K') | « tests/language/vm/allocation_sinking_vm_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698