Remove debug prints, fix offset dumping

This commit is contained in:
2026-07-28 08:13:06 +10:00
parent 4d5cdb5b6b
commit 5dcbac3166
3 changed files with 1 additions and 3 deletions

View File

@@ -66,7 +66,6 @@ static inline GroundBytecodeStruct doStruct(GroundStruct* gs) {
GroundObjectField *s, *tmp; GroundObjectField *s, *tmp;
HASH_ITER(hh, gs->fields, s, tmp) { HASH_ITER(hh, gs->fields, s, tmp) {
fprintf(stderr, "DEBUG doStruct: field='%s' value.type=%d\n", s->name, s->value.type.type);
if (gbs.size >= gbs.capacity) { if (gbs.size >= gbs.capacity) {
GroundBytecodeValue* tmp = malloc(sizeof(GroundBytecodeValue) * gbs.capacity * 2); GroundBytecodeValue* tmp = malloc(sizeof(GroundBytecodeValue) * gbs.capacity * 2);
if (tmp == NULL) { if (tmp == NULL) {

View File

@@ -250,7 +250,6 @@ static void doStruct(GroundProgram* program, GroundProgram* newProgram, GroundSt
if (fnVar != NULL && fnVar->value.type.type == GroundType_Function) { if (fnVar != NULL && fnVar->value.type.type == GroundType_Function) {
field->value = Ground.Copy.Value(&fnVar->value); field->value = Ground.Copy.Value(&fnVar->value);
fprintf(stderr, "DEBUG: set field value to Function, field->value.type=%d\n", field->value.type.type);
} }
HASH_ADD_STR(gs.fields, name, field); HASH_ADD_STR(gs.fields, name, field);

View File

@@ -306,7 +306,7 @@ char* _GroundStringifyBytecode(GroundBytecode* bytecode) {
} }
for (GroundSize j = 0; j < instruction->args.len; j++) { for (GroundSize j = 0; j < instruction->args.len; j++) {
char buf[32]; char buf[32];
snprintf(buf, 32, "%zu", instruction->args.at[i]); snprintf(buf, 32, "%zu", instruction->args.at[j]);
APPEND_ESTR(estr, buf); APPEND_ESTR(estr, buf);
APPEND_ESTR(estr, " "); APPEND_ESTR(estr, " ");
} }