![]() |
mutable
A Database System for Research and Fast Prototyping
|
Proxy to implement swaps in a buffer. More...
#include <WasmUtil.hpp>
Public Member Functions | |
| const Schema & | schema () 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 Schema > | schema_ |
| entries to swap | |
Friends | |
| struct | Buffer< IsGlobal > |
Proxy to implement swaps in a buffer.
Definition at line 1275 of file WasmUtil.hpp.
|
inlineprivate |
Definition at line 1283 of file WasmUtil.hpp.
| 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().
| 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.
| 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.
|
inline |
Returns the entries to swap.
Definition at line 1290 of file WasmUtil.hpp.
References m::wasm::buffer_swap_proxy_t< IsGlobal >::schema_.
Definition at line 1265 of file WasmUtil.hpp.
|
private |
buffer in which swaps are performed
Definition at line 1280 of file WasmUtil.hpp.
|
private |
entries to swap
Definition at line 1281 of file WasmUtil.hpp.
Referenced by m::wasm::buffer_swap_proxy_t< IsGlobal >::schema().