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

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

Issue 581733002: New analyzer snaphot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rollback Java changes 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 | « pkg/analyzer/lib/src/generated/ast.dart ('k') | pkg/analyzer/lib/src/generated/resolver.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 11189 matching lines...) Expand 10 before | Expand all | Expand 10 after
11200 prefix = ","; 11200 prefix = ",";
11201 } 11201 }
11202 builder.append("}"); 11202 builder.append("}");
11203 } 11203 }
11204 11204
11205 @override 11205 @override
11206 bool internalEquals(Object object, Set<ElementPair> visitedElementPairs) => th is == object; 11206 bool internalEquals(Object object, Set<ElementPair> visitedElementPairs) => th is == object;
11207 11207
11208 @override 11208 @override
11209 bool internalIsMoreSpecificThan(DartType type, bool withDynamic, Set<TypeImpl_ TypePair> visitedTypePairs) { 11209 bool internalIsMoreSpecificThan(DartType type, bool withDynamic, Set<TypeImpl_ TypePair> visitedTypePairs) {
11210 // TODO(collinsn): what version of subtyping do we want? 11210 // What version of subtyping do we want? See discussion below in [internalIs SubtypeOf].
11211 // 11211 //
11212 // The more unsound version: any. 11212 // The more unsound version: any.
11213 /* 11213 for (DartType t in _types) {
11214 for (Type t : types) { 11214 if ((t as TypeImpl).internalIsMoreSpecificThan(type, withDynamic, visitedT ypePairs)) {
11215 if (((TypeImpl) t).internalIsMoreSpecificThan(type, withDynamic, visitedTy pePairs)) {
11216 return true; 11215 return true;
11217 } 11216 }
11218 } 11217 }
11219 return false; 11218 return false;
11220 */
11221 // The less unsound version: all.
11222 for (DartType t in _types) {
11223 if (!(t as TypeImpl).internalIsMoreSpecificThan(type, withDynamic, visited TypePairs)) {
11224 return false;
11225 }
11226 }
11227 return true;
11228 } 11219 }
11229 11220
11230 @override 11221 @override
11231 bool internalIsSubtypeOf(DartType type, Set<TypeImpl_TypePair> visitedTypePair s) { 11222 bool internalIsSubtypeOf(DartType type, Set<TypeImpl_TypePair> visitedTypePair s) {
11232 // TODO(collinsn): what version of subtyping do we want?
11233 //
11234 // The more unsound version: any. 11223 // The more unsound version: any.
11235 /* 11224 for (DartType t in _types) {
11236 for (Type t : types) { 11225 if ((t as TypeImpl).internalIsSubtypeOf(type, visitedTypePairs)) {
11237 if (((TypeImpl) t).internalIsSubtypeOf(type, visitedTypePairs)) {
11238 return true; 11226 return true;
11239 } 11227 }
11240 } 11228 }
11241 return false; 11229 return false;
11242 */
11243 // The less unsound version: all.
11244 for (DartType t in _types) {
11245 if (!(t as TypeImpl).internalIsSubtypeOf(type, visitedTypePairs)) {
11246 return false;
11247 }
11248 }
11249 return true;
11250 } 11230 }
11251 11231
11252 /** 11232 /**
11253 * The more-specific-than test for union types on the RHS is uniform in non-un ion LHSs. So, other 11233 * The more-specific-than test for union types on the RHS is uniform in non-un ion LHSs. So, other
11254 * `TypeImpl`s can call this method to implement `internalIsMoreSpecificThan` for 11234 * `TypeImpl`s can call this method to implement `internalIsMoreSpecificThan` for
11255 * union types. 11235 * union types.
11256 * 11236 *
11257 * @param type 11237 * @param type
11258 * @param visitedTypePairs 11238 * @param visitedTypePairs
11259 * @return true if `type` is more specific than this union type 11239 * @return true if `type` is more specific than this union type
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
11634 if (type is UnionType) { 11614 if (type is UnionType) {
11635 return (type as UnionTypeImpl).internalUnionTypeIsSuperTypeOf(this, visite dTypePairs); 11615 return (type as UnionTypeImpl).internalUnionTypeIsSuperTypeOf(this, visite dTypePairs);
11636 } 11616 }
11637 // The only subtype relations that pertain to void are therefore: 11617 // The only subtype relations that pertain to void are therefore:
11638 // void <: void (by reflexivity) 11618 // void <: void (by reflexivity)
11639 // bottom <: void (as bottom is a subtype of all types). 11619 // bottom <: void (as bottom is a subtype of all types).
11640 // void <: dynamic (as dynamic is a supertype of all types) 11620 // void <: dynamic (as dynamic is a supertype of all types)
11641 return identical(type, this) || identical(type, DynamicTypeImpl.instance); 11621 return identical(type, this) || identical(type, DynamicTypeImpl.instance);
11642 } 11622 }
11643 } 11623 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/ast.dart ('k') | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698