Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2530.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.2530 Author: eem Time: 13 March 2019, 12:24:13.20642 pm UUID: 4d90ede0-0700-4d15-8173-2aaf2360b7d1 Ancestors: VMMaker.oscog-eem.2529
Oops. The previous commit broke the warning for defines/variables. Undo the regression on warnings while keeping the bug fix for dead code elimination.
=============== Diff against VMMaker.oscog-eem.2529 ===============
Item was changed: ----- Method: CCodeGenerator>>nilOrBooleanConditionFor: (in category 'utilities') ----- nilOrBooleanConditionFor: nodeOrNil "If nodeOrNil is one of the conditional sends for which we do translation-time dead code elimination (i.e. cppIf:ifTrue: et al or ifTrue: et al) and the conditional does evaluate to a translation-time boolean constant, answer that constant, otherwise answer nil. Used to prune dead code, either for code generaton or dead variable elimination." generateDeadCode ifTrue: [^nil]. nodeOrNil ifNil: [^nil]. nodeOrNil isSend ifFalse: [^nil]. (#(ifTrue: ifFalse: ifTrue:ifFalse: ifFalse:ifTrue:) includes: nodeOrNil selector) ifTrue: [^self nilOrBooleanConstantReceiverOf: nodeOrNil receiver]. (#(and: or:) includes: nodeOrNil selector) ifTrue: [^self nilOrBooleanConstantReceiverOf: nodeOrNil]. (#(cppIf:ifTrue: cppIf:ifTrue:ifFalse:) includes: nodeOrNil selector) ifTrue: + [| maybeName value | - [| maybeName | - maybeName := nodeOrNil args first isConstant ifTrue: - [nodeOrNil args first nameOrValue]. (vmClass notNil and: [nodeOrNil args first isConstant + and: [(value := nodeOrNil args first value) isSymbol + and: [((vmClass ifNil: [VMBasicConstants]) defineAtCompileTime: value) not + and: [(vmClass bindingOf: value) notNil]]]]) ifTrue: - and: [maybeName isSymbol - and: [(vmClass defineAtCompileTime: maybeName) not - and: [(vmClass bindingOf: maybeName) notNil]]]]) ifTrue: [self logger nextPutAll: 'Warning: cppIf: reference to '; + store: value; - store: maybeName; nextPutAll: ' when variable of same name exists.'; cr].
+ maybeName := nodeOrNil args first isConstant ifTrue: + [nodeOrNil args first nameOrValue]. + ^(optionsDictionary notNil - (optionsDictionary notNil and: [nodeOrNil args first isConstant and: [(#(true false) includes: (optionsDictionary at: maybeName ifAbsent: [nil])) and: [((vmClass ifNil: [VMBasicConstants]) defineAtCompileTime: maybeName) not]]]) ifTrue: + [optionsDictionary at: nodeOrNil args first name]]. - [^optionsDictionary at: maybeName]]. ^nil!
vm-dev@lists.squeakfoundation.org