![]() |
mutable
A Database System for Research and Fast Prototyping
|
#include "backend/WasmUtil.hpp"
#include "backend/Interpreter.hpp"
#include "backend/WasmMacro.hpp"
#include "mutable/util/macro.hpp"
#include <mutable/util/concepts.hpp>
#include <optional>
#include <regex>
#include <tuple>
Go to the source code of this file.
Namespaces | |
namespace | options |
| |
namespace | m |
| |
namespace | m::wasm |
Macros | |
#define | UNOP(OP) |
#define | BINOP(OP) |
#define | CMPOP(OP, STRCMP_OP) |
#define | CALL(TYPE) if constexpr (IsStore) store.template operator()<TYPE>(); else load.template operator()<TYPE>() |
#define | CALL(TYPE) if constexpr (IsStore) store.template operator()<TYPE>(); else load.template operator()<TYPE>() |
Functions | |
template<arithmetic T> | |
void | convert_in_place (SQL_t &operand) |
Convert operand of some SQL_t type to the target type. | |
void | convert_in_place (SQL_t &operand, const Numeric *to_type) |
Convert operand to runtime type to_type . | |
template<bool CanBeNull, std::size_t L> | |
std::conditional_t< CanBeNull, _Bool< L >, Bool< L > > | compile_cnf (ExprCompiler &C, const cnf::CNF &cnf) |
template<bool IsStore, std::size_t L, bool SinglePass, bool PointerSharing, VariableKind Kind> requires (L > 0) | |
m::wasm::and (is_pow_2(L)) std | |
Compiles the data layout layout containing tuples of schema layout_schema such that it sequentially stores/loads (depending on. | |
template<bool IsStore> | |
void | m::wasm::compile_data_layout_point_access (const Schema &_tuple_value_schema, const Schema &_tuple_addr_schema, Ptr< void > base_address, const storage::DataLayout &layout, const Schema &layout_schema, U32x1 tuple_id) |
Compiles the data layout layout starting at memory address base_address and containing tuples of schema layout_schema such that it stores/loads the single tuple with schema _tuple_value_schema and ID tuple_id . | |
#define BINOP | ( | OP | ) |
#define CALL | ( | TYPE | ) | if constexpr (IsStore) store.template operator()<TYPE>(); else load.template operator()<TYPE>() |
#define CALL | ( | TYPE | ) | if constexpr (IsStore) store.template operator()<TYPE>(); else load.template operator()<TYPE>() |
#define CMPOP | ( | OP, | |
STRCMP_OP | |||
) |
#define UNOP | ( | OP | ) |
std::conditional_t< CanBeNull, _Bool< L >, Bool< L > > compile_cnf | ( | ExprCompiler & | C, |
const cnf::CNF & | cnf | ||
) |
Definition at line 112 of file WasmUtil.cpp.
References m::and, m::wasm::ExprCompiler::compile(), M_CONSTEXPR_COND, and M_insist.
void convert_in_place | ( | SQL_t & | operand | ) |
Convert operand
of some SQL_t
type to the target type.
T. | |
T | must be a SQL_t type. Conversion is done in place, i.e. the SQL_t instance is directly modified. |
Definition at line 61 of file WasmUtil.cpp.
References M_unreachable.
Referenced by m::wasm::ExprCompiler::operator()().
Convert operand
to runtime type to_type
.
This is done by delegating to convert_in_place<T>
through a dynamic dispatch based on to_type
.
Definition at line 78 of file WasmUtil.cpp.
References M_unreachable, and m::Numeric::size().