summaryrefslogtreecommitdiff
path: root/compiler/optimizing/builder.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-05-26 10:02:31 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-05-26 10:02:31 +0000
commit8a8d8252f52bec14a8fe2b6f88e1f184c63cf351 (patch)
tree8d7c1368daa545d7db3f2c1416f8bab39a1e7b5f /compiler/optimizing/builder.cc
parentca27be7a95e1b238c76a4a5fccaad2a3416766c2 (diff)
parentd5111bf05fc0a9974280a80eeb43db6d5227a81e (diff)
Merge "Do not use dex_compilation_unit after inlining."
Diffstat (limited to 'compiler/optimizing/builder.cc')
-rw-r--r--compiler/optimizing/builder.cc22
1 files changed, 15 insertions, 7 deletions
diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc
index c4eaabf899..49a0444f94 100644
--- a/compiler/optimizing/builder.cc
+++ b/compiler/optimizing/builder.cc
@@ -711,8 +711,8 @@ bool HGraphBuilder::BuildInvoke(const Instruction& instruction,
clinit_check_requirement = HInvokeStaticOrDirect::ClinitCheckRequirement::kNone;
} else {
clinit_check_requirement = HInvokeStaticOrDirect::ClinitCheckRequirement::kExplicit;
- HLoadClass* load_class =
- new (arena_) HLoadClass(storage_index, is_referrer_class, dex_pc);
+ HLoadClass* load_class = new (arena_) HLoadClass(
+ storage_index, *dex_compilation_unit_->GetDexFile(), is_referrer_class, dex_pc);
current_block_->AddInstruction(load_class);
clinit_check = new (arena_) HClinitCheck(load_class, dex_pc);
current_block_->AddInstruction(clinit_check);
@@ -915,7 +915,8 @@ bool HGraphBuilder::BuildStaticFieldAccess(const Instruction& instruction,
*outer_compilation_unit_->GetDexFile(), storage_index);
bool is_initialized = resolved_field->GetDeclaringClass()->IsInitialized() && is_in_dex_cache;
- HLoadClass* constant = new (arena_) HLoadClass(storage_index, is_referrer_class, dex_pc);
+ HLoadClass* constant = new (arena_) HLoadClass(
+ storage_index, *dex_compilation_unit_->GetDexFile(), is_referrer_class, dex_pc);
current_block_->AddInstruction(constant);
HInstruction* cls = constant;
@@ -1151,7 +1152,10 @@ bool HGraphBuilder::BuildTypeCheck(const Instruction& instruction,
}
HInstruction* object = LoadLocal(reference, Primitive::kPrimNot);
HLoadClass* cls = new (arena_) HLoadClass(
- type_index, IsOutermostCompilingClass(type_index), dex_pc);
+ type_index,
+ *dex_compilation_unit_->GetDexFile(),
+ IsOutermostCompilingClass(type_index),
+ dex_pc);
current_block_->AddInstruction(cls);
// The class needs a temporary before being used by the type check.
Temporaries temps(graph_);
@@ -1976,7 +1980,8 @@ bool HGraphBuilder::AnalyzeDexInstruction(const Instruction& instruction, uint32
? kQuickAllocObjectWithAccessCheck
: kQuickAllocObject;
- current_block_->AddInstruction(new (arena_) HNewInstance(dex_pc, type_index, entrypoint));
+ current_block_->AddInstruction(new (arena_) HNewInstance(
+ dex_pc, type_index, *dex_compilation_unit_->GetDexFile(), entrypoint));
UpdateLocal(instruction.VRegA(), current_block_->GetLastInstruction());
}
break;
@@ -2161,8 +2166,11 @@ bool HGraphBuilder::AnalyzeDexInstruction(const Instruction& instruction, uint32
MaybeRecordStat(MethodCompilationStat::kNotCompiledCantAccesType);
return false;
}
- current_block_->AddInstruction(
- new (arena_) HLoadClass(type_index, IsOutermostCompilingClass(type_index), dex_pc));
+ current_block_->AddInstruction(new (arena_) HLoadClass(
+ type_index,
+ *dex_compilation_unit_->GetDexFile(),
+ IsOutermostCompilingClass(type_index),
+ dex_pc));
UpdateLocal(instruction.VRegA_21c(), current_block_->GetLastInstruction());
break;
}