| Index: test/codegen/expect/DeltaBlue.js
|
| diff --git a/test/codegen/expect/DeltaBlue.js b/test/codegen/expect/DeltaBlue.js
|
| index 4e96c45442a5b2dc43bdef348545543f100ec9b5..744303f2bf38f69ed244fdfde21ec222a5e6996c 100644
|
| --- a/test/codegen/expect/DeltaBlue.js
|
| +++ b/test/codegen/expect/DeltaBlue.js
|
| @@ -16,8 +16,8 @@ var DeltaBlue;
|
| }
|
| class Strength extends core.Object {
|
| Strength(value, name) {
|
| - this.value = value;
|
| - this.name = name;
|
| + dart.initField(Strength, this, 'value', value);
|
| + dart.initField(Strength, this, 'name', name);
|
| }
|
| nextWeaker() {
|
| return /* Unimplemented const */new core.List$(Strength).from([STRONG_PREFERRED, PREFERRED, STRONG_DEFAULT, NORMAL, WEAK_DEFAULT, WEAKEST])[core.$get](this.value);
|
| @@ -44,7 +44,7 @@ var DeltaBlue;
|
| let WEAKEST = new Strength(6, "weakest");
|
| class Constraint extends core.Object {
|
| Constraint(strength) {
|
| - this.strength = strength;
|
| + dart.initField(Constraint, this, 'strength', strength);
|
| }
|
| addConstraint() {
|
| this.addToGraph();
|
| @@ -80,8 +80,8 @@ var DeltaBlue;
|
| }
|
| class UnaryConstraint extends Constraint {
|
| UnaryConstraint(myOutput, strength) {
|
| - this.myOutput = myOutput;
|
| - this.satisfied = false;
|
| + dart.initField(UnaryConstraint, this, 'myOutput', myOutput);
|
| + dart.initField(UnaryConstraint, this, 'satisfied', false);
|
| super.Constraint(strength);
|
| this.addConstraint();
|
| }
|
| @@ -137,9 +137,9 @@ var DeltaBlue;
|
| let BACKWARD = 0;
|
| class BinaryConstraint extends Constraint {
|
| BinaryConstraint(v1, v2, strength) {
|
| - this.v1 = v1;
|
| - this.v2 = v2;
|
| - this.direction = NONE;
|
| + dart.initField(BinaryConstraint, this, 'v1', v1);
|
| + dart.initField(BinaryConstraint, this, 'v2', v2);
|
| + dart.initField(BinaryConstraint, this, 'direction', NONE);
|
| super.Constraint(strength);
|
| this.addConstraint();
|
| }
|
| @@ -197,8 +197,8 @@ var DeltaBlue;
|
| }
|
| class ScaleConstraint extends BinaryConstraint {
|
| ScaleConstraint(src, scale, offset, dest, strength) {
|
| - this.scale = scale;
|
| - this.offset = offset;
|
| + dart.initField(ScaleConstraint, this, 'scale', scale);
|
| + dart.initField(ScaleConstraint, this, 'offset', offset);
|
| super.BinaryConstraint(src, dest, strength);
|
| }
|
| addToGraph() {
|
| @@ -242,13 +242,13 @@ var DeltaBlue;
|
| }
|
| class Variable extends core.Object {
|
| Variable(name, value) {
|
| - this.constraints = new core.List$(Constraint).from([]);
|
| - this.name = name;
|
| - this.value = value;
|
| - this.determinedBy = null;
|
| - this.mark = 0;
|
| - this.walkStrength = WEAKEST;
|
| - this.stay = true;
|
| + dart.initField(Variable, this, 'constraints', new core.List$(Constraint).from([]));
|
| + dart.initField(Variable, this, 'name', name);
|
| + dart.initField(Variable, this, 'value', value);
|
| + dart.initField(Variable, this, 'determinedBy', null);
|
| + dart.initField(Variable, this, 'mark', 0);
|
| + dart.initField(Variable, this, 'walkStrength', WEAKEST);
|
| + dart.initField(Variable, this, 'stay', true);
|
| }
|
| addConstraint(c) {
|
| this.constraints[core.$add](c);
|
| @@ -261,7 +261,7 @@ var DeltaBlue;
|
| }
|
| class Planner extends core.Object {
|
| Planner() {
|
| - this.currentMark = 0;
|
| + dart.initField(Planner, this, 'currentMark', 0);
|
| }
|
| incrementalAdd(c) {
|
| let mark = this.newMark();
|
| @@ -357,7 +357,7 @@ var DeltaBlue;
|
| }
|
| class Plan extends core.Object {
|
| Plan() {
|
| - this.list = new core.List$(Constraint).from([]);
|
| + dart.initField(Plan, this, 'list', new core.List$(Constraint).from([]));
|
| }
|
| addConstraint(c) {
|
| this.list[core.$add](c);
|
|
|