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

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

Issue 1463803002: [debugger] flood function for stepping before calling it. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase, ports, deoptimize builtins 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
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 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 } 724 }
725 // Remove all debug info. 725 // Remove all debug info.
726 while (debug_info_list_ != NULL) { 726 while (debug_info_list_ != NULL) {
727 RemoveDebugInfoAndClearFromShared(debug_info_list_->debug_info()); 727 RemoveDebugInfoAndClearFromShared(debug_info_list_->debug_info());
728 } 728 }
729 } 729 }
730 730
731 731
732 void Debug::FloodWithOneShot(Handle<JSFunction> function, 732 void Debug::FloodWithOneShot(Handle<JSFunction> function,
733 BreakLocatorType type) { 733 BreakLocatorType type) {
734 if (!function->shared()->IsSubjectToDebugging()) {
735 // Builtin functions are not subject to stepping, but need to be
736 // deoptimized, because optimized code does not check for debug
737 // step in at call sites.
738 Deoptimizer::DeoptimizeFunction(*function);
739 return;
740 }
734 // Make sure the function is compiled and has set up the debug info. 741 // Make sure the function is compiled and has set up the debug info.
735 Handle<SharedFunctionInfo> shared(function->shared()); 742 Handle<SharedFunctionInfo> shared(function->shared());
736 if (!EnsureDebugInfo(shared, function)) { 743 if (!EnsureDebugInfo(shared, function)) {
737 // Return if we failed to retrieve the debug info. 744 // Return if we failed to retrieve the debug info.
738 return; 745 return;
739 } 746 }
740 747
741 // Flood the function with break points. 748 // Flood the function with break points.
742 Handle<DebugInfo> debug_info(shared->GetDebugInfo()); 749 Handle<DebugInfo> debug_info(shared->GetDebugInfo());
743 for (BreakLocation::Iterator it(debug_info, type); !it.Done(); it.Next()) { 750 for (BreakLocation::Iterator it(debug_info, type); !it.Done(); it.Next()) {
(...skipping 1858 matching lines...) Expand 10 before | Expand all | Expand 10 after
2602 } 2609 }
2603 2610
2604 2611
2605 void LockingCommandMessageQueue::Clear() { 2612 void LockingCommandMessageQueue::Clear() {
2606 base::LockGuard<base::Mutex> lock_guard(&mutex_); 2613 base::LockGuard<base::Mutex> lock_guard(&mutex_);
2607 queue_.Clear(); 2614 queue_.Clear();
2608 } 2615 }
2609 2616
2610 } // namespace internal 2617 } // namespace internal
2611 } // namespace v8 2618 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698