diff options
| author | 2015-10-02 21:05:03 +0100 | |
|---|---|---|
| committer | 2015-10-06 13:42:55 +0100 | |
| commit | 98893e146b0ff0e1fd1d7c29252f1d1e75a163f2 (patch) | |
| tree | a14bb10d039fcee10a7e0cacb494bb60d08b2039 /compiler/optimizing/code_generator.cc | |
| parent | 7b5c395e9a50f988ca2275a429df17b6abbcc475 (diff) | |
Add support for unresolved classes in optimizing.
Change-Id: I0e299a81e560eb9cb0737ec46125dffc99333b54
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 |