mutable
A Database System for Research and Fast Prototyping
Loading...
Searching...
No Matches
WebAssembly.hpp
Go to the documentation of this file.
1#pragma once
2
4
5
6/* Forward declaration of Binaryen classes. */
7namespace wasm {
8
9struct Module;
10struct Expression;
11
12}
13
14namespace m {
15
18{
19 private:
20 ::wasm::Module *ref_;
21
22 public:
23 WasmModule();
25 WasmModule(const WasmModule&) = delete;
26 WasmModule(WasmModule&&) = default;
27
29 ::wasm::Module * ref() { return ref_; }
31 const ::wasm::Module * ref() const { return ref_; }
32
35 std::pair<uint8_t*, std::size_t> binary() const;
36
38 friend std::ostream & operator<<(std::ostream &out, const WasmModule &module);
39
40 void dump(std::ostream &out) const;
41 void dump() const;
42};
43
44}
‍mutable namespace
Definition: Backend.hpp:10
A WasmModule is a wrapper around a [Binaryen] (https://github.com/WebAssembly/binaryen) wasm::Module.
Definition: WebAssembly.hpp:18
::wasm::Module * ref()
Returns the underlying [Binaryen] (https://github.com/WebAssembly/binaryen) WASM module.
Definition: WebAssembly.hpp:29
void dump() const
Definition: WebAssembly.cpp:48
std::pair< uint8_t *, std::size_t > binary() const
Returns the binary representation of this module in a freshly allocated memory.
Definition: WebAssembly.cpp:21
const ::wasm::Module * ref() const
Returns the underlying [Binaryen] (https://github.com/WebAssembly/binaryen) WASM module.
Definition: WebAssembly.hpp:31
friend std::ostream & operator<<(std::ostream &out, const WasmModule &module)
Print module in human-readable text format.
WasmModule(WasmModule &&)=default
WasmModule(const WasmModule &)=delete
::wasm::Module * ref_
the underlying [Binaryen] (https://github.com/WebAssembly/binaryen) WASM module
Definition: WebAssembly.hpp:20