VM Maker: VMMaker.oscog-EstebanLorenzano.1322.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

VM Maker: VMMaker.oscog-EstebanLorenzano.1322.mcz

commits-2
 
Esteban Lorenzano uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-EstebanLorenzano.1322.mcz

==================== Summary ====================

Name: VMMaker.oscog-EstebanLorenzano.1322
Author: EstebanLorenzano
Time: 22 May 2015, 8:38:54.928627 pm
UUID: f973b39f-b9fb-425b-90d2-eda1a2c2406e
Ancestors: VMMaker.oscog-EstebanLorenzano.1321

added a PharoVM flag I forgot

=============== Diff against VMMaker.oscog-EstebanLorenzano.1321 ===============

Item was changed:
  ----- Method: CCodeGenerator>>emitGlobalCVariablesOn: (in category 'C code generator') -----
  emitGlobalCVariablesOn: aStream
  "Store the global variable declarations on the given stream."
 
  aStream cr; nextPutAll: '/*** Global Variables ***/'; cr.
 
  (self sortStrings: (variables select: [:v| vmClass mustBeGlobal: v])) do:
  [:var | | varString decl |
  varString := var asString.
  decl := variableDeclarations at: varString ifAbsent: ['sqInt ' , varString].
  decl first == $# "support cgen var: #bytecodeSetSelector declareC: '#define bytecodeSetSelector 0' hack"
  ifTrue:
  [aStream nextPutAll: decl; cr]
  ifFalse:
  [
  ((decl includesSubString: ' private ')
   "or: [decl beginsWith: 'static']") ifFalse: "work-around hack to prevent localization of variables only referenced once."
  [
+ PharoVM ifTrue:
+ [(decl beginsWith: 'static') ifFalse: [aStream nextPutAll: 'VM_EXPORT ']].
- (decl beginsWith: 'static') ifFalse: [aStream nextPutAll: 'VM_EXPORT '].
  (decl includes: $=) ifTrue:
  [decl := decl copyFrom: 1 to: (decl indexOf: $=) - 1].
  aStream
  nextPutAll: decl;
  nextPut: $;;
  cr]]].
  aStream cr!