commit 575560f78618c155b78aa8ef47562bb5f73b7eeb
parent 45f163cb54ccd558eaccdc18ff56c35ed7349134
Author: William Casarin <jb55@jb55.com>
Date: Thu, 29 Jul 2021 11:58:31 -0700
don't remove top_callframe
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/wasm.c b/src/wasm.c
@@ -38,10 +38,17 @@ struct expr_parser {
struct cursor *stack; // optional
};
+static INLINE struct callframe *top_callframes(struct cursor *cur, int top)
+{
+ return (struct callframe*)cursor_topn(cur, sizeof(struct callframe), top);
+}
+
+#ifdef DEBUG
static INLINE struct callframe *top_callframe(struct cursor *cur)
{
return (struct callframe*)cursor_top(cur, sizeof(struct callframe));
}
+#endif
static INLINE struct cursor *interp_codeptr(struct wasm_interp *interp)
{