summaryrefslogtreecommitdiff
path: root/compiler/optimizing
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2019-03-05 09:23:37 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2019-03-05 11:36:19 +0000
commitb1b2ca97651b1993e0a00a4543209419afbc6e64 (patch)
tree64e58ebe9d4c77f1adf401bb4d9066c720a0c29c /compiler/optimizing
parent37678283d1be77007e61bb0e811008aa89a27d14 (diff)
Revert "Don't pack code size in CodeInfo."
This reverts commit e35ac04a1a9a22b1c4386b27f3a30cd840aa17b1. Bug: 123510633 Bug: 127305289 Reason for revert: b/127305289 Change-Id: I18c2d9291411b31641333c14c47da8c4fdf317f7
Diffstat (limited to 'compiler/optimizing')
-rw-r--r--compiler/optimizing/stack_map_stream.cc7
-rw-r--r--compiler/optimizing/stack_map_stream.h2
2 files changed, 4 insertions, 5 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_);
diff --git a/compiler/optimizing/stack_map_stream.h b/compiler/optimizing/stack_map_stream.h
index 1fea3ef250..164e9021b2 100644
--- a/compiler/optimizing/stack_map_stream.h
+++ b/compiler/optimizing/stack_map_stream.h
@@ -99,7 +99,7 @@ class StackMapStream : public DeletableArenaObject<kArenaAllocStackMapStream> {
ScopedArenaAllocator* allocator_;
const InstructionSet instruction_set_;
- uint32_t code_size_ = 0;
+ uint32_t packed_code_size_ = 0;
uint32_t packed_frame_size_ = 0;
uint32_t core_spill_mask_ = 0;
uint32_t fp_spill_mask_ = 0;