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

Side by Side Diff: runtime/vm/dart_api_message.h

Issue 9363023: Add support for big integers to the native message format (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 10 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 | Annotate | Revision Log
OLDNEW
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 11 matching lines...) Expand all
22 // Allocates a Dart_CObject object. 22 // Allocates a Dart_CObject object.
23 Dart_CObject* AllocateDartCObject(); 23 Dart_CObject* AllocateDartCObject();
24 // Allocates a Dart_CObject object with the specified type. 24 // Allocates a Dart_CObject object with the specified type.
25 Dart_CObject* AllocateDartCObject(Dart_CObject::Type type); 25 Dart_CObject* AllocateDartCObject(Dart_CObject::Type type);
26 // Allocates a Dart_CObject object for the null object. 26 // Allocates a Dart_CObject object for the null object.
27 Dart_CObject* AllocateDartCObjectNull(); 27 Dart_CObject* AllocateDartCObjectNull();
28 // Allocates a Dart_CObject object for a boolean object. 28 // Allocates a Dart_CObject object for a boolean object.
29 Dart_CObject* AllocateDartCObjectBool(bool value); 29 Dart_CObject* AllocateDartCObjectBool(bool value);
30 // Allocates a Dart_CObject object for for a 32-bit integer. 30 // Allocates a Dart_CObject object for for a 32-bit integer.
31 Dart_CObject* AllocateDartCObjectInt32(int32_t value); 31 Dart_CObject* AllocateDartCObjectInt32(int32_t value);
32 // Allocates a Dart_CObject object for bigint data.
33 Dart_CObject* AllocateDartCObjectBigint(intptr_t length);
32 // Allocates a Dart_CObject object for a double. 34 // Allocates a Dart_CObject object for a double.
33 Dart_CObject* AllocateDartCObjectDouble(double value); 35 Dart_CObject* AllocateDartCObjectDouble(double value);
34 // Allocates a Dart_CObject object for string data. 36 // Allocates a Dart_CObject object for string data.
35 Dart_CObject* AllocateDartCObjectString(intptr_t length); 37 Dart_CObject* AllocateDartCObjectString(intptr_t length);
36 // Allocates a C array of Dart_CObject objects. 38 // Allocates a C array of Dart_CObject objects.
37 Dart_CObject* AllocateDartCObjectArray(intptr_t length); 39 Dart_CObject* AllocateDartCObjectArray(intptr_t length);
38 40
41 // Allocate temporary data for the message processing.
42 uint8_t* AllocateTemp(intptr_t size);
43
39 void Init(); 44 void Init();
40 45
41 intptr_t LookupInternalClass(intptr_t class_header); 46 intptr_t LookupInternalClass(intptr_t class_header);
42 Dart_CObject* ReadInlinedObject(intptr_t object_id); 47 Dart_CObject* ReadInlinedObject(intptr_t object_id);
43 Dart_CObject* ReadObjectImpl(intptr_t header); 48 Dart_CObject* ReadObjectImpl(intptr_t header);
44 Dart_CObject* ReadIndexedObject(intptr_t object_id); 49 Dart_CObject* ReadIndexedObject(intptr_t object_id);
45 Dart_CObject* ReadObject(); 50 Dart_CObject* ReadObject();
46 51
47 // Add object to backward references. 52 // Add object to backward references.
48 void AddBackwardReference(intptr_t id, Dart_CObject* obj); 53 void AddBackwardReference(intptr_t id, Dart_CObject* obj);
49 54
50 Dart_CObject_Internal* AsInternal(Dart_CObject* object) { 55 Dart_CObject_Internal* AsInternal(Dart_CObject* object) {
51 ASSERT(object->type >= Dart_CObject::kNumberOfTypes); 56 ASSERT(object->type >= Dart_CObject::kNumberOfTypes);
52 return reinterpret_cast<Dart_CObject_Internal*>(object); 57 return reinterpret_cast<Dart_CObject_Internal*>(object);
53 } 58 }
54 59
55 // Allocation of the structures for the decoded message happens 60 // Allocation of the structures for the decoded message happens
56 // either in the supplied zone or using the supplied allocation 61 // either in the supplied zone or using the supplied allocation
57 // function. 62 // function.
58 ReAlloc alloc_; 63 ReAlloc alloc_;
59 ApiGrowableArray<Dart_CObject*> backward_references_; 64 ApiGrowableArray<Dart_CObject*> backward_references_;
60 65
61 Dart_CObject type_arguments_marker; 66 Dart_CObject type_arguments_marker;
62 Dart_CObject dynamic_type_marker; 67 Dart_CObject dynamic_type_marker;
63 }; 68 };
64 69
65 } // namespace dart 70 } // namespace dart
66 71
67 #endif // VM_DART_API_MESSAGE_H_ 72 #endif // VM_DART_API_MESSAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698