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

Unified Diff: runtime/vm/disassembler.cc

Issue 913603002: Add Log::VPrint and remove duplicated code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 | « no previous file | runtime/vm/log.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 fbc102b50f95480e64c9868cb72fdad05a9c6e1d..b74dc7363348df71f5b0cbf57f3ef114423927dd 100644
--- a/runtime/vm/disassembler.cc
+++ b/runtime/vm/disassembler.cc
@@ -33,18 +33,9 @@ void DisassembleToStdout::ConsumeInstruction(char* hex_buffer,
void DisassembleToStdout::Print(const char* format, ...) {
va_list args;
-
va_start(args, format);
- intptr_t len = OS::VSNPrint(NULL, 0, format, args);
+ ISL_VPrint(format, args);
va_end(args);
-
- char* p = reinterpret_cast<char*>(malloc(len + 1));
- va_start(args, format);
- OS::VSNPrint(p, (len + 1), format, args);
- va_end(args);
-
- ISL_Print("%s", p);
- free(p);
}
« no previous file with comments | « no previous file | runtime/vm/log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698