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

Matches (target_0, target_1, ...)#index arg. More...

#include <mim/tuple.h>

Inheritance diagram for mim::Dispatch:
[legend]

Public Member Functions

 Dispatch (const Def *)
 operator bool () const noexcept
const App * app () const
const Def * callee () const
const Def * arg () const
Public Member Functions inherited from mim::Switch
 Switch (const Def *)
 operator bool () const noexcept
const Extract * extract () const
const Def * tuple () const
const Def * index () const
size_t num_targets () const
const Def * target (size_t i) const

Additional Inherited Members

Protected Attributes inherited from mim::Switch
const Extract * extract_ = nullptr

Detailed Description

Matches (target_0, target_1, ...)#index arg.

(target_0, target_1, ...)#index is matched as a Switch.

Note
Subsumes Branch. If you want to deal with Branch separately, match Branch first:
if (auto branch = Branch(def)) {
// special case first
} else if (auto dispatch = Dispatch(def)) {
// now, the generic case
}
Branch(const Def *)
Definition tuple.cpp:97
Dispatch(const Def *)
Definition tuple.cpp:105

Definition at line 466 of file tuple.h.

Constructor & Destructor Documentation

◆ Dispatch()

mim::Dispatch::Dispatch ( const Def * def)

Definition at line 105 of file tuple.cpp.

References mim::Switch::extract(), and mim::Switch::Switch().

Referenced by mim::DispatchNormalize::rewrite_mut_Lam().

Member Function Documentation

◆ app()

const App * mim::Dispatch::app ( ) const
inline

Definition at line 472 of file tuple.h.

Referenced by arg(), and callee().

◆ arg()

const Def * mim::Dispatch::arg ( ) const

Definition at line 111 of file tuple.cpp.

References app(), and mim::App::arg().

◆ callee()

const Def * mim::Dispatch::callee ( ) const

Definition at line 110 of file tuple.cpp.

References app(), and mim::App::callee().

◆ operator bool()

mim::Dispatch::operator bool ( ) const
inlineexplicitnoexcept

Definition at line 470 of file tuple.h.


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