1
0
Fork 0
forked from fun/fun

Some more opcode refactoring. (0.3.1)

This commit is contained in:
Johannes Findeisen 2025-09-16 04:51:49 +02:00
commit 228615db18
12 changed files with 42 additions and 59 deletions

View file

@ -62,11 +62,11 @@ typedef enum {
// array and builtin helpers
OP_LEN, // pops array or string; pushes length
OP_ARR_PUSH, // pops value, array; pushes new length
OP_ARR_POP, // pops array; pushes removed element
OP_ARR_SET, // pops value, index, array; pushes value
OP_ARR_INSERT, // pops value, index, array; pushes new length
OP_ARR_REMOVE, // pops index, array; pushes removed element
OP_PUSH, // pops value, array; pushes new length
OP_APOP, // pops array; pushes removed element
OP_SET, // pops value, index, array; pushes value
OP_INSERT, // pops value, index, array; pushes new length
OP_REMOVE, // pops index, array; pushes removed element
OP_SLICE, // pops end, start, array; pushes new array
// conversions