From de91ca90389e4b41ed27b320a6c43ff56a6d75ff Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Tue, 27 Oct 2020 13:41:40 +0000 Subject: Refactor Integer.valueOf() intrinsic implementation. Prepare for Reference.getReferent() intrinsic implementation by a refactoring to separate the retrieval of an intrinsic method's declaring class to its own helper function, rather than being a part of a larger one. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing --jit Test: aosp_blueline-userdebug boots. Test: run-gtests.sh Test: testrunner.py --target --optimizing --jit Bug: 170286013 Change-Id: Ib6c0e55d0c6fcc932999428f21c51afe32ab7ef2 --- compiler/optimizing/code_generator.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'compiler/optimizing/code_generator.h') diff --git a/compiler/optimizing/code_generator.h b/compiler/optimizing/code_generator.h index 22804a992f..bd5483cc09 100644 --- a/compiler/optimizing/code_generator.h +++ b/compiler/optimizing/code_generator.h @@ -630,9 +630,12 @@ class CodeGenerator : public DeletableArenaObject { Location runtime_return_location); void GenerateLoadMethodTypeRuntimeCall(HLoadMethodType* method_type); - uint32_t GetBootImageOffset(HLoadClass* load_class); - uint32_t GetBootImageOffset(HLoadString* load_string); - uint32_t GetBootImageOffset(HInvoke* invoke); + static uint32_t GetBootImageOffset(ObjPtr object) + REQUIRES_SHARED(Locks::mutator_lock_); + static uint32_t GetBootImageOffset(HLoadClass* load_class); + static uint32_t GetBootImageOffset(HLoadString* load_string); + static uint32_t GetBootImageOffset(HInvoke* invoke); + static uint32_t GetBootImageOffsetOfIntrinsicDeclaringClass(HInvoke* invoke); static void CreateSystemArrayCopyLocationSummary(HInvoke* invoke); -- cgit v1.2.3-59-g8ed1b