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

Unified Diff: runtime/lib/object.cc

Issue 3007603002: [VM generic function reification] Support generic functions in Invocation class. (Closed)
Patch Set: address review comment Created 3 years, 4 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/invocation_mirror_patch.dart ('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/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
« no previous file with comments | « runtime/lib/invocation_mirror_patch.dart ('k') | runtime/vm/bootstrap_natives.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698