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

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

Issue 19749008: Fix regression in TypedefMirror.owner introduced when making ClassMirror.owner lazy. (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 | « no previous file | tests/lib/mirrors/mirrors_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 // 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 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 String simpleName, 718 String simpleName,
719 this._owner, 719 this._owner,
720 this._referent) 720 this._referent)
721 : this.simpleName = _s(simpleName), 721 : this.simpleName = _s(simpleName),
722 super(reflectee); 722 super(reflectee);
723 723
724 final Symbol simpleName; 724 final Symbol simpleName;
725 725
726 Symbol _qualifiedName = null; 726 Symbol _qualifiedName = null;
727 Symbol get qualifiedName { 727 Symbol get qualifiedName {
728 if (_owner == null) {
729 _owner = _LocalClassMirrorImpl._library(_reflectee);
730 }
siva 2013/07/19 21:06:07 Why not put this code in 'get owner' so that we ar
rmacnak 2013/07/19 21:11:39 Yikes, mistake in moving from one checkout to anot
728 if (_qualifiedName == null) { 731 if (_qualifiedName == null) {
729 _qualifiedName = _computeQualifiedName(owner, simpleName); 732 _qualifiedName = _computeQualifiedName(owner, simpleName);
730 } 733 }
731 return _qualifiedName; 734 return _qualifiedName;
732 } 735 }
733 736
734 var _owner; 737 var _owner;
735 DeclarationMirror get owner { 738 DeclarationMirror get owner {
736 if (_owner is! Mirror) { 739 if (_owner is! Mirror) {
737 _owner = _owner.resolve(mirrors); 740 _owner = _owner.resolve(mirrors);
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 static Expando<ClassMirror> _classMirrorCache = new Expando("ClassMirror"); 1141 static Expando<ClassMirror> _classMirrorCache = new Expando("ClassMirror");
1139 static ClassMirror reflectClass(Type key) { 1142 static ClassMirror reflectClass(Type key) {
1140 var classMirror = _classMirrorCache[key]; 1143 var classMirror = _classMirrorCache[key];
1141 if (classMirror == null) { 1144 if (classMirror == null) {
1142 classMirror = makeLocalClassMirror(key); 1145 classMirror = makeLocalClassMirror(key);
1143 _classMirrorCache[key] = classMirror; 1146 _classMirrorCache[key] = classMirror;
1144 } 1147 }
1145 return classMirror; 1148 return classMirror;
1146 } 1149 }
1147 } 1150 }
OLDNEW
« no previous file with comments | « no previous file | tests/lib/mirrors/mirrors_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698