Changed size_t to unsigned int

This commit is contained in:
2024-10-02 03:39:38 +10:00
parent 7b453bc35f
commit 71c065a6c4
19 changed files with 93 additions and 90 deletions

View File

@@ -6,24 +6,24 @@
//internal structure that holds the individual parts of a compiled routine
typedef struct Toy_Routine {
unsigned char* param; //c-string params in sequence (could be moved below the jump table?)
size_t paramCapacity;
size_t paramCount;
unsigned int paramCapacity;
unsigned int paramCount;
unsigned char* code; //the instruction set
size_t codeCapacity;
size_t codeCount;
unsigned int codeCapacity;
unsigned int codeCount;
size_t* jumps; //each 'jump' is the starting address of an element within 'data'
size_t jumpsCapacity;
size_t jumpsCount;
unsigned int* jumps; //each 'jump' is the starting address of an element within 'data'
unsigned int jumpsCapacity;
unsigned int jumpsCount;
unsigned char* data; //{type,val} tuples of data
size_t dataCapacity;
size_t dataCount;
unsigned int dataCapacity;
unsigned int dataCount;
unsigned char* subs; //subroutines, recursively
size_t subsCapacity;
size_t subsCount;
unsigned int subsCapacity;
unsigned int subsCount;
} Toy_Routine;
TOY_API void* Toy_compileRoutine(Toy_Ast* ast);
TOY_API void* Toy_compileRoutine(Toy_Ast* ast);