| Index: src/frames.cc
|
| diff --git a/src/frames.cc b/src/frames.cc
|
| index 8582e3dd852aad46af4348b356844db4f0e9dbd6..45d26a161abe8b9f53a52af976f830b2cc7a2d95 100644
|
| --- a/src/frames.cc
|
| +++ b/src/frames.cc
|
| @@ -926,7 +926,7 @@ bool JavaScriptFrame::IsConstructor() const {
|
|
|
|
|
| bool JavaScriptFrame::HasInlinedFrames() const {
|
| - List<JSFunction*> functions(1);
|
| + List<SharedFunctionInfo*> functions(1);
|
| GetFunctions(&functions);
|
| return functions.length() > 1;
|
| }
|
| @@ -959,10 +959,9 @@ Address JavaScriptFrame::GetCallerStackPointer() const {
|
| return fp() + StandardFrameConstants::kCallerSPOffset;
|
| }
|
|
|
| -
|
| -void JavaScriptFrame::GetFunctions(List<JSFunction*>* functions) const {
|
| +void JavaScriptFrame::GetFunctions(List<SharedFunctionInfo*>* functions) const {
|
| DCHECK(functions->length() == 0);
|
| - functions->Add(function());
|
| + functions->Add(function()->shared());
|
| }
|
|
|
| void JavaScriptFrame::Summarize(List<FrameSummary>* functions,
|
| @@ -1474,7 +1473,7 @@ Object* OptimizedFrame::receiver() const {
|
| }
|
| }
|
|
|
| -void OptimizedFrame::GetFunctions(List<JSFunction*>* functions) const {
|
| +void OptimizedFrame::GetFunctions(List<SharedFunctionInfo*>* functions) const {
|
| DCHECK(functions->length() == 0);
|
| DCHECK(is_optimized());
|
|
|
| @@ -1504,25 +1503,20 @@ void OptimizedFrame::GetFunctions(List<JSFunction*>* functions) const {
|
| // in the deoptimization translation are ordered bottom-to-top.
|
| while (jsframe_count != 0) {
|
| opcode = static_cast<Translation::Opcode>(it.Next());
|
| - // Skip over operands to advance to the next opcode.
|
| - it.Skip(Translation::NumberOfOperandsFor(opcode));
|
| if (opcode == Translation::JS_FRAME ||
|
| opcode == Translation::INTERPRETED_FRAME) {
|
| + it.Next(); // Skip bailout id.
|
| jsframe_count--;
|
|
|
| - // The translation commands are ordered and the function is always at the
|
| - // first position.
|
| - opcode = static_cast<Translation::Opcode>(it.Next());
|
| + // The second operand of the frame points to the function.
|
| + Object* shared = literal_array->get(it.Next());
|
| + functions->Add(SharedFunctionInfo::cast(shared));
|
|
|
| - // Get the correct function in the optimized frame.
|
| - Object* function;
|
| - if (opcode == Translation::LITERAL) {
|
| - function = literal_array->get(it.Next());
|
| - } else {
|
| - CHECK_EQ(Translation::STACK_SLOT, opcode);
|
| - function = StackSlotAt(it.Next());
|
| - }
|
| - functions->Add(JSFunction::cast(function));
|
| + // Skip over remaining operands to advance to the next opcode.
|
| + it.Skip(Translation::NumberOfOperandsFor(opcode) - 2);
|
| + } else {
|
| + // Skip over operands to advance to the next opcode.
|
| + it.Skip(Translation::NumberOfOperandsFor(opcode));
|
| }
|
| }
|
| }
|
|
|