diff options
Diffstat (limited to 'src/binary-writer.h')
-rw-r--r-- | src/binary-writer.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/binary-writer.h b/src/binary-writer.h index 37dff783..16a838ff 100644 --- a/src/binary-writer.h +++ b/src/binary-writer.h @@ -24,6 +24,7 @@ struct WasmModule; struct WasmScript; struct WasmWriter; struct WasmStream; +enum WasmPrintChars; #define WASM_WRITE_BINARY_OPTIONS_DEFAULT \ { NULL, WASM_TRUE, WASM_FALSE, WASM_FALSE } @@ -45,6 +46,39 @@ WasmResult wasm_write_binary_script(struct WasmAllocator*, struct WasmWriter*, const struct WasmScript*, const WasmWriteBinaryOptions*); + +void wasm_write_u32_leb128(struct WasmStream* stream, + uint32_t value, + const char* desc); + +void wasm_write_i32_leb128(struct WasmStream* stream, + int32_t value, + const char* desc); + +void wasm_write_fixed_u32_leb128(struct WasmStream* stream, + uint32_t value, + const char* desc); + +uint32_t wasm_write_fixed_u32_leb128_at(struct WasmStream* stream, + uint32_t offset, + uint32_t value, + const char* desc); + +uint32_t wasm_write_fixed_u32_leb128_raw(uint8_t* data, + uint8_t* end, + uint32_t value); + +void wasm_write_type(struct WasmStream* stream, WasmType type); + +void wasm_write_str(struct WasmStream* stream, + const char* s, + size_t length, + enum WasmPrintChars print_chars, + const char* desc); + +void wasm_write_opcode(struct WasmStream* stream, uint8_t opcode); + +void wasm_write_limits(struct WasmStream* stream, const WasmLimits* limits); WASM_EXTERN_C_END #endif /* WASM_BINARY_WRITER_H_ */ |