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 // Marker for special encoding of double objects in message snapshots. | 20 // Marker for special encoding of double objects in message snapshots. |
21 kDoubleObject, | 21 kDoubleObject, |
22 // Object id has been optimized away; reader should use next available id. | 22 // Object id has been optimized away; reader should use next available id. |
23 kOmittedObjectId, | 23 kOmittedObjectId, |
24 | 24 |
25 kClassIdsOffset = kDoubleObject, | 25 kClassIdsOffset = kOmittedObjectId, |
26 | 26 |
27 // The class ids of predefined classes are included in this list | 27 // The class ids of predefined classes are included in this list |
28 // at an offset of kClassIdsOffset. | 28 // at an offset of kClassIdsOffset. |
29 | 29 |
30 kObjectType = (kNumPredefinedCids + kClassIdsOffset), | 30 kObjectType = (kNumPredefinedCids + kClassIdsOffset), |
31 kNullType, | 31 kNullType, |
32 kDynamicType, | 32 kDynamicType, |
33 kVoidType, | 33 kVoidType, |
34 kFunctionType, | 34 kFunctionType, |
35 kNumberType, | 35 kNumberType, |
36 kSmiType, | 36 kSmiType, |
37 kMintType, | 37 kMintType, |
38 kDoubleType, | 38 kDoubleType, |
39 kIntType, | 39 kIntType, |
40 kBoolType, | 40 kBoolType, |
41 kStringType, | 41 kStringType, |
42 kArrayType, | 42 kArrayType, |
43 | 43 |
44 kInstanceObjectId, | 44 kInstanceObjectId, |
| 45 kStaticImplicitClosureObjectId, |
45 kMaxPredefinedObjectIds, | 46 kMaxPredefinedObjectIds, |
46 kInvalidIndex = -1, | 47 kInvalidIndex = -1, |
47 }; | 48 }; |
48 | 49 |
49 } // namespace dart | 50 } // namespace dart |
50 | 51 |
51 #endif // VM_SNAPSHOT_IDS_H_ | 52 #endif // VM_SNAPSHOT_IDS_H_ |
OLD | NEW |