[Interpreter]: Fix IC::GetSharedFunctionInfo for the interpreter.

IC::GetSharedFunctionInfo get's the JS frame which called the IC. When the
function is running in the interpreter, there is a Bytecode handler stub
frame between the IC and the JS frame. Modify IC::GetSharedFunctionInfo to
handle this.

BUG=v8:4280
LOG=N

Review URL: https://codereview.chromium.org/1420283020

Cr-Commit-Position: refs/heads/master@{#31865}
This commit is contained in:
rmcilroy 2015-11-06 11:21:11 -08:00 committed by Commit bot
parent fb9ad89fea
commit 859b15cacd

View File

@ -197,6 +197,11 @@ SharedFunctionInfo* IC::GetSharedFunctionInfo() const {
// corresponding to the frame.
StackFrameIterator it(isolate());
while (it.frame()->fp() != this->fp()) it.Advance();
if (FLAG_ignition && it.frame()->type() == StackFrame::STUB) {
// Advance over bytecode handler frame.
// TODO(rmcilroy): Remove this once bytecode handlers don't need a frame.
it.Advance();
}
JavaScriptFrame* frame = JavaScriptFrame::cast(it.frame());
// Find the function on the stack and both the active code for the
// function and the original code.