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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 1758653003: Add source position information to profile (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
Index: runtime/vm/flow_graph_compiler.cc
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
index 0c18be77c3c3da8ecc7fd71023b2477c2d9d0a9e..d4647fd5fa26542dc788846bd6f42cff3b17dee9 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -542,7 +542,11 @@ void FlowGraphCompiler::VisitBlocks() {
IntervalStruct(prev_offset, prev_inlining_pos, prev_inlining_id));
prev_offset = assembler()->CodeSize();
prev_inlining_id = instr->inlining_id();
- prev_inlining_pos = inline_id_to_token_pos_[prev_inlining_id];
+ if (prev_inlining_id < inline_id_to_token_pos_.length()) {
srdjan 2016/03/02 19:02:55 Add comment something like: id_to_token_pos is add
Cutch 2016/03/02 19:14:07 Done.
+ prev_inlining_pos = inline_id_to_token_pos_[prev_inlining_id];
+ } else {
+ prev_inlining_pos = TokenPosition::kNoSource;
+ }
if (prev_inlining_id > max_inlining_id) {
max_inlining_id = prev_inlining_id;
}

Powered by Google App Engine
This is Rietveld 408576698