[fpc-devel] Delphi smart-linking perspective ( Language change and implementation ... )

Marco van de Voort marcov at stack.nl
Sun May 31 21:48:30 CEST 2009


In our previous episode, Jonas Maebe said:
> > Yeah, I got it when I saw Jonas' reply. The IDE could list all visual
> > components in forms in a file and hand it to the compiler. And a  
> > "custom"
> > list could allow additional streaming types (for users code)
> 
> Either the IDE has to be able to provide a list of all instantiated  
> class types in a subtree of the inheritance tree, or it has to provide  
> a list of class that certainly are not instantiated. I'm not sure how  
> it could do either though, since a programmer could always instantiate  
> stuff directly in his code (unless there are classes reserved for  
> internal Lazarus use).

In case of enabling WPO he would have to register them, and the IDE would
fold them into the list from the dfms. Not ideal, but everything comes at
a price.

If the registration would have to be full-subtree or not, depends on how
much info the IDE has to figure this out for itself.
 
> Simply a list of certainly instantiated types without any guarantees  
> about other classes would not be useful. The wpo infrastructure can  
> already extract that information from the source. Although it can only  
> know that these types "may" be instantiated, knowing it for sure is  
> not going to change the results of the analysis or generated code  
> (since it has to be pessimistic).

Non listed classes could raise an exception on instantiation.



More information about the fpc-devel mailing list