protoverse

A metaverse protocol
git clone git://jb55.com/protoverse
Log | Files | Refs | README | LICENSE

commit 326cd090d6e82df46502c626a56e7c9439a4d18e
parent d9f0af0fb83728cc361c41b7b6b36dd1985ab8e9
Author: William Casarin <jb55@jb55.com>
Date:   Fri, 16 Jul 2021 20:21:27 -0700

cleanup unused functions

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Msrc/wasm.c | 18------------------
Msrc/wasm.h | 2+-
2 files changed, 1 insertion(+), 19 deletions(-)

diff --git a/src/wasm.c b/src/wasm.c @@ -62,17 +62,6 @@ static const char *valtype_name(enum valtype valtype) return "unk"; } -static INLINE int offset_stack_top(struct cursor *cur) -{ - int *p = (int*)cur->p; - - if (unlikely(cur->p == cur->start)) { - return 0; - } - - return *(p - sizeof(*p)); -} - static INLINE struct local *get_locals(struct func *func, int *num_locals) { switch (func->type) { @@ -2290,13 +2279,6 @@ static INLINE int interp_i32_const(struct wasm_interp *interp) return cursor_pushval(&interp->stack, &val); } -static INLINE int code_count(struct module *module) -{ - // I guess not having any code and is technically possible? - return !was_section_parsed(module, section_code) ? 0 : - module->code_section.num_funcs; -} - static struct functype *get_function_type(struct wasm_interp *interp, int ind) { if (unlikely(!is_valid_fn_index(interp->module, ind))) { diff --git a/src/wasm.h b/src/wasm.h @@ -487,7 +487,7 @@ struct callframe { struct resolver { u16 label; u8 end_tag; - u8 __unused; + unsigned char unused; }; struct wasm_interp {