X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fcc65%2Fexpr.h;h=193fe39eb3182ea6233474ed251c6ece53d34f77;hb=f266612697b213f2f74027eb5b2605b19a97d6d7;hp=acf442986c576b91379c7be6beae399773a7aab1;hpb=8d8162eb23e1f275e38662f9c7e54c875ec5d63e;p=cc65 diff --git a/src/cc65/expr.h b/src/cc65/expr.h index acf442986..193fe39eb 100644 --- a/src/cc65/expr.h +++ b/src/cc65/expr.h @@ -18,34 +18,36 @@ /*****************************************************************************/ -/* code */ +/* code */ /*****************************************************************************/ -void PushAddr (const ExprDesc* Expr); +void ExprWithCheck (void (*Func) (ExprDesc*), ExprDesc* Expr); +/* Call an expression function with checks. */ + +void MarkedExprWithCheck (void (*Func) (ExprDesc*), ExprDesc* Expr); +/* Call an expression function with checks and record start and end of the + * generated code. + */ + +void PushAddr (const ExprDesc* Expr); /* If the expression contains an address that was somehow evaluated, * push this address on the stack. This is a helper function for all * sorts of implicit or explicit assignment functions where the lvalue * must be saved if it's not constant, before evaluating the rhs. */ -void ExprLoad (unsigned flags, ExprDesc* Expr); -/* Put the result of an expression into the primary register */ - -void Store (ExprDesc* Expr, const type* StoreType); +void Store (ExprDesc* Expr, const Type* StoreType); /* Store the primary register into the location denoted by lval. If StoreType * is given, use this type when storing instead of lval->Type. If StoreType * is NULL, use lval->Type instead. */ -void hie0 (ExprDesc* Expr); -/* Parse comma operator. */ - int evalexpr (unsigned flags, void (*Func) (ExprDesc*), ExprDesc* Expr); /* Will evaluate an expression via the given function. If the result is a - * constant, 0 is returned and the value is put in the lval struct. If the - * result is not constant, ExprLoad is called to bring the value into the + * constant, 0 is returned and the value is put in the Expr struct. If the + * result is not constant, LoadExpr is called to bring the value into the * primary register and 1 is returned. */ @@ -76,18 +78,17 @@ void ConstAbsIntExpr (void (*Func) (ExprDesc*), ExprDesc* Expr); void hie10 (ExprDesc* lval); /* Handle ++, --, !, unary - etc. */ +void hie8 (ExprDesc* Expr); +/* Process + and - binary operators. */ + void hie1 (ExprDesc* lval); /* Parse first level of expression hierarchy. */ -void DefineData (ExprDesc* lval); -/* Output a data definition for the given expression */ +void hie0 (ExprDesc* Expr); +/* Parse comma operator. */ /* End of expr.h */ #endif - - - -