Reviewers: Yang,
Message:
PTAL.
Description:
Always reset allowed OSR nesting level when reverting interrupt code
patches.
Also, --trap-on-deopt should only affect optimized functions, not hydrogen
stubs.
Please review this at https://codereview.chromium.org/16848020/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/arm/lithium-codegen-arm.cc
M src/deoptimizer.cc
M src/ia32/lithium-codegen-ia32.cc
M src/mips/lithium-codegen-mips.cc
M src/runtime.cc
M src/x64/lithium-codegen-x64.cc
Index: src/arm/lithium-codegen-arm.cc
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
index
ef860e0d8774771c00378fc6b7bc8129726d49d6..b7c733cb259a0c589cb94a19a608570c99fdd598
100644
--- a/src/arm/lithium-codegen-arm.cc
+++ b/src/arm/lithium-codegen-arm.cc
@@ -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);
}
Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index
14c1d730d01d6f7b5f8e27b314ec463a9d210443..be0ea98b52e5a554c40445bc85c4ae35fc743aa6
100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.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(
Index: src/ia32/lithium-codegen-ia32.cc
diff --git a/src/ia32/lithium-codegen-ia32.cc
b/src/ia32/lithium-codegen-ia32.cc
index
ec87a9c72ed88b442efa294297e25d551426a076..2240d1072445d7a7d71ef1c27274691be8adacfc
100644
--- a/src/ia32/lithium-codegen-ia32.cc
+++ b/src/ia32/lithium-codegen-ia32.cc
@@ -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);
Index: src/mips/lithium-codegen-mips.cc
diff --git a/src/mips/lithium-codegen-mips.cc
b/src/mips/lithium-codegen-mips.cc
index
12f4d1a9e3bf0fb72238ae2c7e6ddd6a396f6497..9649eb99efdbe43724bc266df6cb7f8f7fdf6d40
100644
--- a/src/mips/lithium-codegen-mips.cc
+++ b/src/mips/lithium-codegen-mips.cc
@@ -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);
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index
0c744caee4a62a2af91a2defd368886be4a9c415..0b7a7ca3bb9414a4e08c4225bed9192ac85ee561
100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -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.
Index: src/x64/lithium-codegen-x64.cc
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
index
1dd27ac9bd7c7cdde01f51f4ac63778fcd9c187e..51ce4fac1d22b566f85630650cd05d40808d83ee
100644
--- a/src/x64/lithium-codegen-x64.cc
+++ b/src/x64/lithium-codegen-x64.cc
@@ -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);
--
--
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.