VM Maker: VMMaker.oscog-eem.2171.mcz

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

VM Maker: VMMaker.oscog-eem.2171.mcz

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

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

Name: VMMaker.oscog-eem.2171
Author: eem
Time: 20 March 2017, 9:56:03.040602 am
UUID: 7be28a3f-3b9e-46de-bfc5-f8c46c06c851
Ancestors: VMMaker.oscog-eem.2170

needsToRegenerateCogitFile mustn't get confused by the absence of files.

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

Item was changed:
  ----- Method: VMMaker>>needsToRegenerateCogitFile (in category 'generate sources') -----
  "Check the timestamp for the relevant classes and then the timestamp for the main source file (e.g. interp.c)
  file if it already exists. Answer if the file needs regenerating."
+ | cogitClass cogitClasses tStamp files |
- | cogitClass cogitClasses tStamp |
  cogitClasses := (cogitClass := self interpreterClass cogitClass) withAllSuperclasses copyUpThrough: Cogit.
  cogitClasses addAllLast: (cogitClass ancilliaryClasses: self options).
  tStamp := cogitClasses inject: 0 into: [:tS :cl| tS max: cl timeStamp].
  "don't translate if the file(s) is newer than my timeStamp"
+ files := (self coreVMDirectory fileNamesMatching: cogitClass activeCompilerClass moduleName, '*.c').
+ files isEmpty ifTrue:
+ [^true].
+ (files allSatisfy:
- ((self coreVMDirectory fileNamesMatching: cogitClass activeCompilerClass moduleName, '*') allSatisfy:
  (self coreVMDirectory entryAt: fileName ifAbsent: [nil])
  ifNil: [false]
  [:fstat| | mTime |
  mTime := fstat modificationTime.
  mTime isInteger ifFalse: [mTime := mTime asSeconds].
  tStamp > mTime]]) ifTrue:
  [^self confirm: ('The ', self configurationNameIfAny, cogitClass printString,
  ', ', cogitClass activeCompilerClass, '\classes have not been modified since the ',
  cogitClass processorSpecificSourceFileName,
  ' source file\was last generated.  Do you still want to regenerate it?') withCRs].