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

Unified Diff: runtime/vm/compiler.cc

Issue 10407019: Extend assembler with ability to produce comments for the generated code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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/compiler.cc
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index c4f260bcb1f4fbf07a9ce1b734c9842ba3b7d17b..6c9bfc74884f0fb22ff33861b49d5428ab4cbd65 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -214,6 +214,7 @@ static bool CompileWithNewCompiler(
graph_compiler.FinalizeStackmaps(code);
graph_compiler.FinalizeVarDescriptors(code);
graph_compiler.FinalizeExceptionHandlers(code);
+ graph_compiler.FinalizeComments(code);
if (optimized) {
function.SetCode(code);
CodePatcher::PatchEntry(Code::Handle(function.unoptimized_code()));
@@ -276,6 +277,7 @@ static void CompileWithOldCompiler(
code_gen.FinalizePcDescriptors(code);
code_gen.FinalizeStackmaps(code);
code_gen.FinalizeExceptionHandlers(code);
+ code_gen.FinalizeComments(code);
function.SetCode(code);
CodePatcher::PatchEntry(Code::Handle(function.unoptimized_code()));
}
@@ -302,6 +304,7 @@ static void CompileWithOldCompiler(
code_gen.FinalizeStackmaps(code);
code_gen.FinalizeVarDescriptors(code);
code_gen.FinalizeExceptionHandlers(code);
+ code_gen.FinalizeComments(code);
function.set_unoptimized_code(code);
function.SetCode(code);
ASSERT(CodePatcher::CodeIsPatchable(code));
@@ -372,7 +375,9 @@ static RawError* CompileFunctionHelper(const Function& function,
const Instructions& instructions =
Instructions::Handle(code.instructions());
uword start = instructions.EntryPoint();
- Disassembler::Disassemble(start, start + instructions.size());
+ Disassembler::Disassemble(start,
+ start + instructions.size(),
+ code.comments());
OS::Print("}\n");
OS::Print("Pointer offsets for function: {\n");
for (intptr_t i = 0; i < code.pointer_offsets_length(); i++) {

Powered by Google App Engine
This is Rietveld 408576698