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

Unified Diff: src/debug.cc

Issue 9297019: Fix and adapt debugger for new call target caches. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Yang Guo. Created 8 years, 11 months 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/ia32/debug-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug.cc
diff --git a/src/debug.cc b/src/debug.cc
index 01c4dba3cfeba41cc3a629e1e7c614c6355183ed..f6c4d6c8ed7ef28a4d868f740faa331a9bbbe6a3 100644
--- a/src/debug.cc
+++ b/src/debug.cc
@@ -85,12 +85,6 @@ static void PrintLn(v8::Local<v8::Value> value) {
}
-static Handle<Code> ComputeCallDebugBreak(int argc, Code::Kind kind) {
- Isolate* isolate = Isolate::Current();
- return isolate->stub_cache()->ComputeCallDebugBreak(argc, kind);
-}
-
-
static Handle<Code> ComputeCallDebugPrepareStepIn(int argc, Code::Kind kind) {
Isolate* isolate = Isolate::Current();
return isolate->stub_cache()->ComputeCallDebugPrepareStepIn(argc, kind);
@@ -1538,40 +1532,47 @@ bool Debug::IsBreakStub(Code* code) {
// Find the builtin to use for invoking the debug break
Handle<Code> Debug::FindDebugBreak(Handle<Code> code, RelocInfo::Mode mode) {
+ Isolate* isolate = Isolate::Current();
+
// Find the builtin debug break function matching the calling convention
// used by the call site.
if (code->is_inline_cache_stub()) {
switch (code->kind()) {
case Code::CALL_IC:
case Code::KEYED_CALL_IC:
- return ComputeCallDebugBreak(code->arguments_count(), code->kind());
+ return isolate->stub_cache()->ComputeCallDebugBreak(
+ code->arguments_count(), code->kind());
case Code::LOAD_IC:
- return Isolate::Current()->builtins()->LoadIC_DebugBreak();
+ return isolate->builtins()->LoadIC_DebugBreak();
case Code::STORE_IC:
- return Isolate::Current()->builtins()->StoreIC_DebugBreak();
+ return isolate->builtins()->StoreIC_DebugBreak();
case Code::KEYED_LOAD_IC:
- return Isolate::Current()->builtins()->KeyedLoadIC_DebugBreak();
+ return isolate->builtins()->KeyedLoadIC_DebugBreak();
case Code::KEYED_STORE_IC:
- return Isolate::Current()->builtins()->KeyedStoreIC_DebugBreak();
+ return isolate->builtins()->KeyedStoreIC_DebugBreak();
default:
UNREACHABLE();
}
}
if (RelocInfo::IsConstructCall(mode)) {
- Handle<Code> result =
- Isolate::Current()->builtins()->ConstructCall_DebugBreak();
- return result;
+ if (code->has_function_cache()) {
+ return isolate->builtins()->CallConstructStub_Recording_DebugBreak();
+ } else {
+ return isolate->builtins()->CallConstructStub_DebugBreak();
+ }
}
if (code->kind() == Code::STUB) {
ASSERT(code->major_key() == CodeStub::CallFunction);
- Handle<Code> result =
- Isolate::Current()->builtins()->CallFunctionStub_DebugBreak();
- return result;
+ if (code->has_function_cache()) {
+ return isolate->builtins()->CallFunctionStub_Recording_DebugBreak();
+ } else {
+ return isolate->builtins()->CallFunctionStub_DebugBreak();
+ }
}
UNREACHABLE();
« no previous file with comments | « src/debug.h ('k') | src/ia32/debug-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698