OLD | NEW |
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 VM_DART_API_MESSAGE_H_ | 5 #ifndef VM_DART_API_MESSAGE_H_ |
6 #define VM_DART_API_MESSAGE_H_ | 6 #define VM_DART_API_MESSAGE_H_ |
7 | 7 |
8 #include "include/dart_native_api.h" | 8 #include "include/dart_native_api.h" |
9 #include "vm/dart_api_state.h" | 9 #include "vm/dart_api_state.h" |
10 #include "vm/snapshot.h" | 10 #include "vm/snapshot.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 Dart_CObject* ReadVMSymbol(intptr_t object_id); | 113 Dart_CObject* ReadVMSymbol(intptr_t object_id); |
114 Dart_CObject* ReadObjectRef(); | 114 Dart_CObject* ReadObjectRef(); |
115 Dart_CObject* ReadObject(); | 115 Dart_CObject* ReadObject(); |
116 | 116 |
117 // Add object to backward references. | 117 // Add object to backward references. |
118 void AddBackRef(intptr_t id, Dart_CObject* obj, DeserializeState state); | 118 void AddBackRef(intptr_t id, Dart_CObject* obj, DeserializeState state); |
119 | 119 |
120 // Get an object from the backward references list. | 120 // Get an object from the backward references list. |
121 Dart_CObject* GetBackRef(intptr_t id); | 121 Dart_CObject* GetBackRef(intptr_t id); |
122 | 122 |
| 123 intptr_t NextAvailableObjectId() const; |
| 124 |
123 Dart_CObject_Internal* AsInternal(Dart_CObject* object) { | 125 Dart_CObject_Internal* AsInternal(Dart_CObject* object) { |
124 ASSERT(object->type >= Dart_CObject_kNumberOfTypes); | 126 ASSERT(object->type >= Dart_CObject_kNumberOfTypes); |
125 return reinterpret_cast<Dart_CObject_Internal*>(object); | 127 return reinterpret_cast<Dart_CObject_Internal*>(object); |
126 } | 128 } |
127 | 129 |
128 // Allocation of the structures for the decoded message happens | 130 // Allocation of the structures for the decoded message happens |
129 // either in the supplied zone or using the supplied allocation | 131 // either in the supplied zone or using the supplied allocation |
130 // function. | 132 // function. |
131 ReAlloc alloc_; | 133 ReAlloc alloc_; |
132 ApiGrowableArray<BackRefNode*> backward_references_; | 134 ApiGrowableArray<BackRefNode*> backward_references_; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 Dart_CObject** forward_list_; | 186 Dart_CObject** forward_list_; |
185 intptr_t forward_list_length_; | 187 intptr_t forward_list_length_; |
186 intptr_t forward_id_; | 188 intptr_t forward_id_; |
187 | 189 |
188 DISALLOW_COPY_AND_ASSIGN(ApiMessageWriter); | 190 DISALLOW_COPY_AND_ASSIGN(ApiMessageWriter); |
189 }; | 191 }; |
190 | 192 |
191 } // namespace dart | 193 } // namespace dart |
192 | 194 |
193 #endif // VM_DART_API_MESSAGE_H_ | 195 #endif // VM_DART_API_MESSAGE_H_ |
OLD | NEW |