VM Maker: VMMaker.oscog-eem.2314.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-eem.2314.mcz

Eliot Miranda uploaded a new version of VMMaker to project VM Maker:

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

Name: VMMaker.oscog-eem.2314
Author: eem
Time: 11 January 2018, 2:05:24.046726 pm
UUID: 0db879e4-e036-4956-a03e-a14b3923bbbc
Ancestors: VMMaker.oscog-eem.2313

Hack fix comment generation.  The API for comments in TParseNode is broken because in some subclasses it is a sequence of Strings, and elsewhere is a single String.

Default to the StackToRegisterMappingCogit.

=============== Diff against VMMaker.oscog-eem.2313 ===============

Item was changed:
  ----- Method: TParseNode>>emitCCommentOn:level:generator: (in category 'C code generation') -----
  emitCCommentOn: aStream level: level generator: aCodeGen
  "Emit the transferred Smalltalk comments as C comments."
  ((aCodeGen previousCommenter: self) == self or: [comment isNil]) ifTrue:
  [aCodeGen previousCommentMarksInlining: false.
+ (comment isString ifTrue: [{comment}] ifFalse: [comment]) withIndexDo:
- comment withIndexDo:
  [:commentString :index |
  (index = 1 and: [commentString beginsWith: 'begin ']) ifTrue:
  [(aCodeGen previousCommentMarksInlining: true) ifTrue: [^true]].
  aStream crtab: level; nextPutAll: '/* '.
+ (commentString findTokens: Character cr)
- ((comment at: index) findTokens: Character cr)
  do: [:line| aStream nextPutAll: line withBlanksTrimmed]
  separatedBy: [aStream crtab: level; next: 3 put: Character space].
  aStream nextPutAll: ' */'].
  aStream cr!

Item was changed:
  ----- Method: VMClass class>>cogitClass (in category 'accessing class hierarchy') -----
  "Answer the cogitClass in effect.  Ensure that StackInterpreter has a nil cogitClass."
  (self isInterpreterClass and: [self hasCogit not]) ifTrue:
  ^initializationOptions ifNotNil:
  [Smalltalk classNamed: (initializationOptions
  at: #Cogit
+ ifAbsent: [#StackToRegisterMappingCogit])]!
- ifAbsent: [#SimpleStackBasedCogit])]!