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

Side by Side Diff: pkg/analyzer/lib/src/generated/element.dart

Issue 509073008: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/parser.dart » ('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 (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.element; 8 library engine.element;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 10964 matching lines...) Expand 10 before | Expand all | Expand 10 after
10975 * Instances of the class `TypeParameterTypeImpl` defines the behavior of object s representing 10975 * Instances of the class `TypeParameterTypeImpl` defines the behavior of object s representing
10976 * the type introduced by a type parameter. 10976 * the type introduced by a type parameter.
10977 */ 10977 */
10978 class TypeParameterTypeImpl extends TypeImpl implements TypeParameterType { 10978 class TypeParameterTypeImpl extends TypeImpl implements TypeParameterType {
10979 /** 10979 /**
10980 * An empty array of type parameter types. 10980 * An empty array of type parameter types.
10981 */ 10981 */
10982 static List<TypeParameterType> EMPTY_ARRAY = new List<TypeParameterType>(0); 10982 static List<TypeParameterType> EMPTY_ARRAY = new List<TypeParameterType>(0);
10983 10983
10984 /** 10984 /**
10985 * The name of the type Type from dart.core.
10986 */
10987 static String _TYPE_CLASS_NAME = "Type";
10988
10989 /**
10990 * Return an array containing the type parameter types defined by the given ar ray of type 10985 * Return an array containing the type parameter types defined by the given ar ray of type
10991 * parameter elements. 10986 * parameter elements.
10992 * 10987 *
10993 * @param typeParameters the type parameter elements defining the type paramet er types to be 10988 * @param typeParameters the type parameter elements defining the type paramet er types to be
10994 * returned 10989 * returned
10995 * @return the type parameter types defined by the type parameter elements 10990 * @return the type parameter types defined by the type parameter elements
10996 */ 10991 */
10997 static List<TypeParameterType> getTypes(List<TypeParameterElement> typeParamet ers) { 10992 static List<TypeParameterType> getTypes(List<TypeParameterElement> typeParamet ers) {
10998 int count = typeParameters.length; 10993 int count = typeParameters.length;
10999 if (count == 0) { 10994 if (count == 0) {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
11054 return true; 11049 return true;
11055 } 11050 }
11056 return _isMoreSpecificThan(s, new HashSet<DartType>(), withDynamic, visitedT ypePairs); 11051 return _isMoreSpecificThan(s, new HashSet<DartType>(), withDynamic, visitedT ypePairs);
11057 } 11052 }
11058 11053
11059 @override 11054 @override
11060 bool internalIsSubtypeOf(DartType type, Set<TypeImpl_TypePair> visitedTypePair s) => isMoreSpecificThan2(type, true, new HashSet<TypeImpl_TypePair>()); 11055 bool internalIsSubtypeOf(DartType type, Set<TypeImpl_TypePair> visitedTypePair s) => isMoreSpecificThan2(type, true, new HashSet<TypeImpl_TypePair>());
11061 11056
11062 bool _isMoreSpecificThan(DartType s, Set<DartType> visitedTypes, bool withDyna mic, Set<TypeImpl_TypePair> visitedTypePairs) { 11057 bool _isMoreSpecificThan(DartType s, Set<DartType> visitedTypes, bool withDyna mic, Set<TypeImpl_TypePair> visitedTypePairs) {
11063 // 11058 //
11064 // If s is of type Type from dart.core, return true
11065 //
11066 Element sElement = s.element;
11067 LibraryElement sLibrary = sElement != null ? sElement.library : null;
11068 if (sLibrary != null && sLibrary.isDartCore && s.name == _TYPE_CLASS_NAME) {
11069 return true;
11070 }
11071 //
11072 // T is a type parameter and S is the upper bound of T. 11059 // T is a type parameter and S is the upper bound of T.
11073 // 11060 //
11074 DartType bound = element.bound; 11061 DartType bound = element.bound;
11075 if (s == bound) { 11062 if (s == bound) {
11076 return true; 11063 return true;
11077 } 11064 }
11078 // 11065 //
11079 // T is a type parameter and S is Object. 11066 // T is a type parameter and S is Object.
11080 // 11067 //
11081 if (s.isObject) { 11068 if (s.isObject) {
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
11648 if (type is UnionType) { 11635 if (type is UnionType) {
11649 return (type as UnionTypeImpl).internalUnionTypeIsSuperTypeOf(this, visite dTypePairs); 11636 return (type as UnionTypeImpl).internalUnionTypeIsSuperTypeOf(this, visite dTypePairs);
11650 } 11637 }
11651 // The only subtype relations that pertain to void are therefore: 11638 // The only subtype relations that pertain to void are therefore:
11652 // void <: void (by reflexivity) 11639 // void <: void (by reflexivity)
11653 // bottom <: void (as bottom is a subtype of all types). 11640 // bottom <: void (as bottom is a subtype of all types).
11654 // void <: dynamic (as dynamic is a supertype of all types) 11641 // void <: dynamic (as dynamic is a supertype of all types)
11655 return identical(type, this) || identical(type, DynamicTypeImpl.instance); 11642 return identical(type, this) || identical(type, DynamicTypeImpl.instance);
11656 } 11643 }
11657 } 11644 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698