| Index: tests/language/vm/allocation_sinking_vm_test.dart
|
| diff --git a/tests/language/vm/allocation_sinking_vm_test.dart b/tests/language/vm/allocation_sinking_vm_test.dart
|
| index 24d58950bb9cb832c42ec77b7a200653dae0bf38..619235a6186d882f8e79db5e5da0434499808c7f 100644
|
| --- a/tests/language/vm/allocation_sinking_vm_test.dart
|
| +++ b/tests/language/vm/allocation_sinking_vm_test.dart
|
| @@ -4,6 +4,7 @@
|
| // Test allocation sinking optimization.
|
| // VMOptions=--optimization-counter-threshold=10 --no-use-osr
|
|
|
| +import 'dart:typed_data';
|
| import 'package:expect/expect.dart';
|
|
|
| class Point {
|
| @@ -21,6 +22,22 @@ class C {
|
| C(this.p);
|
| }
|
|
|
| +
|
| +class Pointx4 {
|
| + var x, y;
|
| +
|
| + Pointx4(this.x, this.y);
|
| +
|
| + operator * (other) {
|
| + return x * other.x + y * other.y;
|
| + }
|
| +}
|
| +
|
| +class Cx4 {
|
| + var p;
|
| + Cx4(this.p);
|
| +}
|
| +
|
| class D {
|
| var p;
|
| D(this.p);
|
| @@ -55,6 +72,13 @@ test1(c, x, y) {
|
| return d * d;
|
| }
|
|
|
| +test1x4(c, x, y, z, w) {
|
| + var a = new Pointx4(x - z, y + w);
|
| + var b = new Pointx4(x + w, y + z);
|
| + var d = new Pointx4(c.p * a, c.p * b);
|
| + return d * d;
|
| +}
|
| +
|
| effects() {
|
| // This function should not be inlinable.
|
| try { } catch (e) { }
|
| @@ -144,12 +168,22 @@ main() {
|
|
|
| // Compute initial values.
|
| final x0 = test1(c, 11.11, 22.22);
|
| + var fc = new Cx4(new Pointx4(new Float32x4(1.0, 1.0, 1.0, 1.0),
|
| + new Float32x4(1.0, 1.0, 1.0, 1.0)));
|
| + final fx0 = test1x4(fc, new Float32x4(1.0, 1.0, 1.0, 1.0),
|
| + new Float32x4(1.0, 1.0, 1.0, 1.0),
|
| + new Float32x4(1.0, 1.0, 1.0, 1.0),
|
| + new Float32x4(1.0, 1.0, 1.0, 1.0));
|
| final y0 = testForwardingThroughEffects(c, 11.11, 22.22);
|
| final z0 = testIdentity(c.p);
|
|
|
| // Force optimization.
|
| for (var i = 0; i < 100; i++) {
|
| test1(c, i.toDouble(), i.toDouble());
|
| + test1x4(fc, new Float32x4(1.0, 1.0, 1.0, 1.0),
|
| + new Float32x4(1.0, 1.0, 1.0, 1.0),
|
| + new Float32x4(1.0, 1.0, 1.0, 1.0),
|
| + new Float32x4(1.0, 1.0, 1.0, 1.0));
|
| testForwardingThroughEffects(c, i.toDouble(), i.toDouble());
|
| testIdentity(c.p);
|
| foo2();
|
|
|