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

Unified Diff: src/frames.cc

Issue 1184493003: Add support for walking stack frames from hydrogen stubs (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index 04ebbd85c6dffb8ca1a10d0b12cc90010b4c9354..53ae5079f0caff31d06750b518a5867c967c1bd0 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -424,10 +424,27 @@ StackFrame::Type StackFrame::ComputeType(const StackFrameIteratorBase* iterator,
// into the heap to determine the state. This is safe as long
// as nobody tries to GC...
if (!iterator->can_access_heap_objects_) return JAVA_SCRIPT;
- Code::Kind kind = GetContainingCode(iterator->isolate(),
- *(state->pc_address))->kind();
- DCHECK(kind == Code::FUNCTION || kind == Code::OPTIMIZED_FUNCTION);
- return (kind == Code::OPTIMIZED_FUNCTION) ? OPTIMIZED : JAVA_SCRIPT;
+ Code* code_obj =
+ GetContainingCode(iterator->isolate(), *(state->pc_address));
+ switch (code_obj->kind()) {
+ case Code::FUNCTION:
+ return JAVA_SCRIPT;
+
+ case Code::HANDLER:
+#ifdef DEBUG
+ if (!code_obj->is_hydrogen_stub()) {
+ // There's currently no support for non-hydrogen stub handlers. If
+ // you this, you'll have to implement it yourself.
+ UNREACHABLE();
+ }
+#endif
+ case Code::OPTIMIZED_FUNCTION:
+ return OPTIMIZED;
+
+ default:
+ UNREACHABLE();
+ return JAVA_SCRIPT;
+ }
}
return static_cast<StackFrame::Type>(Smi::cast(marker)->value());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698