diff options
| author | 2014-08-06 16:44:22 -0700 | |
|---|---|---|
| committer | 2014-08-06 16:51:17 -0700 | |
| commit | 4fc785398707ede68f29768748b7fe5fa39dde24 (patch) | |
| tree | 9452df749e5720aa921af79b0e8ec410ecf6c4fc /compiler/dex/quick/codegen_util.cc | |
| parent | 4d110c25bbcc3ed4603e94968ee02db7b2c9db8c (diff) | |
Fixed build breakage due to incorrect class TypeId.
Fixed incorrect type id being inserted in code buffer and got rid of
inefficient pointer wrapping in LoadClassType.
Change-Id: I7ee1d957ebcd816445c26199723ac50787d926d7
Diffstat (limited to 'compiler/dex/quick/codegen_util.cc')
| -rw-r--r-- | compiler/dex/quick/codegen_util.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/dex/quick/codegen_util.cc b/compiler/dex/quick/codegen_util.cc index 9f604277ac..511297c713 100644 --- a/compiler/dex/quick/codegen_util.cc +++ b/compiler/dex/quick/codegen_util.cc @@ -512,7 +512,7 @@ void Mir2Lir::InstallLiteralPools() { target_method_idx, class_dex_file, code_buffer_.size()); - const DexFile::TypeId& target_method_id = cu_->dex_file->GetTypeId(target_method_idx); + const DexFile::TypeId& target_method_id = class_dex_file->GetTypeId(target_method_idx); // unique value based on target to ensure code deduplication works PushPointer(code_buffer_, &target_method_id, cu_->target64); data_lir = NEXT_LIR(data_lir); @@ -1243,8 +1243,8 @@ void Mir2Lir::LoadClassType(const DexFile& dex_file, uint32_t type_idx, LIR* data_target = ScanLiteralPoolClass(class_literal_list_, dex_file, type_idx); if (data_target == nullptr) { data_target = AddWordData(&class_literal_list_, type_idx); + data_target->operands[1] = WrapPointer(const_cast<DexFile*>(&dex_file)); } - data_target->operands[1] = WrapPointer(const_cast<DexFile*>(&dex_file)); // Loads a Class pointer, which is a reference as it lives in the heap. LIR* load_pc_rel = OpPcRelLoad(TargetReg(symbolic_reg, kRef), data_target); AppendLIR(load_pc_rel); |