Misc stuff, probably crashes

This commit is contained in:
2026-07-02 11:35:56 +10:00
parent 9bb083a6f8
commit c78426ef88
16 changed files with 474 additions and 134 deletions

View File

@@ -33,6 +33,7 @@ GroundType _GroundNewType(enum GroundTypeType type, ...);
GroundIdentifier* _GroundNewIdentifier(const char* id);
GroundBytecode _GroundNewBytecode (GroundProgram* program, GroundState* state);
GroundBytecodeValue _GroundNewBytecodeValue(GroundValue value);
void _GroundFreeValue(GroundValue* in);
void _GroundFreeList(GroundList* in);
@@ -48,6 +49,8 @@ void _GroundFreeState(GroundState* in);
void _GroundFreeIdentifier(GroundIdentifier* identifier);
void _GroundFreeBytecodeValue(GroundBytecodeValue* in);
GroundValue _GroundCopyValue(GroundValue* in);
GroundList _GroundCopyList(GroundList* in);
@@ -73,6 +76,7 @@ int64_t _GroundInstructionExecute(GroundInstruction* instruction, GroundValue* h
void _GroundProgramAppend(GroundProgram* program, GroundInstruction instruction);
void _GroundProgramExecute(GroundProgram* program, GroundState* state);
GroundProgram _GroundProgramPreprocess(GroundProgram* program, GroundState* state);
void _GroundFunctionAppendInstruction(GroundFunction* function, GroundInstruction instruction);
@@ -114,6 +118,8 @@ char* _GroundStringifyProgram(GroundProgram* program);
char* _GroundStringifyString(GroundString* string);
char* _GroundStringifyValue(GroundValue* value);
char* _GroundStringifyBytecodeValue(GroundBytecodeValue* value);
struct _Ground Ground = {
@@ -158,6 +164,7 @@ struct _Ground Ground = {
.Identifier = _GroundNewIdentifier,
.Bytecode = _GroundNewBytecode,
.BytecodeValue = _GroundNewBytecodeValue,
},
.Free = {
@@ -174,6 +181,8 @@ struct _Ground Ground = {
.State = _GroundFreeState,
.Identifier = _GroundFreeIdentifier,
.BytecodeValue = _GroundFreeBytecodeValue,
},
.Copy = {
@@ -204,6 +213,7 @@ struct _Ground Ground = {
.Program = {
.append = _GroundProgramAppend,
.execute = _GroundProgramExecute,
.preprocess = _GroundProgramPreprocess,
},
.Function = {
@@ -256,5 +266,7 @@ struct _Ground Ground = {
.Program = _GroundStringifyProgram,
.String = _GroundStringifyString,
.Value = _GroundStringifyValue,
.BytecodeValue = _GroundStringifyBytecodeValue,
},
};