mutable
A Database System for Research and Fast Prototyping
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | Friends
m::WasmModule Struct Reference

A WasmModule is a wrapper around a [Binaryen] (https://github.com/WebAssembly/binaryen) wasm::Module. More...

#include <WebAssembly.hpp>

Collaboration diagram for m::WasmModule:
[legend]

Public Member Functions

 WasmModule ()
 
 ~WasmModule ()
 
 WasmModule (const WasmModule &)=delete
 
 WasmModule (WasmModule &&)=default
 
::wasm::Module * ref ()
 Returns the underlying [Binaryen] (https://github.com/WebAssembly/binaryen) WASM module.
 
const ::wasm::Module * ref () const
 Returns the underlying [Binaryen] (https://github.com/WebAssembly/binaryen) WASM module.
 
std::pair< uint8_t *, std::size_t > binary () const
 Returns the binary representation of this module in a freshly allocated memory.
 
void dump (std::ostream &out) const
 
void dump () const
 

Private Attributes

::wasm::Module * ref_
 the underlying [Binaryen] (https://github.com/WebAssembly/binaryen) WASM module
 

Friends

std::ostream & operator<< (std::ostream &out, const WasmModule &module)
 Print module in human-readable text format.
 

Detailed Description

A WasmModule is a wrapper around a [Binaryen] (https://github.com/WebAssembly/binaryen) wasm::Module.

Definition at line 17 of file WebAssembly.hpp.

Constructor & Destructor Documentation

◆ WasmModule() [1/3]

WasmModule::WasmModule ( )

Definition at line 17 of file WebAssembly.cpp.

◆ ~WasmModule()

WasmModule::~WasmModule ( )

Definition at line 19 of file WebAssembly.cpp.

References ref_.

◆ WasmModule() [2/3]

m::WasmModule::WasmModule ( const WasmModule )
delete

◆ WasmModule() [3/3]

m::WasmModule::WasmModule ( WasmModule &&  )
default

Member Function Documentation

◆ binary()

std::pair< uint8_t *, std::size_t > WasmModule::binary ( ) const

Returns the binary representation of this module in a freshly allocated memory.

The caller must dispose of this memory.

Definition at line 21 of file WebAssembly.cpp.

References ref_.

Referenced by dump().

◆ dump() [1/2]

void WasmModule::dump ( ) const

Definition at line 48 of file WebAssembly.cpp.

References dump().

Referenced by dump().

◆ dump() [2/2]

void WasmModule::dump ( std::ostream &  out) const

Definition at line 36 of file WebAssembly.cpp.

References binary().

◆ ref() [1/2]

::wasm::Module * m::WasmModule::ref ( )
inline

Returns the underlying [Binaryen] (https://github.com/WebAssembly/binaryen) WASM module.

Definition at line 29 of file WebAssembly.hpp.

References ref_.

◆ ref() [2/2]

const ::wasm::Module * m::WasmModule::ref ( ) const
inline

Returns the underlying [Binaryen] (https://github.com/WebAssembly/binaryen) WASM module.

Definition at line 31 of file WebAssembly.hpp.

References ref_.

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  out,
const WasmModule module 
)
friend

Print module in human-readable text format.

Field Documentation

◆ ref_

::wasm::Module* m::WasmModule::ref_
private

the underlying [Binaryen] (https://github.com/WebAssembly/binaryen) WASM module

Definition at line 20 of file WebAssembly.hpp.

Referenced by binary(), ref(), and ~WasmModule().


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