ART: Add dex::ProtoIndex
Test: m -j32 test-art-host
Change-Id: Ic2d2a7a43be1b8590b97cdf3729200b043ffc6a3
diff --git a/compiler/optimizing/instruction_builder.cc b/compiler/optimizing/instruction_builder.cc
index 35a3945..0e20a65 100644
--- a/compiler/optimizing/instruction_builder.cc
+++ b/compiler/optimizing/instruction_builder.cc
@@ -1055,7 +1055,7 @@
bool HInstructionBuilder::BuildInvokePolymorphic(const Instruction& instruction ATTRIBUTE_UNUSED,
uint32_t dex_pc,
uint32_t method_idx,
- uint32_t proto_idx,
+ dex::ProtoIndex proto_idx,
uint32_t number_of_vreg_arguments,
bool is_range,
uint32_t* args,
@@ -1896,17 +1896,17 @@
}
}
-void HInstructionBuilder::BuildLoadMethodHandle(uint16_t proto_idx, uint32_t dex_pc) {
+void HInstructionBuilder::BuildLoadMethodHandle(uint16_t method_handle_index, uint32_t dex_pc) {
const DexFile& dex_file = *dex_compilation_unit_->GetDexFile();
- HLoadMethodHandle* load_method_handle =
- new (allocator_) HLoadMethodHandle(graph_->GetCurrentMethod(), proto_idx, dex_file, dex_pc);
+ HLoadMethodHandle* load_method_handle = new (allocator_) HLoadMethodHandle(
+ graph_->GetCurrentMethod(), method_handle_index, dex_file, dex_pc);
AppendInstruction(load_method_handle);
}
-void HInstructionBuilder::BuildLoadMethodType(uint16_t proto_idx, uint32_t dex_pc) {
+void HInstructionBuilder::BuildLoadMethodType(dex::ProtoIndex proto_index, uint32_t dex_pc) {
const DexFile& dex_file = *dex_compilation_unit_->GetDexFile();
HLoadMethodType* load_method_type =
- new (allocator_) HLoadMethodType(graph_->GetCurrentMethod(), proto_idx, dex_file, dex_pc);
+ new (allocator_) HLoadMethodType(graph_->GetCurrentMethod(), proto_index, dex_file, dex_pc);
AppendInstruction(load_method_type);
}
@@ -2189,7 +2189,7 @@
case Instruction::INVOKE_POLYMORPHIC: {
uint16_t method_idx = instruction.VRegB_45cc();
- uint16_t proto_idx = instruction.VRegH_45cc();
+ dex::ProtoIndex proto_idx(instruction.VRegH_45cc());
uint32_t number_of_vreg_arguments = instruction.VRegA_45cc();
uint32_t args[5];
instruction.GetVarArgs(args);
@@ -2205,7 +2205,7 @@
case Instruction::INVOKE_POLYMORPHIC_RANGE: {
uint16_t method_idx = instruction.VRegB_4rcc();
- uint16_t proto_idx = instruction.VRegH_4rcc();
+ dex::ProtoIndex proto_idx(instruction.VRegH_4rcc());
uint32_t number_of_vreg_arguments = instruction.VRegA_4rcc();
uint32_t register_index = instruction.VRegC_4rcc();
return BuildInvokePolymorphic(instruction,
@@ -2949,7 +2949,7 @@
}
case Instruction::CONST_METHOD_TYPE: {
- uint16_t proto_idx = instruction.VRegB_21c();
+ dex::ProtoIndex proto_idx(instruction.VRegB_21c());
BuildLoadMethodType(proto_idx, dex_pc);
UpdateLocal(instruction.VRegA_21c(), current_block_->GetLastInstruction());
break;