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

Unified Diff: runtime/vm/assembler.cc

Issue 188963003: Change --code-comments default to true. Code comments activated only if disassembly is activated. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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/flow_graph_compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler.cc
===================================================================
--- runtime/vm/assembler.cc (revision 33394)
+++ runtime/vm/assembler.cc (working copy)
@@ -13,13 +13,16 @@
namespace dart {
-DEFINE_FLAG(bool, code_comments, false,
+DEFINE_FLAG(bool, code_comments, true,
"Include comments into code and disassembly");
#if defined(TARGET_ARCH_ARM) || defined(TARGET_ARCH_MIPS)
DEFINE_FLAG(bool, use_far_branches, false,
"Enable far branches for ARM and MIPS");
#endif
+DECLARE_FLAG(bool, disassemble);
+DECLARE_FLAG(bool, disassemble_optimized);
+
static uword NewContents(intptr_t capacity) {
Zone* zone = Isolate::Current()->current_zone();
uword result = zone->AllocUnsafe(capacity);
@@ -207,7 +210,7 @@
void Assembler::Comment(const char* format, ...) {
- if (FLAG_code_comments) {
+ if (FLAG_code_comments && (FLAG_disassemble || FLAG_disassemble_optimized)) {
char buffer[1024];
va_list args;
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698