| Index: pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
|
| diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
|
| index 37e91fe15c09214d1a826163661a57e93dcd4d6c..02bbe20faf6e886b795b0740ebed2f43fe6717e9 100644
|
| --- a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
|
| +++ b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
|
| @@ -579,10 +579,9 @@ class GetMutableVariable extends Primitive {
|
| /// values. This can be seen as a dereferencing assignment:
|
| ///
|
| /// { [variable] := [value]; [body] }
|
| -class SetMutableVariable extends InteriorExpression {
|
| +class SetMutableVariable extends Primitive {
|
| final Reference<MutableVariable> variable;
|
| final Reference<Primitive> value;
|
| - Expression body;
|
|
|
| SetMutableVariable(MutableVariable variable, Primitive value)
|
| : this.variable = new Reference<MutableVariable>(variable),
|
| @@ -590,10 +589,8 @@ class SetMutableVariable extends InteriorExpression {
|
|
|
| accept(Visitor visitor) => visitor.visitSetMutableVariable(this);
|
|
|
| - Expression plug(Expression expr) {
|
| - assert(body == null);
|
| - return body = expr;
|
| - }
|
| + bool get isSafeForElimination => false;
|
| + bool get isSafeForReordering => false;
|
| }
|
|
|
| /// Invoke a continuation in tail position.
|
| @@ -662,22 +659,19 @@ class Branch extends TailExpression {
|
| }
|
|
|
| /// Directly assigns to a field on a given object.
|
| -class SetField extends InteriorExpression {
|
| +class SetField extends Primitive {
|
| final Reference<Primitive> object;
|
| FieldElement field;
|
| final Reference<Primitive> value;
|
| - Expression body;
|
|
|
| SetField(Primitive object, this.field, Primitive value)
|
| : this.object = new Reference<Primitive>(object),
|
| this.value = new Reference<Primitive>(value);
|
|
|
| - Expression plug(Expression expr) {
|
| - assert(body == null);
|
| - return body = expr;
|
| - }
|
| -
|
| accept(Visitor visitor) => visitor.visitSetField(this);
|
| +
|
| + bool get isSafeForElimination => false;
|
| + bool get isSafeForReordering => false;
|
| }
|
|
|
| /// Directly reads from a field on a given object.
|
| @@ -778,21 +772,18 @@ class GetStatic extends Primitive {
|
| }
|
|
|
| /// Sets the value of a static field.
|
| -class SetStatic extends InteriorExpression {
|
| +class SetStatic extends Primitive {
|
| final FieldElement element;
|
| final Reference<Primitive> value;
|
| - Expression body;
|
| final SourceInformation sourceInformation;
|
|
|
| SetStatic(this.element, Primitive value, [this.sourceInformation])
|
| : this.value = new Reference<Primitive>(value);
|
|
|
| - Expression plug(Expression expr) {
|
| - assert(body == null);
|
| - return body = expr;
|
| - }
|
| -
|
| accept(Visitor visitor) => visitor.visitSetStatic(this);
|
| +
|
| + bool get isSafeForElimination => false;
|
| + bool get isSafeForReordering => false;
|
| }
|
|
|
| /// Reads the value of a lazily initialized static field.
|
| @@ -1288,7 +1279,6 @@ class RecursiveVisitor implements Visitor {
|
| processSetMutableVariable(node);
|
| processReference(node.variable);
|
| processReference(node.value);
|
| - visit(node.body);
|
| }
|
|
|
| processGetLazyStatic(GetLazyStatic node) {}
|
| @@ -1370,7 +1360,6 @@ class RecursiveVisitor implements Visitor {
|
| processSetField(node);
|
| processReference(node.object);
|
| processReference(node.value);
|
| - visit(node.body);
|
| }
|
|
|
| processGetField(GetField node) {}
|
| @@ -1388,7 +1377,6 @@ class RecursiveVisitor implements Visitor {
|
| visitSetStatic(SetStatic node) {
|
| processSetStatic(node);
|
| processReference(node.value);
|
| - visit(node.body);
|
| }
|
|
|
| processCreateBox(CreateBox node) {}
|
|
|