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

Unified Diff: runtime/vm/code_descriptors.cc

Issue 1740503002: Build CodeSourceMap for each code object (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/compiler.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 e5fa106746c9ca756c77762b250baf89d9617c61..dad76d97e0179cb0b70c971d282fcc663011ce2a 100644
--- a/runtime/vm/code_descriptors.cc
+++ b/runtime/vm/code_descriptors.cc
@@ -44,6 +44,9 @@ RawPcDescriptors* DescriptorList::FinalizePcDescriptors(uword entry_point) {
void CodeSourceMapBuilder::AddEntry(intptr_t pc_offset,
TokenPosition token_pos) {
+ // Require pc offset to monotonically increase.
+ ASSERT((prev_pc_offset < pc_offset) ||
+ ((prev_pc_offset == 0) && (pc_offset == 0)));
CodeSourceMap::EncodeInteger(&encoded_data_, pc_offset - prev_pc_offset);
CodeSourceMap::EncodeInteger(&encoded_data_,
token_pos.value() - prev_token_pos);
« no previous file with comments | « no previous file | runtime/vm/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698