Fix bug in lazy deoptimization after HInvokeFunction.

The full code generator expects the function expression on top
of the stack until after the all. We have to emit the call + the
corresponding simulate before dropping it in the hydrogen code.

BUG=v8:1789
Review URL: http://codereview.chromium.org/8391042

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9805 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
fschneider@chromium.org 2011-10-26 14:05:18 +00:00
parent a9edfefa58
commit 4ded3ccf7c

View File

@ -5132,7 +5132,11 @@ void HGraphBuilder::VisitCall(Call* expr) {
call = PreProcessCall(new(zone()) HInvokeFunction(context,
function,
argument_count));
call->set_position(expr->position());
AddInstruction(call);
AddSimulate(expr->id());
Drop(1); // The function.
return ast_context()->ReturnValue(call);
}
} else {