Commit 01f02a80 authored by Victor Gomes's avatar Victor Gomes Committed by V8 LUCI CQ

[cleanup] Refactor Turbofan::Iterate and TypedFrame::Iterate

Change-Id: I317c42a6efd977ec990e28941fd7a9e638227be0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3789517Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82028}
parent ef1e65d9
...@@ -199,7 +199,7 @@ class SafepointTableBuilder : public SafepointTableBuilderBase { ...@@ -199,7 +199,7 @@ class SafepointTableBuilder : public SafepointTableBuilderBase {
// Note it is only valid to specify stack slots here that are *not* in // Note it is only valid to specify stack slots here that are *not* in
// the fixed part of the frame (e.g. argc, target, context, stored rbp, // the fixed part of the frame (e.g. argc, target, context, stored rbp,
// return address). Frame iteration handles the fixed part of the frame // return address). Frame iteration handles the fixed part of the frame
// with custom code, see CommonFrame::IterateCompiledFrame. // with custom code, see Turbofan::Iterate.
entry_->stack_indexes->Add(index, table_->zone_); entry_->stack_indexes->Add(index, table_->zone_);
table_->UpdateMinMaxStackIndex(index); table_->UpdateMinMaxStackIndex(index);
} }
......
This diff is collapsed.
...@@ -537,9 +537,6 @@ class CommonFrame : public StackFrame { ...@@ -537,9 +537,6 @@ class CommonFrame : public StackFrame {
// Returns the address of the n'th expression stack element. // Returns the address of the n'th expression stack element.
virtual Address GetExpressionAddress(int n) const; virtual Address GetExpressionAddress(int n) const;
// Used by OptimizedFrames and StubFrames.
void IterateCompiledFrame(RootVisitor* v) const;
private: private:
friend class StackFrame; friend class StackFrame;
friend class SafeStackFrameIterator; friend class SafeStackFrameIterator;
...@@ -548,7 +545,7 @@ class CommonFrame : public StackFrame { ...@@ -548,7 +545,7 @@ class CommonFrame : public StackFrame {
class TypedFrame : public CommonFrame { class TypedFrame : public CommonFrame {
public: public:
Code unchecked_code() const override { return {}; } Code unchecked_code() const override { return {}; }
void Iterate(RootVisitor* v) const override { IterateCompiledFrame(v); } void Iterate(RootVisitor* v) const override;
protected: protected:
inline explicit TypedFrame(StackFrameIteratorBase* iterator); inline explicit TypedFrame(StackFrameIteratorBase* iterator);
...@@ -818,9 +815,6 @@ class StubFrame : public TypedFrame { ...@@ -818,9 +815,6 @@ class StubFrame : public TypedFrame {
class OptimizedFrame : public JavaScriptFrame { class OptimizedFrame : public JavaScriptFrame {
public: public:
// GC support.
void Iterate(RootVisitor* v) const override;
// Return a list with {SharedFunctionInfo} objects of this frame. // Return a list with {SharedFunctionInfo} objects of this frame.
// The functions are ordered bottom-to-top (i.e. functions.last() // The functions are ordered bottom-to-top (i.e. functions.last()
// is the top-most activation) // is the top-most activation)
...@@ -957,6 +951,9 @@ class TurbofanFrame : public OptimizedFrame { ...@@ -957,6 +951,9 @@ class TurbofanFrame : public OptimizedFrame {
int* data, HandlerTable::CatchPrediction* prediction) override; int* data, HandlerTable::CatchPrediction* prediction) override;
int ComputeParametersCount() const override; int ComputeParametersCount() const override;
bool HasTaggedOutgoingParams(CodeLookupResult& code_lookup) const;
void Iterate(RootVisitor* v) const override;
protected: protected:
inline explicit TurbofanFrame(StackFrameIteratorBase* iterator); inline explicit TurbofanFrame(StackFrameIteratorBase* iterator);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment