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

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

Issue 23872010: Add metadata for type parameters (TypeVariableMirror). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: addressed comments Created 7 years, 3 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 | « runtime/lib/mirrors.cc ('k') | runtime/vm/object.h » ('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"; 7 import "dart:collection";
8 8
9 // These values are allowed to be passed directly over the wire. 9 // These values are allowed to be passed directly over the wire.
10 bool _isSimpleValue(var value) { 10 bool _isSimpleValue(var value) {
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 List<ParameterMirror> _parameters = null; 762 List<ParameterMirror> _parameters = null;
763 List<ParameterMirror> get parameters { 763 List<ParameterMirror> get parameters {
764 if (_parameters == null) { 764 if (_parameters == null) {
765 _parameters = _FunctionTypeMirror_parameters(_reflectee); 765 _parameters = _FunctionTypeMirror_parameters(_reflectee);
766 } 766 }
767 return _parameters; 767 return _parameters;
768 } 768 }
769 769
770 Map<Symbol, Mirror> get members => new Map<Symbol,Mirror>(); 770 Map<Symbol, Mirror> get members => new Map<Symbol,Mirror>();
771 Map<Symbol, MethodMirror> get constructors => new Map<Symbol,MethodMirror>(); 771 Map<Symbol, MethodMirror> get constructors => new Map<Symbol,MethodMirror>();
772 final Map<Symbol, TypeVariableMirror> typeVariables = const {};
773 772
774 String toString() => "FunctionTypeMirror on '${_n(simpleName)}'"; 773 String toString() => "FunctionTypeMirror on '${_n(simpleName)}'";
775 774
776 MethodMirror _FunctionTypeMirror_call_method(reflectee) 775 MethodMirror _FunctionTypeMirror_call_method(reflectee)
777 native "FunctionTypeMirror_call_method"; 776 native "FunctionTypeMirror_call_method";
778 777
779 static Type _FunctionTypeMirror_return_type(reflectee) 778 static Type _FunctionTypeMirror_return_type(reflectee)
780 native "FunctionTypeMirror_return_type"; 779 native "FunctionTypeMirror_return_type";
781 780
782 List<ParameterMirror> _FunctionTypeMirror_parameters(reflectee) 781 List<ParameterMirror> _FunctionTypeMirror_parameters(reflectee)
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 839
841 TypeMirror _upperBound = null; 840 TypeMirror _upperBound = null;
842 TypeMirror get upperBound { 841 TypeMirror get upperBound {
843 if (_upperBound == null) { 842 if (_upperBound == null) {
844 _upperBound = 843 _upperBound =
845 _Mirrors._reflectType(_TypeVariableMirror_upper_bound(_reflectee)); 844 _Mirrors._reflectType(_TypeVariableMirror_upper_bound(_reflectee));
846 } 845 }
847 return _upperBound; 846 return _upperBound;
848 } 847 }
849 848
850 List<InstanceMirror> get metadata {
851 throw new UnimplementedError(
852 'TypeVariableMirror.metadata is not implemented');
853 }
854
855 bool get isOriginalDeclaration => true; 849 bool get isOriginalDeclaration => true;
856 ClassMirror get originalDeclaration => this; 850 ClassMirror get originalDeclaration => this;
857 851
858 String toString() => "TypeVariableMirror on '${_n(simpleName)}'"; 852 String toString() => "TypeVariableMirror on '${_n(simpleName)}'";
859 853
860 static DeclarationMirror _TypeVariableMirror_owner(reflectee) 854 static DeclarationMirror _TypeVariableMirror_owner(reflectee)
861 native "TypeVariableMirror_owner"; 855 native "TypeVariableMirror_owner";
862 856
863 static Type _TypeVariableMirror_upper_bound(reflectee) 857 static Type _TypeVariableMirror_upper_bound(reflectee)
864 native "TypeVariableMirror_upper_bound"; 858 native "TypeVariableMirror_upper_bound";
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
1330 if (typeMirror == null) { 1324 if (typeMirror == null) {
1331 typeMirror = makeLocalTypeMirror(key); 1325 typeMirror = makeLocalTypeMirror(key);
1332 _instanitationCache[key] = typeMirror; 1326 _instanitationCache[key] = typeMirror;
1333 if (typeMirror is ClassMirror && !typeMirror._isGeneric) { 1327 if (typeMirror is ClassMirror && !typeMirror._isGeneric) {
1334 _declarationCache[key] = typeMirror; 1328 _declarationCache[key] = typeMirror;
1335 } 1329 }
1336 } 1330 }
1337 return typeMirror; 1331 return typeMirror;
1338 } 1332 }
1339 } 1333 }
OLDNEW
« no previous file with comments | « runtime/lib/mirrors.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698