From 028fb48ae2bddeef20b91e4a1582ce58df724741 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Thu, 13 Jul 2023 13:43:12 +0000 Subject: Clean up ART intrinsics. Change `intrinsics_list.h` to a normal include file instead of the weird include-use-and-undef pattern. Prefix macros defined in that file with `ART_`. And also remove blank lines at end of some files and address some comments on merged changes. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 283082089 Change-Id: I9c462f973c0c4bb53eff39fbe191014f6321d7c5 --- compiler/optimizing/nodes.cc | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'compiler/optimizing/nodes.cc') diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index 9caa766858..0d78771bf4 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -36,6 +36,7 @@ #include "code_generator.h" #include "common_dominator.h" #include "intrinsics.h" +#include "intrinsics_list.h" #include "mirror/class-inl.h" #include "scoped_thread_state_change-inl.h" #include "ssa_builder.h" @@ -3523,9 +3524,7 @@ std::ostream& operator<<(std::ostream& os, TypeCheckKind rhs) { static_assert( \ static_cast(Intrinsics::k ## Name) <= (kAccIntrinsicBits >> CTZ(kAccIntrinsicBits)), \ "Instrinsics enumeration space overflow."); -#include "intrinsics_list.h" - INTRINSICS_LIST(CHECK_INTRINSICS_ENUM_VALUES) -#undef INTRINSICS_LIST + ART_INTRINSICS_LIST(CHECK_INTRINSICS_ENUM_VALUES) #undef CHECK_INTRINSICS_ENUM_VALUES // Function that returns whether an intrinsic needs an environment or not. @@ -3536,9 +3535,7 @@ static inline IntrinsicNeedsEnvironment NeedsEnvironmentIntrinsic(Intrinsics i) #define OPTIMIZING_INTRINSICS(Name, InvokeType, NeedsEnv, SideEffects, Exceptions, ...) \ case Intrinsics::k ## Name: \ return NeedsEnv; -#include "intrinsics_list.h" - INTRINSICS_LIST(OPTIMIZING_INTRINSICS) -#undef INTRINSICS_LIST + ART_INTRINSICS_LIST(OPTIMIZING_INTRINSICS) #undef OPTIMIZING_INTRINSICS } return kNeedsEnvironment; @@ -3552,9 +3549,7 @@ static inline IntrinsicSideEffects GetSideEffectsIntrinsic(Intrinsics i) { #define OPTIMIZING_INTRINSICS(Name, InvokeType, NeedsEnv, SideEffects, Exceptions, ...) \ case Intrinsics::k ## Name: \ return SideEffects; -#include "intrinsics_list.h" - INTRINSICS_LIST(OPTIMIZING_INTRINSICS) -#undef INTRINSICS_LIST + ART_INTRINSICS_LIST(OPTIMIZING_INTRINSICS) #undef OPTIMIZING_INTRINSICS } return kAllSideEffects; @@ -3568,9 +3563,7 @@ static inline IntrinsicExceptions GetExceptionsIntrinsic(Intrinsics i) { #define OPTIMIZING_INTRINSICS(Name, InvokeType, NeedsEnv, SideEffects, Exceptions, ...) \ case Intrinsics::k ## Name: \ return Exceptions; -#include "intrinsics_list.h" - INTRINSICS_LIST(OPTIMIZING_INTRINSICS) -#undef INTRINSICS_LIST + ART_INTRINSICS_LIST(OPTIMIZING_INTRINSICS) #undef OPTIMIZING_INTRINSICS } return kCanThrow; -- cgit v1.2.3-59-g8ed1b