[Vm-dev] Howto invoke plugin primitive from Interpreter?
André Wendt
andre.wendt at hpi.uni-potsdam.de
Thu Jun 14 12:31:34 UTC 2007
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.
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.
André
More information about the Vm-dev
mailing list