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

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

Issue 1267603003: Support sending and receiving Capability objects from C code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | runtime/vm/dart_api_message.cc » ('j') | runtime/vm/snapshot_test.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 2 * Copyright (c) 2013, 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_NATIVE_API_H_ 7 #ifndef INCLUDE_DART_NATIVE_API_H_
8 #define INCLUDE_DART_NATIVE_API_H_ 8 #define INCLUDE_DART_NATIVE_API_H_
9 9
10 #include "include/dart_api.h" 10 #include "include/dart_api.h"
(...skipping 22 matching lines...) Expand all
33 Dart_CObject_kBool, 33 Dart_CObject_kBool,
34 Dart_CObject_kInt32, 34 Dart_CObject_kInt32,
35 Dart_CObject_kInt64, 35 Dart_CObject_kInt64,
36 Dart_CObject_kBigint, 36 Dart_CObject_kBigint,
37 Dart_CObject_kDouble, 37 Dart_CObject_kDouble,
38 Dart_CObject_kString, 38 Dart_CObject_kString,
39 Dart_CObject_kArray, 39 Dart_CObject_kArray,
40 Dart_CObject_kTypedData, 40 Dart_CObject_kTypedData,
41 Dart_CObject_kExternalTypedData, 41 Dart_CObject_kExternalTypedData,
42 Dart_CObject_kSendPort, 42 Dart_CObject_kSendPort,
43 Dart_CObject_kCapability,
43 Dart_CObject_kUnsupported, 44 Dart_CObject_kUnsupported,
44 Dart_CObject_kNumberOfTypes 45 Dart_CObject_kNumberOfTypes
45 } Dart_CObject_Type; 46 } Dart_CObject_Type;
46 47
47 typedef struct _Dart_CObject { 48 typedef struct _Dart_CObject {
48 Dart_CObject_Type type; 49 Dart_CObject_Type type;
49 union { 50 union {
50 bool as_bool; 51 bool as_bool;
51 int32_t as_int32; 52 int32_t as_int32;
52 int64_t as_int64; 53 int64_t as_int64;
53 double as_double; 54 double as_double;
54 char* as_string; 55 char* as_string;
55 struct { 56 struct {
56 bool neg; 57 bool neg;
57 intptr_t used; 58 intptr_t used;
58 struct _Dart_CObject* digits; 59 struct _Dart_CObject* digits;
59 } as_bigint; 60 } as_bigint;
60 struct { 61 struct {
61 Dart_Port id; 62 Dart_Port id;
62 Dart_Port origin_id; 63 Dart_Port origin_id;
63 } as_send_port; 64 } as_send_port;
64 struct { 65 struct {
66 int64_t id;
67 } as_capability;
68 struct {
65 intptr_t length; 69 intptr_t length;
66 struct _Dart_CObject** values; 70 struct _Dart_CObject** values;
67 } as_array; 71 } as_array;
68 struct { 72 struct {
69 Dart_TypedData_Type type; 73 Dart_TypedData_Type type;
70 intptr_t length; 74 intptr_t length;
71 uint8_t* values; 75 uint8_t* values;
72 } as_typed_data; 76 } as_typed_data;
73 struct { 77 struct {
74 Dart_TypedData_Type type; 78 Dart_TypedData_Type type;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 154
151 /** 155 /**
152 * Forces all loaded classes and functions to be compiled eagerly in 156 * Forces all loaded classes and functions to be compiled eagerly in
153 * the current isolate.. 157 * the current isolate..
154 * 158 *
155 * TODO(turnidge): Document. 159 * TODO(turnidge): Document.
156 */ 160 */
157 DART_EXPORT Dart_Handle Dart_CompileAll(); 161 DART_EXPORT Dart_Handle Dart_CompileAll();
158 162
159 #endif /* INCLUDE_DART_NATIVE_API_H_ */ /* NOLINT */ 163 #endif /* INCLUDE_DART_NATIVE_API_H_ */ /* NOLINT */
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_message.cc » ('j') | runtime/vm/snapshot_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698