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

Unified Diff: src/debug.cc

Issue 15035: Refactored the code for handling debug step in in the runtime system into one... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/debug.h ('k') | src/ic.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug.cc
===================================================================
--- src/debug.cc (revision 993)
+++ src/debug.cc (working copy)
@@ -1095,6 +1095,33 @@
}
+// Handle stepping into a function.
+void Debug::HandleStepIn(Handle<JSFunction> function,
+ Address fp,
+ bool is_constructor) {
+ // If the frame pointer is not supplied by the caller find it.
+ if (fp == 0) {
+ StackFrameIterator it;
+ it.Advance();
+ // For constructor functions skip another frame.
+ if (is_constructor) {
+ ASSERT(it.frame()->is_construct());
+ it.Advance();
+ }
+ fp = it.frame()->fp();
+ }
+
+ // Flood the function with one-shot break points if it is called from where
+ // step into was requested.
+ if (fp == Debug::step_in_fp()) {
+ // Don't allow step into functions in the native context.
+ if (function->context()->global() != Top::context()->builtins()) {
+ Debug::FloodWithOneShot(Handle<SharedFunctionInfo>(function->shared()));
+ }
+ }
+}
+
+
void Debug::ClearStepping() {
// Clear the various stepping setup.
ClearOneShot();
« no previous file with comments | « src/debug.h ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698