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

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') | runtime/vm/compiler.cc » ('J')
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 a286a044cca111565289eee13814bea270ed26ce..c64ba70c90d935b27454ca90f5f0a464da25fa0f 100644
--- a/runtime/vm/code_descriptors.cc
+++ b/runtime/vm/code_descriptors.cc
@@ -46,6 +46,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') | runtime/vm/compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698