Reviewers: Yang,
Message:
ptal
Description:
Add support for walking stack frames from hydrogen stubs
R=yang...@chromium.org
BUG=none
LOG=n
Please review this at https://codereview.chromium.org/1184493003/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+15, -4 lines):
M src/frames.cc
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index
04ebbd85c6dffb8ca1a10d0b12cc90010b4c9354..e89052b3ee00783c3e58e4de0ba61cce0cb6174f
100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -424,10 +424,21 @@ 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:
+ DCHECK(code_obj->is_hydrogen_stub());
+ case Code::OPTIMIZED_FUNCTION:
+ return OPTIMIZED;
+
+ default:
+ UNREACHABLE();
+ return JAVA_SCRIPT;
+ }
}
return static_cast<StackFrame::Type>(Smi::cast(marker)->value());
}
--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.