__emit: Take in account local symbols for arguments of type 'function'
This commit is contained in:
parent
f6c9db9269
commit
1ad14487a3
@ -6368,18 +6368,26 @@ static void SC_FASTCALL emit_param_function(emit_outval *p,int isnative)
|
|||||||
switch (tok)
|
switch (tok)
|
||||||
{
|
{
|
||||||
case tSYMBOL:
|
case tSYMBOL:
|
||||||
sym=findglb(str,sSTATEVAR);
|
sym=findloc(str);
|
||||||
|
if (sym==NULL)
|
||||||
|
sym=findglb(str,sSTATEVAR);
|
||||||
if (sym==NULL) {
|
if (sym==NULL) {
|
||||||
error(17,str); /* undefined symbol */
|
error(17,str); /* undefined symbol */
|
||||||
return;
|
return;
|
||||||
} /* if */
|
} /* if */
|
||||||
markusage(sym,uREAD);
|
|
||||||
if (sym->ident==iFUNCTN || sym->ident==iREFFUNC) {
|
if (sym->ident==iFUNCTN || sym->ident==iREFFUNC) {
|
||||||
|
markusage(sym,uREAD);
|
||||||
if (!!(sym->usage & uNATIVE)==isnative)
|
if (!!(sym->usage & uNATIVE)==isnative)
|
||||||
break;
|
break;
|
||||||
tok=(isnative!=FALSE) ? teFUNCTN : teNATIVE;
|
tok=(isnative!=FALSE) ? teFUNCTN : teNATIVE;
|
||||||
} else {
|
} else {
|
||||||
tok=(sym->ident==iCONSTEXPR) ? teNUMERIC : teDATA;
|
markusage(sym,uREAD | uWRITTEN);
|
||||||
|
if (sym->ident==iLABEL)
|
||||||
|
tok=tLABEL;
|
||||||
|
else if (sym->ident==iCONSTEXPR)
|
||||||
|
tok=teNUMERIC;
|
||||||
|
else
|
||||||
|
tok=(sym->vclass==sLOCAL) ? teLOCAL : teDATA;
|
||||||
} /* if */
|
} /* if */
|
||||||
/* fallthrough */
|
/* fallthrough */
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user