Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: e9ce788a443a145d63b91e3fb63e9db69652ee73
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/e9ce788a443a145d63…
Author: David T. Lewis <lewis(a)mail.msen.com>
Date: 2021-09-05 (Sun, 05 Sep 2021)
Changed paths:
M platforms/unix/config/Makefile.install
Log Message:
-----------
Let make uninistall-squeak honor $(scriptname)
If the squeak run script is renamed to e.g. spur64, then uninstall-squeak
should uninstall that script.
Branch: refs/heads/dtl/distinct-VERSION_TAG
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 927ea6efa74d79fef0918e1ee39a12336b8a97c4
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/927ea6efa74d79fef0…
Author: David T. Lewis <lewis(a)mail.msen.com>
Date: 2021-09-05 (Sun, 05 Sep 2021)
Changed paths:
M platforms/Cross/vm/sqSCCSVersion.h
Log Message:
-----------
Use distinct VERSION_TAG based on sizeof(void *) to distinguish 32/64 bit
installation libraries. VERSION_TAG is used for naming the installation
directory, append "-32bit" or -"64bit" to VERSION_TAG to enable 32-bit
and 64-bit VMs to be installed side by side in standard unix directories.
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 62f09c732ca0094d6a774327d701700fb82f4389
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/62f09c732ca0094d6a…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2021-09-05 (Sun, 05 Sep 2021)
Changed paths:
M src/spur32.cog.lowcode/cogit.h
M src/spur32.cog.lowcode/cogitARMv5.c
M src/spur32.cog.lowcode/cogitIA32.c
M src/spur32.cog/cogit.h
M src/spur32.cog/cogitARMv5.c
M src/spur32.cog/cogitIA32.c
M src/spur32.sista/cogit.h
M src/spur32.sista/cogitARMv5.c
M src/spur32.sista/cogitIA32.c
M src/spur64.cog.lowcode/cogit.h
M src/spur64.cog.lowcode/cogitARMv8.c
M src/spur64.cog.lowcode/cogitX64SysV.c
M src/spur64.cog.lowcode/cogitX64WIN64.c
M src/spur64.cog/cogit.h
M src/spur64.cog/cogitARMv8.c
M src/spur64.cog/cogitX64SysV.c
M src/spur64.cog/cogitX64WIN64.c
M src/spur64.sista/cogit.h
M src/spur64.sista/cogitARMv8.c
M src/spur64.sista/cogitX64SysV.c
M src/spur64.sista/cogitX64WIN64.c
M src/v3.cog/cogit.h
M src/v3.cog/cogitARMv5.c
M src/v3.cog/cogitIA32.c
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.3055
...and numRegArgs has to work as a function invocation.
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.3055.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.3055
Author: eem
Time: 5 September 2021, 7:56:54.82501 am
UUID: 76ea7bc2-f1a4-429f-8205-433af9b5143e
Ancestors: VMMaker.oscog-eem.3054
...and numRegArgs has to work as a function invocation.
=============== Diff against VMMaker.oscog-eem.3054 ===============
Item was changed:
----- Method: CogObjectRepresentationForSpur>>numRegArgs (in category 'calling convention') -----
numRegArgs
"Define how many register arguments a StackToRegisterMappingCogit can
and should use with the receiver. The value must be 0, 1 or 2. Note that a
SimpleStackBasedCogit always has 0 register args (although the receiver is
passed in a register). The Spur object representation is simple enough that
implementing at:put: is straight-forward and hence 2 register args are worth
while. The method must be inlined in CoInterpreter, and dead code eliminated
so that the register-popping enilopmarts such as enterRegisterArgCogMethod:-
at:receiver: do not have to be implemented in SimpleStackBasedCogit."
<api>
<option: #StackToRegisterMappingCogit>
+ <cmacro: '() 2'> "to allow inlining optimization across the CoInterpreter/Cogit api..."
- <cmacro: ' 2'> "to allow inlining optimization across the CoInterpreter/Cogit api..."
^2!
Item was changed:
----- Method: CogObjectRepresentationForSqueakV3>>numRegArgs (in category 'calling convention') -----
numRegArgs
"Define how many register arguments a StackToRegisterMappingCogit can
and should use with the receiver. The value must be 0, 1 or 2. Note that a
SimpleStackBasedCogit always has 0 register args (although the receiver is
passed in a register). CogObjectRepresentationForSqueakV3 only implements
at most 1-arg primitives, because the complexity of the object representation
makes it difficult to implement at:put:, the most performance-critical 2-argument
primitive.. The method must be inlined in CoInterpreter, and dead code eliminated
so that the register-popping enilopmarts such as enterRegisterArgCogMethod:-
at:receiver: do not have to be implemented in SimpleStackBasedCogit."
<api>
<option: #StackToRegisterMappingCogit>
+ <cmacro: '() 1'> "to allow inlining optimization across the CoInterpreter/Cogit api..."
- <cmacro: ' 1'> "to allow inlining optimization across the CoInterpreter/Cogit api..."
^1!
Item was changed:
----- Method: SimpleStackBasedCogit>>numRegArgs (in category 'testing') -----
numRegArgs
<api>
+ <cmacro: '() 0'> "to allow inlining optimization across the CoInterpreter/Cogit api..."
- <cmacro: ' 0'> "to allow inlining optimization across the CoInterpreter/Cogit api..."
^0!
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 906b38062e0dab9f4cffe726b86b9e2a71849f7e
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/906b38062e0dab9f4c…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2021-09-05 (Sun, 05 Sep 2021)
Changed paths:
M src/spur32.cog.lowcode/cogit.h
M src/spur32.cog.lowcode/cogitARMv5.c
M src/spur32.cog.lowcode/cogitIA32.c
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/cogit.h
M src/spur32.cog/cogitARMv5.c
M src/spur32.cog/cogitIA32.c
M src/spur32.sista/cogit.h
M src/spur32.sista/cogitARMv5.c
M src/spur32.sista/cogitIA32.c
M src/spur32.sista/cointerp.c
M src/spur32.sista/cointerp.h
M src/spur32.sista/gcc3x-cointerp.c
M src/spur64.cog.lowcode/cogit.h
M src/spur64.cog.lowcode/cogitARMv8.c
M src/spur64.cog.lowcode/cogitX64SysV.c
M src/spur64.cog.lowcode/cogitX64WIN64.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/cogit.h
M src/spur64.cog/cogitARMv8.c
M src/spur64.cog/cogitX64SysV.c
M src/spur64.cog/cogitX64WIN64.c
M src/spur64.sista/cogit.h
M src/spur64.sista/cogitARMv8.c
M src/spur64.sista/cogitX64SysV.c
M src/spur64.sista/cogitX64WIN64.c
M src/spur64.sista/cointerp.c
M src/spur64.sista/cointerp.h
M src/spur64.sista/gcc3x-cointerp.c
M src/v3.cog/cogit.h
M src/v3.cog/cogitARMv5.c
M src/v3.cog/cogitIA32.c
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.3054
Slang: Oops! to support option: #Cog Cogit has to state that it hasCogit.
...and define numRegArgs as a macro to allow inlining optimization across
the CoInterpreter/Cogit api.
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.3054.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.3054
Author: eem
Time: 5 September 2021, 7:45:12.786068 am
UUID: 577cca1d-b013-4a51-b6f3-02489bb1e7ff
Ancestors: VMMaker.oscog-eem.3053
...and define numRegArgs as a macro to allow inlining optimization across the CoInterpreter/Cogit api.
=============== Diff against VMMaker.oscog-eem.3053 ===============
Item was changed:
----- Method: CogObjectRepresentationForSpur>>numRegArgs (in category 'calling convention') -----
numRegArgs
"Define how many register arguments a StackToRegisterMappingCogit can
and should use with the receiver. The value must be 0, 1 or 2. Note that a
SimpleStackBasedCogit always has 0 register args (although the receiver is
passed in a register). The Spur object representation is simple enough that
implementing at:put: is straight-forward and hence 2 register args are worth
while. The method must be inlined in CoInterpreter, and dead code eliminated
so that the register-popping enilopmarts such as enterRegisterArgCogMethod:-
at:receiver: do not have to be implemented in SimpleStackBasedCogit."
<api>
<option: #StackToRegisterMappingCogit>
+ <cmacro: ' 2'> "to allow inlining optimization across the CoInterpreter/Cogit api..."
^2!
Item was changed:
----- Method: CogObjectRepresentationForSqueakV3>>numRegArgs (in category 'calling convention') -----
numRegArgs
"Define how many register arguments a StackToRegisterMappingCogit can
and should use with the receiver. The value must be 0, 1 or 2. Note that a
SimpleStackBasedCogit always has 0 register args (although the receiver is
passed in a register). CogObjectRepresentationForSqueakV3 only implements
at most 1-arg primitives, because the complexity of the object representation
makes it difficult to implement at:put:, the most performance-critical 2-argument
primitive.. The method must be inlined in CoInterpreter, and dead code eliminated
so that the register-popping enilopmarts such as enterRegisterArgCogMethod:-
at:receiver: do not have to be implemented in SimpleStackBasedCogit."
<api>
<option: #StackToRegisterMappingCogit>
+ <cmacro: ' 1'> "to allow inlining optimization across the CoInterpreter/Cogit api..."
^1!
Item was changed:
----- Method: SimpleStackBasedCogit>>numRegArgs (in category 'testing') -----
numRegArgs
<api>
+ <cmacro: ' 0'> "to allow inlining optimization across the CoInterpreter/Cogit api..."
^0!
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.3053.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.3053
Author: eem
Time: 5 September 2021, 7:38:03.675807 am
UUID: c8004c5a-bca9-40f2-9e4f-4453ddb3970b
Ancestors: VMMaker.oscog-eem.3052
Slang: Oops! to support option: #Cog Cogit has to state that it hasCogit.
=============== Diff against VMMaker.oscog-eem.3052 ===============
Item was added:
+ ----- Method: Cogit class>>hasCogit (in category 'accessing class hierarchy') -----
+ hasCogit
+ ^true!
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 1ed9f1497085e9d7f37167f2c9b79b14ad673d43
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/1ed9f1497085e9d7f3…
Author: Eliot Miranda <eliot.miranda(a)gmail.com>
Date: 2021-09-05 (Sun, 05 Sep 2021)
Changed paths:
M src/ckformat.c
M src/plugins/FloatArrayPlugin/FloatArrayPlugin.c
M src/spur32.cog.lowcode/cogit.h
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/cogit.h
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/cogit.h
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/spur32.stack/validImage.c
M src/spur64.cog.lowcode/cogit.h
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/cogit.h
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/cogit.h
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/spur64.stack/validImage.c
M src/v3.cog/cogit.h
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.3052
CoInterpreter:
Run primitiveCopyObject on the Smalltalk stack (for Symbol>>intern:).
Have primitiveSetOrHasIdentityHash support all of
e.g. Symbol primitiveSetIdentityHashOf: aSymbol to: hash
anObject primitiveSetIdentityHash: hashValue isBehavior: boolean
anObject primitiveSetIdentityHashTo: hash
Fix a spelling error PrimNumberUnoadModule => PrimNumberUnloadModule
Don't generate receiverTagBitsForMethod: in non-Cog VMs.
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.3052.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.3052
Author: eem
Time: 5 September 2021, 7:18:04.242112 am
UUID: d3f4107c-e267-4a0d-a8f5-a212ea858ee6
Ancestors: VMMaker.oscog-eem.3051
Slang:
Don't generate receiverTagBitsForMethod: in non-Cog VMs.
Neither SPURVM nor SpurMemoryManager are official option: names; SpurObjectMemory is.
=============== Diff against VMMaker.oscog-eem.3051 ===============
Item was changed:
----- Method: CCodeGenerator>>optionIsFalse:in: (in category 'utilities') -----
optionIsFalse: key in: aClass
"Answer whether a notOption: is false in the context of aClass. The key either a
Cogit class name or a class variable name or a variable name in VMBasicConstants."
+ "If the option is the name of a subclass of Cogit, include it if it doesn't inherit from the Cogit class."
- "If the option is the name of a subclass of Cogit, include it if it dfoesn't inherit from the Cogit class."
(Smalltalk classNamed: key) ifNotNil:
[:optionClass|
+ vmClass hasCogit
+ ifTrue:
+ [aClass cogitClass
+ ifNotNil:
+ [:cogitClass|
+ (optionClass includesBehavior: Cogit) ifTrue:
+ [^(cogitClass includesBehavior: optionClass) not]]]
+ ifFalse:
+ [(optionClass includesBehavior: Cogit) ifTrue:
+ [^true]].
- aClass cogitClass ifNotNil:
- [:cogitClass|
- (optionClass includesBehavior: Cogit) ifTrue:
- [^(cogitClass includesBehavior: optionClass) not]].
aClass objectMemoryClass ifNotNil:
[:objectMemoryClass|
((optionClass includesBehavior: ObjectMemory)
or: [optionClass includesBehavior: SpurMemoryManager]) ifTrue:
[^(objectMemoryClass includesBehavior: optionClass) not]]].
"Lookup options in options, class variables of the defining class, VMBasicConstants, the interpreterClass and the objectMemoryClass"
{aClass initializationOptions.
aClass.
VMBasicConstants.
aClass interpreterClass.
aClass objectMemoryClass} do:
[:scopeOrNil|
scopeOrNil ifNotNil:
[:scope|
(scope bindingOf: key) ifNotNil:
[:binding|
binding value ~~ true ifTrue: [^true]]]].
^false!
Item was changed:
----- Method: CCodeGenerator>>optionIsTrue:in: (in category 'utilities') -----
optionIsTrue: key in: aClass
"Answer whether an option: is true in the context of aClass. The key either a
Cogit class name or a class variable name or a variable name in VMBasicConstants."
"If the option is the name of a subclass of Cogit, include it if it inherits from the Cogit class."
(Smalltalk classNamed: key) ifNotNil:
[:optionClass|
+ vmClass hasCogit
+ ifTrue:
+ [aClass cogitClass
+ ifNotNil:
+ [:cogitClass|
+ (optionClass includesBehavior: Cogit) ifTrue:
+ [^cogitClass includesBehavior: optionClass]]]
+ ifFalse:
+ [(optionClass includesBehavior: Cogit) ifTrue:
+ [^false]].
- aClass cogitClass ifNotNil:
- [:cogitClass|
- (optionClass includesBehavior: Cogit) ifTrue:
- [^cogitClass includesBehavior: optionClass]].
aClass objectMemoryClass ifNotNil:
[:objectMemoryClass|
((optionClass includesBehavior: ObjectMemory)
or: [optionClass includesBehavior: SpurMemoryManager]) ifTrue:
[^objectMemoryClass includesBehavior: optionClass]]].
"Lookup options in options, class variables of the defining class, VMBasicConstants, the interpreterClass and the objectMemoryClass"
{aClass initializationOptions.
aClass.
VMBasicConstants.
aClass interpreterClass.
aClass objectMemoryClass} do:
[:scopeOrNil|
scopeOrNil ifNotNil:
[:scope|
(scope bindingOf: key) ifNotNil:
[:binding|
binding value ~~ false ifTrue: [^true]]]].
^false!
Item was changed:
----- Method: CoInterpreter>>accessorDepthForExternalPrimitiveMethod: (in category 'plugin primitive support') -----
accessorDepthForExternalPrimitiveMethod: methodObj
+ <option: #SpurObjectMemory>
- <option: #SpurMemoryManager>
| flags lit |
self assert: (self isLinkedExternalPrimitive: methodObj).
lit := self literal: 0 ofMethod: methodObj.
flags := objectMemory fetchPointer: ExternalCallLiteralFlagsIndex ofObject: lit.
^(objectMemory integerValueOf: flags) >>> SpurPrimitiveAccessorDepthShift!
Item was changed:
----- Method: FloatArrayPlugin>>primitiveFromFloat64Array (in category 'access primitives') -----
primitiveFromFloat64Array
"Primitive. Set each element of the receiver, a FloatArray with that of the argument, a Float64Array and return the receiver.
Note that this conversion might loose bits, or generate overflow.
Fail if both have different size"
+ <option: #SpurObjectMemory>
<export: true flags: #(FastCPrimitiveFlag FastCPrimitiveAlignForFloatsFlag)>
| rcvr arg rcvrPtr argPtr length |
- <option: #SPURVM>
<var: #rcvrPtr type: #'float *'>
<var: #argPtr type: #'double *'>
arg := interpreterProxy stackValue: 0.
rcvr := interpreterProxy stackValue: 1.
((interpreterProxy isLong64s: arg)
and: [(interpreterProxy isWords: rcvr)
and: [(length := interpreterProxy stSizeOf: arg) = (interpreterProxy stSizeOf: rcvr)]]) ifFalse:
[^interpreterProxy primitiveFail].
rcvrPtr := self cCoerce: (interpreterProxy firstIndexableField: rcvr) to: #'float *'.
argPtr := self cCoerce: (interpreterProxy firstIndexableField: arg) to: #'double *'.
0 to: length-1 do:[:i|
rcvrPtr at: i put: (self cCoerce: (argPtr at: i) to: #float)].
^interpreterProxy methodReturnReceiver!
Item was changed:
----- Method: SpurMemoryManager>>receiverTagBitsForMethod: (in category 'cog jit support') -----
receiverTagBitsForMethod: aMethodObj
"Answer the tag bits for the receiver based on the method's methodClass, if any.
These bits are extended with a bit that says that the method may have a Context receiver, i.e.
mclass is Context or its superclasses. The absence of this bit is used to avoid expensive store checks, etc."
<api>
+ <option: #Cogit>
| methodClassOrNil classContextOrSuperclass |
methodClassOrNil := coInterpreter methodClassOf: aMethodObj.
methodClassOrNil = nilObj ifTrue: "If we don't know the methodClass be pessimal"
[^self maybeContextMClassTagBits].
NewspeakVM "Mixins don't necessarily have a format inst var; filter out non-integer format."
ifTrue:
[| instSpec |
((self isIntegerObject: (instSpec := self fetchPointer: InstanceSpecificationIndex ofObject: methodClassOrNil))
and: [(self instSpecOfClassFormat: (self integerValueOf: instSpec)) = self forwardedFormat]) ifTrue:
[^self receiverTagBitsForImmediateMethodClass: methodClassOrNil]]
ifFalse:
[(self instSpecOfClass: methodClassOrNil) = self forwardedFormat ifTrue:
[^self receiverTagBitsForImmediateMethodClass: methodClassOrNil]].
"Now check if mclass is one of Context's superclasses..."
classContextOrSuperclass := self knownClassAtIndex: ClassMethodContextCompactIndex.
[classContextOrSuperclass = methodClassOrNil ifTrue:
[^self maybeContextMClassTagBits].
classContextOrSuperclass := self fetchPointer: SuperclassIndex ofObject: classContextOrSuperclass.
classContextOrSuperclass ~= nilObj]
whileTrue.
^0!