mutable
A Database System for Research and Fast Prototyping
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | Friends
m::wasm::buffer_swap_proxy_t< IsGlobal > Struct Template Reference

Proxy to implement swaps in a buffer. More...

#include <WasmUtil.hpp>

Collaboration diagram for m::wasm::buffer_swap_proxy_t< IsGlobal >:
[legend]

Public Member Functions

const Schemaschema () const
 Returns the entries to swap.
 
void operator() (U32x1 first, U32x1 second)
 Swaps tuples with IDs first and second.
 
void operator() (U32x1 first, U32x1 second, const Environment &env_first)
 Swaps tuples with IDs first and second where the first one is already loaded and accessible through env_first.
 
void operator() (U32x1 first, U32x1 second, const Environment &env_first, const Environment &env_second)
 Swaps tuples with IDs first and second which are already loaded and accessible through env_first and env_second.
 

Private Member Functions

 buffer_swap_proxy_t (const Buffer< IsGlobal > &buffer, const Schema &schema)
 

Private Attributes

std::reference_wrapper< const Buffer< IsGlobal > > buffer_
 buffer in which swaps are performed
 
std::reference_wrapper< const Schemaschema_
 entries to swap
 

Friends

struct Buffer< IsGlobal >
 

Detailed Description

template<bool IsGlobal>
struct m::wasm::buffer_swap_proxy_t< IsGlobal >

Proxy to implement swaps in a buffer.

Definition at line 1275 of file WasmUtil.hpp.

Constructor & Destructor Documentation

◆ buffer_swap_proxy_t()

template<bool IsGlobal>
m::wasm::buffer_swap_proxy_t< IsGlobal >::buffer_swap_proxy_t ( const Buffer< IsGlobal > &  buffer,
const Schema schema 
)
inlineprivate

Definition at line 1283 of file WasmUtil.hpp.

Member Function Documentation

◆ operator()() [1/3]

template<bool IsGlobal>
void buffer_swap_proxy_t::operator() ( U32x1  first,
U32x1  second 
)

Swaps tuples with IDs first and second.

Definition at line 2980 of file WasmUtil.cpp.

References m::wasm::CodeGenContext::Get(), and m::wasm::CodeGenContext::scoped_environment().

◆ operator()() [2/3]

template<bool IsGlobal>
void buffer_swap_proxy_t::operator() ( U32x1  first,
U32x1  second,
const Environment env_first 
)

Swaps tuples with IDs first and second where the first one is already loaded and accessible through env_first.

Note that environments are also swapped afterwards, i.e. env_first contains still the values of the former tuple with ID first which is located at ID second after the call, except for NChars since they are only pointers to the actual values, i.e. env_first contains still the addresses of the former tuple with ID first where the values of tuple with ID second are stored after the call.

Definition at line 2996 of file WasmUtil.cpp.

References m::wasm::Environment::add(), m::wasm::Module::Allocator, ELSE, m::wasm::CodeGenContext::Get(), m::wasm::Environment::get(), IF, M_unreachable, m::wasm::CodeGenContext::scoped_environment(), m::wasm::strncpy(), m::T(), and m::wasm::value.

◆ operator()() [3/3]

template<bool IsGlobal>
void buffer_swap_proxy_t::operator() ( U32x1  first,
U32x1  second,
const Environment env_first,
const Environment env_second 
)

Swaps tuples with IDs first and second which are already loaded and accessible through env_first and env_second.

Note that environments are also swapped afterwards, i.e. env_first contains still the values of the former tuple with ID first which is located at ID second after the call and vice versa, except for NChars since they are only pointers to the actual values, i.e. env_first contains still the addresses of the former tuple with ID first where the values of tuple with ID second are stored after the call and vice versa.

Definition at line 3045 of file WasmUtil.cpp.

References m::wasm::Environment::add(), m::wasm::Module::Allocator, ELSE, m::wasm::CodeGenContext::env(), m::wasm::CodeGenContext::Get(), m::wasm::Environment::get(), IF, M_unreachable, m::wasm::CodeGenContext::scoped_environment(), m::wasm::strncpy(), m::T(), and m::wasm::value.

◆ schema()

template<bool IsGlobal>
const Schema & m::wasm::buffer_swap_proxy_t< IsGlobal >::schema ( ) const
inline

Returns the entries to swap.

Definition at line 1290 of file WasmUtil.hpp.

References m::wasm::buffer_swap_proxy_t< IsGlobal >::schema_.

Friends And Related Function Documentation

◆ Buffer< IsGlobal >

template<bool IsGlobal>
friend struct Buffer< IsGlobal >
friend

Definition at line 1265 of file WasmUtil.hpp.

Field Documentation

◆ buffer_

template<bool IsGlobal>
std::reference_wrapper<const Buffer<IsGlobal> > m::wasm::buffer_swap_proxy_t< IsGlobal >::buffer_
private

buffer in which swaps are performed

Definition at line 1280 of file WasmUtil.hpp.

◆ schema_

template<bool IsGlobal>
std::reference_wrapper<const Schema> m::wasm::buffer_swap_proxy_t< IsGlobal >::schema_
private

entries to swap

Definition at line 1281 of file WasmUtil.hpp.

Referenced by m::wasm::buffer_swap_proxy_t< IsGlobal >::schema().


The documentation for this struct was generated from the following files: