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

Unified Diff: runtime/lib/mirrors_impl.dart

Issue 19512003: Implement VariableMirror creation with non-API code. To break circular initialization, have them fi… (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/lib/mirrors.cc ('k') | runtime/vm/bootstrap_natives.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/mirrors_impl.dart
===================================================================
--- runtime/lib/mirrors_impl.dart (revision 25315)
+++ runtime/lib/mirrors_impl.dart (working copy)
@@ -1037,6 +1037,9 @@
var _type;
TypeMirror get type {
+ if (_type == null) {
+ _type = _VariableMirror_type(_reflectee);
+ }
if (_type is! Mirror) {
_type = _type.resolve(mirrors);
}
@@ -1047,6 +1050,9 @@
final bool isFinal;
String toString() => "VariableMirror on '${_n(simpleName)}'";
+
+ static _VariableMirror_type(reflectee)
+ native "VariableMirror_type";
}
class _LocalParameterMirrorImpl extends _LocalVariableMirrorImpl
@@ -1096,6 +1102,15 @@
}
String toString() => "TypeMirror on '${_n(simpleName)}'";
+
+ // TODO(11955): Remove once dynamicType and voidType are canonical objects in
+ // the object store.
+ operator ==(other) {
+ if (other is! _SpecialTypeMirrorImpl) {
+ return false;
+ }
+ return this.simpleName == other.simpleName;
+ }
ahe 2013/07/24 09:45:31 Always override hashCode when overriding operator=
}
class _Mirrors {
« 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