[Vm-dev] help on creating plugin
Esteban Lorenzano
estebanlm at gmail.com
Sat Sep 13 21:14:21 UTC 2008
Hi,
I need some help/advice for a plugin I'm writing.
I'm already downloaded VMMaker and managed to compile a new VM in OS/X,
and I already write and compile and test a simple plugin (and I have to
say the process is very simple, and all my problems were because I
never used Xcode before), but now, with the plugin running, comes the
"optimization" phase, and there I have many doubts:
1) An external plugin blocks the VM when primitive is called? if so,
how do I manage to avoid this?
2) what is the right way to use strings? now, I'm obtaining them as
parameters, but the string comes without final zero, so C does not
works fine... because of that, I'm copying them into a new variable
(memory allocated with malloc and freed after use), but it does not
seems to be very performant... is there a better way?
3) in general, what is the best way to return Strings into Squeak? I
have to create an instance with interpreterProxy>>instantiateClass:
each time?
Well, I have many doubts about how to optimize my code... where can I
look to see some example code?
Thanks,
Esteban
More information about the Vm-dev
mailing list