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

Side by Side Diff: pkg/compiler/lib/src/elements/types.dart

Issue 2954493002: Less inequivalence on Hello World! (Closed)
Patch Set: Updated cf. comments Created 3 years, 6 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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import '../common_elements.dart'; 5 import '../common_elements.dart';
6 import '../util/util.dart' show equalElements; 6 import '../util/util.dart' show equalElements;
7 import 'entities.dart'; 7 import 'entities.dart';
8 8
9 /// Hierarchy to describe types in Dart. 9 /// Hierarchy to describe types in Dart.
10 /// 10 ///
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 /// where the type arguments are the type variables of [cls]. 782 /// where the type arguments are the type variables of [cls].
783 InterfaceType getThisType(ClassEntity cls); 783 InterfaceType getThisType(ClassEntity cls);
784 784
785 /// Returns the supertype of [cls], i.e. the type in the `extends` clause of 785 /// Returns the supertype of [cls], i.e. the type in the `extends` clause of
786 /// [cls]. 786 /// [cls].
787 InterfaceType getSupertype(ClassEntity cls); 787 InterfaceType getSupertype(ClassEntity cls);
788 788
789 /// Returns all supertypes of [cls]. 789 /// Returns all supertypes of [cls].
790 Iterable<InterfaceType> getSupertypes(ClassEntity cls); 790 Iterable<InterfaceType> getSupertypes(ClassEntity cls);
791 791
792 /// Returns all types directly implemented by [cls].
793 Iterable<InterfaceType> getInterfaces(ClassEntity cls);
794
792 /// Returns the type of the `call` method on [type], or `null` if the class 795 /// Returns the type of the `call` method on [type], or `null` if the class
793 /// of [type] does not have a `call` method. 796 /// of [type] does not have a `call` method.
794 FunctionType getCallType(InterfaceType type); 797 FunctionType getCallType(InterfaceType type);
795 798
796 /// Checks the type arguments of [type] against the type variable bounds 799 /// Checks the type arguments of [type] against the type variable bounds
797 /// declared on `type.element`. Calls [checkTypeVariableBound] on each type 800 /// declared on `type.element`. Calls [checkTypeVariableBound] on each type
798 /// argument and bound. 801 /// argument and bound.
799 void checkTypeVariableBounds( 802 void checkTypeVariableBounds(
800 InterfaceType type, 803 InterfaceType type,
801 void checkTypeVariableBound(InterfaceType type, DartType typeArgument, 804 void checkTypeVariableBound(InterfaceType type, DartType typeArgument,
(...skipping 11 matching lines...) Expand all
813 // include a runtime value for method type variables this must be updated. 816 // include a runtime value for method type variables this must be updated.
814 // For full support the global assumption that all type variables are 817 // For full support the global assumption that all type variables are
815 // declared by the same enclosing class will not hold: Both an enclosing 818 // declared by the same enclosing class will not hold: Both an enclosing
816 // method and an enclosing class may define type variables, so the return 819 // method and an enclosing class may define type variables, so the return
817 // type cannot be [ClassElement] and the caller must be prepared to look in 820 // type cannot be [ClassElement] and the caller must be prepared to look in
818 // two locations, not one. Currently we ignore method type variables by 821 // two locations, not one. Currently we ignore method type variables by
819 // returning in the next statement. 822 // returning in the next statement.
820 return contextClass; 823 return contextClass;
821 } 824 }
822 } 825 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/elements/resolution_types.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698