[fpc-pascal] Create class descendant at runtime?

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Tue Apr 29 12:56:44 CEST 2014

Michael Schnell wrote:

> A little bit similar to the "ahead of time" reatlime


  compiler in a Java
> or CIL framework.
> Did somebody ever indeed put something like this to work ?

I've got something where I can recompile a .so and the main program 
reloads it automatically (usually) without crashing. To clarify: it 
fails to reload on occasion possibly because it drops a signal but I've 
not seen it crash since I'm careful about when the swap is attempted.

I've not tried building something into the main program to reconstruct 
the source of the library and recompile it. I'd note that I'm being 
paranoid about protecting the interface- lots of magic numbers- and that 
the .so is always generated with a unique name.

Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

More information about the fpc-pascal mailing list