Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1148)

Unified Diff: runtime/vm/code_descriptors.h

Issue 1634863002: Introduce CodeSourceMap object to hold pc -> token position mappings (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/code_descriptors.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()
« no previous file with comments | « no previous file | runtime/vm/code_descriptors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698