OLD | NEW |
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 VM_DART_API_IMPL_H_ | 5 #ifndef VM_DART_API_IMPL_H_ |
6 #define VM_DART_API_IMPL_H_ | 6 #define VM_DART_API_IMPL_H_ |
7 | 7 |
8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
9 #include "vm/object.h" | 9 #include "vm/object.h" |
10 | 10 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 Dart_Handle object); | 94 Dart_Handle object); |
95 | 95 |
96 // Validates and converts the passed in handle as a weak persistent handle. | 96 // Validates and converts the passed in handle as a weak persistent handle. |
97 static WeakPersistentHandle* UnwrapAsWeakPersistentHandle( | 97 static WeakPersistentHandle* UnwrapAsWeakPersistentHandle( |
98 const ApiState& state, | 98 const ApiState& state, |
99 Dart_Handle object); | 99 Dart_Handle object); |
100 | 100 |
101 // Casts the internal Isolate* type to the external Dart_Isolate type. | 101 // Casts the internal Isolate* type to the external Dart_Isolate type. |
102 static Dart_Isolate CastIsolate(Isolate* isolate); | 102 static Dart_Isolate CastIsolate(Isolate* isolate); |
103 | 103 |
104 // Casts a message byte array to the external Dart_Message type. | |
105 static Dart_Message CastMessage(uint8_t* message); | |
106 | |
107 // Gets the handle used to designate successful return. | 104 // Gets the handle used to designate successful return. |
108 static Dart_Handle Success(); | 105 static Dart_Handle Success(); |
109 | 106 |
110 // Generates a handle used to designate an error return. | 107 // Generates a handle used to designate an error return. |
111 static Dart_Handle NewError(const char* format, ...); | 108 static Dart_Handle NewError(const char* format, ...); |
112 | 109 |
113 // Gets a handle to Null. | 110 // Gets a handle to Null. |
114 static Dart_Handle Null(); | 111 static Dart_Handle Null(); |
115 | 112 |
116 // Gets a handle to True. | 113 // Gets a handle to True. |
117 static Dart_Handle True(); | 114 static Dart_Handle True(); |
118 | 115 |
119 // Gets a handle to False | 116 // Gets a handle to False |
120 static Dart_Handle False(); | 117 static Dart_Handle False(); |
121 | 118 |
122 // Allocates space in the local zone. | 119 // Allocates space in the local zone. |
123 static uword Allocate(intptr_t size); | 120 static uword Allocate(intptr_t size); |
124 | 121 |
125 // Reallocates space in the local zone. | 122 // Reallocates space in the local zone. |
126 static uword Reallocate(uword ptr, intptr_t old_size, intptr_t new_size); | 123 static uword Reallocate(uword ptr, intptr_t old_size, intptr_t new_size); |
127 }; | 124 }; |
128 | 125 |
129 } // namespace dart. | 126 } // namespace dart. |
130 | 127 |
131 #endif // VM_DART_API_IMPL_H_ | 128 #endif // VM_DART_API_IMPL_H_ |
OLD | NEW |