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

Unified Diff: runtime/lib/growable_array.cc

Issue 134893003: Add internal operation that converts a growable list to a fixed list. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 | « no previous file | runtime/lib/internal_patch.dart » ('j') | runtime/lib/internal_patch.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/growable_array.cc
diff --git a/runtime/lib/growable_array.cc b/runtime/lib/growable_array.cc
index 34f60a0f1fe21aa36093b69225c565fe64c72f9f..c6ec61d284fb35f7ee8f407a92a170eaa9cf0ed9 100644
--- a/runtime/lib/growable_array.cc
+++ b/runtime/lib/growable_array.cc
@@ -91,4 +91,11 @@ DEFINE_NATIVE_ENTRY(GrowableList_setData, 2) {
return Object::null();
}
+
+DEFINE_NATIVE_ENTRY(GrowableList_toFixedLength, 1) {
+ const GrowableObjectArray& array =
+ GrowableObjectArray::CheckedHandle(arguments->NativeArgAt(0));
+ return Array::MakeArray(array);
srdjan 2014/02/05 16:39:59 Maybe use GET_NON_NULL_NATIVE_ARGUMENT instead of
Ivan Posva 2014/02/06 16:57:00 What Srdjan said. You are not guaranteed that the
Lasse Reichstein Nielsen 2014/02/10 09:01:54 Done.
+}
+
} // namespace dart
« no previous file with comments | « no previous file | runtime/lib/internal_patch.dart » ('j') | runtime/lib/internal_patch.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698