MimIR 0.1
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
mim::Rewriter Class Reference

Recurseivly rewrites part of a program into the provided World. More...

#include <mim/rewrite.h>

Inheritance diagram for mim::Rewriter:
[legend]

Public Member Functions

 Rewriter (World &world)
 
Worldworld ()
 
Ref map (Ref old_def, Ref new_def)
 Map old_def to new_def and returns new_def;.
 
rewrite

Recursively rewrite old Defs.

virtual Ref rewrite (Ref)
 
virtual Ref rewrite_imm (Ref)
 
virtual Ref rewrite_mut (Def *)
 

Detailed Description

Recurseivly rewrites part of a program into the provided World.

This World may be different than the World we started with.

Definition at line 9 of file rewrite.h.

Constructor & Destructor Documentation

◆ Rewriter()

mim::Rewriter::Rewriter ( World & world)
inline

Definition at line 11 of file rewrite.h.

Member Function Documentation

◆ map()

Ref mim::Rewriter::map ( Ref old_def,
Ref new_def )
inline

Map old_def to new_def and returns new_def;.

Definition at line 16 of file rewrite.h.

Referenced by rewrite(), rewrite_mut(), mim::VarRewriter::rewrite_mut(), and mim::VarRewriter::VarRewriter().

◆ rewrite()

◆ rewrite_imm()

◆ rewrite_mut()

Ref mim::Rewriter::rewrite_mut ( Def * old_mut)
virtual

◆ world()

World & mim::Rewriter::world ( )
inline

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