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

Side by Side Diff: pkg/front_end/testcases/DeltaBlue.dart

Issue 2833073002: Stoppp using trippple consonants (Closed)
Patch Set: More spolling Created 3 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 unified diff | Download patch
« no previous file with comments | « pkg/front_end/test/fasta/scanner/scanner_suite.dart ('k') | pkg/pkg.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 Google Inc. All Rights Reserved. 1 // Copyright 2011 Google Inc. All Rights Reserved.
2 // Copyright 1996 John Maloney and Mario Wolczko 2 // Copyright 1996 John Maloney and Mario Wolczko
3 // 3 //
4 // This file is part of GNU Smalltalk. 4 // This file is part of GNU Smalltalk.
5 // 5 //
6 // GNU Smalltalk is free software; you can redistribute it and/or modify it 6 // GNU Smalltalk is free software; you can redistribute it and/or modify it
7 // under the terms of the GNU General Public License as published by the Free 7 // under the terms of the GNU General Public License as published by the Free
8 // Software Foundation; either version 2, or (at your option) any later version. 8 // Software Foundation; either version 2, or (at your option) any later version.
9 // 9 //
10 // GNU Smalltalk is distributed in the hope that it will be useful, but WITHOUT 10 // GNU Smalltalk is distributed in the hope that it will be useful, but WITHOUT
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 623
624 /** 624 /**
625 * This is the standard DeltaBlue benchmark. A long chain of equality 625 * This is the standard DeltaBlue benchmark. A long chain of equality
626 * constraints is constructed with a stay constraint on one end. An 626 * constraints is constructed with a stay constraint on one end. An
627 * edit constraint is then added to the opposite end and the time is 627 * edit constraint is then added to the opposite end and the time is
628 * measured for adding and removing this constraint, and extracting 628 * measured for adding and removing this constraint, and extracting
629 * and executing a constraint satisfaction plan. There are two cases. 629 * and executing a constraint satisfaction plan. There are two cases.
630 * In case 1, the added constraint is stronger than the stay 630 * In case 1, the added constraint is stronger than the stay
631 * constraint and values must propagate down the entire length of the 631 * constraint and values must propagate down the entire length of the
632 * chain. In case 2, the added constraint is weaker than the stay 632 * chain. In case 2, the added constraint is weaker than the stay
633 * constraint so it cannot be accomodated. The cost in this case is, 633 * constraint so it cannot be accommodated. The cost in this case is,
634 * of course, very low. Typical situations lie somewhere between these 634 * of course, very low. Typical situations lie somewhere between these
635 * two extremes. 635 * two extremes.
636 */ 636 */
637 void chainTest(int n) { 637 void chainTest(int n) {
638 planner = new Planner(); 638 planner = new Planner();
639 Variable prev = null, first = null, last = null; 639 Variable prev = null, first = null, last = null;
640 // Build chain of n equality constraints. 640 // Build chain of n equality constraints.
641 for (int i = 0; i <= n; i++) { 641 for (int i = 0; i <= n; i++) {
642 Variable v = new Variable("v$i", 0); 642 Variable v = new Variable("v$i", 0);
643 if (prev != null) new EqualityConstraint(prev, v, REQUIRED); 643 if (prev != null) new EqualityConstraint(prev, v, REQUIRED);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 EditConstraint edit = new EditConstraint(v, PREFERRED); 696 EditConstraint edit = new EditConstraint(v, PREFERRED);
697 Plan plan = planner.extractPlanFromConstraints(<EditConstraint>[edit]); 697 Plan plan = planner.extractPlanFromConstraints(<EditConstraint>[edit]);
698 for (int i = 0; i < 10; i++) { 698 for (int i = 0; i < 10; i++) {
699 v.value = newValue; 699 v.value = newValue;
700 plan.execute(); 700 plan.execute();
701 } 701 }
702 edit.destroyConstraint(); 702 edit.destroyConstraint();
703 } 703 }
704 704
705 Planner planner; 705 Planner planner;
OLDNEW
« no previous file with comments | « pkg/front_end/test/fasta/scanner/scanner_suite.dart ('k') | pkg/pkg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698