diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2020-09-23 14:47:28 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2020-09-23 14:47:28 +0100 |
commit | 6d69b52f331f788cbd1f21ffd5b87cb3b39965e4 (patch) | |
tree | 2bca1001afb4c3fc45cbb198765c51aa65e45c42 /compiler/optimizing/instruction_builder.cc | |
parent | e407d97b0f25562110511d025058dcefdacca623 (diff) |
Move MethodLoadKind out of HInvokeStaticOrDirect.
To prepare for using it in HInvokeInterface. For consistency, also move
CodePtrLocation.
Test: test.py
Change-Id: I84f973764275002e2adb71080ebc833b2bafb975
Diffstat (limited to 'compiler/optimizing/instruction_builder.cc')
-rw-r--r-- | compiler/optimizing/instruction_builder.cc | 11 |
1 files changed, 5 insertions, 6 deletions
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<uint64_t>(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_, |