Revision: 9285
Author: [email protected]
Date: Wed Sep 14 09:14:26 2011
Log: Force lazy deoptimization and remove optimized code on deopt
inside a recursively invoked function.
[email protected],[email protected]
BUG=
TEST=
Review URL: http://codereview.chromium.org/7890028
http://code.google.com/p/v8/source/detail?r=9285
Modified:
/branches/bleeding_edge/src/runtime.cc
=======================================
--- /branches/bleeding_edge/src/runtime.cc Wed Sep 14 04:47:03 2011
+++ /branches/bleeding_edge/src/runtime.cc Wed Sep 14 09:14:26 2011
@@ -8234,8 +8234,6 @@
if (type == Deoptimizer::EAGER) {
RUNTIME_ASSERT(function->IsOptimized());
- } else {
- RUNTIME_ASSERT(!function->IsOptimized());
}
// Avoid doing too much work when running with --always-opt and keep
@@ -8254,8 +8252,6 @@
it.Advance();
}
- // TODO(kasperl): For now, we cannot support removing the optimized
- // code when we have recursive invocations of the same function.
if (activations == 0) {
if (FLAG_trace_deopt) {
PrintF("[removing optimized code for: ");
@@ -8263,6 +8259,8 @@
PrintF("]\n");
}
function->ReplaceCode(function->shared()->code());
+ } else {
+ Deoptimizer::DeoptimizeFunction(*function);
}
return isolate->heap()->undefined_value();
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev