summaryrefslogtreecommitdiff
path: root/compiler/dex/quick/codegen_util.cc
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2014-12-22 18:30:07 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-12-22 18:30:07 +0000
commit5c79aec9d53d1320041d5a52e5115d78d16035b7 (patch)
tree0e36345912571fc0e3e01976f6b698b631706bb7 /compiler/dex/quick/codegen_util.cc
parent508d2665febbb06c853bfab131c4dc7164fffabb (diff)
parente21dc3db191df04c100620965bee4617b3b24397 (diff)
Merge "ART: Swap-space in the compiler"
Diffstat (limited to 'compiler/dex/quick/codegen_util.cc')
-rw-r--r--compiler/dex/quick/codegen_util.cc20
1 files changed, 14 insertions, 6 deletions
diff --git a/compiler/dex/quick/codegen_util.cc b/compiler/dex/quick/codegen_util.cc
index cc61e93d82..67ea8972b7 100644
--- a/compiler/dex/quick/codegen_util.cc
+++ b/compiler/dex/quick/codegen_util.cc
@@ -1086,12 +1086,20 @@ CompiledMethod* Mir2Lir::GetCompiledMethod() {
});
std::unique_ptr<std::vector<uint8_t>> cfi_info(ReturnFrameDescriptionEntry());
- CompiledMethod* result =
- new CompiledMethod(cu_->compiler_driver, cu_->instruction_set, code_buffer_, frame_size_,
- core_spill_mask_, fp_spill_mask_, &src_mapping_table_, encoded_mapping_table_,
- vmap_encoder.GetData(), native_gc_map_, cfi_info.get(),
- ArrayRef<LinkerPatch>(patches_));
- return result;
+ ArrayRef<const uint8_t> cfi_ref;
+ if (cfi_info.get() != nullptr) {
+ cfi_ref = ArrayRef<const uint8_t>(*cfi_info);
+ }
+ return CompiledMethod::SwapAllocCompiledMethod(
+ cu_->compiler_driver, cu_->instruction_set,
+ ArrayRef<const uint8_t>(code_buffer_),
+ frame_size_, core_spill_mask_, fp_spill_mask_,
+ &src_mapping_table_,
+ ArrayRef<const uint8_t>(encoded_mapping_table_),
+ ArrayRef<const uint8_t>(vmap_encoder.GetData()),
+ ArrayRef<const uint8_t>(native_gc_map_),
+ cfi_ref,
+ ArrayRef<LinkerPatch>(patches_));
}
size_t Mir2Lir::GetMaxPossibleCompilerTemps() const {