that directive is used for functions that are called by the compiler directly without them being part of a call from some user code,
Thank you PascalDragon for the additional information. I don't see what "functions that are called by the compiler directly without them being part of a call from some user code" means. Aren't all functions called "directly" whether it's by a compiler ("FPC" in this case) or any other program ?.
In essence, yes, but what I mean that these function calls aren't visible
as is in the source. Take
WriteLn for example: in your source there'll be a
WriteLn('Hello World') call, but in the end it's a sequence of
fpc_get_output,
fpc_write_text_shortstr (or
fpc_write_text_ansistr or
fpc_write_text_unistr),
fpc_iocheck and
fpc_writeln_end all of which are marked as
compilerproc (and all of which don't have a mangled name). And this is not achieved by inlining something, but by the compiler directly emitting suitable calls.
The only guess I can think of is that "compilerproc" functions/procedures are part of the set of functions/procedures that make up the core set of functions the compiler needs to be already present (pre-existing/pre-implemented) in order to compile itself. Am I on the right track here ?
No, these are just core functions which back some of the core intrinsics. The compiler itself is a normal Pascal application that requires quite a lot more of the RTL.