Chromium Code Reviews| Index: runtime/lib/mirrors_impl.dart |
| =================================================================== |
| --- runtime/lib/mirrors_impl.dart (revision 9646) |
| +++ runtime/lib/mirrors_impl.dart (working copy) |
| @@ -183,7 +183,6 @@ |
| implements InstanceMirror { |
| _LocalInstanceMirrorImpl(ref, |
| this._class, |
| - this._hasSimpleValue, |
| this._reflectee) : super(ref) {} |
| var _class; |
| @@ -197,12 +196,11 @@ |
| // LocalInstanceMirrors always reflect local instances |
| bool hasReflectee = true; |
| - var _hasSimpleValue; |
| var _reflectee; |
| get reflectee() => _reflectee; |
| String toString() { |
| - if (_hasSimpleValue) { |
| + if (isSimpleValue(_reflectee)) { |
| if (_reflectee is String) { |
| return "InstanceMirror on <'${_dartEscape(_reflectee)}'>"; |
| } else { |
| @@ -372,6 +370,7 @@ |
| implements MethodMirror { |
| _LocalMethodMirrorImpl(this.simpleName, |
| this._owner, |
| + this._parameters, |
| this.isStatic, |
| this.isAbstract, |
| this.isGetter, |
| @@ -412,11 +411,29 @@ |
| final bool isRedirectingConstructor; |
| final bool isFactoryConstructor; |
| + var _parameters; |
|
turnidge
2012/07/13 23:37:12
Change this var to a type so we get type checking
|
| + List<ParameterMirror> parameters() => _parameters; |
| + |
| String toString() { |
| return "MethodMirror on '$simpleName'"; |
| } |
| } |
| +class _LocalParameterMirrorImpl extends _LocalVariableMirrorImpl |
| + implements ParameterMirror { |
| + // TODO(rmacnak): Fill these mirrors will real information |
| + _LocalParameterMirrorImpl(this._isOptional) |
| + : super(null, null, false, false) {} |
| + |
| + |
| + bool _isOptional; |
| + |
| + TypeMirror type() => null; |
| + String defaultValue() => null; |
| + bool hasDefaultValue() => null; |
| + bool isOptional() => _isOptional; |
| +} |
| + |
| class _LocalVariableMirrorImpl extends _LocalMirrorImpl |
| implements VariableMirror { |
| _LocalVariableMirrorImpl(this.simpleName, |