diff options
author | 2017-08-17 16:10:09 +0100 | |
---|---|---|
committer | 2017-08-29 11:29:31 +0100 | |
commit | 5122e6ba34d46851cd89f2ad55bf6bb067e038d6 (patch) | |
tree | e96ba37b6451be7a06d930b0274251cac35ce05e /tools/cpp-define-generator | |
parent | 02cb397857c979dffae95e2db2678a72ec407cf0 (diff) |
ART: Remove ArtMethod::dex_cache_resolved_methods_.
Test: m test-art-host-gtest
Test: testrunner.py --host
Test: testrunner.py --target on Nexus 6P
Test: Repeat the above tests with ART_HEAP_POISONING=true
Test: Build aosp_mips64-eng
Change-Id: I9cd0b8aa5001542b0863cccfca4f9c1cd4d25396
Diffstat (limited to 'tools/cpp-define-generator')
-rw-r--r-- | tools/cpp-define-generator/constant_globals.def | 4 | ||||
-rw-r--r-- | tools/cpp-define-generator/offset_art_method.def (renamed from tools/cpp-define-generator/offset_dexcache.def) | 2 | ||||
-rw-r--r-- | tools/cpp-define-generator/offset_mirror_class.def | 32 | ||||
-rw-r--r-- | tools/cpp-define-generator/offset_mirror_dex_cache.def | 32 | ||||
-rw-r--r-- | tools/cpp-define-generator/offsets_all.def | 5 |
5 files changed, 72 insertions, 3 deletions
diff --git a/tools/cpp-define-generator/constant_globals.def b/tools/cpp-define-generator/constant_globals.def index dbaf33cdef..5018f52937 100644 --- a/tools/cpp-define-generator/constant_globals.def +++ b/tools/cpp-define-generator/constant_globals.def @@ -19,6 +19,7 @@ #if defined(DEFINE_INCLUDE_DEPENDENCIES) #include <atomic> // std::memory_order_relaxed #include "globals.h" // art::kObjectAlignment +#include "modifiers.h" #endif DEFINE_EXPR(STD_MEMORY_ORDER_RELAXED, int32_t, std::memory_order_relaxed) @@ -30,5 +31,8 @@ DEFINE_OBJECT_EXPR(ALIGNMENT_MASK, size_t, art::kObjectAlignment - 1) DEFINE_OBJECT_EXPR(ALIGNMENT_MASK_TOGGLED, uint32_t, ~static_cast<uint32_t>(art::kObjectAlignment - 1)) DEFINE_OBJECT_EXPR(ALIGNMENT_MASK_TOGGLED64, uint64_t, ~static_cast<uint64_t>(art::kObjectAlignment - 1)) +DEFINE_EXPR(ACC_OBSOLETE_METHOD, int32_t, art::kAccObsoleteMethod) +DEFINE_EXPR(ACC_OBSOLETE_METHOD_SHIFT, int32_t, art::WhichPowerOf2(art::kAccObsoleteMethod)) + #undef DEFINE_OBJECT_EXPR diff --git a/tools/cpp-define-generator/offset_dexcache.def b/tools/cpp-define-generator/offset_art_method.def index 43f94344cc..e6a0907759 100644 --- a/tools/cpp-define-generator/offset_dexcache.def +++ b/tools/cpp-define-generator/offset_art_method.def @@ -33,10 +33,10 @@ DEFINE_EXPR(DECLARING_CLASS_ ## field_name ## _OFFSET, int32_t, art::mirror::Class::method_name##Offset().Int32Value()) // New macro suffix Method Name (of the Offset method) -DEFINE_ART_METHOD_OFFSET_SIZED(DEX_CACHE_METHODS, DexCacheResolvedMethods) DEFINE_ART_METHOD_OFFSET_SIZED(JNI, EntryPointFromJni) DEFINE_ART_METHOD_OFFSET_SIZED(QUICK_CODE, EntryPointFromQuickCompiledCode) DEFINE_ART_METHOD_OFFSET(DECLARING_CLASS, DeclaringClass) +DEFINE_ART_METHOD_OFFSET(ACCESS_FLAGS, AccessFlags) #undef DEFINE_ART_METHOD_OFFSET #undef DEFINE_ART_METHOD_OFFSET_32 diff --git a/tools/cpp-define-generator/offset_mirror_class.def b/tools/cpp-define-generator/offset_mirror_class.def new file mode 100644 index 0000000000..9b7bfce0c0 --- /dev/null +++ b/tools/cpp-define-generator/offset_mirror_class.def @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2017 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Offsets within java.lang.Class (mirror::Class). + +#if defined(DEFINE_INCLUDE_DEPENDENCIES) +#include "mirror/class.h" // art::mirror::Object +#endif + +#include "common.def" // DEFINE_OFFSET_EXPR + +#define DEFINE_MIRROR_CLASS_OFFSET(field_name, method_name) \ + DEFINE_OFFSET_EXPR(MIRROR_CLASS, field_name, int32_t, art::mirror::Class::method_name##Offset().Int32Value()) + +// New macro suffix Method Name (of the Offset method) +DEFINE_MIRROR_CLASS_OFFSET(DEX_CACHE, DexCache) + +#undef DEFINE_MIRROR_CLASS_OFFSET +#include "common_undef.def" // undef DEFINE_OFFSET_EXPR diff --git a/tools/cpp-define-generator/offset_mirror_dex_cache.def b/tools/cpp-define-generator/offset_mirror_dex_cache.def new file mode 100644 index 0000000000..8f008bb631 --- /dev/null +++ b/tools/cpp-define-generator/offset_mirror_dex_cache.def @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2017 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Offsets within java.lang.DexCache (mirror::DexCache). + +#if defined(DEFINE_INCLUDE_DEPENDENCIES) +#include "mirror/class.h" // art::mirror::Object +#endif + +#include "common.def" // DEFINE_OFFSET_EXPR + +#define DEFINE_MIRROR_DEX_CACHE_OFFSET(field_name, method_name) \ + DEFINE_OFFSET_EXPR(MIRROR_DEX_CACHE, field_name, int32_t, art::mirror::DexCache::method_name##Offset().Int32Value()) + +// New macro suffix Method Name (of the Offset method) +DEFINE_MIRROR_DEX_CACHE_OFFSET(RESOLVED_METHODS, ResolvedMethods) + +#undef DEFINE_MIRROR_CLASS_OFFSET +#include "common_undef.def" // undef DEFINE_OFFSET_EXPR diff --git a/tools/cpp-define-generator/offsets_all.def b/tools/cpp-define-generator/offsets_all.def index b8947de2dc..c2e8c9728c 100644 --- a/tools/cpp-define-generator/offsets_all.def +++ b/tools/cpp-define-generator/offsets_all.def @@ -42,12 +42,13 @@ // #include "offset_shadow_frame.def" #include "offset_codeitem.def" // TODO: MIRROR_OBJECT_HEADER_SIZE (depends on #ifdef read barrier) -// TODO: MIRROR_CLASS offsets (see above) +#include "offset_mirror_class.def" +#include "offset_mirror_dex_cache.def" #include "offset_mirror_object.def" #include "constant_class.def" // TODO: MIRROR_*_ARRAY offsets (depends on header size) // TODO: MIRROR_STRING offsets (depends on header size) -#include "offset_dexcache.def" +#include "offset_art_method.def" #include "constant_dexcache.def" #include "constant_card_table.def" #include "constant_heap.def" |