summaryrefslogtreecommitdiff
path: root/compiler/optimizing/stack_map_stream.cc
diff options
context:
space:
mode:
author David Srbecky <dsrbecky@google.com> 2018-07-15 23:58:44 +0100
committer David Srbecky <dsrbecky@google.com> 2018-08-01 14:49:40 +0100
commit8cd54547cec8a4537db5682c2da8be22843b1310 (patch)
treefb1158993bab2e027984cedab59b402c051a45a7 /compiler/optimizing/stack_map_stream.cc
parent91f0fdb4372d3f2bcfcd9db67afcbe7ee1901048 (diff)
Move MethodInfo to CodeInfo.
There is no need to treat it specially any more, because of the de-duplication at BitTable level. This saves 0.6% of oat file size. Test: test-art-host-gtest Change-Id: Ife7927d736243879a41d6f325d49ebf6930a63f6
Diffstat (limited to 'compiler/optimizing/stack_map_stream.cc')
-rw-r--r--compiler/optimizing/stack_map_stream.cc26
1 files changed, 2 insertions, 24 deletions
diff --git a/compiler/optimizing/stack_map_stream.cc b/compiler/optimizing/stack_map_stream.cc
index e1b657554f..429054cec7 100644
--- a/compiler/optimizing/stack_map_stream.cc
+++ b/compiler/optimizing/stack_map_stream.cc
@@ -196,7 +196,7 @@ void StackMapStream::BeginInlineInfoEntry(ArtMethod* method,
if (encode_art_method) {
CHECK_EQ(inline_info.GetArtMethod(), method);
} else {
- CHECK_EQ(method_infos_[inline_info.GetMethodInfoIndex()][0], method->GetDexMethodIndex());
+ CHECK_EQ(code_info.GetMethodIndexOf(inline_info), method->GetDexMethodIndex());
}
});
}
@@ -274,24 +274,6 @@ void StackMapStream::CreateDexRegisterMap() {
}
}
-void StackMapStream::FillInMethodInfo(MemoryRegion region) {
- {
- MethodInfo info(region.begin(), method_infos_.size());
- for (size_t i = 0; i < method_infos_.size(); ++i) {
- info.SetMethodIndex(i, method_infos_[i][0]);
- }
- }
- if (kVerifyStackMaps) {
- // Check the data matches.
- MethodInfo info(region.begin());
- const size_t count = info.NumMethodIndices();
- DCHECK_EQ(count, method_infos_.size());
- for (size_t i = 0; i < count; ++i) {
- DCHECK_EQ(info.GetMethodIndex(i), method_infos_[i][0]);
- }
- }
-}
-
template<typename Writer, typename Builder>
ALWAYS_INLINE static void EncodeTable(Writer& out, const Builder& bit_table) {
out.WriteBit(false); // Is not deduped.
@@ -317,6 +299,7 @@ size_t StackMapStream::PrepareForFillIn() {
BitMemoryWriter<ScopedArenaVector<uint8_t>> out(&out_, out_.size() * kBitsPerByte);
EncodeTable(out, stack_maps_);
EncodeTable(out, inline_infos_);
+ EncodeTable(out, method_infos_);
EncodeTable(out, register_masks_);
EncodeTable(out, stack_masks_);
EncodeTable(out, dex_register_masks_);
@@ -347,9 +330,4 @@ void StackMapStream::FillInCodeInfo(MemoryRegion region) {
}
}
-size_t StackMapStream::ComputeMethodInfoSize() const {
- DCHECK_NE(0u, out_.size()) << "PrepareForFillIn not called before " << __FUNCTION__;
- return MethodInfo::ComputeSize(method_infos_.size());
-}
-
} // namespace art