tipc
A TIP to LLVM compiler
|
Makes a copy of a TipType with fresh alphas for the given ASTnode. More...
#include <FreshAlphaCopier.h>
Public Member Functions | |
FreshAlphaCopier ()=default | |
virtual void | endVisit (TipAlpha *element) override |
![]() | |
Copier ()=default | |
virtual void | endVisit (TipVar *element) override |
Substitute if variable is the target. More... | |
![]() | |
Substituter (TipVar *t, std::shared_ptr< TipType > s) | |
std::shared_ptr< TipType > | getResult () |
virtual void | endVisit (TipFunction *element) override |
virtual void | endVisit (TipInt *element) override |
virtual void | endVisit (TipMu *element) override |
virtual void | endVisit (TipRecord *element) override |
virtual void | endVisit (TipAbsentField *element) override |
virtual void | endVisit (TipRef *element) override |
![]() | |
virtual bool | visit (TipAlpha *element) |
virtual bool | visit (TipFunction *element) |
virtual bool | visit (TipInt *element) |
virtual bool | visit (TipMu *element) |
virtual bool | visit (TipRecord *element) |
virtual bool | visit (TipAbsentField *element) |
virtual bool | visit (TipRef *element) |
virtual bool | visit (TipVar *element) |
Static Public Member Functions | |
static std::shared_ptr< TipType > | copy (TipType *t, ASTNode *context) |
![]() | |
static std::shared_ptr< TipType > | copy (std::shared_ptr< TipType > s) |
![]() | |
static std::shared_ptr< TipType > | substitute (TipType *t, TipVar *v, std::shared_ptr< TipType > s) |
Substitute for instances of variable in a target type. More... | |
Public Attributes | |
ASTNode * | context |
Additional Inherited Members | |
![]() | |
Substituter ()=default | |
![]() | |
std::vector< std::shared_ptr< TipType > > | visitedTypes |
Makes a copy of a TipType with fresh alphas for the given ASTnode.
This subtype of the Copier overrides the behavior for TipAlpha to just create a context-specific version of the alpha.
|
default |
Copy the type replacing all alpha nodes with context-specific alphas
ASTNode* FreshAlphaCopier::context |