diff --git a/pkg/analyzer/lib/src/error.dart b/pkg/analyzer/lib/src/error.dart index b138e41bd80..6bb5c672276 100644 --- a/pkg/analyzer/lib/src/error.dart +++ b/pkg/analyzer/lib/src/error.dart @@ -6,7 +6,6 @@ library error; import 'dart:collection'; import 'generated/error.dart'; -import 'generated/source.dart'; /// The maximum line length when printing extracted source code when converting /// an [AnalyzerError] to a string. @@ -92,13 +91,3 @@ class AnalyzerError implements Exception { return builder.toString(); } } - -// A content receiver that collects all the content into a string. -class _ContentReceiver implements Source_ContentReceiver { - final _buffer = new StringBuffer(); - - String get result => _buffer.toString(); - - void accept(String contents, _) => - _buffer.write(contents.substring(0, contents.length)); -} diff --git a/pkg/analyzer/lib/src/generated/constant.dart b/pkg/analyzer/lib/src/generated/constant.dart index a361edefe00..e94ade9491c 100644 --- a/pkg/analyzer/lib/src/generated/constant.dart +++ b/pkg/analyzer/lib/src/generated/constant.dart @@ -1474,24 +1474,6 @@ class ConstantVisitor extends UnifyingAstVisitor { _error(node, null); return null; } - - /** - * Return `true` if the given element represents the 'length' getter in class 'String'. - * - * @param element the element being tested. - * @return - */ - bool _isStringLength(Element element) { - if (element is! PropertyAccessorElement) { - return false; - } - PropertyAccessorElement accessor = element as PropertyAccessorElement; - if (!accessor.isGetter || accessor.name != "length") { - return false; - } - Element parent = accessor.enclosingElement; - return parent == _typeProvider.stringType.element; - } } /** diff --git a/pkg/analyzer/lib/src/generated/element.dart b/pkg/analyzer/lib/src/generated/element.dart index 58710601cee..617faf3ff74 100644 --- a/pkg/analyzer/lib/src/generated/element.dart +++ b/pkg/analyzer/lib/src/generated/element.dart @@ -6811,44 +6811,6 @@ class InterfaceTypeImpl extends TypeImpl implements InterfaceType { return new List.from(result); } - /** - * Return the "least upper bound" of the given types under the assumption that the types have the - * same element and differ only in terms of the type arguments. The resulting type is composed by - * comparing the corresponding type arguments, keeping those that are the same, and using - * 'dynamic' for those that are different. - * - * @param firstType the first type - * @param secondType the second type - * @return the "least upper bound" of the given types - */ - static InterfaceType _leastUpperBound(InterfaceType firstType, InterfaceType secondType) { - if (firstType == secondType) { - return firstType; - } - List firstArguments = firstType.typeArguments; - List secondArguments = secondType.typeArguments; - int argumentCount = firstArguments.length; - if (argumentCount == 0) { - return firstType; - } - List lubArguments = new List(argumentCount); - for (int i = 0; i < argumentCount; i++) { - // - // Ideally we would take the least upper bound of the two argument types, but this can cause - // an infinite recursion (such as when finding the least upper bound of String and num). - // - if (firstArguments[i] == secondArguments[i]) { - lubArguments[i] = firstArguments[i]; - } - if (lubArguments[i] == null) { - lubArguments[i] = DynamicTypeImpl.instance; - } - } - InterfaceTypeImpl lub = new InterfaceTypeImpl.con1(firstType.element); - lub.typeArguments = lubArguments; - return lub; - } - /** * An array containing the actual types of the type arguments. */ diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart index 9164e8e4d68..b7968749b77 100644 --- a/pkg/analyzer/lib/src/generated/engine.dart +++ b/pkg/analyzer/lib/src/generated/engine.dart @@ -2804,15 +2804,6 @@ class AnalysisContextImpl implements InternalAnalysisContext { } } - /** - * Return a string with debugging information about the given source (the full name and - * modification stamp of the source). - * - * @param source the source for which a debugging string is to be produced - * @return debugging information about the given source - */ - String _debuggingString(Source source) => "'${source.fullName}' [${getModificationStamp(source)}]"; - /** * Return an array containing all of the change notices that are waiting to be returned. If there * are no notices, then return either `null` or an empty array, depending on the value of @@ -8586,25 +8577,6 @@ class DartEntry extends SourceEntry { || descriptor == RESOLVED_UNIT || descriptor == VERIFICATION_ERRORS; } - - /** - * Given that the specified flag is being transitioned to the given state, set the value of the - * flag to the value that should be kept in the cache. - * - * @param index the index of the flag whose state is being set - * @param state the state to which the value is being transitioned - */ - void _updateValueOfFlag(int index, CacheState state) { - if (state == CacheState.VALID) { - throw new IllegalArgumentException("Use setValue() to set the state to VALID"); - } else if (state != CacheState.IN_PROCESS) { - // - // If the value is in process, we can leave the current value in the cache for any 'get' - // methods to access. - // - _setFlag(index, false); - } - } } /** @@ -13138,15 +13110,6 @@ abstract class SourceEntry { return buffer.toString(); } - /** - * Set the value of all of the flags with the given [indexes] to false. - */ - void _clearFlags(List indexes) { - for (int i = 0; i < indexes.length; i++) { - _flags = BooleanArray.set(_flags, indexes[i], false); - } - } - /** * Flush the value of the data described by the [descriptor]. */ diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart index ec2f4e3905e..21aadca68e5 100644 --- a/pkg/analyzer/lib/src/generated/error_verifier.dart +++ b/pkg/analyzer/lib/src/generated/error_verifier.dart @@ -5256,30 +5256,6 @@ class ErrorVerifier extends RecursiveAstVisitor { return false; } - /** - * Return `true` if the given type represents the class `Future` from the - * `dart:async` library. - * - * @param type the type to be tested - * @return `true` if the given type represents the class `Future` from the - * `dart:async` library - */ - bool _isFuture(DartType type) { - if (type is InterfaceType) { - InterfaceType interfaceType = type; - if (interfaceType.name == "Future") { - ClassElement element = interfaceType.element; - if (element != null) { - LibraryElement library = element.library; - if (library.name == "dart.async") { - return true; - } - } - } - } - return false; - } - /** * Return `true` iff the passed [ClassElement] has a method, getter or setter that * matches the name of the passed [ExecutableElement] in either the class itself, or one of diff --git a/pkg/analyzer/lib/src/generated/sdk_io.dart b/pkg/analyzer/lib/src/generated/sdk_io.dart index 565f080fc76..91a189691b6 100644 --- a/pkg/analyzer/lib/src/generated/sdk_io.dart +++ b/pkg/analyzer/lib/src/generated/sdk_io.dart @@ -511,13 +511,6 @@ class DirectoryBasedDartSdk implements DartSdk { } } - /** - * Ensure that the dart VM is executable. If it is not, make it executable and log that it was - * necessary for us to do so. - */ - void _ensureVmIsExecutable() { - } - /** * Return the name of the file containing the Dartium executable. * diff --git a/pkg/analyzer/test/generated/all_the_rest.dart b/pkg/analyzer/test/generated/all_the_rest.dart index 128ea5d2063..89458468a1c 100644 --- a/pkg/analyzer/test/generated/all_the_rest.dart +++ b/pkg/analyzer/test/generated/all_the_rest.dart @@ -10045,9 +10045,6 @@ $scriptBody XmlValidator_Tag _t(String tag, XmlValidator_Attributes attributes, String content, [List children = XmlValidator_Tag.EMPTY_LIST]) => new XmlValidator_Tag(tag, attributes, content, children); - XmlValidator_Tag _t2(String tag, XmlValidator_Attributes attributes, - [List children = XmlValidator_Tag.EMPTY_LIST]) => - new XmlValidator_Tag(tag, attributes, null, children); XmlValidator_Tag _t3(String tag, String content, [List children = XmlValidator_Tag.EMPTY_LIST]) => new XmlValidator_Tag(tag, new XmlValidator_Attributes(), content, children);