1
0
Fork 0
forked from fun/fun

Added simple arrays.

This commit is contained in:
Johannes Findeisen 2025-09-15 01:36:20 +02:00
commit af16311ed5
8 changed files with 370 additions and 6 deletions

View file

@ -44,6 +44,11 @@ typedef enum {
OP_DUP, // duplicate top of stack
OP_SWAP, // swap top two stack values
// arrays
OP_MAKE_ARRAY, // operand = element count; pops N values, pushes array
OP_INDEX_GET, // pops index, array; pushes element copy
OP_INDEX_SET // pops value, index, array; sets and pushes nothing
} OpCode;
typedef struct {