Revision: 9476
Author:   [email protected]
Date:     Thu Sep 29 01:55:36 2011
Log:      Fix build with debuggersupport=off.

BUG=v8:899

Review URL: http://codereview.chromium.org/8073020
http://code.google.com/p/v8/source/detail?r=9476

Modified:
 /branches/bleeding_edge/src/d8-debug.cc
 /branches/bleeding_edge/src/d8.cc
 /branches/bleeding_edge/src/flag-definitions.h
 /branches/bleeding_edge/src/full-codegen.cc

=======================================
--- /branches/bleeding_edge/src/d8-debug.cc     Fri Sep  9 15:39:47 2011
+++ /branches/bleeding_edge/src/d8-debug.cc     Thu Sep 29 01:55:36 2011
@@ -1,4 +1,4 @@
-// Copyright 2008 the V8 project authors. All rights reserved.
+// Copyright 2011 the V8 project authors. All rights reserved.
 // Redistribution and use in source and binary forms, with or without
 // modification, are permitted provided that the following conditions are
 // met:
@@ -25,6 +25,7 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+#ifdef ENABLE_DEBUGGER_SUPPORT

 #include "d8.h"
 #include "d8-debug.h"
@@ -367,3 +368,5 @@


 }  // namespace v8
+
+#endif  // ENABLE_DEBUGGER_SUPPORT
=======================================
--- /branches/bleeding_edge/src/d8.cc   Wed Sep 21 06:42:25 2011
+++ /branches/bleeding_edge/src/d8.cc   Thu Sep 29 01:55:36 2011
@@ -146,11 +146,11 @@
                           Handle<Value> name,
                           bool print_result,
                           bool report_exceptions) {
-#ifndef V8_SHARED
+#if !defined(V8_SHARED) && defined(ENABLE_DEBUGGER_SUPPORT)
   bool FLAG_debugger = i::FLAG_debugger;
 #else
   bool FLAG_debugger = false;
-#endif  // V8_SHARED
+#endif  // !V8_SHARED && ENABLE_DEBUGGER_SUPPORT
   HandleScope handle_scope;
   TryCatch try_catch;
   options.script_executed = true;
@@ -594,6 +594,7 @@
   Context::Scope utility_scope(utility_context_);

 #ifdef ENABLE_DEBUGGER_SUPPORT
+  if (i::FLAG_debugger) printf("JavaScript debugger enabled\n");
   // Install the debugger object in the utility scope
   i::Debug* debug = i::Isolate::Current()->debug();
   debug->Load();
@@ -900,9 +901,6 @@
 #ifndef V8_SHARED
   console = LineEditor::Get();
printf("V8 version %s [console: %s]\n", V8::GetVersion(), console->name());
-  if (i::FLAG_debugger) {
-    printf("JavaScript debugger enabled\n");
-  }
   console->Open();
   while (true) {
     i::SmartArrayPointer<char> input = console->Prompt(Shell::kPrompt);
@@ -1256,13 +1254,13 @@
     if (options.last_run) {
       // Keep using the same context in the interactive shell.
       evaluation_context_ = context;
-#ifndef V8_SHARED
+#if !defined(V8_SHARED) && defined(ENABLE_DEBUGGER_SUPPORT)
       // If the interactive debugger is enabled make sure to activate
       // it before running the files passed on the command line.
       if (i::FLAG_debugger) {
         InstallUtilityScript();
       }
-#endif  // V8_SHARED
+#endif  // !V8_SHARED && ENABLE_DEBUGGER_SUPPORT
     }
     {
       Context::Scope cscope(context);
@@ -1339,11 +1337,11 @@
   if (( options.interactive_shell
       || !options.script_executed )
       && !options.test_shell ) {
-#ifndef V8_SHARED
+#if !defined(V8_SHARED) && defined(ENABLE_DEBUGGER_SUPPORT)
     if (!i::FLAG_debugger) {
       InstallUtilityScript();
     }
-#endif  // V8_SHARED
+#endif  // !V8_SHARED && ENABLE_DEBUGGER_SUPPORT
     RunShell();
   }

=======================================
--- /branches/bleeding_edge/src/flag-definitions.h      Wed Sep 28 04:15:23 2011
+++ /branches/bleeding_edge/src/flag-definitions.h      Thu Sep 29 01:55:36 2011
@@ -360,11 +360,15 @@

DEFINE_bool(help, false, "Print usage message, including flags, on console")
 DEFINE_bool(dump_counters, false, "Dump counters on exit")
+
+#ifdef ENABLE_DEBUGGER_SUPPORT
 DEFINE_bool(debugger, false, "Enable JavaScript debugger")
 DEFINE_bool(remote_debugger, false, "Connect JavaScript debugger to the "
                                     "debugger agent in another process")
 DEFINE_bool(debugger_agent, false, "Enable debugger agent")
 DEFINE_int(debugger_port, 5858, "Port to use for remote debugging")
+#endif  // ENABLE_DEBUGGER_SUPPORT
+
 DEFINE_string(map_counters, "", "Map counters to a file")
 DEFINE_args(js_arguments, JSArguments(),
"Pass all remaining arguments to the script. Alias for \"--\".")
=======================================
--- /branches/bleeding_edge/src/full-codegen.cc Mon Sep 19 07:50:33 2011
+++ /branches/bleeding_edge/src/full-codegen.cc Thu Sep 29 01:55:36 2011
@@ -286,8 +286,10 @@
   code->set_optimizable(info->IsOptimizable());
   cgen.PopulateDeoptimizationData(code);
   code->set_has_deoptimization_support(info->HasDeoptimizationSupport());
+#ifdef ENABLE_DEBUGGER_SUPPORT
   code->set_has_debug_break_slots(
       info->isolate()->debugger()->IsDebuggerActive());
+#endif  // ENABLE_DEBUGGER_SUPPORT
   code->set_allow_osr_at_loop_nesting_level(0);
   code->set_stack_check_table_offset(table_offset);
   CodeGenerator::PrintCode(code, info);

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

Reply via email to