Oldham, Adam wrote:
Well, Unfortunately, this is bad for us here. SVS and some of the old Oasis Pascal and other Pascal compiler developed back in the mid and early 1980s allowed this split interface/implementation method declaration in different Units.
Units? Are they like BP units otherwise, or do they look completely differently? (I don't know these compilers.)
This allows one Unit to act as a sort of header file (like in C) and the other Unit to actually define the function. In this way, you can have a global type repository of Units that only contain Interface declarations. When dealing with an App like ours where you are dealing with 500000 to 900000 lines of code in 200-400 files in 10+ project trees, changing something as simple as this could end up being a hufe proposition. That would be on top of the changes to FILLCHARing records, Strings that aren't of the "BP String" type, and other differences we find.
There are several. Possibilities:
- Merge each interface and the corresponding implementation to a BP unit
- Don't actually merge files, but use {$include}s
- Use EP modules where interface and implementation can remain in separate files (only add module foo interface/implementation; ... end. around them).
All of this looks like is can easily be automatized. A little script should do.
Or actually declare each thing in the interfaces `external'. Then GPC won't (in the future) expect an implementation in that unit.
As for Mangled Names? Are you going to move more towards name Mangling much like FPC uses?
I don't know exactly what FPC uses at the moment, but something simiilar, anyway.
If so, couldn't create a flag that would just keep all functions from using the Mangled Name?
I think we could do that then.
Frank