Thorin 1.9.0
The Higher ORder INtermediate representation
Loading...
Searching...
No Matches
thorin::ScopePhase Class Referenceabstract

Transitively visits all reachable Scopes in World that do not have free variables. More...

#include <thorin/phase/phase.h>

Inheritance diagram for thorin::ScopePhase:
[legend]

Public Member Functions

 ScopePhase (World &world, std::string_view name, bool elide_empty)
 
void start () override
 Actual entry.
 
virtual void visit (const Scope &)=0
 
- Public Member Functions inherited from thorin::Phase
 Phase (World &world, std::string_view name, bool dirty)
 
virtual ~Phase ()=default
 
Worldworld ()
 
std::string_view name () const
 
bool is_dirty () const
 
virtual void run ()
 Entry point and generates some debug output; invokes Phase::start.
 

Protected Member Functions

const Scopescope () const
 

Additional Inherited Members

- Static Public Member Functions inherited from thorin::Phase
template<class P , class... Args>
static void run (Args &&... args)
 Runs a single Phase.
 
- Protected Attributes inherited from thorin::Phase
Worldworld_
 
std::string name_
 
bool dirty_
 

Detailed Description

Transitively visits all reachable Scopes in World that do not have free variables.

We call these Scopes top-level Scopes. Select with elide_empty whether you want to visit trivial Scopes of muts without body. Assumes that you don't change anything - hence dirty flag is set to false.

Deprecated:
Use ClosedMutPhase instead.

Definition at line 150 of file phase.h.

Constructor & Destructor Documentation

◆ ScopePhase()

thorin::ScopePhase::ScopePhase ( World world,
std::string_view  name,
bool  elide_empty 
)
inline

Definition at line 152 of file phase.h.

Member Function Documentation

◆ scope()

const Scope & thorin::ScopePhase::scope ( ) const
inlineprotected

◆ start()

◆ visit()

virtual void thorin::ScopePhase::visit ( const Scope )
pure virtual

The documentation for this class was generated from the following files: