Index: runtime/vm/code_descriptors.h |
diff --git a/runtime/vm/code_descriptors.h b/runtime/vm/code_descriptors.h |
index e24e186c788678cb5a63c292c0d4933966ee7ed1..11e34377ca003d98ad039ef5166f70a18dceb9d2 100644 |
--- a/runtime/vm/code_descriptors.h |
+++ b/runtime/vm/code_descriptors.h |
@@ -42,6 +42,29 @@ class DescriptorList : public ZoneAllocated { |
}; |
+class CodeSourceMapBuilder : public ZoneAllocated { |
+ public: |
+ explicit CodeSourceMapBuilder(intptr_t initial_capacity = 64) |
+ : encoded_data_(initial_capacity), |
+ prev_pc_offset(0), |
+ prev_token_pos(0) {} |
+ |
+ ~CodeSourceMapBuilder() { } |
+ |
+ void AddEntry(intptr_t pc_offset, intptr_t token_pos); |
+ |
+ RawCodeSourceMap* Finalize(); |
+ |
+ private: |
+ GrowableArray<uint8_t> encoded_data_; |
+ |
+ intptr_t prev_pc_offset; |
+ intptr_t prev_token_pos; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(CodeSourceMapBuilder); |
+}; |
+ |
+ |
class StackmapTableBuilder : public ZoneAllocated { |
public: |
StackmapTableBuilder() |