Re: Porting to Darwin

Brian de Alwis <[email protected]> Wed, 18 Jun 2008 22:29:51 -0700 (PDT)
Newsgroups gmane.comp.lang.smalltalk.strongtalk
Message-ID <cb265399-1147-4de7-bd8e-f6b284b8120e@s50g2000hsb.googlegroups.com>
Hi Steve.  Your patch works.  Execution proceeds further, and now the
start up fails as '__fxstat' cannot be resolved.  Which is good news:
it means that the previously-failing open call was completed
successfully -- the stack alignment code works.

Re: __fxstat is a Linuxism, unfortunately.  With the plethora of unix-
like OSs and their different representations (e.g., 32-bit or 64-bit
file offsets), it seems to me that we're better off trying to define a
minimal spec for handling files and embed those as primitives.  I
think it would greatly simplify moving to bootstrapping the VM.

> Actually, a failure to find a shared library (DLL or .so) results in
> an assertion failure being logged in the console. So does a failure to
> find a named function within a library. The problem here is that we
> are very early in the image start up code, and if it can't load libc
> (or equivalent) then if can't open the test script, and since there is
> no UI yet for non-Windows it can't do diddly! One issue is that the
> Foreign Function interface in Smalltalk (see this page on the Wiki -http://code.google.com/p/strongtalk/wiki/ForeignFunctions) doesn't
> provide a Smalltalk fail block for DLL lookup failures. It just
> assumes that the DLL is available. If the DLL is missing, it is
> essentially a pretty major error. Going forward we should probably add
> some generic failure code to throw an appropriate Smalltalk exception.
> We can then add an exception handler to handle this in the normal way,
> when it makes sense.

I see -- and once your ANSI exceptions are in there, then
Object>>#error: can be redefined and handled properly.  Sound cool.

If I can trouble you with one more question: what's the easiest or
recommended way to modify the ST code (e.g., so as to fixup the
__fxstat problem above) and dump a new image?  A quick scan of the
strongtalk web and googlecode sites didn't show anything.  I assume it
has to be done from Windows...?

Brian.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Strongtalk-general" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/strongtalk-general?hl=en
-~----------~----~----~----~------~----~------~--~---