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
parent a9edfefa
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment