blob: 332b4f54260e681f2cff7b25c89b43d113d49342 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/*
* 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 <nanowasm/nw.h>
#include <stddef.h>
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
|