Hi Phil,

On 14/10/2018 15:03, Phil Clayton wrote:
Hi David,

Thanks for the explanation and updates.  I have tested this, including externalDataSymbol, and all appears to work on my Linux and Darwin systems.

Initially I found that I wasn't seeing the new Foreign exception for an uninitalized external symbol, although there was no seg fault.  It turns out that was actually because the exception was occurring in a function registered with PolyML.onEntry.  It seems that PolyML.onEntry silently suppresses any exceptions from the functions it runs.  Is that intended?

That's how the code works at the moment. I guess it could call OS.Process.exit OS.Process.failure but there's not much else it could do at that point.

I have been wondering if there is a way to have a local version of external(Function|Data)Symbol that falls back on
   getSymbol (loadExecutable ())
if the functions aren't available.  Could this be achieved by using one of two files depending on the value of PolyML.rtsVersion () ?


Using PolyML.rtsVersion is probably the best way. I've updated the RTS version in Git. Usually it only gets done when the new version is released but probably it should be updated at the same time as the compiler version: as soon as something changes in Git.

David
_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml

Reply via email to