diff options
author | Ash Wolf <ninji@wuffs.org> | 2022-12-14 00:16:59 +0000 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2022-12-14 00:16:59 +0000 |
commit | 25bab8b1fb2fc851ea3f1f630b3de65ca6afdc22 (patch) | |
tree | c0ee632aa3752884b996c562622e2ece88216ea4 /includes/compiler/enode.h | |
parent | 9d2728a5605f651934fe67a6fe6986b3e4a2c011 (diff) | |
download | MWCC-25bab8b1fb2fc851ea3f1f630b3de65ca6afdc22.tar.gz MWCC-25bab8b1fb2fc851ea3f1f630b3de65ca6afdc22.zip |
haha it's been a while since i last committed, hasn't it
Diffstat (limited to '')
-rw-r--r-- | includes/compiler/enode.h | 57 |
1 files changed, 55 insertions, 2 deletions
diff --git a/includes/compiler/enode.h b/includes/compiler/enode.h index 92c7d2c..833c90e 100644 --- a/includes/compiler/enode.h +++ b/includes/compiler/enode.h @@ -279,14 +279,67 @@ enum { }; #define ENODE_IS(_enode, _etype) ( (_enode)->type == (_etype) ) -#define ENODE_IS2(_enode, _etype1, _etype2) ( ENODE_IS((_enode), (_etype1)) || ENODE_IS(_enode, (_etype2)) ) -#define ENODE_IS3(_enode, _etype1, _etype2, _etype3) ( ENODE_IS((_enode), (_etype1)) || ENODE_IS(_enode, (_etype2)) || ENODE_IS(_enode, (_etype3)) ) +#define ENODE_IS2(_enode, _etype1, _etype2) ( ENODE_IS((_enode), (_etype1)) || ENODE_IS((_enode), (_etype2)) ) +#define ENODE_IS3(_enode, _etype1, _etype2, _etype3) ( ENODE_IS((_enode), (_etype1)) || ENODE_IS((_enode), (_etype2)) || ENODE_IS((_enode), (_etype3)) ) +#define ENODE_IS4(_enode, _etype1, _etype2, _etype3, _etype4) ( ENODE_IS((_enode), (_etype1)) || ENODE_IS((_enode), (_etype2)) || ENODE_IS((_enode), (_etype3)) || ENODE_IS((_enode), (_etype4)) ) #define ENODE_IS_RANGE(_enode, _lo, _hi) ( ((_enode)->type >= (_lo)) && ((_enode)->type <= (_hi)) ) #define ENODE_QUALS(_enode) ( (UInt32) ( (_enode)->flags & ENODE_FLAG_QUALS ) ) #define ENODE_IS_INDIRECT_TO(_enode, _etype) ( ENODE_IS((_enode), EINDIRECT) && ENODE_IS((_enode)->data.monadic, (_etype)) ) #define ENODE_IS_ASSIGN(_enode) ( ENODE_IS_RANGE((_enode), EASS, EORASS) ) #define ENODE_IS_ASSIGN_TO(_enode, _etype) ( ENODE_IS_RANGE((_enode), EASS, EORASS) && ENODE_IS((_enode)->data.diadic.left->data.monadic, (_etype)) ) +// 0 to 8, 0x30 to 0x31 +#define ENODE_CASE_MONADIC \ + case EPOSTINC: \ + case EPOSTDEC: \ + case EPREINC: \ + case EPREDEC: \ + case EINDIRECT: \ + case EMONMIN: \ + case EBINNOT: \ + case ELOGNOT: \ + case EFORCELOAD: \ + case ETYPCON: \ + case EBITFIELD: + +// 9 to 0x1B +#define ENODE_CASE_DIADIC_1 \ + case EMUL: \ + case EMULV: \ + case EDIV: \ + case EMODULO: \ + case EADDV: \ + case ESUBV: \ + case EADD: \ + case ESUB: \ + case ESHL: \ + case ESHR: \ + case ELESS: \ + case EGREATER: \ + case ELESSEQU: \ + case EGREATEREQU: \ + case EEQU: \ + case ENOTEQU: \ + case EAND: \ + case EXOR: \ + case EOR: + +// 0x1E to 0x28, 0x2D, 0x2F +#define ENODE_CASE_ASSIGN \ + case EASS: \ + case EMULASS: \ + case EDIVASS: \ + case EMODASS: \ + case EADDASS: \ + case ESUBASS: \ + case ESHLASS: \ + case ESHRASS: \ + case EANDASS: \ + case EXORASS: \ + case EORASS: \ + case EBCLR: \ + case EBSET: + #ifdef __MWERKS__ #pragma options align=reset #endif |