summaryrefslogtreecommitdiff
path: root/compiler/optimizing/stack_map_stream.cc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/optimizing/stack_map_stream.cc')
-rw-r--r--compiler/optimizing/stack_map_stream.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/optimizing/stack_map_stream.cc b/compiler/optimizing/stack_map_stream.cc
index c0e3206703..e87f3c80ad 100644
--- a/compiler/optimizing/stack_map_stream.cc
+++ b/compiler/optimizing/stack_map_stream.cc
@@ -57,7 +57,7 @@ void StackMapStream::BeginMethod(size_t frame_size_in_bytes,
void StackMapStream::EndMethod(size_t code_size) {
DCHECK(in_method_) << "Mismatched Begin/End calls";
in_method_ = false;
- code_size_ = code_size;
+ packed_code_size_ = StackMap::PackNativePc(code_size, instruction_set_);
// Read the stack masks now. The compiler might have updated them.
for (size_t i = 0; i < lazy_stack_masks_.size(); i++) {
@@ -68,9 +68,8 @@ void StackMapStream::EndMethod(size_t code_size) {
}
}
- uint32_t packed_code_size = StackMap::PackNativePc(code_size, instruction_set_);
for (size_t i = 0; i < stack_maps_.size(); i++) {
- DCHECK_LE(stack_maps_[i][StackMap::kPackedNativePc], packed_code_size);
+ DCHECK_LE(stack_maps_[i][StackMap::kPackedNativePc], packed_code_size_);
}
}
@@ -302,7 +301,7 @@ ScopedArenaVector<uint8_t> StackMapStream::Encode() {
ScopedArenaVector<uint8_t> buffer(allocator_->Adapter(kArenaAllocStackMapStream));
BitMemoryWriter<ScopedArenaVector<uint8_t>> out(&buffer);
- out.WriteVarint(code_size_);
+ out.WriteVarint(packed_code_size_);
out.WriteVarint(packed_frame_size_);
out.WriteVarint(core_spill_mask_);
out.WriteVarint(fp_spill_mask_);