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

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

Issue 1474943005: Revert of [debugger] flood function for stepping before calling it. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/ia32/builtins-ia32.cc » ('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 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 }
741 // Make sure the function is compiled and has set up the debug info. 734 // Make sure the function is compiled and has set up the debug info.
742 Handle<SharedFunctionInfo> shared(function->shared()); 735 Handle<SharedFunctionInfo> shared(function->shared());
743 if (!EnsureDebugInfo(shared, function)) { 736 if (!EnsureDebugInfo(shared, function)) {
744 // Return if we failed to retrieve the debug info. 737 // Return if we failed to retrieve the debug info.
745 return; 738 return;
746 } 739 }
747 740
748 // Flood the function with break points. 741 // Flood the function with break points.
749 Handle<DebugInfo> debug_info(shared->GetDebugInfo()); 742 Handle<DebugInfo> debug_info(shared->GetDebugInfo());
750 for (BreakLocation::Iterator it(debug_info, type); !it.Done(); it.Next()) { 743 for (BreakLocation::Iterator it(debug_info, type); !it.Done(); it.Next()) {
(...skipping 1858 matching lines...) Expand 10 before | Expand all | Expand 10 after
2609 } 2602 }
2610 2603
2611 2604
2612 void LockingCommandMessageQueue::Clear() { 2605 void LockingCommandMessageQueue::Clear() {
2613 base::LockGuard<base::Mutex> lock_guard(&mutex_); 2606 base::LockGuard<base::Mutex> lock_guard(&mutex_);
2614 queue_.Clear(); 2607 queue_.Clear();
2615 } 2608 }
2616 2609
2617 } // namespace internal 2610 } // namespace internal
2618 } // namespace v8 2611 } // namespace v8
OLDNEW
« no previous file with comments | « src/debug/debug.h ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698