diff options
author | 2019-05-30 22:45:40 +0100 | |
---|---|---|
committer | 2019-06-30 18:04:44 +0000 | |
commit | 0d4567f26701abae84b02389c379843c1dc851a8 (patch) | |
tree | f665e6d5db5af79a4afa3b97cd7cdb7a2069da3f /compiler/optimizing/stack_map_stream.cc | |
parent | cc08c50948d8b2a93b53a327717c7b2a146ac754 (diff) |
Stack maps: Refactor constructors.
Create dedicated static methods instead of passing flags.
This creates dedicated methods for the purpose and merges
constructor and decoding into single optimized method.
This speeds up CodeInfo by 10%, and maps startup by 0.1%.
Test: ./art/test.py -b --host
Change-Id: Ic7d43e22bca0be9fb13bc2c7544ebfdf46798cfe
Diffstat (limited to 'compiler/optimizing/stack_map_stream.cc')
-rw-r--r-- | compiler/optimizing/stack_map_stream.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/optimizing/stack_map_stream.cc b/compiler/optimizing/stack_map_stream.cc index 87e15baa31..afb6071cd1 100644 --- a/compiler/optimizing/stack_map_stream.cc +++ b/compiler/optimizing/stack_map_stream.cc @@ -322,8 +322,9 @@ ScopedArenaVector<uint8_t> StackMapStream::Encode() { }); // Verify that we can load the CodeInfo and check some essentials. - CodeInfo code_info(buffer.data()); - CHECK_EQ(code_info.Size(), buffer.size()); + size_t number_of_read_bits; + CodeInfo code_info(buffer.data(), &number_of_read_bits); + CHECK_EQ(number_of_read_bits, out.NumberOfWrittenBits()); CHECK_EQ(code_info.GetNumberOfStackMaps(), stack_maps_.size()); // Verify all written data (usually only in debug builds). |