diff options
| author | 2015-10-06 12:48:56 +0000 | |
|---|---|---|
| committer | 2015-10-06 12:48:56 +0000 | |
| commit | 3b6b587934659bc4428557ac174ccce3731fd91a (patch) | |
| tree | 4ef321e302c80d5be3e132650dc592ee16f58958 /compiler/optimizing/code_generator.cc | |
| parent | f82baa912a4c05a39f953826a45c0617dd2e78ff (diff) | |
| parent | 98893e146b0ff0e1fd1d7c29252f1d1e75a163f2 (diff) | |
Merge "Add support for unresolved classes in optimizing."
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
| -rw-r--r-- | compiler/optimizing/code_generator.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index 8254277f96..00f316cf98 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -537,6 +537,26 @@ void CodeGenerator::GenerateUnresolvedFieldAccess( } } +void CodeGenerator::CreateLoadClassLocationSummary(HLoadClass* cls, + Location runtime_type_index_location, + Location runtime_return_location) { + ArenaAllocator* allocator = cls->GetBlock()->GetGraph()->GetArena(); + LocationSummary::CallKind call_kind = cls->NeedsAccessCheck() + ? LocationSummary::kCall + : (cls->CanCallRuntime() + ? LocationSummary::kCallOnSlowPath + : LocationSummary::kNoCall); + LocationSummary* locations = new (allocator) LocationSummary(cls, call_kind); + locations->SetInAt(0, Location::RequiresRegister()); + if (cls->NeedsAccessCheck()) { + locations->AddTemp(runtime_type_index_location); + locations->SetOut(runtime_return_location); + } else { + locations->SetOut(Location::RequiresRegister()); + } +} + + void CodeGenerator::BlockIfInRegister(Location location, bool is_out) const { // The DCHECKS below check that a register is not specified twice in // the summary. The out location can overlap with an input, so we need |