summaryrefslogtreecommitdiff
path: root/compiler/optimizing/builder.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-05-28 10:10:24 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-05-28 10:10:24 +0000
commitb4e2fbbed28c3bcdb8fd0fee5a201ba78e1edf28 (patch)
tree2da8c563cca7c9e7e125819ba3022915dca18ca9 /compiler/optimizing/builder.cc
parent31db3432157caac55584a59827c69b303ba09d13 (diff)
parent76b1e1799a713a19218de26b171b0aef48a59e98 (diff)
Merge "Add a HCurrentMethod node."
Diffstat (limited to 'compiler/optimizing/builder.cc')
-rw-r--r--compiler/optimizing/builder.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc
index c4f033df52..41c1d2cf1b 100644
--- a/compiler/optimizing/builder.cc
+++ b/compiler/optimizing/builder.cc
@@ -712,7 +712,11 @@ bool HGraphBuilder::BuildInvoke(const Instruction& instruction,
} else {
clinit_check_requirement = HInvokeStaticOrDirect::ClinitCheckRequirement::kExplicit;
HLoadClass* load_class = new (arena_) HLoadClass(
- storage_index, *dex_compilation_unit_->GetDexFile(), is_referrer_class, dex_pc);
+ graph_->GetCurrentMethod(),
+ 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,8 +919,11 @@ 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, *dex_compilation_unit_->GetDexFile(), is_referrer_class, dex_pc);
+ HLoadClass* constant = new (arena_) HLoadClass(graph_->GetCurrentMethod(),
+ storage_index,
+ *dex_compilation_unit_->GetDexFile(),
+ is_referrer_class,
+ dex_pc);
current_block_->AddInstruction(constant);
HInstruction* cls = constant;
@@ -1156,6 +1163,7 @@ bool HGraphBuilder::BuildTypeCheck(const Instruction& instruction,
}
HInstruction* object = LoadLocal(reference, Primitive::kPrimNot);
HLoadClass* cls = new (arena_) HLoadClass(
+ graph_->GetCurrentMethod(),
type_index,
*dex_compilation_unit_->GetDexFile(),
IsOutermostCompilingClass(type_index),
@@ -2171,6 +2179,7 @@ bool HGraphBuilder::AnalyzeDexInstruction(const Instruction& instruction, uint32
return false;
}
current_block_->AddInstruction(new (arena_) HLoadClass(
+ graph_->GetCurrentMethod(),
type_index,
*dex_compilation_unit_->GetDexFile(),
IsOutermostCompilingClass(type_index),