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

Unified Diff: runtime/vm/disassembler.h

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: address Srdjan comments 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/disassembler.h
diff --git a/runtime/vm/disassembler.h b/runtime/vm/disassembler.h
index 3c67ac3bd63eedfd1c15b2c87e235937d6ccc2bd..87332ee7f1a54dbe25753ec8a4b82013611a849d 100644
--- a/runtime/vm/disassembler.h
+++ b/runtime/vm/disassembler.h
@@ -62,7 +62,22 @@ class Disassembler : public AllStatic {
// (The assumption is that start is at a valid instruction).
static void Disassemble(uword start,
uword end,
- DisassemblyFormatter* formatter);
+ DisassemblyFormatter* formatter,
+ const Code::Comments& comments);
+
+ static void Disassemble(uword start,
+ uword end,
+ DisassemblyFormatter* formatter) {
+ Disassemble(start, end, formatter, Code::Comments::New(0));
+ }
+
+ static void Disassemble(uword start,
+ uword end,
+ const Code::Comments& comments) {
+ DisassembleToStdout stdout_formatter;
+ Disassemble(start, end, &stdout_formatter, comments);
+ }
+
static void Disassemble(uword start, uword end) {
DisassembleToStdout stdout_formatter;
Disassemble(start, end, &stdout_formatter);
@@ -75,6 +90,7 @@ class Disassembler : public AllStatic {
uword end = instructions.end();
Disassemble(start, end, formatter);
}
+
static void DisassembleMemoryRegion(const MemoryRegion& instructions) {
uword start = instructions.start();
uword end = instructions.end();

Powered by Google App Engine
This is Rietveld 408576698