Remove debug prints, fix offset dumping
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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, " ");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user