Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Side by Side Diff: src/debug/debug.cc

Issue 1522273003: [debugger] remove some dead code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: exclude debugger statement Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/debug/debug.h ('k') | src/debug/debug-frames.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/debug/debug.h" 5 #include "src/debug/debug.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/arguments.h" 8 #include "src/arguments.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 // Debugger statement always calls debugger. No need to modify it. 293 // Debugger statement always calls debugger. No need to modify it.
294 if (IsDebuggerStatement()) return; 294 if (IsDebuggerStatement()) return;
295 295
296 DCHECK(IsDebugBreakSlot()); 296 DCHECK(IsDebugBreakSlot());
297 DebugCodegen::ClearDebugBreakSlot(debug_info_->GetIsolate(), pc()); 297 DebugCodegen::ClearDebugBreakSlot(debug_info_->GetIsolate(), pc());
298 DCHECK(!IsDebugBreak()); 298 DCHECK(!IsDebugBreak());
299 } 299 }
300 300
301 301
302 bool BreakLocation::IsDebugBreak() const { 302 bool BreakLocation::IsDebugBreak() const {
303 if (IsDebugBreakSlot()) { 303 if (IsDebuggerStatement()) return false;
304 return rinfo().IsPatchedDebugBreakSlotSequence(); 304 DCHECK(IsDebugBreakSlot());
305 } 305 return rinfo().IsPatchedDebugBreakSlotSequence();
306 return false;
307 } 306 }
308 307
309 308
310 Handle<Object> BreakLocation::BreakPointObjects() const { 309 Handle<Object> BreakLocation::BreakPointObjects() const {
311 return debug_info_->GetBreakPointObjects(pc_offset_); 310 return debug_info_->GetBreakPointObjects(pc_offset_);
312 } 311 }
313 312
314 313
315 void DebugFeatureTracker::Track(DebugFeatureTracker::Feature feature) { 314 void DebugFeatureTracker::Track(DebugFeatureTracker::Feature feature) {
316 uint32_t mask = 1 << feature; 315 uint32_t mask = 1 << feature;
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 break_location->code()->SourceStatementPosition(frame->pc()); 979 break_location->code()->SourceStatementPosition(frame->pc());
981 return thread_local_.last_fp_ == frame->UnpaddedFP() && 980 return thread_local_.last_fp_ == frame->UnpaddedFP() &&
982 thread_local_.last_statement_position_ == current_statement_position; 981 thread_local_.last_statement_position_ == current_statement_position;
983 } 982 }
984 983
985 // No step next action - don't continue. 984 // No step next action - don't continue.
986 return false; 985 return false;
987 } 986 }
988 987
989 988
990 // Check whether the code object at the specified address is a debug break code
991 // object.
992 bool Debug::IsDebugBreak(Address addr) {
993 Code* code = Code::GetCodeFromTargetAddress(addr);
994 return code->is_debug_stub();
995 }
996
997
998 // Simple function for returning the source positions for active break points. 989 // Simple function for returning the source positions for active break points.
999 Handle<Object> Debug::GetSourceBreakLocations( 990 Handle<Object> Debug::GetSourceBreakLocations(
1000 Handle<SharedFunctionInfo> shared, 991 Handle<SharedFunctionInfo> shared,
1001 BreakPositionAlignment position_alignment) { 992 BreakPositionAlignment position_alignment) {
1002 Isolate* isolate = shared->GetIsolate(); 993 Isolate* isolate = shared->GetIsolate();
1003 Heap* heap = isolate->heap(); 994 Heap* heap = isolate->heap();
1004 if (!shared->HasDebugInfo()) { 995 if (!shared->HasDebugInfo()) {
1005 return Handle<Object>(heap->undefined_value(), isolate); 996 return Handle<Object>(heap->undefined_value(), isolate);
1006 } 997 }
1007 Handle<DebugInfo> debug_info(shared->GetDebugInfo()); 998 Handle<DebugInfo> debug_info(shared->GetDebugInfo());
(...skipping 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after
2507 } 2498 }
2508 2499
2509 2500
2510 void LockingCommandMessageQueue::Clear() { 2501 void LockingCommandMessageQueue::Clear() {
2511 base::LockGuard<base::Mutex> lock_guard(&mutex_); 2502 base::LockGuard<base::Mutex> lock_guard(&mutex_);
2512 queue_.Clear(); 2503 queue_.Clear();
2513 } 2504 }
2514 2505
2515 } // namespace internal 2506 } // namespace internal
2516 } // namespace v8 2507 } // namespace v8
OLDNEW
« no previous file with comments | « src/debug/debug.h ('k') | src/debug/debug-frames.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698