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

Unified Diff: runtime/vm/code_descriptors.cc

Issue 2687143005: Include metadata in AOT to expand inline frames in stack traces and provide line numbers. (Closed)
Patch Set: . Created 3 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 | « runtime/vm/code_descriptors.h ('k') | runtime/vm/flow_graph_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 7bccb7d2e3efc36dafaa4e52cc84c0c2fd4bf578..1eb2092a34609fc291a3ab2547e7c339caa4b343 100644
--- a/runtime/vm/code_descriptors.cc
+++ b/runtime/vm/code_descriptors.cc
@@ -315,6 +315,24 @@ RawCodeSourceMap* CodeSourceMapBuilder::Finalize() {
}
+void CodeSourceMapBuilder::WriteChangePosition(TokenPosition pos) {
+ stream_.Write<uint8_t>(kChangePosition);
+ if (FLAG_precompiled_mode) {
+ intptr_t line = -1;
+ intptr_t inline_id = buffered_inline_id_stack_.Last();
+ if (inline_id < inline_id_to_function_.length()) {
+ const Function* function = inline_id_to_function_[inline_id];
+ Script& script = Script::Handle(function->script());
+ line = script.GetTokenLineUsingLineStarts(pos);
+ }
+ stream_.Write<int32_t>(static_cast<int32_t>(line));
+ } else {
+ stream_.Write<int32_t>(static_cast<int32_t>(pos.value()));
+ }
+ written_token_pos_stack_.Last() = pos;
+}
+
+
void CodeSourceMapReader::GetInlinedFunctionsAt(
int32_t pc_offset,
GrowableArray<const Function*>* function_stack,
« no previous file with comments | « runtime/vm/code_descriptors.h ('k') | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698