Marcel Taeumel uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-mt.3345.mcz
==================== Summary ====================
Name: VMMaker.oscog-mt.3345 Author: mt Time: 8 December 2023, 10:38:26.611445 am UUID: d976ade6-fda9-834f-85fe-5ce5c4f45a21 Ancestors: VMMaker.oscog-mt.3344
Fixes inconsistency between setting image-header flags from within the image and then storing them in snapshots: - preserve now officially unused 16r20 in both single-threaded and multi-threaded VMs - fileTimesInUTC could be set but was not stored, is it actually used somewhere?
=============== Diff against VMMaker.oscog-mt.3344 ===============
Item was changed: ----- Method: CoInterpreter>>getImageHeaderFlags (in category 'image save/restore') ----- getImageHeaderFlags "Answer the flags that are contained in the 7th long of the image header." ^fullScreenFlag "0 or 1" + (VMBIGENDIAN ifTrue: [0] ifFalse: [2]) "this is the imageFloatsLittleEndian flag" + "+ (processHasThreadAffinity ifTrue: [4] ifFalse: [0]) -- see MT VM" + (flagInterpretedMethods ifTrue: [8] ifFalse: [0]) + (preemptionYields ifTrue: [0] ifFalse: [16r10]) + "+ 16r20 -- unassigned" + (newFinalization ifTrue: [16r40] ifFalse: [0]) + (sendWheelEvents ifTrue: [16r80] ifFalse: [0]) + (primitiveDoMixedArithmetic ifTrue: [0] ifFalse: [16r100]) + "+ 16r200 -- N.B. flag mask 16r200 is fileTimesInUTC, responded to by the FilePlugin & FileAttributesPlugin" - "N.B. flag mask 16r200 is fileTimesInUTC, responded to by the FilePlugin & FileAttributesPlugin" + (upscaleDisplayIfHighDPI ifTrue: [0] ifFalse: [16r400]) + + (imageHeaderFlags bitClear: 1+2"+4"+8+16r10"+16r20"+16r40+16r80+16r100"+16r200"+16r400) "these are any flags we do not recognize"! - + (imageHeaderFlags bitClear: 1+2+8+16r10+16r40+16r80+16r100+16r200+16r400) "these are any flags we do not recognize"!
Item was changed: ----- Method: CoInterpreter>>setImageHeaderFlags: (in category 'internal interpreter access') ----- setImageHeaderFlags: flags "Set an array of flags indicating various properties of the saved image, responded to on image load. These are the same as the image header flags shifted right two bits, omitting the fullScreenFlag and float byte order flag. Bit 0: if set, implies the image's Process class has threadAffinity as its 3rd inst var (zero relative) (meaningful to the MT VM only) Bit 1: if set, methods that are interpreted will have the flag bit set in their header Bit 2: if set, implies preempting a process does not put it to the back of its run queue + Bit 3: (unassigned) - Bit 3: if set, implies a threaded VM will not disown the VM if owned by the GUI thread (meaningful to the MT VM only) Bit 4: if set, implies the new finalization scheme where WeakArrays are queued Bit 5: if set, implies wheel events will be delivered as such and not mapped to arrow key events Bit 6: if set, implies arithmetic primitives will fail if given arguments of different types (float vs int) Bit 7: if set, implies file primitives (FilePlugin, FileAttributesPlugin) will answer file times in UTC not local times Bit 8: if set, implies the VM will not upscale the display on high DPI monitors; older VMs did this by default." flags asUnsignedInteger > 511 ifTrue: [^self primitiveFailFor: PrimErrUnsupported]. "processHasThreadAffinity := flags anyMask: 1. specific to CoInterpreterMT" imageHeaderFlags := (flags anyMask: 1) ifTrue: [imageHeaderFlags bitOr: 4] ifFalse: [imageHeaderFlags bitClear: 4]. flagInterpretedMethods := flags anyMask: 2. preemptionYields := flags noMask: 4. "noThreadingOfGUIThread := flags anyMask: 8.. specific to CoInterpreterMT" imageHeaderFlags := (flags anyMask: 8) ifTrue: [imageHeaderFlags bitOr: 32] ifFalse: [imageHeaderFlags bitClear: 32]. newFinalization := flags anyMask: 16. sendWheelEvents := flags anyMask: 32. primitiveDoMixedArithmetic := flags noMask: 64. + "fileTimesInUTC := flags anyMask: 128. see FilePlugin & FileAttributesPlugin" imageHeaderFlags := (flags anyMask: 128) ifTrue: [imageHeaderFlags bitOr: 512] ifFalse: [imageHeaderFlags bitClear: 512]. upscaleDisplayIfHighDPI := flags noMask: 256!
Item was changed: ----- Method: CoInterpreterMT>>getImageHeaderFlags (in category 'image save/restore') ----- getImageHeaderFlags "Answer the flags that are contained in the 7th long of the image header." ^fullScreenFlag "0 or 1" + (VMBIGENDIAN ifTrue: [0] ifFalse: [2]) "this is the imageFloatsLittleEndian flag" + (processHasThreadAffinity ifTrue: [4] ifFalse: [0]) + (flagInterpretedMethods ifTrue: [8] ifFalse: [0]) + (preemptionYields ifTrue: [0] ifFalse: [16r10]) + "+ 16r20 -- unassigned" - "was: noThreadingOfGUIThread ifTrue: [16r20] ifFalse: [0]); a broken idea" + (newFinalization ifTrue: [16r40] ifFalse: [0]) + (sendWheelEvents ifTrue: [16r80] ifFalse: [0]) + (primitiveDoMixedArithmetic ifTrue: [0] ifFalse: [16r100]) "N.B. flag mask 16r200 is fileTimesInUTC, responded to by the FilePlugin & FileAttributesPlugin" + (upscaleDisplayIfHighDPI ifTrue: [0] ifFalse: [16r400]) + + (imageHeaderFlags bitClear: 1+2+4+8+16r10"+16r20"+16r40+16r80+16r100"+16r200"+16r400) "these are any flags we do not recognize"! - + (imageHeaderFlags bitClear: 16r7FF) "these are any flags we do not recognize"!
Item was changed: ----- Method: CoInterpreterMT>>setImageHeaderFlags: (in category 'internal interpreter access') ----- setImageHeaderFlags: flags "Set an array of flags indicating various properties of the saved image, responded to on image load. These are the same as the image header flags shifted right two bits, omitting the fullScreenFlag and float byte order flag. Bit 0: if set, implies the image's Process class has threadAffinity as its 3rd inst var (zero relative) Bit 1: if set, methods that are interpreted will have the flag bit set in their header Bit 2: if set, implies preempting a process does not put it to the back of its run queue + Bit 3: (unassigned) - Bit 3: unassigned; used to mean if set, implies a threaded VM will not disown the VM if owned by the GUI thread; a broken idea Bit 4: if set, implies the new finalization scheme where WeakArrays are queued Bit 5: if set, implies wheel events will be delivered as such and not mapped to arrow key events Bit 6: if set, implies arithmetic primitives will fail if given arguments of different types (float vs int) Bit 7: if set, implies file primitives (FilePlugin, FileAttributesPlugin) will answer file times in UTC not local times Bit 8: if set, implies the VM will not upscale the display on high DPI monitors; older VMs did this by default." flags asUnsignedInteger > 511 ifTrue: [^self primitiveFailFor: PrimErrUnsupported]. (flags anyMask: 8) ifTrue: [^self primitiveFailFor: PrimErrInappropriate]. processHasThreadAffinity := flags anyMask: 1. flagInterpretedMethods := flags anyMask: 2. preemptionYields := flags noMask: 4. "was: noThreadingOfGUIThread := flags anyMask: 8. a broken idea" + imageHeaderFlags := (flags anyMask: 8) + ifTrue: [imageHeaderFlags bitOr: 32] + ifFalse: [imageHeaderFlags bitClear: 32]. newFinalization := flags anyMask: 16. sendWheelEvents := flags anyMask: 32. primitiveDoMixedArithmetic := flags noMask: 64. + "fileTimesInUTC := flags anyMask: 128. see FilePlugin & FileAttributesPlugin" imageHeaderFlags := (flags anyMask: 128) ifTrue: [imageHeaderFlags bitOr: 512] ifFalse: [imageHeaderFlags bitClear: 512]. upscaleDisplayIfHighDPI := flags noMask: 256!
vm-dev@lists.squeakfoundation.org