Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2794.mcz==================== Summary ====================
Name: VMMaker.oscog-eem.2794
Author: eem
Time: 27 August 2020, 7:28:10.09656 pm
UUID: 81de711b-1533-4e7c-93a8-53c661352adc
Ancestors: VMMaker.oscog-eem.2793
Fix long-standing confusion in generating the interface header files between the CoInterpreter and the Cogit. VM_EXPORT is the marker for export between the VM and external plugins (dlls/shared-objects). Between the CoInterpreter and the Cogit we need nothing more than extern.
=============== Diff against VMMaker.oscog-eem.2793 ===============
Item was changed:
----- Method: CCodeGenerator>>emitGlobalCVariablesOn: (in category 'C code generator') -----
emitGlobalCVariablesOn: aStream
"Store the global (exported) variable declarations on the given stream."
aStream cr; nextPutAll: '/*** Global Variables ***/'; cr.
(self sortStrings: (variables select: [:v| vmClass mustBeGlobal: v])) do:
[:var | | varString |
(self variableDeclarationStringsForVariable: (varString := var asString)) do:
[:decl|
decl first == $#
ifTrue:
[aStream nextPutAll: decl; cr]
ifFalse:
[(decl includesSubstring: ' private ') ifFalse: "work-around hack to prevent localization of variables only referenced once."
+ [(decl beginsWith: 'static') ifFalse:
+ [aStream
+ nextPutAll: 'extern ';
+ nextPutAll:
+ ((decl includes: $=)
+ ifTrue: [decl copyFrom: 1 to: (decl indexOf: $=) - 1]
+ ifFalse: [decl]);
+ nextPut: $;;
+ cr]]]]].
- [(decl beginsWith: 'static') ifFalse: [aStream nextPutAll: 'VM_EXPORT '].
- aStream
- nextPutAll:
- ((decl includes: $=)
- ifTrue: [decl copyFrom: 1 to: (decl indexOf: $=) - 1]
- ifFalse: [decl]);
- nextPut: $;;
- cr]]]].
aStream cr!