[Vm-dev] Howto invoke plugin primitive from Interpreter?

Bert Freudenberg bert at freudenbergs.de
Thu Jun 14 12:55:32 UTC 2007


On Jun 14, 2007, at 14:31 , André Wendt wrote:

>
> Bert Freudenberg schrieb:
>>
>>
>> On Jun 14, 2007, at 11:28 , André Wendt wrote:
>>
>>> Hi,
>>>
>>> I'm trying to invoke the primitiveFileOpen primitive from the
>>> FilePlugin
>>> from within the Interpreter:
>>>
>>> <primitive: 'primitiveFileOpen' module: 'FilePlugin'>
>>>
>>> obviously does not work: It doesn't get translated to C. How do I
>>> invoke
>>> a primitive of an (internal/external) plugin from within the
>>> Interpreter
>>> class?
>>
>> This is generally a bad idea, because you would have to pass
>> parameters on the smalltalk stack.
>>
>> What are you actually trying to achieve?
>
> Hi Bert,
>
> I'm trying to write a logging facility for send (sample work for Prof.
> Hirschfeld, actually): Each time a message is sent, the target class,
> message and a couple of other properties should be logged.

I'm pretty sure John McIntosh did that before.

> That means I have to open a file upon initialization and write the  
> file
> at each send. There's no other way than to do that in the Interpreter,
> as far as I can see.

What about fopen()?

- Bert -




More information about the Vm-dev mailing list