Reviewers: ulan,

Description:
Fix debuggersupport=off build.

[email protected]
BUG=

Please review this at https://codereview.chromium.org/18512002/

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

Affected files:
  M src/compiler.cc
  M src/objects.cc


Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index f643b9dcec30990f77cd48ac7923ad211600b00e..d14e6b0823a0a641a76ea66ea3a9d198ef6114dd 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1058,7 +1058,7 @@ void Compiler::InstallOptimizedCode(OptimizingCompiler* optimizing_compiler) {
   } else if (status != OptimizingCompiler::SUCCEEDED) {
     info->set_bailout_reason("failed/bailed out last time");
     status = optimizing_compiler->AbortOptimization();
-  } else if (isolate->debugger()->IsDebuggerActive()) {
+  } else if (isolate->IsDebuggerActive()) {
     info->set_bailout_reason("debugger is active");
     status = optimizing_compiler->AbortOptimization();
   } else {
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index d1a617e14dd5fe11e5441d1c5398a19b0ac80f1e..0bc90bdb836bd12078f3ca55637a0c78933aefcf 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -9139,8 +9139,17 @@ void JSFunction::JSFunctionIterateBody(int object_size, ObjectVisitor* v) {
 }


+#ifdef ENABLE_DEBUGGER_SUPPORT
+#define ASSERT_UNLESS_DEBUG_BREAKPOINTS(assert) \
+  ASSERT((assert) || GetIsolate()->debug()->has_break_points());
+#else
+#define ASSERT_UNLESS_DEBUG_BREAKPOINTS(assert) \
+  ASSERT((assert));
+#endif  // ENABLE_DEBUGGER_SUPPORT
+
+
 void JSFunction::MarkForLazyRecompilation() {
-  ASSERT(is_compiled() || GetIsolate()->debugger()->IsDebuggerActive());
+  ASSERT_UNLESS_DEBUG_BREAKPOINTS(is_compiled());
   ASSERT(!IsOptimized());
   ASSERT(shared()->allows_lazy_compilation() ||
          code()->optimizable());
@@ -9151,7 +9160,7 @@ void JSFunction::MarkForLazyRecompilation() {


 void JSFunction::MarkForParallelRecompilation() {
-  ASSERT(is_compiled() || GetIsolate()->debugger()->IsDebuggerActive());
+  ASSERT_UNLESS_DEBUG_BREAKPOINTS(is_compiled());
   ASSERT(!IsOptimized());
   ASSERT(shared()->allows_lazy_compilation() || code()->optimizable());
   if (!FLAG_parallel_recompilation) {
@@ -9170,7 +9179,7 @@ void JSFunction::MarkForParallelRecompilation() {


 void JSFunction::MarkForInstallingRecompiledCode() {
-  ASSERT(is_compiled() || GetIsolate()->debugger()->IsDebuggerActive());
+  ASSERT_UNLESS_DEBUG_BREAKPOINTS(IsInRecompileQueue());
   ASSERT(!IsOptimized());
   ASSERT(shared()->allows_lazy_compilation() || code()->optimizable());
   ASSERT(FLAG_parallel_recompilation);
@@ -9181,7 +9190,7 @@ void JSFunction::MarkForInstallingRecompiledCode() {


 void JSFunction::MarkInRecompileQueue() {
-  ASSERT(is_compiled() || GetIsolate()->debugger()->IsDebuggerActive());
+  ASSERT_UNLESS_DEBUG_BREAKPOINTS(IsMarkedForParallelRecompilation());
   ASSERT(!IsOptimized());
   ASSERT(shared()->allows_lazy_compilation() || code()->optimizable());
   ASSERT(FLAG_parallel_recompilation);
@@ -9196,6 +9205,9 @@ void JSFunction::MarkInRecompileQueue() {
 }


+#undef ASSERT_UNLESS_DEBUG_BREAKPOINTS
+
+
 static bool CompileLazyHelper(CompilationInfo* info,
                               ClearExceptionFlag flag) {
   // Compile the source information to a code object.


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to