Revision: 7604
Author: [email protected]
Date: Wed Apr 13 04:59:23 2011
Log: Fix a just-introduced bug in polymorphic inlining.
When inlining a polymorphic variant, the inlined function indicates we
should bailout of the entire compilation by setting the stack overflow flag
on the visitor. We need to check this flag and bailout if a call to
TryInline succeeds and it is not in tail position in a graph builder
function.
[email protected]
Review URL: http://codereview.chromium.org/6840012
http://code.google.com/p/v8/source/detail?r=7604
Modified:
/branches/bleeding_edge/src/hydrogen.cc
=======================================
--- /branches/bleeding_edge/src/hydrogen.cc Wed Apr 13 04:30:36 2011
+++ /branches/bleeding_edge/src/hydrogen.cc Wed Apr 13 04:59:23 2011
@@ -3961,7 +3961,11 @@
PrintF("Trying to inline the polymorphic call to %s\n",
*name->ToCString());
}
- if (!FLAG_polymorphic_inlining || !TryInline(expr)) {
+ if (FLAG_polymorphic_inlining && TryInline(expr)) {
+ // Trying to inline will signal that we should bailout from the
+ // entire compilation by setting stack overflow on the visitor.
+ if (HasStackOverflow()) return;
+ } else {
HCallConstantFunction* call =
new(zone()) HCallConstantFunction(expr->target(),
argument_count);
call->set_position(expr->position());
@@ -4514,9 +4518,7 @@
IsGlobalObject());
environment()->SetExpressionStackAt(receiver_index,
global_receiver);
- if (TryInline(expr)) {
- return;
- }
+ if (TryInline(expr)) return;
call = PreProcessCall(new(zone()) HCallKnownGlobal(expr->target(),
argument_count));
} else {
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev