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

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

Issue 53883002: Ensure constructorName symbols include private manglings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
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 final emptyList = new UnmodifiableListView([]); 9 final emptyList = new UnmodifiableListView([]);
10 final emptyMap = new _UnmodifiableMapView({}); 10 final emptyMap = new _UnmodifiableMapView({});
(...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after
1237 if (_constructorName == null) { 1237 if (_constructorName == null) {
1238 if (!isConstructor) { 1238 if (!isConstructor) {
1239 _constructorName = _s(''); 1239 _constructorName = _s('');
1240 } else { 1240 } else {
1241 var parts = MirrorSystem.getName(simpleName).split('.'); 1241 var parts = MirrorSystem.getName(simpleName).split('.');
1242 if (parts.length > 2) { 1242 if (parts.length > 2) {
1243 throw new _InternalMirrorError( 1243 throw new _InternalMirrorError(
1244 'Internal error in MethodMirror.constructorName: ' 1244 'Internal error in MethodMirror.constructorName: '
1245 'malformed name <$simpleName>'); 1245 'malformed name <$simpleName>');
1246 } else if (parts.length == 2) { 1246 } else if (parts.length == 2) {
1247 _constructorName = _s(parts[1]); 1247 LibraryMirror definingLibrary = owner.owner;
1248 _constructorName = MirrorSystem.getSymbol(parts[1], definingLibrary);
1248 } else { 1249 } else {
1249 _constructorName = _s(''); 1250 _constructorName = _s('');
1250 } 1251 }
1251 } 1252 }
1252 } 1253 }
1253 return _constructorName; 1254 return _constructorName;
1254 } 1255 }
1255 1256
1256 String _source = null; 1257 String _source = null;
1257 String get source { 1258 String get source {
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1468 if (typeMirror == null) { 1469 if (typeMirror == null) {
1469 typeMirror = makeLocalTypeMirror(key); 1470 typeMirror = makeLocalTypeMirror(key);
1470 _instanitationCache[key] = typeMirror; 1471 _instanitationCache[key] = typeMirror;
1471 if (typeMirror is ClassMirror && !typeMirror._isGeneric) { 1472 if (typeMirror is ClassMirror && !typeMirror._isGeneric) {
1472 _declarationCache[key] = typeMirror; 1473 _declarationCache[key] = typeMirror;
1473 } 1474 }
1474 } 1475 }
1475 return typeMirror; 1476 return typeMirror;
1476 } 1477 }
1477 } 1478 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698