[fpc-devel] Compiler development coding conventions
J. Gareth Moreton
gareth at moreton-family.com
Fri Nov 1 22:32:25 CET 2019
Hi everyone,
Is there a set of rules written anywhere in regards to how the compiler
should be written? I know, for example that try...finally is not
allowed outside of the main block because of the performance impact.
I have a particular question... can I have custom operators? For
example, for my jump optimisations, I mentioned the 'condition_in'
function, but I wonder if seeing "if (a in b) then" instead of "if
condition_in(a, b) then" would be much clearer for other programmers,
especially since the operands aren't commutative. It would require
declaring "operator in (const subset: TAsmCond; const c: TAsmCond):
Boolean" though.
Gareth aka. Kit
More information about the fpc-devel
mailing list