mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Port some cleanup from PR #847
- Update some whitespace formatting - Factor out some functions - Free data after outputting to an object file
This commit is contained in:
@@ -30,7 +30,7 @@ struct Expression {
|
||||
/*
|
||||
* Determines if an expression is known at assembly time
|
||||
*/
|
||||
static inline bool rpn_isKnown(const struct Expression *expr)
|
||||
static inline bool rpn_isKnown(struct Expression const *expr)
|
||||
{
|
||||
return expr->isKnown;
|
||||
}
|
||||
@@ -64,5 +64,7 @@ void rpn_StartOfSection(struct Expression *expr, char const *sectionName);
|
||||
void rpn_Free(struct Expression *expr);
|
||||
void rpn_CheckHRAM(struct Expression *expr, const struct Expression *src);
|
||||
void rpn_CheckRST(struct Expression *expr, const struct Expression *src);
|
||||
void rpn_CheckNBit(struct Expression const *expr, uint8_t n);
|
||||
int32_t rpn_GetConstVal(struct Expression const *expr);
|
||||
|
||||
#endif /* RGBDS_ASM_RPN_H */
|
||||
|
||||
@@ -28,17 +28,17 @@ enum RPNCommand {
|
||||
RPN_MUL = 0x02,
|
||||
RPN_DIV = 0x03,
|
||||
RPN_MOD = 0x04,
|
||||
RPN_UNSUB = 0x05,
|
||||
RPN_UNSUB = 0x05, // FIXME: should be renamed to "NEG" for consistency
|
||||
RPN_EXP = 0x06,
|
||||
|
||||
RPN_OR = 0x10,
|
||||
RPN_AND = 0x11,
|
||||
RPN_XOR = 0x12,
|
||||
RPN_UNNOT = 0x13,
|
||||
RPN_UNNOT = 0x13, // FIXME: should be renamed to "NOT" for consistency
|
||||
|
||||
RPN_LOGAND = 0x21,
|
||||
RPN_LOGOR = 0x22,
|
||||
RPN_LOGUNNOT = 0x23,
|
||||
RPN_LOGUNNOT = 0x23, // FIXME: should be renamed to "LOGNOT" for consistency
|
||||
|
||||
RPN_LOGEQ = 0x30,
|
||||
RPN_LOGNE = 0x31,
|
||||
|
||||
Reference in New Issue
Block a user