Eliot Miranda uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-eem.483.mcz
==================== Summary ====================
Name: Compiler-eem.483
Author: eem
Time: 29 November 2022, 1:46:01.772575 pm
UUID: 08cfac57-1240-4bff-bfc9-4af67efb8a5f
Ancestors: Compiler-eem.482
Oops! The SistaV1 encoder has been including unnecessarily in the literal frame literals that are encoded in bytecodes (integers and characters in the -32k/32k, 0/64k range). Fix this and recompile.
=============== Diff against Compiler-eem.482 ===============
Item was changed:
----- Method: LiteralNode>>sizeCodeForValue: (in category 'code generation') -----
sizeCodeForValue: encoder
- self reserve: encoder.
^(encoder isSpecialLiteralForPush: key)
ifTrue: [encoder sizePushSpecialLiteral: key]
+ ifFalse:
+ [self reserve: encoder.
+ encoder sizePushLiteral: index]!
- ifFalse: [encoder sizePushLiteral: index]!
Item was changed:
(PackageInfo named: 'Compiler') postscript: '"below, add code to be run after the loading of this package"
+ "recompile any and all SistaV1 compiled methods that refer to special literals. These literals were mistakenly included in the literal frame. saves about 200k bytes in a normal 64-bit Squeak image"
+ | e nm |
+ e := EncoderForSistaV1 new.
+ nm := 0.
+ ''Recompiling''
+ displayProgressFrom: 1
+ to: CompiledMethod instanceCount
+ during:
+ [:bar|
+ self systemNavigation allSelect:
+ [:m| | r |
+ bar value: (nm := nm + 1).
+ m encoderClass == EncoderForSistaV1 ifTrue:
+ [
+ r := false.
+ m codeLiteralsDo:
+ [:cl|
+ cl literalsDo: [:l| (e isSpecialLiteralForPush: l) ifTrue: [r := true]]].
+ r ifTrue:
+ [nm := nm + 1.
+ m methodClass recompile: m selector]].
+ false]]'!
- "Recompile senders of caseOf:"
- self systemNavigation allSelectorsAndMethodsDo: [ :behavior :selector :method |
- (method hasLiteral: #caseOf:)
- ifTrue: [behavior recompile: selector]].
-
- "Treat non-breaking space (16ra0) as delimiter in parser/scanner (Compiler-ct.473)."
- Scanner initialize.'!
Christoph Thiede uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ct.1375.mcz
==================== Summary ====================
Name: System-ct.1375
Author: ct
Time: 26 November 2022, 3:32:09.169627 pm
UUID: 48f83c02-9051-4c40-b43e-f5aade1bb7ab
Ancestors: System-dtl.1374, System-ct.1374
Merges System-ct.1374:
Fixes formatting of greeting message when entering author initials.
=============== Diff against System-dtl.1374 ===============
Item was changed:
----- Method: Utilities class>>setAuthorInitials (in category 'identification') -----
setAuthorInitials
"Put up a dialog allowing the user to specify the author's initials. Inform the user about collisions with known contributors. See SystemNavigation class >> #authors. "
| newInitials newName |
newInitials := Project uiManager
request: 'Please type your initials:' translated
initialAnswer: AuthorInitials.
newInitials ifEmpty: [^ self "No Change"].
(SystemNavigation authorsInverted at: newInitials ifPresent: [:existingNames |
newName := existingNames sorted joinSeparatedBy: '/'.
+ (self confirm: ('Hello, <b>{1}!!</b> :-)<br><br>Our <a href="code://{3}">list of known contributors</{4}> associates the initials you have entered with this name. If this is not you, please consider alternative initials, preferably more than just a few characters, to avoid collisions.<br><br>Do you want to use these author initials?<br><br> <b>{2}</b>' translated format: {
- (self confirm: ('Hello, <b>{1}</b>!! :-)<br><br>Our <a href="code://{3}">list of known contributors</{4}> associates the initials you have entered with this name. If this is not you, please consider alternative initials, preferably more than just a few characters, to avoid collisions.<br><br>Do you want to use these author initials?<br><br> <b>{2}</b>' translated format: {
newName ifNil: [newInitials].
newInitials.
'SystemReporter open model categoryAt: 1 put: true'.
"mt: Avoid triggering the Windows Defender. See http://lists.squeakfoundation.org/pipermail/squeak-dev/2021-December/217346…"
'a' }) asTextFromHtml) ] ifAbsent: [true])
ifTrue: [self authorInitials: newInitials].!
Christoph Thiede uploaded a new version of Installer-Core to project The Trunk:
http://source.squeak.org/trunk/Installer-Core-ct.453.mcz
==================== Summary ====================
Name: Installer-Core-ct.453
Author: ct
Time: 19 November 2022, 12:05:57.795955 am
UUID: d2a0cc9f-69ed-a149-b661-62b19024829a
Ancestors: Installer-Core-ct.452
Proposal: Stores API selectors for Metacello in MetacelloStub to avoid UnknownSelector warnings upon initial Metacello usage.
E.g., if you evaluate any installation script from the web in a vanilla Squeak image that uses Metacello's #githubUser:project:path: selector, the image will no longer complain about an unknown selector, which sometimes causes confusion in beginners and experts. :-)
=============== Diff against Installer-Core-ct.452 ===============
Item was added:
+ ----- Method: MetacelloStub class>>apiSelectors (in category 'support') -----
+ apiSelectors
+ "To avoid UnknownSelector warnings upon initial Metacello usage. Support only. By adding this method, these selectors will already be contained in the symbol table before Metacello is installed."
+
+ "(Metacello selectors , Metacello class selectors) withoutDuplicates sorted"
+ ^ #(#addStatement:args: #baseline: #bitbucketUser:project:commitish:path: #blueplane: #cacheRepository: #className: #classic #configuration: #croquet: #execute:args: #executorSpec #executorSpec: #fetch #fetch: #filetreeDirectory: #gemsource: #get #githubUser:project:commitish:path: #githubUser:project:path: #ignoreImage #image #impara: #list #load #load: #lock #locked #onConflict: #onConflictUseIncoming #onConflictUseIncoming:useLoaded: #onConflictUseLoaded #onDowngrade: #onDowngradeUseIncoming #onDowngradeUseIncoming: #onLock: #onLockBreak #onLockBreak: #onUpgrade: #onUpgradeUseLoaded #onUpgradeUseLoaded: #onWarning: #onWarningLog #password: #project: #record #record: #register #registrations #registry #renggli: #repository: #repositoryOverrides: #saltypickle: #scriptExecutor #scriptExecutorClass #scriptExecutorClass: #silently #smalltalkhubUser:project: #squeakfoundation: #squeaksource3: #squeaksource: #ss3: #statements #statements: #swa: #swasource: #unlock #unregister #usernam
e: #version: #wiresong:) !
Christoph Thiede uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ct.2056.mcz
==================== Summary ====================
Name: Morphic-ct.2056
Author: ct
Time: 25 November 2022, 9:50:29.694279 pm
UUID: 530972e6-066d-574c-9b6e-fabcddee4403
Ancestors: Morphic-ct.2055
refactor: Uses existing magic number selectors for MouseButtonEvent>>*buttonChanged.
=============== Diff against Morphic-ct.2055 ===============
Item was changed:
----- Method: MouseButtonEvent>>blueButtonChanged (in category 'accessing') -----
blueButtonChanged
"Answer true if the blue mouse button has changed. This is the third mouse button or cmd+click on the Mac."
+ ^ whichButton anyMask: self class blueButton!
- ^ whichButton anyMask: 1!
Item was changed:
----- Method: MouseButtonEvent>>redButtonChanged (in category 'accessing') -----
redButtonChanged
"Answer true if the red mouse button has changed. This is the first mouse button."
+ ^ whichButton anyMask: self class redButton!
- ^ whichButton anyMask: 4!
Item was changed:
----- Method: MouseButtonEvent>>yellowButtonChanged (in category 'accessing') -----
yellowButtonChanged
"Answer true if the yellow mouse button has changed. This is the second mouse button or option+click on the Mac."
+ ^ whichButton anyMask: self class yellowButton!
- ^ whichButton anyMask: 2!
Christoph Thiede uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-ct.322.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-ct.322
Author: ct
Time: 25 November 2022, 9:03:03.384883 pm
UUID: d913a7d8-7ecc-684a-aac5-c3c3e4d98b9c
Ancestors: ToolBuilder-Morphic-ct.320
Fixes small regression in directory chooser: After typing an invalid path and selecting a valid tree item, the accept button must be enabled again.
=============== Diff against ToolBuilder-Morphic-ct.320 ===============
Item was added:
+ ----- Method: DirectoryChooserDialog>>setDirectoryTo: (in category 'directory tree') -----
+ setDirectoryTo: dir
+
+ super setDirectoryTo: dir.
+
+ self changed: #canAccept.!
David T. Lewis uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-dtl.1374.mcz
==================== Summary ====================
Name: System-dtl.1374
Author: dtl
Time: 25 November 2022, 2:00:24.392665 pm
UUID: f4b3b5ed-db5c-445a-be6b-3f29ea6552e3
Ancestors: System-dtl.1373
Support use of ChangeLogStream for changes log maintained within the image.
=============== Diff against System-dtl.1373 ===============
Item was changed:
----- Method: SmalltalkImage>>openSourcesAndChanges:forImage: (in category 'image, changes names') -----
openSourcesAndChanges: changesName forImage: imageName
"Open the changes and sources files and install them in SourceFiles. Inform the user of problems regarding write permissions or CR/CRLF mixups."
"Note: SourcesName and imageName are full paths; changesName is a
local name."
| sources changes msg wmsg |
msg := 'Squeak cannot locate {1}.
Please check that the file is named properly and is in the same directory as this image.'.
wmsg := 'Squeak cannot write to {1}.
Please check that you have write permission for this file.
You won''t be able to save this image correctly until you fix this.'.
sources := Smalltalk openSources.
sources ifNotNil: [sources setConverterForCode].
+ changes := SourceFileArray cachedChanges
+ ifNil: [Smalltalk openChanges: changesName forImage: imageName].
- changes := Smalltalk openChanges: changesName forImage: imageName.
changes ifNotNil: [changes setConverterForCode].
-
((sources == nil or: [sources atEnd])
and: [Preferences valueOfFlag: #warnIfNoSourcesFile])
ifTrue: [Smalltalk platformName = 'Mac OS'
ifTrue: [msg := msg , '
Make sure the sources file is not an Alias.'].
self inform: (msg format: { 'the sources file named ' , self sourcesName })].
(changes == nil
and: [Preferences valueOfFlag: #warnIfNoChangesFile])
ifTrue: [self inform: (msg format: { 'the changes file named ' , changesName })].
((Preferences valueOfFlag: #warnIfNoChangesFile) and: [changes notNil])
ifTrue: [changes isReadOnly
ifTrue: [self inform: (wmsg format: { 'the changes file named ' , changesName })].
((changes next: 200)
includesSubstring: String crlf)
ifTrue: [self inform: ('The changes file named <b>{1}</b> has been injured by an unpacking utility. Line endings were changed from Cr to CrLf.<br><br>Please set the preferences in your decompressing program to
<b>do not convert text files</b> and unpack the system again.' translated format: { changesName }) asTextFromHtml]].
SourceFiles := Array with: sources with: changes!
Item was changed:
----- Method: SmalltalkImage>>saveAs: (in category 'sources, changes log') -----
saveAs: newName
"Save the image under that new name."
newName ifNil:[^ self].
+
+ (SourceFileArray internalizeChanges or: (SourceFiles at: 2) isNil) ifFalse:
- (SourceFiles at: 2) ifNotNil:
[self closeSourceFiles; "so copying the changes file will always work"
saveChangesInFileNamed: (self fullNameForChangesNamed: newName)].
self saveImageInFileNamed: (self fullNameForImageNamed: newName)!
Item was changed:
----- Method: SmalltalkImage>>saveAsNewVersion (in category 'sources, changes log') -----
saveAsNewVersion
"Save the image/changes using the next available version number."
"Smalltalk saveAsNewVersion"
| newName changesName aName anIndex |
aName := FileDirectory baseNameFor: (FileDirectory default localNameFor: self imageName).
anIndex := aName lastIndexOf: FileDirectory dot asCharacter ifAbsent: [nil].
(anIndex notNil and: [(aName copyFrom: anIndex + 1 to: aName size) isAllDigits])
ifTrue:
[aName := aName copyFrom: 1 to: anIndex - 1].
newName := FileDirectory default nextNameFor: aName extension: FileDirectory imageSuffix.
changesName := self fullNameForChangesNamed: newName.
+ (SourceFileArray internalizeChanges or: (SourceFiles at: 2) isNil) ifFalse: [
+ "Check to see if there is a .changes file that would cause a problem if we saved a new .image file with the new version number"
+ (FileDirectory default fileOrDirectoryExists: changesName)
+ ifTrue:
+ [^ self inform:
- "Check to see if there is a .changes file that would cause a problem if we saved a new .image file with the new version number"
- (FileDirectory default fileOrDirectoryExists: changesName)
- ifTrue:
- [^ self inform:
'There is already .changes file of the desired name,
', newName, '
curiously already present, even though there is
no corresponding .image file. Please remedy
manually and then repeat your request.'].
+ self closeSourceFiles; "so copying the changes file will always work"
+ saveChangesInFileNamed: (self fullNameForChangesNamed: newName)
+ ].
- (SourceFiles at: 2) ifNotNil:
- [self closeSourceFiles; "so copying the changes file will always work"
- saveChangesInFileNamed: (self fullNameForChangesNamed: newName)].
self saveImageInFileNamed: (self fullNameForImageNamed: newName)
!
David T. Lewis uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-dtl.199.mcz
==================== Summary ====================
Name: Files-dtl.199
Author: dtl
Time: 25 November 2022, 1:59:09.407907 pm
UUID: d67aa170-9fb2-45df-9981-5cd5e6e7e5b9
Ancestors: Files-ct.198
Add ChangeLogStream to allow the changes log to be maintained within the image rather than as an external file. Provide a "Cache changes file" preference for changing the configuration. UTF8 encoding is assumed, and several conversion methods are duplicated from MultiByteFileStream. Inspired by the original Scott Wallace implementation circa 1996, see SystemDictionary>>internalizeChangeLog and SystemDictionary>>internalizeSources in early Squeak images.
=============== Diff against Files-ct.198 ===============
Item was added:
+ ReadWriteStream subclass: #ChangeLogStream
+ instanceVariableNames: 'TextConverter'
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Files-System'!
+
+ !ChangeLogStream commentStamp: 'dtl 11/5/2022 16:22' prior: 0!
+ A ChangeLogStream is a memory resident changes log, equivalent to the traditional file based changes but not stored on the external file system. UTF8 encoding is assumed for all sources and a UTF8TextConverter is used for reading and writing to the stream.
+ !
Item was added:
+ ----- Method: ChangeLogStream>>basicNext:putAll:startingAt: (in category 'private basic') -----
+ basicNext: anInteger putAll: aCollection startingAt: startIndex
+
+ ^super next: anInteger putAll: aCollection startingAt: startIndex!
Item was added:
+ ----- Method: ChangeLogStream>>basicNextPut: (in category 'private basic') -----
+ basicNextPut: char
+
+ ^ super nextPut: char.
+ !
Item was added:
+ ----- Method: ChangeLogStream>>basicNextPutAll: (in category 'private basic') -----
+ basicNextPutAll: aString
+
+ ^ super nextPutAll: aString.
+ !
Item was added:
+ ----- Method: ChangeLogStream>>converter (in category 'converting') -----
+ converter
+ "Assume UTF8 for all sources"
+
+ ^TextConverter ifNil: [TextConverter := UTF8TextConverter new].!
Item was added:
+ ----- Method: ChangeLogStream>>isReadOnly (in category 'testing') -----
+ isReadOnly
+ ^false!
Item was added:
+ ----- Method: ChangeLogStream>>nextChunkText (in category 'fileIn/Out') -----
+ nextChunkText
+ "Deliver the next chunk as a Text. Decode the following ]style[ chunk if present. Position at start of next real chunk."
+
+ ^self converter nextChunkTextFromStream: self!
Item was added:
+ ----- Method: ChangeLogStream>>nextPut: (in category 'accessing') -----
+ nextPut: aCharacter
+
+ ^self converter nextPut: aCharacter toStream: self!
Item was added:
+ ----- Method: ChangeLogStream>>nextPutAll: (in category 'accessing') -----
+ nextPutAll: aCollection
+
+ ^self converter nextPutAll: aCollection toStream: self!
Item was added:
+ ----- Method: ChangeLogStream>>readOnlyCopy (in category 'converting') -----
+ readOnlyCopy
+ ^ self!
Item was added:
+ ----- Method: ChangeLogStream>>reopen (in category 'converting') -----
+ reopen
+ ^self!
Item was changed:
SequenceableCollection subclass: #SourceFileArray
instanceVariableNames: ''
+ classVariableNames: 'CachedChanges'
- classVariableNames: ''
poolDictionaries: ''
category: 'Files-System'!
!SourceFileArray commentStamp: '<historical>' prior: 0!
This class is an abstract superclass for source code access mechanisms. It defines the messages that need to be understood by those subclasses that store and retrieve source chunks on files, over the network or in databases.
The first concrete subclass, StandardSourceFileArray, supports access to the traditional sources and changes files. Other subclasses might implement multiple source files for different applications, or access to a network source server.!
Item was added:
+ ----- Method: SourceFileArray class>>cachedChanges (in category 'internalize changes') -----
+ cachedChanges
+ "When present, CachedChanges replaces the traditional external changes
+ file with an internal stream in the image."
+ ^CachedChanges!
Item was added:
+ ----- Method: SourceFileArray class>>changeLogContents (in category 'internalize changes') -----
+ changeLogContents
+ | changes fs contents |
+ changes := SourceFiles at: 2.
+ (changes isKindOf: FileStream)
+ ifTrue: [[fs := StandardFileStream "Use StandardFileStream, not FileStream concreteStream, to avoid WideString conversion"
+ readOnlyFileNamed: changes name.
+ fs binary.
+ contents := fs upToEnd]
+ ensure: [fs close].
+ "Smalltalk openSourceFiles."
+ ^ contents asString]
+ ifFalse: [^ changes contents]!
Item was added:
+ ----- Method: SourceFileArray class>>externalizeChangeLog (in category 'internalize changes') -----
+ externalizeChangeLog
+ "Move the changes log to an external file. This is the traditional packaging, in
+ which the sources file and changes file are maintained separately from the
+ image file."
+ self safeToExportChanges
+ ifTrue: [ | fs |
+ [fs := FileStream fileNamed: Smalltalk changesName.
+ fs binary.
+ fs nextPutAll: CachedChanges contents.
+ CachedChanges := nil]
+ ensure: [ fs close ].
+ Smalltalk openSourceFiles].
+ !
Item was added:
+ ----- Method: SourceFileArray class>>internalizeChangeLog (in category 'internalize changes') -----
+ internalizeChangeLog
+ "Move the change log to an internal stream and maintain it within the image.
+ This configuration may be risky because the record of recently logged changes
+ is no longer available in a separate external file. If the image file itself becomes
+ unusable, the recent changes log file will not be available."
+ (ChangeLogStream with: self changeLogContents)
+ ifNotNil: [:strm |
+ CachedChanges := strm.
+ SourceFiles at: 2 put: CachedChanges]!
Item was added:
+ ----- Method: SourceFileArray class>>internalizeChanges (in category 'internalize changes') -----
+ internalizeChanges
+
+ <preference: 'Cache changes file'
+ category: 'Files'
+ description: 'Log changes to internal stream rather than external file. External changes file will not be available for error recovery.'
+ type: #Boolean>
+ ^CachedChanges notNil
+ !
Item was added:
+ ----- Method: SourceFileArray class>>internalizeChanges: (in category 'internalize changes') -----
+ internalizeChanges: internalize
+
+ internalize
+ ifTrue: [ self internalizeChangeLog ]
+ ifFalse: [self externalizeChangeLog ].!
Item was added:
+ ----- Method: SourceFileArray class>>safeToExportChanges (in category 'internalize changes') -----
+ safeToExportChanges
+ "Changes log is currently internal, and there is no external changes file with
+ the name that would be used for saving externally or the user confirms that
+ it safe to overwrite that existing file. Existing changes file will be removed if
+ user confirms."
+
+ ^ CachedChanges
+ ifNil: [ false ]
+ ifNotNil: [ (FileDirectory default fileExists: Smalltalk changesName)
+ ifTrue: [ | response |
+ (response :=self confirm: Smalltalk changesName , ' exists, overwrite?')
+ ifTrue: [[ FileDirectory default deleteFileNamed: Smalltalk changesName ]
+ on: Error do: [ self notify: 'cannot delete ', Smalltalk changesName. ^false ]].
+ ^ response ]
+ ifFalse: [true]].
+
+ !
Christoph Thiede uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-ct.495.mcz
==================== Summary ====================
Name: Tests-ct.495
Author: ct
Time: 25 November 2022, 6:41:26.980861 pm
UUID: a3ee3a6b-6274-4443-8fc2-bc458742f921
Ancestors: Tests-eem.494
Silences clean-up of CompilerExceptionsTests.
=============== Diff against Tests-eem.494 ===============
Item was changed:
----- Method: CompilerExceptionsTest>>removeGeneratedMethods (in category 'private') -----
removeGeneratedMethods
+ SystemChangeNotifier uniqueInstance doSilently:
+ [self class removeCategory: 'generated'].!
- self class removeCategory: 'generated'!