Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.847.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.847 Author: eem Time: 7 August 2014, 7:48:20.583 am UUID: c9c7ffd4-9899-43f5-b566-ab69319636b9 Ancestors: VMMaker.oscog-eem.846
Fix the header rewrite filter so that interp.h doesn't get endlessly regenerated, reducing recompilations.
=============== Diff against VMMaker.oscog-eem.846 ===============
Item was changed: ----- Method: CCodeGenerator>>needToGenerateHeader:file:contents: (in category 'C code generator') ----- needToGenerateHeader: headerName file: interpHdrPath contents: newContentsArg "Check if we need to regenerate a header file. We always need to if the contents have changed. But if not we can avoid needless recompilations by not regenerating. So only regenerate if the package is clean (version doesn't include a '*'). If we can't find a package version ask the user." + | newContents oldContents makerStamp vmMakerIndex | - | newContents oldContents | (FileDirectory default fileExists: interpHdrPath) ifFalse: [^true]. newContents := newContentsArg. oldContents := (FileDirectory default oldFileNamed: interpHdrPath) contentsOfEntireFile. + oldContents := oldContents copyReplaceAll: {Character cr. Character lf} with: {Character cr}. + oldContents replaceAll: Character lf with: Character cr. + makerStamp := (vmMakerIndex := oldContents indexOfSubCollection: 'VMMaker') ~= 0 + ifTrue: + [oldContents + copyFrom: vmMakerIndex + to: (oldContents indexOf: Character cr startingAt: vmMakerIndex) - 1] + ifFalse: ['XXX']. (newContents beginsWith: '/*') = (oldContents beginsWith: '/*') ifFalse: [(newContents beginsWith: '/*') ifTrue: [newContents := newContents readStream upToAll: '*/'; skipSeparators; upToEnd]. (oldContents beginsWith: '/*') ifTrue: [oldContents := oldContents readStream upToAll: '*/'; skipSeparators; upToEnd]]. - oldContents := oldContents copyReplaceAll: {Character cr. Character lf} with: {Character cr}. - oldContents replaceAll: Character lf with: Character cr. ^oldContents ~= newContents + or: [([((self class monticelloDescriptionFor: vmClass) includes: $*) not + and: [((self class monticelloDescriptionFor: vmClass) includesSubString: makerStamp) not]] - or: [[((self class monticelloDescriptionFor: vmClass) includes: $*) not] on: Error + do: [:ex| true]) + or: [self confirm: headerName, ' contents are unchanged.\Writing the file may cause recompilation of support files.\Do you want to write the header file?' withCRs]]! - do: [:ex| - self confirm: headerName, ' contents are unchanged.\Writing the file may cause recompilation of support files.\Do you want to write the header file?\The interpreter will still be written either way.' withCRs]]!
vm-dev@lists.squeakfoundation.org