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;
|
||||
}
|
||||
|
||||
if (FLAG_trap_on_deopt) {
|
||||
if (FLAG_trap_on_deopt && info()->IsOptimizing()) {
|
||||
__ stop("trap_on_deopt", cc);
|
||||
}
|
||||
|
||||
|
@ -2429,6 +2429,7 @@ void Deoptimizer::RevertInterruptCode(Code* unoptimized_code,
|
||||
back_edge_cursor += FullCodeGenerator::kBackEdgeEntrySize;
|
||||
}
|
||||
unoptimized_code->set_back_edges_patched_for_osr(false);
|
||||
unoptimized_code->set_allow_osr_at_loop_nesting_level(0);
|
||||
#ifdef DEBUG
|
||||
// Assert that none of the back edges are patched anymore.
|
||||
Deoptimizer::VerifyInterruptCode(
|
||||
|
@ -901,7 +901,7 @@ void LCodeGen::DeoptimizeIf(Condition cc,
|
||||
__ popfd();
|
||||
}
|
||||
|
||||
if (FLAG_trap_on_deopt) {
|
||||
if (FLAG_trap_on_deopt && info()->IsOptimizing()) {
|
||||
Label done;
|
||||
if (cc != no_condition) {
|
||||
__ j(NegateCondition(cc), &done, Label::kNear);
|
||||
|
@ -796,7 +796,7 @@ void LCodeGen::DeoptimizeIf(Condition cc,
|
||||
return;
|
||||
}
|
||||
|
||||
if (FLAG_trap_on_deopt) {
|
||||
if (FLAG_trap_on_deopt && info()->IsOptimizing()) {
|
||||
Label skip;
|
||||
if (cc != al) {
|
||||
__ Branch(&skip, NegateCondition(cc), src1, src2);
|
||||
|
@ -8265,9 +8265,6 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_CompileForOnStackReplacement) {
|
||||
*interrupt_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
|
||||
// smi. This tells the builtin that we need to translate the unoptimized
|
||||
// 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.
|
||||
|
||||
if (FLAG_trap_on_deopt) {
|
||||
if (FLAG_trap_on_deopt && info()->IsOptimizing()) {
|
||||
Label done;
|
||||
if (cc != no_condition) {
|
||||
__ j(NegateCondition(cc), &done, Label::kNear);
|
||||
|
Loading…
Reference in New Issue
Block a user