Branch: refs/heads/virtend
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 1a7f4f3c818fb7a502ac78291cb3a1797ad9a4f1
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/1a7f4f3c818fb7a502…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2022-12-08 (Thu, 08 Dec 2022)
Changed paths:
M src/spur64.cog.lowcode/cogitARMv8.c
M src/spur64.cog.newspeak/cogitARMv8.c
M src/spur64.cog.newspeak/cogitX64SysV.c
M src/spur64.cog.newspeak/cogitX64WIN64.c
M src/spur64.cog.newspeak/cointerp.c
M src/spur64.cog.newspeak/gcc3x-cointerp.c
M src/spur64.cog/cogitARMv8.c
M src/spur64.sista/cogitARMv8.c
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.3281
Cogit: Fix MoveCqR on ARMv8 for certain bit patterns. This one caused
16r20000000 to evaluate to zero on ARMv8. The old code invalidly assumed
that N would always be 1 in the immediate ORR logical immediate.
Incidentally generate the 64-bit Newspeak VM.
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: aef4d4060a0cf0974fe512295fcedd171d1c3a46
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/aef4d4060a0cf0974f…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2022-12-08 (Thu, 08 Dec 2022)
Changed paths:
R src/plugins/MP4MediaFilePlugin
M src/spur64.cog.lowcode/cogitARMv8.c
M src/spur64.cog.newspeak/cogitARMv8.c
M src/spur64.cog.newspeak/cogitX64SysV.c
M src/spur64.cog.newspeak/cogitX64WIN64.c
M src/spur64.cog.newspeak/cointerp.c
M src/spur64.cog.newspeak/gcc3x-cointerp.c
M src/spur64.cog/cogitARMv8.c
M src/spur64.sista/cogitARMv8.c
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.3281
Cogit: Fix MoveCqR on ARMv8 for certain bit patterns. This one caused
16r20000000 to evaluate to zero on ARMv8. The old code invalidly assumed
that N would always be 1 in the immediate ORR logical immediate.
Incidentally generate the 64-bit Newspeak VM.
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog.seperateMarking-eem.3281.mcz
==================== Summary ====================
Name: VMMaker.oscog.seperateMarking-eem.3281
Author: eem
Time: 8 December 2022, 10:35:27.618989 am
UUID: 563eefa5-7e25-41a0-b95c-71a70fec2569
Ancestors: VMMaker.oscog.seperateMarking-eem.3279, VMMaker.oscog-eem.3280
Merge VMMaker.oscog-eem.3280 & VMMaker.oscog-eem.3276
=============== Diff against VMMaker.oscog.seperateMarking-eem.3279 ===============
Item was changed:
----- Method: ClipboardExtendedPlugin>>ioAddClipboardData:data:dataFormat: (in category 'io') -----
ioAddClipboardData: clipboard data: data dataFormat: format
| dataLength |
+ self primitive: 'ioAddClipboardData' parameters: #(Unsigned WordsOrBytes Oop).
- self primitive: 'ioAddClipboardData' parameters: #(Unsigned ByteArray Oop).
dataLength := interpreterProxy byteSizeOf: data cPtrAsOop.
(interpreterProxy isIntegerObject: format)
ifTrue:
[self
sqPasteboardPutItemFlavor: clipboard asVoidPointer
data: data length: dataLength
formatType: (interpreterProxy integerValueOf: format)]
ifFalse:
[(interpreterProxy isBytes: format)
ifTrue:
[self
sqPasteboardPutItemFlavor: clipboard asVoidPointer
data: data length: dataLength
formatType: (interpreterProxy firstIndexableField: format)
formatLength: (interpreterProxy byteSizeOf: format)]
ifFalse:
[interpreterProxy primitiveFailFor: PrimErrBadArgument]]!
Item was changed:
----- Method: ClipboardExtendedPlugin>>ioGetClipboardFormat:formatNumber: (in category 'io') -----
+ ioGetClipboardFormat: clipboard formatNumber: formatNumber
- ioGetClipboardFormat: clipboard formatNumber: formatNumber
<var: #clipboardAddress type: #'usqIntptr_t'>
self primitive: 'ioGetClipboardFormat' parameters: #(Unsigned SmallInteger).
^(self sqPasteboardGetItemCount: clipboard asVoidPointer) > 0
ifTrue: [self sqPasteboardCopyItemFlavors: clipboard asVoidPointer itemNumber: formatNumber]
ifFalse: [interpreterProxy nilObject]!
Item was added:
+ ----- Method: InterpreterPrimitives>>primitiveObjectsAccessibleFromRoots (in category 'image segment in/out') -----
+ primitiveObjectsAccessibleFromRoots
+ "This primitive is called from Squeak as...
+ arrayOfRoots uniquelyAccessibleObjects"
+
+ "This primitive answers an array of the receiver and every object in its proper tree of subParts (ie, that is not refered to from anywhere else outside the tree)."
+ "This primitive could be used to implement the primitiveStoreImageSegment segment, thanks to a suggestion from Igor Stassenko. Currently it is
+ used only to debug that primitive."
+
+ | arrayOfRoots result |
+ arrayOfRoots := self stackTop.
+
+ "Essential type checks"
+ (objectMemory isArray: arrayOfRoots) "Must be indexable pointers"
+ ifFalse: [^self primitiveFail].
+
+ result := objectMemory objectsAccessibleFromRoots: arrayOfRoots.
+ (objectMemory hasSpurMemoryManagerAPI
+ and: [(objectMemory isIntegerObject: result)
+ and: [(objectMemory integerValueOf: result) = PrimErrNoMemory]]) ifTrue:
+ [objectMemory fullGC.
+ arrayOfRoots := self stackTop.
+ result := objectMemory objectsAccessibleFromRoots: arrayOfRoots].
+ (objectMemory isIntegerObject: result)
+ ifTrue: [self primitiveFailFor: (objectMemory integerValueOf: result)]
+ ifFalse: [self methodReturnValue: result]!
Item was added:
+ ----- Method: ObjectMemory>>objectsAccessibleFromRoots: (in category 'image segment in/out') -----
+ objectsAccessibleFromRoots: arrayOfRoots
+ ^self integerObjectOf: PrimErrUnsupported!
Item was added:
+ ----- Method: SpurMemoryManager>>objectsAccessibleFromRoots: (in category 'image segment in/out') -----
+ objectsAccessibleFromRoots: arrayOfRootsArg
+ "This primitive is called from Squeak as...
+ arrayOfRoots uniquelyAccessibleObjects
+
+ This primitive answers an array of the receiver and every object in its proper tree of subParts (ie, that is not refered to from anywhere else outside the tree).
+
+ The primitive can fail for the following reasons with the specified failure codes:
+ PrimErrNoMemory: additional allocations failed"
+
+ <inline: false>
+ | arrayOfRoots arrayOfObjects |
+ <var: 'segAddr' type: #usqInt>
+
+ self runLeakCheckerFor: GCCheckImageSegment.
+
+ "First scavenge to collect any new space garbage that refers to the graph."
+ self scavengingGC.
+ arrayOfRoots := self updatePostScavenge: arrayOfRootsArg.
+
+ "Now compute the transitive closure, collecting the sequence of objects to be stored in the arrayOfObjects array.
+ Included in arrayOfObjects are the arrayOfRoots and all its contents. All objects have been unmarked."
+ arrayOfObjects := self objectsReachableFromRoots: arrayOfRoots.
+ arrayOfObjects ifNil:
+ [^self integerObjectOf: PrimErrNoMemory].
+ "If objectsReachableFromRoots: answers an integer there is not enough continuous free space in which to allocate the
+ reachable objects. If there is sufficient free space then answer an error code to prompt a compacting GC and a retry."
+ (self isIntegerObject: arrayOfObjects) ifTrue:
+ [totalFreeOldSpace - self allocationUnit >= (self integerValueOf: arrayOfObjects) ifTrue:
+ [^self integerObjectOf: PrimErrNeedCompaction].
+ ^self integerObjectOf: PrimErrNoMemory].
+
+ self assert: self allObjectsUnmarked. "work to be done when the incremental GC is written"
+ self deny: (self forwardersIn: arrayOfObjects).
+
+ ^arrayOfObjects!
Item was changed:
----- Method: StackInterpreter class>>initializePrimitiveTable (in category 'initialization') -----
(excessive size, no diff calculated)
Branch: refs/heads/virtend
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 131bb5b2e71a790510a23267cf9519861d64151e
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/131bb5b2e71a790510…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2022-12-06 (Tue, 06 Dec 2022)
Changed paths:
M src/spur32.cog.lowcode/cointerp.c
M src/spur32.cog.lowcode/cointerp.h
M src/spur32.cog.lowcode/gcc3x-cointerp.c
M src/spur32.cog/cointerp.c
M src/spur32.cog/cointerp.h
M src/spur32.cog/cointerpmt.c
M src/spur32.cog/cointerpmt.h
M src/spur32.cog/gcc3x-cointerp.c
M src/spur32.cog/gcc3x-cointerpmt.c
M src/spur32.sista/cointerp.c
M src/spur32.sista/cointerp.h
M src/spur32.sista/gcc3x-cointerp.c
M src/spur32.stack.lowcode/gcc3x-interp.c
M src/spur32.stack.lowcode/interp.c
M src/spur32.stack/gcc3x-interp.c
M src/spur32.stack/interp.c
M src/spur64.cog.lowcode/cointerp.c
M src/spur64.cog.lowcode/cointerp.h
M src/spur64.cog.lowcode/gcc3x-cointerp.c
M src/spur64.cog/cointerp.c
M src/spur64.cog/cointerp.h
M src/spur64.cog/cointerpmt.c
M src/spur64.cog/cointerpmt.h
M src/spur64.cog/gcc3x-cointerp.c
M src/spur64.cog/gcc3x-cointerpmt.c
M src/spur64.sista/cointerp.c
M src/spur64.sista/cointerp.h
M src/spur64.sista/gcc3x-cointerp.c
M src/spur64.stack.lowcode/gcc3x-interp.c
M src/spur64.stack.lowcode/interp.c
M src/spur64.stack/gcc3x-interp.c
M src/spur64.stack/interp.c
M src/v3.cog/cointerp.c
M src/v3.cog/cointerp.h
M src/v3.cog/gcc3x-cointerp.c
M src/v3.stack/gcc3x-interp.c
M src/v3.stack/interp.c
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.3280
Add a primitive that computes the transitive closure of objects accessible
from an array of roots. This is the collection half of the storeImageSegment
primtiive. This can be used either to debug failures in the storeImageSegment
primitive, and may eventually be used to implement it in a more general way.
Thanks to Igor Stasenko for suggesting this decomposition a few years ago.
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 1da73cf86e96356dbaa1bf953dea7cc613f7cd22
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/1da73cf86e96356dba…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2022-12-06 (Tue, 06 Dec 2022)
Changed paths:
M src/spur32.cog.lowcode/cointerp.c
M src/spur32.cog.lowcode/cointerp.h
M src/spur32.cog.lowcode/gcc3x-cointerp.c
M src/spur32.cog/cointerp.c
M src/spur32.cog/cointerp.h
M src/spur32.cog/cointerpmt.c
M src/spur32.cog/cointerpmt.h
M src/spur32.cog/gcc3x-cointerp.c
M src/spur32.cog/gcc3x-cointerpmt.c
M src/spur32.sista/cointerp.c
M src/spur32.sista/cointerp.h
M src/spur32.sista/gcc3x-cointerp.c
M src/spur32.stack.lowcode/gcc3x-interp.c
M src/spur32.stack.lowcode/interp.c
M src/spur32.stack/gcc3x-interp.c
M src/spur32.stack/interp.c
M src/spur64.cog.lowcode/cointerp.c
M src/spur64.cog.lowcode/cointerp.h
M src/spur64.cog.lowcode/gcc3x-cointerp.c
M src/spur64.cog/cointerp.c
M src/spur64.cog/cointerp.h
M src/spur64.cog/cointerpmt.c
M src/spur64.cog/cointerpmt.h
M src/spur64.cog/gcc3x-cointerp.c
M src/spur64.cog/gcc3x-cointerpmt.c
M src/spur64.sista/cointerp.c
M src/spur64.sista/cointerp.h
M src/spur64.sista/gcc3x-cointerp.c
M src/spur64.stack.lowcode/gcc3x-interp.c
M src/spur64.stack.lowcode/interp.c
M src/spur64.stack/gcc3x-interp.c
M src/spur64.stack/interp.c
M src/v3.cog/cointerp.c
M src/v3.cog/cointerp.h
M src/v3.cog/gcc3x-cointerp.c
M src/v3.stack/gcc3x-interp.c
M src/v3.stack/interp.c
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.3280
Add a primitive that computes the transitive closure of objects accessible
from an array of roots. This is the collection half of the storeImageSegment
primtiive. This can be used either to debug failures in the storeImageSegment
primitive, and may eventually be used to implement it in a more general way.
Thanks to Igor Stasenko for suggesting this decomposition a few years ago.
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.3280.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.3280
Author: eem
Time: 6 December 2022, 8:52:36.917493 pm
UUID: d6a800e7-dd9a-44d1-8421-b9a7e664d3bc
Ancestors: VMMaker.oscog-eem.3279
Add a primitive that computes the transitive closure of objects accessible from an array of roots. This is the collection half of the storeImageSegment primtiive. This can be used either to debug failures in the storeImageSegment primitive, and may eventually be used to implement it in a more general way.
Thanks to Igor Stasenko for suggesting this decomposition a few years ago.
=============== Diff against VMMaker.oscog-eem.3279 ===============
Item was added:
+ ----- Method: InterpreterPrimitives>>primitiveObjectsAccessibleFromRoots (in category 'image segment in/out') -----
+ primitiveObjectsAccessibleFromRoots
+ "This primitive is called from Squeak as...
+ arrayOfRoots uniquelyAccessibleObjects"
+
+ "This primitive answers an array of the receiver and every object in its proper tree of subParts (ie, that is not refered to from anywhere else outside the tree)."
+ "This primitive could be used to implement the primitiveStoreImageSegment segment, thanks to a suggestion from Igor Stassenko. Currently it is
+ used only to debug that primitive."
+
+ | arrayOfRoots result |
+ arrayOfRoots := self stackTop.
+
+ "Essential type checks"
+ (objectMemory isArray: arrayOfRoots) "Must be indexable pointers"
+ ifFalse: [^self primitiveFail].
+
+ result := objectMemory objectsAccessibleFromRoots: arrayOfRoots.
+ (objectMemory hasSpurMemoryManagerAPI
+ and: [(objectMemory isIntegerObject: result)
+ and: [(objectMemory integerValueOf: result) = PrimErrNoMemory]]) ifTrue:
+ [objectMemory fullGC.
+ arrayOfRoots := self stackTop.
+ result := objectMemory objectsAccessibleFromRoots: arrayOfRoots].
+ (objectMemory isIntegerObject: result)
+ ifTrue: [self primitiveFailFor: (objectMemory integerValueOf: result)]
+ ifFalse: [self methodReturnValue: result]!
Item was added:
+ ----- Method: ObjectMemory>>objectsAccessibleFromRoots: (in category 'image segment in/out') -----
+ objectsAccessibleFromRoots: arrayOfRoots
+ ^self integerObjectOf: PrimErrUnsupported!
Item was added:
+ ----- Method: SpurMemoryManager>>objectsAccessibleFromRoots: (in category 'image segment in/out') -----
+ objectsAccessibleFromRoots: arrayOfRootsArg
+ "This primitive is called from Squeak as...
+ arrayOfRoots uniquelyAccessibleObjects
+
+ This primitive answers an array of the receiver and every object in its proper tree of subParts (ie, that is not refered to from anywhere else outside the tree).
+
+ The primitive can fail for the following reasons with the specified failure codes:
+ PrimErrNoMemory: additional allocations failed"
+
+ <inline: false>
+ | arrayOfRoots arrayOfObjects |
+ <var: 'segAddr' type: #usqInt>
+
+ self runLeakCheckerFor: GCCheckImageSegment.
+
+ "First scavenge to collect any new space garbage that refers to the graph."
+ self scavengingGC.
+ arrayOfRoots := self updatePostScavenge: arrayOfRootsArg.
+
+ "Now compute the transitive closure, collecting the sequence of objects to be stored in the arrayOfObjects array.
+ Included in arrayOfObjects are the arrayOfRoots and all its contents. All objects have been unmarked."
+ arrayOfObjects := self objectsReachableFromRoots: arrayOfRoots.
+ arrayOfObjects ifNil:
+ [^self integerObjectOf: PrimErrNoMemory].
+ "If objectsReachableFromRoots: answers an integer there is not enough continuous free space in which to allocate the
+ reachable objects. If there is sufficient free space then answer an error code to prompt a compacting GC and a retry."
+ (self isIntegerObject: arrayOfObjects) ifTrue:
+ [totalFreeOldSpace - self allocationUnit >= (self integerValueOf: arrayOfObjects) ifTrue:
+ [^self integerObjectOf: PrimErrNeedCompaction].
+ ^self integerObjectOf: PrimErrNoMemory].
+
+ self assert: self allObjectsUnmarked. "work to be done when the incremental GC is written"
+ self deny: (self forwardersIn: arrayOfObjects).
+
+ ^arrayOfObjects!
Item was changed:
----- Method: StackInterpreter class>>initializePrimitiveTable (in category 'initialization') -----
(excessive size, no diff calculated)