[MLton] ffi improvements

Daniel C. Wang danwang@CS.Princeton.EDU
Wed, 22 Sep 2004 20:06:15 -0400


BTW what's the story with enforcing alignment restrictions.
It's not the case that the C types char* and int* are semanticlly the same 
because of potential alignement constraints, but the MLton FFI maps them to 
the same Pointer.t which I think is wrong.

Stephen Weeks wrote:
>>Looking through some of the FFI stuff, here are some items of note:
>>
>>1) The CType structure (in the compiler) distinguishes between Pointer and
>>   Word32.  However, MLton.Pointer.t (in the basis), while abstract, is
>>   defined to be equal to word.  I think it might be cleaner to have a
>>   primitive pointer tycon.
> 
> 
> I agree.  We used to have it and I don't think there is any strong
> reason not to.  Here's what I wrote in the commitlog on December 1,
> 2003 when I checked in the code to replace the primitive pointer tycon
> with Word32.word.
> 
>