Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.1031.mcz
==================== Summary ====================
Name: Kernel-eem.1031
Author: eem
Time: 5 July 2016, 6:16:17.071766 pm
UUID: 04b233a5-6540-4c4b-8a79-64e8e4c12e65
Ancestors: Kernel-eem.1030
Provide support for saving blocks on DataStreams. The old code only allowed saving contewxts in image segments. This code allows only the contexts of blocks being saved to be saved, an saves them with nilled senders, and is careful to manage fields beyond the top of stack, storing and reading nils.
With this code the following works, and one can e.g. save a MessageNames as a morph on file and read it in again.
[:a :b| a > b] saveOnFileNamed: 'block.bin'.
(MultiByteBinaryOrTextStream with: ((FileStream readOnlyFileNamed: 'block.bin') binary contentsOfEntireFile)) binary reset fileInObjectAndCode value: 2 value: 1
=============== Diff against Kernel-eem.1030 ===============
Item was added:
+ ----- Method: BlockClosure>>outerContextsDo: (in category 'private') -----
+ outerContextsDo: aBlock
+ "Evaluate aBlock with all the outer contexts along the receiver's static chain."
+ | outer |
+ outer := outerContext.
+ [outer notNil] whileTrue:
+ [aBlock value: outer.
+ outer := outer closure ifNotNil: [:outerClosure| outerClosure outerContext]]!
Item was added:
+ ----- Method: BlockClosure>>storeDataOn: (in category 'objects from disk') -----
+ storeDataOn: aDataStream
+ "Blocks are allowed go to out in DataStreams, but only without home senders."
+
+ | contexts |
+ contexts := IdentitySet new.
+ aDataStream insideASegment ifFalse:
+ [self outerContextsDo:
+ [:ctxt|
+ contexts add: ctxt.
+ aDataStream replace: ctxt sender with: nil]].
+ ^[super storeDataOn: aDataStream]
+ on: Notification
+ do: [:ex|
+ (contexts includes: ex tag)
+ ifTrue: [ex resume: ex tag]
+ ifFalse: [ex pass]]!
Item was added:
+ ----- Method: ContextPart>>readDataFrom:size: (in category 'objects from disk') -----
+ readDataFrom: aDataStream size: varsOnDisk
+ "Fill in the fields of self based on the contents of aDataStream. Answer self.
+ Read in the instance-variables written by Object>>storeDataOn:.
+ NOTE: This method must send beginReference: before reading any objects from aDataStream that might reference it.
+ Allow aDataStream to have fewer inst vars. See SmartRefStream.
+ Override to not store nil stack contents beyond stack pointer."
+ | cntInstVars cntIndexedVars |
+
+ cntInstVars := self class instSize.
+ cntIndexedVars := varsOnDisk - cntInstVars.
+ cntIndexedVars < 0 ifTrue:
+ [self error: 'Class has changed too much. Define a convertxxx method'].
+
+ aDataStream beginReference: self.
+ 1 to: cntInstVars do:
+ [:i | self instVarAt: i put: aDataStream next].
+ 1 to: stackp do:
+ [:i | self basicAt: i put: aDataStream next].
+ stackp + 1 to: cntIndexedVars do:
+ [:i | aDataStream next ~~ nil ifTrue:
+ [self error: 'Reading a Context''s contents expects only nil beyond top of stack']].
+ "Total number read MUST be equal to varsOnDisk!!"
+ ^self "If we ever answer something other than self, fix calls
+ on (super readDataFrom: aDataStream size: anInteger)"!
Item was changed:
----- Method: ContextPart>>storeDataOn: (in category 'objects from disk') -----
storeDataOn: aDataStream
+ "Contexts are not always allowed go to out in DataStreams. They must be included inside an ImageSegment,
+ or be being saved for a closure."
+ | cntInstVars cntIndexedVars |
- "Contexts are not allowed go to out in DataStreams. They must be included inside an ImageSegment."
+ (aDataStream insideASegment
+ or: [(Notification new tag: self; signal) == self]) ifFalse: "or perhaps ImageSegments were not used at all"
+ [self error: 'This Context was not included in the ImageSegment'].
- aDataStream insideASegment ifTrue: [^ super storeDataOn: aDataStream].
+ cntInstVars := self class instSize.
+ cntIndexedVars := self method frameSize.
+ aDataStream
+ beginInstance: self class
+ size: cntInstVars + cntIndexedVars.
+ 1 to: cntInstVars do:
+ [:i | aDataStream nextPut: (self instVarAt: i)].
+ 1 to: stackp do:
+ [:i | aDataStream nextPut: (self basicAt: i)].
+ stackp + 1 to: cntIndexedVars do:
+ [:i | aDataStream nextPut: nil]!
- self error: 'This Context was not included in the ImageSegment'.
- "or perhaps ImageSegments were not used at all"
- ^ nil!
Bernhard Pieber uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-bp.178.mcz
==================== Summary ====================
Name: Network-bp.178
Author: bp
Time: 3 July 2016, 11:48:20.491006 am
UUID: d0d328ad-a743-44cc-a912-853edf7bcf02
Ancestors: Network-ul.177
fix endless recursion on parsing e-mail addresses including an ampersand
=============== Diff against Network-ul.177 ===============
Item was changed:
----- Method: MailAddressTokenizer class>>nonAtomSet (in category 'class initialization') -----
nonAtomSet
"(from RFC 2822)"
^CSNonAtom ifNil: [
CSNonAtom := CharacterSet new
addAll: ($A to: $Z);
addAll: ($a to: $z);
addAll: ($0 to: $9);
+ addAll: '!!#$%&''*+-/=?^_`{|}~';
- addAll: '!!#$%^''*+-/=?^_`{|}~';
complement ]!
Item was added:
+ (PackageInfo named: 'Network') postscript: '"below, add code to be run after the loading of this package"
+ MailAddressTokenizer cleanUp: false'!
Chris Muller uploaded a new version of Installer-Core to project The Trunk:
http://source.squeak.org/trunk/Installer-Core-cmm.407.mcz
==================== Summary ====================
Name: Installer-Core-cmm.407
Author: cmm
Time: 2 July 2016, 2:58:33.524279 pm
UUID: 1d241bec-9f9c-4678-8692-3cf3f50c26e6
Ancestors: Installer-Core-cmm.406
When the user specifies to #useLocalRepository for configuration, but hasn't overridden their 'localRepository', calculate the #defaultLocalRepository based on the availability of a personal SqueakSource server (for history on one's own proprietary code), or not.
=============== Diff against Installer-Core-cmm.406 ===============
Item was added:
+ ----- Method: Installer class>>defaultLocalRepository (in category 'repository-overrides') -----
+ defaultLocalRepository
+ "Check for a personal, Magma-indexed SqueakSource server first, if none running, the the 'mc' directory in the current directory."
+ | localSqueaksource |
+ localSqueaksource := Installer monticello http: 'http://localhost:8888'.
+ ^ localSqueaksource mc isIndexed
+ ifTrue: [localSqueaksource]
+ ifFalse: [Installer monticello directory: FileDirectory default / 'mc']!
Item was changed:
----- Method: Installer class>>localRepository (in category 'repository-overrides') -----
localRepository
+ ^ localRepository ifNil: [self defaultLocalRepository]!
- ^ localRepository ifNil: [ Installer monticello directory: FileDirectory default / 'mc' ]!
Patrick Rein uploaded a new version of Traits to project The Trunk:
http://source.squeak.org/trunk/Traits-pre.307.mcz
==================== Summary ====================
Name: Traits-pre.307
Author: pre
Time: 20 November 2015, 2:58:26.562 pm
UUID: f0955b2d-775c-4862-85b9-5d6e616cd2e4
Ancestors: Traits-eem.306
This fixes http://bugs.squeak.org/view.php?id=7767 which is about the - and @ operator of Trait compositions ignoring brackets. This implementation uses the normal left to right evaluation order of Smalltalk to avoid confusions about the way trait composition expressions are evaluated.
=============== Diff against Traits-eem.306 ===============
Item was changed:
----- Method: TraitAlias>>printOn: (in category 'operations') -----
printOn: s
"Answer the trait composition string (used for class definitions)"
+ s nextPutAll: '('.
s nextPutAll: subject asString.
s nextPutAll: ' @ {'.
aliases do:[:assoc| s print: assoc] separatedBy:[s nextPutAll:'. '].
s nextPutAll: '}'.
+ s nextPutAll: ')'.!
- !
Item was changed:
----- Method: TraitComposition>>- (in category 'converting') -----
- anArray
- "the modifier operators #@ and #- bind stronger than +.
- Thus, #@ or #- sent to a sum will only affect the most right summand"
+ self updateTraits: (self traitsCollect: [:aTrait | aTrait - anArray ])!
- self addLast: (self removeLast - anArray)!
Item was changed:
----- Method: TraitComposition>>@ (in category 'converting') -----
@ anArrayOfAssociations
+
+ self updateTraits: (self traitsCollect: [:aTrait | aTrait @ anArrayOfAssociations ])!
- "the modifier operators #@ and #- bind stronger than +.
- Thus, #@ or #- sent to a sum will only affect the most right summand"
-
- self addLast: (self removeLast @ anArrayOfAssociations)!
Item was added:
+ ----- Method: TraitComposition>>traitsCollect: (in category 'accessing') -----
+ traitsCollect: aBlock
+ ^self collect: [:each| each traitsDo: aBlock]!
Item was changed:
----- Method: TraitComposition>>traitsDo: (in category 'accessing') -----
traitsDo: aBlock
+ ^self do: [:each| each traitsDo: aBlock]!
- ^self do:[:each| each traitsDo: aBlock]!
Item was added:
+ ----- Method: TraitComposition>>updateTraits: (in category 'converting') -----
+ updateTraits: aCollection
+
+ self
+ removeAll;
+ addAll: aCollection!
Item was changed:
----- Method: TraitExclusion>>printOn: (in category 'composition') -----
printOn: aStream
"Answer the trait composition string (used for class definitions)"
+ aStream nextPutAll: '('.
aStream nextPutAll: subject asString.
aStream nextPutAll: ' - {'.
exclusions asArray sort do:[:exc| aStream store: exc] separatedBy:[aStream nextPutAll: '. '].
+ aStream nextPutAll: '}'.
+ aStream nextPutAll: ')'.!
- aStream nextPutAll: '}'.!