| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef INCLUDE_DART_API_H_ | 5 #ifndef INCLUDE_DART_API_H_ |
| 6 #define INCLUDE_DART_API_H_ | 6 #define INCLUDE_DART_API_H_ |
| 7 | 7 |
| 8 /** \mainpage Dart Embedding API Reference | 8 /** \mainpage Dart Embedding API Reference |
| 9 * | 9 * |
| 10 * Dart is a class-based programming language for creating structured | 10 * Dart is a class-based programming language for creating structured |
| (...skipping 1708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1719 * \param arguments An array of arguments to the function. | 1719 * \param arguments An array of arguments to the function. |
| 1720 * | 1720 * |
| 1721 * \return If the function or method is called and completes | 1721 * \return If the function or method is called and completes |
| 1722 * successfully, then the return value is returned. If an error | 1722 * successfully, then the return value is returned. If an error |
| 1723 * occurs during execution, then an error handle is returned. | 1723 * occurs during execution, then an error handle is returned. |
| 1724 */ | 1724 */ |
| 1725 DART_EXPORT Dart_Handle Dart_Invoke(Dart_Handle target, | 1725 DART_EXPORT Dart_Handle Dart_Invoke(Dart_Handle target, |
| 1726 Dart_Handle name, | 1726 Dart_Handle name, |
| 1727 int number_of_arguments, | 1727 int number_of_arguments, |
| 1728 Dart_Handle* arguments); | 1728 Dart_Handle* arguments); |
| 1729 /** | |
| 1730 * DEPRECATED: Use Dart_Invoke instead. | |
| 1731 * | |
| 1732 * Invokes a static method with the given arguments. | |
| 1733 * | |
| 1734 * May generate an unhandled exception error. | |
| 1735 * | |
| 1736 * \return If no error occurs during execution, then the result of | |
| 1737 * invoking the method is returned. If an error occurs during | |
| 1738 * execution, then an error handle is returned. | |
| 1739 */ | |
| 1740 DART_EXPORT Dart_Handle Dart_InvokeStatic(Dart_Handle library, | |
| 1741 Dart_Handle class_name, | |
| 1742 Dart_Handle function_name, | |
| 1743 int number_of_arguments, | |
| 1744 Dart_Handle* arguments); | |
| 1745 | |
| 1746 /** | |
| 1747 * DEPRECATED: Use Dart_Invoke instead. | |
| 1748 * | |
| 1749 * Invokes an instance method with the given arguments. | |
| 1750 * | |
| 1751 * May generate an unhandled exception error. | |
| 1752 * | |
| 1753 * \return If no error occurs during execution, then the result of | |
| 1754 * invoking the method is returned. If an error occurs during | |
| 1755 * execution, then an error handle is returned. | |
| 1756 */ | |
| 1757 DART_EXPORT Dart_Handle Dart_InvokeDynamic(Dart_Handle receiver, | |
| 1758 Dart_Handle function_name, | |
| 1759 int number_of_arguments, | |
| 1760 Dart_Handle* arguments); | |
| 1761 | 1729 |
| 1762 /** | 1730 /** |
| 1763 * Gets the value of a field. | 1731 * Gets the value of a field. |
| 1764 * | 1732 * |
| 1765 * The 'container' parameter may be an object, class, or library. If | 1733 * The 'container' parameter may be an object, class, or library. If |
| 1766 * 'container' is an object, then this function will access an | 1734 * 'container' is an object, then this function will access an |
| 1767 * instance field. If 'container' is a class, then this function will | 1735 * instance field. If 'container' is a class, then this function will |
| 1768 * access a static field. If 'container' is a library, then this | 1736 * access a static field. If 'container' is a library, then this |
| 1769 * function will access a top-level variable. | 1737 * function will access a top-level variable. |
| 1770 * | 1738 * |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1798 * \param name A field name. | 1766 * \param name A field name. |
| 1799 * \param value The new field value. | 1767 * \param value The new field value. |
| 1800 * | 1768 * |
| 1801 * \return A valid handle if no error occurs. | 1769 * \return A valid handle if no error occurs. |
| 1802 */ | 1770 */ |
| 1803 DART_EXPORT Dart_Handle Dart_SetField(Dart_Handle container, | 1771 DART_EXPORT Dart_Handle Dart_SetField(Dart_Handle container, |
| 1804 Dart_Handle name, | 1772 Dart_Handle name, |
| 1805 Dart_Handle value); | 1773 Dart_Handle value); |
| 1806 | 1774 |
| 1807 /** | 1775 /** |
| 1808 * DEPRECATED: Use Dart_SetField/Dart_GetField instead. | |
| 1809 * | |
| 1810 * Gets the value of a static field. | |
| 1811 * | |
| 1812 * May generate an unhandled exception error. | |
| 1813 * | |
| 1814 * \return If no error occurs, then the value of the field is | |
| 1815 * returned. Otherwise an error handle is returned. | |
| 1816 */ | |
| 1817 DART_EXPORT Dart_Handle Dart_GetStaticField(Dart_Handle cls, | |
| 1818 Dart_Handle name); | |
| 1819 /** | |
| 1820 * DEPRECATED: Use Dart_SetField/Dart_GetField instead. | |
| 1821 * | |
| 1822 * Sets the value of a static field. | |
| 1823 * | |
| 1824 * May generate an unhandled exception error. | |
| 1825 * | |
| 1826 * \return A valid handle if no error occurs. | |
| 1827 */ | |
| 1828 DART_EXPORT Dart_Handle Dart_SetStaticField(Dart_Handle cls, | |
| 1829 Dart_Handle name, | |
| 1830 Dart_Handle value); | |
| 1831 | |
| 1832 /** | |
| 1833 * DEPRECATED: Use Dart_SetField/Dart_GetField instead. | |
| 1834 * | |
| 1835 * Gets the value of an instance field. | |
| 1836 * | |
| 1837 * May generate an unhandled exception error. | |
| 1838 * | |
| 1839 * \return If no error occurs, then the value of the field is | |
| 1840 * returned. Otherwise an error handle is returned. | |
| 1841 */ | |
| 1842 DART_EXPORT Dart_Handle Dart_GetInstanceField(Dart_Handle obj, | |
| 1843 Dart_Handle name); | |
| 1844 /** | |
| 1845 * DEPRECATED: Use Dart_SetField/Dart_GetField instead. | |
| 1846 * | |
| 1847 * Sets the value of an instance field. | |
| 1848 * | |
| 1849 * May generate an unhandled exception error. | |
| 1850 * | |
| 1851 * \return A valid handle if no error occurs. | |
| 1852 */ | |
| 1853 DART_EXPORT Dart_Handle Dart_SetInstanceField(Dart_Handle obj, | |
| 1854 Dart_Handle name, | |
| 1855 Dart_Handle value); | |
| 1856 | |
| 1857 /** | |
| 1858 * Creates a native wrapper class. | 1776 * Creates a native wrapper class. |
| 1859 * | 1777 * |
| 1860 * TODO(turnidge): Document. | 1778 * TODO(turnidge): Document. |
| 1861 */ | 1779 */ |
| 1862 DART_EXPORT Dart_Handle Dart_CreateNativeWrapperClass(Dart_Handle library, | 1780 DART_EXPORT Dart_Handle Dart_CreateNativeWrapperClass(Dart_Handle library, |
| 1863 Dart_Handle class_name, | 1781 Dart_Handle class_name, |
| 1864 int field_count); | 1782 int field_count); |
| 1865 | 1783 |
| 1866 /** | 1784 /** |
| 1867 * Gets the value of a native field. | 1785 * Gets the value of a native field. |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2052 | 1970 |
| 2053 // --- Profiling support ---- | 1971 // --- Profiling support ---- |
| 2054 | 1972 |
| 2055 // External pprof support for gathering and dumping symbolic | 1973 // External pprof support for gathering and dumping symbolic |
| 2056 // information that can be used for better profile reports for | 1974 // information that can be used for better profile reports for |
| 2057 // dynamically generated code. | 1975 // dynamically generated code. |
| 2058 DART_EXPORT void Dart_InitPprofSupport(); | 1976 DART_EXPORT void Dart_InitPprofSupport(); |
| 2059 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); | 1977 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); |
| 2060 | 1978 |
| 2061 #endif // INCLUDE_DART_API_H_ | 1979 #endif // INCLUDE_DART_API_H_ |
| OLD | NEW |