![]() |
mutable
A Database System for Research and Fast Prototyping
|
Represents a code block, i.e. More...
#include <WasmDSL.hpp>
Public Member Functions | |
Block (bool attach_to_parent) | |
Create an anonymous Block . | |
Block (std::string name, bool attach_to_parent) | |
Create a named Block and set it active in the current Module . | |
Block (const char *name, bool attach_to_parent) | |
Create a named Block and set it active in the current Module . | |
Block (Block &&other) | |
~Block () | |
Block & | operator= (Block &&other) |
bool | has_name () const |
std::string | name () const |
bool | empty () const |
Returns whether this Block is empty, i.e. | |
void | attach_to (Block &other) |
Attaches this Block to the given Block other . | |
void | attach_to_current () |
Attaches this Block to the wasm::Block currently active in the Module . | |
void | go_to () const |
Emits a jump to the end of this Block . | |
void | go_to (PrimitiveExpr< bool, 1 > cond) const |
Emits a jump to the end of this Block iff cond is fulfilled. | |
void | dump (std::ostream &out) const |
void | dump () const |
Private Member Functions | |
Block ()=default | |
Block (::wasm::Block *block, bool attach_to_parent) | |
Create a new Block for a given ::wasm::Block . | |
::wasm::Block & | get () const |
::wasm::Block & | previous () const |
void | attach_to (::wasm::Block &other) |
Private Attributes | |
::wasm::Block * | this_block_ = nullptr |
| |
::wasm::Block * | parent_block_ = nullptr |
| |
bool | attach_to_parent_ = false |
| |
Friends | |
template<typename T > | |
struct | Function |
struct | BlockUser |
struct | If |
struct | Loop |
struct | DoWhile |
void | swap (Block &first, Block &second) |
std::ostream & | operator<< (std::ostream &out, const Block &B) |
Represents a code block, i.e.
a sequential sequence of code. Necessary to compose conditional control flow and useful for simultaneous code generation at several locations.
Definition at line 1004 of file WasmDSL.hpp.
|
privatedefault |
|
inlineprivate |
Create a new Block
for a given ::wasm::Block
.
Definition at line 1032 of file WasmDSL.hpp.
References M_insist.
|
inlineexplicit |
Create an anonymous Block
.
Definition at line 1044 of file WasmDSL.hpp.
|
inlineexplicit |
Create a named Block
and set it active in the current Module
.
Definition at line 1046 of file WasmDSL.hpp.
|
inlineexplicit |
Create a named Block
and set it active in the current Module
.
Definition at line 1050 of file WasmDSL.hpp.
|
inline |
Definition at line 1052 of file WasmDSL.hpp.
References m::swap().
|
inline |
Definition at line 1054 of file WasmDSL.hpp.
|
inlineprivate |
Definition at line 1065 of file WasmDSL.hpp.
|
inline |
Attaches this Block
to the given Block
other
.
Definition at line 1078 of file WasmDSL.hpp.
References M_insist, M_notnull, and this_block_.
|
inline |
Attaches this Block
to the wasm::Block
currently active in the Module
.
Definition at line 1084 of file WasmDSL.hpp.
References M_insist.
Referenced by m::wasm::and(), m::wasm::Buffer< IsGlobal >::consume(), m::wasm::HashBasedGrouping::execute(), and m::wasm::SortMergeJoin< SortLeft, SortRight, Predicated, CmpPredicated >::execute().
|
inline |
|
inline |
Definition at line 1111 of file WasmDSL.hpp.
|
inline |
Returns whether this Block
is empty, i.e.
contains to expressions.
Definition at line 1075 of file WasmDSL.hpp.
Referenced by m::wasm::and().
|
inlineprivate |
Definition at line 1062 of file WasmDSL.hpp.
References M_notnull.
Referenced by m::wasm::Loop::Loop(), m::wasm::ReturnL(), and m::wasm::If::~If().
|
inline |
Emits a jump to the end of this Block
.
Definition at line 1090 of file WasmDSL.hpp.
Referenced by m::wasm::GOTO().
|
inline |
Emits a jump to the end of this Block
iff cond
is fulfilled.
Definition at line 6983 of file WasmDSL.hpp.
|
inline |
Definition at line 1071 of file WasmDSL.hpp.
References m::wasm::bool.
|
inline |
Definition at line 1072 of file WasmDSL.hpp.
References M_insist.
Referenced by m::wasm::Loop::Loop().
Definition at line 1059 of file WasmDSL.hpp.
References m::swap().
|
inlineprivate |
Definition at line 1063 of file WasmDSL.hpp.
References M_notnull.
Definition at line 1007 of file WasmDSL.hpp.
Definition at line 1010 of file WasmDSL.hpp.
Definition at line 1006 of file WasmDSL.hpp.
Definition at line 1008 of file WasmDSL.hpp.
Definition at line 1009 of file WasmDSL.hpp.
|
friend |
Definition at line 1094 of file WasmDSL.hpp.
Definition at line 1021 of file WasmDSL.hpp.
|
private |
whether this block attaches itself to its parent block
Definition at line 1018 of file WasmDSL.hpp.
|
private |
the parent block, before this block was created
Definition at line 1016 of file WasmDSL.hpp.
|
private |
this block, can be
nullptr
if default-constructed or the block has already been attached
Definition at line 1014 of file WasmDSL.hpp.
Referenced by attach_to(), and m::wasm::BlockUser::BlockUser().