Reviewers: iposva,

Description:
Enable printing code generated for builtins in release mode when the
disassembler is enabled.  It's convenient to be able to see them.


Please review this at http://codereview.chromium.org/12904

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
   M     src/codegen.cc
   M     src/flag-definitions.h


Index: src/flag-definitions.h
===================================================================
--- src/flag-definitions.h      (revision 912)
+++ src/flag-definitions.h      (working copy)
@@ -250,7 +250,6 @@
  // codegen-ia32.cc / codegen-arm.cc
  DEFINE_bool(trace_codegen, false,
              "print name of functions for which code is generated")
-DEFINE_bool(print_builtin_code, false, "print generated code for builtins")
  DEFINE_bool(print_source, false, "pretty print source code")
  DEFINE_bool(print_builtin_source, false,
              "pretty print source code for builtins")
@@ -343,6 +342,7 @@

  // codegen-ia32.cc / codegen-arm.cc
  DEFINE_bool(print_code, false, "print generated code")
+DEFINE_bool(print_builtin_code, false, "print generated code for builtins")

  // Cleanup...
  #undef FLAG_FULL
Index: src/codegen.cc
===================================================================
--- src/codegen.cc      (revision 912)
+++ src/codegen.cc      (working copy)
@@ -78,7 +78,9 @@
                                       Handle<Script> script,
                                       bool is_eval) {
  #ifdef ENABLE_DISASSEMBLER
-  bool print_code = FLAG_print_code && !Bootstrapper::IsActive();
+  bool print_code = Bootstrapper::IsActive()
+      ? FLAG_print_builtin_code
+      : FLAG_print_code;
  #endif

  #ifdef DEBUG
@@ -89,7 +91,6 @@
    if (Bootstrapper::IsActive()) {
      print_source = FLAG_print_builtin_source;
      print_ast = FLAG_print_builtin_ast;
-    print_code = FLAG_print_builtin_code;
      ftype = "builtin";
    } else {
      print_source = FLAG_print_source;



--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to