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 "vm/dart_api_state.h" | 8 #include "vm/dart_api_state.h" |
9 #include "vm/snapshot.h" | 9 #include "vm/snapshot.h" |
10 | 10 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 // Allocates a backwards reference node. | 77 // Allocates a backwards reference node. |
78 BackRefNode* AllocateBackRefNode(Dart_CObject* ref, DeserializeState state); | 78 BackRefNode* AllocateBackRefNode(Dart_CObject* ref, DeserializeState state); |
79 | 79 |
80 void Init(); | 80 void Init(); |
81 | 81 |
82 intptr_t LookupInternalClass(intptr_t class_header); | 82 intptr_t LookupInternalClass(intptr_t class_header); |
83 Dart_CObject* ReadInternalVMObject(intptr_t class_id, intptr_t object_id); | 83 Dart_CObject* ReadInternalVMObject(intptr_t class_id, intptr_t object_id); |
84 Dart_CObject* ReadInlinedObject(intptr_t object_id); | 84 Dart_CObject* ReadInlinedObject(intptr_t object_id); |
85 Dart_CObject* ReadObjectImpl(); | 85 Dart_CObject* ReadObjectImpl(); |
86 Dart_CObject* ReadIndexedObject(intptr_t object_id); | 86 Dart_CObject* ReadIndexedObject(intptr_t object_id); |
| 87 Dart_CObject* ReadVMSymbol(intptr_t object_id); |
87 Dart_CObject* ReadObjectRef(); | 88 Dart_CObject* ReadObjectRef(); |
88 Dart_CObject* ReadObject(); | 89 Dart_CObject* ReadObject(); |
89 | 90 |
90 // Add object to backward references. | 91 // Add object to backward references. |
91 void AddBackRef(intptr_t id, Dart_CObject* obj, DeserializeState state); | 92 void AddBackRef(intptr_t id, Dart_CObject* obj, DeserializeState state); |
92 | 93 |
93 // Get an object from the backward references list. | 94 // Get an object from the backward references list. |
94 Dart_CObject* GetBackRef(intptr_t id); | 95 Dart_CObject* GetBackRef(intptr_t id); |
95 | 96 |
96 Dart_CObject_Internal* AsInternal(Dart_CObject* object) { | 97 Dart_CObject_Internal* AsInternal(Dart_CObject* object) { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 static const intptr_t kDartCObjectMarkOffset = 1; | 137 static const intptr_t kDartCObjectMarkOffset = 1; |
137 | 138 |
138 void MarkCObject(Dart_CObject* object, intptr_t object_id); | 139 void MarkCObject(Dart_CObject* object, intptr_t object_id); |
139 void UnmarkCObject(Dart_CObject* object); | 140 void UnmarkCObject(Dart_CObject* object); |
140 bool IsCObjectMarked(Dart_CObject* object); | 141 bool IsCObjectMarked(Dart_CObject* object); |
141 intptr_t GetMarkedCObjectMark(Dart_CObject* object); | 142 intptr_t GetMarkedCObjectMark(Dart_CObject* object); |
142 void UnmarkAllCObjects(Dart_CObject* object); | 143 void UnmarkAllCObjects(Dart_CObject* object); |
143 void AddToForwardList(Dart_CObject* object); | 144 void AddToForwardList(Dart_CObject* object); |
144 | 145 |
145 void WriteSmi(int64_t value); | 146 void WriteSmi(int64_t value); |
| 147 void WriteNullObject(); |
146 void WriteMint(Dart_CObject* object, int64_t value); | 148 void WriteMint(Dart_CObject* object, int64_t value); |
147 void WriteInt32(Dart_CObject* object); | 149 void WriteInt32(Dart_CObject* object); |
148 void WriteInt64(Dart_CObject* object); | 150 void WriteInt64(Dart_CObject* object); |
149 void WriteInlinedHeader(Dart_CObject* object); | 151 void WriteInlinedHeader(Dart_CObject* object); |
150 void WriteCObject(Dart_CObject* object); | 152 void WriteCObject(Dart_CObject* object); |
151 void WriteCObjectRef(Dart_CObject* object); | 153 void WriteCObjectRef(Dart_CObject* object); |
152 void WriteForwardedCObject(Dart_CObject* object); | 154 void WriteForwardedCObject(Dart_CObject* object); |
153 void WriteCObjectInlined(Dart_CObject* object, Dart_CObject::Type type); | 155 void WriteCObjectInlined(Dart_CObject* object, Dart_CObject::Type type); |
154 | 156 |
155 intptr_t object_id_; | 157 intptr_t object_id_; |
156 Dart_CObject** forward_list_; | 158 Dart_CObject** forward_list_; |
157 intptr_t forward_list_length_; | 159 intptr_t forward_list_length_; |
158 intptr_t forward_id_; | 160 intptr_t forward_id_; |
159 | 161 |
160 DISALLOW_COPY_AND_ASSIGN(ApiMessageWriter); | 162 DISALLOW_COPY_AND_ASSIGN(ApiMessageWriter); |
161 }; | 163 }; |
162 | 164 |
163 } // namespace dart | 165 } // namespace dart |
164 | 166 |
165 #endif // VM_DART_API_MESSAGE_H_ | 167 #endif // VM_DART_API_MESSAGE_H_ |
OLD | NEW |