/* * nanowasm, a tiny WebAssembly/Wasm interpreter * Copyright (C) 2023-2025 Xavier Del Campo Romero * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #ifndef STACK_H #define STACK_H #include #include size_t nwp_stack_ptr(const struct nw_interp *i); enum nw_state nwp_stack_push(struct nw_interp *i, struct nw_sm_io *io); enum nw_state nwp_stack_pop(struct nw_interp *i, struct nw_sm_io *io); enum nw_state nwp_stack_read(struct nw_interp *i, struct nw_sm_io *io, size_t offset); enum nw_state nwp_stack_write(struct nw_interp *i, struct nw_sm_io *io, size_t offset); #endif