diff options
Diffstat (limited to 'compiler/optimizing')
-rw-r--r-- | compiler/optimizing/inliner.cc | 2 | ||||
-rw-r--r-- | compiler/optimizing/prepare_for_register_allocation.cc | 3 | ||||
-rw-r--r-- | compiler/optimizing/stack_map_stream.cc | 19 | ||||
-rw-r--r-- | compiler/optimizing/stack_map_stream.h | 2 |
4 files changed, 14 insertions, 12 deletions
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc index 6567a3a445..793e781bae 100644 --- a/compiler/optimizing/inliner.cc +++ b/compiler/optimizing/inliner.cc @@ -1236,7 +1236,7 @@ bool HInliner::TryInlineAndReplace(HInvoke* invoke_instruction, const DexFile& caller_dex_file = *caller_compilation_unit_.GetDexFile(); uint32_t dex_method_index = FindMethodIndexIn( method, caller_dex_file, invoke_instruction->GetDexMethodIndex()); - if (dex_method_index == DexFile::kDexNoIndex) { + if (dex_method_index == dex::kDexNoIndex) { return false; } HInvokeVirtual* new_invoke = new (graph_->GetArena()) HInvokeVirtual( diff --git a/compiler/optimizing/prepare_for_register_allocation.cc b/compiler/optimizing/prepare_for_register_allocation.cc index 5de707a50f..2c856cd3d9 100644 --- a/compiler/optimizing/prepare_for_register_allocation.cc +++ b/compiler/optimizing/prepare_for_register_allocation.cc @@ -16,6 +16,7 @@ #include "prepare_for_register_allocation.h" +#include "dex_file_types.h" #include "jni_internal.h" #include "optimizing_compiler_stats.h" #include "well_known_classes.h" @@ -59,7 +60,7 @@ void PrepareForRegisterAllocation::VisitBoundsCheck(HBoundsCheck* check) { HEnvironment* environment = new (arena) HEnvironment(arena, /* number_of_vregs */ 0u, char_at_method, - /* dex_pc */ DexFile::kDexNoIndex, + /* dex_pc */ dex::kDexNoIndex, check); check->InsertRawEnvironment(environment); } diff --git a/compiler/optimizing/stack_map_stream.cc b/compiler/optimizing/stack_map_stream.cc index b7840d73db..7eb2188a28 100644 --- a/compiler/optimizing/stack_map_stream.cc +++ b/compiler/optimizing/stack_map_stream.cc @@ -18,6 +18,7 @@ #include "art_method-inl.h" #include "base/stl_util.h" +#include "dex_file_types.h" #include "optimizing/optimizing_compiler.h" #include "runtime.h" #include "scoped_thread_state_change-inl.h" @@ -39,7 +40,7 @@ void StackMapStream::BeginStackMapEntry(uint32_t dex_pc, current_entry_.inlining_depth = inlining_depth; current_entry_.inline_infos_start_index = inline_infos_.size(); current_entry_.stack_mask_index = 0; - current_entry_.dex_method_index = DexFile::kDexNoIndex; + current_entry_.dex_method_index = dex::kDexNoIndex; current_entry_.dex_register_entry.num_dex_registers = num_dex_registers; current_entry_.dex_register_entry.locations_start_index = dex_register_locations_.size(); current_entry_.dex_register_entry.live_dex_registers_mask = (num_dex_registers != 0) @@ -226,7 +227,7 @@ void StackMapStream::ComputeInvokeInfoEncoding(CodeInfoEncoding* encoding) { size_t invoke_infos_count = 0; size_t invoke_type_max = 0; for (const StackMapEntry& entry : stack_maps_) { - if (entry.dex_method_index != DexFile::kDexNoIndex) { + if (entry.dex_method_index != dex::kDexNoIndex) { native_pc_max = std::max(native_pc_max, entry.native_pc_code_offset.CompressedValue()); method_index_max = std::max(method_index_max, static_cast<uint16_t>(entry.dex_method_index)); invoke_type_max = std::max(invoke_type_max, static_cast<size_t>(entry.invoke_type)); @@ -240,7 +241,7 @@ void StackMapStream::ComputeInvokeInfoEncoding(CodeInfoEncoding* encoding) { void StackMapStream::ComputeInlineInfoEncoding(InlineInfoEncoding* encoding, size_t dex_register_maps_bytes) { uint32_t method_index_max = 0; - uint32_t dex_pc_max = DexFile::kDexNoIndex; + uint32_t dex_pc_max = dex::kDexNoIndex; uint32_t extra_data_max = 0; uint32_t inline_info_index = 0; @@ -256,8 +257,8 @@ void StackMapStream::ComputeInlineInfoEncoding(InlineInfoEncoding* encoding, extra_data_max = std::max( extra_data_max, Low32Bits(reinterpret_cast<uintptr_t>(inline_entry.method))); } - if (inline_entry.dex_pc != DexFile::kDexNoIndex && - (dex_pc_max == DexFile::kDexNoIndex || dex_pc_max < inline_entry.dex_pc)) { + if (inline_entry.dex_pc != dex::kDexNoIndex && + (dex_pc_max == dex::kDexNoIndex || dex_pc_max < inline_entry.dex_pc)) { dex_pc_max = inline_entry.dex_pc; } } @@ -362,7 +363,7 @@ void StackMapStream::FillInCodeInfo(MemoryRegion region) { dex_register_locations_region); stack_map.SetDexRegisterMapOffset(encoding.stack_map.encoding, offset); - if (entry.dex_method_index != DexFile::kDexNoIndex) { + if (entry.dex_method_index != dex::kDexNoIndex) { InvokeInfo invoke_info(code_info.GetInvokeInfo(encoding, invoke_info_idx)); invoke_info.SetNativePcCodeOffset(encoding.invoke_info.encoding, entry.native_pc_code_offset); invoke_info.SetInvokeType(encoding.invoke_info.encoding, entry.invoke_type); @@ -561,7 +562,7 @@ void StackMapStream::PrepareMethodIndices() { for (StackMapEntry& stack_map : stack_maps_) { const size_t index = dedupe.size(); const uint32_t method_index = stack_map.dex_method_index; - if (method_index != DexFile::kDexNoIndex) { + if (method_index != dex::kDexNoIndex) { stack_map.dex_method_index_idx = dedupe.emplace(method_index, index).first->second; method_indices_[index] = method_index; } @@ -569,7 +570,7 @@ void StackMapStream::PrepareMethodIndices() { for (InlineInfoEntry& inline_info : inline_infos_) { const size_t index = dedupe.size(); const uint32_t method_index = inline_info.method_index; - CHECK_NE(method_index, DexFile::kDexNoIndex); + CHECK_NE(method_index, dex::kDexNoIndex); inline_info.dex_method_index_idx = dedupe.emplace(method_index, index).first->second; method_indices_[index] = method_index; } @@ -629,7 +630,7 @@ void StackMapStream::CheckCodeInfo(MemoryRegion region) const { DCHECK_EQ(stack_mask.LoadBit(b), 0u); } } - if (entry.dex_method_index != DexFile::kDexNoIndex) { + if (entry.dex_method_index != dex::kDexNoIndex) { InvokeInfo invoke_info = code_info.GetInvokeInfo(encoding, invoke_info_index); DCHECK_EQ(invoke_info.GetNativePcOffset(encoding.invoke_info.encoding, instruction_set_), entry.native_pc_code_offset.Uint32Value(instruction_set_)); diff --git a/compiler/optimizing/stack_map_stream.h b/compiler/optimizing/stack_map_stream.h index e6471e1bc5..a574566e33 100644 --- a/compiler/optimizing/stack_map_stream.h +++ b/compiler/optimizing/stack_map_stream.h @@ -126,7 +126,7 @@ class StackMapStream : public ValueObject { }; struct InlineInfoEntry { - uint32_t dex_pc; // DexFile::kDexNoIndex for intrinsified native methods. + uint32_t dex_pc; // dex::kDexNoIndex for intrinsified native methods. ArtMethod* method; uint32_t method_index; DexRegisterMapEntry dex_register_entry; |