From b68f7e4c336bb307d0af216c96a494fc1a883cdc Mon Sep 17 00:00:00 2001
From: yangguo <yangguo@chromium.org>
Date: Tue, 15 Dec 2015 22:32:40 -0800
Subject: [PATCH] [debugger] remove some dead code.

credits to gcov.

R=cbruni@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#32877}
---
 src/debug/debug-frames.cc |  5 -----
 src/debug/debug-frames.h  |  1 -
 src/debug/debug.cc        | 15 +++------------
 src/debug/debug.h         |  3 ---
 4 files changed, 3 insertions(+), 21 deletions(-)

diff --git a/src/debug/debug-frames.cc b/src/debug/debug-frames.cc
index 29f7d3cac5..012d291622 100644
--- a/src/debug/debug-frames.cc
+++ b/src/debug/debug-frames.cc
@@ -45,11 +45,6 @@ int FrameInspector::GetParametersCount() {
 }
 
 
-int FrameInspector::expression_count() {
-  return deoptimized_frame_->expression_count();
-}
-
-
 Object* FrameInspector::GetFunction() {
   return is_optimized_ ? deoptimized_frame_->GetFunction() : frame_->function();
 }
diff --git a/src/debug/debug-frames.h b/src/debug/debug-frames.h
index 86e817d47f..c0d20bbd1d 100644
--- a/src/debug/debug-frames.h
+++ b/src/debug/debug-frames.h
@@ -21,7 +21,6 @@ class FrameInspector {
   ~FrameInspector();
 
   int GetParametersCount();
-  int expression_count();
   Object* GetFunction();
   Object* GetParameter(int index);
   Object* GetExpression(int index);
diff --git a/src/debug/debug.cc b/src/debug/debug.cc
index 094fd609c3..2aac6aa117 100644
--- a/src/debug/debug.cc
+++ b/src/debug/debug.cc
@@ -300,10 +300,9 @@ void BreakLocation::ClearDebugBreak() {
 
 
 bool BreakLocation::IsDebugBreak() const {
-  if (IsDebugBreakSlot()) {
-    return rinfo().IsPatchedDebugBreakSlotSequence();
-  }
-  return false;
+  if (IsDebuggerStatement()) return false;
+  DCHECK(IsDebugBreakSlot());
+  return rinfo().IsPatchedDebugBreakSlotSequence();
 }
 
 
@@ -987,14 +986,6 @@ bool Debug::StepNextContinue(BreakLocation* break_location,
 }
 
 
-// Check whether the code object at the specified address is a debug break code
-// object.
-bool Debug::IsDebugBreak(Address addr) {
-  Code* code = Code::GetCodeFromTargetAddress(addr);
-  return code->is_debug_stub();
-}
-
-
 // Simple function for returning the source positions for active break points.
 Handle<Object> Debug::GetSourceBreakLocations(
     Handle<SharedFunctionInfo> shared,
diff --git a/src/debug/debug.h b/src/debug/debug.h
index 69c3a46d31..32f70a42e6 100644
--- a/src/debug/debug.h
+++ b/src/debug/debug.h
@@ -438,9 +438,6 @@ class Debug {
   Handle<Object> FindSharedFunctionInfoInScript(Handle<Script> script,
                                                 int position);
 
-  // Returns true if the current stub call is patched to call the debugger.
-  static bool IsDebugBreak(Address addr);
-
   static Handle<Object> GetSourceBreakLocations(
       Handle<SharedFunctionInfo> shared,
       BreakPositionAlignment position_aligment);