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

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

Issue 19235015: Implement metadata as an internal native. Be honest about which mirrors don't yet support metadata … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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/bootstrap_natives.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 // These values are allowed to be passed directly over the wire. 7 // These values are allowed to be passed directly over the wire.
8 bool _isSimpleValue(var value) { 8 bool _isSimpleValue(var value) {
9 return (value == null || value is num || value is String || value is bool); 9 return (value == null || value is num || value is String || value is bool);
10 } 10 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 63 }
64 64
65 Map<Uri, LibraryMirror> _createLibrariesMap(Map<String, LibraryMirror> map) { 65 Map<Uri, LibraryMirror> _createLibrariesMap(Map<String, LibraryMirror> map) {
66 var result = new Map<Uri, LibraryMirror>(); 66 var result = new Map<Uri, LibraryMirror>();
67 map.forEach((String url, LibraryMirror mirror) { 67 map.forEach((String url, LibraryMirror mirror) {
68 result[Uri.parse(url)] = mirror; 68 result[Uri.parse(url)] = mirror;
69 }); 69 });
70 return result; 70 return result;
71 } 71 }
72 72
73 List<InstanceMirror> _metadata(mirror) 73 List _metadata(reflectee)
74 native 'Mirrors_metadata'; 74 native 'DeclarationMirror_metadata';
75 75
76 // This will verify the argument types, unwrap them, and ensure we have a fixed 76 // This will verify the argument types, unwrap them, and ensure we have a fixed
77 // array. 77 // array.
78 List _unwarpAsyncPositionals(wrappedArgs){ 78 List _unwarpAsyncPositionals(wrappedArgs){
79 List unwrappedArgs = new List(wrappedArgs.length); 79 List unwrappedArgs = new List(wrappedArgs.length);
80 for(int i = 0; i < wrappedArgs.length; i++){ 80 for(int i = 0; i < wrappedArgs.length; i++){
81 var wrappedArg = wrappedArgs[i]; 81 var wrappedArg = wrappedArgs[i];
82 if(_isSimpleValue(wrappedArg)) { 82 if(_isSimpleValue(wrappedArg)) {
83 unwrappedArgs[i] = wrappedArg; 83 unwrappedArgs[i] = wrappedArg;
84 } else if(wrappedArg is InstanceMirror) { 84 } else if(wrappedArg is InstanceMirror) {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 LibraryMirror get rootLibrary { 157 LibraryMirror get rootLibrary {
158 if (_rootLibrary is _LazyLibraryMirror) { 158 if (_rootLibrary is _LazyLibraryMirror) {
159 _rootLibrary = _rootLibrary.resolve(mirrors); 159 _rootLibrary = _rootLibrary.resolve(mirrors);
160 } 160 }
161 return _rootLibrary; 161 return _rootLibrary;
162 } 162 }
163 163
164 String toString() => "IsolateMirror on '$debugName'"; 164 String toString() => "IsolateMirror on '$debugName'";
165 } 165 }
166 166
167 // A VMReference is used to hold a reference to a VM-internal object, 167 abstract class _LocalObjectMirrorImpl extends _LocalMirrorImpl
168 // which can include things like libraries, classes, etc.
169 class VMReference extends NativeFieldWrapperClass1 {
170 }
171
172 abstract class _LocalVMObjectMirrorImpl extends _LocalMirrorImpl {
173 _LocalVMObjectMirrorImpl(this._reference) {}
174
175 // For now, all VMObjects hold a VMReference. We could consider
176 // storing the Object reference itself here if the object is a Dart
177 // language objects (except for objects of type VMReference, of
178 // course).
179 VMReference _reference;
180 }
181
182 abstract class _LocalObjectMirrorImpl extends _LocalVMObjectMirrorImpl
183 implements ObjectMirror { 168 implements ObjectMirror {
184 _LocalObjectMirrorImpl(this._reflectee, ref) : super(ref) {} 169 _LocalObjectMirrorImpl(this._reflectee);
185 170
186 final _reflectee; // May be a MirrorReference or an ordinary object. 171 final _reflectee; // May be a MirrorReference or an ordinary object.
187 172
188 InstanceMirror invoke(Symbol memberName, 173 InstanceMirror invoke(Symbol memberName,
189 List positionalArguments, 174 List positionalArguments,
190 [Map<Symbol, dynamic> namedArguments]) { 175 [Map<Symbol, dynamic> namedArguments]) {
191 if (namedArguments != null) { 176 if (namedArguments != null) {
192 throw new UnimplementedError( 177 throw new UnimplementedError(
193 'named argument support is not implemented'); 178 'named argument support is not implemented');
194 } 179 }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 'positional argument $i ($arg) was not a simple value'); 253 'positional argument $i ($arg) was not a simple value');
269 } 254 }
270 } 255 }
271 } 256 }
272 257
273 class _LocalInstanceMirrorImpl extends _LocalObjectMirrorImpl 258 class _LocalInstanceMirrorImpl extends _LocalObjectMirrorImpl
274 implements InstanceMirror { 259 implements InstanceMirror {
275 // TODO(ahe): This is a hack, see delegate below. 260 // TODO(ahe): This is a hack, see delegate below.
276 static Function _invokeOnClosure; 261 static Function _invokeOnClosure;
277 262
278 _LocalInstanceMirrorImpl(ref, 263 _LocalInstanceMirrorImpl(this._type,
279 this._type, 264 reflectee) : super(reflectee) {}
280 reflectee) : super(reflectee, ref) {}
281 265
282 var _type; 266 var _type;
283 ClassMirror get type { 267 ClassMirror get type {
284 if (_type is! Mirror) { 268 if (_type is! Mirror) {
285 _type = _type.resolve(mirrors); 269 _type = _type.resolve(mirrors);
286 } 270 }
287 return _type; 271 return _type;
288 } 272 }
289 273
290 // LocalInstanceMirrors always reflect local instances 274 // LocalInstanceMirrors always reflect local instances
(...skipping 23 matching lines...) Expand all
314 298
315 _invokeGetter(reflectee, getterName) 299 _invokeGetter(reflectee, getterName)
316 native 'InstanceMirror_invokeGetter'; 300 native 'InstanceMirror_invokeGetter';
317 301
318 _invokeSetter(reflectee, setterName, value) 302 _invokeSetter(reflectee, setterName, value)
319 native 'InstanceMirror_invokeSetter'; 303 native 'InstanceMirror_invokeSetter';
320 } 304 }
321 305
322 class _LocalClosureMirrorImpl extends _LocalInstanceMirrorImpl 306 class _LocalClosureMirrorImpl extends _LocalInstanceMirrorImpl
323 implements ClosureMirror { 307 implements ClosureMirror {
324 _LocalClosureMirrorImpl(ref, 308 _LocalClosureMirrorImpl(type,
325 type,
326 reflectee, 309 reflectee,
327 this.function) : super(ref, type, reflectee) {} 310 this.function) : super(type, reflectee) {}
328 311
329 final MethodMirror function; 312 final MethodMirror function;
330 313
331 String get source { 314 String get source {
332 throw new UnimplementedError( 315 throw new UnimplementedError(
333 'ClosureMirror.source is not implemented'); 316 'ClosureMirror.source is not implemented');
334 } 317 }
335 318
336 InstanceMirror apply(List<Object> positionalArguments, 319 InstanceMirror apply(List<Object> positionalArguments,
337 [Map<Symbol, Object> namedArguments]) { 320 [Map<Symbol, Object> namedArguments]) {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 return resolved; 380 return resolved;
398 } 381 }
399 382
400 final String libraryUrl; 383 final String libraryUrl;
401 final Symbol typeName; 384 final Symbol typeName;
402 } 385 }
403 386
404 class _LocalClassMirrorImpl extends _LocalObjectMirrorImpl 387 class _LocalClassMirrorImpl extends _LocalObjectMirrorImpl
405 implements ClassMirror { 388 implements ClassMirror {
406 _LocalClassMirrorImpl(reflectee, 389 _LocalClassMirrorImpl(reflectee,
407 ref,
408 String simpleName, 390 String simpleName,
409 this.isClass, 391 this.isClass,
410 this._owner, 392 this._owner,
411 this._superclass, 393 this._superclass,
412 this._superinterfaces, 394 this._superinterfaces,
413 this._defaultFactory, 395 this._defaultFactory,
414 Map<String, Mirror> members, 396 Map<String, Mirror> members,
415 Map<String, Mirror> constructors, 397 Map<String, Mirror> constructors,
416 Map<String, Mirror> typeVariables) 398 Map<String, Mirror> typeVariables)
417 : this._simpleName = _s(simpleName), 399 : this._simpleName = _s(simpleName),
418 this.members = _convertStringToSymbolMap(members), 400 this.members = _convertStringToSymbolMap(members),
419 this.constructors = _convertStringToSymbolMap(constructors), 401 this.constructors = _convertStringToSymbolMap(constructors),
420 this.typeVariables = _convertStringToSymbolMap(typeVariables), 402 this.typeVariables = _convertStringToSymbolMap(typeVariables),
421 super(reflectee, ref); 403 super(reflectee);
422 404
423 Symbol _simpleName; 405 Symbol _simpleName;
424 Symbol get simpleName { 406 Symbol get simpleName {
425 // dynamic, void and the function types have their names set eagerly in the 407 // dynamic, void and the function types have their names set eagerly in the
426 // constructor. 408 // constructor.
427 if(_simpleName == null) { 409 if(_simpleName == null) {
428 _simpleName = _s(_name(_reflectee)); 410 _simpleName = _s(_name(_reflectee));
429 } 411 }
430 return _simpleName; 412 return _simpleName;
431 } 413 }
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 try { 557 try {
576 var result = _invokeConstructor(_reflectee, 558 var result = _invokeConstructor(_reflectee,
577 _n(constructorName), 559 _n(constructorName),
578 _unwarpAsyncPositionals(positionalArgument s)); 560 _unwarpAsyncPositionals(positionalArgument s));
579 return new Future.value(reflect(result)); 561 return new Future.value(reflect(result));
580 } on MirroredError catch(e) { 562 } on MirroredError catch(e) {
581 return new Future.error(e); 563 return new Future.error(e);
582 } 564 }
583 } 565 }
584 566
585 // get the metadata objects, convert them into InstanceMirrors using 567 List<InstanceMirror> get metadata {
586 // reflect() and then make them into a Dart list 568 // get the metadata objects, convert them into InstanceMirrors using
587 List<InstanceMirror> get metadata => _metadata(this).map(reflect).toList(); 569 // reflect() and then make them into a Dart list
588 570 return _metadata(_reflectee).map(reflect).toList();
571 }
589 572
590 static _name(reflectee) 573 static _name(reflectee)
591 native "ClassMirror_name"; 574 native "ClassMirror_name";
592 575
593 _invoke(reflectee, memberName, positionalArguments) 576 _invoke(reflectee, memberName, positionalArguments)
594 native 'ClassMirror_invoke'; 577 native 'ClassMirror_invoke';
595 578
596 _invokeGetter(reflectee, getterName) 579 _invokeGetter(reflectee, getterName)
597 native 'ClassMirror_invokeGetter'; 580 native 'ClassMirror_invokeGetter';
598 581
(...skipping 11 matching lines...) Expand all
610 return mirrors._lookupFunctionTypeMirror(returnType.resolve(mirrors), 593 return mirrors._lookupFunctionTypeMirror(returnType.resolve(mirrors),
611 parameters); 594 parameters);
612 } 595 }
613 596
614 final returnType; 597 final returnType;
615 final List<ParameterMirror> parameters; 598 final List<ParameterMirror> parameters;
616 } 599 }
617 600
618 class _LocalFunctionTypeMirrorImpl extends _LocalClassMirrorImpl 601 class _LocalFunctionTypeMirrorImpl extends _LocalClassMirrorImpl
619 implements FunctionTypeMirror { 602 implements FunctionTypeMirror {
620 _LocalFunctionTypeMirrorImpl(ref, 603 _LocalFunctionTypeMirrorImpl(reflectee,
621 simpleName, 604 simpleName,
622 this._returnType, 605 this._returnType,
623 this.parameters) 606 this.parameters)
624 : super(null, 607 : super(reflectee,
625 ref,
626 simpleName, 608 simpleName,
627 true, 609 true,
628 null, 610 null,
629 new _LazyTypeMirror('dart:core', 'Object'), 611 new _LazyTypeMirror('dart:core', 'Object'),
630 [ new _LazyTypeMirror('dart:core', 'Function') ], 612 [ new _LazyTypeMirror('dart:core', 'Function') ],
631 null, 613 null,
632 const {}, 614 const {},
633 const {}, 615 const {},
634 const {}); 616 const {});
635 617
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 } 677 }
696 678
697 var _upperBound; 679 var _upperBound;
698 TypeMirror get upperBound { 680 TypeMirror get upperBound {
699 if (_upperBound is! Mirror) { 681 if (_upperBound is! Mirror) {
700 _upperBound = _upperBound.resolve(mirrors); 682 _upperBound = _upperBound.resolve(mirrors);
701 } 683 }
702 return _upperBound; 684 return _upperBound;
703 } 685 }
704 686
705 // get the metadata objects, convert them into InstanceMirrors using 687 List<InstanceMirror> get metadata {
706 // reflect() and then make them into a Dart list 688 throw new UnimplementedError(
707 List<InstanceMirror> get metadata => _metadata(this).map(reflect).toList(); 689 'TypeVariableMirror.metadata is not implemented');
690 }
708 691
709 String toString() => "TypeVariableMirror on '${_n(simpleName)}'"; 692 String toString() => "TypeVariableMirror on '${_n(simpleName)}'";
710 } 693 }
711 694
712 695
713 class _LocalTypedefMirrorImpl extends _LocalMirrorImpl 696 class _LocalTypedefMirrorImpl extends _LocalMirrorImpl
714 implements TypedefMirror { 697 implements TypedefMirror {
715 _LocalTypedefMirrorImpl(String simpleName, 698 _LocalTypedefMirrorImpl(String simpleName,
716 this._owner, 699 this._owner,
717 this._referent) 700 this._referent)
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 LibraryMirror resolve(MirrorSystem mirrors) { 745 LibraryMirror resolve(MirrorSystem mirrors) {
763 return mirrors.libraries[Uri.parse(libraryUrl)]; 746 return mirrors.libraries[Uri.parse(libraryUrl)];
764 } 747 }
765 748
766 final String libraryUrl; 749 final String libraryUrl;
767 } 750 }
768 751
769 class _LocalLibraryMirrorImpl extends _LocalObjectMirrorImpl 752 class _LocalLibraryMirrorImpl extends _LocalObjectMirrorImpl
770 implements LibraryMirror { 753 implements LibraryMirror {
771 _LocalLibraryMirrorImpl(reflectee, 754 _LocalLibraryMirrorImpl(reflectee,
772 ref,
773 String simpleName, 755 String simpleName,
774 String url, 756 String url,
775 Map<String, Mirror> members) 757 Map<String, Mirror> members)
776 : this.simpleName = _s(simpleName), 758 : this.simpleName = _s(simpleName),
777 this.members = _convertStringToSymbolMap(members), 759 this.members = _convertStringToSymbolMap(members),
778 this.uri = Uri.parse(url), 760 this.uri = Uri.parse(url),
779 super(reflectee, ref); 761 super(reflectee);
780 762
781 final Symbol simpleName; 763 final Symbol simpleName;
782 764
783 // The simple name and the qualified name are the same for a library. 765 // The simple name and the qualified name are the same for a library.
784 Symbol get qualifiedName => simpleName; 766 Symbol get qualifiedName => simpleName;
785 767
786 // Always null for libraries. 768 // Always null for libraries.
787 final DeclarationMirror owner = null; 769 final DeclarationMirror owner = null;
788 770
789 // Always false for libraries. 771 // Always false for libraries.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 } 821 }
840 822
841 Map<Symbol, VariableMirror> get variables { 823 Map<Symbol, VariableMirror> get variables {
842 if (_variables == null) { 824 if (_variables == null) {
843 _variables = _filterMap(members, 825 _variables = _filterMap(members,
844 (key, value) => (value is VariableMirror)); 826 (key, value) => (value is VariableMirror));
845 } 827 }
846 return _variables; 828 return _variables;
847 } 829 }
848 830
849 // get the metadata objects, convert them into InstanceMirrors using 831 List<InstanceMirror> get metadata {
850 // reflect() and then make them into a Dart list 832 // get the metadata objects, convert them into InstanceMirrors using
851 List<InstanceMirror> get metadata => _metadata(this).map(reflect).toList(); 833 // reflect() and then make them into a Dart list
834 _metadata(_reflectee).map(reflect).toList();
835 }
852 836
853 String toString() => "LibraryMirror on '${_n(simpleName)}'"; 837 String toString() => "LibraryMirror on '${_n(simpleName)}'";
854 838
855 _invoke(reflectee, memberName, positionalArguments) 839 _invoke(reflectee, memberName, positionalArguments)
856 native 'LibraryMirror_invoke'; 840 native 'LibraryMirror_invoke';
857 841
858 _invokeGetter(reflectee, getterName) 842 _invokeGetter(reflectee, getterName)
859 native 'LibraryMirror_invokeGetter'; 843 native 'LibraryMirror_invokeGetter';
860 844
861 _invokeSetter(reflectee, setterName, value) 845 _invokeSetter(reflectee, setterName, value)
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 947
964 final bool isConstConstructor; 948 final bool isConstConstructor;
965 final bool isGenerativeConstructor; 949 final bool isGenerativeConstructor;
966 final bool isRedirectingConstructor; 950 final bool isRedirectingConstructor;
967 final bool isFactoryConstructor; 951 final bool isFactoryConstructor;
968 952
969 List<InstanceMirror> get metadata { 953 List<InstanceMirror> get metadata {
970 owner; // ensure owner is computed 954 owner; // ensure owner is computed
971 // get the metadata objects, convert them into InstanceMirrors using 955 // get the metadata objects, convert them into InstanceMirrors using
972 // reflect() and then make them into a Dart list 956 // reflect() and then make them into a Dart list
973 return _metadata(this).map(reflect).toList(); 957 return _metadata(_reflectee).map(reflect).toList();
974 } 958 }
975 959
976 String toString() => "MethodMirror on '${_n(simpleName)}'"; 960 String toString() => "MethodMirror on '${_n(simpleName)}'";
977 961
978 static String _MethodMirror_name(reflectee) 962 static String _MethodMirror_name(reflectee)
979 native "MethodMirror_name"; 963 native "MethodMirror_name";
980 } 964 }
981 965
982 class _LocalVariableMirrorImpl extends _LocalMirrorImpl 966 class _LocalVariableMirrorImpl extends _LocalMirrorImpl
983 implements VariableMirror { 967 implements VariableMirror {
984 _LocalVariableMirrorImpl(String simpleName, 968 _LocalVariableMirrorImpl(this._reflectee,
969 String simpleName,
985 this._owner, 970 this._owner,
986 this._type, 971 this._type,
987 this.isStatic, 972 this.isStatic,
988 this.isFinal) 973 this.isFinal)
989 : this.simpleName = _s(simpleName); 974 : this.simpleName = _s(simpleName);
990 975
976 final _MirrorReference _reflectee;
991 final Symbol simpleName; 977 final Symbol simpleName;
992 978
993 Symbol _qualifiedName = null; 979 Symbol _qualifiedName = null;
994 Symbol get qualifiedName { 980 Symbol get qualifiedName {
995 if (_qualifiedName == null) { 981 if (_qualifiedName == null) {
996 _qualifiedName = _computeQualifiedName(owner, simpleName); 982 _qualifiedName = _computeQualifiedName(owner, simpleName);
997 } 983 }
998 return _qualifiedName; 984 return _qualifiedName;
999 } 985 }
1000 986
(...skipping 23 matching lines...) Expand all
1024 if (_type is! Mirror) { 1010 if (_type is! Mirror) {
1025 _type = _type.resolve(mirrors); 1011 _type = _type.resolve(mirrors);
1026 } 1012 }
1027 return _type; 1013 return _type;
1028 } 1014 }
1029 1015
1030 final bool isStatic; 1016 final bool isStatic;
1031 final bool isFinal; 1017 final bool isFinal;
1032 1018
1033 List<InstanceMirror> get metadata { 1019 List<InstanceMirror> get metadata {
1034 owner; // ensure owner is computed
1035 // get the metadata objects, convert them into InstanceMirrors using 1020 // get the metadata objects, convert them into InstanceMirrors using
1036 // reflect() and then make them into a Dart list 1021 // reflect() and then make them into a Dart list
1037 return _metadata(this).map(reflect).toList(); 1022 return _metadata(_reflectee).map(reflect).toList();
1038 } 1023 }
1039 1024
1040 String toString() => "VariableMirror on '${_n(simpleName)}'"; 1025 String toString() => "VariableMirror on '${_n(simpleName)}'";
1041 } 1026 }
1042 1027
1043 class _LocalParameterMirrorImpl extends _LocalVariableMirrorImpl 1028 class _LocalParameterMirrorImpl extends _LocalVariableMirrorImpl
1044 implements ParameterMirror { 1029 implements ParameterMirror {
1045 _LocalParameterMirrorImpl(type, this.isOptional) 1030 _LocalParameterMirrorImpl(type, this.isOptional)
1046 : super('<TODO:unnamed>', null, type, false, false) {} 1031 : super(null, '<TODO:unnamed>', null, type, false, false) {}
1047 1032
1048 final bool isOptional; 1033 final bool isOptional;
1049 1034
1050 String get defaultValue { 1035 String get defaultValue {
1051 throw new UnimplementedError( 1036 throw new UnimplementedError(
1052 'ParameterMirror.defaultValue is not implemented'); 1037 'ParameterMirror.defaultValue is not implemented');
1053 } 1038 }
1054 1039
1055 bool get hasDefaultValue { 1040 bool get hasDefaultValue {
1056 throw new UnimplementedError( 1041 throw new UnimplementedError(
1057 'ParameterMirror.hasDefaultValue is not implemented'); 1042 'ParameterMirror.hasDefaultValue is not implemented');
1058 } 1043 }
1044
1045 // TODO(11418): Implement.
1046 List<InstanceMirror> get metadata {
1047 throw new UnimplementedError(
1048 'ParameterMirror.metadata is not implemented');
1049 }
1059 } 1050 }
1060 1051
1061 class _SpecialTypeMirrorImpl extends _LocalMirrorImpl 1052 class _SpecialTypeMirrorImpl extends _LocalMirrorImpl
1062 implements TypeMirror, DeclarationMirror { 1053 implements TypeMirror, DeclarationMirror {
1063 _SpecialTypeMirrorImpl(this.simpleName); 1054 _SpecialTypeMirrorImpl(this.simpleName);
1064 1055
1065 final bool isPrivate = false; 1056 final bool isPrivate = false;
1066 final bool isTopLevel = true; 1057 final bool isTopLevel = true;
1067 1058
1068 // Fixed length 0, therefore immutable. 1059 // Fixed length 0, therefore immutable.
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 } 1117 }
1127 1118
1128 // Creates a new local ClassMirror. 1119 // Creates a new local ClassMirror.
1129 static ClassMirror makeLocalClassMirror(Type key) 1120 static ClassMirror makeLocalClassMirror(Type key)
1130 native "Mirrors_makeLocalClassMirror"; 1121 native "Mirrors_makeLocalClassMirror";
1131 1122
1132 static ClassMirror reflectClass(Type key) { 1123 static ClassMirror reflectClass(Type key) {
1133 return makeLocalClassMirror(key); 1124 return makeLocalClassMirror(key);
1134 } 1125 }
1135 } 1126 }
OLDNEW
« no previous file with comments | « runtime/lib/mirrors.cc ('k') | runtime/vm/bootstrap_natives.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698