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

Side by Side Diff: runtime/include/dart_api.h

Issue 16968006: Add Dart_Allocate to the C++ API (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Allow Type objects as well Created 7 years, 6 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 | runtime/vm/dart_api_impl.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 * for details. All rights reserved. Use of this source code is governed by a 3 * for details. All rights reserved. Use of this source code is governed by a
4 * BSD-style license that can be found in the LICENSE file. 4 * BSD-style license that can be found in the LICENSE file.
5 */ 5 */
6 6
7 #ifndef INCLUDE_DART_API_H_ 7 #ifndef INCLUDE_DART_API_H_
8 #define INCLUDE_DART_API_H_ 8 #define INCLUDE_DART_API_H_
9 9
10 /** \mainpage Dart Embedding API Reference 10 /** \mainpage Dart Embedding API Reference
(...skipping 1735 matching lines...) Expand 10 before | Expand all | Expand 10 after
1746 * \return If the constructor is called and completes successfully, 1746 * \return If the constructor is called and completes successfully,
1747 * then the new object. If an error occurs during execution, then an 1747 * then the new object. If an error occurs during execution, then an
1748 * error handle is returned. 1748 * error handle is returned.
1749 */ 1749 */
1750 DART_EXPORT Dart_Handle Dart_New(Dart_Handle clazz, 1750 DART_EXPORT Dart_Handle Dart_New(Dart_Handle clazz,
1751 Dart_Handle constructor_name, 1751 Dart_Handle constructor_name,
1752 int number_of_arguments, 1752 int number_of_arguments,
1753 Dart_Handle* arguments); 1753 Dart_Handle* arguments);
1754 1754
1755 /** 1755 /**
1756 * Allocate a new object without invoking a constructor.
1757 *
1758 * \param type The type of an object to be allocated.
1759 *
1760 * \return The new object. If an error occurs during execution, then an
1761 * error handle is returned.
1762 */
1763 DART_EXPORT Dart_Handle Dart_Allocate(Dart_Handle type);
1764
1765 /**
1756 * Invokes a method or function. 1766 * Invokes a method or function.
1757 * 1767 *
1758 * The 'target' parameter may be an object, class, or library. If 1768 * The 'target' parameter may be an object, class, or library. If
1759 * 'target' is an object, then this function will invoke an instance 1769 * 'target' is an object, then this function will invoke an instance
1760 * method. If 'target' is a class, then this function will invoke a 1770 * method. If 'target' is a class, then this function will invoke a
1761 * static method. If 'target' is a library, then this function will 1771 * static method. If 'target' is a library, then this function will
1762 * invoke a top-level function from that library. 1772 * invoke a top-level function from that library.
1763 * 1773 *
1764 * This function ignores visibility (leading underscores in names). 1774 * This function ignores visibility (leading underscores in names).
1765 * 1775 *
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
2174 * 2184 *
2175 * \param object An object. 2185 * \param object An object.
2176 * \param peer A value to store in the peer field. 2186 * \param peer A value to store in the peer field.
2177 * 2187 *
2178 * \return Returns an error if 'object' is a subtype of Null, num, or 2188 * \return Returns an error if 'object' is a subtype of Null, num, or
2179 * bool. 2189 * bool.
2180 */ 2190 */
2181 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); 2191 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer);
2182 2192
2183 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ 2193 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698