Bring Reference Type Propagation to NewArray
Change-Id: Ieff4f38854e06b0ed4b5689ced94a4289053d80d
diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc
index 49a0444..c4f033d 100644
--- a/compiler/optimizing/builder.cc
+++ b/compiler/optimizing/builder.cc
@@ -1027,7 +1027,11 @@
QuickEntrypointEnum entrypoint = NeedsAccessCheck(type_index)
? kQuickAllocArrayWithAccessCheck
: kQuickAllocArray;
- HInstruction* object = new (arena_) HNewArray(length, dex_pc, type_index, entrypoint);
+ HInstruction* object = new (arena_) HNewArray(length,
+ dex_pc,
+ type_index,
+ *dex_compilation_unit_->GetDexFile(),
+ entrypoint);
current_block_->AddInstruction(object);
const char* descriptor = dex_file_->StringByTypeIdx(type_index);
@@ -1993,8 +1997,8 @@
QuickEntrypointEnum entrypoint = NeedsAccessCheck(type_index)
? kQuickAllocArrayWithAccessCheck
: kQuickAllocArray;
- current_block_->AddInstruction(
- new (arena_) HNewArray(length, dex_pc, type_index, entrypoint));
+ current_block_->AddInstruction(new (arena_) HNewArray(
+ length, dex_pc, type_index, *dex_compilation_unit_->GetDexFile(), entrypoint));
UpdateLocal(instruction.VRegA_22c(), current_block_->GetLastInstruction());
break;
}