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

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

Issue 1249043006: fix truncate call to use extension method (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: format Created 5 years, 5 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
« no previous file with comments | « lib/src/codegen/js_codegen.dart ('k') | test/codegen/expect/expect.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 dart_library.library('DeltaBlue', null, /* Imports */[ 1 dart_library.library('DeltaBlue', null, /* Imports */[
2 "dart_runtime/dart", 2 "dart_runtime/dart",
3 'BenchmarkBase', 3 'BenchmarkBase',
4 'dart/core' 4 'dart/core'
5 ], /* Lazy imports */[ 5 ], /* Lazy imports */[
6 ], function(exports, dart, BenchmarkBase, core) { 6 ], function(exports, dart, BenchmarkBase, core) {
7 'use strict'; 7 'use strict';
8 let dartx = dart.dartx; 8 let dartx = dart.dartx;
9 function main() { 9 function main() {
10 new DeltaBlue().report(); 10 new DeltaBlue().report();
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 this.offset.removeConstraint(this); 279 this.offset.removeConstraint(this);
280 } 280 }
281 markInputs(mark) { 281 markInputs(mark) {
282 super.markInputs(mark); 282 super.markInputs(mark);
283 this.scale.mark = this.offset.mark = mark; 283 this.scale.mark = this.offset.mark = mark;
284 } 284 }
285 execute() { 285 execute() {
286 if (this.direction == FORWARD) { 286 if (this.direction == FORWARD) {
287 this.v2.value = dart.notNull(this.v1.value) * dart.notNull(this.scale.va lue) + dart.notNull(this.offset.value); 287 this.v2.value = dart.notNull(this.v1.value) * dart.notNull(this.scale.va lue) + dart.notNull(this.offset.value);
288 } else { 288 } else {
289 this.v1.value = ((dart.notNull(this.v2.value) - dart.notNull(this.offset .value)) / dart.notNull(this.scale.value)).truncate(); 289 this.v1.value = ((dart.notNull(this.v2.value) - dart.notNull(this.offset .value)) / dart.notNull(this.scale.value))[dartx.truncate]();
290 } 290 }
291 } 291 }
292 recalculate() { 292 recalculate() {
293 let ihn = this.input(), out = this.output(); 293 let ihn = this.input(), out = this.output();
294 out.walkStrength = Strength.weakest(this.strength, ihn.walkStrength); 294 out.walkStrength = Strength.weakest(this.strength, ihn.walkStrength);
295 out.stay = dart.notNull(ihn.stay) && dart.notNull(this.scale.stay) && dart .notNull(this.offset.stay); 295 out.stay = dart.notNull(ihn.stay) && dart.notNull(this.scale.stay) && dart .notNull(this.offset.stay);
296 if (dart.notNull(out.stay)) 296 if (dart.notNull(out.stay))
297 this.execute(); 297 this.execute();
298 } 298 }
299 } 299 }
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 exports.BinaryConstraint = BinaryConstraint; 559 exports.BinaryConstraint = BinaryConstraint;
560 exports.ScaleConstraint = ScaleConstraint; 560 exports.ScaleConstraint = ScaleConstraint;
561 exports.EqualityConstraint = EqualityConstraint; 561 exports.EqualityConstraint = EqualityConstraint;
562 exports.Variable = Variable; 562 exports.Variable = Variable;
563 exports.Planner = Planner; 563 exports.Planner = Planner;
564 exports.Plan = Plan; 564 exports.Plan = Plan;
565 exports.chainTest = chainTest; 565 exports.chainTest = chainTest;
566 exports.projectionTest = projectionTest; 566 exports.projectionTest = projectionTest;
567 exports.change = change; 567 exports.change = change;
568 }); 568 });
OLDNEW
« no previous file with comments | « lib/src/codegen/js_codegen.dart ('k') | test/codegen/expect/expect.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698