| OLD | NEW |
| 1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to |
| 2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. |
| 3 | 3 |
| 4 library engine.constant; | 4 library engine.constant; |
| 5 | 5 |
| 6 import 'java_core.dart'; | 6 import 'java_core.dart'; |
| 7 import 'source.dart' show Source; | 7 import 'source.dart' show Source; |
| 8 import 'error.dart' show AnalysisError, ErrorCode, CompileTimeErrorCode; | 8 import 'error.dart' show AnalysisError, ErrorCode, CompileTimeErrorCode; |
| 9 import 'scanner.dart' show TokenType; | 9 import 'scanner.dart' show TokenType; |
| 10 import 'ast.dart'; | 10 import 'ast.dart'; |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 * whose value needs to be computed. | 186 * whose value needs to be computed. |
| 187 * @param unit the compilation unit defining the constant variables to be adde
d | 187 * @param unit the compilation unit defining the constant variables to be adde
d |
| 188 */ | 188 */ |
| 189 void add(CompilationUnit unit) { | 189 void add(CompilationUnit unit) { |
| 190 unit.accept(_constantFinder); | 190 unit.accept(_constantFinder); |
| 191 } | 191 } |
| 192 /** | 192 /** |
| 193 * Compute values for all of the constant variables in the compilation units t
hat were added. | 193 * Compute values for all of the constant variables in the compilation units t
hat were added. |
| 194 */ | 194 */ |
| 195 void computeValues() { | 195 void computeValues() { |
| 196 return; |
| 196 _declarationMap = _constantFinder.variableMap; | 197 _declarationMap = _constantFinder.variableMap; |
| 197 for (MapEntry<VariableElement, VariableDeclaration> entry in getMapEntrySet(
_declarationMap)) { | 198 for (MapEntry<VariableElement, VariableDeclaration> entry in getMapEntrySet(
_declarationMap)) { |
| 198 VariableElement element = entry.getKey(); | 199 VariableElement element = entry.getKey(); |
| 199 ReferenceFinder referenceFinder = new ReferenceFinder(element, _referenceG
raph); | 200 ReferenceFinder referenceFinder = new ReferenceFinder(element, _referenceG
raph); |
| 200 _referenceGraph.addNode(element); | 201 _referenceGraph.addNode(element); |
| 201 entry.getValue().initializer.accept(referenceFinder); | 202 entry.getValue().initializer.accept(referenceFinder); |
| 202 } | 203 } |
| 203 while (!_referenceGraph.isEmpty()) { | 204 while (!_referenceGraph.isEmpty()) { |
| 204 VariableElement element = _referenceGraph.removeSink(); | 205 VariableElement element = _referenceGraph.removeSink(); |
| 205 while (element != null) { | 206 while (element != null) { |
| (...skipping 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1412 * @param value the value to be represented as a result object | 1413 * @param value the value to be represented as a result object |
| 1413 * @return a result object representing the given value | 1414 * @return a result object representing the given value |
| 1414 */ | 1415 */ |
| 1415 ValidResult valueOf3(double value) => new ValidResult(value); | 1416 ValidResult valueOf3(double value) => new ValidResult(value); |
| 1416 /** | 1417 /** |
| 1417 * Return a result object representing the given value. | 1418 * Return a result object representing the given value. |
| 1418 * @param value the value to be represented as a result object | 1419 * @param value the value to be represented as a result object |
| 1419 * @return a result object representing the given value | 1420 * @return a result object representing the given value |
| 1420 */ | 1421 */ |
| 1421 ValidResult valueOf4(String value) => new ValidResult(value); | 1422 ValidResult valueOf4(String value) => new ValidResult(value); |
| 1422 } | 1423 } |
| OLD | NEW |