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

Side by Side Diff: pkg/compiler/lib/src/universe/universe.dart

Issue 877323003: Improve comment of isInstantiated. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 library universe; 5 library universe;
6 6
7 import '../elements/elements.dart'; 7 import '../elements/elements.dart';
8 import '../dart2jslib.dart'; 8 import '../dart2jslib.dart';
9 import '../dart_types.dart'; 9 import '../dart_types.dart';
10 import '../types/types.dart'; 10 import '../types/types.dart';
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 } 109 }
110 110
111 /// All directly instantiated types, that is, the types of the directly 111 /// All directly instantiated types, that is, the types of the directly
112 /// instantiated classes. 112 /// instantiated classes.
113 /// 113 ///
114 /// See [directlyInstantiatedClasses]. 114 /// See [directlyInstantiatedClasses].
115 // TODO(johnniwinther): Improve semantic precision. 115 // TODO(johnniwinther): Improve semantic precision.
116 Iterable<DartType> get instantiatedTypes => _instantiatedTypes; 116 Iterable<DartType> get instantiatedTypes => _instantiatedTypes;
117 117
118 /// Returns `true` if [cls] is considered to be instantiated, either directly, 118 /// Returns `true` if [cls] is considered to be instantiated, either directly,
119 /// through subclasses or throught subtypes. 119 /// through subclasses or through subtypes. The latter case only contains
120 /// spurious information from instatiations through factory constructors and
Johnni Winther 2015/01/28 11:57:44 instatiations -> instantiations
121 /// mixins.
120 // TODO(johnniwinther): Improve semantic precision. 122 // TODO(johnniwinther): Improve semantic precision.
121 bool isInstantiated(ClassElement cls) { 123 bool isInstantiated(ClassElement cls) {
122 return _allInstantiatedClasses.contains(cls); 124 return _allInstantiatedClasses.contains(cls);
123 } 125 }
124 126
125 /// Register [type] as (directly) instantiated. 127 /// Register [type] as (directly) instantiated.
126 /// 128 ///
127 /// If [byMirrors] is `true`, the instantiation is through mirrors. 129 /// If [byMirrors] is `true`, the instantiation is through mirrors.
128 // TODO(johnniwinther): Fully enforce the separation between exact, through 130 // TODO(johnniwinther): Fully enforce the separation between exact, through
129 // subclass and through subtype instantiated types/classes. 131 // subclass and through subtype instantiated types/classes.
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 840
839 Selector extendIfReachesAll(Compiler compiler) { 841 Selector extendIfReachesAll(Compiler compiler) {
840 bool canReachAll = compiler.enabledInvokeOn 842 bool canReachAll = compiler.enabledInvokeOn
841 && mask.needsNoSuchMethodHandling(this, compiler.world); 843 && mask.needsNoSuchMethodHandling(this, compiler.world);
842 return canReachAll 844 return canReachAll
843 ? new TypedSelector( 845 ? new TypedSelector(
844 compiler.typesTask.dynamicType, this, compiler.world) 846 compiler.typesTask.dynamicType, this, compiler.world)
845 : this; 847 : this;
846 } 848 }
847 } 849 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698