Index: test/codegen/expect/DeltaBlue.js |
diff --git a/test/codegen/expect/DeltaBlue.js b/test/codegen/expect/DeltaBlue.js |
index 4e96c45442a5b2dc43bdef348545543f100ec9b5..9f07a8ead82b193f8bbfd4f51772864de3b123d1 100644 |
--- a/test/codegen/expect/DeltaBlue.js |
+++ b/test/codegen/expect/DeltaBlue.js |
@@ -14,10 +14,18 @@ var DeltaBlue; |
projectionTest(100); |
} |
} |
+ let value$ = Symbol('value'); |
+ let name$ = Symbol('name'); |
class Strength extends core.Object { |
+ get value() { |
+ return this[value$]; |
+ } |
+ get name() { |
+ return this[name$]; |
+ } |
Strength(value, name) { |
- this.value = value; |
- this.name = name; |
+ this[value$] = value; |
+ 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); |
@@ -42,9 +50,13 @@ var DeltaBlue; |
let NORMAL = new Strength(4, "normal"); |
let WEAK_DEFAULT = new Strength(5, "weakDefault"); |
let WEAKEST = new Strength(6, "weakest"); |
+ let strength$ = Symbol('strength'); |
class Constraint extends core.Object { |
+ get strength() { |
+ return this[strength$]; |
+ } |
Constraint(strength) { |
- this.strength = strength; |
+ this[strength$] = strength; |
} |
addConstraint() { |
this.addToGraph(); |
@@ -78,10 +90,21 @@ var DeltaBlue; |
return false; |
} |
} |
+ let myOutput$ = Symbol('myOutput'); |
+ let satisfied = Symbol('satisfied'); |
class UnaryConstraint extends Constraint { |
+ get myOutput() { |
+ return this[myOutput$]; |
+ } |
+ get satisfied() { |
+ return this[satisfied]; |
+ } |
+ set satisfied(value) { |
+ this[satisfied] = value; |
+ } |
UnaryConstraint(myOutput, strength) { |
Jennifer Messerly
2015/04/17 18:38:55
This parameter name is why the renamer didn't name
|
- this.myOutput = myOutput; |
- this.satisfied = false; |
+ this[myOutput$] = myOutput; |
+ this[satisfied] = false; |
super.Constraint(strength); |
this.addConstraint(); |
} |
@@ -135,11 +158,32 @@ var DeltaBlue; |
let NONE = 1; |
let FORWARD = 2; |
let BACKWARD = 0; |
+ let v1$ = Symbol('v1'); |
+ let v2$ = Symbol('v2'); |
+ let direction = Symbol('direction'); |
class BinaryConstraint extends Constraint { |
+ get v1() { |
+ return this[v1$]; |
+ } |
+ set v1(value) { |
+ this[v1$] = value; |
+ } |
+ get v2() { |
+ return this[v2$]; |
+ } |
+ set v2(value) { |
+ this[v2$] = value; |
+ } |
+ get direction() { |
+ return this[direction]; |
+ } |
+ set direction(value) { |
+ this[direction] = value; |
+ } |
BinaryConstraint(v1, v2, strength) { |
- this.v1 = v1; |
- this.v2 = v2; |
- this.direction = NONE; |
+ this[v1$] = v1; |
+ this[v2$] = v2; |
+ this[direction] = NONE; |
super.Constraint(strength); |
this.addConstraint(); |
} |
@@ -195,10 +239,18 @@ var DeltaBlue; |
this.direction = NONE; |
} |
} |
+ let scale$ = Symbol('scale'); |
+ let offset$ = Symbol('offset'); |
class ScaleConstraint extends BinaryConstraint { |
+ get scale() { |
+ return this[scale$]; |
+ } |
+ get offset() { |
+ return this[offset$]; |
+ } |
ScaleConstraint(src, scale, offset, dest, strength) { |
- this.scale = scale; |
- this.offset = offset; |
+ this[scale$] = scale; |
+ this[offset$] = offset; |
super.BinaryConstraint(src, dest, strength); |
} |
addToGraph() { |
@@ -240,15 +292,61 @@ var DeltaBlue; |
this.output().value = this.input().value; |
} |
} |
+ let constraints = Symbol('constraints'); |
+ let determinedBy = Symbol('determinedBy'); |
+ let mark = Symbol('mark'); |
+ let walkStrength = Symbol('walkStrength'); |
+ let stay = Symbol('stay'); |
+ let value$0 = Symbol('value'); |
+ let name$0 = Symbol('name'); |
class Variable extends core.Object { |
+ get constraints() { |
+ return this[constraints]; |
+ } |
+ set constraints(value) { |
+ this[constraints] = value; |
+ } |
+ get determinedBy() { |
+ return this[determinedBy]; |
+ } |
+ set determinedBy(value) { |
+ this[determinedBy] = value; |
+ } |
+ get mark() { |
+ return this[mark]; |
+ } |
+ set mark(value) { |
+ this[mark] = value; |
+ } |
+ get walkStrength() { |
+ return this[walkStrength]; |
+ } |
+ set walkStrength(value) { |
+ this[walkStrength] = value; |
+ } |
+ get stay() { |
+ return this[stay]; |
+ } |
+ set stay(value) { |
+ this[stay] = value; |
+ } |
+ get value() { |
+ return this[value$0]; |
+ } |
+ set value(value) { |
+ this[value$0] = value; |
+ } |
+ get name() { |
+ return this[name$0]; |
+ } |
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; |
+ this[constraints] = new core.List$(Constraint).from([]); |
+ this[name$0] = name; |
+ this[value$0] = value; |
+ this[determinedBy] = null; |
+ this[mark] = 0; |
+ this[walkStrength] = WEAKEST; |
+ this[stay] = true; |
} |
addConstraint(c) { |
this.constraints[core.$add](c); |
@@ -259,9 +357,16 @@ var DeltaBlue; |
this.determinedBy = null; |
} |
} |
+ let currentMark = Symbol('currentMark'); |
class Planner extends core.Object { |
Planner() { |
- this.currentMark = 0; |
+ this[currentMark] = 0; |
+ } |
+ get currentMark() { |
+ return this[currentMark]; |
+ } |
+ set currentMark(value) { |
+ this[currentMark] = value; |
} |
incrementalAdd(c) { |
let mark = this.newMark(); |
@@ -355,9 +460,16 @@ var DeltaBlue; |
} |
} |
} |
+ let list = Symbol('list'); |
class Plan extends core.Object { |
Plan() { |
- this.list = new core.List$(Constraint).from([]); |
+ this[list] = new core.List$(Constraint).from([]); |
+ } |
+ get list() { |
+ return this[list]; |
+ } |
+ set list(value) { |
+ this[list] = value; |
} |
addConstraint(c) { |
this.list[core.$add](c); |