mutable
A Database System for Research and Fast Prototyping
Loading...
Searching...
No Matches
Namespaces | Data Structures | Concepts | Typedefs | Enumerations | Functions | Variables
m::wasm Namespace Reference

Namespaces

namespace  detail
 

Data Structures

struct  _int
 Helper type to deduce the signed integral type with a given byte width. More...
 
struct  _int< 1 >
 
struct  _int< 2 >
 
struct  _int< 4 >
 
struct  _int< 8 >
 
struct  Aggregation
 
struct  Allocator
 
struct  Bit
 
struct  Block
 Represents a code block, i.e. More...
 
struct  BlockUser
 A helper class to use a Block, thereby setting the Block active for code generation. More...
 
struct  branch_target_t
 Stores the "branch targets" introduced by control flow structures, i.e. More...
 
struct  Buffer
 Buffers tuples by materializing them into memory. More...
 
struct  buffer_load_proxy_t
 Proxy to implement loads from a buffer. More...
 
class  buffer_storage
 
class  buffer_storage< false >
 
class  buffer_storage< true >
 
struct  buffer_store_proxy_t
 Proxy to implement stores to a buffer. More...
 
struct  buffer_swap_proxy_t
 Proxy to implement swaps in a buffer. More...
 
struct  Callback
 
class  chained_hash_table_storage
 
class  chained_hash_table_storage< false >
 
class  chained_hash_table_storage< true >
 
struct  ChainedHashTable
 
struct  CodeGenContext
 The Wasm CodeGenContext provides context information necessary for code generation. More...
 
struct  ConstantFolding
 Helper struct to perform constant folding at compile time. More...
 
struct  Decimal
 
struct  DoWhile
 
struct  Environment
 Binds Schema::Identifiers to Expr<T>s. More...
 
struct  exception
 
struct  Expr
 
struct  expr
 Helper type to deduce the Expr<U> type given a. More...
 
struct  expr< detail::the_reference< T, L, IsConst > >
 Specialization for. More...
 
struct  expr< Expr< T, L > >
 Specialization for. More...
 
struct  expr< Parameter< T, L > >
 Specialization for. More...
 
struct  expr< PrimitiveExpr< T, L > >
 Specialization for. More...
 
struct  expr< T >
 Specialization for decayable. More...
 
struct  Expr< T, L >
 An Expr<T, L> combines a PrimitiveExpr<T, L> value with a PrimitiveExpr<bool, L>, called NULL information, to implement a value with three-valued logic (3VL). More...
 
struct  expr< Variable< T, Kind, CanBeNull, L > >
 Specialization for. More...
 
struct  ExprCompiler
 Compiles AST expressions m::Expr to Wasm ASTs m::wasm::Expr<T>. More...
 
struct  Filter
 
struct  Function
 Represents a Wasm function. More...
 
struct  Function< void(PrimitiveExpr< ParamTypes, ParamLs >...)>
 
struct  FunctionProxy
 A handle to create a Function and to create invocations of that function. More...
 
struct  FunctionProxy< void(PrimitiveExpr< ParamTypes, ParamLs >...)>
 
struct  GarbageCollectedData
 Helper struct for garbage collection done by the Module. More...
 
struct  HashBasedGrouping
 
struct  HashBasedGroupJoin
 
struct  HashTable
 Hash table to hash key-value pairs in memory. More...
 
struct  If
 
struct  IndexScan
 
struct  invoke_interpreter
 
struct  invoke_v8
 
struct  is_sql_addr_type
 
struct  is_sql_type
 
struct  LazyDisjunctiveFilter
 
struct  Limit
 
struct  LinearProbing
 Linear probing strategy, i.e. More...
 
struct  LocalBit
 
struct  LocalBitmap
 
struct  LocalBitvector
 
struct  Loop
 Implements a loop which iterates exactly once unless explicitly continue-ed. More...
 
struct  MatchBase
 An abstract MatchBase for the WasmV8 backend. More...
 
struct  MatchLeaf
 Intermediate match type for leaves, i.e. More...
 
struct  MatchMultipleChildren
 Intermediate match type for physical operator matches with multiple children. More...
 
struct  MatchSingleChild
 Intermediate match type for physical operator matches with a single child. More...
 
struct  Module
 
struct  NChar
 
struct  NestedLoopsJoin
 
struct  NoOp
 
struct  NoOpSorting
 
class  open_addressing_hash_table_layout
 
class  open_addressing_hash_table_layout< false >
 
class  open_addressing_hash_table_layout< true >
 
class  open_addressing_hash_table_storage
 
class  open_addressing_hash_table_storage< false >
 
class  open_addressing_hash_table_storage< true >
 
struct  OpenAddressingHashTable
 
struct  OpenAddressingHashTableBase
 
struct  OrderedGrouping
 
struct  Parameter
 
struct  Parameter< T, L >
 A type to access function parameters. More...
 
struct  primitive_expr
 Helper type to deduce the PrimitiveExpr<U> type given a type. More...
 
struct  primitive_expr< detail::the_reference< T, L, IsConst > >
 Specialization for. More...
 
struct  primitive_expr< Parameter< T, L > >
 Specialization for. More...
 
struct  primitive_expr< PrimitiveExpr< T, L > >
 Specialization for. More...
 
struct  primitive_expr< T >
 Specialization for decayable. More...
 
struct  primitive_expr< Variable< T, Kind, false, L > >
 Specialization for. More...
 
struct  PrimitiveExpr
 
struct  Print
 
struct  print_types
 A helper type to print Wasm types. More...
 
struct  print_types< param_pack_t< T >, L >
 Prints the Wasm type for. More...
 
struct  print_types< param_pack_t< T, Ts... >, L, Ls... >
 Prints the Wasm type for. More...
 
struct  Projection
 
struct  QuadraticProbing
 Quadratic probing strategy, i.e. More...
 
struct  Quicksort
 
struct  Scan
 
struct  Scope
 
struct  SimpleHashJoin
 
struct  SortMergeJoin
 
struct  ThePostOrderMatchBaseVisitor
 
struct  ThePreOrderMatchBaseVisitor
 
struct  TheRecursiveMatchBaseVisitorBase
 A generic base class for implementing recursive wasm::MatchBase visitors. More...
 
struct  uint
 Helper type to deduce the unsigned integral type with a given byte width. More...
 
struct  uint< 1 >
 
struct  uint< 2 >
 
struct  uint< 4 >
 
struct  uint< 8 >
 
struct  Variable
 
struct  Variable< T, Kind, CanBeNull, L >
 
struct  While
 

Concepts

concept  dsl_primitive
 Check whether.
 
concept  dsl_pointer_to_primitive
 Check whether.
 
concept  primitive_convertible
 Detects whether a type.
 
concept  expr_convertible
 Detect whether a type.
 
concept  arithmetically_combinable
 
concept  sql_addr_type
 
concept  sql_boolean_type
 

Typedefs

using LocalChainedHashTable = ChainedHashTable< false >
 
using GlobalChainedHashTable = ChainedHashTable< true >
 
using LocalOpenAddressingOutOfPlaceHashTable = OpenAddressingHashTable< false, false >
 
using GlobalOpenAddressingOutOfPlaceHashTable = OpenAddressingHashTable< true, false >
 
using LocalOpenAddressingInPlaceHashTable = OpenAddressingHashTable< false, true >
 
using GlobalOpenAddressingInPlaceHashTable = OpenAddressingHashTable< true, true >
 
template<typename T , std::size_t L = 1>
using Reference = detail::the_reference< T, L, false >
 
template<typename T , std::size_t L = 1>
using ConstReference = detail::the_reference< T, L, true >
 
template<typename T >
using primitive_expr_t = typename primitive_expr< T >::type
 Convenience alias for primitive_expr.
 
template<typename T >
using expr_t = typename expr< T >::type
 Convenience alias for expr.
 
template<std::size_t W>
using int_t = typename _int< W >::type
 
template<std::size_t W>
using uint_t = typename uint< W >::type
 
using To = std::conditional_t< std::is_signed_v< T >, int16_t, uint16_t >
 
using vector_type = PrimitiveExpr< T, 16/sizeof(T)>
 

‍the type of a single fully utilized vector


 
template<typename T >
using Ptr = typename detail::ptr_helper< T >::type
 Alias to easily declare PrimitiveExpr of pointer to primitive type.
 
template<typename T >
using Var = typename detail::var_helper< T >::type
 Local variable.
 
template<typename T >
using _Var = typename detail::_var_helper< T >::type
 Local variable that can always be NULL.
 
template<typename T >
using Global = typename detail::global_helper< T >::type
 Global variable.
 
using RecursiveConstMatchBaseVisitorBase = TheRecursiveMatchBaseVisitorBase< true >
 
using ConstPreOrderMatchBaseVisitor = ThePreOrderMatchBaseVisitor< true >
 
using ConstPostOrderMatchBaseVisitor = ThePostOrderMatchBaseVisitor< true >
 
using Decimal32 = Decimal< int32_t >
 
using Decimal64 = Decimal< int64_t >
 
using SQL_t = std::variant< std::monostate #define ADD_TYPE(TYPE) SQL_TYPES(ADD_TYPE) >
 
using SQL_addr_t = std::variant< std::monostate #define ADD_TYPE(TYPE) SQL_ADDR_TYPES(ADD_TYPE) >
 
using SQL_boolean_t = std::variant< std::monostate, _Boolx1, _Boolx16, _Boolx32 >
 
using LocalBuffer = Buffer< false >
 
using GlobalBuffer = Buffer< true >
 

Enumerations

enum class  VariableKind { Local , Param , Global }
 Declares the kind of a variable: local, parameter, or global. More...
 
enum  cmp_op {
  EQ , NE , LT , LE ,
  GT , GE
}
 

‍comparison operations, e.g. for string comparison

More...
 

Functions

template<bool CmpPredicated, bool IsGlobal>
void quicksort (Buffer< IsGlobal > &buffer, const std::vector< SortingOperator::order_type > &order)
 Sorts the buffer buffer using the quicksort algorithm and a branchless binary partition algorithm.
 
U64x1 murmur3_bit_mix (U64x1 bits)
 Mixes the bits of bits using the Murmur3 algorithm.
 
U64x1 fnv_1a (Ptr< U8x1 > bytes, U32x1 num_bytes)
 Hashes num_bytes bytes of bytes using the FNV-1a algorithm.
 
U64x1 str_hash (NChar str)
 Hashes the string str.
 
U64x1 murmur3_64a_hash (std::vector< std::pair< const Type *, SQL_t > > values)
 Hashes the elements of values where the first element is the type of the value to hash and the second element is the value itself using the Murmur3-64a algorithm.
 
template void quicksort< false > (GlobalBuffer &, const std::vector< SortingOperator::order_type > &)
 
template void quicksort< true > (GlobalBuffer &, const std::vector< SortingOperator::order_type > &)
 
template<typename T , std::size_t L>
auto wasm_type ()
 
std::string unique (std::string prefix, unsigned &counter)
 Creates a unique name from a given prefix and a counter.
 
template<typename T , std::size_t L, bool = false, typename U >
requires (L == 1)
and std::floating_point< T > and std::floating_point< U >inline ::wasm::Literal make_literal (U value)
 Creates a ::wasm::Literal of type.
 
template<typename T , std::size_t L, bool = false, typename U >
requires (L == 1)
and signed_integral< T > and integral< U >inline ::wasm::Literal make_literal (U value)
 Creates a ::wasm::Literal of type.
 
template<typename T , std::size_t L, bool = false, typename U >
requires (L == 1)
and unsigned_integral< T > and integral< U >inline ::wasm::Literal make_literal (U value)
 Creates a ::wasm::Literal of type.
 
template<typename T , std::size_t L, bool VecRepr = false, typename U >
requires (L == 1)
and boolean< T > and boolean< U >inline ::wasm::Literal make_literal (U value)
 Creates a ::wasm::Literal of type.
 
template<typename T , std::size_t L, bool = false>
requires (L == 1)
and std::is_pointer_v< T >inline ::wasm::Literal make_literal (uint32_t value)
 Creates a ::wasm::Literal of type.
 
template<typename T , std::size_t L, bool = false, typename U >
requires (L > 1) (U value)
 and (L *sizeof(T)<=16) and
 Creates a ::wasm::Literal for.
 
inline ::wasm::Literal make_literal (U value)
 
template<typename T , std::size_t L, bool = false, typename U >
requires (L > 1)
 and (L *sizeof(T) > 16) and((L *sizeof(T)) % 16
 Creates a ::wasm::Literal for.
 
Lsizeof (T))/16 > make_literal(U value)
 
template<typename T , std::size_t L, bool = false, typename... Us>
requires (L > 1)
 and (L *sizeof(T)<=16) and(L
 Creates a ::wasm::Literal for.
 
std::size_t typename Us and (L *sizeof(T) > 16) and((L *sizeof(T)) % 16
 
::wasm::Literals insist_interpreter (::wasm::Literals &args)
 Reports a runtime error.
 
::wasm::Literals throw_interpreter (::wasm::Literals &args)
 Throws an exception.
 
template<typename ReturnType , typename... ParamTypes, std::size_t ReturnL, std::size_t... ParamLs>
requires ((std::is_void_v<ReturnType> and (ReturnL == 1)) or requires { typename PrimitiveExpr<ReturnType, ReturnL>; })
 and (not dsl_primitive< ReturnType > or(ReturnL *sizeof(ReturnType)<=16)) and(
 
and and ((not dsl_primitive< ParamTypes > or(ParamLs *sizeof(ParamTypes)<=16)) and ...) struct Function< PrimitiveExpr< ReturnType
 
and ReturnL (PrimitiveExpr< ParamTypes, ParamLs >...)>
 
template<dsl_primitive T, std::size_t L>
requires (L > 0)
 and (is_pow_2(L)) and(L *sizeof(T)<
 Specialization of PrimitiveExpr<T, L> for primitive type.
 
 PrimitiveExpr ()=default
 

‍Constructs an empty PrimitiveExpr, for which operator bool() returns false.


 
 PrimitiveExpr (::wasm::Expression *expr, std::list< std::shared_ptr< Bit > > referenced_bits={})
 

‍Constructs a PrimitiveExpr from a Binaryen ::wasm::Expression expr and the referenced_bits.


 
 PrimitiveExpr (std::pair<::wasm::Expression *, std::list< std::shared_ptr< Bit > > > expr)
 Constructs a PrimitiveExpr from a std::pair of a Binaryen ::wasm::Expression expr and the referenced_bits.
 
 PrimitiveExpr (const std::array< uint8_t, 16 > &bytes)
 Constructs a PrimitiveExpr from a byte array bytes.
 
 PrimitiveExpr (std::array< PrimitiveExpr, 1 > vectors)
 Constructs a PrimitiveExpr from a vector array vectors containing a single PrimitiveExpr.
 
 PrimitiveExpr (Us... value)
 
template<decayable... Us>
requires (sizeof...(Us) > 0) (Us... us)
 and (dsl_primitive< std::decay_t< Us > > and ...) and
 Constructs a new PrimitiveExpr from a decayable constant value.
 
 PrimitiveExpr (const PrimitiveExpr &)=delete
 
 PrimitiveExpr (PrimitiveExpr &other)
 Constructs a new PrimitiveExpr by moving the underlying expr_ and referenced_bits_ of other to this.
 
 PrimitiveExpr (PrimitiveExpr &&other)
 Constructs a new PrimitiveExpr by moving the underlying expr_ and referenced_bits_ of other to this.
 
PrimitiveExproperator= (PrimitiveExpr other)
 Assigns other to this.
 
 ~PrimitiveExpr ()
 
::wasm::Expression * expr ()
 Moves the underlying Binaryen ::wasm::Expression out of this.
 
std::list< std::shared_ptr< Bit > > referenced_bits ()
 Moves the referenced bits out of this.
 
template<dsl_primitive U = T, std::size_t M = L>
std::pair<::wasm::Expression *, std::list< std::shared_ptr< Bit > > > move ()
 Moves the underlying Binaryen ::wasm::Expression and the referenced bits out of this.
 
 operator bool () const
 Returns true if this PrimitiveExpr actually holds a value (Binaryen AST), false otherwise.
 
PrimitiveExpr clone () const
 Creates and returns a deep copy of this.
 
void discard ()
 Discards this.
 
template<dsl_primitive ResultType, std::size_t ResultL>
PrimitiveExpr< ResultType, ResultL > unary (::wasm::UnaryOp op)
 Helper function to implement unary operations.
 
template<dsl_primitive ResultType, std::size_t ResultL, dsl_primitive OperandType, std::size_t OperandL>
PrimitiveExpr< ResultType, ResultL > binary (::wasm::BinaryOp op, PrimitiveExpr< OperandType, OperandL > other)
 Helper function to implement binary operations.
 
template<dsl_primitive U, std::size_t M>
PrimitiveExpr< U, M > convert ()
 
template<dsl_primitive To, std::size_t ToL = L>
requires (L == ToL)
and same_signedness< T, Toand (integral< T >==integral< To >) and(sizeof(T)<
 Implicit conversion of a PrimitiveExpr<T, L> to a PrimitiveExpr<To, ToL>.
 
template<dsl_primitive To, std::size_t ToL = L>
requires (L == ToL)
 and (same_signedness< T, To > or boolean< T > or std::same_as< T, char > or boolean< To > or std::same_as< To, char >) and((L !
 Explicit conversion of a PrimitiveExpr<T, L> to a PrimitiveExpr<To, ToL>.
 
To and ((L==1) or(std::is_convertible_v< T, To > and not(integral< T > and integral< To > and sizeof(T) > sizeof(To)) and not(integral< T > and sizeof(T)==8 and std::floating_point< To >) and not(std::floating_point< T > and integral< To > and sizeof(To)<=2))) PrimitiveExpr< To
 
To ToL to ()
 
template<dsl_pointer_to_primitive To, std::size_t ToL = L>
requires std::same_as<T, uint32_t>
PrimitiveExpr< To, ToLto () and(L
 Explicit conversion of a PrimitiveExpr<uint32_t, 1> to a PrimitiveExpr<To*, ToL>
 
PrimitiveExpr< To, ToL > std::size_t ToL reinterpret ()
 
template<std::size_t ToL>
requires (L == 1)
 and (ToL > 1) and(ToL *sizeof(T)<
 Broadcasts a PrimitiveExpr<T, 1> to a PrimitiveExpr<T, ToL>.
 
ToL broadcast ()
 
PrimitiveExpr operator+ ()
 
PrimitiveExpr operator- () and(L
 
PrimitiveExpr L add_pairwise () and(sizeof(T)
 
PrimitiveExpr L L L L bitmask () and(L > 1)
 Concatenates the most significant bit of each value of this into a single mask.
 
PrimitiveExpr< bool, Leqz () and(L
 
PrimitiveExpr< bool, Lany_true () and(L > 1)
 Returns true iff any value is non-zero.
 
PrimitiveExpr< bool, 1 > all_true () and(L > 1)
 Returns true iff all values are true.
 
PrimitiveExpr< uint64_t, Lhash () and(L
 
PrimitiveExpr< uint64_t, L > L L L L L auto operator+ (PrimitiveExpr< U, L > other) -> PrimitiveExpr< common_type_t< T, U >, L >
 
template<arithmetic U>
requires same_signedness<T, U>
and arithmetically_combinable< T, U, L > auto operator- (PrimitiveExpr< U, L > other) -> PrimitiveExpr< common_type_t< T, U >, L >
 Subtracts other from this.
 
template<arithmetic U>
requires arithmetically_combinable<T, U, L> (L == 1)
auto operator* (PrimitiveExpr< U, L > other) -> PrimitiveExpr< common_type_t< T, U >, L >
 Multiplies this and other.
 
template<arithmetic U>
requires arithmetically_combinable<T, U, L>
 and (sizeof(common_type_t< T, U >) !=1) auto operator*(PrimitiveExpr< U
 Multiplies this and other.
 
if constexpr (L *sizeof(To)<=16) return binary< To
 
if L (op, other)
 
else return this template to< To, L > ().operator*(other.template to< To
 
template<arithmetic U>
requires arithmetically_combinable<T, U, L>
 and (sizeof(common_type_t< T, U >)==1) auto operator*(PrimitiveExpr< U
 Multiplies this and other.
 
referenced_bits_low splice (referenced_bits_low.end(), other_cpy.referenced_bits())
 
referenced_bits_high splice (referenced_bits_high.end(), other.referenced_bits())
 
return PrimitiveExpr< common_type_t< T, U >, L > (ShuffleBytes(low, high, indices).move())
 
template<arithmetic U>
requires same_signedness<T, U> (L == 1)
and arithmetically_combinable< T, U, L > auto operator/ (PrimitiveExpr< U, L > other) -> PrimitiveExpr< common_type_t< T, U >, L >
 Divides this by other.
 
template<std::floating_point U>
requires arithmetically_combinable<T, U, L>
auto operator/ (PrimitiveExpr< U, L > other) -> PrimitiveExpr< common_type_t< T, U >, L > std
 Divides this by other.
 
template<integral U>
requires same_signedness<T, U>
and arithmetically_combinable< T, U, L > auto operator% (PrimitiveExpr< U, L > other) -> PrimitiveExpr< common_type_t< T, U >, L > integral< T > and(L
 Computes the remainder of dividing this by other.
 
and arithmetically_combinable< T, U, L > auto L auto copy_sign (PrimitiveExpr< U, L > other) -> PrimitiveExpr< common_type_t< T, U >, L > and(L
 
and arithmetically_combinable< T, U, L > auto L auto L auto min (PrimitiveExpr< U, L > other) -> PrimitiveExpr< common_type_t< T, U >, L >
 
L other PrimitiveExpr< common_type_t< T, U >, Land (L > 1)
 
template<std::floating_point U>
requires arithmetically_combinable<T, U, L>
auto max (PrimitiveExpr< U, L > other) -> PrimitiveExpr< common_type_t< T, U >, L > std
 Computes the maximum of this and other.
 
template<unsigned_integral U>
requires arithmetically_combinable<T, U, L>
 and (sizeof(common_type_t< T, U >)<=2) auto avg(PrimitiveExpr< U
 Computes the (ceiled) average of this and other.
 
template<std::integral U>
requires arithmetically_combinable<T, U, L>
auto operator bitand (PrimitiveExpr< U, L > other) -> PrimitiveExpr< common_type_t< T, U >, L > std
 Computes the bitwise and of this and other.
 
template<integral U>
requires requires (PrimitiveExpr<U, 1> e) { PrimitiveExpr<std::conditional_t<std::is_signed_v<T>, int32_t, uint32_t>, 1>(e); }
PrimitiveExpr operator<< (PrimitiveExpr< U, 1 > other) integral< T > and(L > 1)
 Shifts this left by other.
 
template<integral U>
requires arithmetically_combinable<T, U, L>
auto operator>> (PrimitiveExpr< U, L > other) -> PrimitiveExpr< common_type_t< T, U >, L > integral< T > and(L
 Shifts this right by other.
 
auto L and (sizeof(common_type_t< T, U >) >=4) auto rotl(PrimitiveExpr< U
 
auto L L other PrimitiveExpr< common_type_t< T, U >, Land (L==1)
 
template<integral U>
requires arithmetically_combinable<T, U, L>
 and (sizeof(common_type_t< T, U >) >=4) auto rotr(PrimitiveExpr< U
 Rotates this right by other.
 
template<dsl_primitive U>
requires same_signedness<T, U>
and arithmetically_combinable< T, U, L > PrimitiveExpr< bool, Loperator== (PrimitiveExpr< U, L > other)
 Checks whether this equals other.
 
template<dsl_primitive U>
requires same_signedness<T, U>
and arithmetically_combinable< T, U, L > PrimitiveExpr< bool, Loperator!= (PrimitiveExpr< U, L > other)
 Checks whether this unequal to other.
 
template<arithmetic U>
requires same_signedness<T, U>
and arithmetically_combinable< T, U, L > PrimitiveExpr< bool, Loperator< (PrimitiveExpr< U, L > other) arithmetic< T >
 Checks whether this less than other.
 
template<arithmetic U>
requires same_signedness<T, U>
and arithmetically_combinable< T, U, L > PrimitiveExpr< bool, Loperator<= (PrimitiveExpr< U, L > other) arithmetic< T >
 Checks whether this less than or equals to other.
 
template<arithmetic U>
requires same_signedness<T, U>
and arithmetically_combinable< T, U, L > PrimitiveExpr< bool, Loperator> (PrimitiveExpr< U, L > other) arithmetic< T >
 Checks whether this greater than to other.
 
template<arithmetic U>
requires same_signedness<T, U>
and arithmetically_combinable< T, U, L > PrimitiveExpr< bool, Loperator>= (PrimitiveExpr< U, L > other) arithmetic< T >
 Checks whether this greater than or equals to other.
 
template<boolean U>
requires boolean<T>
PrimitiveExpr< bool, Loperator and (PrimitiveExpr< U, L > other)
 Computes the logical conjunction (and) of this and other.
 
template<boolean U>
requires boolean<T>
PrimitiveExpr< bool, Land_not (PrimitiveExpr< U, L > other) and(L > 1)
 Computes the logical conjunction (and) of this and the logical negation (not) of other.
 
template<boolean U>
requires boolean<T>
PrimitiveExpr< bool, Loperator or (PrimitiveExpr< U, L > other)
 Computes the logical disjunction (or) of this and other.
 
template<std::size_t M>
requires (M * sizeof(T) < 16)
PrimitiveExpr< T, 1 > extract_unsafe ()
 Extracts the.
 
template<std::size_t M>
requires (M < L) (L > 1)
PrimitiveExpr< T, 1 > extract ()
 Extracts the.
 
PrimitiveExpr replace (U &&_value)
 
PrimitiveExpr swizzle_bytes (PrimitiveExpr< uint8_t, 16 > indices)
 Selects lanes of this in byte granularity depending on the indices specified by indices.
 
template<std::size_t M>
requires (M > 0)
 and (M<=16) and(M % sizeof(T)
 Selects lanes of this in byte granularity depending on the indices specified by indices.
 
template<std::size_t M>
requires (M > 0)
 and (is_pow_2(M)) and(M *sizeof(T)<
 Selects lanes of this in lane granularity depending on the indices specified by indices.
 
swizzle_lanes (const std::array< uint8_t, M > &_indices)
 
std::ostream & operator<< (std::ostream &out, const PrimitiveExpr &P)
 
void dump (std::ostream &out) const
 
void dump () const
 
template<dsl_primitive T, std::size_t L>
requires (L > 1)
 and (is_pow_2(L)) and(L *sizeof(T) > 16) and((L *sizeof(T)) % 16
 Specialization of PrimitiveExpr<T, L> for primitive type.
 
 PrimitiveExpr (std::array< vector_type, num_vectors > vectors)
 

‍Constructs a PrimitiveExpr from an array of fully utilized PrimitiveExprs vectors.


 
 PrimitiveExpr (std::initializer_list< vector_type > vectors)
 

‍Constructs a PrimitiveExpr from an initializer list of fully utilized PrimitiveExprs vectors.


 
PrimitiveExproperator= (PrimitiveExpr &&)=delete
 
std::array< vector_type, num_vectorsvectors ()
 Moves the underlying PrimitiveExpr<T, 16 / sizeof(T)>s out of this.
 
template<dsl_primitive U, std::size_t M>
requires ((M * sizeof(U)) / 16 == num_vectors)
auto move ()
 Moves the underlying vectors as PrimitiveExpr<U, 16 / sizeof(U)> out of this.
 
template<dsl_primitive U, std::size_t M>
requires ((M * sizeof(U)) % 16 == 0)
PrimitiveExpr< U, M > convert ()
 
auto make_signed ()
 Conversion of a PrimitiveExpr<T, L> to a PrimitiveExpr<std::make_signed_t<T>, L>.
 
auto make_unsigned ()
 Conversion of a PrimitiveExpr<T, L> to a PrimitiveExpr<std::make_unsigned_t<T>, L>.
 
 UNARY (operator+)UNARY(operator-)UNARY(abs) UNARY(ceil) UNARY(floor) UNARY(trunc) UNARY(nearest) UNARY(sqrt) UNARY(add_pairwise) UNARY(operator~)UNARY(popcnt) UNARY(operator not) PrimitiveExpr< uint32_t
 Concatenates the most significant bit (or the boolean value if this is boolean) of each value of this into a single mask.
 
 BINARY (operator+)BINARY(operator-)BINARY(operator*)BINARY(operator/)BINARY(min) BINARY(max) BINARY(avg) BINARY(operator bitand) BINARY(operator bitor) BINARY(operator xor) BINARY(operator and) BINARY(and_not) BINARY(operator or) SHIFT(operator<<) SHIFT(operator>>) private
 Transforms a comparison result into its boolean representation.
 
template<std::size_t M>
requires (M < L)
PrimitiveExpr< T, 1 > extract ()
 Extracts the.
 
template<std::size_t M, primitive_convertible U>
requires (M < L) requires (vector_type v) { v.replace<0>(std::forward<U>(value)); }
PrimitiveExpr replace (U &&value)
 Replaces the.
 
 BINARY_LIST (MAKE_BINARY) template< dsl_pointer_to_primitive T
 Specialization of PrimitiveExpr<T, L> for pointer to primitive type.
 
std::size_t L and (is_pow_2(L)) and((L
 
template<typename T , std::size_t L>
 Expr (PrimitiveExpr< T, L >, PrimitiveExpr< bool, L >) -> Expr< T, L >
 CTAD guide for Expr
 
Bool USING (int8_t, I8) USING(uint8_t
 
Bool U8 USING (int16_t, I16) USING(uint16_t
 
Bool U8 U16 USING (int32_t, I32) USING(uint32_t
 
Bool U8 U16 U32 USING (int64_t, I64) USING(uint64_t
 
Bool U8 U16 U32 U64 USING (float, Float) USING(double
 
Bool U8 U16 U32 U64 Double USING_N (char, 1, Charx1) USING_N(char
 

‍this is neither signed nor unsigned char (see https://en.cppreference.com/w/cpp/language/types, Character types)


 
Bool U8 U16 U32 U64 Double Charx16 USING_N (char, 32, Charx32) namespace detail
 
template<typename T , VariableKind Kind, bool CanBeNull, std::size_t L>
requires (not (dsl_pointer_to_primitive<T> and CanBeNull))
 and (not(Kind==VariableKind::Global and CanBeNull)) and
 
template<dsl_pointer_to_primitive T, VariableKind Kind, bool CanBeNull, std::size_t L>
requires requires (const Variable<T, Kind, CanBeNull, L> &var, typename PrimitiveExpr<T, L>::offset_t delta) { var.val().operator+(delta); }
auto operator+ (const Variable< T, Kind, CanBeNull, L > &var, typename PrimitiveExpr< T, L >::offset_t delta)
 
template<dsl_pointer_to_primitive T, VariableKind Kind, bool CanBeNull, std::size_t L>
requires requires (const Variable<T, Kind, CanBeNull, L> &var, typename PrimitiveExpr<T, L>::offset_t delta) { var.val().operator-(delta); }
auto operator- (const Variable< T, Kind, CanBeNull, L > &var, typename PrimitiveExpr< T, L >::offset_t delta)
 
template<std::size_t L>
requires (L > 0)
and(L<=16) struct LocalBit< L > void RETURN_UNSAFE ()
 A scalar bit or a vector of bits that is managed by the current function's stack.
 
template<primitive_convertible T>
void RETURN_UNSAFE (T &&t)
 
template<expr_convertible T>
requires (not primitive_convertible<T>)
void RETURN_UNSAFE (T &&t)
 
void BREAK (std::size_t level=1)
 
template<primitive_convertible C>
requires requires (C &&c) { PrimitiveExpr<bool, 1>(std::forward<C>(c)); }
void BREAK (C &&_cond, std::size_t level=1)
 
void CONTINUE (std::size_t level=1)
 
template<primitive_convertible C>
requires requires (C &&c) { PrimitiveExpr<bool, 1>(std::forward<C>(c)); }
void CONTINUE (C &&_cond, std::size_t level=1)
 
void GOTO (const Block &block)
 Jumps to the end of block.
 
template<primitive_convertible C>
requires requires (C &&c) { PrimitiveExpr<bool, 1>(std::forward<C>(c)); }
void GOTO (C &&_cond, const Block &block)
 
template<primitive_convertible C, primitive_convertible T, primitive_convertible U>
requires have_common_type<typename primitive_expr_t<T>::type, typename primitive_expr_t<U>::type> (C &&c)
 and (primitive_expr_t< T >::num_simd_lanes==primitive_expr_t< U >::num_simd_lanes) and
 
auto Select (C &&_cond, T &&_tru, U &&_fals)
 
template<primitive_convertible C, expr_convertible T, expr_convertible U>
requires (not primitive_convertible<T> or not primitive_convertible<U>) (C &&c)
and have_common_type< typename expr_t< T >::type, typename expr_t< U >::type > and (expr_t< T >::num_simd_lanes==expr_t< U >::num_simd_lanes) and
 
template<primitive_convertible C, primitive_convertible T, primitive_convertible U>
requires have_common_type<typename primitive_expr_t<T>::type, typename primitive_expr_t<U>::type>
 and (primitive_expr_t< T >::num_simd_lanes==primitive_expr_t< U >::num_simd_lanes) and(primitive_expr_t< T >
 
template<primitive_convertible C, expr_convertible T, expr_convertible U>
requires (not primitive_convertible<T> or not primitive_convertible<U>)
and have_common_type< typename expr_t< T >::type, typename expr_t< U >::type > and (expr_t< T >::num_simd_lanes==expr_t< U >::num_simd_lanes) and(expr_t< T >
 
template<primitive_convertible T, primitive_convertible U, std::size_t M>
requires have_common_type<typename primitive_expr_t<T>::type, typename primitive_expr_t<U>::type> (PrimitiveExpr<common_type_t<typename primitive_expr_t<T>::type, typename primitive_expr_t<U>::type>, primitive_expr_t<T>::num_simd_lanes> e, const std::array<uint8_t, M> &a)
 and (primitive_expr_t< T >::num_simd_lanes==primitive_expr_t< U >::num_simd_lanes) and
 
auto ShuffleBytes (T &&_first, U &&_second, const std::array< uint8_t, M > &indices)
 
auto ShuffleLanes (T &&_first, U &&_second, const std::array< uint8_t, M > &indices)
 
template<expr_convertible T, expr_convertible U, std::size_t M>
requires (not primitive_convertible<T> or not primitive_convertible<U>) (Expr<common_type_t<typename expr_t<T>::type, typename expr_t<U>::type>, expr_t<T>::num_simd_lanes> e, const std::array<uint8_t, M> &a)
and have_common_type< typename expr_t< T >::type, typename expr_t< U >::type > and (expr_t< T >::num_simd_lanes==expr_t< U >::num_simd_lanes) and
 
template<std::size_t L>
requires (L > 0)
 and (L<=16) inline LocalBit< L > Module
 
template<typename T , std::size_t L, std::size_t M>
requires (L > 1)
 and (L *sizeof(T)<=16) and(M > 0) and(M<
 
 M_DECLARE_VISITOR (MatchBaseVisitor, wasm::MatchBase, M_WASM_VISITABLE_MATCH_LIST) M_DECLARE_VISITOR(ConstMatchBaseVisitor
 
 M_MAKE_STL_VISITABLE (ConstPreOrderMatchBaseVisitor, const wasm::MatchBase, M_WASM_VISITABLE_MATCH_LIST) M_MAKE_STL_VISITABLE(ConstPostOrderMatchBaseVisitor
 
template<bool IsStore, std::size_t L, bool SinglePass, bool PointerSharing, VariableKind Kind>
requires (L > 0)
 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 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.
 
template<typename Base >
requires expr_convertible<Base>
and signed_integral< typename expr_t< Base >::type > Decimal< typename expr_t< Base >::type > operator+ (Base &&left, Decimal< typename expr_t< Base >::type > right)
 
template<typename Base >
requires expr_convertible<Base>
and signed_integral< typename expr_t< Base >::type > Decimal< typename expr_t< Base >::type > operator- (Base &&left, Decimal< typename expr_t< Base >::type > right)
 
template<typename Base >
requires expr_convertible<Base>
and signed_integral< typename expr_t< Base >::type > Decimal< typename expr_t< Base >::type > operator* (Base &&left, Decimal< typename expr_t< Base >::type > right)
 
template<typename Base >
requires expr_convertible<Base>
and signed_integral< typename expr_t< Base >::type > Decimal< typename expr_t< Base >::type > operator/ (Base &&left, Decimal< typename expr_t< Base >::type > right)
 
 SQL_TYPES (ADD_EXPR_SQL_TYPE) SQL_ADDR_TYPES(ADD_EXPR_SQL_ADDR_TYPE) template< typename T > concept sql_type
 
void discard (SQL_t &variant)
 
void discard (SQL_addr_t &variant)
 
template<sql_type To>
To convert (SQL_t &variant)
 
bool can_be_null (const SQL_t &variant)
 
template<std::size_t L = 1>
Bool< Lis_null (SQL_t &variant)
 
template<std::size_t L = 1>
Bool< Lnot_null (SQL_t &variant)
 
template<VariableKind Kind>
std::tuple< Block, Block, Blockcompile_store_sequential (const Schema &tuple_value_schema, const Schema &tuple_addr_schema, Ptr< void > base_address, const storage::DataLayout &layout, std::size_t num_simd_lanes, const Schema &layout_schema, Variable< uint32_t, Kind, false > &tuple_id)
 Compiles the data layout layout containing tuples of schema layout_schema such that it sequentially stores tuples of schema tuple_value_schema starting at memory address base_address and tuple ID tuple_id.
 
template<VariableKind Kind>
std::tuple< Block, Block, Blockcompile_store_sequential_single_pass (const Schema &tuple_value_schema, const Schema &tuple_addr_schema, Ptr< void > base_address, const storage::DataLayout &layout, std::size_t num_simd_lanes, const Schema &layout_schema, Variable< uint32_t, Kind, false > &tuple_id)
 Compiles the data layout layout containing tuples of schema layout_schema such that it sequentially stores tuples of schema tuple_value_schema starting at memory address base_address and tuple ID tuple_id.
 
template<VariableKind Kind>
std::tuple< Block, Block, Blockcompile_load_sequential (const Schema &tuple_value_schema, const Schema &tuple_addr_schema, Ptr< void > base_address, const storage::DataLayout &layout, std::size_t num_simd_lanes, const Schema &layout_schema, Variable< uint32_t, Kind, false > &tuple_id)
 Compiles the data layout layout containing tuples of schema layout_schema such that it sequentially loads tuples of schema tuple_value_schema starting at memory address base_address and tuple ID tuple_id.
 
void compile_store_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 the single tuple with schema tuple_value_schema and ID tuple_id.
 
void compile_load_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 loads the single tuple with schema tuple_value_schema and ID tuple_id.
 
template<typename T , std::size_t L>
requires integral<typename T::type>
 and (T::num_simd_lanes==L) void setbit(Ptr< T > bytes
 Sets the n -th bit of the value pointed to by bytes to value.
 
_I32x1 strncmp (NChar left, NChar right, U32x1 len, bool reverse=false)
 Compares two strings left and right.
 
_I32x1 strcmp (NChar left, NChar right, bool reverse=false)
 Compares two strings left and right.
 
_Boolx1 strncmp (NChar left, NChar right, U32x1 len, cmp_op op, bool reverse=false)
 Compares two strings left and right.
 
_Boolx1 strcmp (NChar left, NChar right, cmp_op op, bool reverse=false)
 Compares two strings left and right.
 
Ptr< Charx1 > strncpy (Ptr< Charx1 > dst, Ptr< Charx1 > src, U32x1 count)
 Copies the contents of src to dst, but no more than count characters.
 
_Boolx1 like (NChar str, NChar pattern, const char escape_char='\\')
 Checks whether the string str matches the pattern pattern regarding SQL LIKE semantics using escape character escape_char.
 
_Boolx1 like_contains (NChar str, const ThreadSafePooledString &pattern)
 Checks whether the string str contains the pattern pattern.
 
_Boolx1 like_prefix (NChar str, const ThreadSafePooledString &pattern)
 Checks whether the string str has the prefix pattern.
 
_Boolx1 like_suffix (NChar str, const ThreadSafePooledString &pattern)
 Checks whether the string str has the suffix pattern.
 
template<typename T >
requires arithmetic<typename T::type>
T signum (T value)
 Returns the signum of value, i.e.
 
template<bool Predicated>
I32x1 compare (const Environment &env_left, const Environment &env_right, const std::vector< SortingOperator::order_type > &order)
 Compares two tuples, which must be already loaded into the environments env_left and env_right, according to the ordering order (the second element of each pair is true iff the corresponding sorting should be ascending).
 
template std::tuple< Block, Block, Blockcompile_store_sequential (const Schema &, const Schema &, Ptr< void >, const storage::DataLayout &, std::size_t, const Schema &, Var< U32x1 > &)
 
template std::tuple< Block, Block, Blockcompile_store_sequential (const Schema &, const Schema &, Ptr< void >, const storage::DataLayout &, std::size_t, const Schema &, Global< U32x1 > &)
 
template std::tuple< Block, Block, Blockcompile_store_sequential (const Schema &, const Schema &, Ptr< void >, const storage::DataLayout &, std::size_t, const Schema &, Variable< uint32_t, VariableKind::Param, false > &)
 
template std::tuple< Block, Block, Blockcompile_store_sequential_single_pass (const Schema &, const Schema &, Ptr< void >, const storage::DataLayout &, std::size_t, const Schema &, Var< U32x1 > &)
 
template std::tuple< Block, Block, Blockcompile_store_sequential_single_pass (const Schema &, const Schema &, Ptr< void >, const storage::DataLayout &, std::size_t, const Schema &, Global< U32x1 > &)
 
template std::tuple< Block, Block, Blockcompile_store_sequential_single_pass (const Schema &, const Schema &, Ptr< void >, const storage::DataLayout &, std::size_t, const Schema &, Variable< uint32_t, VariableKind::Param, false > &)
 
template std::tuple< Block, Block, Blockcompile_load_sequential (const Schema &, const Schema &, Ptr< void >, const storage::DataLayout &, std::size_t, const Schema &, Var< U32x1 > &)
 
template std::tuple< Block, Block, Blockcompile_load_sequential (const Schema &, const Schema &, Ptr< void >, const storage::DataLayout &, std::size_t, const Schema &, Global< U32x1 > &)
 
template std::tuple< Block, Block, Blockcompile_load_sequential (const Schema &, const Schema &, Ptr< void >, const storage::DataLayout &, std::size_t, const Schema &, Variable< uint32_t, VariableKind::Param, false > &)
 
template I32x1 compare< false > (const Environment &, const Environment &, const std::vector< SortingOperator::order_type > &)
 
template I32x1 compare< true > (const Environment &, const Environment &, const std::vector< SortingOperator::order_type > &)
 

Variables

std::size_t L
 
std::size_t bool = false
 
const std::map<::wasm::Name, std::function<::wasm::Literals(::wasm::Literals &)> > callback_functions
 
static constexpr std::size_t num_simd_lanes = L
 

‍the number of SIMD lanes of the represented expression, i.e. 1 for scalar and at least 2 for vectorial ones


 
::wasm::Expression * expr_ = nullptr
 

‍the referenced Binaryen expression (AST)


 
std::list< std::shared_ptr< Bit > > referenced_bits_
 

‍a list of referenced Bits


 
template<dsl_primitive... Us>
requires (primitive_expr_t<U> u)
 and { make_literal<T, L>(us...)
 Constructs a new PrimitiveExpr from a constant value.
 
PrimitiveExpr< To, ToL > std::size_t ToL
 
PrimitiveExpr< uint64_t, L > L L L L U
 
L other PrimitiveExpr< common_type_t< T, U >, L >
 
auto op
 
auto op_low
 
auto op_high
 
auto this_cpy = this->clone()
 
auto other_cpy = other.clone()
 
auto referenced_bits_low = this_cpy.referenced_bits()
 
auto referenced_bits_high = this->referenced_bits()
 
PrimitiveExpr< To, 8 > low (Module::Builder().makeBinary(op_low, this_cpy.expr(), other_cpy.expr()), std::move(referenced_bits_low))
 
PrimitiveExpr< To, 8 > high (Module::Builder().makeBinary(op_high, this->expr(), other.expr()), std::move(referenced_bits_high))
 
auto indices = std::to_array<uint8_t>({ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30 })
 
static constexpr std::size_t num_vectors = (L * sizeof(T)) / 16
 

‍the number of SIMD vectors needed for the represented expression


 
std::array< vector_type, num_vectorsvectors_
 

‍the fully utilized SIMD vectors represented as PrimitiveExprs


 
for(std::size_t idx=1;idx< num_vectors;++idx) res.emplace((vectors_[idx].bitmask()<< uint32_t(idx *vector_type return * res
 
Bool< Lvalue
 
Bool< L > uint8_t n
 
Bool< L > T mask
 

Typedef Documentation

◆ _Var

template<typename T >
using m::wasm::_Var = typedef typename detail::_var_helper<T>::type

Local variable that can always be NULL.

Definition at line 5784 of file WasmDSL.hpp.

◆ ConstPostOrderMatchBaseVisitor

Definition at line 1272 of file WasmOperator.hpp.

◆ ConstPreOrderMatchBaseVisitor

Definition at line 1271 of file WasmOperator.hpp.

◆ ConstReference

template<typename T , std::size_t L = 1>
using m::wasm::ConstReference = typedef detail::the_reference<T, L, true>

Definition at line 101 of file WasmDSL.hpp.

◆ Decimal32

using m::wasm::Decimal32 = typedef Decimal<int32_t>

Definition at line 287 of file WasmUtil.hpp.

◆ Decimal64

using m::wasm::Decimal64 = typedef Decimal<int64_t>

Definition at line 288 of file WasmUtil.hpp.

◆ expr_t

template<typename T >
using m::wasm::expr_t = typedef typename expr<T>::type

Convenience alias for expr.

Definition at line 205 of file WasmDSL.hpp.

◆ Global

template<typename T >
using m::wasm::Global = typedef typename detail::global_helper<T>::type

Global variable.

Cannot be NULL.

Definition at line 5789 of file WasmDSL.hpp.

◆ GlobalBuffer

using m::wasm::GlobalBuffer = typedef Buffer<true>

Definition at line 1197 of file WasmUtil.hpp.

◆ GlobalChainedHashTable

Definition at line 762 of file WasmAlgo.hpp.

◆ GlobalOpenAddressingInPlaceHashTable

Definition at line 1011 of file WasmAlgo.hpp.

◆ GlobalOpenAddressingOutOfPlaceHashTable

Definition at line 1009 of file WasmAlgo.hpp.

◆ int_t

template<std::size_t W>
using m::wasm::int_t = typedef typename _int<W>::type

Definition at line 317 of file WasmDSL.hpp.

◆ LocalBuffer

using m::wasm::LocalBuffer = typedef Buffer<false>

Definition at line 1196 of file WasmUtil.hpp.

◆ LocalChainedHashTable

Definition at line 761 of file WasmAlgo.hpp.

◆ LocalOpenAddressingInPlaceHashTable

Definition at line 1010 of file WasmAlgo.hpp.

◆ LocalOpenAddressingOutOfPlaceHashTable

Definition at line 1008 of file WasmAlgo.hpp.

◆ primitive_expr_t

template<typename T >
using m::wasm::primitive_expr_t = typedef typename primitive_expr<T>::type

Convenience alias for primitive_expr.

Definition at line 150 of file WasmDSL.hpp.

◆ Ptr

template<typename T >
using m::wasm::Ptr = typedef typename detail::ptr_helper<T>::type

Alias to easily declare PrimitiveExpr of pointer to primitive type.

Definition at line 4499 of file WasmDSL.hpp.

◆ RecursiveConstMatchBaseVisitorBase

Definition at line 1247 of file WasmOperator.hpp.

◆ Reference

template<typename T , std::size_t L = 1>
using m::wasm::Reference = typedef detail::the_reference<T, L, false>

Definition at line 99 of file WasmDSL.hpp.

◆ SQL_addr_t

using m::wasm::SQL_addr_t = typedef std::variant< std::monostate #define ADD_TYPE(TYPE) SQL_ADDR_TYPES(ADD_TYPE) >

Definition at line 399 of file WasmUtil.hpp.

◆ SQL_boolean_t

using m::wasm::SQL_boolean_t = typedef std::variant<std::monostate, _Boolx1, _Boolx16, _Boolx32>

Definition at line 409 of file WasmUtil.hpp.

◆ SQL_t

using m::wasm::SQL_t = typedef std::variant< std::monostate #define ADD_TYPE(TYPE) SQL_TYPES(ADD_TYPE) >

Definition at line 392 of file WasmUtil.hpp.

◆ To

Definition at line 2408 of file WasmDSL.hpp.

◆ uint_t

template<std::size_t W>
using m::wasm::uint_t = typedef typename uint<W>::type

Definition at line 340 of file WasmDSL.hpp.

◆ Var

template<typename T >
using m::wasm::Var = typedef typename detail::var_helper<T>::type

Local variable.

Can be NULL if

Template Parameters
Tcan be NULL.

Definition at line 5779 of file WasmDSL.hpp.

◆ vector_type

using m::wasm::vector_type = typedef PrimitiveExpr<T, 16 / sizeof(T)>

‍the type of a single fully utilized vector

Definition at line 3077 of file WasmDSL.hpp.

Enumeration Type Documentation

◆ cmp_op

‍comparison operations, e.g. for string comparison

Enumerator
EQ 
NE 
LT 
LE 
GT 
GE 

Definition at line 1335 of file WasmUtil.hpp.

◆ VariableKind

enum class m::wasm::VariableKind
strong

Declares the kind of a variable: local, parameter, or global.

Enumerator
Local 
Param 
Global 

Definition at line 72 of file WasmDSL.hpp.

Function Documentation

◆ add_pairwise()

PrimitiveExpr L L L L m::wasm::add_pairwise ( )
Initial value:
== 1) and (L > 1) {
static_assert(L % 2 == 0, "must mask this expression first");
auto vec = unary<uint16_t, L / 2>(UNVOP_(ExtAddPairwiseU, I8x16ToI16x8));
return M_CONSTEXPR_COND(decltype(vec)::num_simd_lanes == 1,
vec.template extract_unsafe<0>(),
vec);
}
PrimitiveExpr<int32_t
and(sizeof(T)==4) U64x1 reinterpret_to_U64(m
Definition: WasmAlgo.cpp:266
#define UNVOP_(NAME, TYPE)
Definition: WasmDSL.hpp:2110
#define M_CONSTEXPR_COND(COND, IF_TRUE, IF_FALSE)
Definition: macro.hpp:54
std::size_t L
Definition: WasmDSL.hpp:528
PrimitiveExpr< ResultType, ResultL > unary(::wasm::UnaryOp op)
Helper function to implement unary operations.
Definition: WasmDSL.hpp:1607

References add_pairwise(), L, M_CONSTEXPR_COND, unary(), and UNVOP_.

Referenced by add_pairwise(), and m::wasm::Expr< T, L >::UNARY_LIST().

◆ all_true()

PrimitiveExpr< bool, 1 > m::wasm::all_true ( )

Returns true iff all values are true.

Returns true iff all values are true or rather non-zero.

Returns true iff all values are non-zero.

Definition at line 2250 of file WasmDSL.hpp.

References all_true(), L, M_CONSTEXPR_COND, m::T(), and UNVOP_.

Referenced by all_true().

◆ and() [1/34]

To m::wasm::and ( (L==1) or(std::is_convertible_v< T, To > and not(integral< T > and integral< To > and sizeof(T) > sizeof(To)) and not(integral< T > and sizeof(T)==8 and std::floating_point< To >) and not(std::floating_point< T > and integral< To > and sizeof(To)<=2))   )

References L.

◆ and() [2/34]

and m::wasm::and ( (not dsl_primitive< ParamTypes > or(ParamLs *sizeof(ParamTypes)<=16))  and ...)

◆ and() [3/34]

template<decayable... Us>
requires (sizeof...(Us) > 0) (Us... us)
m::wasm::and ( dsl_primitive< std::decay_t< Us > >  and ...)

Constructs a new PrimitiveExpr from a decayable constant value.

Definition at line 1526 of file WasmDSL.hpp.

◆ and() [4/34]

template<primitive_convertible C, expr_convertible T, expr_convertible U>
requires (not primitive_convertible<T> or not primitive_convertible<U>) (C &&c)
and have_common_type< typename expr_t< T >::type, typename expr_t< U >::type > m::wasm::and ( expr_t< T >::num_simd_lanes   = expr_t<U>::num_simd_lanes)

Definition at line 6229 of file WasmDSL.hpp.

◆ and() [5/34]

template<expr_convertible T, expr_convertible U, std::size_t M>
requires (not primitive_convertible<T> or not primitive_convertible<U>) (Expr<common_type_t<typename expr_t<T>::type, typename expr_t<U>::type>, expr_t<T>::num_simd_lanes> e, const std::array<uint8_t, M> &a)
and have_common_type< typename expr_t< T >::type, typename expr_t< U >::type > m::wasm::and ( expr_t< T >::num_simd_lanes   = expr_t<U>::num_simd_lanes)

Definition at line 6319 of file WasmDSL.hpp.

◆ and() [6/34]

template<primitive_convertible C, expr_convertible T, expr_convertible U>
requires (not primitive_convertible<T> or not primitive_convertible<U>)
and have_common_type< typename expr_t< T >::type, typename expr_t< U >::type > m::wasm::and ( expr_t< T >::num_simd_lanes   = expr_t<U>::num_simd_lanes)

Definition at line 6263 of file WasmDSL.hpp.

◆ and() [7/34]

template<dsl_primitive To, std::size_t ToL = L>
requires (L == ToL)
and same_signedness< T, To > m::wasm::and ( integral< T >   = = integral<To>)
Initial value:
= sizeof(To))
operator PrimitiveExpr<To
friend struct PrimitiveExpr
‍Constructs an empty PrimitiveExpr, for which operator bool() returns false.
Definition: WasmDSL.hpp:1469
std::conditional_t< std::is_signed_v< T >, int16_t, uint16_t > To
Definition: WasmDSL.hpp:2408

Implicit conversion of a PrimitiveExpr<T, L> to a PrimitiveExpr<To, ToL>.

Only applicable if

  • L and ToL are equal, i.e. conversion does not change the number of SIMD lanes
  • T and To have same signedness
  • neither or both T and To are integers
  • T can be trivially converted to To (e.g. int to long but not long to int)
  • To is not bool

References m::T().

◆ and() [8/34]

std::size_t L m::wasm::and ( is_pow_2(L )

References m::is_pow_2(), and L.

◆ and() [9/34]

template<dsl_primitive T, std::size_t L>
requires (L > 1)
m::wasm::and ( is_pow_2(L)   )

Specialization of PrimitiveExpr<T, L> for primitive type.

Template Parameters
Tand vectorial values not fitting in a single SIMD vector, i.e. (multiple) double pumping must be used. Represents an expression (AST) evaluating to
Lruntime values of primitive type
T.

References m::is_pow_2(), L, num_simd_lanes, and m::T().

◆ and() [10/34]

template<dsl_primitive T, std::size_t L>
requires (L > 0)
m::wasm::and ( is_pow_2(L)   )

Specialization of PrimitiveExpr<T, L> for primitive type.

Template Parameters
Tand either scalar values or vectorial ones fitting in a single SIMD vector. Represents an expression (AST) evaluating to
Lruntime values of primitive type
T.

References m::is_pow_2(), L, and m::T().

◆ and() [11/34]

template<bool IsStore, std::size_t L, bool SinglePass, bool PointerSharing, VariableKind Kind>
requires (L > 0)
m::wasm::and ( is_pow_2(L)   )

Compiles the data layout layout containing tuples of schema layout_schema such that it sequentially stores/loads (depending on.

Template Parameters
IsStore)tuples of schema _tuple_value_schema starting at memory address base_address and tuple ID tuple_id. If
SinglePass,thestore has to be done in a single pass, i.e. the execution of the returned code must not be split among multiple function calls. Otherwise, the store does not have to be done in a single pass, i.e. the returned code may be emitted into a function which can be called multiple times and each call starts storing at exactly the point where it has ended in the last call. The given variable tuple_id will be incremented automatically before advancing to the next tuple (i.e. code for this will be emitted at the start of the block returned as third element). Predication is supported and emitted respectively for storing tuples. SIMDfication is supported and will be emitted iff
Lis greater than 1.

Does not emit any code but returns three wasm::Blocks containing code: the first one initializes all needed variables, the second one stores/loads one tuple, and the third one advances to the next tuple. Additionally, if not

Template Parameters
IsStore,addsthe addresses of the values of tuples with schema _tuple_addr_schema into the current environment.

code blocks for pointer/mask initialization, stores/loads of values, and stride jumps for pointers / updates of masks

‍the values loaded for the entries in tuple_value_schema

‍the addresses for the entries in tuple_addr_schema

‍the NULL information loaded for the entries in tuple_value_schema

‍variable type for pointers dependent on whether access should be done using a single pass

‍variable type for masks dependent on whether access should be done using a single pass

a map from bit offset (mod 8) and stride in bits to runtime pointer and mask; reset for each leaf; if

Template Parameters
PointerSharing,usedto share pointers between attributes of the same leaf that have equal stride and to share masks between attributes of the same leaf that have equal offset (mod 8)

< remember the bit offset of the previously accessed NULL bit

‍maps static byte offsets to already loaded bytes to reuse them; only needed for scalar loading

‍a SIMD vector containing all loaded NULL bitmaps; only needed for SIMDfied loading

Definition at line 573 of file WasmUtil.cpp.

References m::and, m::wasm::Block::attach_to_current(), BLOCK_OPEN, CALL, m::Schema::cend(), clone(), m::Schema::deduplicate(), discard(), m::Schema::drop_constants(), m::wasm::Block::empty(), m::wasm::CodeGenContext::env(), eqz(), m::Schema::find(), m::storage::DataLayout::for_sibling_leaves(), m::wasm::CodeGenContext::Get(), IF, is_null(), m::is_pow_2(), L, m::storage::layout_schema, M_CONSTEXPR_COND, M_insist, M_insist_no_ternary_logic, M_unreachable, make_signed(), mask, n, m::Schema::num_entries(), Select(), m::setbit(), strncpy(), m::T(), m::U, value, m::visit(), and Wasm_insist.

◆ and() [12/34]

template<std::size_t M>
requires (M > 0)
m::wasm::and ( is_pow_2(M)   )
Initial value:
= 16)
PrimitiveExpr<T

Selects lanes of this in lane granularity depending on the indices specified by indices.

Indices i in the range [0, L) select the i-th` lane, indices outside of this range result in the value 0.

Indices i in the range [0, L) select the i-th` lane, indices outside of this range result in undefined values.

References m::is_pow_2().

◆ and() [13/34]

template<typename T , std::size_t L, bool = false, typename U >
requires (L > 1)
m::wasm::and ( L sizeofT,
16   
)

Creates a ::wasm::Literal for.

Template Parameters
Lvalues of type
Tfrom a given value. Used to solve macOS ambiguity.

References L, and value.

◆ and() [14/34]

std::size_t typename Us m::wasm::and ( L sizeofT,
16   
)

References L.

◆ and() [15/34]

template<typename T , std::size_t L, bool = false, typename U >
requires (L > 1) (U value)
m::wasm::and ( L *sizeof(T)<=  16)

Creates a ::wasm::Literal for.

Template Parameters
Lvalues of type
Tfrom a given value. Used to solve macOS ambiguity.

Definition at line 486 of file WasmDSL.hpp.

References L, and value.

◆ and() [16/34]

template<typename T , std::size_t L, bool = false, typename... Us>
requires (L > 1)
m::wasm::and ( L *sizeof(T)<=  16)

Creates a ::wasm::Literal for.

Template Parameters
Lvalues of type
Tfrom given values. Used to solve macOS ambiguity.

References L.

◆ and() [17/34]

template<typename T , std::size_t L, std::size_t M>
requires (L > 1)
m::wasm::and ( L *sizeof(T)<=  16)
Initial value:
= 16)
inline PrimitiveExpr<T

References indices, L, M_CONSTEXPR_COND, referenced_bits(), and m::T().

◆ and() [18/34]

L other PrimitiveExpr< common_type_t< T, U >, L > m::wasm::and ( L  ,
 
)

Definition at line 2484 of file WasmDSL.hpp.

References BINVOP_, L, M_CONSTEXPR_COND, M_unreachable, op, and m::U.

◆ and() [19/34]

template<std::size_t L>
requires (L > 0)
m::wasm::and ( L<=  16)

◆ and() [20/34]

auto L L other PrimitiveExpr< common_type_t< T, U >, L > m::wasm::and ( L   = = 1)

Definition at line 2671 of file WasmDSL.hpp.

References BINIOP_.

◆ and() [21/34]

template<std::size_t M>
requires (M > 0)
m::wasm::and ( M<=  16)
Initial value:
== 0)
PrimitiveExpr<T

Selects lanes of this in byte granularity depending on the indices specified by indices.

Indices i in the range [0, L * sizeof(T)) select the i-th` lane, indices outside of this range result in the value 0.

Indices i in the range [0, L * sizeof(T)) select the i-th` lane, indices outside of this range result in undefined values.

References indices, L, M_CONSTEXPR_COND, swizzle_bytes(), and m::T().

◆ and() [22/34]

template<typename ReturnType , typename... ParamTypes, std::size_t ReturnL, std::size_t... ParamLs>
requires ((std::is_void_v<ReturnType> and (ReturnL == 1)) or requires { typename PrimitiveExpr<ReturnType, ReturnL>; })
m::wasm::and ( not dsl_primitive< ReturnType >   orReturnL *sizeof(ReturnType)<=16)

Definition at line 1143 of file WasmDSL.hpp.

◆ and() [23/34]

template<typename T , VariableKind Kind, bool CanBeNull, std::size_t L>
requires (not (dsl_pointer_to_primitive<T> and CanBeNull))
m::wasm::and ( not(Kind==VariableKind::Global and CanBeNull)   )

Definition at line 5501 of file WasmDSL.hpp.

◆ and() [24/34]

template<primitive_convertible C, primitive_convertible T, primitive_convertible U>
requires have_common_type<typename primitive_expr_t<T>::type, typename primitive_expr_t<U>::type> (C &&c)
m::wasm::and ( primitive_expr_t< T >::num_simd_lanes   = primitive_expr_t<U>::num_simd_lanes)

Definition at line 6212 of file WasmDSL.hpp.

◆ and() [25/34]

template<primitive_convertible T, primitive_convertible U, std::size_t M>
requires have_common_type<typename primitive_expr_t<T>::type, typename primitive_expr_t<U>::type> (PrimitiveExpr<common_type_t<typename primitive_expr_t<T>::type, typename primitive_expr_t<U>::type>, primitive_expr_t<T>::num_simd_lanes> e, const std::array<uint8_t, M> &a)
m::wasm::and ( primitive_expr_t< T >::num_simd_lanes   = primitive_expr_t<U>::num_simd_lanes)

Definition at line 6282 of file WasmDSL.hpp.

◆ and() [26/34]

template<primitive_convertible C, primitive_convertible T, primitive_convertible U>
requires have_common_type<typename primitive_expr_t<T>::type, typename primitive_expr_t<U>::type>
m::wasm::and ( primitive_expr_t< T >::num_simd_lanes   = primitive_expr_t<U>::num_simd_lanes)

Definition at line 6245 of file WasmDSL.hpp.

◆ and() [27/34]

template<dsl_primitive To, std::size_t ToL = L>
requires (L == ToL)
m::wasm::and ( same_signedness< T, To > or boolean< T > or std::same_as< T, char > or boolean< To > or std::same_as< To, char >   )

Explicit conversion of a PrimitiveExpr<T, L> to a PrimitiveExpr<To, ToL>.

Only applicable if

  • L and ToL are equal, i.e. conversion does not change the number of SIMD lanes
  • T and To have same signedness or T is bool or char or To is bool or char
  • for scalar values:
    • T can be converted to To (e.g. int to long, long to int, float to int)
  • for vectorial values:

    • T can be converted to To (e.g. int to long, float to int) except integer conversion to a less precise type, conversion from 64-bit integer to floating point, or conversion from floating point to 8-bit or 16-bit integer

    Only applicable if

  • L and ToL are equal, i.e. conversion does not change the number of SIMD lanes
  • T and To have same signedness or T is bool or char or To is bool or char -Tcan be converted toTo(e.g.inttolong,longtoint,floattoint)
  • narrowingTtoTo` results in at least one fully utilized SIMD vector

Definition at line 3638 of file WasmDSL.hpp.

References L, num_vectors, m::T(), to(), and ToL.

◆ and() [28/34]

template<arithmetic U>
requires arithmetically_combinable<T, U, L>
m::wasm::and ( sizeof(common_type_t< T, U >) !   = 1)

Multiplies this and other.

Computes the minimum of this and other.

◆ and() [29/34]

auto L m::wasm::and ( sizeof(common_type_t< T, U >) >=  4)

◆ and() [30/34]

template<integral U>
requires arithmetically_combinable<T, U, L>
m::wasm::and ( sizeof(common_type_t< T, U >) >=  4)

Rotates this right by other.

References BINIOP_.

◆ and() [31/34]

template<unsigned_integral U>
requires arithmetically_combinable<T, U, L>
m::wasm::and ( sizeof(common_type_t< T, U >)<=  2)

Computes the (ceiled) average of this and other.

References BINVOP_, L, M_unreachable, op, and m::U.

◆ and() [32/34]

template<arithmetic U>
requires arithmetically_combinable<T, U, L>
m::wasm::and ( sizeof(common_type_t< T, U >)   = = 1)

Multiplies this and other.

References and(), and L.

◆ and() [33/34]

template<typename T , std::size_t L>
requires integral<typename T::type>
m::wasm::and ( T::num_simd_lanes  = L)

Sets the n -th bit of the value pointed to by bytes to value.

Sets the bit masked by mask of the value pointed to by bytes to value.

◆ and() [34/34]

template<std::size_t ToL>
requires (L == 1)
m::wasm::and ( ToL  ,
 
)

Broadcasts a PrimitiveExpr<T, 1> to a PrimitiveExpr<T, ToL>.

References L.

◆ and_not()

template<boolean U>
requires boolean<T>
PrimitiveExpr< bool, L > m::wasm::and_not ( PrimitiveExpr< U, L other)

Computes the logical conjunction (and) of this and the logical negation (not) of other.

Definition at line 2902 of file WasmDSL.hpp.

References and_not(), and BINVOP_.

Referenced by and_not().

◆ any_true()

PrimitiveExpr< uint64_t, 1 > m::wasm::any_true ( )

Returns true iff any value is non-zero.

Definition at line 2238 of file WasmDSL.hpp.

References and(), any_true(), L, M_CONSTEXPR_COND, m::T(), and UNVOP_.

Referenced by any_true().

◆ binary()

template<dsl_primitive ResultType, std::size_t ResultL, dsl_primitive OperandType, std::size_t OperandL>
PrimitiveExpr< ResultType, ResultL > m::wasm::binary ( ::wasm::BinaryOp  op,
PrimitiveExpr< OperandType, OperandL >  other 
)
private

Helper function to implement binary operations.

Applies ::wasm::BinaryOp op to this and other and returns the result. Note, that we require this and other to be of same type.

Definition at line 1617 of file WasmDSL.hpp.

References binary(), op, and referenced_bits().

Referenced by binary(), decompose_equi_predicate(), m::wasm::SortMergeJoin< SortLeft, SortRight, Predicated, CmpPredicated >::execute(), extract_index_scan_bounds(), m::wasm::SimpleHashJoin< UniqueBuild, Predicated >::pre_condition(), and m::wasm::SortMergeJoin< SortLeft, SortRight, Predicated, CmpPredicated >::pre_condition().

◆ BINARY()

m::wasm::BINARY ( operator+  )

Transforms a comparison result into its boolean representation.

Checks whether this equals other.

Definition at line 3751 of file WasmDSL.hpp.

References bool, high, indices, L, low, move(), num_vectors, ShuffleBytes(), ShuffleLanes(), m::T(), and vectors().

◆ BINARY_LIST()

m::wasm::BINARY_LIST ( MAKE_BINARY  )

Specialization of PrimitiveExpr<T, L> for pointer to primitive type.

Template Parameters
T.Represents an expression (AST) evaluating to
Lruntime values of pointer to primitive type
T.

◆ bitmask()

PrimitiveExpr< uint64_t, 1 > m::wasm::bitmask ( )
Initial value:
= 64) and requires (vector_type v) { v.bitmask(); } {
std::optional<PrimitiveExpr<uint64_t, 1>> res = vectors_[0].bitmask();
for (std::size_t idx = 1; idx < num_vectors; ++idx)
res.emplace((vectors_[idx].bitmask() << uint64_t(idx * vector_type::num_simd_lanes)) bitor *res);
return *res;
}
PrimitiveExpr<bool
std::array< vector_type, num_vectors > vectors_
‍the fully utilized SIMD vectors represented as PrimitiveExprs
Definition: WasmDSL.hpp:3095
for(std::size_t idx=1;idx< num_vectors;++idx) res.emplace((vectors_[idx].bitmask()<< uint32_t(idx *vector_type return * res
Definition: WasmDSL.hpp:3696
static constexpr std::size_t num_vectors
‍the number of SIMD vectors needed for the represented expression
Definition: WasmDSL.hpp:3079

Concatenates the most significant bit of each value of this into a single mask.

Concatenates the most significant bit (or the boolean value if this is boolean) of each value of this into a single mask.

Definition at line 2218 of file WasmDSL.hpp.

References bitmask(), L, M_CONSTEXPR_COND, m::T(), and UNVOP_.

Referenced by and(), bitmask(), m::wasm::Module::dispose_local_bitvector_stack(), and UNARY().

◆ BREAK() [1/2]

template<primitive_convertible C>
requires requires (C &&c) { PrimitiveExpr<bool, 1>(std::forward<C>(c)); }
void m::wasm::BREAK ( C &&  _cond,
std::size_t  level = 1 
)
inline

Definition at line 6179 of file WasmDSL.hpp.

References BREAK().

◆ BREAK() [2/2]

void m::wasm::BREAK ( std::size_t  level = 1)
inline

◆ broadcast()

ToL m::wasm::broadcast ( )

Definition at line 2053 of file WasmDSL.hpp.

References M_unreachable, and m::T().

◆ can_be_null()

bool m::wasm::can_be_null ( const SQL_t variant)
inline

◆ clone()

PrimitiveExpr m::wasm::clone ( ) const

◆ compare()

template<bool Predicated>
I32x1 m::wasm::compare ( const Environment env_left,
const Environment env_right,
const std::vector< SortingOperator::order_type > &  order 
)

Compares two tuples, which must be already loaded into the environments env_left and env_right, according to the ordering order (the second element of each pair is true iff the corresponding sorting should be ascending).

Note that the value NULL is always considered smaller regardless of the ordering. Comparison is performed branchless iff

Template Parameters
Predicated.

Returns a negative number if left is smaller than right, 0 if both are equal, and a positive number if left is greater than right, according to the ordering.

‍create non-nullable NChars since NULL checks are done explicitly here before using them

Definition at line 3695 of file WasmUtil.cpp.

References and, BLOCK, m::wasm::NChar::can_be_null(), compare(), ELSE, GOTO(), m::wasm::NChar::guarantees_terminating_nul(), IF, m::wasm::NChar::length(), M_insist, M_unreachable, strcmp(), m::T(), m::wasm::NChar::val(), and Wasm_insist.

Referenced by compare().

◆ compare< false >()

template I32x1 m::wasm::compare< false > ( const Environment ,
const Environment ,
const std::vector< SortingOperator::order_type > &   
)

◆ compare< true >()

template I32x1 m::wasm::compare< true > ( const Environment ,
const Environment ,
const std::vector< SortingOperator::order_type > &   
)

◆ compile_data_layout_point_access()

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.

If

Template Parameters
IsStore,emitsthe storing code into the current block, otherwise, emits the loading code into the current block and adds the loaded values into the current environment. Additionally, if not
IsStore,addsthe addresses of the values of tuples with schema _tuple_addr_schema into the current environment.

‍the values loaded for the entries in tuple_value_schema

‍the addresses for the entries in tuple_addr_schema

‍the NULL information loaded for the entries in tuple_value_schema

Definition at line 1946 of file WasmUtil.cpp.

References and, CALL, m::Schema::cend(), m::Schema::deduplicate(), m::Schema::drop_constants(), m::wasm::CodeGenContext::env(), m::Schema::find(), m::storage::DataLayout::for_sibling_leaves(), m::wasm::CodeGenContext::Get(), IF, is_null(), m::is_pow_2(), m::storage::layout_schema, M_insist, M_unreachable, make_signed(), mask, n, m::Schema::num_entries(), Select(), m::setbit(), strncpy(), m::T(), U, value, m::visit(), and Wasm_insist.

◆ compile_load_point_access()

void m::wasm::compile_load_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 loads the single tuple with schema tuple_value_schema and ID tuple_id.

Emits the loading code into the current block and adds the loaded values into the current environment. Additionally, if not

Template Parameters
IsStore,addsthe addresses of the values of tuples with schema tuple_addr_schema into the current environment.

Definition at line 2480 of file WasmUtil.cpp.

References m::storage::layout_schema.

Referenced by index_scan_codegen_compilation(), index_scan_codegen_hybrid(), and index_scan_codegen_interpretation().

◆ compile_load_sequential() [1/4]

template std::tuple< m::wasm::Block, m::wasm::Block, m::wasm::Block > m::wasm::compile_load_sequential ( const Schema ,
const Schema ,
Ptr< void >  ,
const storage::DataLayout ,
std::size_t  ,
const Schema ,
Global< U32x1 > &   
)

◆ compile_load_sequential() [2/4]

template std::tuple< m::wasm::Block, m::wasm::Block, m::wasm::Block > m::wasm::compile_load_sequential ( const Schema ,
const Schema ,
Ptr< void >  ,
const storage::DataLayout ,
std::size_t  ,
const Schema ,
Var< U32x1 > &   
)

◆ compile_load_sequential() [3/4]

template std::tuple< m::wasm::Block, m::wasm::Block, m::wasm::Block > m::wasm::compile_load_sequential ( const Schema ,
const Schema ,
Ptr< void >  ,
const storage::DataLayout ,
std::size_t  ,
const Schema ,
Variable< uint32_t, VariableKind::Param, false > &   
)

◆ compile_load_sequential() [4/4]

template<VariableKind Kind>
std::tuple< Block, Block, Block > m::wasm::compile_load_sequential ( const Schema tuple_value_schema,
const Schema tuple_addr_schema,
Ptr< void >  base_address,
const storage::DataLayout layout,
std::size_t  num_simd_lanes,
const Schema layout_schema,
Variable< uint32_t, Kind, false > &  tuple_id 
)

Compiles the data layout layout containing tuples of schema layout_schema such that it sequentially loads tuples of schema tuple_value_schema starting at memory address base_address and tuple ID tuple_id.

The given variable tuple_id will be incremented automatically before advancing to the next tuple (i.e. code for this will be emitted at the start of the block returned as third element). SIMDfication is supported and will be emitted iff num_simd_lanes is greater than 1.

Does not emit any code but returns three wasm::Blocks containing code: the first one initializes all needed variables, the second one loads one tuple, and the third one advances to the next tuple. Additionally, if not

Template Parameters
IsStore,addsthe addresses of the values of tuples with schema tuple_addr_schema into the current environment.

Referenced by m::wasm::Scan< SIMDfied >::execute(), m::wasm::SortMergeJoin< SortLeft, SortRight, Predicated, CmpPredicated >::execute(), m::wasm::Buffer< IsGlobal >::execute_pipeline(), m::wasm::Buffer< IsGlobal >::execute_pipeline_inline(), and m::wasm::Buffer< IsGlobal >::resume_pipeline().

◆ compile_store_point_access()

void m::wasm::compile_store_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 the single tuple with schema tuple_value_schema and ID tuple_id.

Emits the storing code into the current block. Additionally, if not

Template Parameters
IsStore,addsthe addresses of the values of tuples with schema tuple_addr_schema into the current environment.

Definition at line 2472 of file WasmUtil.cpp.

References m::storage::layout_schema.

◆ compile_store_sequential() [1/4]

template std::tuple< m::wasm::Block, m::wasm::Block, m::wasm::Block > m::wasm::compile_store_sequential ( const Schema ,
const Schema ,
Ptr< void >  ,
const storage::DataLayout ,
std::size_t  ,
const Schema ,
Global< U32x1 > &   
)

◆ compile_store_sequential() [2/4]

template std::tuple< m::wasm::Block, m::wasm::Block, m::wasm::Block > m::wasm::compile_store_sequential ( const Schema ,
const Schema ,
Ptr< void >  ,
const storage::DataLayout ,
std::size_t  ,
const Schema ,
Var< U32x1 > &   
)

◆ compile_store_sequential() [3/4]

template std::tuple< m::wasm::Block, m::wasm::Block, m::wasm::Block > m::wasm::compile_store_sequential ( const Schema ,
const Schema ,
Ptr< void >  ,
const storage::DataLayout ,
std::size_t  ,
const Schema ,
Variable< uint32_t, VariableKind::Param, false > &   
)

◆ compile_store_sequential() [4/4]

template<VariableKind Kind>
std::tuple< Block, Block, Block > m::wasm::compile_store_sequential ( const Schema tuple_value_schema,
const Schema tuple_addr_schema,
Ptr< void >  base_address,
const storage::DataLayout layout,
std::size_t  num_simd_lanes,
const Schema layout_schema,
Variable< uint32_t, Kind, false > &  tuple_id 
)

Compiles the data layout layout containing tuples of schema layout_schema such that it sequentially stores tuples of schema tuple_value_schema starting at memory address base_address and tuple ID tuple_id.

The store does not have to be done in a single pass, i.e. the returned code may be emitted into a function which can be called multiple times and each call starts storing at exactly the point where it has ended in the last call. The given variable tuple_id will be incremented automatically before advancing to the next tuple (i.e. code for this will be emitted at the start of the block returned as third element). Predication is supported and emitted respectively. SIMDfication is supported and will be emitted iff num_simd_lanes is greater than 1.

Does not emit any code but returns three wasm::Blocks containing code: the first one initializes all needed variables, the second one stores one tuple, and the third one advances to the next tuple. Additionally, if not

Template Parameters
IsStore,addsthe addresses of the values of tuples with schema tuple_addr_schema into the current environment.

◆ compile_store_sequential_single_pass() [1/4]

template std::tuple< m::wasm::Block, m::wasm::Block, m::wasm::Block > m::wasm::compile_store_sequential_single_pass ( const Schema ,
const Schema ,
Ptr< void >  ,
const storage::DataLayout ,
std::size_t  ,
const Schema ,
Global< U32x1 > &   
)

◆ compile_store_sequential_single_pass() [2/4]

template std::tuple< m::wasm::Block, m::wasm::Block, m::wasm::Block > m::wasm::compile_store_sequential_single_pass ( const Schema ,
const Schema ,
Ptr< void >  ,
const storage::DataLayout ,
std::size_t  ,
const Schema ,
Var< U32x1 > &   
)

◆ compile_store_sequential_single_pass() [3/4]

template std::tuple< m::wasm::Block, m::wasm::Block, m::wasm::Block > m::wasm::compile_store_sequential_single_pass ( const Schema ,
const Schema ,
Ptr< void >  ,
const storage::DataLayout ,
std::size_t  ,
const Schema ,
Variable< uint32_t, VariableKind::Param, false > &   
)

◆ compile_store_sequential_single_pass() [4/4]

template<VariableKind Kind>
std::tuple< Block, Block, Block > m::wasm::compile_store_sequential_single_pass ( const Schema tuple_value_schema,
const Schema tuple_addr_schema,
Ptr< void >  base_address,
const storage::DataLayout layout,
std::size_t  num_simd_lanes,
const Schema layout_schema,
Variable< uint32_t, Kind, false > &  tuple_id 
)

Compiles the data layout layout containing tuples of schema layout_schema such that it sequentially stores tuples of schema tuple_value_schema starting at memory address base_address and tuple ID tuple_id.

The store has to be done in a single pass, i.e. the execution of the returned code must not be split among multiple function calls. The given variable tuple_id will be incremented automatically before advancing to the next tuple (i.e. code for this will be emitted at the start of the block returned as third element). Predication is supported and emitted respectively. SIMDfication is supported and will be emitted iff num_simd_lanes is greater than 1.

Does not emit any code but returns three wasm::Blocks containing code: the first one initializes all needed variables, the second one stores one tuple, and the third one advances to the next tuple. Additionally, if not

Template Parameters
IsStore,addsthe addresses of the values of tuples with schema tuple_addr_schema into the current environment.

Referenced by m::wasm::Buffer< IsGlobal >::consume().

◆ constexpr()

if m::wasm::constexpr ( L *sizeof(To)<=  16)
constexpr

References L.

◆ CONTINUE() [1/2]

template<primitive_convertible C>
requires requires (C &&c) { PrimitiveExpr<bool, 1>(std::forward<C>(c)); }
void m::wasm::CONTINUE ( C &&  _cond,
std::size_t  level = 1 
)
inline

Definition at line 6190 of file WasmDSL.hpp.

References CONTINUE().

◆ CONTINUE() [2/2]

void m::wasm::CONTINUE ( std::size_t  level = 1)
inline

◆ convert() [1/3]

template<dsl_primitive U, std::size_t M>
PrimitiveExpr< U, M > m::wasm::convert ( )
private

Definition at line 1635 of file WasmDSL.hpp.

References and(), clone(), convert(), L, M_unreachable, move(), swizzle_lanes(), m::T(), ToL, m::U, unary(), and vectors().

Referenced by convert().

◆ convert() [2/3]

template<dsl_primitive U, std::size_t M>
requires ((M * sizeof(U)) % 16 == 0)
PrimitiveExpr< U, M > m::wasm::convert ( )
private

◆ convert() [3/3]

template<sql_type To>
To m::wasm::convert ( SQL_t variant)
inline

Definition at line 433 of file WasmUtil.hpp.

References M_unreachable, and num_simd_lanes.

◆ copy_sign()

and arithmetically_combinable< T, U, L > auto L auto m::wasm::copy_sign ( PrimitiveExpr< U, L other) -> PrimitiveExpr<common_type_t<T, U>, L>

References BINFOP_, copy_sign(), and L.

Referenced by copy_sign().

◆ discard() [1/3]

void m::wasm::discard ( )

Discards this.

This is necessary to signal in our DSL that a value is expectedly unused (and not dead code). For example, the return value of a function that was invoked because of its side effects may remain unused. One must discard the returned value to signal that the value is expectedly left unused.

Definition at line 1588 of file WasmDSL.hpp.

References discard(), expr_, M_insist, and referenced_bits_.

Referenced by and(), m::wasm::Environment::clear(), discard(), m::wasm::Aggregation::execute(), m::wasm::HashBasedGroupJoin::execute(), extract(), m::wasm::ChainedHashTable< IsGlobal >::insert_key(), m::wasm::OpenAddressingHashTable< IsGlobal, ValueInPlace >::insert_key(), m::wasm::NChar::is_null(), m::wasm::NChar::not_null(), and m::wasm::Environment::~Environment().

◆ discard() [2/3]

void m::wasm::discard ( SQL_addr_t variant)
inline

Definition at line 424 of file WasmUtil.hpp.

References M_unreachable, and m::T().

◆ discard() [3/3]

void m::wasm::discard ( SQL_t variant)
inline

Definition at line 416 of file WasmUtil.hpp.

References M_unreachable, and m::T().

◆ dump() [1/2]

void m::wasm::dump ( ) const

Definition at line 3062 of file WasmDSL.hpp.

References dump().

◆ dump() [2/2]

void m::wasm::dump ( std::ostream &  out) const

Definition at line 3061 of file WasmDSL.hpp.

References dump().

Referenced by dump().

◆ eqz()

PrimitiveExpr< bool, L > m::wasm::eqz ( )

References eqz(), and UNIOP_.

Referenced by and(), and eqz().

◆ expr()

::wasm::Expression * m::wasm::expr ( )
private

Moves the underlying Binaryen ::wasm::Expression out of this.

Definition at line 1558 of file WasmDSL.hpp.

References expr_, and M_insist.

◆ Expr()

template<typename T , std::size_t L>
m::wasm::Expr ( PrimitiveExpr< T, L ,
PrimitiveExpr< bool, L  
) -> Expr< T, L >

CTAD guide for Expr

◆ extract() [1/2]

template<std::size_t M>
requires (M < L) (L > 1)
PrimitiveExpr< T, 1 > m::wasm::extract ( )

Extracts the.

Template Parameters
M-th value of this.

Definition at line 2963 of file WasmDSL.hpp.

References extract(), and L.

Referenced by extract(), and m::wasm::Variable< T, Kind, CanBeNull, L >::UNARY_LIST().

◆ extract() [2/2]

template<std::size_t M>
requires (M < L)
PrimitiveExpr< T, 1 > m::wasm::extract ( )

Extracts the.

Template Parameters
M-th value of this.

Definition at line 4043 of file WasmDSL.hpp.

References discard(), extract(), res, and vectors_.

◆ extract_unsafe()

template<std::size_t M>
requires (M * sizeof(T) < 16)
PrimitiveExpr< T, 1 > m::wasm::extract_unsafe ( )
private

Extracts the.

Template Parameters
M-th value of the underlying 128 bit vector of this. Special care must be taken as this method must not be called on scalar expressions and the extracted value might not be one of the first (defined) L values.

Definition at line 2932 of file WasmDSL.hpp.

References extract_unsafe(), M_CONSTEXPR_COND, M_unreachable, op, referenced_bits(), and m::T().

Referenced by extract_unsafe().

◆ fnv_1a()

U64x1 m::wasm::fnv_1a ( Ptr< U8x1 >  bytes,
U32x1  num_bytes 
)

Hashes num_bytes bytes of bytes using the FNV-1a algorithm.

Definition at line 297 of file WasmAlgo.cpp.

References m::and, Wasm_insist, and WHILE.

Referenced by str_hash().

◆ GOTO() [1/2]

template<primitive_convertible C>
requires requires (C &&c) { PrimitiveExpr<bool, 1>(std::forward<C>(c)); }
void m::wasm::GOTO ( C &&  _cond,
const Block block 
)
inline

Definition at line 6203 of file WasmDSL.hpp.

References m::wasm::Block::go_to(), and GOTO().

◆ GOTO() [2/2]

void m::wasm::GOTO ( const Block block)
inline

◆ hash()

PrimitiveExpr< uint64_t, L > L L L L m::wasm::hash ( )
Initial value:
== 1) { return make_unsigned(); }
PrimitiveExpr<uint64_t
auto make_unsigned()
Conversion of a PrimitiveExpr<T, L> to a PrimitiveExpr<std::make_unsigned_t<T>, L>.
Definition: WasmDSL.hpp:3658

References hash().

Referenced by hash(), m::wasm::ChainedHashTable< IsGlobal >::hash_to_bucket(), and m::wasm::OpenAddressingHashTableBase::hash_to_bucket().

◆ insist_interpreter()

wasm::Literals m::wasm::insist_interpreter ( ::wasm::Literals &  args)

Reports a runtime error.

The index to the filename, the line, and an optional message stored by the host is given by args.

Definition at line 516 of file WasmDSL.cpp.

References args, m::wasm::Module::Get(), m::wasm::Module::get_message(), and M_insist.

◆ is_null()

template<std::size_t L = 1>
Bool< L > m::wasm::is_null ( SQL_t variant)
inline

◆ L()

if m::wasm::L ( op  ,
other   
)

◆ like()

_Boolx1 m::wasm::like ( NChar  str,
NChar  pattern,
const char  escape_char = '\\' 
)

◆ like_contains()

_Boolx1 m::wasm::like_contains ( NChar  str,
const ThreadSafePooledString pattern 
)

Checks whether the string str contains the pattern pattern.

The implementation is based on the Knuth–Morris–Pratt algorithm and represents a special case of the SQL LIKE in which the pattern is known at query compile time and has the form %[^_%\\]+%.

‍one function per static pattern

Definition at line 3543 of file WasmUtil.cpp.

References m::wasm::Module::add_garbage_collected_data(), m::wasm::Module::Allocator, and, bool, m::wasm::NChar::can_be_null(), m::contains(), ELSE, FUNCTION, m::wasm::Module::Get(), m::wasm::CodeGenContext::Get(), IF, m::wasm::NChar::length(), M_insist, PARAMETER, RETURN, m::wasm::CodeGenContext::scoped_environment(), Wasm_insist, and WHILE.

Referenced by m::wasm::ExprCompiler::operator()().

◆ like_prefix()

_Boolx1 m::wasm::like_prefix ( NChar  str,
const ThreadSafePooledString pattern 
)

Checks whether the string str has the prefix pattern.

The implementation is based on rewriting to string comparisons and represents a special case of the SQL LIKE in which the pattern is known at query compile time and has the form [^_%\\]+%.

Definition at line 3635 of file WasmUtil.cpp.

References m::wasm::Module::Allocator, and, m::wasm::NChar::clone(), GE, LT, M_insist, and strcmp().

Referenced by m::wasm::ExprCompiler::operator()().

◆ like_suffix()

_Boolx1 m::wasm::like_suffix ( NChar  str,
const ThreadSafePooledString pattern 
)

Checks whether the string str has the suffix pattern.

The implementation is based on rewriting to string comparisons and represents a special case of the SQL LIKE in which the pattern is known at query compile time and has the form %[^_%\\]+.

Definition at line 3661 of file WasmUtil.cpp.

References m::wasm::Module::Allocator, and, m::wasm::NChar::clone(), GE, m::wasm::NChar::length(), LT, M_insist, and strncmp().

Referenced by m::wasm::ExprCompiler::operator()().

◆ M_DECLARE_VISITOR()

m::wasm::M_DECLARE_VISITOR ( MatchBaseVisitor  ,
wasm::MatchBase  ,
M_WASM_VISITABLE_MATCH_LIST   
)

◆ M_MAKE_STL_VISITABLE()

m::wasm::M_MAKE_STL_VISITABLE ( ConstPreOrderMatchBaseVisitor  ,
const wasm::MatchBase  ,
M_WASM_VISITABLE_MATCH_LIST   
)

◆ make_literal() [1/6]

template<typename T , std::size_t L, bool = false, typename U >
requires (L == 1)
and std::floating_point< T > and std::floating_point< U >inline ::wasm::Literal m::wasm::make_literal ( U  value)

Creates a ::wasm::Literal of type.

Template Parameters
Tfrom a given value. Used to solve macOS ambiguity.

Definition at line 444 of file WasmDSL.hpp.

References make_literal(), m::T(), and value.

Referenced by make_literal(), PrimitiveExpr(), and sizeof().

◆ make_literal() [2/6]

template<typename T , std::size_t L, bool = false, typename U >
requires (L == 1)
and signed_integral< T > and integral< U >inline ::wasm::Literal m::wasm::make_literal ( U  value)

Creates a ::wasm::Literal of type.

Template Parameters
Tfrom a given value. Used to solve macOS ambiguity.

Definition at line 452 of file WasmDSL.hpp.

References make_literal(), m::T(), and value.

◆ make_literal() [3/6]

template<typename T , std::size_t L, bool = false, typename U >
requires (L == 1)
and unsigned_integral< T > and integral< U >inline ::wasm::Literal m::wasm::make_literal ( U  value)

Creates a ::wasm::Literal of type.

Template Parameters
Tfrom a given value. Used to solve macOS ambiguity.

Definition at line 461 of file WasmDSL.hpp.

References make_literal(), m::T(), and value.

◆ make_literal() [4/6]

template<typename T , std::size_t L, bool VecRepr = false, typename U >
requires (L == 1)
and boolean< T > and boolean< U >inline ::wasm::Literal m::wasm::make_literal ( U  value)

Creates a ::wasm::Literal of type.

Template Parameters
Tfrom a given value. Used to solve macOS ambiguity.

Definition at line 470 of file WasmDSL.hpp.

References M_CONSTEXPR_COND, make_literal(), m::U, and value.

◆ make_literal() [5/6]

inline ::wasm::Literal m::wasm::make_literal ( U  value)

Definition at line 488 of file WasmDSL.hpp.

References L, make_literal(), m::T(), and value.

◆ make_literal() [6/6]

template<typename T , std::size_t L, bool = false>
requires (L == 1)
and std::is_pointer_v< T >inline ::wasm::Literal m::wasm::make_literal ( uint32_t  value)

Creates a ::wasm::Literal of type.

Template Parameters
Tfrom a given value. Used to solve macOS ambiguity.

Definition at line 478 of file WasmDSL.hpp.

References make_literal(), and value.

◆ make_signed()

auto m::wasm::make_signed ( )

◆ make_unsigned()

auto m::wasm::make_unsigned ( )

Conversion of a PrimitiveExpr<T, L> to a PrimitiveExpr<std::make_unsigned_t<T>, L>.

Only available if

  • T is a signed integral type except bool

Definition at line 3658 of file WasmDSL.hpp.

References L, and make_unsigned().

Referenced by make_unsigned(), m::wasm::ChainedHashTable< IsGlobal >::rehash(), m::wasm::OpenAddressingHashTable< IsGlobal, ValueInPlace >::rehash(), and m::wasm::OpenAddressingHashTable< IsGlobal, ValueInPlace >::update_high_watermark().

◆ max()

template<std::floating_point U>
requires arithmetically_combinable<T, U, L>
auto m::wasm::max ( PrimitiveExpr< U, L other) -> PrimitiveExpr<common_type_t<T, U>, L>

Computes the maximum of this and other.

Computes the maximum of this and other.

Definition at line 2504 of file WasmDSL.hpp.

References BINFOP_, BINFVOP_, L, M_CONSTEXPR_COND, and max().

Referenced by m::wasm::Aggregation::execute(), m::wasm::HashBasedGrouping::execute(), m::wasm::HashBasedGroupJoin::execute(), and max().

◆ min()

and arithmetically_combinable< T, U, L > auto L auto L auto m::wasm::min ( PrimitiveExpr< U, L other) -> PrimitiveExpr<common_type_t<T, U>, L>

◆ move() [1/2]

template<dsl_primitive U = T, std::size_t M = L>
std::pair<::wasm::Expression *, std::list< std::shared_ptr< Bit > > > m::wasm::move ( )
private

Moves the underlying Binaryen ::wasm::Expression and the referenced bits out of this.

Must be templated to match move() of specialization of double pumped PrimitiveExprs.

Definition at line 1567 of file WasmDSL.hpp.

References move(), and referenced_bits().

Referenced by BINARY(), convert(), m::wasm::exception::exception(), move(), PrimitiveExpr(), and swizzle_lanes().

◆ move() [2/2]

template<dsl_primitive U, std::size_t M>
requires ((M * sizeof(U)) / 16 == num_vectors)
auto m::wasm::move ( )
private

Moves the underlying vectors as PrimitiveExpr<U, 16 / sizeof(U)> out of this.

Definition at line 3152 of file WasmDSL.hpp.

References move(), num_vectors, m::U, vectors(), and vectors_.

◆ murmur3_64a_hash()

U64x1 m::wasm::murmur3_64a_hash ( std::vector< std::pair< const Type *, SQL_t > >  values)

Hashes the elements of values where the first element is the type of the value to hash and the second element is the value itself using the Murmur3-64a algorithm.

Definition at line 338 of file WasmAlgo.cpp.

References ELSE, IF, is_null(), M_insist, M_unreachable, murmur3_bit_mix(), reinterpret_to_U64(), str_hash(), and m::T().

Referenced by m::wasm::ChainedHashTable< IsGlobal >::hash_to_bucket(), and m::wasm::OpenAddressingHashTableBase::hash_to_bucket().

◆ murmur3_bit_mix()

U64x1 m::wasm::murmur3_bit_mix ( U64x1  bits)

Mixes the bits of bits using the Murmur3 algorithm.

Definition at line 280 of file WasmAlgo.cpp.

References res.

Referenced by murmur3_64a_hash(), and str_hash().

◆ not_null()

template<std::size_t L = 1>
Bool< L > m::wasm::not_null ( SQL_t variant)
inline

◆ operator and()

template<boolean U>
requires boolean<T>
PrimitiveExpr< bool, L > m::wasm::operator and ( PrimitiveExpr< U, L other)

Computes the logical conjunction (and) of this and other.

Definition at line 2896 of file WasmDSL.hpp.

References BINOP_, BINVOP_, L, and M_CONSTEXPR_COND.

◆ operator bitand()

template<std::integral U>
requires arithmetically_combinable<T, U, L>
auto m::wasm::operator bitand ( PrimitiveExpr< U, L other) -> PrimitiveExpr<common_type_t<T, U>, L>

Computes the bitwise and of this and other.

Computes the bitwise or of this and other. Computes the (bitwise) xor of this and other. Shifts this left by other.

Definition at line 2555 of file WasmDSL.hpp.

References BINIOP_, BINVOP_, L, and M_CONSTEXPR_COND.

◆ operator bool()

m::wasm::operator bool ( ) const
explicit

Returns true if this PrimitiveExpr actually holds a value (Binaryen AST), false otherwise.

Can be used to test whether this PrimitiveExpr has already been used.

Definition at line 1574 of file WasmDSL.hpp.

References bool, and expr_.

◆ operator or()

template<boolean U>
requires boolean<T>
PrimitiveExpr< bool, L > m::wasm::operator or ( PrimitiveExpr< U, L other)

Computes the logical disjunction (or) of this and other.

Definition at line 2908 of file WasmDSL.hpp.

References BINOP_, BINVOP_, L, and M_CONSTEXPR_COND.

◆ operator!=()

template<dsl_primitive U>
requires same_signedness<T, U>
and arithmetically_combinable< T, U, L > PrimitiveExpr< bool, L > m::wasm::operator!= ( PrimitiveExpr< U, L other)

Checks whether this unequal to other.

Definition at line 2706 of file WasmDSL.hpp.

References BINARY_OP, BINARY_VOP, indices, L, M_CONSTEXPR_COND, operator!=(), m::T(), and ToL.

Referenced by operator!=().

◆ operator%()

template<integral U>
requires same_signedness<T, U>
and arithmetically_combinable< T, U, L > auto m::wasm::operator% ( PrimitiveExpr< U, L other) -> PrimitiveExpr<common_type_t<T, U>, L>

Computes the remainder of dividing this by other.

References BINIOP_, L, M_CONSTEXPR_COND, operator%(), and m::U.

Referenced by operator%().

◆ operator*() [1/2]

template<typename Base >
requires expr_convertible<Base>
and signed_integral< typename expr_t< Base >::type > Decimal< typename expr_t< Base >::type > m::wasm::operator* ( Base &&  left,
Decimal< typename expr_t< Base >::type >  right 
)

Definition at line 275 of file WasmUtil.hpp.

◆ operator*() [2/2]

template<arithmetic U>
requires arithmetically_combinable<T, U, L> (L == 1)
auto m::wasm::operator* ( PrimitiveExpr< U, L other) -> PrimitiveExpr<common_type_t<T, U>, L>

Multiplies this and other.

Definition at line 2375 of file WasmDSL.hpp.

References BINARY_OP, L, and operator*().

Referenced by operator*().

◆ operator+() [1/4]

PrimitiveExpr m::wasm::operator+ ( )

Definition at line 2142 of file WasmDSL.hpp.

References m::operator+().

◆ operator+() [2/4]

template<typename Base >
requires expr_convertible<Base>
and signed_integral< typename expr_t< Base >::type > Decimal< typename expr_t< Base >::type > m::wasm::operator+ ( Base &&  left,
Decimal< typename expr_t< Base >::type >  right 
)

Definition at line 261 of file WasmUtil.hpp.

◆ operator+() [3/4]

template<dsl_pointer_to_primitive T, VariableKind Kind, bool CanBeNull, std::size_t L>
requires requires (const Variable<T, Kind, CanBeNull, L> &var, typename PrimitiveExpr<T, L>::offset_t delta) { var.val().operator+(delta); }
auto m::wasm::operator+ ( const Variable< T, Kind, CanBeNull, L > &  var,
typename PrimitiveExpr< T, L >::offset_t  delta 
)

Definition at line 5727 of file WasmDSL.hpp.

References m::operator+().

◆ operator+() [4/4]

PrimitiveExpr< uint64_t, L > L L L L L auto m::wasm::operator+ ( PrimitiveExpr< U, L other) -> PrimitiveExpr<common_type_t<T, U>, L>

Definition at line 2353 of file WasmDSL.hpp.

References BINARY_OP, BINARY_VOP, L, M_CONSTEXPR_COND, and m::operator+().

◆ operator-() [1/4]

PrimitiveExpr m::wasm::operator- ( )

References m::operator-(), and m::T().

◆ operator-() [2/4]

template<typename Base >
requires expr_convertible<Base>
and signed_integral< typename expr_t< Base >::type > Decimal< typename expr_t< Base >::type > m::wasm::operator- ( Base &&  left,
Decimal< typename expr_t< Base >::type >  right 
)

Definition at line 268 of file WasmUtil.hpp.

◆ operator-() [3/4]

template<dsl_pointer_to_primitive T, VariableKind Kind, bool CanBeNull, std::size_t L>
requires requires (const Variable<T, Kind, CanBeNull, L> &var, typename PrimitiveExpr<T, L>::offset_t delta) { var.val().operator-(delta); }
auto m::wasm::operator- ( const Variable< T, Kind, CanBeNull, L > &  var,
typename PrimitiveExpr< T, L >::offset_t  delta 
)

Definition at line 5735 of file WasmDSL.hpp.

References m::operator-().

◆ operator-() [4/4]

template<arithmetic U>
requires same_signedness<T, U>
and arithmetically_combinable< T, U, L > auto m::wasm::operator- ( PrimitiveExpr< U, L other) -> PrimitiveExpr<common_type_t<T, U>, L>

Subtracts other from this.

Definition at line 2364 of file WasmDSL.hpp.

References BINARY_OP, BINARY_VOP, L, M_CONSTEXPR_COND, and m::operator-().

◆ operator/() [1/3]

template<typename Base >
requires expr_convertible<Base>
and signed_integral< typename expr_t< Base >::type > Decimal< typename expr_t< Base >::type > m::wasm::operator/ ( Base &&  left,
Decimal< typename expr_t< Base >::type >  right 
)

Definition at line 282 of file WasmUtil.hpp.

◆ operator/() [2/3]

template<arithmetic U>
requires same_signedness<T, U> (L == 1)
and arithmetically_combinable< T, U, L > auto m::wasm::operator/ ( PrimitiveExpr< U, L other) -> PrimitiveExpr<common_type_t<T, U>, L>

Divides this by other.

Definition at line 2436 of file WasmDSL.hpp.

References BINARY_OP, L, M_CONSTEXPR_COND, operator/(), and m::U.

Referenced by operator/().

◆ operator/() [3/3]

template<std::floating_point U>
requires arithmetically_combinable<T, U, L>
auto m::wasm::operator/ ( PrimitiveExpr< U, L other) -> PrimitiveExpr<common_type_t<T, U>, L>

Divides this by other.

Definition at line 2444 of file WasmDSL.hpp.

References BINFVOP_, L, and operator/().

◆ operator<()

template<arithmetic U>
requires same_signedness<T, U>
and arithmetically_combinable< T, U, L > PrimitiveExpr< bool, L > m::wasm::operator< ( PrimitiveExpr< U, L other)

Checks whether this less than other.

Definition at line 2722 of file WasmDSL.hpp.

References and(), BINARY_OP, BINFVOP_, BINVOP_, indices, L, M_CONSTEXPR_COND, M_unreachable, op, operator<(), m::T(), ToL, and m::U.

Referenced by operator<().

◆ operator<<() [1/2]

template<integral U>
requires requires (PrimitiveExpr<U, 1> e) { PrimitiveExpr<std::conditional_t<std::is_signed_v<T>, int32_t, uint32_t>, 1>(e); }
PrimitiveExpr m::wasm::operator<< ( PrimitiveExpr< U, 1 >  other)

Shifts this left by other.

Definition at line 2605 of file WasmDSL.hpp.

References M_unreachable, op, m::operator<<(), referenced_bits(), and m::T().

◆ operator<<() [2/2]

std::ostream & operator<< ( std::ostream &  out,
const PrimitiveExpr P 
)

Definition at line 3054 of file WasmDSL.hpp.

References num_simd_lanes, and m::operator<<().

◆ operator<=()

template<arithmetic U>
requires same_signedness<T, U>
and arithmetically_combinable< T, U, L > PrimitiveExpr< bool, L > m::wasm::operator<= ( PrimitiveExpr< U, L other)

Checks whether this less than or equals to other.

Definition at line 2765 of file WasmDSL.hpp.

References and(), BINARY_OP, BINFVOP_, BINVOP_, indices, L, M_CONSTEXPR_COND, M_unreachable, op, operator<=(), m::T(), ToL, and m::U.

Referenced by operator<=().

◆ operator=() [1/2]

PrimitiveExpr & m::wasm::operator= ( PrimitiveExpr &&  )
delete

References operator=().

◆ operator=() [2/2]

PrimitiveExpr & m::wasm::operator= ( PrimitiveExpr  other)
private

Assigns other to this.

Only necessary to assign vectors array for double pumping. XXX: use vector instead of array?

Definition at line 1546 of file WasmDSL.hpp.

References operator=(), and m::swap().

Referenced by operator=(), ReturnL(), and USING_N().

◆ operator==()

template<dsl_primitive U>
requires same_signedness<T, U>
and arithmetically_combinable< T, U, L > PrimitiveExpr< bool, L > m::wasm::operator== ( PrimitiveExpr< U, L other)

Checks whether this equals other.

Definition at line 2689 of file WasmDSL.hpp.

References BINARY_OP, BINARY_VOP, indices, L, M_CONSTEXPR_COND, m::T(), and ToL.

◆ operator>()

template<arithmetic U>
requires same_signedness<T, U>
and arithmetically_combinable< T, U, L > PrimitiveExpr< bool, L > m::wasm::operator> ( PrimitiveExpr< U, L other)

Checks whether this greater than to other.

Definition at line 2809 of file WasmDSL.hpp.

References and(), BINARY_OP, BINFVOP_, BINVOP_, indices, L, M_CONSTEXPR_COND, M_unreachable, op, operator>(), m::T(), ToL, and m::U.

Referenced by operator>().

◆ operator>=()

template<arithmetic U>
requires same_signedness<T, U>
and arithmetically_combinable< T, U, L > PrimitiveExpr< bool, L > m::wasm::operator>= ( PrimitiveExpr< U, L other)

Checks whether this greater than or equals to other.

Definition at line 2852 of file WasmDSL.hpp.

References and(), BINARY_OP, BINFVOP_, BINVOP_, indices, L, M_CONSTEXPR_COND, M_unreachable, op, operator>=(), m::T(), ToL, and m::U.

Referenced by operator>=().

◆ operator>>()

template<integral U>
requires arithmetically_combinable<T, U, L>
auto m::wasm::operator>> ( PrimitiveExpr< U, L other) -> PrimitiveExpr<common_type_t<T, U>, L>

Shifts this right by other.

References BINIOP_, L, M_CONSTEXPR_COND, operator>>(), and m::U.

Referenced by operator>>().

◆ PrimitiveExpr() [1/11]

m::wasm::PrimitiveExpr ( )
explicitprivatedefault

‍Constructs an empty PrimitiveExpr, for which operator bool() returns false.

Definition at line 3099 of file WasmDSL.hpp.

References vectors_.

◆ PrimitiveExpr() [2/11]

m::wasm::PrimitiveExpr ( ::wasm::Expression *  expr,
std::list< std::shared_ptr< Bit > >  referenced_bits = {} 
)
explicitprivate

‍Constructs a PrimitiveExpr from a Binaryen ::wasm::Expression expr and the referenced_bits.

Definition at line 1494 of file WasmDSL.hpp.

◆ PrimitiveExpr() [3/11]

m::wasm::PrimitiveExpr ( const PrimitiveExpr )
delete

◆ PrimitiveExpr() [4/11]

m::wasm::PrimitiveExpr ( const std::array< uint8_t, 16 > &  bytes)
explicitprivate

Constructs a PrimitiveExpr from a byte array bytes.

Definition at line 1505 of file WasmDSL.hpp.

References L.

◆ PrimitiveExpr() [5/11]

Constructs a new PrimitiveExpr by moving the underlying expr_ and referenced_bits_ of other to this.

Constructs a new PrimitiveExpr by moving the underlying vectors_ of other to this.

Definition at line 1540 of file WasmDSL.hpp.

References expr_, move(), and referenced_bits_.

◆ PrimitiveExpr() [6/11]

Constructs a new PrimitiveExpr by moving the underlying expr_ and referenced_bits_ of other to this.

Constructs a new PrimitiveExpr by moving the underlying vectors_ of other to this.

Definition at line 1535 of file WasmDSL.hpp.

References expr_, move(), and referenced_bits_.

◆ PrimitiveExpr() [7/11]

m::wasm::PrimitiveExpr ( std::array< PrimitiveExpr, 1 >  vectors)
explicitprivate

Constructs a PrimitiveExpr from a vector array vectors containing a single PrimitiveExpr.

Definition at line 1511 of file WasmDSL.hpp.

References L.

◆ PrimitiveExpr() [8/11]

m::wasm::PrimitiveExpr ( std::array< vector_type, num_vectors vectors)
explicitprivate

‍Constructs a PrimitiveExpr from an array of fully utilized PrimitiveExprs vectors.

Definition at line 3108 of file WasmDSL.hpp.

References move(), vectors(), and vectors_.

◆ PrimitiveExpr() [9/11]

m::wasm::PrimitiveExpr ( std::initializer_list< vector_type vectors)
explicitprivate

‍Constructs a PrimitiveExpr from an initializer list of fully utilized PrimitiveExprs vectors.

Definition at line 3110 of file WasmDSL.hpp.

References move(), vectors(), and vectors_.

◆ PrimitiveExpr() [10/11]

m::wasm::PrimitiveExpr ( std::pair<::wasm::Expression *, std::list< std::shared_ptr< Bit > > >  expr)
explicitprivate

Constructs a PrimitiveExpr from a std::pair of a Binaryen ::wasm::Expression expr and the referenced_bits.

Definition at line 1500 of file WasmDSL.hpp.

References move().

◆ PrimitiveExpr() [11/11]

m::wasm::PrimitiveExpr ( Us...  value)
explicit

Definition at line 1520 of file WasmDSL.hpp.

References L, make_literal(), m::T(), and value.

◆ PrimitiveExpr< common_type_t< T, U >, L >()

References L, and ShuffleBytes().

◆ quicksort()

template<bool CmpPredicated, bool IsGlobal>
void m::wasm::quicksort ( Buffer< IsGlobal > &  buffer,
const std::vector< SortingOperator::order_type > &  order 
)

Sorts the buffer buffer using the quicksort algorithm and a branchless binary partition algorithm.

The ordering is specified by order where the first element is the expression to order on and the second element is true iff ordering should be performed ascending. Comparison is performed branchless iff

Template Parameters
CmpPredicated.

Definition at line 64 of file WasmAlgo.cpp.

References m::wasm::Buffer< IsGlobal >::create_load_proxy(), m::wasm::Buffer< IsGlobal >::create_swap_proxy(), DO_WHILE, ELSE, FUNCTION, m::wasm::CodeGenContext::Get(), IF, M_insist, PARAMETER, quicksort(), m::wasm::Buffer< IsGlobal >::schema(), m::wasm::CodeGenContext::scoped_environment(), m::wasm::Buffer< IsGlobal >::setup_base_address(), m::wasm::Buffer< IsGlobal >::size(), m::swap(), m::wasm::Buffer< IsGlobal >::teardown_base_address(), Wasm_insist, and WHILE.

Referenced by quicksort().

◆ quicksort< false >()

template void m::wasm::quicksort< false > ( GlobalBuffer ,
const std::vector< SortingOperator::order_type > &   
)

◆ quicksort< true >()

template void m::wasm::quicksort< true > ( GlobalBuffer ,
const std::vector< SortingOperator::order_type > &   
)

◆ referenced_bits()

std::list< std::shared_ptr< Bit > > m::wasm::referenced_bits ( )
private

◆ reinterpret()

PrimitiveExpr< To, ToL > std::size_t ToL m::wasm::reinterpret ( )

Definition at line 2021 of file WasmDSL.hpp.

References and(), L, M_unreachable, and m::T().

◆ replace() [1/2]

PrimitiveExpr m::wasm::replace ( U &&  _value)

Definition at line 2969 of file WasmDSL.hpp.

References L, M_CONSTEXPR_COND, M_unreachable, op, referenced_bits(), replace(), m::T(), and value.

Referenced by replace().

◆ replace() [2/2]

template<std::size_t M, primitive_convertible U>
requires (M < L) requires (vector_type v) { v.replace<0>(std::forward<U>(value)); }
PrimitiveExpr m::wasm::replace ( U &&  value)

Replaces the.

Template Parameters
M-th value of this with value.

Definition at line 4052 of file WasmDSL.hpp.

References replace(), and value.

◆ RETURN_UNSAFE() [1/3]

template<std::size_t L>
requires (L > 0)
and(L<=16) struct LocalBit< L > void m::wasm::RETURN_UNSAFE ( )
inline

A scalar bit or a vector of bits that is managed by the current function's stack.

0 ⇔ false ⇔ NOT NULL 1 ⇔ true ⇔ NULL

Definition at line 6165 of file WasmDSL.hpp.

References RETURN_UNSAFE().

Referenced by RETURN_UNSAFE().

◆ RETURN_UNSAFE() [2/3]

template<primitive_convertible T>
void m::wasm::RETURN_UNSAFE ( T &&  t)
inline

Definition at line 6168 of file WasmDSL.hpp.

References RETURN_UNSAFE().

◆ RETURN_UNSAFE() [3/3]

template<expr_convertible T>
requires (not primitive_convertible<T>)
void m::wasm::RETURN_UNSAFE ( T &&  t)
inline

Definition at line 6172 of file WasmDSL.hpp.

References RETURN_UNSAFE().

◆ ReturnL()

and m::wasm::ReturnL ( PrimitiveExpr< ParamTypes, ParamLs >  ...)

‍the type of the function

‍the DSL type of the function

‍the return type of the function

‍the amount of parameters of the function

Creates a std::tuple with statically typed fields, one per parameter.

Provides an alias type with the type of the

Template Parameters
I-th parameter.

Convenience alias for parameter_type::type.

Provides a value value with the number of SIMD lanes of the

Template Parameters
I-th parameter.

Convenience alias for parameter_num_simd_lanes::value.

< the unique name of this function

< the function body

‍the ::wasm::Function implementing this function

‍the previously active ::wasm::Function (may be nullptr)

Constructs a fresh Function and expects a unique name. To be called by FunctionProxy.

Returns the body of this function.

Returns the body of this function.

Returns the name of this function.

Returns all parameters of this function.

Returns the

Template Parameters
I-th parameter, statically typed via parameter_type_t.

Emits a return instruction returning void.

Emits a return instruction returning PrimitiveExpr constructed from t of type

Template Parameters
T.

Emits a return instruction returning PrimitiveExpr constructed from t of type

Template Parameters
T.Checks that t is NOT NULL.

< the unique name of the Function

Call function returning void with parameters args of types

Template Parameters
Args.

Call function returning void with parameters args of PrimitiveExpr type.

Call function returning non-void with parameters args of types

Template Parameters
Args.

Call function returning non-void with parameters args of PrimitiveExpr type.

< the unique name of the Function

Call function returning void with parameters args of types

Template Parameters
Args.

Call function returning void with parameters args of PrimitiveExpr type.

Call function returning non-void with parameters args of types

Template Parameters
Args.

Call function returning non-void with parameters args of PrimitiveExpr type.

Definition at line 1147 of file WasmDSL.hpp.

References m::and, m::wasm::Block::get(), L, M_insist, M_notnull, m::operator<<(), operator=(), ReturnL(), m::swap(), m::T(), and value.

Referenced by ReturnL().

◆ Select()

auto m::wasm::Select ( C &&  _cond,
T &&  _tru,
U &&  _fals 
)
inline

◆ ShuffleBytes()

auto m::wasm::ShuffleBytes ( T &&  _first,
U &&  _second,
const std::array< uint8_t, M > &  indices 
)
inline

Definition at line 6288 of file WasmDSL.hpp.

References indices, L, and ShuffleBytes().

Referenced by BINARY(), convert(), PrimitiveExpr< common_type_t< T, U >, L >(), and ShuffleBytes().

◆ ShuffleLanes()

auto m::wasm::ShuffleLanes ( T &&  _first,
U &&  _second,
const std::array< uint8_t, M > &  indices 
)
inline

Definition at line 6306 of file WasmDSL.hpp.

References indices, L, and ShuffleLanes().

Referenced by BINARY(), convert(), and ShuffleLanes().

◆ signum()

template<typename T >
requires arithmetic<typename T::type>
T m::wasm::signum ( T  value)

Returns the signum of value, i.e.

-1 for negative values, 0 for zero, and 1 for positive values..

Definition at line 1389 of file WasmUtil.hpp.

References m::T(), and value.

◆ sizeof()

M m::wasm::sizeof ( T  )

Definition at line 501 of file WasmDSL.hpp.

References L, make_literal(), m::T(), and value.

◆ splice() [1/2]

referenced_bits_high m::wasm::splice ( referenced_bits_high.  end(),
other.  referenced_bits() 
)

References referenced_bits_high.

◆ splice() [2/2]

referenced_bits_low m::wasm::splice ( referenced_bits_low.  end(),
other_cpy.  referenced_bits() 
)

References other_cpy, and referenced_bits_low.

◆ SQL_TYPES()

m::wasm::SQL_TYPES ( ADD_EXPR_SQL_TYPE  )

◆ str_hash()

U64x1 m::wasm::str_hash ( NChar  str)

◆ strcmp() [1/2]

_I32x1 m::wasm::strcmp ( NChar  left,
NChar  right,
bool  reverse = false 
)

Compares two strings left and right.

Has similar semantics to strcmp of libc.

Definition at line 3270 of file WasmUtil.cpp.

References m::wasm::NChar::length(), and strncmp().

Referenced by compare(), like_prefix(), and strcmp().

◆ strcmp() [2/2]

_Boolx1 m::wasm::strcmp ( NChar  left,
NChar  right,
cmp_op  op,
bool  reverse = false 
)

Compares two strings left and right.

Has similar semantics to strcmp of libc.

Definition at line 3292 of file WasmUtil.cpp.

References EQ, GE, GT, LE, LT, NE, op, res, and strcmp().

◆ strncmp() [1/2]

_I32x1 m::wasm::strncmp ( NChar  left,
NChar  right,
U32x1  len,
bool  reverse = false 
)

◆ strncmp() [2/2]

_Boolx1 m::wasm::strncmp ( NChar  left,
NChar  right,
U32x1  len,
cmp_op  op,
bool  reverse = false 
)

Compares two strings left and right.

Has similar semantics to strncmp of libc.

Definition at line 3278 of file WasmUtil.cpp.

References EQ, GE, GT, LE, LT, NE, op, res, and strncmp().

◆ strncpy()

Ptr< Charx1 > m::wasm::strncpy ( Ptr< Charx1 >  dst,
Ptr< Charx1 >  src,
U32x1  count 
)

Copies the contents of src to dst, but no more than count characters.

The function returns a Ptr<Charx1> to the end of the copied sequence in dst, i.e. to the copied NUL-byte or to the character after the lastly copied character. If the first count characters of src are not NUL-terminated, dst will not be NUL-terminated, too.

Definition at line 3311 of file WasmUtil.cpp.

References m::wasm::Module::add_garbage_collected_data(), BREAK(), FUNCTION, m::wasm::Module::Get(), m::wasm::CodeGenContext::Get(), M_insist, PARAMETER, RETURN, m::wasm::CodeGenContext::scoped_environment(), strncpy(), Wasm_insist, and WHILE.

Referenced by and(), compile_data_layout_point_access(), m::wasm::ExprCompiler::operator()(), m::wasm::buffer_swap_proxy_t< IsGlobal >::operator()(), m::wasm::HashTable::the_reference< NChar, IsConst >::operator=(), m::wasm::HashTable::the_reference< NChar, IsConst >::set_value(), and strncpy().

◆ swizzle_bytes()

PrimitiveExpr m::wasm::swizzle_bytes ( PrimitiveExpr< uint8_t, 16 >  indices)

Selects lanes of this in byte granularity depending on the indices specified by indices.

Indices i in the range [0, 15] select the i-th` lane, indices outside of this range result in the value 0.

Definition at line 3001 of file WasmDSL.hpp.

References indices, L, referenced_bits(), and swizzle_bytes().

Referenced by and(), swizzle_bytes(), and swizzle_lanes().

◆ swizzle_lanes()

M m::wasm::swizzle_lanes ( const std::array< uint8_t, M > &  _indices)

Definition at line 3033 of file WasmDSL.hpp.

References indices, L, M_CONSTEXPR_COND, move(), swizzle_bytes(), swizzle_lanes(), and m::T().

Referenced by convert(), and swizzle_lanes().

◆ throw_interpreter()

wasm::Literals m::wasm::throw_interpreter ( ::wasm::Literals &  args)

Throws an exception.

The exception type id and the index to the filename, the line, and an optional message stored by the host is given by args.

Definition at line 531 of file WasmDSL.cpp.

References args, m::wasm::Module::Get(), m::wasm::Module::get_message(), M_insist, and m::wasm::exception::names_.

◆ to() [1/2]

To ToL m::wasm::to ( )

Definition at line 1985 of file WasmDSL.hpp.

Referenced by and(), and to().

◆ to() [2/2]

template<dsl_pointer_to_primitive To, std::size_t ToL = L>
requires std::same_as<T, uint32_t>
PrimitiveExpr< To, ToL > m::wasm::to ( )

Explicit conversion of a PrimitiveExpr<uint32_t, 1> to a PrimitiveExpr<To*, ToL>

  • T is uint32_t
  • L equals 1, i.e. its scalar
  • To is a pointer to primitive type

References to().

◆ to< To, L >()

else return this template m::wasm::to< To, L > ( )

◆ unary()

template<dsl_primitive ResultType, std::size_t ResultL>
PrimitiveExpr< ResultType, ResultL > m::wasm::unary ( ::wasm::UnaryOp  op)
private

Helper function to implement unary operations.

Applies ::wasm::UnaryOp op to this and returns the result.

Definition at line 1607 of file WasmDSL.hpp.

References op, referenced_bits(), and unary().

Referenced by add_pairwise(), convert(), and unary().

◆ UNARY()

m::wasm::UNARY ( operator+  )

Concatenates the most significant bit (or the boolean value if this is boolean) of each value of this into a single mask.

References bitmask(), and L.

◆ unique()

std::string m::wasm::unique ( std::string  prefix,
unsigned &  counter 
)
inline

Creates a unique name from a given prefix and a counter.

Increments counter.

Definition at line 433 of file WasmDSL.hpp.

References unique().

Referenced by unique(), m::wasm::Module::Unique_Block_Name(), m::wasm::Module::Unique_Function_Name(), m::wasm::Module::Unique_Global_Name(), m::wasm::Module::Unique_If_Name(), and m::wasm::Module::Unique_Loop_Name().

◆ USING() [1/5]

Bool U8 U16 U32 U64 m::wasm::USING ( float  ,
Float   
)

◆ USING() [2/5]

Bool U8 m::wasm::USING ( int16_t  ,
I16   
)

◆ USING() [3/5]

Bool U8 U16 m::wasm::USING ( int32_t  ,
I32   
)

◆ USING() [4/5]

Bool U8 U16 U32 m::wasm::USING ( int64_t  ,
I64   
)

◆ USING() [5/5]

Bool m::wasm::USING ( int8_t  ,
I8   
)

◆ USING_N() [1/2]

Bool U8 U16 U32 U64 Double m::wasm::USING_N ( char  ,
,
Charx1   
)

‍this is neither signed nor unsigned char (see https://en.cppreference.com/w/cpp/language/types, Character types)

◆ USING_N() [2/2]

Bool U8 U16 U32 U64 Double Charx16 m::wasm::USING_N ( char  ,
32  ,
Charx32   
)

Allocates a fresh local variable of type

Template Parameters
Tand number of SIMD lanes
Lin the currently active function's stack and returns the variable's ::wasm::Index.

Helper class to select the appropriate storage for a Variable. Local variables are allocated on the currently active function's stack whereas global variables are allocated globally. Local variables of primitive type can have an additional NULL information.

Specialization for local variables of arithmetic type that cannot be NULL.

‍the number of Wasm locals needed

< the indices of the local(s)

< the type of the local(s)

Default-construct.

Construct from ::wasm::Index of already allocated local.

Construct from value.

Construct from value.

Assign value.

Assign value.

Retrieve value.

Retrieve value.

Specialization for local variables of boolean type that cannot be NULL.

‍the number of SIMD lanes of each local bit

‍the number of local bits (with maximal number of SIMD lanes of 16) needed

‍stores each boolean value in a single bit

Default-construct.

Construct from value.

Construct from value.

Assign value.

Retrieve value.

Specialization for local variables of primitive type (arithmetic and boolean) that can be NULL.

Default-construct.

Construct from value.

Construct from value.

Assign value.

Set to true.

Set to false.

Set to NULL.

Retrieve value.

Specialization for local variables of pointer to primitive type. Pointers cannot be NULL.

‍the address

Default-construct.

Construct from ::wasm::Index of already allocated local.

Construct from pointer.

Assign pointer.

Retrieve pointer.

Specialization for global variables of primitive or pointer to primitive type

Template Parameters
T.Global variables must be of primitive or pointer to primitive type and cannot be NULL.

‍the number of Wasm globals needed; pointers are always stored as single 32-bit unsigned integer global

< the unique names of the global(s)

< the type of the global(s)

Default construct.

Construct with initial value.

Construct with optional initial value.

Sets the initial value.

Sets the initial value.

Sets the initial value.

Sets the initial value.

Assign value.

Assign value.

Retrieve value.

Retrieve value.

Definition at line 5137 of file WasmDSL.hpp.

References and(), bool, indices, m::init(), is_null(), L, Local, M_insist, M_insist_no_ternary_logic, operator=(), m::T(), m::U, value, and vectors().

◆ vectors()

std::array< vector_type, num_vectors > m::wasm::vectors ( )
private

Moves the underlying PrimitiveExpr<T, 16 / sizeof(T)>s out of this.

Definition at line 3148 of file WasmDSL.hpp.

References vectors(), and vectors_.

Referenced by BINARY(), convert(), m::wasm::Module::emit_select(), move(), PrimitiveExpr(), USING_N(), and vectors().

◆ wasm_type()

template<typename T , std::size_t L>
auto m::wasm::wasm_type ( )

Definition at line 293 of file WasmDSL.hpp.

◆ ~PrimitiveExpr()

m::wasm::~PrimitiveExpr ( )
default

Definition at line 1554 of file WasmDSL.hpp.

References expr_, and M_insist.

Variable Documentation

◆ and

template<dsl_primitive... Us>
requires (primitive_expr_t<U> u)
L other PrimitiveExpr< common_type_t< T, U >, L > m::wasm::and { make_literal<T, L>(us...)

Constructs a new PrimitiveExpr from a constant value.

Replaces the.

Template Parameters
M-th value of this with value.

Definition at line 1519 of file WasmDSL.hpp.

Referenced by m::wasm::Environment::add_predicate(), m::wasm::ChainedHashTable< IsGlobal >::clear(), m::wasm::OpenAddressingHashTableBase::clear(), compare(), compile_data_layout_point_access(), m::wasm::OpenAddressingHashTable< IsGlobal, ValueInPlace >::emplace_without_rehashing(), m::wasm::Environment::empty(), m::wasm::ChainedHashTable< IsGlobal >::entry(), m::wasm::OpenAddressingHashTable< IsGlobal, ValueInPlace >::entry(), m::wasm::ChainedHashTable< IsGlobal >::equal_key(), m::wasm::OpenAddressingHashTable< IsGlobal, ValueInPlace >::equal_key(), m::wasm::Aggregation::execute(), m::wasm::HashBasedGrouping::execute(), m::wasm::HashBasedGroupJoin::execute(), m::wasm::Projection::execute(), m::wasm::SimpleHashJoin< UniqueBuild, Predicated >::execute(), m::wasm::SortMergeJoin< SortLeft, SortRight, Predicated, CmpPredicated >::execute(), m::wasm::Buffer< IsGlobal >::execute_pipeline(), m::wasm::Buffer< IsGlobal >::execute_pipeline_inline(), m::wasm::OpenAddressingHashTable< IsGlobal, ValueInPlace >::find(), m::wasm::ChainedHashTable< IsGlobal >::for_each(), m::wasm::OpenAddressingHashTable< IsGlobal, ValueInPlace >::for_each(), m::wasm::OpenAddressingHashTable< IsGlobal, ValueInPlace >::for_each_in_equal_range(), m::wasm::ChainedHashTable< IsGlobal >::hash_to_bucket(), m::wasm::OpenAddressingHashTableBase::hash_to_bucket(), index_scan_resolve_index_method(), like(), like_contains(), like_prefix(), like_suffix(), m::wasm::ExprCompiler::operator()(), m::wasm::HashTable::the_reference< NChar, IsConst >::operator=(), m::wasm::HashTable::the_reference< NChar, IsConst >::operator==(), m::wasm::HashTable::operator==(), m::wasm::IndexScan< IndexMethod >::pre_condition(), m::wasm::HashBasedGroupJoin::pre_condition(), m::wasm::SimpleHashJoin< UniqueBuild, Predicated >::pre_condition(), m::wasm::SortMergeJoin< SortLeft, SortRight, Predicated, CmpPredicated >::pre_condition(), m::wasm::Projection::pre_condition(), m::wasm::ChainedHashTable< IsGlobal >::rehash(), m::wasm::OpenAddressingHashTable< IsGlobal, ValueInPlace >::rehash(), m::wasm::Buffer< IsGlobal >::resume_pipeline(), m::wasm::detail::V8InspectorClientImpl::runMessageLoopOnPause(), m::wasm::HashTable::the_reference< NChar, IsConst >::set_value(), strncmp(), m::wasm::ChainedHashTable< IsGlobal >::teardown(), m::wasm::OpenAddressingHashTable< IsGlobal, ValueInPlace >::teardown(), m::wasm::OpenAddressingHashTable< IsGlobal, ValueInPlace >::try_emplace(), m::wasm::ChainedHashTable< IsGlobal >::~ChainedHashTable(), and m::wasm::OpenAddressingHashTable< IsGlobal, ValueInPlace >::~OpenAddressingHashTable().

◆ bool

std::size_t m::wasm::bool = false

◆ callback_functions

const std::map<::wasm::Name, std::function<::wasm::Literals(::wasm::Literals&)> > m::wasm::callback_functions
Initial value:
= {
#define CALLBACK(NAME, FUNC)
CALLBACK("insist", insist_interpreter)
CALLBACK("throw", throw_interpreter)
}
#define CALLBACK(NAME, FUNC)

Definition at line 587 of file WasmDSL.hpp.

Referenced by MockInterface::callImport().

◆ expr_

::wasm::Expression* m::wasm::expr_ = nullptr
private

‍the referenced Binaryen expression (AST)

Definition at line 1485 of file WasmDSL.hpp.

Referenced by clone(), discard(), expr(), operator bool(), PrimitiveExpr(), and ~PrimitiveExpr().

◆ high

PrimitiveExpr< To, 8 > m::wasm::high( Module::Builder().makeBinary(op_high, this->expr(), other.expr()), std::move(referenced_bits_high)) ( Module::Builder().makeBinary(op_high, this->expr(), other.expr())  ,
std::move(referenced_bits_high  
)

Referenced by BINARY(), and convert().

◆ indices

auto m::wasm::indices = std::to_array<uint8_t>({ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30 })

◆ L

else return this template m::wasm::L

◆ low

PrimitiveExpr< To, 8 > m::wasm::low( Module::Builder().makeBinary(op_low, this_cpy.expr(), other_cpy.expr()), std::move(referenced_bits_low)) ( Module::Builder().makeBinary(op_low, this_cpy.expr(), other_cpy.expr())  ,
std::move(referenced_bits_low  
)

Referenced by BINARY(), and convert().

◆ mask

Bool<L> T m::wasm::mask
Initial value:
{
*bytes ^= (-value.template to<typename T::type>() xor *bytes.clone()) bitand mask
Bool< L > value
Definition: WasmUtil.hpp:1317

Definition at line 1324 of file WasmUtil.hpp.

Referenced by and(), compile_data_layout_point_access(), and m::wasm::Module::emit_select().

◆ n

Bool<L> uint8_t m::wasm::n

◆ num_simd_lanes

static constexpr std::size_t m::wasm::num_simd_lanes = L
staticconstexpr

◆ num_vectors

constexpr std::size_t m::wasm::num_vectors = (L * sizeof(T)) / 16
staticconstexpr

‍the number of SIMD vectors needed for the represented expression

Definition at line 3079 of file WasmDSL.hpp.

Referenced by and(), BINARY(), and move().

◆ op

auto m::wasm::op
Initial value:
= [](){
if constexpr (std::integral<To>) {
if constexpr (sizeof(To) == 8)
return BINVOP_(Mul,, I64x2);
else if constexpr (sizeof(To) == 4)
return BINVOP_(Mul,, I32x4);
else if constexpr (sizeof(To) == 2)
return BINVOP_(Mul,, I16x8);
} else if (std::floating_point<To>) {
return BINFVOP_(Mul);
}
M_unreachable("unsupported operation");
}()
#define BINVOP_(NAME, SIGN, TYPE)
#define BINFVOP_(NAME)
#define M_unreachable(MSG)
Definition: macro.hpp:146

Definition at line 2384 of file WasmDSL.hpp.

Referenced by and(), binary(), compute_initial_ht_capacity(), extract_unsafe(), operator<(), operator<<(), operator<=(), operator>(), operator>=(), m::wasm::detail::read_result_set(), replace(), strcmp(), strncmp(), and unary().

◆ op_high

auto m::wasm::op_high
Initial value:
=
M_CONSTEXPR_COND(std::is_signed_v<T>, BINVOP_(ExtMulHigh, S, I16x8), BINVOP_(ExtMulHigh, U, I16x8))

Definition at line 2411 of file WasmDSL.hpp.

◆ op_low

auto m::wasm::op_low
Initial value:
=
M_CONSTEXPR_COND(std::is_signed_v<T>, BINVOP_(ExtMulLow, S, I16x8), BINVOP_(ExtMulLow, U, I16x8))

Definition at line 2409 of file WasmDSL.hpp.

◆ other_cpy

auto m::wasm::other_cpy = other.clone()

Definition at line 2414 of file WasmDSL.hpp.

Referenced by splice().

◆ PrimitiveExpr< common_type_t< T, U >, L >

Initial value:
{
using To = common_type_t<T, U>

Definition at line 2382 of file WasmDSL.hpp.

◆ referenced_bits_

std::list<std::shared_ptr<Bit> > m::wasm::referenced_bits_
private

‍a list of referenced Bits

Definition at line 1487 of file WasmDSL.hpp.

Referenced by clone(), discard(), PrimitiveExpr(), and referenced_bits().

◆ referenced_bits_high

auto m::wasm::referenced_bits_high = this->referenced_bits()

Definition at line 2416 of file WasmDSL.hpp.

Referenced by splice().

◆ referenced_bits_low

auto m::wasm::referenced_bits_low = this_cpy.referenced_bits()

Definition at line 2415 of file WasmDSL.hpp.

Referenced by splice().

◆ res

for (std::size_t idx = 1; idx < num_vectors; ++idx) res.emplace((vectors_[idx].bitmask() << uint32_t(idx * vector_type return* m::wasm::res ( )

◆ this_cpy

auto m::wasm::this_cpy = this->clone()

Definition at line 2413 of file WasmDSL.hpp.

◆ ToL

and same_signedness< T, To > m::wasm::ToL
Initial value:
= L>
requires (L == ToL) and (L == 1) and
((integral<T> and std::floating_point<To>) or
(std::floating_point<T> and integral<To>)) and
(sizeof(T) == sizeof(To))
Check whether.
Definition: concepts.hpp:23
PrimitiveExpr< To, ToL > std::size_t ToL
Definition: WasmDSL.hpp:2016

Definition at line 2016 of file WasmDSL.hpp.

Referenced by and(), convert(), operator!=(), operator<(), operator<=(), operator==(), operator>(), and operator>=().

◆ U

auto m::wasm::U

◆ value

Bool< L > m::wasm::value

◆ vectors_

std::array<vector_type, num_vectors> m::wasm::vectors_
private

‍the fully utilized SIMD vectors represented as PrimitiveExprs

Definition at line 3095 of file WasmDSL.hpp.

Referenced by convert(), extract(), move(), PrimitiveExpr(), and vectors().