blob: 31587d8d6224defe57b387d18c6212c3ed132baf [file] [log] [blame]
Igor Murashkin311fdf52016-07-22 15:59:16 -07001/*
2 * Copyright (C) 2016 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// Includes every single offset file in art.
18// Useful for processing every single offset together.
19
20// Usage:
21// #define DEFINE_INCLUDE_DEPENDENCIES
22// #include "offsets_all.def"
23// to automatically include each def file's header dependencies.
24//
25// Afterwards,
26// #define DEFINE_EXPR(define_name, field_type, expr) ...
27// #include "offsets_all.def"
28// to process each offset however one wants.
29#if defined(DEFINE_INCLUDE_DEPENDENCIES)
30#define DEFINE_EXPR(define_name, field_type, expr)
31#endif
32
33#if !defined(DEFINE_EXPR)
34#error "Either DEFINE_INCLUDE_DEPENDENCIES or DEFINE_EXPR must be defined"
35#endif
36
37#include "constant_reference.def"
38#include "offset_runtime.def"
39// TODO: rest of THREAD_ offsets (depends on __SIZEOF__POINTER__).
40#include "offset_thread.def"
41// TODO: SHADOW_FRAME depends on __SIZEOF__POINTER__
42// #include "offset_shadow_frame.def"
Igor Murashkin311fdf52016-07-22 15:59:16 -070043// TODO: MIRROR_OBJECT_HEADER_SIZE (depends on #ifdef read barrier)
Vladimir Marko5122e6b2017-08-17 16:10:09 +010044#include "offset_mirror_class.def"
45#include "offset_mirror_dex_cache.def"
Igor Murashkin311fdf52016-07-22 15:59:16 -070046#include "offset_mirror_object.def"
47#include "constant_class.def"
48// TODO: MIRROR_*_ARRAY offsets (depends on header size)
49// TODO: MIRROR_STRING offsets (depends on header size)
Vladimir Marko5122e6b2017-08-17 16:10:09 +010050#include "offset_art_method.def"
Christina Wadsworth97a8a9a2016-08-19 11:23:48 -070051#include "constant_dexcache.def"
Mathieu Chartierafdcbcb2017-04-26 16:43:35 -070052#include "constant_card_table.def"
Mathieu Chartier8261d022016-08-08 09:41:04 -070053#include "constant_heap.def"
Igor Murashkin311fdf52016-07-22 15:59:16 -070054#include "constant_lockword.def"
55#include "constant_globals.def"
56#include "constant_rosalloc.def"
57#include "constant_thread.def"
58#include "constant_jit.def"
59
60// TODO: MIRROR_OBJECT_HEADER_SIZE #ifdef depends on read barriers
61// TODO: Array offsets (depends on MIRROR_OBJECT_HEADER_SIZE)
62
63#if defined(DEFINE_INCLUDE_DEPENDENCIES)
64#undef DEFINE_EXPR
65#undef DEFINE_INCLUDE_DEPENDENCIES
66#endif
67
68