Is it viable to implement a new language front end (implementing, say, Ada 95, Modula 2 or Oberon) that would use the existing FPC optimiser and back end code generators ?
The goal here is to see if these parts of FPC can be used as a generic infrastructure in the same way as the LLVM core libraries currently are. It would be a nice lightweight alternative to the LLVM libraries if such a thing were possible.
From reading the various online documents I have found, it is not yet clear to me how viable this is.
Unlike LLVM, FPC does not appear to use a human readable IR language, but instead uses a Pascal based data structure. This means any new front end would probably have to be in Pascal as well. This is absolutely not a problem for me.
However, I have not yet found any documentation comparable to the LLVM IR documentation which shows how a new front end would build up this data structure and pass it to the FPC optimiser and back end.
Is such an idea viable ?
Thanks,
Simon.