flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > [FASM1] Recursive macro boilerplate elimination? |
Author |
|
Tomasz Grysztar 16 Oct 2020, 21:48
DimonSoft wrote: P.S. Even bigger question to discuss is about having a special kind of macro that is explicitly recursive and doesn’t fallback to its previous redefinition when invoked. That would simplify the case of mutual recursion: instead of wrapping every macro that could possibly create such a recursion they would all have been marked as recursive thus saving some typing and source code nesting level. |
|||
16 Oct 2020, 21:48 |
|
DimonSoft 16 Oct 2020, 22:24
Tomasz Grysztar wrote: This is how fasmg handles it (with ":" modifier). It might be possible to implement a similar modifier in fasm 1. That could be great. Maybe. I just started thinking about whether recursiveness is a property of a macro or its invocation. While lots of macros are either recursive or non-recursive, I can imagine some macro (maybe a proc implementation that would support Pascal-like nested procedures, something like that) which would probably need to switch between recursive and non-recursive behaviour. OTOH, since the recursive macro would just be a convenience syntax sugar feature (possibly saving some memory and/or time), it wouldn’t really break the classic behaviour for non-recursive macros (the default case). |
|||
16 Oct 2020, 22:24 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.