Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 0748fb622d16ed55de212ed2c6aca1a0defa1799
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/0748fb622d16ed55de…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2020-11-08 (Sun, 08 Nov 2020)
Changed paths:
M nsspur64src/vm/cointerp.c
M nsspur64src/vm/cointerp.h
M nsspur64src/vm/gcc3x-cointerp.c
M nsspursrc/vm/cointerp.c
M nsspursrc/vm/cointerp.h
M nsspursrc/vm/gcc3x-cointerp.c
M nsspurstack64src/vm/gcc3x-interp.c
M nsspurstack64src/vm/interp.c
M nsspurstacksrc/vm/gcc3x-interp.c
M nsspurstacksrc/vm/interp.c
M spur64src/vm/cointerp.c
M spur64src/vm/cointerp.h
M spur64src/vm/cointerpmt.c
M spur64src/vm/cointerpmt.h
M spur64src/vm/gcc3x-cointerp.c
M spur64src/vm/gcc3x-cointerpmt.c
M spurlowcode64src/vm/cointerp.c
M spurlowcode64src/vm/cointerp.h
M spurlowcode64src/vm/gcc3x-cointerp.c
M spurlowcodesrc/vm/cointerp.c
M spurlowcodesrc/vm/cointerp.h
M spurlowcodesrc/vm/gcc3x-cointerp.c
M spurlowcodestack64src/vm/gcc3x-interp.c
M spurlowcodestack64src/vm/interp.c
M spurlowcodestacksrc/vm/gcc3x-interp.c
M spurlowcodestacksrc/vm/interp.c
M spursista64src/vm/cointerp.c
M spursista64src/vm/cointerp.h
M spursista64src/vm/gcc3x-cointerp.c
M spursistasrc/vm/cointerp.c
M spursistasrc/vm/cointerp.h
M spursistasrc/vm/gcc3x-cointerp.c
M spursrc/vm/cointerp.c
M spursrc/vm/cointerp.h
M spursrc/vm/cointerpmt.c
M spursrc/vm/cointerpmt.h
M spursrc/vm/gcc3x-cointerp.c
M spursrc/vm/gcc3x-cointerpmt.c
M spurstack64src/vm/gcc3x-interp.c
M spurstack64src/vm/interp.c
M spurstack64src/vm/validImage.c
M spurstacksrc/vm/gcc3x-interp.c
M spurstacksrc/vm/interp.c
M spurstacksrc/vm/validImage.c
M src/vm/cointerp.c
M src/vm/cointerp.h
M src/vm/cointerpmt.c
M src/vm/cointerpmt.h
M src/vm/gcc3x-cointerp.c
M src/vm/gcc3x-cointerpmt.c
M stacksrc/vm/gcc3x-interp.c
M stacksrc/vm/interp.c
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.2871
Ugh, the 2 bit shift in the image flags will be the end of me.
Get the file times in utc flag set code correct.
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2871.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.2871
Author: eem
Time: 8 November 2020, 10:55:27.287421 pm
UUID: 326d8568-fcb5-46f0-bc8f-16f391448dec
Ancestors: VMMaker.oscog-eem.2870
Ugh, the 2 bit shift in the image flags will be the end of me. Get the file times in utc flag set code correct. Bah...
=============== Diff against VMMaker.oscog-eem.2870 ===============
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:
[^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: 512]
+ ifFalse: [imageHeaderFlags bitClear: 512]!
- ifTrue: [imageHeaderFlags bitOr: 128]
- ifFalse: [imageHeaderFlags bitClear: 128]!
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:
[^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: 128)
+ ifTrue: [imageHeaderFlags bitOr: 512]
+ ifFalse: [imageHeaderFlags bitClear: 512]!
- imageHeaderFlags := (flags anyMask: 8)
- ifTrue: [imageHeaderFlags bitOr: 128]
- ifFalse: [imageHeaderFlags bitClear: 128]!
Item was changed:
----- 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: 512!
- ^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:
[^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: 128)
+ ifTrue: [imageHeaderFlags bitOr: 512]
+ ifFalse: [imageHeaderFlags bitClear: 512]!
- imageHeaderFlags := (flags anyMask: 8)
- ifTrue: [imageHeaderFlags bitOr: 128]
- ifFalse: [imageHeaderFlags bitClear: 128]!
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 151793a3a6a54744e3ac9151300c6ccde763c761
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/151793a3a6a54744e3…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2020-11-08 (Sun, 08 Nov 2020)
Changed paths:
M nsspur64src/vm/cointerp.c
M nsspur64src/vm/cointerp.h
M nsspur64src/vm/gcc3x-cointerp.c
M nsspursrc/vm/cointerp.c
M nsspursrc/vm/cointerp.h
M nsspursrc/vm/gcc3x-cointerp.c
M nsspurstack64src/vm/gcc3x-interp.c
M nsspurstack64src/vm/interp.c
M nsspurstacksrc/vm/gcc3x-interp.c
M nsspurstacksrc/vm/interp.c
M platforms/Cross/plugins/FileAttributesPlugin/faCommon.c
M platforms/Cross/plugins/FileAttributesPlugin/faCommon.h
M platforms/Cross/vm/sqVirtualMachine.c
M platforms/Cross/vm/sqVirtualMachine.h
M platforms/iOS/plugins/FilePlugin/sqUnixFile.c
M platforms/unix/plugins/FileAttributesPlugin/faSupport.c
M platforms/unix/plugins/FilePlugin/sqUnixFile.c
M platforms/win32/plugins/FileAttributesPlugin/faSupport.c
M spur64src/vm/cointerp.c
M spur64src/vm/cointerp.h
M spur64src/vm/cointerpmt.c
M spur64src/vm/cointerpmt.h
M spur64src/vm/gcc3x-cointerp.c
M spur64src/vm/gcc3x-cointerpmt.c
M spurlowcode64src/vm/cointerp.c
M spurlowcode64src/vm/cointerp.h
M spurlowcode64src/vm/gcc3x-cointerp.c
M spurlowcodesrc/vm/cointerp.c
M spurlowcodesrc/vm/cointerp.h
M spurlowcodesrc/vm/gcc3x-cointerp.c
M spurlowcodestack64src/vm/gcc3x-interp.c
M spurlowcodestack64src/vm/interp.c
M spurlowcodestacksrc/vm/gcc3x-interp.c
M spurlowcodestacksrc/vm/interp.c
M spursista64src/vm/cointerp.c
M spursista64src/vm/cointerp.h
M spursista64src/vm/gcc3x-cointerp.c
M spursistasrc/vm/cointerp.c
M spursistasrc/vm/cointerp.h
M spursistasrc/vm/gcc3x-cointerp.c
M spursrc/vm/cointerp.c
M spursrc/vm/cointerp.h
M spursrc/vm/cointerpmt.c
M spursrc/vm/cointerpmt.h
M spursrc/vm/gcc3x-cointerp.c
M spursrc/vm/gcc3x-cointerpmt.c
M spurstack64src/vm/gcc3x-interp.c
M spurstack64src/vm/interp.c
M spurstack64src/vm/validImage.c
M spurstacksrc/vm/gcc3x-interp.c
M spurstacksrc/vm/interp.c
M spurstacksrc/vm/validImage.c
M src/plugins/FileAttributesPlugin/FileAttributesPlugin.c
M src/vm/cointerp.c
M src/vm/cointerp.h
M src/vm/cointerpmt.c
M src/vm/cointerpmt.h
M src/vm/gcc3x-cointerp.c
M src/vm/gcc3x-cointerpmt.c
M stacksrc/vm/gcc3x-interp.c
M stacksrc/vm/interp.c
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.2870
Add an image header flag that selects UTC times from the FilePlugin and
FileAttributesPlugin, rather than local time. e.g. to set (until we have
a proper accessor) use
Smalltalk vmParameterAt: 48 put: ((Smalltalk vmParameterAt: 48) bitOr: 128)
Have the FileAttributesPlugin cache nil, true & false, since these never change.
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!
Eliot Miranda uploaded a new version of FileAttributesPlugin to project VM Maker:
http://source.squeak.org/VMMaker/FileAttributesPlugin.oscog-eem.60.mcz
==================== Summary ====================
Name: FileAttributesPlugin.oscog-eem.60
Author: eem
Time: 8 November 2020, 10:03:27.152197 pm
UUID: de623342-2160-415d-a342-f64410f5ba5e
Ancestors: FileAttributesPlugin.oscog-eem.59
Make sure initialiseModule invokes faInitialiseModule so faInitialiseModule can do its thing.
=============== Diff against FileAttributesPlugin.oscog-eem.59 ===============
Item was changed:
----- Method: FileAttributesPlugin>>initialiseModule (in category 'initialize-release') -----
initialiseModule
<export: true>
sCOFfn := interpreterProxy ioLoadFunction: 'secCanOpenFileOfSizeWritable' From: 'SecurityPlugin'.
sCLPfn := interpreterProxy ioLoadFunction: 'secCanListPathOfSize' From: 'SecurityPlugin'.
+ ^self faInitialiseModule!
- ^true!
Item was added:
+ ----- Method: FileAttributesPluginSimulator>>faInitialiseModule (in category 'initialize-release') -----
+ faInitialiseModule
+ "In the real simulator this can determine whether to answer local or utc times, and can acche nil, true & false."
+ ^true!