Marcel Taeumel uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-mt.1049.mcz
==================== Summary ====================
Name: Collections-mt.1049
Author: mt
Time: 10 August 2023, 9:58:43.81662 am
UUID: 7a94c086-e179-1148-899a-139ecbc19f5b
Ancestors: Collections-mt.1048
Make #withoutDuplicates available to more kinds of collections. Thanks to Christoph (ct) for the idea. Here is the discussion: http://lists.squeakfoundation.org/archives/list/squeak-dev@lists.squeakfoun…
=============== Diff against Collections-dtl.1047 ===============
Item was added:
+ ----- Method: Bag>>copyWithoutDuplicates (in category 'copying') -----
+ copyWithoutDuplicates
+ "Overwritten for better performance. We already know about the unique items in the receiver."
+
+ ^ self species basicNew
+ setContents: (contents collect: [:count | 1]);
+ yourself!
Item was added:
+ ----- Method: Bitset>>copyWithoutDuplicates (in category 'copying') -----
+ copyWithoutDuplicates
+
+ self shouldNotImplement.!
Item was added:
+ ----- Method: CharacterSet>>copyWithoutDuplicates (in category 'copying') -----
+ copyWithoutDuplicates
+
+ self shouldNotImplement.!
Item was added:
+ ----- Method: Collection>>copyWithoutDuplicates (in category 'copying') -----
+ copyWithoutDuplicates
+ "Answer a copy of the receiver that preserves order, if any, but eliminates any duplicates."
+
+ | seen |
+ seen := Set new: self size.
+ ^ self select: [:each | seen ifAbsentAdd: each]!
Item was added:
+ ----- Method: Collection>>withoutDuplicates (in category 'copying') -----
+ withoutDuplicates
+ "Answer a variant of the receiver that has no duplicate elements. Might be the receiver itself if it already contains no duplicates. See subclass implementations. If you want to modify the result, use #copyWithoutDuplicates to make it explicit."
+
+ ^ self copyWithoutDuplicates!
Item was added:
+ ----- Method: Dictionary>>copyWithoutDuplicateValues (in category 'copying') -----
+ copyWithoutDuplicateValues
+
+ ^ super copyWithoutDuplicates!
Item was added:
+ ----- Method: Dictionary>>copyWithoutDuplicates (in category 'copying') -----
+ copyWithoutDuplicates
+ "Behaves like a set because keys are already unique. Note that if you want to remove duplicate values, use #values first, then #copyWithoutDuplicates. Or see #copyWithoutDuplicateValues."
+
+ ^ self copy!
Item was added:
+ ----- Method: Dictionary>>withoutDuplicateValues (in category 'copying') -----
+ withoutDuplicateValues
+
+ ^ self copyWithoutDuplicateValues!
Item was added:
+ ----- Method: Dictionary>>withoutDuplicates (in category 'copying') -----
+ withoutDuplicates
+ "Behaves like a set because keys are already unique. Note that if you want to remove duplicate values, use #values first, then #withoutDuplicates. Or see #withoutDuplicateValues."
+
+ ^ self!
Item was added:
+ ----- Method: Heap>>copyWithoutDuplicates (in category 'copying') -----
+ copyWithoutDuplicates
+
+ self shouldNotImplement.!
Item was added:
+ ----- Method: Matrix>>copyWithoutDuplicates (in category 'copying') -----
+ copyWithoutDuplicates
+
+ self shouldNotImplement.!
Item was removed:
- ----- Method: SequenceableCollection>>withoutDuplicates (in category 'copying') -----
- withoutDuplicates
- "Answer a copy of the receiver that preserves order but eliminates any duplicates."
- | seen |
- seen := Set new: self size.
- ^self select: [:each| seen ifAbsentAdd: each]!
Item was added:
+ ----- Method: Set>>copyWithoutDuplicates (in category 'copying') -----
+ copyWithoutDuplicates
+ "Overwritten for better performance. We already know about the unique items in the receiver."
+
+ ^ self copy!
Item was added:
+ ----- Method: Set>>withoutDuplicates (in category 'copying') -----
+ withoutDuplicates
+ "Overwritten for better performance. We already know about the unique items in the receiver."
+
+ ^ self!
Marcel Taeumel uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-mt.1518.mcz
==================== Summary ====================
Name: Kernel-mt.1518
Author: mt
Time: 9 August 2023, 3:24:15.725576 pm
UUID: 8260fcb3-5465-1b43-a2bc-4d045c933398
Ancestors: Kernel-mt.1517
Fixes #hasInstVarRef, now that we have compiled blocks embeddded.
=============== Diff against Kernel-mt.1517 ===============
Item was added:
+ ----- Method: CompiledBlock>>hasInstVarRef (in category 'scanning') -----
+ hasInstVarRef
+
+ self flag: #discuss. "mt: Should we move up more of the scanning protocol from CompiledMethod to CompiledCode? See senders of #hasInstVarRef and implementor in Context."
+ ^ self method hasInstVarRef!
Item was changed:
----- Method: CompiledMethod>>hasInstVarRef (in category 'scanning') -----
hasInstVarRef
+ "Answer whether the receiver references an instance variable."
- "Answer whether the method references an instance variable."
+ | printer |
- | scanner end printer |
-
- scanner := InstructionStream on: self.
printer := InstVarRefLocator new.
+ self codeLiteralsDo: [:compiledCode | | scanner end |
+ scanner := InstructionStream on: compiledCode.
+ end := compiledCode endPC.
+ [scanner pc <= end] whileTrue: [
+ (printer interpretNextInstructionUsing: scanner) ifTrue: [^true]]].
+ ^ false!
- end := self endPC.
-
- [scanner pc <= end] whileTrue: [
- (printer interpretNextInstructionUsing: scanner) ifTrue: [^true].
- ].
- ^false!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.2120.mcz
==================== Summary ====================
Name: Morphic-mt.2120
Author: mt
Time: 9 August 2023, 2:03:15.609576 pm
UUID: 431e9bf2-0d4e-2b47-8cba-7d2a4ad2f422
Ancestors: Morphic-mt.2119
Fix for loading older .morph files where borderStyle was not used consistently.
=============== Diff against Morphic-mt.2119 ===============
Item was added:
+ ----- Method: BorderedMorph>>readDataFrom:size: (in category 'objects from disk') -----
+ readDataFrom: aDataStream size: varsOnDisk
+
+ | bc bw |
+ super readDataFrom: aDataStream size: varsOnDisk.
+
+ "Update borderStyle for older versions of the receiver. Use temps because of side-effects."
+ bc := borderColor. bw := borderWidth.
+ self borderColor: bc.
+ self borderWidth: bw.
+
+ self flag: #todo. "mt: If we were to remove those instVars at some point, we need to increase the receivers version and add a proper conversion method via SmartRefStream. Still, this might break compatbility with foreign subclasses that rely on inst-var access."!
tim Rowledge uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-tpr.792.mcz
==================== Summary ====================
Name: Monticello-tpr.792
Author: tpr
Time: 3 August 2023, 3:47:30.293976 pm
UUID: c72a59e2-3e08-4ad1-8565-5f3665bcb7f3
Ancestors: Monticello-tpr.791
The prior change broke .mcm uploading (I didn't notice that the http repo was a subclass) so try fixing things the other way - catch the FileDoesNotExistException and see if things get better by adding '.mcz'. This helps with examining changes between packages but there is still the deeper problem of the package file name getting whacked as part of the MCRepositoryInspector>>#versionListMenu: process.
=============== Diff against Monticello-tpr.791 ===============
Item was changed:
----- Method: MCFileBasedRepository>>versionNamed: (in category 'versions') -----
versionNamed: aMCVersionName
+ "For FileBased repositories, aMCVersionName must have the appropriate extension!! Try to handle that "
+ | version |
- "For FileBased repositories, aMCVersionName must have the appropriate extension!! :-("
- | version fileName |
version := self cache
at: aMCVersionName
ifAbsent:
+ [[self loadVersionFromFileNamed: aMCVersionName ]
- [[fileName := (aMCVersionName endsWith: '.mcz' )
- ifFalse:[aMCVersionName, '.mcz']
- ifTrue:[aMCVersionName].
- self loadVersionFromFileNamed: fileName ]
on: FileDoesNotExistException , NotFound
+ do:
+ [:err|
+ "in some cases we try to load package versions where aMCVersionName does
+ not include the filename extension. Try again with the mcz extension; we
+ might need to be even cleverer?"
+ err return: (self loadVersionFromFileNamed: aMCVersionName, '.mcz')] ].
- do: [ : err | nil ] ].
self resizeCache: cache.
(version notNil and: [ version isCacheable ]) ifTrue:
[ cache
at: aMCVersionName asMCVersionName
put: version ].
^ version!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.2119.mcz
==================== Summary ====================
Name: Morphic-mt.2119
Author: mt
Time: 3 August 2023, 11:30:37.95454 am
UUID: 5d37be07-9bb1-7d4c-8cf2-128b2b28f9e3
Ancestors: Morphic-mt.2118
Complement Morphic-mt.2118
Fixes the recent regression and the other one introduced by the quickfix for the first one.
You can now (again):
- Click below the text lines to change keyboard focus (i.e., in a fresh workspace window)
- Click below the method template (in a code browser/editor) for not discarding the current text selection but immediately start typing.
All these things are not relevant or noticable when you have #mouseOverForKeyboardFocus enabled.
=============== Diff against Morphic-mt.2118 ===============
Item was changed:
----- Method: TextMorph>>mouseDown: (in category 'event handling') -----
mouseDown: evt
"Make this TextMorph be the keyboard input focus, if it isn't
already, and repond to the text selection gesture."
evt yellowButtonPressed ifTrue: [
"First check for option (menu) click"
^ self yellowButtonActivity: evt shiftPressed].
"Show the caret immediately on mouse down to give user feedback."
self resetBlinkCursor.
"If focus does not follow the mouse cursor and we click below everything, just grab the focus to not destroy the selection."
((self hasKeyboardFocus: evt hand) not and: [(self bounds containsPoint: evt position) not])
ifTrue: [
evt hand newKeyboardFocus: self.
+ evt hand newMouseFocus: nil. "Do not deliver mouseUp:."]
- self
- handleInteraction: [self mouseEnter: evt. editor mouseDown: evt]
- fromEvent: evt]
ifFalse: [
evt hand newKeyboardFocus: self.
self
handleInteraction: [self mouseEnter: evt. editor mouseDown: evt]
fromEvent: evt].!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.2118.mcz
==================== Summary ====================
Name: Morphic-mt.2118
Author: mt
Time: 2 August 2023, 8:40:31.255709 pm
UUID: 451a2a63-2994-a74a-8ec5-7204888297c4
Ancestors: Morphic-mt.2117
#mouseOverForKeyboardFocus is not enabled.
Only a quickfix since it introduces another regression. I will fix that tomorrow.
=============== Diff against Morphic-mt.2117 ===============
Item was changed:
----- Method: TextMorph>>mouseDown: (in category 'event handling') -----
mouseDown: evt
"Make this TextMorph be the keyboard input focus, if it isn't
already, and repond to the text selection gesture."
evt yellowButtonPressed ifTrue: [
"First check for option (menu) click"
^ self yellowButtonActivity: evt shiftPressed].
"Show the caret immediately on mouse down to give user feedback."
self resetBlinkCursor.
"If focus does not follow the mouse cursor and we click below everything, just grab the focus to not destroy the selection."
((self hasKeyboardFocus: evt hand) not and: [(self bounds containsPoint: evt position) not])
+ ifTrue: [
+ evt hand newKeyboardFocus: self.
+ self
+ handleInteraction: [self mouseEnter: evt. editor mouseDown: evt]
+ fromEvent: evt]
- ifTrue: [evt hand newKeyboardFocus: self]
ifFalse: [
evt hand newKeyboardFocus: self.
self
handleInteraction: [self mouseEnter: evt. editor mouseDown: evt]
fromEvent: evt].!