Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2019-11

Compiler development coding conventions

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

J. Gareth Moreton

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

Reply by email