[fpc-devel] Interface scope incompatibility with Delphi

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Nov 10 11:54:42 CET 2010


On 10 Nov 2010, at 11:40, Graeme Geldenhuys wrote:

> I'm still searching the archives.

mail-archive.com is currently not responding for me, but the thread is  
here: http://www.mail-archive.com/fpc-devel@lists.freepascal.org/msg11126.html 
  (it will probably come back online later today).

There's also a long discussion on the same topic at http://bugs.freepascal.org/view.php?id=9472

> Mind you tell me what would be so bad in
> this case to be delphi compatible? Is there actually any negative  
> points to it?


Ensuring compatibility with undocumented code generator details  
require large amounts of work, and moreover can be completely in vain  
if Delphi's behaviour changes later on.

In this case, the work would entail determining *under all  
circumstances* where exactly Delphi creates temporary interfaces and  
where not, and where the refcounts are increased and decreased. See  
the bug report and thread above for how Delphi's behaviour is not the  
same under all circumstances either (because of limitations in inter- 
procedural analysis -- it's quite possible that when inlining some  
function calls, Delphi's behaviour will also change). Then you have to  
adapt the FPC code generator so that it performs the same  
optimizations as Delphi does under the same circumstances (not more,  
not less).


Jonas



More information about the fpc-devel mailing list