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

Unified Diff: include/dart_api.h

Issue 9608024: Add Dart_Invoke, which will replace Dart_InvokeDynamic and Dart_InvokeStatic. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 9 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 | vm/dart_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
*/
« no previous file with comments | « no previous file | vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698