Compound assignment for arrays is working, untested, read more

I added reference values in 62ca7a1fb7,
but forgot to mention it. I'm now using references to assign to the
internals of an array, no matter how many levels deep it is.
This commit is contained in:
2024-12-07 15:35:06 +11:00
parent 2324150fd5
commit 61a105db2d
7 changed files with 108 additions and 19 deletions

View File

@@ -1,12 +1,15 @@
#pragma once
typedef enum Toy_OpcodeType {
//This offsets the opcode values, so I can see TOY_OPCODE_READ in GDB clearly
TOY_OPCODE_UNUSED = 0,
//variable instructions
TOY_OPCODE_READ,
TOY_OPCODE_DECLARE,
TOY_OPCODE_ASSIGN,
TOY_OPCODE_ASSIGN_COMPOUND, //assign to a compound's internals
TOY_OPCODE_ACCESS,
TOY_OPCODE_DUPLICATE, //duplicate the top of the stack
//arithmetic instructions