Commit 15c28b80 authored by yangguo@chromium.org's avatar yangguo@chromium.org

Fix debuggersupport=off build.

R=ulan@chromium.org
BUG=v8:2754

Review URL: https://codereview.chromium.org/18500003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15453 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 74d147a2
......@@ -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->DebuggerHasBreakPoints()) {
info->set_bailout_reason("debugger is active");
status = optimizing_compiler->AbortOptimization();
} else {
......
......@@ -31,6 +31,7 @@
#include "debug.h"
#include "execution.h"
#include "factory.h"
#include "isolate-inl.h"
#include "macro-assembler.h"
#include "objects.h"
#include "objects-visiting.h"
......@@ -660,7 +661,8 @@ Handle<JSFunction> Factory::NewFunctionFromSharedFunctionInfo(
result->is_compiled() &&
!function_info->is_toplevel() &&
function_info->allows_lazy_compilation() &&
!function_info->optimization_disabled()) {
!function_info->optimization_disabled() &&
!isolate()->DebuggerHasBreakPoints()) {
result->MarkForLazyRecompilation();
}
return result;
......
......@@ -39,6 +39,7 @@
#include "execution.h"
#include "full-codegen.h"
#include "hydrogen.h"
#include "isolate-inl.h"
#include "objects-inl.h"
#include "objects-visiting.h"
#include "objects-visiting-inl.h"
......@@ -9140,7 +9141,7 @@ void JSFunction::JSFunctionIterateBody(int object_size, ObjectVisitor* v) {
void JSFunction::MarkForLazyRecompilation() {
ASSERT(is_compiled() || GetIsolate()->debugger()->IsDebuggerActive());
ASSERT(is_compiled() || GetIsolate()->DebuggerHasBreakPoints());
ASSERT(!IsOptimized());
ASSERT(shared()->allows_lazy_compilation() ||
code()->optimizable());
......@@ -9151,7 +9152,7 @@ void JSFunction::MarkForLazyRecompilation() {
void JSFunction::MarkForParallelRecompilation() {
ASSERT(is_compiled() || GetIsolate()->debugger()->IsDebuggerActive());
ASSERT(is_compiled() || GetIsolate()->DebuggerHasBreakPoints());
ASSERT(!IsOptimized());
ASSERT(shared()->allows_lazy_compilation() || code()->optimizable());
if (!FLAG_parallel_recompilation) {
......@@ -9170,7 +9171,9 @@ void JSFunction::MarkForParallelRecompilation() {
void JSFunction::MarkForInstallingRecompiledCode() {
ASSERT(is_compiled() || GetIsolate()->debugger()->IsDebuggerActive());
// The debugger could have switched the builtin to lazy compile.
// In that case, simply carry on. It will be dealt with later.
ASSERT(IsInRecompileQueue() || GetIsolate()->DebuggerHasBreakPoints());
ASSERT(!IsOptimized());
ASSERT(shared()->allows_lazy_compilation() || code()->optimizable());
ASSERT(FLAG_parallel_recompilation);
......@@ -9181,8 +9184,10 @@ void JSFunction::MarkForInstallingRecompiledCode() {
void JSFunction::MarkInRecompileQueue() {
ASSERT(is_compiled() || GetIsolate()->debugger()->IsDebuggerActive());
ASSERT(!IsOptimized());
// We can only arrive here via the parallel-recompilation builtin. If
// break points were set, the code would point to the lazy-compile builtin.
ASSERT(!GetIsolate()->DebuggerHasBreakPoints());
ASSERT(IsMarkedForParallelRecompilation() && !IsOptimized());
ASSERT(shared()->allows_lazy_compilation() || code()->optimizable());
ASSERT(FLAG_parallel_recompilation);
if (FLAG_trace_parallel_recompilation) {
......
......@@ -227,6 +227,8 @@ void RuntimeProfiler::AddSample(JSFunction* function, int weight) {
void RuntimeProfiler::OptimizeNow() {
HandleScope scope(isolate_);
if (isolate_->DebuggerHasBreakPoints()) return;
if (FLAG_parallel_recompilation) {
// Take this as opportunity to process the optimizing compiler thread's
// output queue so that it does not unnecessarily keep objects alive.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment