[Cuis-dev] [cuis-slang] OpenSmalltalkVM Header Generation

Juan Vuletich juan at jvuletich.org
Sun Jun 7 14:30:54 PDT 2020


On 6/7/2020 7:19 AM, Philip Bernhart via Cuis-dev wrote:
> Hi,
>
> yesterday I looked at the sqNamedPrim.h in opensmalltalk-vm
> again. And tried to generate the interpreterProxy interface
> structure for my Cuis Slang project.
>
> Not the full one, which is depending on major and
> minor versions of the interpreterProxy in the VMMaker package,
> but the bare minimum which seems to be shared across the
> implementations.
>
> I wrote by hand a small "plugin" which basically just writes
> out a logfile which writes a string into it.
>
> For some reason the generated "plugin" is found by FFI and
> not by the<primitive: 'primFetchInt' module: 'TestPlugin'>
> call.
>
> How to compile: gcc -fpic -shared test_plugin.c -o TestPlugin.so
> was written for a 64bit image on a 64bit machine (amd64, intel).
>
> Do you have any suggestions?
>

What I would do is to take a simple existing plugin, like 
Matrix2x3Plugin, and generate the C from slang. Then I'd compare that C 
code with your hand written one. I guess the difference is there. 
Something else I'd try is to copy Matrix2x3Plugin with a new name, like 
TestM23Plugin, generate c, compile the library, and see that it works.

>
>
> Thanks for your time,
> Philip

Thanks for doing this!

Cheers,

-- 
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
@JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20200607/59fb903b/attachment.htm>


More information about the Cuis-dev mailing list