From 6d69b52f331f788cbd1f21ffd5b87cb3b39965e4 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Wed, 23 Sep 2020 14:47:28 +0100 Subject: Move MethodLoadKind out of HInvokeStaticOrDirect. To prepare for using it in HInvokeInterface. For consistency, also move CodePtrLocation. Test: test.py Change-Id: I84f973764275002e2adb71080ebc833b2bafb975 --- compiler/optimizing/instruction_builder.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'compiler/optimizing/instruction_builder.cc') diff --git a/compiler/optimizing/instruction_builder.cc b/compiler/optimizing/instruction_builder.cc index 4615342da7..ab28e4b86f 100644 --- a/compiler/optimizing/instruction_builder.cc +++ b/compiler/optimizing/instruction_builder.cc @@ -488,8 +488,8 @@ void HInstructionBuilder::BuildIntrinsic(ArtMethod* method) { // normally use an HInvokeVirtual (sharpen the call). MethodReference target_method(dex_file_, method_idx); HInvokeStaticOrDirect::DispatchInfo dispatch_info = { - HInvokeStaticOrDirect::MethodLoadKind::kRuntimeCall, - HInvokeStaticOrDirect::CodePtrLocation::kCallArtMethod, + MethodLoadKind::kRuntimeCall, + CodePtrLocation::kCallArtMethod, /* method_load_data= */ 0u }; InvokeType invoke_type = dex_compilation_unit_->IsStatic() ? kStatic : kDirect; @@ -1041,8 +1041,8 @@ bool HInstructionBuilder::BuildInvoke(const Instruction& instruction, if (is_string_constructor) { uint32_t string_init_entry_point = WellKnownClasses::StringInitToEntryPoint(resolved_method); HInvokeStaticOrDirect::DispatchInfo dispatch_info = { - HInvokeStaticOrDirect::MethodLoadKind::kStringInit, - HInvokeStaticOrDirect::CodePtrLocation::kCallArtMethod, + MethodLoadKind::kStringInit, + CodePtrLocation::kCallArtMethod, dchecked_integral_cast(string_init_entry_point) }; // We pass null for the resolved_method to ensure optimizations @@ -1107,8 +1107,7 @@ bool HInstructionBuilder::BuildInvoke(const Instruction& instruction, HSharpening::SharpenInvokeStaticOrDirect(resolved_method, has_method_id, code_generator_); - if (dispatch_info.code_ptr_location == - HInvokeStaticOrDirect::CodePtrLocation::kCallCriticalNative) { + if (dispatch_info.code_ptr_location == CodePtrLocation::kCallCriticalNative) { graph_->SetHasDirectCriticalNativeCall(true); } invoke = new (allocator_) HInvokeStaticOrDirect(allocator_, -- cgit v1.2.3-59-g8ed1b