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

commits-2
 
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2870.mcz

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

Name: VMMaker.oscog-eem.2870
Author: eem
Time: 8 November 2020, 10:25:21.301268 pm
UUID: 28fdb4ad-28aa-44e5-bef2-0d6851fb7750
Ancestors: VMMaker.oscog-eem.2869

Add an image header flag that selects UTC times form the FilePlugin and FileAttributesPlugin, rather than local tme.  e.g. to set (until we have a proper accessor) use

Smalltalk vmParameterAt: 48 put: ((Smalltalk vmParameterAt: 48) bitOr: 128)

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

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 threadId 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: 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"
+ flags asUnsignedInteger > 255 ifTrue:
- Bit 6: if set, implies arithmetic primitives will fail if given arguments of different types (float vs int)"
- flags asUnsignedInteger > 127 ifTrue:
  [^self primitiveFailFor: PrimErrUnsupported].
  "processHasThreadId := 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.
+ imageHeaderFlags := (flags anyMask: 128)
+ ifTrue: [imageHeaderFlags bitOr: 128]
+ ifFalse: [imageHeaderFlags bitClear: 128]!
- primitiveDoMixedArithmetic := flags noMask: 64!

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 threadId 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: if set, implies a threaded VM will not disown the VM if owned by the GUI thread
  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"
+ flags asUnsignedInteger > 255 ifTrue:
- Bit 6: if set, implies arithmetic primitives will fail if given arguments of different types (float vs int)"
- flags asUnsignedInteger > 127 ifTrue:
  [^self primitiveFailFor: PrimErrUnsupported].
  processHasThreadId := flags anyMask: 1.
  flagInterpretedMethods := flags anyMask: 2.
  preemptionYields := flags noMask: 4.
  noThreadingOfGUIThread := flags anyMask: 8.
  newFinalization := flags anyMask: 16.
  sendWheelEvents := flags anyMask: 32.
+ primitiveDoMixedArithmetic := flags noMask: 64.
+ imageHeaderFlags := (flags anyMask: 8)
+ ifTrue: [imageHeaderFlags bitOr: 128]
+ ifFalse: [imageHeaderFlags bitClear: 128]!
- primitiveDoMixedArithmetic := flags noMask: 64!

Item was added:
+ ----- Method: InterpreterProxy>>fileTimesInUTC (in category 'other') -----
+ fileTimesInUTC
+ <option: #(atLeastVMProxyMajor:minor: 1 17)>
+ ^(Smalltalk vmParameterAt: 48) anyMask: 128!

Item was added:
+ ----- Method: SpurMemoryManager>>fileTimesInUTC (in category 'simulation only') -----
+ fileTimesInUTC
+ "hack around the CoInterpreter/ObjectMemory split refactoring"
+ <doNotGenerate>
+ ^coInterpreter fileTimesInUTC!

Item was added:
+ ----- Method: StackInterpreter>>fileTimesInUTC (in category 'plugin support') -----
+ fileTimesInUTC
+ "Answer if file times, including those from the FilePlugin and FileAttributesPlugin,
+ should be answered in UTC seconds from the epoch rather than local seconds."
+ ^imageHeaderFlags anyMask: 128!

Item was changed:
  ----- Method: StackInterpreter>>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 threadId 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 (meaningful to the Cog VM only)
  Bit 2: if set, implies preempting a process does not put it to the back of its run queue
  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"
+ flags asUnsignedInteger > 255 ifTrue:
- Bit 6: if set, implies arithmetic primitives will fail if given arguments of different types (float vs int)"
- flags asUnsignedInteger > 127 ifTrue:
  [^self primitiveFailFor: PrimErrUnsupported].
  "processHasThreadId := flags anyMask: 1. specific to CoInterpreterMT"
  imageHeaderFlags := (flags anyMask: 1)
  ifTrue: [imageHeaderFlags bitOr: 4]
  ifFalse: [imageHeaderFlags bitClear: 4].
  "flagInterpretedMethods := flags anyMask: 2. specific to CoInterpreter"
  imageHeaderFlags := (flags anyMask: 2)
  ifTrue: [imageHeaderFlags bitOr: 8]
  ifFalse: [imageHeaderFlags bitClear: 8].
  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.
+ imageHeaderFlags := (flags anyMask: 8)
+ ifTrue: [imageHeaderFlags bitOr: 128]
+ ifFalse: [imageHeaderFlags bitClear: 128]!
- primitiveDoMixedArithmetic := flags noMask: 64!