From: bmeurer Date: Tue, 9 Jun 2015 11:28:08 +0000 (-0700) Subject: [frames] Remove obsolete JavaScriptFrame::GetInlineCount() method. X-Git-Tag: upstream/4.7.83~2180 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=319667bfbd5a3056d4b3193a84aca39926b5c77d;p=platform%2Fupstream%2Fv8.git [frames] Remove obsolete JavaScriptFrame::GetInlineCount() method. R=mstarzinger@chromium.org Review URL: https://codereview.chromium.org/1176473002 Cr-Commit-Position: refs/heads/master@{#28860} --- diff --git a/src/frames.cc b/src/frames.cc index dc67b41..9591011 100644 --- a/src/frames.cc +++ b/src/frames.cc @@ -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(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* functions) { DCHECK(functions->length() == 0); DCHECK(is_optimized()); diff --git a/src/frames.h b/src/frames.h index b4247c9..1bd8f30 100644 --- a/src/frames.h +++ b/src/frames.h @@ -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* 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) diff --git a/test/cctest/compiler/test-run-inlining.cc b/test/cctest/compiler/test-run-inlining.cc index 3de929c..76cd4a8 100644 --- a/test/cctest/compiler/test-run-inlining.cc +++ b/test/cctest/compiler/test-run-inlining.cc @@ -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& args) { StackTraceFrameIterator it(CcTest::i_isolate()); @@ -21,14 +21,17 @@ void AssertInlineCount(const v8::FunctionCallbackInfo& args) { JavaScriptFrame* topmost = it.frame(); while (!it.done()) { JavaScriptFrame* frame = it.frame(); + List 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 functions(2); + topmost->GetFunctions(&functions); + CHECK_EQ(args[0]->ToInt32(args.GetIsolate())->Value(), functions.length()); }