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

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

Issue 2775283002: Use Entity in native_data. (Closed)
Patch Set: Fix. Created 3 years, 9 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/compiler.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 // TODO(sigmund): rename and move to common/elements.dart 5 // TODO(sigmund): rename and move to common/elements.dart
6 library dart2js.type_system; 6 library dart2js.type_system;
7 7
8 import 'common.dart'; 8 import 'common.dart';
9 import 'elements/types.dart'; 9 import 'elements/types.dart';
10 import 'elements/entities.dart'; 10 import 'elements/entities.dart';
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 {bool required: false}); 242 {bool required: false});
243 243
244 /// Calls [f] for each class member declared or inherited in [cls] together 244 /// Calls [f] for each class member declared or inherited in [cls] together
245 /// with the class that declared the member. 245 /// with the class that declared the member.
246 /// 246 ///
247 /// TODO(johnniwinther): This should not include static members of 247 /// TODO(johnniwinther): This should not include static members of
248 /// superclasses. 248 /// superclasses.
249 void forEachClassMember( 249 void forEachClassMember(
250 ClassEntity cls, void f(ClassEntity declarer, MemberEntity member)); 250 ClassEntity cls, void f(ClassEntity declarer, MemberEntity member));
251 251
252 /// Returns the declared superclass of [cls].
253 ///
254 /// Unnamed mixin applications are skipped, for instance for these classes
255 ///
256 /// class S {}
257 /// class M {}
258 /// class C extends S with M {}
259 ///
260 /// the result of `getSuperClass(C)` is `S` and not the unnamed mixin
261 /// application typically named `S+M`.
262 ClassEntity getSuperClass(ClassEntity cls);
263
252 /// Calls [f] for each class that is mixed into [cls] or one of its 264 /// Calls [f] for each class that is mixed into [cls] or one of its
253 /// superclasses. 265 /// superclasses.
254 void forEachMixin(ClassEntity cls, void f(ClassEntity mixin)); 266 void forEachMixin(ClassEntity cls, void f(ClassEntity mixin));
255 267
256 /// Create the instantiation of [cls] with the given [typeArguments]. 268 /// Create the instantiation of [cls] with the given [typeArguments].
257 InterfaceType createInterfaceType( 269 InterfaceType createInterfaceType(
258 ClassEntity cls, List<DartType> typeArguments); 270 ClassEntity cls, List<DartType> typeArguments);
259 271
260 /// Returns the 'raw type' of [cls]. That is, the instantiation of [cls] 272 /// Returns the 'raw type' of [cls]. That is, the instantiation of [cls]
261 /// where all types arguments are `dynamic`. 273 /// where all types arguments are `dynamic`.
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 } 524 }
513 525
514 @override 526 @override
515 InterfaceType streamType([DartType elementType]) { 527 InterfaceType streamType([DartType elementType]) {
516 if (elementType == null) { 528 if (elementType == null) {
517 return getRawType(streamClass); 529 return getRawType(streamClass);
518 } 530 }
519 return createInterfaceType(streamClass, [elementType]); 531 return createInterfaceType(streamClass, [elementType]);
520 } 532 }
521 } 533 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698