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

Unified Diff: runtime/vm/code_descriptors.cc

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 | « runtime/vm/code_descriptors.h ('k') | runtime/vm/code_descriptors_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_descriptors.cc
diff --git a/runtime/vm/code_descriptors.cc b/runtime/vm/code_descriptors.cc
index b70f6e074998d36a61cf5d01a02b81409f41e897..ac4cb24a38cd22f31507f39f3d3f876deed2ce01 100644
--- a/runtime/vm/code_descriptors.cc
+++ b/runtime/vm/code_descriptors.cc
@@ -41,6 +41,22 @@ RawPcDescriptors* DescriptorList::FinalizePcDescriptors(uword entry_point) {
}
+
+void CodeSourceMapBuilder::AddEntry(intptr_t pc_offset,
+ intptr_t token_pos) {
+ CodeSourceMap::EncodeInteger(&encoded_data_, pc_offset - prev_pc_offset);
+ CodeSourceMap::EncodeInteger(&encoded_data_, token_pos - prev_token_pos);
+
+ prev_pc_offset = pc_offset;
+ prev_token_pos = token_pos;
+}
+
+
+RawCodeSourceMap* CodeSourceMapBuilder::Finalize() {
+ return CodeSourceMap::New(&encoded_data_);
+}
+
+
void StackmapTableBuilder::AddEntry(intptr_t pc_offset,
BitmapBuilder* bitmap,
intptr_t register_bit_count) {
« no previous file with comments | « runtime/vm/code_descriptors.h ('k') | runtime/vm/code_descriptors_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698