Updated VM callbacks

John M McIntosh johnmci at smalltalkconsulting.com
Tue Jan 16 21:59:03 UTC 2007


Andreas posted this to the squeak - vm -dev list. I'm wondering if  
any one wants me to build a mac  carbon vm with this logic?
Candidates must present a test case or three to confirm it works as  
expected on os-x (ppc/macIntel).

Begin forwarded message:

> Hi Guys -
>
> Just FYI, I found a major bug in the callback support I posted  
> earlier. The problem occurs if one fails a primitive *after* a  
> callback has been invoked like here:
>
> Squeak -> (primitive) -> Plugin
>                          Plugin -> (callback) -> Squeak
>                          Plugin <-  (return)  <- Squeak
> Squeak <-  (failure)  <- Plugin
>
> In such a case, the method being activated by the primitive failure  
> is not the method originally invoking the primitive but rather the  
> one that returned from the callback. More technically speaking, the  
> interpreter's newMethod isn't preserved which causes the effect  
> described above. The attached version fixes the problem by  
> preserving newMethod across callback enter/return.
>
> Cheers,
>   - Andreas

--
======================================================================== 
===
John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
======================================================================== 
===





More information about the Squeak-dev mailing list