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

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

Issue 24975002: - Implement a first cut for const String.env in the VM to allow (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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
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 1459 matching lines...) Expand 10 before | Expand all | Expand 10 after
1470 * 1470 *
1471 * \return A valid handle if no error occurs during the operation. 1471 * \return A valid handle if no error occurs during the operation.
1472 */ 1472 */
1473 DART_EXPORT Dart_Handle Dart_StringToUTF8(Dart_Handle str, 1473 DART_EXPORT Dart_Handle Dart_StringToUTF8(Dart_Handle str,
1474 uint8_t** utf8_array, 1474 uint8_t** utf8_array,
1475 intptr_t* length); 1475 intptr_t* length);
1476 1476
1477 /** 1477 /**
1478 * Gets the data corresponding to the string object. This function returns 1478 * Gets the data corresponding to the string object. This function returns
1479 * the data only for Latin-1 (ISO-8859-1) string objects. For all other 1479 * the data only for Latin-1 (ISO-8859-1) string objects. For all other
1480 * string objects it return and error. 1480 * string objects it returns an error.
1481 * 1481 *
1482 * \param str A string. 1482 * \param str A string.
1483 * \param latin1_array An array allocated by the caller, used to return 1483 * \param latin1_array An array allocated by the caller, used to return
1484 * the string data. 1484 * the string data.
1485 * \param length Used to pass in the length of the provided array. 1485 * \param length Used to pass in the length of the provided array.
1486 * Used to return the length of the array which was actually used. 1486 * Used to return the length of the array which was actually used.
1487 * 1487 *
1488 * \return A valid handle if no error occurs during the operation. 1488 * \return A valid handle if no error occurs during the operation.
1489 */ 1489 */
1490 DART_EXPORT Dart_Handle Dart_StringToLatin1(Dart_Handle str, 1490 DART_EXPORT Dart_Handle Dart_StringToLatin1(Dart_Handle str,
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
2099 * name/arity to a Dart_NativeFunction. If no function is found, the 2099 * name/arity to a Dart_NativeFunction. If no function is found, the
2100 * callback should return NULL. 2100 * callback should return NULL.
2101 * 2101 *
2102 * See Dart_SetNativeResolver. 2102 * See Dart_SetNativeResolver.
2103 */ 2103 */
2104 typedef Dart_NativeFunction (*Dart_NativeEntryResolver)(Dart_Handle name, 2104 typedef Dart_NativeFunction (*Dart_NativeEntryResolver)(Dart_Handle name,
2105 int num_of_arguments); 2105 int num_of_arguments);
2106 /* TODO(turnidge): Consider renaming to NativeFunctionResolver or 2106 /* TODO(turnidge): Consider renaming to NativeFunctionResolver or
2107 * NativeResolver. */ 2107 * NativeResolver. */
2108 2108
2109 /*
2110 * ==============
2111 * Configurations
2112 * ==============
2113 */
2114
2115 typedef enum {
2116 kStringConfig = 0,
2117 kIntegerConfig,
2118 kBoolConfig
2119 } Dart_ConfigType;
2120
2121 /* TODO(iposva): Document. */
2122 typedef Dart_Handle (*Dart_ConfigCallback)(Dart_ConfigType type,
2123 Dart_Handle name);
2124
2125 /**
2126 * Sets the configuration callback for the current isolate. This callback is
2127 * used to lookup configuration values by name in the current environment.
2128 */
2129 DART_EXPORT Dart_Handle Dart_SetConfigCallback(Dart_ConfigCallback callback);
2130
2109 /** 2131 /**
2110 * Sets the callback used to resolve native functions for a library. 2132 * Sets the callback used to resolve native functions for a library.
2111 * 2133 *
2112 * \param library A library. 2134 * \param library A library.
2113 * \param resolver A native entry resolver. 2135 * \param resolver A native entry resolver.
2114 * 2136 *
2115 * \return A valid handle if the native resolver was set successfully. 2137 * \return A valid handle if the native resolver was set successfully.
2116 */ 2138 */
2117 DART_EXPORT Dart_Handle Dart_SetNativeResolver( 2139 DART_EXPORT Dart_Handle Dart_SetNativeResolver(
2118 Dart_Handle library, 2140 Dart_Handle library,
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
2312 * 2334 *
2313 * \param object An object. 2335 * \param object An object.
2314 * \param peer A value to store in the peer field. 2336 * \param peer A value to store in the peer field.
2315 * 2337 *
2316 * \return Returns an error if 'object' is a subtype of Null, num, or 2338 * \return Returns an error if 'object' is a subtype of Null, num, or
2317 * bool. 2339 * bool.
2318 */ 2340 */
2319 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); 2341 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer);
2320 2342
2321 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ 2343 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */
OLDNEW
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/lib/integers.cc » ('j') | sdk/lib/core/int.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698