diff options
author | 2024-01-10 21:22:44 +0000 | |
---|---|---|
committer | 2024-01-12 14:43:15 +0000 | |
commit | 60c5f37ef5914ca668c109f75a687cd30042a477 (patch) | |
tree | 69f2f5dd840d6d949f3d7404174ce38a090167b3 | |
parent | 17160a834d37fbca76444477d07b772ab46454b6 (diff) |
Add visibility attributes in runtime/entrypoints
Bug: 260881207
Test: presubmit
Test: abtd app_compat_drm
Test: abtd app_compat_top_100
Test: abtd app_compat_banking
Change-Id: I775d70934491893d6b88b59f993e26e43483d12a
27 files changed, 29 insertions, 30 deletions
diff --git a/runtime/entrypoints/entrypoint_utils-inl.h b/runtime/entrypoints/entrypoint_utils-inl.h index 4a1dfba786..a854e0c5ac 100644 --- a/runtime/entrypoints/entrypoint_utils-inl.h +++ b/runtime/entrypoints/entrypoint_utils-inl.h @@ -47,7 +47,7 @@ #include "thread.h" #include "well_known_classes.h" -namespace art { +namespace art HIDDEN { inline std::string GetResolvedMethodErrorString(ClassLinker* class_linker, ArtMethod* inlined_method, diff --git a/runtime/entrypoints/entrypoint_utils.cc b/runtime/entrypoints/entrypoint_utils.cc index aa27df4dc5..96a2231930 100644 --- a/runtime/entrypoints/entrypoint_utils.cc +++ b/runtime/entrypoints/entrypoint_utils.cc @@ -43,7 +43,7 @@ #include "scoped_thread_state_change-inl.h" #include "well_known_classes-inl.h" -namespace art { +namespace art HIDDEN { void CheckReferenceResult(Handle<mirror::Object> o, Thread* self) { if (o == nullptr) { diff --git a/runtime/entrypoints/entrypoint_utils.h b/runtime/entrypoints/entrypoint_utils.h index cfa744d278..3dfeaae024 100644 --- a/runtime/entrypoints/entrypoint_utils.h +++ b/runtime/entrypoints/entrypoint_utils.h @@ -29,7 +29,7 @@ #include "handle.h" #include "jvalue.h" -namespace art { +namespace art HIDDEN { namespace mirror { class Array; diff --git a/runtime/entrypoints/jni/jni_entrypoints.cc b/runtime/entrypoints/jni/jni_entrypoints.cc index 359614bf92..885764f180 100644 --- a/runtime/entrypoints/jni/jni_entrypoints.cc +++ b/runtime/entrypoints/jni/jni_entrypoints.cc @@ -33,7 +33,7 @@ #include "stack_map.h" #include "thread.h" -namespace art { +namespace art HIDDEN { static inline uint32_t GetInvokeStaticMethodIndex(ArtMethod* caller, uint32_t dex_pc) REQUIRES_SHARED(Locks::mutator_lock_) { diff --git a/runtime/entrypoints/jni/jni_entrypoints.h b/runtime/entrypoints/jni/jni_entrypoints.h index def9ddba73..4b515db50d 100644 --- a/runtime/entrypoints/jni/jni_entrypoints.h +++ b/runtime/entrypoints/jni/jni_entrypoints.h @@ -25,7 +25,7 @@ #define JNI_ENTRYPOINT_OFFSET(ptr_size, x) \ Thread::JniEntryPointOffset<ptr_size>(OFFSETOF_MEMBER(JniEntryPoints, x)) -namespace art { +namespace art HIDDEN { // Pointers to functions that are called by JNI trampolines via thread-local storage. struct JniEntryPoints { diff --git a/runtime/entrypoints/math_entrypoints.cc b/runtime/entrypoints/math_entrypoints.cc index b0eaf1ed03..5db8dbfe9d 100644 --- a/runtime/entrypoints/math_entrypoints.cc +++ b/runtime/entrypoints/math_entrypoints.cc @@ -18,7 +18,7 @@ #include "entrypoint_utils-inl.h" -namespace art { +namespace art HIDDEN { extern "C" double art_l2d(int64_t l) { return static_cast<double>(l); diff --git a/runtime/entrypoints/math_entrypoints_test.cc b/runtime/entrypoints/math_entrypoints_test.cc index fe61f5dd11..337f9f0925 100644 --- a/runtime/entrypoints/math_entrypoints_test.cc +++ b/runtime/entrypoints/math_entrypoints_test.cc @@ -20,7 +20,7 @@ #include "base/common_art_test.h" -namespace art { +namespace art HIDDEN { class MathEntrypointsTest : public CommonArtTest {}; diff --git a/runtime/entrypoints/quick/callee_save_frame.h b/runtime/entrypoints/quick/callee_save_frame.h index 7d9b844b0c..81219234b8 100644 --- a/runtime/entrypoints/quick/callee_save_frame.h +++ b/runtime/entrypoints/quick/callee_save_frame.h @@ -32,7 +32,7 @@ #include "arch/x86/callee_save_frame_x86.h" #include "arch/x86_64/callee_save_frame_x86_64.h" -namespace art { +namespace art HIDDEN { class ArtMethod; class ScopedQuickEntrypointChecks { diff --git a/runtime/entrypoints/quick/quick_alloc_entrypoints.cc b/runtime/entrypoints/quick/quick_alloc_entrypoints.cc index 7b3d84915a..82595ed636 100644 --- a/runtime/entrypoints/quick/quick_alloc_entrypoints.cc +++ b/runtime/entrypoints/quick/quick_alloc_entrypoints.cc @@ -27,7 +27,7 @@ #include "mirror/object_array-inl.h" #include "mirror/string-alloc-inl.h" -namespace art { +namespace art HIDDEN { static constexpr bool kUseTlabFastPath = true; diff --git a/runtime/entrypoints/quick/quick_alloc_entrypoints.h b/runtime/entrypoints/quick/quick_alloc_entrypoints.h index c4d8a808b2..94f4a27691 100644 --- a/runtime/entrypoints/quick/quick_alloc_entrypoints.h +++ b/runtime/entrypoints/quick/quick_alloc_entrypoints.h @@ -21,7 +21,7 @@ #include "gc/allocator_type.h" #include "quick_entrypoints.h" -namespace art { +namespace art HIDDEN { void ResetQuickAllocEntryPoints(QuickEntryPoints* qpoints); diff --git a/runtime/entrypoints/quick/quick_cast_entrypoints.cc b/runtime/entrypoints/quick/quick_cast_entrypoints.cc index 083d5786ce..a32c483431 100644 --- a/runtime/entrypoints/quick/quick_cast_entrypoints.cc +++ b/runtime/entrypoints/quick/quick_cast_entrypoints.cc @@ -17,7 +17,7 @@ #include "mirror/class-inl.h" #include "mirror/object-inl.h" -namespace art { +namespace art HIDDEN { // Assignable test for code, won't throw. Null and equality tests already performed extern "C" size_t artIsAssignableFromCode(mirror::Class* klass, mirror::Class* ref_class) diff --git a/runtime/entrypoints/quick/quick_default_externs.h b/runtime/entrypoints/quick/quick_default_externs.h index cb3caac9ab..5119b27076 100644 --- a/runtime/entrypoints/quick/quick_default_externs.h +++ b/runtime/entrypoints/quick/quick_default_externs.h @@ -19,7 +19,7 @@ #include <cstdint> -namespace art { +namespace art HIDDEN { namespace mirror { class Array; class Class; diff --git a/runtime/entrypoints/quick/quick_default_init_entrypoints.h b/runtime/entrypoints/quick/quick_default_init_entrypoints.h index ea077889ee..46840e60ed 100644 --- a/runtime/entrypoints/quick/quick_default_init_entrypoints.h +++ b/runtime/entrypoints/quick/quick_default_init_entrypoints.h @@ -24,7 +24,7 @@ #include "quick_default_externs.h" #include "quick_entrypoints.h" -namespace art { +namespace art HIDDEN { static void DefaultInitEntryPoints(JniEntryPoints* jpoints, QuickEntryPoints* qpoints, diff --git a/runtime/entrypoints/quick/quick_deoptimization_entrypoints.cc b/runtime/entrypoints/quick/quick_deoptimization_entrypoints.cc index 277bc7bf06..29060457fd 100644 --- a/runtime/entrypoints/quick/quick_deoptimization_entrypoints.cc +++ b/runtime/entrypoints/quick/quick_deoptimization_entrypoints.cc @@ -23,7 +23,7 @@ #include "runtime.h" #include "thread.h" -namespace art { +namespace art HIDDEN { NO_RETURN static void artDeoptimizeImpl(Thread* self, DeoptimizationKind kind, diff --git a/runtime/entrypoints/quick/quick_dexcache_entrypoints.cc b/runtime/entrypoints/quick/quick_dexcache_entrypoints.cc index 9973d1aa47..f29143f79a 100644 --- a/runtime/entrypoints/quick/quick_dexcache_entrypoints.cc +++ b/runtime/entrypoints/quick/quick_dexcache_entrypoints.cc @@ -32,7 +32,7 @@ #include "oat_file-inl.h" #include "runtime.h" -namespace art { +namespace art HIDDEN { static void StoreObjectInBss(ArtMethod* outer_method, const OatFile* oat_file, diff --git a/runtime/entrypoints/quick/quick_entrypoints.h b/runtime/entrypoints/quick/quick_entrypoints.h index 0e73c63828..fe01424c7c 100644 --- a/runtime/entrypoints/quick/quick_entrypoints.h +++ b/runtime/entrypoints/quick/quick_entrypoints.h @@ -27,7 +27,7 @@ #define QUICK_ENTRYPOINT_OFFSET(ptr_size, x) \ Thread::QuickEntryPointOffset<ptr_size>(OFFSETOF_MEMBER(QuickEntryPoints, x)) -namespace art { +namespace art HIDDEN { namespace mirror { class Array; diff --git a/runtime/entrypoints/quick/quick_entrypoints_enum.cc b/runtime/entrypoints/quick/quick_entrypoints_enum.cc index 5387e44d9b..80d9313dcf 100644 --- a/runtime/entrypoints/quick/quick_entrypoints_enum.cc +++ b/runtime/entrypoints/quick/quick_entrypoints_enum.cc @@ -16,7 +16,7 @@ #include "quick_entrypoints_enum.h" -namespace art { +namespace art HIDDEN { bool EntrypointRequiresStackMap(QuickEntrypointEnum trampoline) { // Entrypoints that do not require a stackmap. In general leaf methods diff --git a/runtime/entrypoints/quick/quick_entrypoints_enum.h b/runtime/entrypoints/quick/quick_entrypoints_enum.h index 017cba68ea..c84ca20d56 100644 --- a/runtime/entrypoints/quick/quick_entrypoints_enum.h +++ b/runtime/entrypoints/quick/quick_entrypoints_enum.h @@ -20,7 +20,7 @@ #include "quick_entrypoints.h" #include "thread.h" -namespace art { +namespace art HIDDEN { // Define an enum for the entrypoints. Names are prepended a 'kQuick'. enum QuickEntrypointEnum { // NOLINT(whitespace/braces) diff --git a/runtime/entrypoints/quick/quick_field_entrypoints.cc b/runtime/entrypoints/quick/quick_field_entrypoints.cc index edf58faf6a..39b21ead02 100644 --- a/runtime/entrypoints/quick/quick_field_entrypoints.cc +++ b/runtime/entrypoints/quick/quick_field_entrypoints.cc @@ -26,7 +26,7 @@ #include "mirror/class-inl.h" #include "mirror/object_reference.h" -namespace art { +namespace art HIDDEN { // Fast path field resolution that can't initialize classes or throw exceptions. inline ArtField* FindFieldFast(uint32_t field_idx, diff --git a/runtime/entrypoints/quick/quick_fillarray_entrypoints.cc b/runtime/entrypoints/quick/quick_fillarray_entrypoints.cc index 5b7fe0ccf4..b87d81501b 100644 --- a/runtime/entrypoints/quick/quick_fillarray_entrypoints.cc +++ b/runtime/entrypoints/quick/quick_fillarray_entrypoints.cc @@ -19,7 +19,7 @@ #include "entrypoints/entrypoint_utils.h" #include "mirror/array.h" -namespace art { +namespace art HIDDEN { /* * Handle fill array data by copying appropriate part of dex file into array. diff --git a/runtime/entrypoints/quick/quick_jni_entrypoints.cc b/runtime/entrypoints/quick/quick_jni_entrypoints.cc index 06c27b37c8..c9ec7a7dec 100644 --- a/runtime/entrypoints/quick/quick_jni_entrypoints.cc +++ b/runtime/entrypoints/quick/quick_jni_entrypoints.cc @@ -36,7 +36,7 @@ } \ } -namespace art { +namespace art HIDDEN { extern "C" int artMethodExitHook(Thread* self, ArtMethod* method, diff --git a/runtime/entrypoints/quick/quick_lock_entrypoints.cc b/runtime/entrypoints/quick/quick_lock_entrypoints.cc index 87286cf651..402f8f613c 100644 --- a/runtime/entrypoints/quick/quick_lock_entrypoints.cc +++ b/runtime/entrypoints/quick/quick_lock_entrypoints.cc @@ -18,7 +18,7 @@ #include "common_throws.h" #include "mirror/object-inl.h" -namespace art { +namespace art HIDDEN { extern "C" int artLockObjectFromCode(mirror::Object* obj, Thread* self) NO_THREAD_SAFETY_ANALYSIS diff --git a/runtime/entrypoints/quick/quick_string_builder_append_entrypoints.cc b/runtime/entrypoints/quick/quick_string_builder_append_entrypoints.cc index 9afaf439dc..9e5fe1c826 100644 --- a/runtime/entrypoints/quick/quick_string_builder_append_entrypoints.cc +++ b/runtime/entrypoints/quick/quick_string_builder_append_entrypoints.cc @@ -19,7 +19,7 @@ #include "string_builder_append.h" #include "obj_ptr-inl.h" -namespace art { +namespace art HIDDEN { extern "C" mirror::String* artStringBuilderAppend(uint32_t format, const uint32_t* args, diff --git a/runtime/entrypoints/quick/quick_thread_entrypoints.cc b/runtime/entrypoints/quick/quick_thread_entrypoints.cc index 5dca58ab04..53e14d0d7a 100644 --- a/runtime/entrypoints/quick/quick_thread_entrypoints.cc +++ b/runtime/entrypoints/quick/quick_thread_entrypoints.cc @@ -19,7 +19,7 @@ #include "runtime.h" #include "thread-inl.h" -namespace art { +namespace art HIDDEN { extern "C" void artDeoptimizeIfNeeded(Thread* self, uintptr_t result, bool is_ref) REQUIRES_SHARED(Locks::mutator_lock_) { diff --git a/runtime/entrypoints/quick/quick_throw_entrypoints.cc b/runtime/entrypoints/quick/quick_throw_entrypoints.cc index 202b031bca..781f3e549d 100644 --- a/runtime/entrypoints/quick/quick_throw_entrypoints.cc +++ b/runtime/entrypoints/quick/quick_throw_entrypoints.cc @@ -24,7 +24,7 @@ #include "thread.h" #include "well_known_classes.h" -namespace art { +namespace art HIDDEN { // Deliver an exception that's pending on thread helping set up a callee save frame on the way. extern "C" NO_RETURN void artDeliverPendingExceptionFromCode(Thread* self) diff --git a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc index 664cf622a8..d87388e86b 100644 --- a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc +++ b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc @@ -58,7 +58,7 @@ #include "var_handles.h" #include "well_known_classes.h" -namespace art { +namespace art HIDDEN { extern "C" NO_RETURN void artDeoptimizeFromCompiledCode(DeoptimizationKind kind, Thread* self); extern "C" NO_RETURN void artDeoptimize(Thread* self, bool skip_method_exit_callbacks); @@ -943,9 +943,8 @@ class GetQuickReferenceArgumentAtVisitor final : public QuickArgumentVisitor { // Returning reference argument at position `arg_pos` in Quick stack frame at address `sp`. // NOTE: Only used for testing purposes. -extern "C" StackReference<mirror::Object>* artQuickGetProxyReferenceArgumentAt(size_t arg_pos, - ArtMethod** sp) - REQUIRES_SHARED(Locks::mutator_lock_) { +EXPORT extern "C" StackReference<mirror::Object>* artQuickGetProxyReferenceArgumentAt( + size_t arg_pos, ArtMethod** sp) REQUIRES_SHARED(Locks::mutator_lock_) { ArtMethod* proxy_method = *sp; ArtMethod* non_proxy_method = proxy_method->GetInterfaceMethodIfProxy(kRuntimePointerSize); CHECK(!non_proxy_method->IsStatic()) diff --git a/runtime/entrypoints/quick/quick_trampoline_entrypoints_test.cc b/runtime/entrypoints/quick/quick_trampoline_entrypoints_test.cc index 0f0fb69f4b..14e5a7cdfd 100644 --- a/runtime/entrypoints/quick/quick_trampoline_entrypoints_test.cc +++ b/runtime/entrypoints/quick/quick_trampoline_entrypoints_test.cc @@ -22,7 +22,7 @@ #include "common_runtime_test.h" #include "quick/quick_method_frame_info.h" -namespace art { +namespace art HIDDEN { class QuickTrampolineEntrypointsTest : public CommonRuntimeTest { protected: |