Calling methods from primitives

Alejandro F. Reimondo aleReimondo at sugarweb.com
Fri Apr 30 02:51:59 UTC 1999


I have implemented callbacks for SqueakAPI calls under Squeak1.3x
 but calling the interpret does not work anytime.
And the Jitter version does not work with the interpret loop.

Ale.
----------
De:     	Stephen Pair[SMTP:spair at advantive.com]
Enviado: 	Jueves 29 de Abril de 1999 14:20
Para:   	squeak at cs.uiuc.edu
Asunto:     	RE: Calling methods from primitives

What if you altered the instruction pointer (IP) and stack pointer (SP; to
push any parameters) and then called interpret?  Would that work?  Also,
would the debugger be able to handle having the primitive context on the
stack?

It seems to me if that would work, it should then be trivial to implement a
macro for doing message sends from the VM (or pluggable prims).

- Stephen

> -----Original Message-----
> From: stp at silcom.com [mailto:stp at silcom.com]On Behalf Of Stephen Pope
> Sent: Thursday, April 29, 1999 12:08 PM
> To: squeak at cs.uiuc.edu
> Subject: Re: Calling methods from primitives
>
>
> Stephen Pair wrote:
> >
> > Does anyone how to invoke a method on an object from within a
> primitive?  Is
> > there a way?
>
> There's no direct and simple way to handle arbitrary "call-backs"
> from the VM
> into Smalltalk. I do it via Semaphores. You can easily register a
> semaphore as
> an external object, then signal it from a primitive. If you have
> a Smalltalk
> process waiting on the semaphore, it can do whatever it wants --
> send a message,
> call another primitive, etc.
>
> --
> stp
>
>   Stephen Travis Pope
>   stp at create.ucsb.edu      http://www.create.ucsb.edu/~stp/
>
>





More information about the Squeak-dev mailing list