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

Unified Diff: src/debug.cc

Issue 13285: Refactor the convertion of a target address into a code object from the debug... (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/disassembler.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 950)
+++ src/debug.cc (working copy)
@@ -113,7 +113,7 @@
// be of a different kind than in the original code.
if (RelocInfo::IsCodeTarget(rmode())) {
Address target = original_rinfo()->target_address();
- Code* code = Debug::GetCodeTarget(target);
+ Code* code = Code::GetCodeFromTargetAddress(target);
if (code->is_inline_cache_stub() || RelocInfo::IsConstructCall(rmode())) {
break_point_++;
return;
@@ -325,7 +325,7 @@
// Step in can only be prepared if currently positioned on an IC call or
// construct call.
Address target = rinfo()->target_address();
- Code* code = Debug::GetCodeTarget(target);
+ Code* code = Code::GetCodeFromTargetAddress(target);
if (code->is_call_stub()) {
// Step in through IC call is handled by the runtime system. Therefore make
// sure that the any current IC is cleared and the runtime system is
@@ -923,7 +923,7 @@
bool is_call_target = false;
if (RelocInfo::IsCodeTarget(it.rinfo()->rmode())) {
Address target = it.rinfo()->target_address();
- Code* code = Debug::GetCodeTarget(target);
+ Code* code = Code::GetCodeFromTargetAddress(target);
if (code->is_call_stub()) is_call_target = true;
}
@@ -991,7 +991,7 @@
// Check whether the code object at the specified address is a debug break code
// object.
bool Debug::IsDebugBreak(Address addr) {
- Code* code = GetCodeTarget(addr);
+ Code* code = Code::GetCodeFromTargetAddress(addr);
return code->ic_state() == DEBUG_BREAK;
}
@@ -1021,7 +1021,7 @@
if (RelocInfo::IsCodeTarget(mode)) {
Address target = rinfo->target_address();
- Code* code = Debug::GetCodeTarget(target);
+ Code* code = Code::GetCodeFromTargetAddress(target);
if (code->is_inline_cache_stub()) {
if (code->is_call_stub()) {
return ComputeCallDebugBreak(code->arguments_count());
@@ -1262,14 +1262,6 @@
}
-Code* Debug::GetCodeTarget(Address target) {
- // Maybe this can be refactored with the stuff in ic-inl.h?
- Code* result =
- Code::cast(HeapObject::FromAddress(target - Code::kHeaderSize));
- return result;
-}
-
-
bool Debug::IsDebugGlobal(GlobalObject* global) {
return IsLoaded() && global == Debug::debug_context()->global();
}
« no previous file with comments | « src/debug.h ('k') | src/disassembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698