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

Unified Diff: runtime/vm/disassembler.cc

Issue 2670843006: Encode inlining information in CodeSourceMap and remove inlining interval arrays. (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/datastream.h ('k') | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/disassembler.cc
diff --git a/runtime/vm/disassembler.cc b/runtime/vm/disassembler.cc
index b2d20e8698838ab0c7ce464d257ad4455b9f63d8..142f42ee8edd555b65df6c18d70d43625231f77a 100644
--- a/runtime/vm/disassembler.cc
+++ b/runtime/vm/disassembler.cc
@@ -20,6 +20,7 @@ namespace dart {
#ifndef PRODUCT
DECLARE_FLAG(bool, trace_inlining_intervals);
+DEFINE_FLAG(bool, trace_source_positions, false, "Source position diagnostics");
void DisassembleToStdout::ConsumeInstruction(const Code& code,
char* hex_buffer,
@@ -112,7 +113,8 @@ void Disassembler::Disassemble(uword start,
char human_buffer[kUserReadableBufferSize]; // Human-readable instruction.
uword pc = start;
intptr_t comment_finger = 0;
- GrowableArray<Function*> inlined_functions;
+ GrowableArray<const Function*> inlined_functions;
+ GrowableArray<TokenPosition> token_positions;
while (pc < end) {
const intptr_t offset = pc - start;
const intptr_t old_comment_finger = comment_finger;
@@ -127,10 +129,10 @@ void Disassembler::Disassemble(uword start,
char str[4000];
BufferFormatter f(str, sizeof(str));
// Comment emitted, emit inlining information.
- code.GetInlinedFunctionsAt(offset, &inlined_functions);
+ code.GetInlinedFunctionsAt(offset, &inlined_functions, &token_positions);
// Skip top scope function printing (last entry in 'inlined_functions').
bool first = true;
- for (intptr_t i = inlined_functions.length() - 2; i >= 0; i--) {
+ for (intptr_t i = 1; i < inlined_functions.length(); i++) {
const char* name = inlined_functions[i]->ToQualifiedCString();
if (first) {
f.Print(" ;; Inlined [%s", name);
@@ -290,7 +292,10 @@ void Disassembler::DisassembleCodeHelper(const char* function_fullname,
THR_Print("}\n");
}
if (optimized && FLAG_trace_inlining_intervals) {
- code.DumpInlinedIntervals();
+ code.DumpInlineIntervals();
+ }
+ if (FLAG_trace_source_positions) {
+ code.DumpSourcePositions();
}
}
« no previous file with comments | « runtime/vm/datastream.h ('k') | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698