Forum > General
Does FPC uses any intermediate representation?
rishav:
Hi folks
I am working on a toy compiler and was wondering if I can use FPC as its backend. Does FPC uses any kind of IR that I can generate?
I read about the old Pascal codebases using p-code, but I couldn't find if there was a way for me to input pcode into fpc executable.
Bart:
AFAIK: no.
Bart
TRon:
--- Quote from: Bart on June 04, 2023, 10:46:54 pm ---AFAIK: no.
--- End quote ---
Mnemonics ? though we could discuss if that can be considered intermediate
marcov:
No, it afaik goes from tree representation to asmlists, which is a kind of proto assembler
MarkMLl:
I think there's some sort of representation in the .ppu files in support of generics, but it should be considered private: it would be an extremely unwise programmer who dabbled in such things without the support of the core team.
It's easy enough to emit to and later interpret an intermediate format ** , but my own feeling is that one would be far better off learning an established form such as LLVM.
** Been there done that repeatedly. Make sure that the first opcode is a version identifier to keep the compiler and interpreter matched.
MarkMLl
Navigation
[0] Message Index
[#] Next page