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

Unified Diff: test/codegen/expect/DeltaBlue.js

Issue 1093143004: fixes #52, fields shadowing getters/setters or other fields (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « test/codegen/expect/BenchmarkBase.js ('k') | test/codegen/expect/cascade.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « test/codegen/expect/BenchmarkBase.js ('k') | test/codegen/expect/cascade.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698