[squeak-dev] FFI debugging lesson

Igor Stasenko siguctua at gmail.com
Mon May 24 23:25:02 UTC 2010


On 25 May 2010 01:34, Schwab,Wilhelm K <bschwab at anest.ufl.edu> wrote:
> I did some FFI based work in Pharo 1.0 and realized something that I found surprising; this might help others new to it.  An incorrect argument type in a call spec does not result in a compile-time error; instead it leads to "Cannot coerce arguments" at the time of the call.  FWIW.
>

Yes, i think its because at the time , when a method with FFI callout
is compiled, the type names, which specified in it
may not be present at the moment. So, a final check should be
performed at the time, when you doing an actual call.

Similarily, NB does the same, when you first calling a method, it
founds that method contains no native code,
and then during the code generation performs type checking of
arguments for generating coercions.

> Bill
>
>
>



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list