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_SNAPSHOT_IDS_H_ | 5 #ifndef VM_SNAPSHOT_IDS_H_ |
6 #define VM_SNAPSHOT_IDS_H_ | 6 #define VM_SNAPSHOT_IDS_H_ |
7 | 7 |
8 #include "vm/raw_object.h" | 8 #include "vm/raw_object.h" |
9 | 9 |
10 namespace dart { | 10 namespace dart { |
11 | 11 |
12 // Index for predefined singleton objects used in a snapshot. | 12 // Index for predefined singleton objects used in a snapshot. |
13 enum { | 13 enum { |
14 kNullObject = 0, | 14 kNullObject = 0, |
15 kSentinelObject, | 15 kSentinelObject, |
16 kEmptyArrayObject, | 16 kEmptyArrayObject, |
17 kZeroArrayObject, | 17 kZeroArrayObject, |
18 kTrueValue, | 18 kTrueValue, |
19 kFalseValue, | 19 kFalseValue, |
20 kClassIdsOffset = kFalseValue, | 20 // Marker for special encoding of double objects in message snapshots. |
| 21 kDoubleObject, |
| 22 |
| 23 kClassIdsOffset = kDoubleObject, |
21 | 24 |
22 // The class ids of predefined classes are included in this list | 25 // The class ids of predefined classes are included in this list |
23 // at an offset of kClassIdsOffset. | 26 // at an offset of kClassIdsOffset. |
24 | 27 |
25 kObjectType = (kNumPredefinedCids + kClassIdsOffset), | 28 kObjectType = (kNumPredefinedCids + kClassIdsOffset), |
26 kNullType, | 29 kNullType, |
27 kDynamicType, | 30 kDynamicType, |
28 kVoidType, | 31 kVoidType, |
29 kFunctionType, | 32 kFunctionType, |
30 kNumberType, | 33 kNumberType, |
31 kSmiType, | 34 kSmiType, |
32 kMintType, | 35 kMintType, |
33 kDoubleType, | 36 kDoubleType, |
34 kIntType, | 37 kIntType, |
35 kBoolType, | 38 kBoolType, |
36 kStringType, | 39 kStringType, |
37 kArrayType, | 40 kArrayType, |
38 | 41 |
39 kInstanceObjectId, | 42 kInstanceObjectId, |
40 kMaxPredefinedObjectIds, | 43 kMaxPredefinedObjectIds, |
41 kInvalidIndex = -1, | 44 kInvalidIndex = -1, |
42 }; | 45 }; |
43 | 46 |
44 } // namespace dart | 47 } // namespace dart |
45 | 48 |
46 #endif // VM_SNAPSHOT_IDS_H_ | 49 #endif // VM_SNAPSHOT_IDS_H_ |
OLD | NEW |