Access to primitiveTable from a plugIn

Andreas Raab andreas.raab at gmx.de
Mon Apr 17 19:55:40 UTC 2006


Hi -

I don't think it's a good idea to expose the primitive table to plugins 
(either internal or external) in a standardized way. After all, getting 
away from numbered primitives is exactly why we introduced named 
primitives and plugins to begin with.

Since it seems to me that the tradeoff in this discussion is to either 
change the VM to make it work with the plugin or to change the plugin to 
make it work with the VM I'd strongly opt for the latter, e.g., update 
the plugin by the proper means to work with the latest VMs.

If that's too much time for you to invest, you can build custom VMs 
simply by doing something like

	extern void* primitiveTable[].

in your code, which requires the plugin to be internal but will work 
short term.

Cheers,
   - Andreas

Alejandro F. Reimondo wrote:
> Hi Andreas,
> 
>> What do you need that access for?
> I need to add/reserve 3 primitive numbers and want
>  to be setup by the plugin when loaded.
> 
> Doing that way porting sqAPIs from VM 1.3 to 3.7
> (as an internal plugin) can be realized without risk of
>  adding bugs to the implementation.
> 
> thanks in advance,
> Ale.
> p.d.: I think I can´t use named primitives because the
>  implementation uses the first literal of the method
>  to store information, as also do sqAPIs.
> 
> ----- Original Message ----- 
> From: "Andreas Raab" <andreas.raab at gmx.de>
> To: "The general-purpose Squeak developers list"
> <squeak-dev at lists.squeakfoundation.org>
> Sent: Monday, April 17, 2006 3:44 PM
> Subject: Re: Access to primitiveTable from a plugIn
> 
> 
>> Alejandro F. Reimondo wrote:
>>> How must a plugIN add/replace numbered primitives
>>> in the interpreter's table?
>> Not at all, e.g., there is no access to the primitive table by plugins.
>> What do you need that access for?
>>
>> Cheers,
>>    - Andreas
>>
> 
> 
> 




More information about the Squeak-dev mailing list