Marcel Taeumel uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-mt.1353.mcz==================== Summary ====================
Name: Kernel-mt.1353
Author: mt
Time: 15 October 2020, 2:29:01.197368 pm
UUID: e4947d59-b541-7441-9662-67bb4052fbdb
Ancestors: Kernel-mt.1352
Complements System-mt.1180. See
http://forum.world.st/Proposal-Resetting-pragma-preferences-via-nil-or-reset-message-td5123490.html=============== Diff against Kernel-mt.1352 ===============
Item was changed:
----- Method: CompiledCode class>>preferredBytecodeSetEncoderClass: (in category 'preferences') -----
preferredBytecodeSetEncoderClass: aBytecodeEncoderSubclass
"Set the class that determines the bytecode set used to compile methods with.
[| nPrimary nSecondary |
nPrimary := nSecondary := 0.
self allSubInstancesDo:
[:cm|
cm header >= 0
ifTrue: [nPrimary := nPrimary + 1]
ifFalse: [nSecondary := nSecondary + 1]].
{nPrimary. nSecondary}]"
| nPrimary nSecondary |
+ aBytecodeEncoderSubclass ifNil: [ "Use default value."
+ PreferredBytecodeSetEncoderClass := nil.
+ ^ self preferredBytecodeSetEncoderClass: self preferredBytecodeSetEncoderClass].
self assert: (aBytecodeEncoderSubclass includesBehavior: BytecodeEncoder).
(aBytecodeEncoderSubclass == PrimaryBytecodeSetEncoderClass
or: [aBytecodeEncoderSubclass == SecondaryBytecodeSetEncoderClass]) ifTrue:
[PreferredBytecodeSetEncoderClass := aBytecodeEncoderSubclass.
^self].
nPrimary := nSecondary := 0.
self allSubInstancesDo:
[:cm|
cm header >= 0
ifTrue: [nPrimary := nPrimary + 1]
ifFalse: [nSecondary := nSecondary + 1]].
nPrimary = 0 ifTrue:
[self installPrimaryBytecodeSet: aBytecodeEncoderSubclass.
^self preferredBytecodeSetEncoderClass: aBytecodeEncoderSubclass].
nSecondary = 0 ifTrue:
[self installSecondaryBytecodeSet: aBytecodeEncoderSubclass.
^self preferredBytecodeSetEncoderClass: aBytecodeEncoderSubclass].
self error: 'Cannot set preferred bytecode set. Both of the current sets appear to be in use.'!