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

Side by Side Diff: include/dart_api.h

Issue 9616044: Adds new apis Dart_GetField/Dart_SetField. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | lib/isolate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after
1608 * \return If no error occurs during execution, then the result of 1608 * \return If no error occurs during execution, then the result of
1609 * invoking the method is returned. If an error occurs during 1609 * invoking the method is returned. If an error occurs during
1610 * execution, then an error handle is returned. 1610 * execution, then an error handle is returned.
1611 */ 1611 */
1612 DART_EXPORT Dart_Handle Dart_InvokeDynamic(Dart_Handle receiver, 1612 DART_EXPORT Dart_Handle Dart_InvokeDynamic(Dart_Handle receiver,
1613 Dart_Handle function_name, 1613 Dart_Handle function_name,
1614 int number_of_arguments, 1614 int number_of_arguments,
1615 Dart_Handle* arguments); 1615 Dart_Handle* arguments);
1616 1616
1617 /** 1617 /**
1618 * Gets the value of a field.
1619 *
1620 * The 'container' parameter may actually be an object, class, or
1621 * library. If 'container' is an object, then this function will
1622 * access an instance field. If 'container' is a class, then this
1623 * function will access a static field. If 'container' is a library,
1624 * then this function will access a top-level variable.
1625 *
1626 * This function ignores field visibility (leading underscores in names).
1627 *
1628 * May generate an unhandled exception error.
1629 *
1630 * \param container An object, class, or library.
1631 * \param name A field name
1632 *
1633 * \return If no error occurs, then the value of the field is
1634 * returned. Otherwise an error handle is returned.
1635 */
1636 DART_EXPORT Dart_Handle Dart_GetField(Dart_Handle container,
1637 Dart_Handle name);
1638
1639 /**
1640 * Sets the value of a field.
1641 *
1642 * The 'container' parameter may actually be an object, class, or
1643 * library. If 'container' is an object, then this function will
1644 * access an instance field. If 'container' is a class, then this
1645 * function will access a static field. If 'container' is a library,
1646 * then this function will access a top-level variable.
1647 *
1648 * This function ignores field visibility (leading underscores in names).
1649 *
1650 * May generate an unhandled exception error.
1651 *
1652 * \param container An object, class, or library.
1653 * \param name A field name
1654 * \param value The new field value
1655 *
1656 * \return A valid handle if no error occurs.
1657 */
1658 DART_EXPORT Dart_Handle Dart_SetField(Dart_Handle container,
1659 Dart_Handle name,
1660 Dart_Handle value);
1661
1662 /**
1663 * DEPRECATED: Use Dart_SetField/Dart_GetField instead.
1664 *
1618 * Gets the value of a static field. 1665 * Gets the value of a static field.
1619 * 1666 *
1620 * May generate an unhandled exception error. 1667 * May generate an unhandled exception error.
1621 * 1668 *
1622 * \return If no error occurs, then the value of the field is 1669 * \return If no error occurs, then the value of the field is
1623 * returned. Otherwise an error handle is returned. 1670 * returned. Otherwise an error handle is returned.
1624 */ 1671 */
1625 DART_EXPORT Dart_Handle Dart_GetStaticField(Dart_Handle cls, Dart_Handle name); 1672 DART_EXPORT Dart_Handle Dart_GetStaticField(Dart_Handle cls,
1626 1673 Dart_Handle name);
1627 /** 1674 /**
1675 * DEPRECATED: Use Dart_SetField/Dart_GetField instead.
1676 *
1628 * Sets the value of a static field. 1677 * Sets the value of a static field.
1629 * 1678 *
1630 * May generate an unhandled exception error. 1679 * May generate an unhandled exception error.
1631 * 1680 *
1632 * \return A valid handle if no error occurs. 1681 * \return A valid handle if no error occurs.
1633 */ 1682 */
1634 DART_EXPORT Dart_Handle Dart_SetStaticField(Dart_Handle cls, 1683 DART_EXPORT Dart_Handle Dart_SetStaticField(Dart_Handle cls,
1635 Dart_Handle name, 1684 Dart_Handle name,
1636 Dart_Handle value); 1685 Dart_Handle value);
1637 1686
1638 /** 1687 /**
1688 * DEPRECATED: Use Dart_SetField/Dart_GetField instead.
1689 *
1639 * Gets the value of an instance field. 1690 * Gets the value of an instance field.
1640 * 1691 *
1641 * May generate an unhandled exception error. 1692 * May generate an unhandled exception error.
1642 * 1693 *
1643 * \return If no error occurs, then the value of the field is 1694 * \return If no error occurs, then the value of the field is
1644 * returned. Otherwise an error handle is returned. 1695 * returned. Otherwise an error handle is returned.
1645 */ 1696 */
1646 DART_EXPORT Dart_Handle Dart_GetInstanceField(Dart_Handle obj, 1697 DART_EXPORT Dart_Handle Dart_GetInstanceField(Dart_Handle obj,
1647 Dart_Handle name); 1698 Dart_Handle name);
1648 /** 1699 /**
1700 * DEPRECATED: Use Dart_SetField/Dart_GetField instead.
1701 *
1649 * Sets the value of an instance field. 1702 * Sets the value of an instance field.
1650 * 1703 *
1651 * May generate an unhandled exception error. 1704 * May generate an unhandled exception error.
1652 * 1705 *
1653 * \return A valid handle if no error occurs. 1706 * \return A valid handle if no error occurs.
1654 */ 1707 */
1655 DART_EXPORT Dart_Handle Dart_SetInstanceField(Dart_Handle obj, 1708 DART_EXPORT Dart_Handle Dart_SetInstanceField(Dart_Handle obj,
1656 Dart_Handle name, 1709 Dart_Handle name,
1657 Dart_Handle value); 1710 Dart_Handle value);
1658 1711
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1850 1903
1851 // --- Profiling support ---- 1904 // --- Profiling support ----
1852 1905
1853 // External pprof support for gathering and dumping symbolic 1906 // External pprof support for gathering and dumping symbolic
1854 // information that can be used for better profile reports for 1907 // information that can be used for better profile reports for
1855 // dynamically generated code. 1908 // dynamically generated code.
1856 DART_EXPORT void Dart_InitPprofSupport(); 1909 DART_EXPORT void Dart_InitPprofSupport();
1857 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); 1910 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size);
1858 1911
1859 #endif // INCLUDE_DART_API_H_ 1912 #endif // INCLUDE_DART_API_H_
OLDNEW
« no previous file with comments | « no previous file | lib/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698