Move MethodLoadKind out of HInvokeStaticOrDirect.
To prepare for using it in HInvokeInterface. For consistency, also move
CodePtrLocation.
Test: test.py
Change-Id: I84f973764275002e2adb71080ebc833b2bafb975
diff --git a/compiler/optimizing/instruction_builder.cc b/compiler/optimizing/instruction_builder.cc
index 4615342..ab28e4b 100644
--- a/compiler/optimizing/instruction_builder.cc
+++ b/compiler/optimizing/instruction_builder.cc
@@ -488,8 +488,8 @@
// 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 @@
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 @@
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_,