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

Unified Diff: src/frames.cc

Issue 1724063002: Add WasmFrame, backtraces reflect wasm's presence (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/frames.h ('k') | src/frames-inl.h » ('j') | src/isolate.cc » ('J')
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 50a2e21a055d7a9d8f11442f6cfa024d555c71dc..b88b73da8db84d033ea628ed312e0a25d72f8123 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -134,12 +134,10 @@ StackFrame* StackFrameIteratorBase::SingletonFor(StackFrame::Type type) {
#undef FRAME_TYPE_CASE
}
-
// -------------------------------------------------------------------------
-
-JavaScriptFrameIterator::JavaScriptFrameIterator(
- Isolate* isolate, StackFrame::Id id)
+JavaScriptFrameIterator::JavaScriptFrameIterator(Isolate* isolate,
+ StackFrame::Id id)
: iterator_(isolate) {
while (!done()) {
Advance();
@@ -446,7 +444,7 @@ StackFrame::Type StackFrame::ComputeType(const StackFrameIteratorBase* iterator,
case Code::OPTIMIZED_FUNCTION:
return OPTIMIZED;
case Code::WASM_FUNCTION:
- return STUB;
+ return WASM;
case Code::BUILTIN:
if (!marker->IsSmi()) {
if (StandardFrame::IsArgumentsAdaptorFrame(state->fp)) {
@@ -1222,6 +1220,20 @@ void StackFrame::PrintIndex(StringStream* accumulator,
accumulator->Add((mode == OVERVIEW) ? "%5d: " : "[%d]: ", index);
}
+void WasmFrame::Print(StringStream* accumulator, PrintMode mode,
+ int index) const {
+ accumulator->Add("wasm frame");
+}
+
+Code* WasmFrame::unchecked_code() const {
+ return static_cast<Code*>(isolate()->FindCodeObject(pc()));
+}
+
+void WasmFrame::Iterate(ObjectVisitor* v) const { IterateCompiledFrame(v); }
+
+Address WasmFrame::GetCallerStackPointer() const {
+ return fp() + ExitFrameConstants::kCallerSPDisplacement;
+}
namespace {
« no previous file with comments | « src/frames.h ('k') | src/frames-inl.h » ('j') | src/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698