blob: 6c15639177a1717bec3e3d1ba139707dbc2e56b7 [file] [log] [blame]
Mathieu Chartier52a7f5c2015-08-18 18:35:52 -07001/*
2 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ART_RUNTIME_MIRROR_CLASS_FLAGS_H_
18#define ART_RUNTIME_MIRROR_CLASS_FLAGS_H_
19
20#include <stdint.h>
21
22namespace art {
23namespace mirror {
24
25// Object types stored in class to help GC with faster object marking.
26static constexpr uint32_t kClassFlagNormal = 0x00000000;
27// Only normal objects which have no reference fields, e.g. string or primitive array or normal
28// class instance.
29static constexpr uint32_t kClassFlagNoReferenceFields = 0x00000001;
30static constexpr uint32_t kClassFlagString = 0x00000004;
31static constexpr uint32_t kClassFlagObjectArray = 0x00000008;
32static constexpr uint32_t kClassFlagClass = 0x00000010;
33
34// class is ClassLoader or one of its subclasses
35static constexpr uint32_t kClassFlagClassLoader = 0x00000020;
36
37// class is a soft/weak/phantom ref
38static constexpr uint32_t kClassFlagSoftReference = 0x00000040;
39// class is a weak reference
40static constexpr uint32_t kClassFlagWeakReference = 0x00000080;
41// class is a finalizer reference
42static constexpr uint32_t kClassFlagFinalizerReference = 0x00000100;
43// class is a phantom reference
44static constexpr uint32_t kClassFlagPhantomReference = 0x00000200;
45
46static constexpr uint32_t kClassFlagReference =
47 kClassFlagSoftReference |
48 kClassFlagWeakReference |
49 kClassFlagFinalizerReference |
50 kClassFlagPhantomReference;
51
52} // namespace mirror
53} // namespace art
54
55#endif // ART_RUNTIME_MIRROR_CLASS_FLAGS_H_
56