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

Side by Side Diff: runtime/lib/mirrors_impl.dart

Issue 690413002: Fix issue 21474 in mirrors. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 1 month 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 | tests/lib/mirrors/class_declarations_test.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) 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 // VM-specific implementation of the dart:mirrors library. 5 // VM-specific implementation of the dart:mirrors library.
6 6
7 import "dart:collection" show UnmodifiableListView, UnmodifiableMapView; 7 import "dart:collection" show UnmodifiableListView, UnmodifiableMapView;
8 8
9 final emptyList = new UnmodifiableListView([]); 9 final emptyList = new UnmodifiableListView([]);
10 final emptyMap = new UnmodifiableMapView({}); 10 final emptyMap = new UnmodifiableMapView({});
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 decls.addAll(_constructors); 766 decls.addAll(_constructors);
767 typeVariables.forEach((tv) => decls[tv.simpleName] = tv); 767 typeVariables.forEach((tv) => decls[tv.simpleName] = tv);
768 return _declarations = 768 return _declarations =
769 new UnmodifiableMapView<Symbol, DeclarationMirror>(decls); 769 new UnmodifiableMapView<Symbol, DeclarationMirror>(decls);
770 } 770 }
771 771
772 Map<Symbol, Mirror> _cachedMembers; 772 Map<Symbol, Mirror> _cachedMembers;
773 Map<Symbol, Mirror> get _members { 773 Map<Symbol, Mirror> get _members {
774 if (_cachedMembers == null) { 774 if (_cachedMembers == null) {
775 var whoseMembers = _isMixinAlias ? _trueSuperclass : this; 775 var whoseMembers = _isMixinAlias ? _trueSuperclass : this;
776 _cachedMembers = _makeMemberMap(mixin._computeMembers(whoseMembers._reflec tee)); 776 _cachedMembers = _makeMemberMap(mixin._computeMembers(whoseMembers.mixin._ reflectee));
777 } 777 }
778 return _cachedMembers; 778 return _cachedMembers;
779 } 779 }
780 780
781 Map<Symbol, MethodMirror> _cachedMethods; 781 Map<Symbol, MethodMirror> _cachedMethods;
782 Map<Symbol, MethodMirror> get _methods { 782 Map<Symbol, MethodMirror> get _methods {
783 if (_cachedMethods == null) { 783 if (_cachedMethods == null) {
784 _cachedMethods = _filterMap( 784 _cachedMethods = _filterMap(
785 _members, 785 _members,
786 (key, value) => (value is MethodMirror && value.isRegularMethod)); 786 (key, value) => (value is MethodMirror && value.isRegularMethod));
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after
1700 if (typeMirror == null) { 1700 if (typeMirror == null) {
1701 typeMirror = makeLocalTypeMirror(key); 1701 typeMirror = makeLocalTypeMirror(key);
1702 _instanitationCache[key] = typeMirror; 1702 _instanitationCache[key] = typeMirror;
1703 if (typeMirror is ClassMirror && !typeMirror._isGeneric) { 1703 if (typeMirror is ClassMirror && !typeMirror._isGeneric) {
1704 _declarationCache[key] = typeMirror; 1704 _declarationCache[key] = typeMirror;
1705 } 1705 }
1706 } 1706 }
1707 return typeMirror; 1707 return typeMirror;
1708 } 1708 }
1709 } 1709 }
OLDNEW
« no previous file with comments | « no previous file | tests/lib/mirrors/class_declarations_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698