Updated VM callbacks

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Updated VM callbacks

johnmci
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 <[hidden email]>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
========================================================================
===