| 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 library engine; | 3 library engine; |
| 4 import 'dart:collection' show HasNextIterator; | 4 import 'dart:collection' show HasNextIterator; |
| 5 import 'java_core.dart'; | 5 import 'java_core.dart'; |
| 6 import 'java_engine.dart'; | 6 import 'java_engine.dart'; |
| 7 import 'instrumentation.dart'; | 7 import 'instrumentation.dart'; |
| 8 import 'error.dart'; | 8 import 'error.dart'; |
| 9 import 'source.dart'; | 9 import 'source.dart'; |
| 10 import 'scanner.dart' show Token, CharBufferScanner, StringScanner; | 10 import 'scanner.dart' show Token, CharBufferScanner, StringScanner; |
| (...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1102 return _resolutionState._resolvedUnitState; | 1102 return _resolutionState._resolvedUnitState; |
| 1103 } else if (identical(descriptor, DartEntry.HINTS)) { | 1103 } else if (identical(descriptor, DartEntry.HINTS)) { |
| 1104 return _resolutionState._hintsState; | 1104 return _resolutionState._hintsState; |
| 1105 } else { | 1105 } else { |
| 1106 throw new IllegalArgumentException("Invalid descriptor: ${descriptor}"
); | 1106 throw new IllegalArgumentException("Invalid descriptor: ${descriptor}"
); |
| 1107 } | 1107 } |
| 1108 } | 1108 } |
| 1109 state = state._nextState; | 1109 state = state._nextState; |
| 1110 } | 1110 } |
| 1111 ; | 1111 ; |
| 1112 return CacheState.INVALID; | 1112 if (identical(descriptor, DartEntry.RESOLUTION_ERRORS) || identical(descript
or, DartEntry.RESOLVED_UNIT) || identical(descriptor, DartEntry.HINTS)) { |
| 1113 return CacheState.INVALID; |
| 1114 } else { |
| 1115 throw new IllegalArgumentException("Invalid descriptor: ${descriptor}"); |
| 1116 } |
| 1113 } | 1117 } |
| 1114 Object getValue(DataDescriptor descriptor) { | 1118 Object getValue(DataDescriptor descriptor) { |
| 1115 if (identical(descriptor, DartEntry.ELEMENT)) { | 1119 if (identical(descriptor, DartEntry.ELEMENT)) { |
| 1116 return _element as Object; | 1120 return _element as Object; |
| 1117 } else if (identical(descriptor, DartEntry.EXPORTED_LIBRARIES)) { | 1121 } else if (identical(descriptor, DartEntry.EXPORTED_LIBRARIES)) { |
| 1118 return _exportedLibraries as Object; | 1122 return _exportedLibraries as Object; |
| 1119 } else if (identical(descriptor, DartEntry.IMPORTED_LIBRARIES)) { | 1123 } else if (identical(descriptor, DartEntry.IMPORTED_LIBRARIES)) { |
| 1120 return _importedLibraries as Object; | 1124 return _importedLibraries as Object; |
| 1121 } else if (identical(descriptor, DartEntry.INCLUDED_PARTS)) { | 1125 } else if (identical(descriptor, DartEntry.INCLUDED_PARTS)) { |
| 1122 return _includedParts as Object; | 1126 return _includedParts as Object; |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1304 * @param lineInfo the line information resulting from parsing the compilation
unit | 1308 * @param lineInfo the line information resulting from parsing the compilation
unit |
| 1305 * @param unit the AST structure resulting from parsing the compilation unit | 1309 * @param unit the AST structure resulting from parsing the compilation unit |
| 1306 * @param errors the parse errors resulting from parsing the compilation unit | 1310 * @param errors the parse errors resulting from parsing the compilation unit |
| 1307 */ | 1311 */ |
| 1308 void setParseResults(int modificationStamp, LineInfo lineInfo, CompilationUnit
unit, List<AnalysisError> errors) { | 1312 void setParseResults(int modificationStamp, LineInfo lineInfo, CompilationUnit
unit, List<AnalysisError> errors) { |
| 1309 if (getState(SourceEntry.LINE_INFO) != CacheState.VALID) { | 1313 if (getState(SourceEntry.LINE_INFO) != CacheState.VALID) { |
| 1310 setValue(SourceEntry.LINE_INFO, lineInfo); | 1314 setValue(SourceEntry.LINE_INFO, lineInfo); |
| 1311 } | 1315 } |
| 1312 if (_parsedUnitState != CacheState.VALID) { | 1316 if (_parsedUnitState != CacheState.VALID) { |
| 1313 _parsedUnit = unit; | 1317 _parsedUnit = unit; |
| 1318 _parsedUnitState = CacheState.VALID; |
| 1314 } | 1319 } |
| 1315 if (_parseErrorsState != CacheState.VALID) { | 1320 if (_parseErrorsState != CacheState.VALID) { |
| 1316 _parseErrors = errors == null ? AnalysisError.NO_ERRORS : errors; | 1321 _parseErrors = errors == null ? AnalysisError.NO_ERRORS : errors; |
| 1322 _parseErrorsState = CacheState.VALID; |
| 1317 } | 1323 } |
| 1318 } | 1324 } |
| 1319 void setState(DataDescriptor<Object> descriptor, CacheState state) { | 1325 void setState(DataDescriptor<Object> descriptor, CacheState state) { |
| 1320 if (identical(descriptor, DartEntry.ELEMENT)) { | 1326 if (identical(descriptor, DartEntry.ELEMENT)) { |
| 1321 _element = updatedValue(state, _element, null); | 1327 _element = updatedValue(state, _element, null); |
| 1322 _elementState = state; | 1328 _elementState = state; |
| 1323 } else if (identical(descriptor, DartEntry.EXPORTED_LIBRARIES)) { | 1329 } else if (identical(descriptor, DartEntry.EXPORTED_LIBRARIES)) { |
| 1324 _exportedLibraries = updatedValue(state, _exportedLibraries, Source.EMPTY_
ARRAY); | 1330 _exportedLibraries = updatedValue(state, _exportedLibraries, Source.EMPTY_
ARRAY); |
| 1325 _exportedLibrariesState = state; | 1331 _exportedLibrariesState = state; |
| 1326 } else if (identical(descriptor, DartEntry.IMPORTED_LIBRARIES)) { | 1332 } else if (identical(descriptor, DartEntry.IMPORTED_LIBRARIES)) { |
| (...skipping 3630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4957 } | 4963 } |
| 4958 errorsForSource.add(event); | 4964 errorsForSource.add(event); |
| 4959 } | 4965 } |
| 4960 } | 4966 } |
| 4961 /** | 4967 /** |
| 4962 * Instances of the class `ResolutionEraser` remove any resolution information f
rom an AST | 4968 * Instances of the class `ResolutionEraser` remove any resolution information f
rom an AST |
| 4963 * structure when used to visit that structure. | 4969 * structure when used to visit that structure. |
| 4964 */ | 4970 */ |
| 4965 class ResolutionEraser extends GeneralizingASTVisitor<Object> { | 4971 class ResolutionEraser extends GeneralizingASTVisitor<Object> { |
| 4966 Object visitAssignmentExpression(AssignmentExpression node) { | 4972 Object visitAssignmentExpression(AssignmentExpression node) { |
| 4973 node.staticElement = null; |
| 4967 node.element = null; | 4974 node.element = null; |
| 4968 return super.visitAssignmentExpression(node); | 4975 return super.visitAssignmentExpression(node); |
| 4969 } | 4976 } |
| 4970 Object visitBinaryExpression(BinaryExpression node) { | 4977 Object visitBinaryExpression(BinaryExpression node) { |
| 4978 node.staticElement = null; |
| 4971 node.element = null; | 4979 node.element = null; |
| 4972 return super.visitBinaryExpression(node); | 4980 return super.visitBinaryExpression(node); |
| 4973 } | 4981 } |
| 4974 Object visitCompilationUnit(CompilationUnit node) { | 4982 Object visitCompilationUnit(CompilationUnit node) { |
| 4975 node.element = null; | 4983 node.element = null; |
| 4976 return super.visitCompilationUnit(node); | 4984 return super.visitCompilationUnit(node); |
| 4977 } | 4985 } |
| 4978 Object visitConstructorDeclaration(ConstructorDeclaration node) { | 4986 Object visitConstructorDeclaration(ConstructorDeclaration node) { |
| 4979 node.element = null; | 4987 node.element = null; |
| 4980 return super.visitConstructorDeclaration(node); | 4988 return super.visitConstructorDeclaration(node); |
| 4981 } | 4989 } |
| 4982 Object visitConstructorName(ConstructorName node) { | 4990 Object visitConstructorName(ConstructorName node) { |
| 4991 node.staticElement = null; |
| 4983 node.element = null; | 4992 node.element = null; |
| 4984 return super.visitConstructorName(node); | 4993 return super.visitConstructorName(node); |
| 4985 } | 4994 } |
| 4986 Object visitDirective(Directive node) { | 4995 Object visitDirective(Directive node) { |
| 4987 node.element = null; | 4996 node.element = null; |
| 4988 return super.visitDirective(node); | 4997 return super.visitDirective(node); |
| 4989 } | 4998 } |
| 4990 Object visitExpression(Expression node) { | 4999 Object visitExpression(Expression node) { |
| 4991 node.staticType = null; | 5000 node.staticType = null; |
| 4992 node.propagatedType = null; | 5001 node.propagatedType = null; |
| 4993 return super.visitExpression(node); | 5002 return super.visitExpression(node); |
| 4994 } | 5003 } |
| 4995 Object visitFunctionExpression(FunctionExpression node) { | 5004 Object visitFunctionExpression(FunctionExpression node) { |
| 4996 node.element = null; | 5005 node.element = null; |
| 4997 return super.visitFunctionExpression(node); | 5006 return super.visitFunctionExpression(node); |
| 4998 } | 5007 } |
| 4999 Object visitFunctionExpressionInvocation(FunctionExpressionInvocation node) { | 5008 Object visitFunctionExpressionInvocation(FunctionExpressionInvocation node) { |
| 5009 node.staticElement = null; |
| 5000 node.element = null; | 5010 node.element = null; |
| 5001 return super.visitFunctionExpressionInvocation(node); | 5011 return super.visitFunctionExpressionInvocation(node); |
| 5002 } | 5012 } |
| 5003 Object visitIndexExpression(IndexExpression node) { | 5013 Object visitIndexExpression(IndexExpression node) { |
| 5014 node.staticElement = null; |
| 5004 node.element = null; | 5015 node.element = null; |
| 5005 return super.visitIndexExpression(node); | 5016 return super.visitIndexExpression(node); |
| 5006 } | 5017 } |
| 5007 Object visitInstanceCreationExpression(InstanceCreationExpression node) { | 5018 Object visitInstanceCreationExpression(InstanceCreationExpression node) { |
| 5019 node.staticElement = null; |
| 5008 node.element = null; | 5020 node.element = null; |
| 5009 return super.visitInstanceCreationExpression(node); | 5021 return super.visitInstanceCreationExpression(node); |
| 5010 } | 5022 } |
| 5011 Object visitPostfixExpression(PostfixExpression node) { | 5023 Object visitPostfixExpression(PostfixExpression node) { |
| 5024 node.staticElement = null; |
| 5012 node.element = null; | 5025 node.element = null; |
| 5013 return super.visitPostfixExpression(node); | 5026 return super.visitPostfixExpression(node); |
| 5014 } | 5027 } |
| 5015 Object visitPrefixExpression(PrefixExpression node) { | 5028 Object visitPrefixExpression(PrefixExpression node) { |
| 5029 node.staticElement = null; |
| 5016 node.element = null; | 5030 node.element = null; |
| 5017 return super.visitPrefixExpression(node); | 5031 return super.visitPrefixExpression(node); |
| 5018 } | 5032 } |
| 5019 Object visitRedirectingConstructorInvocation(RedirectingConstructorInvocation
node) { | 5033 Object visitRedirectingConstructorInvocation(RedirectingConstructorInvocation
node) { |
| 5034 node.staticElement = null; |
| 5020 node.element = null; | 5035 node.element = null; |
| 5021 return super.visitRedirectingConstructorInvocation(node); | 5036 return super.visitRedirectingConstructorInvocation(node); |
| 5022 } | 5037 } |
| 5023 Object visitSimpleIdentifier(SimpleIdentifier node) { | 5038 Object visitSimpleIdentifier(SimpleIdentifier node) { |
| 5039 node.staticElement = null; |
| 5024 node.element = null; | 5040 node.element = null; |
| 5025 return super.visitSimpleIdentifier(node); | 5041 return super.visitSimpleIdentifier(node); |
| 5026 } | 5042 } |
| 5027 Object visitSuperConstructorInvocation(SuperConstructorInvocation node) { | 5043 Object visitSuperConstructorInvocation(SuperConstructorInvocation node) { |
| 5044 node.staticElement = null; |
| 5028 node.element = null; | 5045 node.element = null; |
| 5029 return super.visitSuperConstructorInvocation(node); | 5046 return super.visitSuperConstructorInvocation(node); |
| 5030 } | 5047 } |
| 5031 } | 5048 } |
| 5032 /** | 5049 /** |
| 5033 * The interface `Logger` defines the behavior of objects that can be used to re
ceive | 5050 * The interface `Logger` defines the behavior of objects that can be used to re
ceive |
| 5034 * information about errors within the analysis engine. Implementations usually
write this | 5051 * information about errors within the analysis engine. Implementations usually
write this |
| 5035 * information to a file, but can also record the information for later use (suc
h as during testing) | 5052 * information to a file, but can also record the information for later use (suc
h as during testing) |
| 5036 * or even ignore the information. | 5053 * or even ignore the information. |
| 5037 * | 5054 * |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5086 } | 5103 } |
| 5087 void logError2(String message, Exception exception) { | 5104 void logError2(String message, Exception exception) { |
| 5088 } | 5105 } |
| 5089 void logError3(Exception exception) { | 5106 void logError3(Exception exception) { |
| 5090 } | 5107 } |
| 5091 void logInformation(String message) { | 5108 void logInformation(String message) { |
| 5092 } | 5109 } |
| 5093 void logInformation2(String message, Exception exception) { | 5110 void logInformation2(String message, Exception exception) { |
| 5094 } | 5111 } |
| 5095 } | 5112 } |
| OLD | NEW |