Simplify the OP_POP_* routine by adjusting data_type_t

This simple fix made the routine for OP_POP not require an additional
dispatch step on top of the conditional due to OPCODE_DATA_TYPE,
instead using data_type_t as a map from an opcode's base type to a
specific type.
This commit is contained in:
2024-04-25 01:20:35 +05:30
parent 71b0b793af
commit 122e12e8fd
2 changed files with 14 additions and 18 deletions

View File

@@ -72,7 +72,7 @@ typedef union
*/
typedef enum
{
DATA_TYPE_NIL = 0,
DATA_TYPE_NIL = -1,
DATA_TYPE_BYTE,
DATA_TYPE_HWORD,
DATA_TYPE_WORD,