diff --git a/src/gencode.c b/src/gencode.c index 82aaed9..a37de69 100644 --- a/src/gencode.c +++ b/src/gencode.c @@ -1336,7 +1336,7 @@ gencode_funcall(M1_compiler *comp, m1_funcall *f) { */ fun = sym_find_chunk(&comp->currentchunk->constants, f->name); - +// assert(fun == f->funsym); /* XXX enable this as soon as it's resolved. */ //assert(fun->constindex == f->funsym->constindex); diff --git a/src/m1.y b/src/m1.y index 3e95a46..973a2b4 100644 --- a/src/m1.y +++ b/src/m1.y @@ -511,8 +511,9 @@ function_init : return_type TK_IDENT /* enter name of function declaration in table XXX is this still needed? Dont think so but leave it for now. - sym_enter_chunk(comp, &comp->currentchunk->constants, $2); */ + //sym_enter_chunk(comp, &comp->currentchunk->constants, $2); + /* enter name of function in global symbol table. */ sym_new_symbol(comp, comp->globalsymtab, $2, $1, 1); diff --git a/src/semcheck.c b/src/semcheck.c index 7245dac..3f9eb1e 100644 --- a/src/semcheck.c +++ b/src/semcheck.c @@ -441,6 +441,7 @@ check_funcall(M1_compiler *comp, m1_funcall *f, unsigned line) { assert(line != 0); f->funsym = sym_lookup_symbol(comp->globalsymtab, f->name); + //f->funsym = sym_find_chunk(comp->globalsymtab, f->name); if (f->funsym == NULL) { type_error(comp, line, "function '%s' not defined", f->name);