Making a pluggable primitive - basic questions
Cowdery, Bob [UK]
Bob.Cowdery at CGI-Europe.com
Sun Jan 15 18:20:53 UTC 2006
I'm trying to build a plug-in and getting pretty lost at the moment. I
have found a few useful references but they are not complete enough for
me to follow. I have a simple piece of 'C' I want to integrate first
off, at least, the interface is simple. A couple of the methods don't
even have parameters so thought I would try those first. As I understand
it the process is this.
1. Create the smalltalk class to call the primitive. Something like
<primitive: 'primitiveRun' module:'PhasingDSPPlugin'>
2. Create the primitive code calling code in Slang dialect. Something
like this (I'm sure this is very incomplete/plain wrong):
SmartSyntaxInterpreterPlugin doPrimitive: #StartStream
Should I be using interpreterProxy here. Where does the
interpreterProxy instance get created.
3. Run Slang to convert (2) to 'C'. I know I need to use VMMaker and
should only need to convert this one method. I have looked at
VMMakerTool but don't know if this is the right thing to use. If it is
it's not clear to me how one gets a new plugin into the 'plugins not
built' list and the ones listed are not draggable anyway. Does my code
need to go into VMMaker-Plugins or is this just a convention? Also tried
cCodeGenerator cCodeForMethod but couldn't get it to work.
4 Assuming someone can put me right on (3) I then have to compile and
link (on XP by the way) for which I can use VisualStudio or Borland.
What do I compile/link against? I don't see any header files or libs in
the squeak distribution.
5. Having got my compiled/linked code, not sure what form that should
take, is it object format, linked to a .lib or .dll. How do I register
it with Squeak so it knows how to play.
Sorry for so many questions but any help in moving forward, even a
little, would be greatly appreciated.
*** Confidentiality Notice *** Proprietary/Confidential
Information belonging to CGI Group Inc. and its affiliates
may be contained in this message. If you are not a recipient
indicated or intended in this message (or responsible for
delivery of this message to such person), or you think for
any reason that this message may have been addressed to you
in error, you may not use or copy or deliver this message
to anyone else. In such case, you should destroy this
message and are asked to notify the sender by reply email.
More information about the Squeak-dev