rename get_cs

This commit is contained in:
Awal Garg 2018-06-26 02:15:44 +05:30 committed by Fabian
parent 2b9244aaef
commit eb322bcddf
4 changed files with 4 additions and 5 deletions

View file

@ -287,7 +287,7 @@ function V86Starter(options)
}
const wasmgen_exports = [
"wg_get_cs",
"wg_get_code_section",
"wg_get_instruction_body",
"wg_commit_instruction_body_to_cs",
"wg_finish",

View file

@ -17,7 +17,7 @@ PackedStr pack_str(char const* fn_name, uint8_t fn_len);
void gen_reset(void)
{
wg_reset();
cs = wg_get_cs();
cs = wg_get_code_section();
instruction_body = wg_get_instruction_body();
add_get_seg_import();
}

View file

@ -10,13 +10,12 @@ typedef struct PackedStr {
#define PSTR_TY uint64_t, uint64_t, uint64_t
extern uint8_t* wg_get_cs(void);
extern uint8_t* wg_get_code_section(void);
extern uint8_t* wg_get_instruction_body(void);
extern void wg_commit_instruction_body_to_cs(void);
extern void wg_finish(uint8_t no_of_locals_i32);
extern void wg_reset(void);
extern uint16_t wg_get_fn_idx(PSTR_TY, uint8_t fn_type);
extern void wg_include_buffer(uint8_t* buf);
extern void wg_push_i32(uint8_t* buf, int32_t v);
extern void wg_push_u32(uint8_t* buf, uint32_t v);

View file

@ -3,7 +3,7 @@ use ::util::PackedStr;
pub use ::module_init::{ setup, get_module };
#[no_mangle]
pub fn wg_get_cs() -> *mut Vec<u8> {
pub fn wg_get_code_section() -> *mut Vec<u8> {
&mut get_module().cs
}