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

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

Issue 10698011: Support posting of external data into dart as external uint8 arrays through the Dart API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 // 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 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 enum Type { 878 enum Type {
879 kNull = 0, 879 kNull = 0,
880 kBool, 880 kBool,
881 kInt32, 881 kInt32,
882 kInt64, 882 kInt64,
883 kBigint, 883 kBigint,
884 kDouble, 884 kDouble,
885 kString, 885 kString,
886 kArray, 886 kArray,
887 kUint8Array, 887 kUint8Array,
888 kExternalUint8Array,
888 kUnsupported, 889 kUnsupported,
889 kNumberOfTypes 890 kNumberOfTypes
890 } type; 891 } type;
891 union { 892 union {
892 bool as_bool; 893 bool as_bool;
893 int32_t as_int32; 894 int32_t as_int32;
894 int64_t as_int64; 895 int64_t as_int64;
895 double as_double; 896 double as_double;
896 char* as_string; 897 char* as_string;
897 char* as_bigint; 898 char* as_bigint;
898 struct { 899 struct {
899 int length; 900 int length;
900 struct _Dart_CObject** values; 901 struct _Dart_CObject** values;
901 } as_array; 902 } as_array;
902 struct { 903 struct {
903 int length; 904 int length;
904 uint8_t* values; 905 uint8_t* values;
905 } as_byte_array; 906 } as_byte_array;
907 struct {
908 int length;
909 uint8_t* data;
910 void* peer;
911 Dart_PeerFinalizer callback;
912 } as_external_byte_array;
906 } value; 913 } value;
907 } Dart_CObject; 914 } Dart_CObject;
908 915
909 /** 916 /**
910 * Posts a message on some port. The message will contain the 917 * Posts a message on some port. The message will contain the
911 * Dart_CObject object graph rooted in 'message'. 918 * Dart_CObject object graph rooted in 'message'.
912 * 919 *
913 * While the message is being sent the state of the graph of 920 * While the message is being sent the state of the graph of
914 * Dart_CObject structures rooted in 'message' should not be accessed, 921 * Dart_CObject structures rooted in 'message' should not be accessed,
915 * as the message generation will make temporary modifications to the 922 * as the message generation will make temporary modifications to the
(...skipping 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after
2371 // information that can be used for better profile reports for 2378 // information that can be used for better profile reports for
2372 // dynamically generated code. 2379 // dynamically generated code.
2373 DART_EXPORT void Dart_InitPprofSupport(); 2380 DART_EXPORT void Dart_InitPprofSupport();
2374 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); 2381 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size);
2375 2382
2376 // Support for generating flow graph compiler debugging output into a file. 2383 // Support for generating flow graph compiler debugging output into a file.
2377 typedef void (*FileWriterFunction)(const char* buffer, int64_t num_bytes); 2384 typedef void (*FileWriterFunction)(const char* buffer, int64_t num_bytes);
2378 DART_EXPORT void Dart_InitFlowGraphPrinting(FileWriterFunction function); 2385 DART_EXPORT void Dart_InitFlowGraphPrinting(FileWriterFunction function);
2379 2386
2380 #endif // INCLUDE_DART_API_H_ 2387 #endif // INCLUDE_DART_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698