| Index: runtime/include/dart_api.h
|
| ===================================================================
|
| --- runtime/include/dart_api.h (revision 24158)
|
| +++ runtime/include/dart_api.h (working copy)
|
| @@ -1142,8 +1142,8 @@
|
| DART_EXPORT bool Dart_IsExternalString(Dart_Handle object);
|
| DART_EXPORT bool Dart_IsList(Dart_Handle object);
|
| DART_EXPORT bool Dart_IsLibrary(Dart_Handle object);
|
| +DART_EXPORT bool Dart_IsType(Dart_Handle handle);
|
| DART_EXPORT bool Dart_IsClass(Dart_Handle handle);
|
| -DART_EXPORT bool Dart_IsAbstractClass(Dart_Handle handle);
|
| DART_EXPORT bool Dart_IsFunction(Dart_Handle handle);
|
| DART_EXPORT bool Dart_IsVariable(Dart_Handle handle);
|
| DART_EXPORT bool Dart_IsTypeVariable(Dart_Handle handle);
|
| @@ -1165,6 +1165,18 @@
|
| * any functions that more properly belong here. */
|
|
|
| /**
|
| + * Gets the type of a Dart language object.
|
| + *
|
| + * \param instance Some Dart object.
|
| + *
|
| + * \return If no error occurs, the type is returned. Otherwise an
|
| + * error handle is returned.
|
| + */
|
| +DART_EXPORT Dart_Handle Dart_InstanceGetType(Dart_Handle instance);
|
| +
|
| +/**
|
| + * TODO(asiva): Deprecate this method once all use cases have switched
|
| + * to using Dart_InstanceGetType
|
| * Gets the class for some Dart language object.
|
| *
|
| * \param instance Some Dart object.
|
| @@ -1736,7 +1748,7 @@
|
| * This function allows hidden constructors (constructors with leading
|
| * underscores) to be called.
|
| *
|
| - * \param clazz A class or an interface.
|
| + * \param type Type of object to be constructed.
|
| * \param constructor_name The name of the constructor to invoke. Use
|
| * Dart_Null() to invoke the unnamed constructor. This name should
|
| * not include the name of the class.
|
| @@ -1747,7 +1759,7 @@
|
| * then the new object. If an error occurs during execution, then an
|
| * error handle is returned.
|
| */
|
| -DART_EXPORT Dart_Handle Dart_New(Dart_Handle clazz,
|
| +DART_EXPORT Dart_Handle Dart_New(Dart_Handle type,
|
| Dart_Handle constructor_name,
|
| int number_of_arguments,
|
| Dart_Handle* arguments);
|
| @@ -1755,9 +1767,9 @@
|
| /**
|
| * Invokes a method or function.
|
| *
|
| - * The 'target' parameter may be an object, class, or library. If
|
| + * The 'target' parameter may be an object, type, 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
|
| + * method. If 'target' is a type, 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.
|
| *
|
| @@ -1765,7 +1777,7 @@
|
| *
|
| * May generate an unhandled exception error.
|
| *
|
| - * \param target An object, class, or library.
|
| + * \param target An object, type, 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.
|
| @@ -1796,9 +1808,9 @@
|
| /**
|
| * Gets the value of a field.
|
| *
|
| - * The 'container' parameter may be an object, class, or library. If
|
| + * The 'container' parameter may be an object, type, or library. If
|
| * 'container' is an object, then this function will access an
|
| - * instance field. If 'container' is a class, then this function will
|
| + * instance field. If 'container' is a type, then this function will
|
| * access a static field. If 'container' is a library, then this
|
| * function will access a top-level variable.
|
| *
|
| @@ -1806,7 +1818,7 @@
|
| *
|
| * May generate an unhandled exception error.
|
| *
|
| - * \param container An object, class, or library.
|
| + * \param container An object, type, or library.
|
| * \param name A field name.
|
| *
|
| * \return If no error occurs, then the value of the field is
|
| @@ -1818,9 +1830,9 @@
|
| /**
|
| * Sets the value of a field.
|
| *
|
| - * The 'container' parameter may actually be an object, class, or
|
| + * The 'container' parameter may actually be an object, type, or
|
| * library. If 'container' is an object, then this function will
|
| - * access an instance field. If 'container' is a class, then this
|
| + * access an instance field. If 'container' is a type, then this
|
| * function will access a static field. If 'container' is a library,
|
| * then this function will access a top-level variable.
|
| *
|
| @@ -1828,7 +1840,7 @@
|
| *
|
| * May generate an unhandled exception error.
|
| *
|
| - * \param container An object, class, or library.
|
| + * \param container An object, type, or library.
|
| * \param name A field name.
|
| * \param value The new field value.
|
| *
|
| @@ -2086,8 +2098,8 @@
|
| */
|
| DART_EXPORT Dart_Handle Dart_GetClass(Dart_Handle library,
|
| Dart_Handle class_name);
|
| -/* TODO(turnidge): Consider returning Dart_Null() when the class is
|
| - * not found to distinguish that from a true error case. */
|
| +/* TODO(asiva): The above method needs to be removed once all uses
|
| + * of it are removed from the embedder code. */
|
|
|
| /**
|
| * Returns the url from which a library was loaded.
|
|
|