Chromium Code Reviews| Index: runtime/lib/mirrors.cc |
| diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc |
| index 896d861479a04a38d568c26cd28a1078deaafa29..659a57d43832d35d4ed72b4f20c7ac511eafaad0 100644 |
| --- a/runtime/lib/mirrors.cc |
| +++ b/runtime/lib/mirrors.cc |
| @@ -125,7 +125,7 @@ static RawInstance* CreateParameterMirrorList(const Function& func, |
| const intptr_t index_of_first_named_param = |
| non_implicit_param_count - func.NumOptionalNamedParameters(); |
| const Array& results = Array::Handle(Array::New(non_implicit_param_count)); |
| - const Array& args = Array::Handle(Array::New(8)); |
| + const Array& args = Array::Handle(Array::New(9)); |
| // Return for synthetic functions and getters. |
| if (func.IsGetterFunction() || |
| @@ -140,6 +140,7 @@ static RawInstance* CreateParameterMirrorList(const Function& func, |
| Instance& param = Instance::Handle(); |
| Bool& is_final = Bool::Handle(); |
| Object& default_value = Object::Handle(); |
| + Object& metadata = Object::Handle(); |
| // Reparse the function for the following information: |
| // * The default value of a parameter. |
| @@ -154,12 +155,14 @@ static RawInstance* CreateParameterMirrorList(const Function& func, |
| args.SetAt(2, owner_mirror); |
| const Array& param_descriptor = Array::Cast(result); |
| - ASSERT(param_descriptor.Length() == (2 * non_implicit_param_count)); |
| + ASSERT(param_descriptor.Length() == (3 * non_implicit_param_count)); |
|
siva
2013/08/28 23:26:48
You should probably make 3 a named constant,
const
|
| for (intptr_t i = 0; i < non_implicit_param_count; i++) { |
| pos ^= Smi::New(i); |
| name ^= func.ParameterNameAt(implicit_param_count + i); |
| - is_final ^= param_descriptor.At(i * 2); |
| - default_value = param_descriptor.At(i * 2 + 1); |
| + is_final ^= param_descriptor.At(i * 3); |
| + default_value = param_descriptor.At(i * 3 + 1); |
| + metadata = param_descriptor.At(i * 3 + 2); |
| + |
| ASSERT(default_value.IsNull() || default_value.IsInstance()); |
| // Arguments 0 (referent) and 2 (owner) are the same for all parameters. See |
| @@ -172,6 +175,7 @@ static RawInstance* CreateParameterMirrorList(const Function& func, |
| Bool::True() : Bool::False()); |
| args.SetAt(6, is_final); |
| args.SetAt(7, default_value); |
| + args.SetAt(8, metadata); |
| param ^= CreateMirror(Symbols::_LocalParameterMirrorImpl(), args); |
| results.SetAt(i, param); |
| } |