[frames] Remove obsolete JavaScriptFrame::GetInlineCount() method.
authorbmeurer <bmeurer@chromium.org>
Tue, 9 Jun 2015 11:28:08 +0000 (04:28 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 9 Jun 2015 11:28:22 +0000 (11:28 +0000)
R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28860}

src/frames.cc
src/frames.h
test/cctest/compiler/test-run-inlining.cc

index dc67b41ad825325a0639dff4f67f0e84668cd7b3..9591011f3d0ee6b18816c1e6ee53fb221346cc09 100644 (file)
@@ -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());
index b4247c9bdbe97ef710dacb9e52cd8e173bab02df..1bd8f3026b6af672cd4d2c2e27ac3dbfdc710c40 100644 (file)
@@ -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)
index 3de929cbc81ee03a7dffc112ec3063c7c245dd47..76cd4a8eb6335ba4b1c4a2b5c28a423f1d793d36 100644 (file)
@@ -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());
 }