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

Side by Side Diff: test/codegen/expect/DeltaBlue.js

Issue 1131143002: Angular workarounds (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Rebase on latest Created 5 years, 7 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 unified diff | Download patch
OLDNEW
1 var DeltaBlue = dart.defineLibrary(DeltaBlue, {}); 1 var DeltaBlue = dart.defineLibrary(DeltaBlue, {});
2 var BenchmarkBase = dart.import(BenchmarkBase); 2 var BenchmarkBase = dart.import(BenchmarkBase);
3 var core = dart.import(core); 3 var core = dart.import(core);
4 (function(exports, BenchmarkBase, core) { 4 (function(exports, BenchmarkBase, core) {
5 'use strict'; 5 'use strict';
6 // Function main: () → dynamic 6 // Function main: () → dynamic
7 function main() { 7 function main() {
8 new DeltaBlue().report(); 8 new DeltaBlue().report();
9 } 9 }
10 class DeltaBlue extends BenchmarkBase.BenchmarkBase { 10 class DeltaBlue extends BenchmarkBase.BenchmarkBase {
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 isInput() { 132 isInput() {
133 return true; 133 return true;
134 } 134 }
135 execute() {} 135 execute() {}
136 } 136 }
137 let NONE = 1; 137 let NONE = 1;
138 let FORWARD = 2; 138 let FORWARD = 2;
139 let BACKWARD = 0; 139 let BACKWARD = 0;
140 class BinaryConstraint extends Constraint { 140 class BinaryConstraint extends Constraint {
141 BinaryConstraint(v1, v2, strength) { 141 BinaryConstraint(v1, v2, strength) {
142 this.direction = NONE;
142 this.v1 = v1; 143 this.v1 = v1;
143 this.v2 = v2; 144 this.v2 = v2;
144 this.direction = NONE;
145 super.Constraint(strength); 145 super.Constraint(strength);
146 this.addConstraint(); 146 this.addConstraint();
147 } 147 }
148 chooseMethod(mark) { 148 chooseMethod(mark) {
149 if (this.v1.mark == mark) { 149 if (this.v1.mark == mark) {
150 this.direction = this.v2.mark != mark && dart.notNull(Strength.stronger( this.strength, this.v2.walkStrength)) ? FORWARD : NONE; 150 this.direction = this.v2.mark != mark && dart.notNull(Strength.stronger( this.strength, this.v2.walkStrength)) ? FORWARD : NONE;
151 } 151 }
152 if (this.v2.mark == mark) { 152 if (this.v2.mark == mark) {
153 this.direction = this.v1.mark != mark && dart.notNull(Strength.stronger( this.strength, this.v1.walkStrength)) ? BACKWARD : NONE; 153 this.direction = this.v1.mark != mark && dart.notNull(Strength.stronger( this.strength, this.v1.walkStrength)) ? BACKWARD : NONE;
154 } 154 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 EqualityConstraint(v1, v2, strength) { 238 EqualityConstraint(v1, v2, strength) {
239 super.BinaryConstraint(v1, v2, strength); 239 super.BinaryConstraint(v1, v2, strength);
240 } 240 }
241 execute() { 241 execute() {
242 this.output().value = this.input().value; 242 this.output().value = this.input().value;
243 } 243 }
244 } 244 }
245 class Variable extends core.Object { 245 class Variable extends core.Object {
246 Variable(name, value) { 246 Variable(name, value) {
247 this.constraints = dart.setType([], core.List$(Constraint)); 247 this.constraints = dart.setType([], core.List$(Constraint));
248 this.walkStrength = WEAKEST;
248 this.name = name; 249 this.name = name;
249 this.value = value; 250 this.value = value;
250 this.determinedBy = null; 251 this.determinedBy = null;
251 this.mark = 0; 252 this.mark = 0;
252 this.walkStrength = WEAKEST;
253 this.stay = true; 253 this.stay = true;
254 } 254 }
255 addConstraint(c) { 255 addConstraint(c) {
256 this.constraints[core.$add](c); 256 this.constraints[core.$add](c);
257 } 257 }
258 removeConstraint(c) { 258 removeConstraint(c) {
259 this.constraints[core.$remove](c); 259 this.constraints[core.$remove](c);
260 if (dart.equals(this.determinedBy, c)) 260 if (dart.equals(this.determinedBy, c))
261 this.determinedBy = null; 261 this.determinedBy = null;
262 } 262 }
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 exports.BinaryConstraint = BinaryConstraint; 462 exports.BinaryConstraint = BinaryConstraint;
463 exports.ScaleConstraint = ScaleConstraint; 463 exports.ScaleConstraint = ScaleConstraint;
464 exports.EqualityConstraint = EqualityConstraint; 464 exports.EqualityConstraint = EqualityConstraint;
465 exports.Variable = Variable; 465 exports.Variable = Variable;
466 exports.Planner = Planner; 466 exports.Planner = Planner;
467 exports.Plan = Plan; 467 exports.Plan = Plan;
468 exports.chainTest = chainTest; 468 exports.chainTest = chainTest;
469 exports.projectionTest = projectionTest; 469 exports.projectionTest = projectionTest;
470 exports.change = change; 470 exports.change = change;
471 })(DeltaBlue, BenchmarkBase, core); 471 })(DeltaBlue, BenchmarkBase, core);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698