Index: src/frames.cc |
diff --git a/src/frames.cc b/src/frames.cc |
index 45d26a161abe8b9f53a52af976f830b2cc7a2d95..5c561e6e7b4cb4d853336874a091933d05ed3253 100644 |
--- a/src/frames.cc |
+++ b/src/frames.cc |
@@ -1263,12 +1263,15 @@ FrameSummary::~FrameSummary() { |
#undef FRAME_SUMMARY_DESTR |
} |
-FrameSummary FrameSummary::Get(const StandardFrame* frame, int index) { |
- DCHECK_LE(0, index); |
+FrameSummary FrameSummary::GetTop(const StandardFrame* frame) { |
List<FrameSummary> frames(FLAG_max_inlining_levels + 1); |
frame->Summarize(&frames); |
- DCHECK_GT(frames.length(), index); |
- return frames[index]; |
+ DCHECK_LT(0, frames.length()); |
+ return frames.last(); |
+} |
+ |
+FrameSummary FrameSummary::GetBottom(const StandardFrame* frame) { |
+ return Get(frame, 0); |
} |
FrameSummary FrameSummary::GetSingle(const StandardFrame* frame) { |
@@ -1278,6 +1281,14 @@ FrameSummary FrameSummary::GetSingle(const StandardFrame* frame) { |
return frames.first(); |
} |
+FrameSummary FrameSummary::Get(const StandardFrame* frame, int index) { |
+ DCHECK_LE(0, index); |
+ List<FrameSummary> frames(FLAG_max_inlining_levels + 1); |
+ frame->Summarize(&frames); |
+ DCHECK_GT(frames.length(), index); |
+ return frames[index]; |
+} |
+ |
#define FRAME_SUMMARY_DISPATCH(ret, name) \ |
ret FrameSummary::name() const { \ |
switch (base_.kind()) { \ |
@@ -1781,7 +1792,7 @@ Script* WasmInterpreterEntryFrame::script() const { |
} |
int WasmInterpreterEntryFrame::position() const { |
- return FrameSummary::GetFirst(this).AsWasmInterpreted().SourcePosition(); |
+ return FrameSummary::GetBottom(this).AsWasmInterpreted().SourcePosition(); |
} |
Address WasmInterpreterEntryFrame::GetCallerStackPointer() const { |