Commit a2d15ce5 authored by yangguo@chromium.org's avatar yangguo@chromium.org

Compile optimized code with active debugger but no break points.

R=ulan@chromium.org
BUG=386492
LOG=Y

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22029 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 8ff53a8d
......@@ -151,7 +151,7 @@ Handle<Code> CodeGenerator::MakeCodeEpilogue(MacroAssembler* masm,
isolate->factory()->NewCode(desc, flags, masm->CodeObject(),
false, is_crankshafted,
info->prologue_offset(),
info->is_debug());
info->is_debug() && !is_crankshafted);
isolate->counters()->total_compiled_code_size()->Increment(
code->instruction_size());
isolate->heap()->IncrementCodeGeneratedBytes(is_crankshafted,
......
......@@ -306,8 +306,10 @@ OptimizedCompileJob::Status OptimizedCompileJob::CreateGraph() {
// generated code for this from the shared function object.
if (FLAG_always_full_compiler) return AbortOptimization();
// Do not use crankshaft if compiling for debugging.
if (info()->is_debug()) return AbortOptimization(kDebuggerIsActive);
// Do not use crankshaft if we need to be able to set break points.
if (isolate()->DebuggerHasBreakPoints()) {
return AbortOptimization(kDebuggerHasBreakPoints);
}
// Limit the number of times we re-compile a functions with
// the optimizing compiler.
......
......@@ -1043,7 +1043,7 @@ template <class C> inline bool Is(Object* obj);
V(kCopyBuffersOverlap, "Copy buffers overlap") \
V(kCouldNotGenerateZero, "Could not generate +0.0") \
V(kCouldNotGenerateNegativeZero, "Could not generate -0.0") \
V(kDebuggerIsActive, "Debugger is active") \
V(kDebuggerHasBreakPoints, "Debugger has break points") \
V(kDebuggerStatement, "DebuggerStatement") \
V(kDeclarationInCatchContext, "Declaration in catch context") \
V(kDeclarationInWithContext, "Declaration in with context") \
......
// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --expose-debug-as debug --allow-natives-syntax --crankshaft
Debug = debug.Debug;
Debug.setListener(function() {});
function f() {}
f();
f();
%OptimizeFunctionOnNextCall(f);
f();
assertOptimized(f);
Debug.setListener(null);
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