![]() |
mutable
A Database System for Research and Fast Prototyping
|
Helper struct to perform constant folding at compile time. More...
#include <WasmDSL.hpp>
Public Types | |
enum | boolean_result_t { UNDEF , TRUE , FALSE } |
Static Public Member Functions | |
static boolean_result_t | EvalBoolean (const ::wasm::Expression *expr) |
Tries to evaluate the given boolean expression expr using constant folding. | |
Helper struct to perform constant folding at compile time.
Definition at line 621 of file WasmDSL.hpp.
Enumerator | |
---|---|
UNDEF | |
TRUE | |
FALSE |
Definition at line 623 of file WasmDSL.hpp.
|
static |
Tries to evaluate the given boolean expression expr
using constant folding.
Returns UNDEF
if the expression cannot be evaluated at compile time, TRUE
if the expression evaluates to true
at compile time, and FALSE
otherwise. Currently supported are only expressions consisting of a single boolean constant, a negation (tested using eqZ
instruction) of a constant boolean expression, and conjunctions or disjunctions of constant boolean expressions. Expressions like x == x
are currently not supported.
Definition at line 49 of file WasmDSL.cpp.
References CASE, EvalBoolean(), FALSE, M_insist, TRUE, and UNDEF.
Referenced by EvalBoolean(), and m::wasm::If::~If().