| Index: runtime/lib/object.cc
|
| diff --git a/runtime/lib/object.cc b/runtime/lib/object.cc
|
| index 78fb700f675f5a6f9191ef40200d977445fdfc98..6034594343622c0c2d9bc7926ca5c316e88bb2b0 100644
|
| --- a/runtime/lib/object.cc
|
| +++ b/runtime/lib/object.cc
|
| @@ -379,4 +379,19 @@ DEFINE_NATIVE_ENTRY(Internal_prependTypeArguments, 3) {
|
| return result.Canonicalize();
|
| }
|
|
|
| +DEFINE_NATIVE_ENTRY(InvocationMirror_unpackTypeArguments, 1) {
|
| + const TypeArguments& type_arguments =
|
| + TypeArguments::CheckedHandle(zone, arguments->NativeArgAt(0));
|
| + const intptr_t len = type_arguments.Length();
|
| + ASSERT(len > 0);
|
| + const Array& type_list = Array::Handle(zone, Array::New(len));
|
| + AbstractType& type = AbstractType::Handle(zone);
|
| + for (intptr_t i = 0; i < len; i++) {
|
| + type = type_arguments.TypeAt(i);
|
| + type_list.SetAt(i, type);
|
| + }
|
| + type_list.MakeImmutable();
|
| + return type_list.raw();
|
| +}
|
| +
|
| } // namespace dart
|
|
|