Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2014 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #ifndef ART_COMPILER_OPTIMIZING_STACK_MAP_STREAM_H_ |
| 18 | #define ART_COMPILER_OPTIMIZING_STACK_MAP_STREAM_H_ |
| 19 | |
Calin Juravle | 6ae7096 | 2015-03-18 16:31:28 +0000 | [diff] [blame] | 20 | #include "base/arena_containers.h" |
| 21 | #include "base/bit_vector-inl.h" |
Andreas Gampe | 2a5c468 | 2015-08-14 08:22:54 -0700 | [diff] [blame] | 22 | #include "base/hash_map.h" |
Ian Rogers | 0279ebb | 2014-10-08 17:27:48 -0700 | [diff] [blame] | 23 | #include "base/value_object.h" |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 24 | #include "memory_region.h" |
Mathieu Chartier | cbcedbf | 2017-03-12 22:24:50 -0700 | [diff] [blame] | 25 | #include "method_info.h" |
Nicolas Geoffray | fead4e4 | 2015-03-13 14:39:40 +0000 | [diff] [blame] | 26 | #include "nodes.h" |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 27 | #include "stack_map.h" |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 28 | |
| 29 | namespace art { |
| 30 | |
Roland Levillain | a552e1c | 2015-03-26 15:01:03 +0000 | [diff] [blame] | 31 | // Helper to build art::StackMapStream::LocationCatalogEntriesIndices. |
| 32 | class LocationCatalogEntriesIndicesEmptyFn { |
| 33 | public: |
| 34 | void MakeEmpty(std::pair<DexRegisterLocation, size_t>& item) const { |
| 35 | item.first = DexRegisterLocation::None(); |
| 36 | } |
| 37 | bool IsEmpty(const std::pair<DexRegisterLocation, size_t>& item) const { |
| 38 | return item.first == DexRegisterLocation::None(); |
| 39 | } |
| 40 | }; |
| 41 | |
| 42 | // Hash function for art::StackMapStream::LocationCatalogEntriesIndices. |
| 43 | // This hash function does not create collisions. |
| 44 | class DexRegisterLocationHashFn { |
| 45 | public: |
| 46 | size_t operator()(DexRegisterLocation key) const { |
| 47 | // Concatenate `key`s fields to create a 64-bit value to be hashed. |
| 48 | int64_t kind_and_value = |
| 49 | (static_cast<int64_t>(key.kind_) << 32) | static_cast<int64_t>(key.value_); |
| 50 | return inner_hash_fn_(kind_and_value); |
| 51 | } |
| 52 | private: |
| 53 | std::hash<int64_t> inner_hash_fn_; |
| 54 | }; |
| 55 | |
| 56 | |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 57 | /** |
Nicolas Geoffray | 3946844 | 2014-09-02 15:17:15 +0100 | [diff] [blame] | 58 | * Collects and builds stack maps for a method. All the stack maps |
| 59 | * for a method are placed in a CodeInfo object. |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 60 | */ |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 61 | class StackMapStream : public ValueObject { |
| 62 | public: |
Mathieu Chartier | a2f526f | 2017-01-19 14:48:48 -0800 | [diff] [blame] | 63 | explicit StackMapStream(ArenaAllocator* allocator, |
| 64 | InstructionSet instruction_set) |
Nicolas Geoffray | fead4e4 | 2015-03-13 14:39:40 +0000 | [diff] [blame] | 65 | : allocator_(allocator), |
Mathieu Chartier | a2f526f | 2017-01-19 14:48:48 -0800 | [diff] [blame] | 66 | instruction_set_(instruction_set), |
Vladimir Marko | 225b646 | 2015-09-28 12:17:40 +0100 | [diff] [blame] | 67 | stack_maps_(allocator->Adapter(kArenaAllocStackMapStream)), |
| 68 | location_catalog_entries_(allocator->Adapter(kArenaAllocStackMapStream)), |
Vladimir Marko | 1f49764 | 2015-10-05 20:34:42 +0100 | [diff] [blame] | 69 | location_catalog_entries_indices_(allocator->Adapter(kArenaAllocStackMapStream)), |
Vladimir Marko | 225b646 | 2015-09-28 12:17:40 +0100 | [diff] [blame] | 70 | dex_register_locations_(allocator->Adapter(kArenaAllocStackMapStream)), |
| 71 | inline_infos_(allocator->Adapter(kArenaAllocStackMapStream)), |
David Srbecky | 45aa598 | 2016-03-18 02:15:09 +0000 | [diff] [blame] | 72 | stack_masks_(allocator->Adapter(kArenaAllocStackMapStream)), |
Mathieu Chartier | 1a20b68 | 2017-01-31 14:25:16 -0800 | [diff] [blame] | 73 | register_masks_(allocator->Adapter(kArenaAllocStackMapStream)), |
Mathieu Chartier | cbcedbf | 2017-03-12 22:24:50 -0700 | [diff] [blame] | 74 | method_indices_(allocator->Adapter(kArenaAllocStackMapStream)), |
Mathieu Chartier | 3228908 | 2017-02-09 15:57:37 -0800 | [diff] [blame] | 75 | dex_register_entries_(allocator->Adapter(kArenaAllocStackMapStream)), |
Andreas Gampe | 8eddd2a | 2014-07-28 14:53:22 -0700 | [diff] [blame] | 76 | stack_mask_max_(-1), |
Nicolas Geoffray | 004c230 | 2015-03-20 10:06:38 +0000 | [diff] [blame] | 77 | dex_pc_max_(0), |
Nicolas Geoffray | 896f8f7 | 2015-03-30 15:44:25 +0100 | [diff] [blame] | 78 | register_mask_max_(0), |
Calin Juravle | 6ae7096 | 2015-03-18 16:31:28 +0000 | [diff] [blame] | 79 | number_of_stack_maps_with_inline_info_(0), |
Vladimir Marko | 225b646 | 2015-09-28 12:17:40 +0100 | [diff] [blame] | 80 | dex_map_hash_to_stack_map_indices_(std::less<uint32_t>(), |
| 81 | allocator->Adapter(kArenaAllocStackMapStream)), |
Calin Juravle | 4f46ac5 | 2015-04-23 18:47:21 +0100 | [diff] [blame] | 82 | current_entry_(), |
Nicolas Geoffray | b1d0f3f | 2015-05-14 12:41:51 +0100 | [diff] [blame] | 83 | current_inline_info_(), |
David Srbecky | 09ed098 | 2016-02-12 21:58:43 +0000 | [diff] [blame] | 84 | code_info_encoding_(allocator->Adapter(kArenaAllocStackMapStream)), |
Nicolas Geoffray | b1d0f3f | 2015-05-14 12:41:51 +0100 | [diff] [blame] | 85 | needed_size_(0), |
| 86 | current_dex_register_(0), |
Vladimir Marko | 225b646 | 2015-09-28 12:17:40 +0100 | [diff] [blame] | 87 | in_inline_frame_(false) { |
| 88 | stack_maps_.reserve(10); |
| 89 | location_catalog_entries_.reserve(4); |
| 90 | dex_register_locations_.reserve(10 * 4); |
| 91 | inline_infos_.reserve(2); |
David Srbecky | 09ed098 | 2016-02-12 21:58:43 +0000 | [diff] [blame] | 92 | code_info_encoding_.reserve(16); |
Vladimir Marko | 225b646 | 2015-09-28 12:17:40 +0100 | [diff] [blame] | 93 | } |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 94 | |
Mathieu Chartier | 3228908 | 2017-02-09 15:57:37 -0800 | [diff] [blame] | 95 | // A dex register map entry for a single stack map entry, contains what registers are live as |
| 96 | // well as indices into the location catalog. |
| 97 | class DexRegisterMapEntry { |
| 98 | public: |
| 99 | static const size_t kOffsetUnassigned = -1; |
| 100 | |
| 101 | BitVector* live_dex_registers_mask; |
| 102 | uint32_t num_dex_registers; |
| 103 | size_t locations_start_index; |
| 104 | // Computed fields |
| 105 | size_t hash = 0; |
| 106 | size_t offset = kOffsetUnassigned; |
| 107 | |
| 108 | size_t ComputeSize(size_t catalog_size) const; |
| 109 | }; |
| 110 | |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 111 | // See runtime/stack_map.h to know what these fields contain. |
| 112 | struct StackMapEntry { |
| 113 | uint32_t dex_pc; |
Mathieu Chartier | a2f526f | 2017-01-19 14:48:48 -0800 | [diff] [blame] | 114 | CodeOffset native_pc_code_offset; |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 115 | uint32_t register_mask; |
| 116 | BitVector* sp_mask; |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 117 | uint8_t inlining_depth; |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 118 | size_t inline_infos_start_index; |
David Srbecky | 45aa598 | 2016-03-18 02:15:09 +0000 | [diff] [blame] | 119 | uint32_t stack_mask_index; |
Mathieu Chartier | 1a20b68 | 2017-01-31 14:25:16 -0800 | [diff] [blame] | 120 | uint32_t register_mask_index; |
Mathieu Chartier | 3228908 | 2017-02-09 15:57:37 -0800 | [diff] [blame] | 121 | DexRegisterMapEntry dex_register_entry; |
| 122 | size_t dex_register_map_index; |
Mathieu Chartier | d776ff0 | 2017-01-17 09:32:18 -0800 | [diff] [blame] | 123 | InvokeType invoke_type; |
| 124 | uint32_t dex_method_index; |
Mathieu Chartier | cbcedbf | 2017-03-12 22:24:50 -0700 | [diff] [blame] | 125 | uint32_t dex_method_index_idx; // Index into dex method index table. |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 126 | }; |
| 127 | |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 128 | struct InlineInfoEntry { |
Vladimir Marko | 87f3fcb | 2016-04-28 15:52:11 +0100 | [diff] [blame] | 129 | uint32_t dex_pc; // DexFile::kDexNoIndex for intrinsified native methods. |
Nicolas Geoffray | 5d37c15 | 2017-01-12 13:25:19 +0000 | [diff] [blame] | 130 | ArtMethod* method; |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 131 | uint32_t method_index; |
Mathieu Chartier | 3228908 | 2017-02-09 15:57:37 -0800 | [diff] [blame] | 132 | DexRegisterMapEntry dex_register_entry; |
| 133 | size_t dex_register_map_index; |
Mathieu Chartier | cbcedbf | 2017-03-12 22:24:50 -0700 | [diff] [blame] | 134 | uint32_t dex_method_index_idx; // Index into the dex method index table. |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 135 | }; |
| 136 | |
Calin Juravle | 4f46ac5 | 2015-04-23 18:47:21 +0100 | [diff] [blame] | 137 | void BeginStackMapEntry(uint32_t dex_pc, |
| 138 | uint32_t native_pc_offset, |
| 139 | uint32_t register_mask, |
| 140 | BitVector* sp_mask, |
| 141 | uint32_t num_dex_registers, |
| 142 | uint8_t inlining_depth); |
| 143 | void EndStackMapEntry(); |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 144 | |
Nicolas Geoffray | b1d0f3f | 2015-05-14 12:41:51 +0100 | [diff] [blame] | 145 | void AddDexRegisterEntry(DexRegisterLocation::Kind kind, int32_t value); |
Nicolas Geoffray | 004c230 | 2015-03-20 10:06:38 +0000 | [diff] [blame] | 146 | |
Mathieu Chartier | d776ff0 | 2017-01-17 09:32:18 -0800 | [diff] [blame] | 147 | void AddInvoke(InvokeType type, uint32_t dex_method_index); |
| 148 | |
Nicolas Geoffray | 5d37c15 | 2017-01-12 13:25:19 +0000 | [diff] [blame] | 149 | void BeginInlineInfoEntry(ArtMethod* method, |
Nicolas Geoffray | b1d0f3f | 2015-05-14 12:41:51 +0100 | [diff] [blame] | 150 | uint32_t dex_pc, |
Nicolas Geoffray | 5d37c15 | 2017-01-12 13:25:19 +0000 | [diff] [blame] | 151 | uint32_t num_dex_registers, |
| 152 | const DexFile* outer_dex_file = nullptr); |
Nicolas Geoffray | b1d0f3f | 2015-05-14 12:41:51 +0100 | [diff] [blame] | 153 | void EndInlineInfoEntry(); |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 154 | |
Vladimir Marko | bd8c725 | 2015-06-12 10:06:32 +0100 | [diff] [blame] | 155 | size_t GetNumberOfStackMaps() const { |
Vladimir Marko | 225b646 | 2015-09-28 12:17:40 +0100 | [diff] [blame] | 156 | return stack_maps_.size(); |
Vladimir Marko | bd8c725 | 2015-06-12 10:06:32 +0100 | [diff] [blame] | 157 | } |
| 158 | |
| 159 | const StackMapEntry& GetStackMap(size_t i) const { |
Vladimir Marko | 225b646 | 2015-09-28 12:17:40 +0100 | [diff] [blame] | 160 | return stack_maps_[i]; |
Vladimir Marko | bd8c725 | 2015-06-12 10:06:32 +0100 | [diff] [blame] | 161 | } |
| 162 | |
Vladimir Marko | cf93a5c | 2015-06-16 11:33:24 +0000 | [diff] [blame] | 163 | void SetStackMapNativePcOffset(size_t i, uint32_t native_pc_offset) { |
Mathieu Chartier | 3228908 | 2017-02-09 15:57:37 -0800 | [diff] [blame] | 164 | stack_maps_[i].native_pc_code_offset = |
| 165 | CodeOffset::FromOffset(native_pc_offset, instruction_set_); |
Vladimir Marko | cf93a5c | 2015-06-16 11:33:24 +0000 | [diff] [blame] | 166 | } |
| 167 | |
Calin Juravle | 4f46ac5 | 2015-04-23 18:47:21 +0100 | [diff] [blame] | 168 | // Prepares the stream to fill in a memory region. Must be called before FillIn. |
| 169 | // Returns the size (in bytes) needed to store this stream. |
| 170 | size_t PrepareForFillIn(); |
Mathieu Chartier | cbcedbf | 2017-03-12 22:24:50 -0700 | [diff] [blame] | 171 | void FillInCodeInfo(MemoryRegion region); |
| 172 | void FillInMethodInfo(MemoryRegion region); |
| 173 | |
| 174 | size_t ComputeMethodInfoSize() const; |
Nicolas Geoffray | fead4e4 | 2015-03-13 14:39:40 +0000 | [diff] [blame] | 175 | |
Nicolas Geoffray | eeefa12 | 2015-03-13 18:52:59 +0000 | [diff] [blame] | 176 | private: |
Calin Juravle | 4f46ac5 | 2015-04-23 18:47:21 +0100 | [diff] [blame] | 177 | size_t ComputeDexRegisterLocationCatalogSize() const; |
Calin Juravle | 4f46ac5 | 2015-04-23 18:47:21 +0100 | [diff] [blame] | 178 | size_t ComputeDexRegisterMapsSize() const; |
Mathieu Chartier | 575d3e6 | 2017-02-06 11:00:40 -0800 | [diff] [blame] | 179 | void ComputeInlineInfoEncoding(InlineInfoEncoding* encoding, |
| 180 | size_t dex_register_maps_bytes); |
Calin Juravle | 4f46ac5 | 2015-04-23 18:47:21 +0100 | [diff] [blame] | 181 | |
Mathieu Chartier | a2f526f | 2017-01-19 14:48:48 -0800 | [diff] [blame] | 182 | CodeOffset ComputeMaxNativePcCodeOffset() const; |
| 183 | |
David Srbecky | 45aa598 | 2016-03-18 02:15:09 +0000 | [diff] [blame] | 184 | // Returns the number of unique stack masks. |
| 185 | size_t PrepareStackMasks(size_t entry_size_in_bits); |
| 186 | |
Mathieu Chartier | 1a20b68 | 2017-01-31 14:25:16 -0800 | [diff] [blame] | 187 | // Returns the number of unique register masks. |
| 188 | size_t PrepareRegisterMasks(); |
| 189 | |
Mathieu Chartier | cbcedbf | 2017-03-12 22:24:50 -0700 | [diff] [blame] | 190 | // Prepare and deduplicate method indices. |
| 191 | void PrepareMethodIndices(); |
| 192 | |
Mathieu Chartier | 3228908 | 2017-02-09 15:57:37 -0800 | [diff] [blame] | 193 | // Deduplicate entry if possible and return the corresponding index into dex_register_entries_ |
| 194 | // array. If entry is not a duplicate, a new entry is added to dex_register_entries_. |
| 195 | size_t AddDexRegisterMapEntry(const DexRegisterMapEntry& entry); |
| 196 | |
| 197 | // Return true if the two dex register map entries are equal. |
| 198 | bool DexRegisterMapEntryEquals(const DexRegisterMapEntry& a, const DexRegisterMapEntry& b) const; |
| 199 | |
| 200 | // Fill in the corresponding entries of a register map. |
Mathieu Chartier | d776ff0 | 2017-01-17 09:32:18 -0800 | [diff] [blame] | 201 | void ComputeInvokeInfoEncoding(CodeInfoEncoding* encoding); |
| 202 | |
| 203 | // Returns the index of an entry with the same dex register map as the current_entry, |
| 204 | // or kNoSameDexMapFound if no such entry exists. |
| 205 | size_t FindEntryWithTheSameDexMap(); |
| 206 | bool HaveTheSameDexMaps(const StackMapEntry& a, const StackMapEntry& b) const; |
| 207 | |
| 208 | // Fill in the corresponding entries of a register map. |
Nicolas Geoffray | b1d0f3f | 2015-05-14 12:41:51 +0100 | [diff] [blame] | 209 | void FillInDexRegisterMap(DexRegisterMap dex_register_map, |
| 210 | uint32_t num_dex_registers, |
| 211 | const BitVector& live_dex_registers_mask, |
| 212 | uint32_t start_index_in_dex_register_locations) const; |
Calin Juravle | 6ae7096 | 2015-03-18 16:31:28 +0000 | [diff] [blame] | 213 | |
Mathieu Chartier | 3228908 | 2017-02-09 15:57:37 -0800 | [diff] [blame] | 214 | // Returns the offset for the dex register inside of the dex register location region. See FillIn. |
| 215 | // Only copies the dex register map if the offset for the entry is not already assigned. |
| 216 | size_t MaybeCopyDexRegisterMap(DexRegisterMapEntry& entry, |
| 217 | size_t* current_offset, |
| 218 | MemoryRegion dex_register_locations_region); |
David Srbecky | 1bbdfd7 | 2016-02-24 16:39:26 +0000 | [diff] [blame] | 219 | void CheckDexRegisterMap(const CodeInfo& code_info, |
| 220 | const DexRegisterMap& dex_register_map, |
| 221 | size_t num_dex_registers, |
| 222 | BitVector* live_dex_registers_mask, |
| 223 | size_t dex_register_locations_index) const; |
| 224 | void CheckCodeInfo(MemoryRegion region) const; |
| 225 | |
Nicolas Geoffray | fead4e4 | 2015-03-13 14:39:40 +0000 | [diff] [blame] | 226 | ArenaAllocator* allocator_; |
Mathieu Chartier | a2f526f | 2017-01-19 14:48:48 -0800 | [diff] [blame] | 227 | const InstructionSet instruction_set_; |
Vladimir Marko | 225b646 | 2015-09-28 12:17:40 +0100 | [diff] [blame] | 228 | ArenaVector<StackMapEntry> stack_maps_; |
Roland Levillain | a552e1c | 2015-03-26 15:01:03 +0000 | [diff] [blame] | 229 | |
| 230 | // A catalog of unique [location_kind, register_value] pairs (per method). |
Vladimir Marko | 225b646 | 2015-09-28 12:17:40 +0100 | [diff] [blame] | 231 | ArenaVector<DexRegisterLocation> location_catalog_entries_; |
Roland Levillain | a552e1c | 2015-03-26 15:01:03 +0000 | [diff] [blame] | 232 | // Map from Dex register location catalog entries to their indices in the |
| 233 | // location catalog. |
Vladimir Marko | 1f49764 | 2015-10-05 20:34:42 +0100 | [diff] [blame] | 234 | using LocationCatalogEntriesIndices = ArenaHashMap<DexRegisterLocation, |
| 235 | size_t, |
| 236 | LocationCatalogEntriesIndicesEmptyFn, |
| 237 | DexRegisterLocationHashFn>; |
Roland Levillain | a552e1c | 2015-03-26 15:01:03 +0000 | [diff] [blame] | 238 | LocationCatalogEntriesIndices location_catalog_entries_indices_; |
| 239 | |
Calin Juravle | c416d33 | 2015-04-23 16:01:43 +0100 | [diff] [blame] | 240 | // A set of concatenated maps of Dex register locations indices to `location_catalog_entries_`. |
Vladimir Marko | 225b646 | 2015-09-28 12:17:40 +0100 | [diff] [blame] | 241 | ArenaVector<size_t> dex_register_locations_; |
| 242 | ArenaVector<InlineInfoEntry> inline_infos_; |
David Srbecky | 45aa598 | 2016-03-18 02:15:09 +0000 | [diff] [blame] | 243 | ArenaVector<uint8_t> stack_masks_; |
Mathieu Chartier | 1a20b68 | 2017-01-31 14:25:16 -0800 | [diff] [blame] | 244 | ArenaVector<uint32_t> register_masks_; |
Mathieu Chartier | cbcedbf | 2017-03-12 22:24:50 -0700 | [diff] [blame] | 245 | ArenaVector<uint32_t> method_indices_; |
Mathieu Chartier | 3228908 | 2017-02-09 15:57:37 -0800 | [diff] [blame] | 246 | ArenaVector<DexRegisterMapEntry> dex_register_entries_; |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 247 | int stack_mask_max_; |
Nicolas Geoffray | 004c230 | 2015-03-20 10:06:38 +0000 | [diff] [blame] | 248 | uint32_t dex_pc_max_; |
Nicolas Geoffray | 896f8f7 | 2015-03-30 15:44:25 +0100 | [diff] [blame] | 249 | uint32_t register_mask_max_; |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 250 | size_t number_of_stack_maps_with_inline_info_; |
| 251 | |
Vladimir Marko | 225b646 | 2015-09-28 12:17:40 +0100 | [diff] [blame] | 252 | ArenaSafeMap<uint32_t, ArenaVector<uint32_t>> dex_map_hash_to_stack_map_indices_; |
Calin Juravle | 6ae7096 | 2015-03-18 16:31:28 +0000 | [diff] [blame] | 253 | |
Calin Juravle | 4f46ac5 | 2015-04-23 18:47:21 +0100 | [diff] [blame] | 254 | StackMapEntry current_entry_; |
Nicolas Geoffray | b1d0f3f | 2015-05-14 12:41:51 +0100 | [diff] [blame] | 255 | InlineInfoEntry current_inline_info_; |
David Srbecky | 09ed098 | 2016-02-12 21:58:43 +0000 | [diff] [blame] | 256 | ArenaVector<uint8_t> code_info_encoding_; |
Calin Juravle | 4f46ac5 | 2015-04-23 18:47:21 +0100 | [diff] [blame] | 257 | size_t needed_size_; |
Nicolas Geoffray | b1d0f3f | 2015-05-14 12:41:51 +0100 | [diff] [blame] | 258 | uint32_t current_dex_register_; |
| 259 | bool in_inline_frame_; |
Calin Juravle | 4f46ac5 | 2015-04-23 18:47:21 +0100 | [diff] [blame] | 260 | |
Calin Juravle | 6ae7096 | 2015-03-18 16:31:28 +0000 | [diff] [blame] | 261 | static constexpr uint32_t kNoSameDexMapFound = -1; |
| 262 | |
Nicolas Geoffray | 99ea58c | 2014-07-02 15:08:17 +0100 | [diff] [blame] | 263 | DISALLOW_COPY_AND_ASSIGN(StackMapStream); |
| 264 | }; |
| 265 | |
| 266 | } // namespace art |
| 267 | |
| 268 | #endif // ART_COMPILER_OPTIMIZING_STACK_MAP_STREAM_H_ |