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

Unified Diff: runtime/include/dart_api.h

Issue 349643003: Add a function Dart_AllocateWithNativeFields which allocates an object and sets the native fields i… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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/vm/dart_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/include/dart_api.h
===================================================================
--- runtime/include/dart_api.h (revision 37560)
+++ runtime/include/dart_api.h (working copy)
@@ -2006,6 +2006,23 @@
DART_EXPORT Dart_Handle Dart_Allocate(Dart_Handle type);
/**
+ * Allocate a new object without invoking a constructor, and sets specified
+ * native fields.
+ *
+ * \param args the Native arguments block passed into the native call.
srdjan 2014/06/20 20:36:58 There is no 'args' parameter.
+ * \param type The type of an object to be allocated.
+ * \param num_native_fields The number of native fields to set.
+ * \param native_fields An array containing the value of native fields.
+ *
+ * \return The new object. If an error occurs during execution, then an
+ * error handle is returned.
+ */
+DART_EXPORT Dart_Handle Dart_AllocateWithNativeFields(
+ Dart_Handle type,
+ intptr_t num_native_fields,
+ const intptr_t* native_fields);
+
+/**
* Invokes a method or function.
*
* The 'target' parameter may be an object, type, or library. If
@@ -2049,7 +2066,7 @@
/**
* Invokes a Generative Constructor on an object that was previously
- * allocated using Dart_Allocate.
+ * allocated using Dart_Allocate/Dart_AllocateWithNativeFields.
*
* The 'target' parameter must be an object.
*
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698