| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 the V8 project authors. All rights reserved. |
| 2 // Copyright 1996 John Maloney and Mario Wolczko. | 2 // Copyright 1996 John Maloney and Mario Wolczko. |
| 3 | 3 |
| 4 // This program is free software; you can redistribute it and/or modify | 4 // This program is free software; you can redistribute it and/or modify |
| 5 // it under the terms of the GNU General Public License as published by | 5 // it under the terms of the GNU General Public License as published by |
| 6 // the Free Software Foundation; either version 2 of the License, or | 6 // the Free Software Foundation; either version 2 of the License, or |
| 7 // (at your option) any later version. | 7 // (at your option) any later version. |
| 8 // | 8 // |
| 9 // This program is distributed in the hope that it will be useful, | 9 // This program is distributed in the hope that it will be useful, |
| 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 Strength.weakestOf = function (s1, s2) { | 114 Strength.weakestOf = function (s1, s2) { |
| 115 return this.weaker(s1, s2) ? s1 : s2; | 115 return this.weaker(s1, s2) ? s1 : s2; |
| 116 } | 116 } |
| 117 | 117 |
| 118 Strength.strongest = function (s1, s2) { | 118 Strength.strongest = function (s1, s2) { |
| 119 return this.stronger(s1, s2) ? s1 : s2; | 119 return this.stronger(s1, s2) ? s1 : s2; |
| 120 } | 120 } |
| 121 | 121 |
| 122 Strength.prototype.nextWeaker = function () { | 122 Strength.prototype.nextWeaker = function () { |
| 123 switch (this.strengthValue) { | 123 switch (this.strengthValue) { |
| 124 case 0: return Strength.WEAKEST; | 124 case 0: return Strength.STRONG_PREFERRED; |
| 125 case 1: return Strength.WEAK_DEFAULT; | 125 case 1: return Strength.PREFERRED; |
| 126 case 2: return Strength.NORMAL; | 126 case 2: return Strength.STRONG_DEFAULT; |
| 127 case 3: return Strength.STRONG_DEFAULT; | 127 case 3: return Strength.NORMAL; |
| 128 case 4: return Strength.PREFERRED; | 128 case 4: return Strength.WEAK_DEFAULT; |
| 129 case 5: return Strength.REQUIRED; | 129 case 5: return Strength.WEAKEST; |
| 130 } | 130 } |
| 131 } | 131 } |
| 132 | 132 |
| 133 // Strength constants. | 133 // Strength constants. |
| 134 Strength.REQUIRED = new Strength(0, "required"); | 134 Strength.REQUIRED = new Strength(0, "required"); |
| 135 Strength.STONG_PREFERRED = new Strength(1, "strongPreferred"); | 135 Strength.STRONG_PREFERRED = new Strength(1, "strongPreferred"); |
| 136 Strength.PREFERRED = new Strength(2, "preferred"); | 136 Strength.PREFERRED = new Strength(2, "preferred"); |
| 137 Strength.STRONG_DEFAULT = new Strength(3, "strongDefault"); | 137 Strength.STRONG_DEFAULT = new Strength(3, "strongDefault"); |
| 138 Strength.NORMAL = new Strength(4, "normal"); | 138 Strength.NORMAL = new Strength(4, "normal"); |
| 139 Strength.WEAK_DEFAULT = new Strength(5, "weakDefault"); | 139 Strength.WEAK_DEFAULT = new Strength(5, "weakDefault"); |
| 140 Strength.WEAKEST = new Strength(6, "weakest"); | 140 Strength.WEAKEST = new Strength(6, "weakest"); |
| 141 | 141 |
| 142 /* --- * | 142 /* --- * |
| 143 * C o n s t r a i n t | 143 * C o n s t r a i n t |
| 144 * --- */ | 144 * --- */ |
| 145 | 145 |
| 146 /** | 146 /** |
| 147 * An abstract class representing a system-maintainable relationship | 147 * An abstract class representing a system-maintainable relationship |
| 148 * (or "constraint") between a set of variables. A constraint supplies | 148 * (or "constraint") between a set of variables. A constraint supplies |
| 149 * a strength instance variable; concrete subclasses provide a means | 149 * a strength instance variable; concrete subclasses provide a means |
| 150 * of storing the constrained variables and other information required | 150 * of storing the constrained variables and other information required |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 edit.destroyConstraint(); | 871 edit.destroyConstraint(); |
| 872 } | 872 } |
| 873 | 873 |
| 874 // Global variable holding the current planner. | 874 // Global variable holding the current planner. |
| 875 var planner = null; | 875 var planner = null; |
| 876 | 876 |
| 877 function deltaBlue() { | 877 function deltaBlue() { |
| 878 chainTest(100); | 878 chainTest(100); |
| 879 projectionTest(100); | 879 projectionTest(100); |
| 880 } | 880 } |
| OLD | NEW |