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 19 matching lines...) Expand all Loading... |
30 ApiMessageReader(const uint8_t* buffer, intptr_t length, ReAlloc alloc); | 30 ApiMessageReader(const uint8_t* buffer, intptr_t length, ReAlloc alloc); |
31 ~ApiMessageReader() { } | 31 ~ApiMessageReader() { } |
32 | 32 |
33 Dart_CObject* ReadMessage(); | 33 Dart_CObject* ReadMessage(); |
34 | 34 |
35 private: | 35 private: |
36 // Allocates a Dart_CObject object. | 36 // Allocates a Dart_CObject object. |
37 Dart_CObject* AllocateDartCObject(); | 37 Dart_CObject* AllocateDartCObject(); |
38 // Allocates a Dart_CObject object with the specified type. | 38 // Allocates a Dart_CObject object with the specified type. |
39 Dart_CObject* AllocateDartCObject(Dart_CObject::Type type); | 39 Dart_CObject* AllocateDartCObject(Dart_CObject::Type type); |
| 40 // Allocates a Dart_CObject object representing an unsupported |
| 41 // object in the API message. |
| 42 Dart_CObject* AllocateDartCObjectUnsupported(); |
40 // Allocates a Dart_CObject object for the null object. | 43 // Allocates a Dart_CObject object for the null object. |
41 Dart_CObject* AllocateDartCObjectNull(); | 44 Dart_CObject* AllocateDartCObjectNull(); |
42 // Allocates a Dart_CObject object for a boolean object. | 45 // Allocates a Dart_CObject object for a boolean object. |
43 Dart_CObject* AllocateDartCObjectBool(bool value); | 46 Dart_CObject* AllocateDartCObjectBool(bool value); |
44 // Allocates a Dart_CObject object for for a 32-bit integer. | 47 // Allocates a Dart_CObject object for for a 32-bit integer. |
45 Dart_CObject* AllocateDartCObjectInt32(int32_t value); | 48 Dart_CObject* AllocateDartCObjectInt32(int32_t value); |
46 // Allocates a Dart_CObject object for for a 64-bit integer. | 49 // Allocates a Dart_CObject object for for a 64-bit integer. |
47 Dart_CObject* AllocateDartCObjectInt64(int64_t value); | 50 Dart_CObject* AllocateDartCObjectInt64(int64_t value); |
48 // Allocates a Dart_CObject object for bigint data. | 51 // Allocates a Dart_CObject object for bigint data. |
49 Dart_CObject* AllocateDartCObjectBigint(intptr_t length); | 52 Dart_CObject* AllocateDartCObjectBigint(intptr_t length); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 void WriteCObject(Dart_CObject* object); | 123 void WriteCObject(Dart_CObject* object); |
121 | 124 |
122 intptr_t object_id_; | 125 intptr_t object_id_; |
123 | 126 |
124 DISALLOW_COPY_AND_ASSIGN(ApiMessageWriter); | 127 DISALLOW_COPY_AND_ASSIGN(ApiMessageWriter); |
125 }; | 128 }; |
126 | 129 |
127 } // namespace dart | 130 } // namespace dart |
128 | 131 |
129 #endif // VM_DART_API_MESSAGE_H_ | 132 #endif // VM_DART_API_MESSAGE_H_ |
OLD | NEW |