MimIR 0.1
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
mim::plug::clos::ClosLit Class Reference

Wrapper around a Def that can be used to match closures (see isa_clos_lit). More...

#include <mim/plug/clos/clos.h>

Public Member Functions

 operator bool () const
 
 operator const Tuple * ()
 
const Tupleoperator-> ()
 
Getters
const Sigmatype ()
 
Ref env ()
 
Ref env_type ()
 
Ref fnc ()
 
const Pifnc_type ()
 
Lamfnc_as_lam ()
 
Ref env_var ()
 
Ref ret_var ()
 
Properties
bool is_returning ()
 
bool is_basicblock ()
 
attr get ()
 Clos annotation. These should appear in front of the code-part.
 

Friends

ClosLit isa_clos_lit (Ref def, bool fn_isa_lam=true)
 Tries to match a closure literal.
 

Detailed Description

Wrapper around a Def that can be used to match closures (see isa_clos_lit).

Definition at line 13 of file clos.h.

Member Function Documentation

◆ env()

Ref mim::plug::clos::ClosLit::env ( )

Definition at line 46 of file clos.cpp.

References mim::plug::clos::clos_unpack(), and std::get().

Referenced by env_type().

◆ env_type()

Ref mim::plug::clos::ClosLit::env_type ( )
inline

Definition at line 23 of file clos.h.

References env(), and mim::Def::type().

◆ env_var()

Ref mim::plug::clos::ClosLit::env_var ( )

Definition at line 62 of file clos.cpp.

References mim::plug::clos::Clos_Env_Param, fnc_as_lam(), and mim::Def::var().

◆ fnc()

Ref mim::plug::clos::ClosLit::fnc ( )

Definition at line 51 of file clos.cpp.

References mim::plug::clos::clos_unpack(), and std::get().

Referenced by fnc_as_lam(), and fnc_type().

◆ fnc_as_lam()

Lam * mim::plug::clos::ClosLit::fnc_as_lam ( )

Definition at line 56 of file clos.cpp.

References fnc(), and mim::match().

Referenced by env_var(), and ret_var().

◆ fnc_type()

const Pi * mim::plug::clos::ClosLit::fnc_type ( )
inline

Definition at line 26 of file clos.h.

References fnc(), and mim::Def::type().

Referenced by is_basicblock(), and is_returning().

◆ get()

attr mim::plug::clos::ClosLit::get ( )
inline

Clos annotation. These should appear in front of the code-part.

Definition at line 45 of file clos.h.

◆ is_basicblock()

bool mim::plug::clos::ClosLit::is_basicblock ( )
inline

Definition at line 44 of file clos.h.

References fnc_type(), and mim::Pi::isa_basicblock().

◆ is_returning()

bool mim::plug::clos::ClosLit::is_returning ( )
inline

Definition at line 43 of file clos.h.

References fnc_type(), and mim::Pi::isa_returning().

◆ operator bool()

mim::plug::clos::ClosLit::operator bool ( ) const
inlineexplicit

Definition at line 33 of file clos.h.

◆ operator const Tuple *()

mim::plug::clos::ClosLit::operator const Tuple * ( )
inline

Definition at line 34 of file clos.h.

◆ operator->()

const Tuple * mim::plug::clos::ClosLit::operator-> ( )
inline

Definition at line 36 of file clos.h.

◆ ret_var()

Ref mim::plug::clos::ClosLit::ret_var ( )
inline

Definition at line 30 of file clos.h.

References fnc_as_lam(), and mim::Lam::ret_var().

◆ type()

const Sigma * mim::plug::clos::ClosLit::type ( )
inline

Definition at line 17 of file clos.h.

References mim::Def::type().

Friends And Related Symbol Documentation

◆ isa_clos_lit

ClosLit isa_clos_lit ( Ref def,
bool fn_isa_lam = true )
friend

Tries to match a closure literal.

Definition at line 64 of file clos.cpp.


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