Marcel Taeumel uploaded a new version of 60Deprecated to project The Trunk:
http://source.squeak.org/trunk/60Deprecated-mt.70.mcz
==================== Summary ====================
Name: 60Deprecated-mt.70
Author: mt
Time: 4 March 2020, 4:53:57.861827 pm
UUID: eadbea5d-9471-244c-9223-1dcaea4b1fdf
Ancestors: 60Deprecated-mt.69
Complements System-mt.1141 and Kernel-mt.1309.
=============== Diff against 60Deprecated-mt.69 ===============
Item was added:
+ ----- Method: Behavior>>forgetDoIts (in category '*60Deprecated-initialize-release') -----
+ forgetDoIts
+ "See http://forum.world.st/About-forgetDoIts-td3607521.html."
+
+ self deprecated: 'do-it methods are not installed in method dictionaries anymore. See ImageSegment >> #forgetDoItsInClass:'.!
Marcel Taeumel uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-mt.1309.mcz
==================== Summary ====================
Name: Kernel-mt.1309
Author: mt
Time: 4 March 2020, 4:53:15.881827 pm
UUID: 826aeb8c-d701-434d-8c29-9a276b190c0f
Ancestors: Kernel-nice.1308
Deprecate #forgetDoIts.
=============== Diff against Kernel-nice.1308 ===============
Item was removed:
- ----- Method: Behavior>>forgetDoIts (in category 'initialize-release') -----
- forgetDoIts
- "get rid of old DoIt methods"
- self
- basicRemoveSelector: #DoIt;
- basicRemoveSelector: #DoItIn:!
Item was removed:
- ----- Method: ClassDescription>>forgetDoIts (in category 'initialize-release') -----
- forgetDoIts
- "get rid of old DoIt methods and bogus entries in the ClassOrganizer."
- SystemChangeNotifier uniqueInstance doSilently: [
- self organization
- removeElement: #DoIt;
- removeElement: #DoItIn:.
- ].
- super forgetDoIts.!
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1141.mcz
==================== Summary ====================
Name: System-mt.1141
Author: mt
Time: 4 March 2020, 4:52:35.632827 pm
UUID: b85e0b36-6160-4947-b6ab-bfa1fd8223d1
Ancestors: System-mt.1140
To deprecate Behavior >> #forgetDoIts, copy the originial clean-up code to ImageSegment to deal for old segments later on. Maybe we can remove it even here.
=============== Diff against System-mt.1140 ===============
Item was changed:
----- Method: ImageSegment>>comeFullyUpOnReload: (in category 'fileIn') -----
comeFullyUpOnReload: smartRefStream
"fix up the objects in the segment that changed size. An object in the segment is the wrong size for the modern version of the class. Construct a fake class that is the old size. Replace the modern class with the old one in outPointers. Load the segment. Traverse the instances, making new instances by copying fields, and running conversion messages. Keep the new instances. Bulk forward become the old to the new. Let go of the fake objects and classes.
After the install (below), arrayOfRoots is filled in. Globalize new classes. Caller may want to do some special install on certain objects in arrayOfRoots.
May want to write the segment out to disk in its new form."
| mapFakeClassesToReal receiverClasses rootsToUnhiberhate myProject existing forgetDoItsClass endianness |
forgetDoItsClass := Set new.
RecentlyRenamedClasses := nil. "in case old data hanging around"
mapFakeClassesToReal := smartRefStream reshapedClassesIn: outPointers.
"Dictionary of just the ones that change shape. Substitute them in outPointers."
self fixCapitalizationOfSymbols.
endianness := self endianness.
segment := self loadSegmentFrom: segment outPointers: outPointers.
arrayOfRoots := segment first.
mapFakeClassesToReal isEmpty ifFalse: [
self reshapeClasses: mapFakeClassesToReal refStream: smartRefStream
].
"When a Project is stored, arrayOfRoots has all objects in the project, except those in outPointers"
arrayOfRoots do: [:importedObject |
((importedObject isMemberOf: WideString) or: [importedObject isMemberOf: WideSymbol]) ifTrue: [
importedObject mutateJISX0208StringToUnicode.
importedObject class = WideSymbol ifTrue: [
"self halt."
Symbol hasInterned: importedObject asString ifTrue: [:multiSymbol |
multiSymbol == importedObject ifFalse: [
importedObject becomeForward: multiSymbol.
].
].
].
].
(importedObject isMemberOf: TTCFontSet) ifTrue: [
existing := TTCFontSet familyName: importedObject familyName
pointSize: importedObject pointSize. "supplies default"
existing == importedObject ifFalse: [importedObject becomeForward: existing].
].
].
receiverClasses := self restoreEndianness: endianness ~~ Smalltalk endianness. "rehash sets"
smartRefStream checkFatalReshape: receiverClasses.
"Classes in this segment."
arrayOfRoots do: [:importedObject |
importedObject class class == Metaclass ifTrue: [forgetDoItsClass add: importedObject. self declare: importedObject]].
rootsToUnhiberhate := OrderedCollection new.
arrayOfRoots do: [:importedObject |
((importedObject isMemberOf: ScriptEditorMorph)
or: [(importedObject isKindOf: TileMorph)
or: [(importedObject isMemberOf: ScriptingTileHolder)
or: [importedObject isKindOf: CompoundTileMorph]]]) ifTrue: [
rootsToUnhiberhate add: importedObject
].
(importedObject isMemberOf: Project) ifTrue: [
myProject := importedObject.
importedObject ensureChangeSetNameUnique.
Project addingProject: importedObject.
importedObject restoreReferences.
self dependentsRestore: importedObject.
ScriptEditorMorph writingUniversalTiles:
((importedObject projectPreferenceAt: #universalTiles) ifNil: [false])]].
myProject ifNotNil: [
myProject world setProperty: #thingsToUnhibernate toValue: rootsToUnhiberhate asArray.
].
mapFakeClassesToReal isEmpty ifFalse: [
mapFakeClassesToReal keysAndValuesDo: [:aFake :aReal |
aFake removeFromSystemUnlogged.
aFake becomeForward: aReal].
SystemOrganization removeEmptyCategories].
+ forgetDoItsClass do: [:c | self forgetDoItsInClass: c].
- forgetDoItsClass do: [:c | c forgetDoIts].
"^ self"
!
Item was added:
+ ----- Method: ImageSegment>>forgetDoItsInClass: (in category 'private') -----
+ forgetDoItsInClass: aClass
+ "get rid of old DoIt methods and bogus entries in the ClassOrganizer."
+
+ SystemChangeNotifier uniqueInstance doSilently: [
+ aClass organization
+ removeElement: #DoIt;
+ removeElement: #DoItIn:.
+ ].
+
+ aClass
+ basicRemoveSelector: #DoIt;
+ basicRemoveSelector: #DoItIn:!
Marcel Taeumel uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-mt.878.mcz
==================== Summary ====================
Name: Collections-mt.878
Author: mt
Time: 4 March 2020, 4:41:15.113366 pm
UUID: d29cf56c-33dd-6a43-a537-76c689e2ea95
Ancestors: Collections-ul.877
Make the collection protocol in Stream more explicit. Fix a typo.
=============== Diff against Collections-ul.877 ===============
Item was changed:
----- Method: Collection>>any:as: (in category 'accessing') -----
any: numberOfElements as: aClass
+ "Enumerate this collection and return the specified number of elements. Signals an error if this collection has not enough elements."
- "Enumerate this colleciton and return the specified number of elements. Signals an error if this collection has not enough elements."
| index result |
index := 0.
result := aClass new: numberOfElements.
result fillFrom: self with: [:each |
(index := index + 1) > numberOfElements
ifTrue: [^ result]
ifFalse: [each]].
index = numberOfElements
ifFalse: [self error: 'Not enough elements in this collection.'].
^ result!
Item was changed:
----- Method: Collection>>take: (in category 'accessing') -----
take: maxNumberOfElements
+ "Returns maxNumberOfElements as a new collection (using my #species) or less if the collection is not large enough."
- "Returns maxNumberOfElements as a new collection or less if the collection is not large enough."
^ self any: (maxNumberOfElements min: self size)!
Item was changed:
+ ----- Method: Stream>>any: (in category 'collections - accessing') -----
- ----- Method: Stream>>any: (in category 'accessing') -----
any: numberOfElements
"See Collection protocol."
^ self next: numberOfElements!
Item was changed:
+ ----- Method: Stream>>collect: (in category 'collections - enumerating') -----
- ----- Method: Stream>>collect: (in category 'enumerating') -----
collect: block
^ Generator on: [:g |
[self atEnd] whileFalse: [
g yield: (self next ifNotNil: [:object | block value: object])]]!
Item was changed:
+ ----- Method: Stream>>do: (in category 'collections - enumerating') -----
- ----- Method: Stream>>do: (in category 'enumerating') -----
do: aBlock
"Evaluate aBlock for each of the objects accessible by receiver."
[self atEnd]
whileFalse: [aBlock value: self next]!
Item was changed:
+ ----- Method: Stream>>gather: (in category 'collections - enumerating') -----
- ----- Method: Stream>>gather: (in category 'enumerating') -----
gather: block
^ Generator on: [:g |
[self atEnd] whileFalse: [
self next
ifNil: [g yield: nil]
ifNotNil: [:object |
(block value: object) do: [:ea |
g yield: ea]]]]!
Item was changed:
+ ----- Method: Stream>>reject: (in category 'collections - enumerating') -----
- ----- Method: Stream>>reject: (in category 'enumerating') -----
reject: aBlock
^ self select: [:element | (aBlock value: element) == false]!
Item was changed:
+ ----- Method: Stream>>select: (in category 'collections - enumerating') -----
- ----- Method: Stream>>select: (in category 'enumerating') -----
select: block
^ Generator on: [:g |
[self atEnd] whileFalse: [
self next
ifNil: [g yield: nil]
ifNotNil: [:object |
(block value: object)
ifTrue: [g yield: object]]]]!
Item was changed:
+ ----- Method: Stream>>select:thenCollect: (in category 'collections - enumerating') -----
- ----- Method: Stream>>select:thenCollect: (in category 'enumerating') -----
select: block thenCollect: anotherBlock
^ (self select: block) collect: anotherBlock!
Item was changed:
+ ----- Method: Stream>>take: (in category 'collections - accessing') -----
- ----- Method: Stream>>take: (in category 'accessing') -----
take: maxNumberOfElements
"See Collection protocol."
^ self any: maxNumberOfElements!
Marcel Taeumel uploaded a new version of 60Deprecated to project The Trunk:
http://source.squeak.org/trunk/60Deprecated-mt.69.mcz
==================== Summary ====================
Name: 60Deprecated-mt.69
Author: mt
Time: 4 March 2020, 10:48:54.282115 am
UUID: cf3920f2-ed03-694f-9203-a59663a6f926
Ancestors: 60Deprecated-topa.68
Adds fallback for deprecated use of WindowColorSpec such as in Etoys.
=============== Diff against 60Deprecated-topa.68 ===============
Item was added:
+ ----- Method: Object class>>windowColorSpecification (in category '*60Deprecated-window color') -----
+ windowColorSpecification
+ "Answer a WindowColorSpec object that declares my preference.
+ This is a backstop for classes that don't otherwise define a preference."
+
+ self deprecated: 'Use UserInterfaceTheme instead.'.
+ ^ WindowColorSpec classSymbol: self name
+ wording: 'Default' translatedNoop brightColor: #white
+ pastelColor: #white
+ helpMessage: 'Other windows without color preferences.' translatedNoop!
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1140.mcz
==================== Summary ====================
Name: System-mt.1140
Author: mt
Time: 4 March 2020, 10:44:12.509115 am
UUID: a9e21172-de3e-c14d-9622-08d3eb015e50
Ancestors: System-nice.1139
Removes some refs to deprecated classes.
=============== Diff against System-nice.1139 ===============
Item was changed:
----- Method: NativeImageSegment>>rootsIncludingBlocks (in category 'read/write segment') -----
rootsIncludingBlocks
"For export segments only. Return a new roots array with more objects. (Caller should store into rootArray.) Collect Blocks and external methods pointed to by them. Put them into the roots list. Then ask for the segment again."
| extras have |
userRootCnt ifNil: [userRootCnt := arrayOfRoots size].
extras := OrderedCollection new.
outPointers do: [:anOut |
anOut class == CompiledMethod ifTrue: [extras add: anOut].
(anOut isBlock) ifTrue: [extras add: anOut].
+ (anOut class == Context) ifTrue: [extras add: anOut]].
- (anOut class == MethodContext) ifTrue: [extras add: anOut]].
[have := extras size.
extras copy do: [:anOut |
anOut isBlock ifTrue: [
anOut home ifNotNil: [
(extras includes: anOut home) ifFalse: [extras add: anOut home]]].
+ (anOut class == Context) ifTrue: [
- (anOut class == MethodContext) ifTrue: [
anOut method ifNotNil: [
(extras includes: anOut method) ifFalse: [extras add: anOut method]]]].
have = extras size] whileFalse.
extras := extras select: [:ea | (arrayOfRoots includes: ea) not].
extras isEmpty ifTrue: [^ nil]. "no change"
^ arrayOfRoots, extras!
Item was changed:
----- Method: NativeImageSegment>>storeDataOn: (in category 'fileIn/Out') -----
storeDataOn: aDataStream
"Don't wrote the array of Roots. Also remember the structures of the classes of objects inside the segment."
| tempRoots tempOutP list |
state = #activeCopy ifFalse: [self error: 'wrong state'].
"real state is activeCopy, but we changed it will be right when coming in"
tempRoots := arrayOfRoots.
tempOutP := outPointers.
outPointers := outPointers shallowCopy.
self prepareToBeSaved.
arrayOfRoots := nil.
state := #imported.
super storeDataOn: aDataStream. "record my inst vars"
arrayOfRoots := tempRoots.
outPointers := tempOutP.
state := #activeCopy.
aDataStream references at: #AnImageSegment put: false. "the false is meaningless"
"This key in refs is the flag that there is an ImageSegment in this file."
"Find the receivers of blocks in the segment. Need to get the structure of their classes into structures. Put the receivers into references."
(aDataStream byteStream isKindOf: DummyStream) ifTrue: [
list := Set new.
arrayOfRoots do: [:ea |
+ ea isBlock | (ea class == Context) ifTrue: [
- ea isBlock | (ea class == MethodContext) ifTrue: [
list add: ea receiver class ]].
aDataStream references at: #BlockReceiverClasses put: list].!
Marcel Taeumel uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-mt.382.mcz
==================== Summary ====================
Name: EToys-mt.382
Author: mt
Time: 4 March 2020, 10:43:11.878115 am
UUID: fc8c9785-05f6-864f-bc77-e36d0e467b76
Ancestors: EToys-mt.381
Removes some refs to deprecated classes.
=============== Diff against EToys-mt.381 ===============
Item was removed:
- ----- Method: Object class>>windowColorSpecification (in category '*Etoys-Squeakland-window color') -----
- windowColorSpecification
- "Answer a WindowColorSpec object that declares my preference.
- This is a backstop for classes that don't otherwise define a preference."
-
- ^ WindowColorSpec classSymbol: self name
- wording: 'Default' translatedNoop brightColor: #white
- pastelColor: #white
- helpMessage: 'Other windows without color preferences.' translatedNoop!
Item was removed:
- ----- Method: PreferencesPanel class>>windowColorSpecification (in category 'window color') -----
- windowColorSpecification
- "Answer a WindowColorSpec object that declares my preference"
-
- ^ WindowColorSpec classSymbol: self name wording: 'Preferences Panel' translatedNoop brightColor: #(0.645 1.0 1.0) pastelColor: #(0.886 1.0 1.0) helpMessage: 'A tool for expressing personal preferences for numerous options.' translatedNoop!
Item was changed:
----- Method: ScriptParser>>parse:class:noPattern:context:notifying:ifFail: (in category 'as yet unclassified') -----
parse: sourceStream class: class noPattern: noPattern context: ctxt notifying: req ifFail: aBlock
"Answer a MethodNode for the argument, sourceStream, that is the root of
a parse tree. Parsing is done with respect to the argument, class, to find
instance, class, and pool variables; and with respect to the argument,
ctxt, to find temporary variables. Errors in parsing are reported to the
argument, req, if not nil; otherwise aBlock is evaluated. The argument
noPattern is a Boolean that is true if the the sourceStream does not
contain a method header (i.e., for DoIts)."
"Copied from superclass, use ScriptEncoder and give it a referenceWorld. This assumes worldLoading has been set to the right world this player belongs to. --bf 5/4/2010"
| methNode repeatNeeded myStream parser s p |
(req notNil and: [RequestAlternateSyntaxSetting signal and: [(sourceStream isKindOf: FileStream) not]])
ifTrue: [parser := self as: DialectParser]
ifFalse: [parser := self].
myStream := sourceStream.
[repeatNeeded := false.
p := myStream position.
s := myStream upToEnd.
myStream position: p.
parser init: myStream notifying: req failBlock: [^ aBlock value].
doitFlag := noPattern.
failBlock := aBlock.
[methNode := parser method: noPattern context: ctxt
encoder: (ScriptEncoder new init: class context: ctxt notifying: parser;
referenceObject: ActiveWorld referenceWorld )]
on: ParserRemovedUnusedTemps
do:
+ [ :ex | repeatNeeded := (requestor isKindOf: TextEditor) not.
- [ :ex | repeatNeeded := (requestor isKindOf: TextMorphEditor) not.
myStream := ReadStream on: requestor text string.
ex resume].
repeatNeeded] whileTrue.
encoder := failBlock := requestor := parseNode := nil. "break cycles & mitigate refct overflow"
methNode sourceText: s.
^ methNode!
Item was changed:
----- Method: ScriptParser>>parse:class:noPattern:context:notifying:ifFail:for: (in category 'as yet unclassified') -----
parse: sourceStream class: class noPattern: noPattern context: ctxt notifying: req ifFail: aBlock for: anInstance
| methNode repeatNeeded myStream parser s p |
(req notNil and: [RequestAlternateSyntaxSetting signal and: [(sourceStream isKindOf: FileStream) not]])
ifTrue: [parser := self as: DialectParser]
ifFalse: [parser := self].
myStream := sourceStream.
[repeatNeeded := false.
p := myStream position.
s := myStream upToEnd.
myStream position: p.
parser init: myStream notifying: req failBlock: [^ aBlock value].
doitFlag := noPattern.
failBlock := aBlock.
[methNode := parser method: noPattern context: ctxt
encoder: (ScriptEncoder new init: class context: ctxt notifying: parser; referenceObject: (anInstance costume ifNotNil: [anInstance costume referenceWorld] ifNil: [ActiveWorld]))]
on: ParserRemovedUnusedTemps
do:
+ [ :ex | repeatNeeded := (requestor isKindOf: TextEditor) not.
- [ :ex | repeatNeeded := (requestor isKindOf: TextMorphEditor) not.
myStream := ReadStream on: requestor text string.
ex resume].
repeatNeeded] whileTrue.
encoder := failBlock := requestor := parseNode := nil. "break cycles & mitigate refct overflow"
methNode sourceText: s.
^ methNode!
Item was removed:
- ----- Method: StringHolder class>>windowColorSpecification (in category '*Etoys-Squeakland-window color') -----
- windowColorSpecification
- "Answer a WindowColorSpec object that declares my preference"
-
- ^ WindowColorSpec classSymbol: self name wording: 'Workspace' translatedNoop brightColor: #lightYellow pastelColor: #paleYellow helpMessage: 'A place for text in a window.' translatedNoop!
Item was removed:
- ----- Method: TranscriptStream class>>windowColorSpecification (in category '*Etoys-Squeakland-window color') -----
- windowColorSpecification
- "Answer a WindowColorSpec object that declares my preference"
-
- ^ WindowColorSpec classSymbol: self name wording: 'Transcript' translatedNoop brightColor: #lightOrange pastelColor: #paleOrange helpMessage: 'The system transcript' translatedNoop!