diff --git a/compiler/sc.h b/compiler/sc.h index 738dbb6..80f21b2 100644 --- a/compiler/sc.h +++ b/compiler/sc.h @@ -581,7 +581,7 @@ SC_FUNC void set_extension(char *filename,const char *extension,int force); SC_FUNC symbol *fetchfunc(const char *name,int tag); SC_FUNC char *operator_symname(char *symname,char *opername,int tag1,int tag2,int numtags,int resulttag); SC_FUNC char *funcdisplayname(char *dest,const char *funcname); -SC_FUNC int constexpr(cell *val,int *tag,symbol **symptr); +SC_FUNC int const_expr(cell *val,int *tag,symbol **symptr); SC_FUNC constvalue *append_constval(constvalue *table,const char *name,cell val,int index); SC_FUNC constvalue *find_constval(constvalue *table,const char *name,int index); SC_FUNC void delete_consttable(constvalue *table); diff --git a/compiler/sc1.c b/compiler/sc1.c index 82aaae9..c752027 100644 --- a/compiler/sc1.c +++ b/compiler/sc1.c @@ -3120,7 +3120,7 @@ static cell init(int ident,int usage,int *tag,int *errorfound,int *packcount,cel if (tok==tSTRING && (usage & uPACKED)!=0 || tok==tPACKSTRING && (usage & uPACKED)==0) error(229); *tag=0; - } else if (constexpr(&i,tag,NULL)) { + } else if (const_expr(&i,tag,NULL)) { if (packcount!=NULL && *packcount>=0) { assert(packitem!=NULL); assert(*packcountindex=(int)ntvidx->value; } /* if */ } else { - constexpr(&val,NULL,NULL); + const_expr(&val,NULL,NULL); sym->index=(int)val; /* At the moment, I have assumed that this syntax is only valid if * val < 0. To properly mix "normal" native functions and indexed @@ -4587,7 +4587,7 @@ static void doarg(char *name,int ident,int offset,const int tags[],int numtags, while (paranthese--) needtoken(')'); } else { - constexpr(&arg->defvalue.val,&arg->defvalue_tag,NULL); + const_expr(&arg->defvalue.val,&arg->defvalue_tag,NULL); assert(numtags>0); if (!matchtag(tags[0],arg->defvalue_tag,TRUE)) error(213); /* tagname mismatch */ @@ -5990,9 +5990,9 @@ static int doexpr(int comma,int chkeffect,int allowarray,int mark_endexpr, return ident; } -/* constexpr +/* const_expr */ -SC_FUNC int constexpr(cell *val,int *tag,symbol **symptr) +SC_FUNC int const_expr(cell *val,int *tag,symbol **symptr) { int ident,index; cell cidx; @@ -6337,7 +6337,7 @@ static void doswitch(void) * parse all expressions until that special token. */ - constexpr(&val,NULL,NULL); + const_expr(&val,NULL,NULL); /* Search the insertion point (the table is kept in sorted order, so * that advanced abstract machines can sift the case table with a * binary search). Check for duplicate case values at the same time. @@ -6360,7 +6360,7 @@ static void doswitch(void) insert_constval(csp,cse,itoh(lbl_case),val,0); if (matchtoken(tDBLDOT)) { cell end; - constexpr(&end,NULL,NULL); + const_expr(&end,NULL,NULL); if (end<=val) error(50); /* invalid range */ while (++val<=end) { diff --git a/compiler/sc2.c b/compiler/sc2.c index bfa724c..d1088be 100644 --- a/compiler/sc2.c +++ b/compiler/sc2.c @@ -874,7 +874,7 @@ static int preproc_expr(cell *val,int *tag) term=strchr((char*)srcline,'\0'); assert(term!=NULL); chrcat((char*)srcline,PREPROC_TERM); /* the "DEL" code (see SC.H) */ - result=constexpr(val,tag,NULL); /* get value (or 0 on error) */ + result=const_expr(val,tag,NULL); /* get value (or 0 on error) */ *term='\0'; /* erase the token (if still present) */ lexclr(FALSE); /* clear any "pushed" tokens */ litidx=cur_lit; /* reset literal pool */ diff --git a/compiler/sc3.c b/compiler/sc3.c index 4b21cb2..e71b4f0 100644 --- a/compiler/sc3.c +++ b/compiler/sc3.c @@ -2842,7 +2842,7 @@ static int constant(value *lval) packitem=0; packcount=0; do { - /* cannot call constexpr() here, because "staging" is already turned + /* cannot call const_expr() here, because "staging" is already turned * on at this point */ assert(staging); stgget(&index,&cidx); /* mark position in code generator */