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

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

Issue 8383029: Implement external strings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fully displace external string metadata Created 9 years, 1 month 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/lib/string.dart » ('j') | runtime/lib/string.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 * 705 *
706 * \param value An array of 32-bit codepoints. 706 * \param value An array of 32-bit codepoints.
707 * \param length The length of the codepoints array. 707 * \param length The length of the codepoints array.
708 * 708 *
709 * \return The String object if no errors occurs. Otherwise returns 709 * \return The String object if no errors occurs. Otherwise returns
710 * an invalid handle. 710 * an invalid handle.
711 */ 711 */
712 DART_EXPORT Dart_Handle Dart_NewString32(const uint32_t* codepoints, 712 DART_EXPORT Dart_Handle Dart_NewString32(const uint32_t* codepoints,
713 intptr_t length); 713 intptr_t length);
714 714
715
716 typedef void (*Dart_PeerFinalizer)(void* peer);
717
718 DART_EXPORT Dart_Handle Dart_NewExternalString8(const uint8_t* codepoints,
719 intptr_t length,
720 void* peer,
721 Dart_PeerFinalizer callback);
722
723 DART_EXPORT Dart_Handle Dart_NewExternalString16(const uint16_t* codepoints,
724 intptr_t length,
725 void* peer,
726 Dart_PeerFinalizer callback);
727
728 DART_EXPORT Dart_Handle Dart_NewExternalString32(const uint32_t* codepoints,
729 intptr_t length,
730 void* peer,
731 Dart_PeerFinalizer callback);
732
715 /** 733 /**
716 * Gets the codepoints from a String. 734 * Gets the codepoints from a String.
717 * 735 *
718 * This function is only valid on strings for which Dart_IsString8 is 736 * This function is only valid on strings for which Dart_IsString8 is
719 * true. Otherwise an error occurs. 737 * true. Otherwise an error occurs.
720 * 738 *
721 * \param str A string. 739 * \param str A string.
722 * \param codepoints An array allocated by the caller, used to return 740 * \param codepoints An array allocated by the caller, used to return
723 * the array of codepoints. 741 * the array of codepoints.
724 * \param length Used to pass in the length of the provided array. 742 * \param length Used to pass in the length of the provided array.
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 1149
1132 // --- Profiling support ---- 1150 // --- Profiling support ----
1133 1151
1134 // External pprof support for gathering and dumping symbolic 1152 // External pprof support for gathering and dumping symbolic
1135 // information that can be used for better profile reports for 1153 // information that can be used for better profile reports for
1136 // dynamically generated code. 1154 // dynamically generated code.
1137 DART_EXPORT void Dart_InitPprofSupport(); 1155 DART_EXPORT void Dart_InitPprofSupport();
1138 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); 1156 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size);
1139 1157
1140 #endif // INCLUDE_DART_API_H_ 1158 #endif // INCLUDE_DART_API_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/lib/string.dart » ('j') | runtime/lib/string.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698