Recent

Author Topic: Parsing compiler directives with fcl-passrc  (Read 1346 times)

440bx

  • Hero Member
  • *****
  • Posts: 1923
Re: Parsing compiler directives with fcl-passrc
« Reply #15 on: May 17, 2020, 10:46:46 pm »
Hosting the compiler inside the IDE isn't optimal either (doesn't matter if it's dynamically like in Delphi or statically as it is in FPC's textmode IDE),
The reasons you put forward leave something to be desired.

... cause memory leaks will accumulate
If leaks aren't considered features, it "might" be a good idea to get rid of them.  That's not a request, just a friendly suggestion. :)  It would actually be a good thing  to see the memory leaks accumulate, as they become larger, they are harder to miss, thereby making it evident that there is something that needs "attention".  I've never heard the "out of sight, out of mind" view being put forward as a software quality assurance method (until now.)

and it needs to be made sure that the compiler's state is correctly reset upon an error so that it doesn't influence the next run.
Yes, it would have to do that.  Software is like that, if you want it to happen, you have to code for it. 

And yes, memory leaks in the compiler are things that occurred in Delphi. It makes the IDE unusable sooner or later.
I hope they fixed them, after all, a $1500.00+ leak in every customer's pocket should provide the means to afford some sealant to plug them.


I suspect FPC's current architecture wouldn't make it easy to turn it into a DLL but, improving its architecture to make it possible would definitely be an improvement.  Of course, not one that is visible in term of language features but, it opens the door to some very powerful and desirable abilities.

FPC v3.0.4 and Lazarus 1.8.2 on Windows 7 64bit.

PascalDragon

  • Hero Member
  • *****
  • Posts: 1922
  • Compiler Developer
Re: Parsing compiler directives with fcl-passrc
« Reply #16 on: May 18, 2020, 09:12:42 am »
I suspect FPC's current architecture wouldn't make it easy to turn it into a DLL but, improving its architecture to make it possible would definitely be an improvement.  Of course, not one that is visible in term of language features but, it opens the door to some very powerful and desirable abilities.

Considering that the textmode IDE uses the compiler statically linked it wouldn't be that hard to provide it as a library as well. However you wouldn't receive much more than compile statistics (and of course whether the compilation was successful or not).

 

TinyPortal © 2005-2018