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

Unified Diff: runtime/vm/code_descriptors.h

Issue 2768153002: When generating CodeSourceMaps, reassign function ids once per function instead of once per inlinin… (Closed)
Patch Set: Created 3 years, 9 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 2dbe90332384c0e595cc99df4a36b05cdc11fed9..2298dc0166cdfb129458d70cfefdcc18cf637bd6 100644
--- a/runtime/vm/code_descriptors.h
+++ b/runtime/vm/code_descriptors.h
@@ -241,6 +241,8 @@ class CodeSourceMapBuilder : public ZoneAllocated {
RawCodeSourceMap* Finalize();
private:
+ intptr_t GetFunctionId(intptr_t inline_id);
+
void BufferChangePosition(TokenPosition pos) {
buffered_token_pos_stack_.Last() = pos;
}
@@ -257,7 +259,7 @@ class CodeSourceMapBuilder : public ZoneAllocated {
}
void WritePush(intptr_t inline_id) {
stream_.Write<uint8_t>(kPushFunction);
- stream_.Write<int32_t>(inline_id);
+ stream_.Write<int32_t>(GetFunctionId(inline_id));
written_inline_id_stack_.Add(inline_id);
written_token_pos_stack_.Add(kInitialPosition);
}
@@ -295,6 +297,8 @@ class CodeSourceMapBuilder : public ZoneAllocated {
const GrowableArray<TokenPosition>& inline_id_to_token_pos_;
const GrowableArray<const Function*>& inline_id_to_function_;
+ const GrowableObjectArray& inlined_functions_;
+
uint8_t* buffer_;
WriteStream stream_;
« 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