diff options
author | Calin Juravle <calin@google.com> | 2016-04-01 12:28:51 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-04-01 12:28:51 +0000 |
commit | fe2b13717879abae993603534a145372e3110aae (patch) | |
tree | 5b499eb28af5e91e00ff86683f51df029a2b86b4 /runtime/quick_exception_handler.cc | |
parent | 5c26e430fbeaf56e3a5da4e3f167ff35fbb71ef9 (diff) | |
parent | 09ed09866da6d8c7448ef297c148bfa577a247c2 (diff) |
Merge "Pack stack map entries on bit level to save space."
Diffstat (limited to 'runtime/quick_exception_handler.cc')
-rw-r--r-- | runtime/quick_exception_handler.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/runtime/quick_exception_handler.cc b/runtime/quick_exception_handler.cc index 6d1403c7bc..a785ecba3b 100644 --- a/runtime/quick_exception_handler.cc +++ b/runtime/quick_exception_handler.cc @@ -220,7 +220,7 @@ void QuickExceptionHandler::SetCatchEnvironmentForOptimizedHandler(StackVisitor* const size_t number_of_vregs = handler_method_->GetCodeItem()->registers_size_; CodeInfo code_info = handler_method_header_->GetOptimizedCodeInfo(); - StackMapEncoding encoding = code_info.ExtractEncoding(); + CodeInfoEncoding encoding = code_info.ExtractEncoding(); // Find stack map of the catch block. StackMap catch_stack_map = code_info.GetCatchStackMapForDexPc(GetHandlerDexPc(), encoding); @@ -382,11 +382,10 @@ class DeoptimizeStackVisitor FINAL : public StackVisitor { const OatQuickMethodHeader* method_header = GetCurrentOatQuickMethodHeader(); CodeInfo code_info = method_header->GetOptimizedCodeInfo(); uintptr_t native_pc_offset = method_header->NativeQuickPcOffset(GetCurrentQuickFramePc()); - StackMapEncoding encoding = code_info.ExtractEncoding(); + CodeInfoEncoding encoding = code_info.ExtractEncoding(); StackMap stack_map = code_info.GetStackMapForNativePcOffset(native_pc_offset, encoding); const size_t number_of_vregs = m->GetCodeItem()->registers_size_; - MemoryRegion stack_mask = stack_map.GetStackMask(encoding); - uint32_t register_mask = stack_map.GetRegisterMask(encoding); + uint32_t register_mask = stack_map.GetRegisterMask(encoding.stack_map_encoding); DexRegisterMap vreg_map = IsInInlinedFrame() ? code_info.GetDexRegisterMapAtDepth(GetCurrentInliningDepth() - 1, code_info.GetInlineInfoOf(stack_map, encoding), @@ -419,7 +418,8 @@ class DeoptimizeStackVisitor FINAL : public StackVisitor { const uint8_t* addr = reinterpret_cast<const uint8_t*>(GetCurrentQuickFrame()) + offset; value = *reinterpret_cast<const uint32_t*>(addr); uint32_t bit = (offset >> 2); - if (stack_mask.size_in_bits() > bit && stack_mask.LoadBit(bit)) { + if (stack_map.GetNumberOfStackMaskBits(encoding.stack_map_encoding) > bit && + stack_map.GetStackMaskBit(encoding.stack_map_encoding, bit)) { is_reference = true; } break; |