Index: include/dart_api.h |
=================================================================== |
--- include/dart_api.h (revision 5432) |
+++ include/dart_api.h (working copy) |
@@ -1655,6 +1655,34 @@ |
// --- Methods and Fields --- |
/** |
+ * Invokes a method or function. |
+ * |
+ * The 'target' parameter may be an object, class, or library. If |
+ * 'target' is an object, then this function will invoke an instance |
+ * method. If 'target' is a class, then this function will invoke a |
+ * static method. If 'target' is a library, then this function will |
+ * invoke a top-level function from that library. |
+ * |
+ * This function ignores visibility (leading underscores in names). |
+ * |
+ * May generate an unhandled exception error. |
+ * |
+ * \param target An object, class, or library. |
+ * \param name The name of the function or method to invoke. |
+ * \param number_of_arguments Size of the arguments array. |
+ * \param arguments An array of arguments to the function. |
+ * |
+ * \return If the function or method is called and completes |
+ * successfully, then the return value is returned. If an error |
+ * occurs during execution, then an error handle is returned. |
+ */ |
+DART_EXPORT Dart_Handle Dart_Invoke(Dart_Handle target, |
+ Dart_Handle name, |
+ int number_of_arguments, |
+ Dart_Handle* arguments); |
+/** |
+ * DEPRECATED: Use Dart_Invoke instead. |
+ * |
* Invokes a static method with the given arguments. |
* |
* May generate an unhandled exception error. |
@@ -1670,6 +1698,8 @@ |
Dart_Handle* arguments); |
/** |
+ * DEPRECATED: Use Dart_Invoke instead. |
+ * |
* Invokes an instance method with the given arguments. |
* |
* May generate an unhandled exception error. |
@@ -1686,18 +1716,18 @@ |
/** |
* Gets the value of a field. |
* |
- * The 'container' parameter may actually be an object, class, or |
- * library. If 'container' is an object, then this function will |
- * access an instance field. If 'container' is a class, then this |
- * function will access a static field. If 'container' is a library, |
- * then this function will access a top-level variable. |
+ * The 'container' parameter may be an object, class, or library. If |
+ * 'container' is an object, then this function will access an |
+ * instance field. If 'container' is a class, then this function will |
+ * access a static field. If 'container' is a library, then this |
+ * function will access a top-level variable. |
* |
* This function ignores field visibility (leading underscores in names). |
* |
* May generate an unhandled exception error. |
* |
* \param container An object, class, or library. |
- * \param name A field name |
+ * \param name A field name. |
* |
* \return If no error occurs, then the value of the field is |
* returned. Otherwise an error handle is returned. |
@@ -1719,8 +1749,8 @@ |
* May generate an unhandled exception error. |
* |
* \param container An object, class, or library. |
- * \param name A field name |
- * \param value The new field value |
+ * \param name A field name. |
+ * \param value The new field value. |
* |
* \return A valid handle if no error occurs. |
*/ |