diff options
Diffstat (limited to 'compiler/optimizing/stack_map_stream.h')
-rw-r--r-- | compiler/optimizing/stack_map_stream.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/compiler/optimizing/stack_map_stream.h b/compiler/optimizing/stack_map_stream.h index cd04ff042c..df11709f03 100644 --- a/compiler/optimizing/stack_map_stream.h +++ b/compiler/optimizing/stack_map_stream.h @@ -37,7 +37,8 @@ namespace art { class StackMapStream : public DeletableArenaObject<kArenaAllocStackMapStream> { public: explicit StackMapStream(ScopedArenaAllocator* allocator, InstructionSet instruction_set) - : instruction_set_(instruction_set), + : allocator_(allocator), + instruction_set_(instruction_set), stack_maps_(allocator), inline_infos_(allocator), method_infos_(allocator), @@ -46,7 +47,6 @@ class StackMapStream : public DeletableArenaObject<kArenaAllocStackMapStream> { dex_register_masks_(allocator), dex_register_maps_(allocator), dex_register_catalog_(allocator), - out_(allocator->Adapter(kArenaAllocStackMapStream)), lazy_stack_masks_(allocator->Adapter(kArenaAllocStackMapStream)), current_stack_map_(), current_inline_infos_(allocator->Adapter(kArenaAllocStackMapStream)), @@ -88,16 +88,16 @@ class StackMapStream : public DeletableArenaObject<kArenaAllocStackMapStream> { uint32_t GetStackMapNativePcOffset(size_t i); void SetStackMapNativePcOffset(size_t i, uint32_t native_pc_offset); - // Prepares the stream to fill in a memory region. Must be called before FillIn. - // Returns the size (in bytes) needed to store this stream. - size_t PrepareForFillIn(); - void FillInCodeInfo(MemoryRegion region); + // Encode all stack map data. + // The returned vector is allocated using the allocator passed to the StackMapStream. + ScopedArenaVector<uint8_t> Encode(); private: static constexpr uint32_t kNoValue = -1; void CreateDexRegisterMap(); + ScopedArenaAllocator* allocator_; const InstructionSet instruction_set_; uint32_t packed_frame_size_ = 0; uint32_t core_spill_mask_ = 0; @@ -111,7 +111,6 @@ class StackMapStream : public DeletableArenaObject<kArenaAllocStackMapStream> { BitmapTableBuilder dex_register_masks_; BitTableBuilder<MaskInfo> dex_register_maps_; BitTableBuilder<DexRegisterInfo> dex_register_catalog_; - ScopedArenaVector<uint8_t> out_; ScopedArenaVector<BitVector*> lazy_stack_masks_; |