Always reset allowed OSR nesting level when reverting interrupt code patches.
Also, --trap-on-deopt should only affect optimized functions, not hydrogen stubs. R=yangguo@chromium.org Review URL: https://codereview.chromium.org/16848020 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15204 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
3ca50a576a
commit
7821715dc1
@ -825,7 +825,7 @@ void LCodeGen::DeoptimizeIf(Condition cc,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FLAG_trap_on_deopt) {
|
if (FLAG_trap_on_deopt && info()->IsOptimizing()) {
|
||||||
__ stop("trap_on_deopt", cc);
|
__ stop("trap_on_deopt", cc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2429,6 +2429,7 @@ void Deoptimizer::RevertInterruptCode(Code* unoptimized_code,
|
|||||||
back_edge_cursor += FullCodeGenerator::kBackEdgeEntrySize;
|
back_edge_cursor += FullCodeGenerator::kBackEdgeEntrySize;
|
||||||
}
|
}
|
||||||
unoptimized_code->set_back_edges_patched_for_osr(false);
|
unoptimized_code->set_back_edges_patched_for_osr(false);
|
||||||
|
unoptimized_code->set_allow_osr_at_loop_nesting_level(0);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
// Assert that none of the back edges are patched anymore.
|
// Assert that none of the back edges are patched anymore.
|
||||||
Deoptimizer::VerifyInterruptCode(
|
Deoptimizer::VerifyInterruptCode(
|
||||||
|
@ -901,7 +901,7 @@ void LCodeGen::DeoptimizeIf(Condition cc,
|
|||||||
__ popfd();
|
__ popfd();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FLAG_trap_on_deopt) {
|
if (FLAG_trap_on_deopt && info()->IsOptimizing()) {
|
||||||
Label done;
|
Label done;
|
||||||
if (cc != no_condition) {
|
if (cc != no_condition) {
|
||||||
__ j(NegateCondition(cc), &done, Label::kNear);
|
__ j(NegateCondition(cc), &done, Label::kNear);
|
||||||
|
@ -796,7 +796,7 @@ void LCodeGen::DeoptimizeIf(Condition cc,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FLAG_trap_on_deopt) {
|
if (FLAG_trap_on_deopt && info()->IsOptimizing()) {
|
||||||
Label skip;
|
Label skip;
|
||||||
if (cc != al) {
|
if (cc != al) {
|
||||||
__ Branch(&skip, NegateCondition(cc), src1, src2);
|
__ Branch(&skip, NegateCondition(cc), src1, src2);
|
||||||
|
@ -8265,9 +8265,6 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_CompileForOnStackReplacement) {
|
|||||||
*interrupt_code,
|
*interrupt_code,
|
||||||
*replacement_code);
|
*replacement_code);
|
||||||
|
|
||||||
// Allow OSR only at nesting level zero again.
|
|
||||||
unoptimized->set_allow_osr_at_loop_nesting_level(0);
|
|
||||||
|
|
||||||
// If the optimization attempt succeeded, return the AST id tagged as a
|
// If the optimization attempt succeeded, return the AST id tagged as a
|
||||||
// smi. This tells the builtin that we need to translate the unoptimized
|
// smi. This tells the builtin that we need to translate the unoptimized
|
||||||
// frame to an optimized one.
|
// frame to an optimized one.
|
||||||
|
@ -706,7 +706,7 @@ void LCodeGen::DeoptimizeIf(Condition cc,
|
|||||||
|
|
||||||
ASSERT(FLAG_deopt_every_n_times == 0); // Not yet implemented on x64.
|
ASSERT(FLAG_deopt_every_n_times == 0); // Not yet implemented on x64.
|
||||||
|
|
||||||
if (FLAG_trap_on_deopt) {
|
if (FLAG_trap_on_deopt && info()->IsOptimizing()) {
|
||||||
Label done;
|
Label done;
|
||||||
if (cc != no_condition) {
|
if (cc != no_condition) {
|
||||||
__ j(NegateCondition(cc), &done, Label::kNear);
|
__ j(NegateCondition(cc), &done, Label::kNear);
|
||||||
|
Loading…
Reference in New Issue
Block a user