Commit 319667bf authored by bmeurer's avatar bmeurer Committed by Commit bot

[frames] Remove obsolete JavaScriptFrame::GetInlineCount() method.

R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28860}
parent ce0922bc
......@@ -1013,30 +1013,6 @@ DeoptimizationInputData* OptimizedFrame::GetDeoptimizationData(
}
int OptimizedFrame::GetInlineCount() {
DCHECK(is_optimized());
// Delegate to JS frame in absence of turbofan deoptimization.
// TODO(turbofan): Revisit once we support deoptimization across the board.
if (LookupCode()->is_turbofanned() && function()->shared()->asm_function() &&
!FLAG_turbo_asm_deoptimization) {
return JavaScriptFrame::GetInlineCount();
}
int deopt_index = Safepoint::kNoDeoptimizationIndex;
DeoptimizationInputData* data = GetDeoptimizationData(&deopt_index);
TranslationIterator it(data->TranslationByteArray(),
data->TranslationIndex(deopt_index)->value());
Translation::Opcode opcode = static_cast<Translation::Opcode>(it.Next());
DCHECK(opcode == Translation::BEGIN);
USE(opcode);
it.Next(); // Drop frame count.
int jsframe_count = it.Next();
return jsframe_count;
}
void OptimizedFrame::GetFunctions(List<JSFunction*>* functions) {
DCHECK(functions->length() == 0);
DCHECK(is_optimized());
......
......@@ -550,9 +550,6 @@ class JavaScriptFrame: public StandardFrame {
// Determine the code for the frame.
virtual Code* unchecked_code() const;
// Returns the levels of inlining for this frame.
virtual int GetInlineCount() { return 1; }
// Return a list with JSFunctions of this frame.
virtual void GetFunctions(List<JSFunction*>* functions);
......@@ -627,8 +624,6 @@ class OptimizedFrame : public JavaScriptFrame {
// GC support.
virtual void Iterate(ObjectVisitor* v) const;
virtual int GetInlineCount();
// Return a list with JSFunctions of this frame.
// The functions are ordered bottom-to-top (i.e. functions.last()
// is the top-most activation)
......
......@@ -13,7 +13,7 @@ using namespace v8::internal::compiler;
namespace {
// Helper to determine inline count via JavaScriptFrame::GetInlineCount.
// Helper to determine inline count via JavaScriptFrame::GetFunctions.
// Note that a count of 1 indicates that no inlining has occured.
void AssertInlineCount(const v8::FunctionCallbackInfo<v8::Value>& args) {
StackTraceFrameIterator it(CcTest::i_isolate());
......@@ -21,14 +21,17 @@ void AssertInlineCount(const v8::FunctionCallbackInfo<v8::Value>& args) {
JavaScriptFrame* topmost = it.frame();
while (!it.done()) {
JavaScriptFrame* frame = it.frame();
List<JSFunction*> functions(2);
frame->GetFunctions(&functions);
PrintF("%d %s, inline count: %d\n", frames_seen,
frame->function()->shared()->DebugName()->ToCString().get(),
frame->GetInlineCount());
functions.length());
frames_seen++;
it.Advance();
}
CHECK_EQ(args[0]->ToInt32(args.GetIsolate())->Value(),
topmost->GetInlineCount());
List<JSFunction*> functions(2);
topmost->GetFunctions(&functions);
CHECK_EQ(args[0]->ToInt32(args.GetIsolate())->Value(), functions.length());
}
......
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