[Vm-dev] Re: Alien on Spur and "el capitan"?

David T. Lewis lewis at mail.msen.com
Tue Oct 20 23:00:06 UTC 2015


On Tue, Oct 20, 2015 at 03:23:37PM -0700, Eliot Miranda wrote:
>  
> Hi David,
> 
> On Tue, Oct 20, 2015 at 3:20 PM, David T. Lewis <lewis at mail.msen.com> wrote:
> 
> >
> > On Tue, Oct 20, 2015 at 01:48:35PM -0700, John McIntosh wrote:
> > >
> > > Ok, you know there is a test plugin squeakSUnitTester (See the *m/h
> > files)
> > >  I made to check types being passed to/from the Objective-C interface to
> > > confirm things are being transferred/received correctly.  However I did
> > > write something similar for the FFI interface where, or using using
> > > Smalltalk code where I iterated over the entire range of +/- 2 billion
> > then
> > > edge cases for LargePositive/Negative integers for each point where we
> > > added another byte of accuracy for a few bytes.   The reasons for that
> > was
> > > to confirm that integer conversion was working correctly for all cases
> > when
> > > we had migrated to 32bit clean code a decade back.
> > >
> >
> > Hi John,
> >
> > It wasn't really a decade back. Well not quite ;-)
> >
> > Your mention of the FFI interface reminds me of the work we did to make
> > the old FFI 32/64 bit clean. We never got that harvested into the VM, but
> > the patches circa 2008 are still out there on the Mantis report at
> > http://bugs.squeak.org/view.php?id=7237
> >
> > I truly do not know if this has relevance any more, but maybe you and Eliot
> > could comment? There were pointer size issues that had to be addressed in
> > the image as well as in the plugin and support code, so some of it might
> > still be of interest.
> >
> 
> I *think* that the new ThreadedFFIPlugin-derived FFIs are 32/64-bit clean
> but its not been tested thoroughly.  These plugins don't use any assembly,
> compile to pure C with perhaps two asm statements in them to get/set the
> stack pointer if alloca doesn't do exactly the right thing.  But there's no
> code in there that assumes 32-bit sizes.  We'll know soon enough.

Getting rid of the assembly bindings is a welcome change.

On the image side, class ExternalAddress needed to do the right thing for
various pointer sizes. A patch for that is in Mantis 7237, so I can extract
it if you think it may still be relevant.

Dave



More information about the Vm-dev mailing list