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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/debug.h ('k') | src/ic.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 BreakPointInfo::cast(debug_info->break_points()->get(i)); 1088 BreakPointInfo::cast(debug_info->break_points()->get(i));
1089 if (break_point_info->GetBreakPointCount() > 0) { 1089 if (break_point_info->GetBreakPointCount() > 0) {
1090 locations->set(count++, break_point_info->statement_position()); 1090 locations->set(count++, break_point_info->statement_position());
1091 } 1091 }
1092 } 1092 }
1093 } 1093 }
1094 return locations; 1094 return locations;
1095 } 1095 }
1096 1096
1097 1097
1098 // Handle stepping into a function.
1099 void Debug::HandleStepIn(Handle<JSFunction> function,
1100 Address fp,
1101 bool is_constructor) {
1102 // If the frame pointer is not supplied by the caller find it.
1103 if (fp == 0) {
1104 StackFrameIterator it;
1105 it.Advance();
1106 // For constructor functions skip another frame.
1107 if (is_constructor) {
1108 ASSERT(it.frame()->is_construct());
1109 it.Advance();
1110 }
1111 fp = it.frame()->fp();
1112 }
1113
1114 // Flood the function with one-shot break points if it is called from where
1115 // step into was requested.
1116 if (fp == Debug::step_in_fp()) {
1117 // Don't allow step into functions in the native context.
1118 if (function->context()->global() != Top::context()->builtins()) {
1119 Debug::FloodWithOneShot(Handle<SharedFunctionInfo>(function->shared()));
1120 }
1121 }
1122 }
1123
1124
1098 void Debug::ClearStepping() { 1125 void Debug::ClearStepping() {
1099 // Clear the various stepping setup. 1126 // Clear the various stepping setup.
1100 ClearOneShot(); 1127 ClearOneShot();
1101 ClearStepIn(); 1128 ClearStepIn();
1102 ClearStepNext(); 1129 ClearStepNext();
1103 1130
1104 // Clear multiple step counter. 1131 // Clear multiple step counter.
1105 thread_local_.step_count_ = 0; 1132 thread_local_.step_count_ = 0;
1106 } 1133 }
1107 1134
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after
1966 } 1993 }
1967 1994
1968 1995
1969 void LockingMessageQueue::Clear() { 1996 void LockingMessageQueue::Clear() {
1970 ScopedLock sl(lock_); 1997 ScopedLock sl(lock_);
1971 queue_.Clear(); 1998 queue_.Clear();
1972 } 1999 }
1973 2000
1974 2001
1975 } } // namespace v8::internal 2002 } } // namespace v8::internal
OLDNEW
« 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