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

Unified Diff: src/frames.h

Issue 2801073006: Decouple root visitors from object visitors. (Closed)
Patch Set: rebase Created 3 years, 8 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/debug/debug.cc ('k') | src/frames.cc » ('j') | src/heap/mark-compact.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.h
diff --git a/src/frames.h b/src/frames.h
index 05a2d2b01b226f73764da734dd27d11fdb9c9f41..1edf296b7aad6d95f29daf346aa259dc65fcf494 100644
--- a/src/frames.h
+++ b/src/frames.h
@@ -30,6 +30,7 @@ int JSCallerSavedCode(int n);
// Forward declarations.
class ExternalCallbackScope;
class Isolate;
+class RootVisitor;
class StackFrameIteratorBase;
class ThreadLocalTop;
class WasmInstanceObject;
@@ -589,8 +590,8 @@ class StackFrame BASE_EMBEDDED {
SafepointEntry* safepoint_entry,
unsigned* stack_slots);
- virtual void Iterate(ObjectVisitor* v) const = 0;
- static void IteratePc(ObjectVisitor* v, Address* pc_address,
+ virtual void Iterate(RootVisitor* v) const = 0;
+ static void IteratePc(RootVisitor* v, Address* pc_address,
Address* constant_pool_address, Code* holder);
// Sets a callback function for return-address rewriting profilers
@@ -661,7 +662,7 @@ class EntryFrame: public StackFrame {
Code* unchecked_code() const override;
// Garbage collection support.
- void Iterate(ObjectVisitor* v) const override;
+ void Iterate(RootVisitor* v) const override;
static EntryFrame* cast(StackFrame* frame) {
DCHECK(frame->is_entry());
@@ -714,7 +715,7 @@ class ExitFrame: public StackFrame {
Object*& code_slot() const;
// Garbage collection support.
- void Iterate(ObjectVisitor* v) const override;
+ void Iterate(RootVisitor* v) const override;
void SetCallerFp(Address caller_fp) override;
@@ -993,7 +994,7 @@ class StandardFrame : public StackFrame {
// Iterate over expression stack including stack handlers, locals,
// and parts of the fixed part including context and code fields.
- void IterateExpressions(ObjectVisitor* v) const;
+ void IterateExpressions(RootVisitor* v) const;
// Returns the address of the n'th expression stack element.
virtual Address GetExpressionAddress(int n) const;
@@ -1007,7 +1008,7 @@ class StandardFrame : public StackFrame {
static inline bool IsConstructFrame(Address fp);
// Used by OptimizedFrames and StubFrames.
- void IterateCompiledFrame(ObjectVisitor* v) const;
+ void IterateCompiledFrame(RootVisitor* v) const;
private:
friend class StackFrame;
@@ -1057,7 +1058,7 @@ class JavaScriptFrame : public StandardFrame {
int GetArgumentsLength() const;
// Garbage collection support.
- void Iterate(ObjectVisitor* v) const override;
+ void Iterate(RootVisitor* v) const override;
// Printing support.
void Print(StringStream* accumulator, PrintMode mode,
@@ -1109,7 +1110,7 @@ class JavaScriptFrame : public StandardFrame {
// Garbage collection support. Iterates over incoming arguments,
// receiver, and any callee-saved registers.
- void IterateArguments(ObjectVisitor* v) const;
+ void IterateArguments(RootVisitor* v) const;
virtual void PrintFrameKind(StringStream* accumulator) const {}
@@ -1125,7 +1126,7 @@ class StubFrame : public StandardFrame {
Type type() const override { return STUB; }
// GC support.
- void Iterate(ObjectVisitor* v) const override;
+ void Iterate(RootVisitor* v) const override;
// Determine the code for the frame.
Code* unchecked_code() const override;
@@ -1152,7 +1153,7 @@ class OptimizedFrame : public JavaScriptFrame {
Type type() const override { return OPTIMIZED; }
// GC support.
- void Iterate(ObjectVisitor* v) const override;
+ void Iterate(RootVisitor* v) const override;
// Return a list with {SharedFunctionInfo} objects of this frame.
// The functions are ordered bottom-to-top (i.e. functions.last()
@@ -1285,7 +1286,7 @@ class WasmCompiledFrame final : public StandardFrame {
Type type() const override { return WASM_COMPILED; }
// GC support.
- void Iterate(ObjectVisitor* v) const override;
+ void Iterate(RootVisitor* v) const override;
// Printing support.
void Print(StringStream* accumulator, PrintMode mode,
@@ -1327,7 +1328,7 @@ class WasmInterpreterEntryFrame final : public StandardFrame {
Type type() const override { return WASM_INTERPRETER_ENTRY; }
// GC support.
- void Iterate(ObjectVisitor* v) const override;
+ void Iterate(RootVisitor* v) const override;
// Printing support.
void Print(StringStream* accumulator, PrintMode mode,
@@ -1386,7 +1387,7 @@ class InternalFrame: public StandardFrame {
Type type() const override { return INTERNAL; }
// Garbage collection support.
- void Iterate(ObjectVisitor* v) const override;
+ void Iterate(RootVisitor* v) const override;
// Determine the code for the frame.
Code* unchecked_code() const override;
@@ -1414,7 +1415,7 @@ class StubFailureTrampolineFrame: public StandardFrame {
// This method could be called during marking phase of GC.
Code* unchecked_code() const override;
- void Iterate(ObjectVisitor* v) const override;
+ void Iterate(RootVisitor* v) const override;
// Architecture-specific register description.
static Register fp_register();
« no previous file with comments | « src/debug/debug.cc ('k') | src/frames.cc » ('j') | src/heap/mark-compact.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698