Index: runtime/vm/assembler.cc |
diff --git a/runtime/vm/assembler.cc b/runtime/vm/assembler.cc |
index 65e56276cd11ae4fb71cdb65e75c3ce3a2908ec7..f259071c1d824dc7e0523ec3e769ac6dfac2ea78 100644 |
--- a/runtime/vm/assembler.cc |
+++ b/runtime/vm/assembler.cc |
@@ -210,7 +210,7 @@ void Assembler::Unreachable(const char* message) { |
void Assembler::Comment(const char* format, ...) { |
- if (FLAG_code_comments || FLAG_disassemble || FLAG_disassemble_optimized) { |
+ if (EmittingComments()) { |
char buffer[1024]; |
va_list args; |
@@ -225,6 +225,11 @@ void Assembler::Comment(const char* format, ...) { |
} |
+bool Assembler::EmittingComments() { |
+ return FLAG_code_comments || FLAG_disassemble || FLAG_disassemble_optimized; |
+} |
+ |
+ |
const Code::Comments& Assembler::GetCodeComments() const { |
Code::Comments& comments = Code::Comments::New(comments_.length()); |