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

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') | vm/object.cc » ('J')
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 (underscores in names).
Ivan Posva 2012/03/07 20:02:58 leading underscores
turnidge 2012/03/07 21:17:12 Done.
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 * May generate an unhandled exception error.
1649 *
1650 * \param container An object, class, or library.
1651 * \param name A field name
1652 * \param value The new field value
1653 *
1654 * \return A valid handle if no error occurs.
1655 */
1656 DART_EXPORT Dart_Handle Dart_SetField(Dart_Handle container,
Ivan Posva 2012/03/07 20:02:58 Please document that this also ignores privacy.
turnidge 2012/03/07 21:17:12 Done.
1657 Dart_Handle name,
1658 Dart_Handle value);
1659
1660 /**
1661 * DEPRECATED: Use Dart_SetField/Dart_GetField instead.
1662 *
1618 * Gets the value of a static field. 1663 * Gets the value of a static field.
1619 * 1664 *
1620 * May generate an unhandled exception error. 1665 * May generate an unhandled exception error.
1621 * 1666 *
1622 * \return If no error occurs, then the value of the field is 1667 * \return If no error occurs, then the value of the field is
1623 * returned. Otherwise an error handle is returned. 1668 * returned. Otherwise an error handle is returned.
1624 */ 1669 */
1625 DART_EXPORT Dart_Handle Dart_GetStaticField(Dart_Handle cls, Dart_Handle name); 1670 DART_EXPORT Dart_Handle Dart_GetStaticField(Dart_Handle cls,
1626 1671 Dart_Handle name);
1627 /** 1672 /**
1673 * DEPRECATED: Use Dart_SetField/Dart_GetField instead.
1674 *
1628 * Sets the value of a static field. 1675 * Sets the value of a static field.
1629 * 1676 *
1630 * May generate an unhandled exception error. 1677 * May generate an unhandled exception error.
1631 * 1678 *
1632 * \return A valid handle if no error occurs. 1679 * \return A valid handle if no error occurs.
1633 */ 1680 */
1634 DART_EXPORT Dart_Handle Dart_SetStaticField(Dart_Handle cls, 1681 DART_EXPORT Dart_Handle Dart_SetStaticField(Dart_Handle cls,
1635 Dart_Handle name, 1682 Dart_Handle name,
1636 Dart_Handle value); 1683 Dart_Handle value);
1637 1684
1638 /** 1685 /**
1686 * DEPRECATED: Use Dart_SetField/Dart_GetField instead.
1687 *
1639 * Gets the value of an instance field. 1688 * Gets the value of an instance field.
1640 * 1689 *
1641 * May generate an unhandled exception error. 1690 * May generate an unhandled exception error.
1642 * 1691 *
1643 * \return If no error occurs, then the value of the field is 1692 * \return If no error occurs, then the value of the field is
1644 * returned. Otherwise an error handle is returned. 1693 * returned. Otherwise an error handle is returned.
1645 */ 1694 */
1646 DART_EXPORT Dart_Handle Dart_GetInstanceField(Dart_Handle obj, 1695 DART_EXPORT Dart_Handle Dart_GetInstanceField(Dart_Handle obj,
1647 Dart_Handle name); 1696 Dart_Handle name);
1648 /** 1697 /**
1698 * DEPRECATED: Use Dart_SetField/Dart_GetField instead.
1699 *
1649 * Sets the value of an instance field. 1700 * Sets the value of an instance field.
1650 * 1701 *
1651 * May generate an unhandled exception error. 1702 * May generate an unhandled exception error.
1652 * 1703 *
1653 * \return A valid handle if no error occurs. 1704 * \return A valid handle if no error occurs.
1654 */ 1705 */
1655 DART_EXPORT Dart_Handle Dart_SetInstanceField(Dart_Handle obj, 1706 DART_EXPORT Dart_Handle Dart_SetInstanceField(Dart_Handle obj,
1656 Dart_Handle name, 1707 Dart_Handle name,
1657 Dart_Handle value); 1708 Dart_Handle value);
1658 1709
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1850 1901
1851 // --- Profiling support ---- 1902 // --- Profiling support ----
1852 1903
1853 // External pprof support for gathering and dumping symbolic 1904 // External pprof support for gathering and dumping symbolic
1854 // information that can be used for better profile reports for 1905 // information that can be used for better profile reports for
1855 // dynamically generated code. 1906 // dynamically generated code.
1856 DART_EXPORT void Dart_InitPprofSupport(); 1907 DART_EXPORT void Dart_InitPprofSupport();
1857 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); 1908 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size);
1858 1909
1859 #endif // INCLUDE_DART_API_H_ 1910 #endif // INCLUDE_DART_API_H_
OLDNEW
« no previous file with comments | « no previous file | lib/isolate.cc » ('j') | vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698