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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/elements/modelx.dart

Issue 12223004: Allow private selectors to be typed, and fix ClassElement.isSubclassOf to take patches into account. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | sdk/lib/_internal/compiler/implementation/ssa/codegen.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 elements.modelx; 5 library elements.modelx;
6 6
7 import 'dart:uri'; 7 import 'dart:uri';
8 8
9 import 'elements.dart'; 9 import 'elements.dart';
10 import '../../compiler.dart' as api; 10 import '../../compiler.dart' as api;
(...skipping 1682 matching lines...) Expand 10 before | Expand all | Expand 10 after
1693 } 1693 }
1694 1694
1695 /** 1695 /**
1696 * Returns true if [this] is a subclass of [cls]. 1696 * Returns true if [this] is a subclass of [cls].
1697 * 1697 *
1698 * This method is not to be used for checking type hierarchy and 1698 * This method is not to be used for checking type hierarchy and
1699 * assignments, because it does not take parameterized types into 1699 * assignments, because it does not take parameterized types into
1700 * account. 1700 * account.
1701 */ 1701 */
1702 bool isSubclassOf(ClassElement cls) { 1702 bool isSubclassOf(ClassElement cls) {
1703 for (ClassElement s = this; s != null; s = s.superclass) { 1703 // Use [declaration] for both [this] and [cls], because
1704 // declaration classes hold the superclass hierarchy.
1705 cls = cls.declaration;
1706 for (ClassElement s = declaration; s != null; s = s.superclass) {
1704 if (identical(s, cls)) return true; 1707 if (identical(s, cls)) return true;
1705 } 1708 }
1706 return false; 1709 return false;
1707 } 1710 }
1708 1711
1709 bool isInterface() => false; 1712 bool isInterface() => false;
1710 bool isNative() => nativeTagInfo != null; 1713 bool isNative() => nativeTagInfo != null;
1711 void setNative(String name) { 1714 void setNative(String name) {
1712 nativeTagInfo = new SourceString(name); 1715 nativeTagInfo = new SourceString(name);
1713 } 1716 }
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
1969 1972
1970 MetadataAnnotation ensureResolved(Compiler compiler) { 1973 MetadataAnnotation ensureResolved(Compiler compiler) {
1971 if (resolutionState == STATE_NOT_STARTED) { 1974 if (resolutionState == STATE_NOT_STARTED) {
1972 compiler.resolver.resolveMetadataAnnotation(this); 1975 compiler.resolver.resolveMetadataAnnotation(this);
1973 } 1976 }
1974 return this; 1977 return this;
1975 } 1978 }
1976 1979
1977 String toString() => 'MetadataAnnotation($value, $resolutionState)'; 1980 String toString() => 'MetadataAnnotation($value, $resolutionState)';
1978 } 1981 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698