|
From: Peep P. <so...@us...> - 2004-06-08 20:31:01
|
Update of /cvsroot/agd/server/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13249 Modified Files: debug.c Log Message: F_MAKE_LVALUE, code array now int instead of long int, call_other takes index into string table Index: debug.c =================================================================== RCS file: /cvsroot/agd/server/src/debug.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- debug.c 7 Jun 2004 15:38:46 -0000 1.12 +++ debug.c 8 Jun 2004 20:30:40 -0000 1.13 @@ -111,6 +111,7 @@ case F_PUSH_VOID: return "F_PUSH_VOID"; case F_PUSH_NULL_OBJECT: return "F_PUSH_NULL_OBJECT"; case F_PUSH_ARRAY: return "F_PUSH_ARRAY"; + case F_MAKE_LVALUE: return "F_MAKE_LVALUE"; case F_PUSH_LVAR: return "F_PUSH_LVAR"; case F_PUSH_LVAR_LVALUE: return "F_PUSH_LVAR_LVALUE"; case F_PUSH_GVAR: return "F_PUSH_GVAR"; @@ -205,23 +206,19 @@ void print_instr(program_t *prog, function_t *f) { int i; - long int *code; + int *code; int codelen; codelen = f->codelen; code = f->code; for(i = 0; i < codelen; i++) { - printf("@[%d]: %d/%s ", i, code[i], opc_name(code[i])); + printf("[%d]: %d/%s ", i, code[i], opc_name(code[i])); switch(code[i]) { int index, num; char *s; - /* case F_PUSH: - print_var(a->data[++*i], 1); - printf("\n"); - break;*/ case F_PUSH_INT: num = code[++i]; printf("%d", num); @@ -231,8 +228,6 @@ printf("%d (", code[i]); puts_nonl(prog->str_tbl[code[i]]); putchar(')'); -/* s = (char *) code[++i]; - printf("\"%s\"", s);*/ break; case F_PUSH_ARRAY: num = code[++i]; @@ -251,9 +246,10 @@ printf("index %d num_arg: %d", index, num); break; case F_CALL_OTHER: - s = (char *) code[++i]; - num = code[++i]; - printf("fun \"%s\" num_arg: %d", s, num); + i++; + printf("fun %d (", code[i]); + puts_nonl(prog->str_tbl[code[i]]); + printf(") num_arg: %d", s, num); break; case F_PUSH_LVAR: case F_PUSH_LVAR_LVALUE: |