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

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

Issue 25674017: Fix runtimeType for strings, integers and double: return their interface type. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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/integers.dart ('k') | runtime/lib/object.cc » ('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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 335
336 _invoke(reflectee, functionName, arguments, argumentNames) 336 _invoke(reflectee, functionName, arguments, argumentNames)
337 native 'InstanceMirror_invoke'; 337 native 'InstanceMirror_invoke';
338 338
339 _invokeGetter(reflectee, getterName) 339 _invokeGetter(reflectee, getterName)
340 native 'InstanceMirror_invokeGetter'; 340 native 'InstanceMirror_invokeGetter';
341 341
342 _invokeSetter(reflectee, setterName, value) 342 _invokeSetter(reflectee, setterName, value)
343 native 'InstanceMirror_invokeSetter'; 343 native 'InstanceMirror_invokeSetter';
344 344
345 static _computeType(reflectee) 345 static _computeType(reflectee) => reflectee.runtimeType;
rmacnak 2013/10/04 16:49:56 Please don't change this. The mirrors should retri
siva 2013/10/04 16:56:34 I thought we don't allow end users to override met
rmacnak 2013/10/04 17:11:50 We don't, and the changes to the built-in types ar
Ivan Posva 2013/10/04 17:49:55 Ryan, In that case you should be calling your own
346 native 'Object_runtimeType';
347 } 346 }
348 347
349 class _LocalClosureMirrorImpl extends _LocalInstanceMirrorImpl 348 class _LocalClosureMirrorImpl extends _LocalInstanceMirrorImpl
350 implements ClosureMirror { 349 implements ClosureMirror {
351 _LocalClosureMirrorImpl(reflectee) : super(reflectee); 350 _LocalClosureMirrorImpl(reflectee) : super(reflectee);
352 351
353 MethodMirror _function; 352 MethodMirror _function;
354 MethodMirror get function { 353 MethodMirror get function {
355 if (_function == null) { 354 if (_function == null) {
356 _function = _computeFunction(reflectee); 355 _function = _computeFunction(reflectee);
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 if (typeMirror == null) { 1320 if (typeMirror == null) {
1322 typeMirror = makeLocalTypeMirror(key); 1321 typeMirror = makeLocalTypeMirror(key);
1323 _instanitationCache[key] = typeMirror; 1322 _instanitationCache[key] = typeMirror;
1324 if (typeMirror is ClassMirror && !typeMirror._isGeneric) { 1323 if (typeMirror is ClassMirror && !typeMirror._isGeneric) {
1325 _declarationCache[key] = typeMirror; 1324 _declarationCache[key] = typeMirror;
1326 } 1325 }
1327 } 1326 }
1328 return typeMirror; 1327 return typeMirror;
1329 } 1328 }
1330 } 1329 }
OLDNEW
« no previous file with comments | « runtime/lib/integers.dart ('k') | runtime/lib/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698