1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-07 23:29:39 +00:00

Std-functions are no longer inlined if they are unevaluated.

This commit is contained in:
acqn 2020-08-31 17:45:25 +08:00 committed by Oliver Schmidt
parent df07e23f2c
commit 903e84c24c
2 changed files with 4 additions and 4 deletions

View File

@ -593,7 +593,7 @@ static void FunctionCall (ExprDesc* Expr)
}
/* Check for known standard functions and inline them */
if (Expr->Name != 0) {
if (Expr->Name != 0 && !ED_IsUneval (Expr)) {
int StdFunc = FindStdFunc ((const char*) Expr->Name);
if (StdFunc >= 0) {
/* Inline this function */

View File

@ -474,13 +474,13 @@ void ED_MarkForUneval (ExprDesc* Expr);
/* Mark the expression as not to be evaluated */
#if defined(HAVE_INLINE)
INLINE int ED_MayBeUneval (const ExprDesc* Expr)
/* Check if the expression may be uevaluated */
INLINE int ED_IsUneval (const ExprDesc* Expr)
/* Check if the expression is not to be evaluated */
{
return (Expr->Flags & E_EVAL_UNEVAL) == E_EVAL_UNEVAL;
}
#else
# define ED_MayBeUneval(Expr) (((Expr)->Flags & E_EVAL_UNEVAL) == E_EVAL_UNEVAL)
# define ED_IsUneval(Expr) (((Expr)->Flags & E_EVAL_UNEVAL) == E_EVAL_UNEVAL)
#endif
#if defined(HAVE_INLINE)