![]() |
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 1005 of file WasmDSL.hpp.
|
privatedefault |
|
inlineprivate |
Create a new Block for a given ::wasm::Block.
Definition at line 1033 of file WasmDSL.hpp.
References M_insist.
|
inlineexplicit |
Create an anonymous Block.
Definition at line 1045 of file WasmDSL.hpp.
|
inlineexplicit |
Create a named Block and set it active in the current Module.
Definition at line 1047 of file WasmDSL.hpp.
|
inlineexplicit |
Create a named Block and set it active in the current Module.
Definition at line 1051 of file WasmDSL.hpp.
|
inline |
Definition at line 1053 of file WasmDSL.hpp.
References m::swap().
|
inline |
Definition at line 1055 of file WasmDSL.hpp.
|
inlineprivate |
Definition at line 1066 of file WasmDSL.hpp.
|
inline |
Attaches this Block to the given Block other.
Definition at line 1079 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 1085 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 1112 of file WasmDSL.hpp.
|
inline |
Returns whether this Block is empty, i.e.
contains to expressions.
Definition at line 1076 of file WasmDSL.hpp.
Referenced by m::wasm::and().
|
inlineprivate |
Definition at line 1063 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 1091 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 6984 of file WasmDSL.hpp.
|
inline |
Definition at line 1072 of file WasmDSL.hpp.
References m::wasm::bool.
|
inline |
Definition at line 1073 of file WasmDSL.hpp.
References M_insist.
Referenced by m::wasm::Loop::Loop().
Definition at line 1060 of file WasmDSL.hpp.
References m::swap().
|
inlineprivate |
Definition at line 1064 of file WasmDSL.hpp.
References M_notnull.
Definition at line 1008 of file WasmDSL.hpp.
Definition at line 1011 of file WasmDSL.hpp.
Definition at line 1007 of file WasmDSL.hpp.
Definition at line 1009 of file WasmDSL.hpp.
Definition at line 1010 of file WasmDSL.hpp.
|
friend |
Definition at line 1095 of file WasmDSL.hpp.
Definition at line 1022 of file WasmDSL.hpp.
|
private |
whether this block attaches itself to its parent block
Definition at line 1019 of file WasmDSL.hpp.
|
private |
the parent block, before this block was created
Definition at line 1017 of file WasmDSL.hpp.
|
private |
this block, can be
nullptrif default-constructed or the block has already been attached
Definition at line 1015 of file WasmDSL.hpp.
Referenced by attach_to(), and m::wasm::BlockUser::BlockUser().