Bert Freudenberg uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-bf.1306.mcz
==================== Summary ====================
Name: Morphic-bf.1306
Author: bf
Time: 14 September 2016, 3:39:53.677084 pm
UUID: 1854981d-62dc-4ade-836b-2185ff8e94b6
Ancestors: Morphic-tfel.1305
Remove ImageSegment dependency
=============== Diff against Morphic-tfel.1305 ===============
Item was added:
+ ----- Method: MorphicProject>>myPlayerClasses (in category 'release') -----
+ myPlayerClasses
+ "Answer all my (non-systemDefined) player classes"
+ | classes presenter |
+ classes := Set new.
+ presenter := self world presenter.
+ presenter ifNotNil: [
+ presenter flushPlayerListCache. "old and outside guys"
+ presenter allExtantPlayers do:
+ [:p | p class isSystemDefined ifFalse: [classes add: p class]]].
+ ^classes!
Item was changed:
----- Method: MorphicProject>>prepareForDelete (in category 'release') -----
prepareForDelete
"The window in which the project is housed is about to deleted. Perform
any necessary actions to prepare for deletion."
+ | list |
- | is list |
Smalltalk at: #WonderlandCameraMorph ifPresent:[:aClass |
world submorphs do: "special release for wonderlands"
[:m | (m isKindOf: aClass)
and: [m getWonderland release]]].
"Remove Player classes and metaclasses owned by project"
+ self myPlayerClasses do: [:playerCls | playerCls removeFromSystemUnlogged].
- is := ImageSegment new arrayOfRoots: (Array with: self).
- (list := is rootsIncludingPlayers) ifNotNil:
- [list do: [:playerCls |
- (playerCls respondsTo: #isMeta) ifTrue:
- [playerCls isMeta ifFalse:
- [playerCls removeFromSystemUnlogged]]]]
!
Bert Freudenberg uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-bf.1037.mcz
==================== Summary ====================
Name: Kernel-bf.1037
Author: bf
Time: 14 September 2016, 12:29:29.496445 pm
UUID: e18c7fae-264c-4be6-9895-69e022aa1850
Ancestors: Kernel-ul.1036
Remove unused allInstancesEverywhereDo:
=============== Diff against Kernel-ul.1036 ===============
Item was removed:
- ----- Method: Behavior>>allInstancesEverywhereDo: (in category 'enumerating') -----
- allInstancesEverywhereDo: aBlock
- "Evaluate the argument, aBlock, for each of the current instances of the receiver. Including those in ImageSegments that are out on the disk. Bring each in briefly."
-
- self == UndefinedObject ifTrue: [^ aBlock value: nil].
- self allInstancesDo: aBlock.
- "Now iterate over instances in segments that are out on the disk."
- ImageSegment allSubInstancesDo: [:seg |
- seg allInstancesOf: self do: aBlock].
- !
Item was removed:
- ----- Method: Metaclass>>allInstancesEverywhereDo: (in category 'enumerating') -----
- allInstancesEverywhereDo: aBlock
- "There should be only one"
- thisClass class == self ifTrue:[^ aBlock value: thisClass].
- ^ super allInstancesEverywhereDo: aBlock!
Bert Freudenberg uploaded a new version of SMBase to project The Trunk:
http://source.squeak.org/trunk/SMBase-bf.136.mcz
==================== Summary ====================
Name: SMBase-bf.136
Author: bf
Time: 13 September 2016, 10:10:25.135647 pm
UUID: e8e8e01a-5714-4b71-8e9e-8dfb43d9ff38
Ancestors: SMBase-cmm.135
Remove unused ImageSegment extension method.
=============== Diff against SMBase-cmm.135 ===============
Item was removed:
- ----- Method: ImageSegment>>writeForExportOn: (in category '*SMBase-export') -----
- writeForExportOn: fileStream
- "Write the segment on the disk with all info needed to reconstruct it in a new image. For export. Out pointers are encoded as normal objects on the disk."
-
- state = #activeCopy ifFalse: [self error: 'wrong state'].
- fileStream fileOutClass: nil andObject: self.
- "remember extra structures. Note class names."!
Bert Freudenberg uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-bf.365.mcz
==================== Summary ====================
Name: Graphics-bf.365
Author: bf
Time: 13 September 2016, 10:01:12.119134 pm
UUID: 184228fa-4e38-472a-8e51-1cd86ff433f4
Ancestors: Graphics-tfel.364
Work around Mac VM bug: use 32 bpp
=============== Diff against Graphics-tfel.364 ===============
Item was added:
+ ----- Method: DisplayScreen>>primSupportsDisplayDepth: (in category 'other') -----
+ primSupportsDisplayDepth: pixelDepth
+ "Return true if this pixel depth is supported on the current host platform.
+ Primitive. Optional."
+ <primitive: 91>
+ ^#(1 2 4 8 16 32) includes: pixelDepth!
Item was changed:
----- Method: DisplayScreen>>supportsDisplayDepth: (in category 'other') -----
supportsDisplayDepth: pixelDepth
+ "Return true if this pixel depth is supported on the current host platform."
+ Smalltalk platformName = 'Mac OS' ifTrue: [^pixelDepth abs = 32]. "Work around VM bug"
+ ^self primSupportsDisplayDepth: pixelDepth!
- "Return true if this pixel depth is supported on the current host platform.
- Primitive. Optional."
- <primitive: 91>
- ^#(1 2 4 8 16 32) includes: pixelDepth!
Levente Uzonyi uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-ul.232.mcz
==================== Summary ====================
Name: EToys-ul.232
Author: ul
Time: 11 September 2016, 7:15:09.419613 pm
UUID: 666e68e0-6e23-4f51-88d8-bdb6b9f4bd0e
Ancestors: EToys-dtl.231
(hopefully) Shave off a few extra minutes of EToys loading by using Schwartzian transform in Morph class >> #unfilteredCategoriesForViewer.
The real culprit is the "new" implementation of String >> #translated, which came with the EToys changes and is at least two magnitudes slower than the previous implementation.
=============== Diff against EToys-dtl.231 ===============
Item was changed:
----- Method: Morph class>>unfilteredCategoriesForViewer (in category '*Etoys') -----
unfilteredCategoriesForViewer
"Answer a list of symbols representing the categories to offer in the viewer for one of my instances, in order of:
- masterOrderingOfCategorySymbols first
- others last in order by translated wording"
"
Morph unfilteredCategoriesForViewer
"
| aClass additions masterOrder |
aClass := self.
additions := OrderedCollection new.
+ [ aClass == Morph superclass ] whileFalse: [
- [aClass == Morph superclass ] whileFalse: [
additions addAll: (aClass allAdditionsToViewerCategories keys asArray
+ "#translated can be super slow, so use Schwartzian transform"
+ replace: [ :each | each -> each translated ];
+ sort: [ :a :b | a value <= b value ];
+ replace: [ :each | each key ]).
- sort: [ :a :b | a translated < b translated ]).
aClass := aClass superclass ].
masterOrder := EToyVocabulary masterOrderingOfCategorySymbols.
^(masterOrder intersection: additions), (additions difference: masterOrder).!
Bert Freudenberg uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-bf.915.mcz
==================== Summary ====================
Name: System-bf.915
Author: bf
Time: 9 September 2016, 2:04:28.571597 pm
UUID: ffcf5f50-0963-46e9-906e-a389fac9c172
Ancestors: System-bf.914
DataStream: properly support reading immediate class instances (supersedes hacks in System-bf.914). Only used for Characters, because SmallIntegers and Floats are special-cased anyways.
=============== Diff against System-bf.914 ===============
Item was added:
+ ----- Method: Character class>>readImmediateFrom:size: (in category '*system-object storage') -----
+ readImmediateFrom: aDataStream size: varsOnDisk
+ "Read an instance of self based on the contents of aDataStream. Return it.
+ Read in the value as written by Character>>storeDataOn:.
+ NOTE: This method must send beginReference: before reading any objects from aDataStream that might reference it. Because we need to read the value before creating the object, we need to reset the current reference position."
+ | refPosn instance |
+ refPosn := aDataStream getCurrentReference.
+ instance := self value: aDataStream next.
+ aDataStream setCurrentReference: refPosn.
+ aDataStream beginReference: instance.
+ ^instance!
Item was removed:
- ----- Method: DataStream>>readCharacterOfSize: (in category 'write and read') -----
- readCharacterOfSize: instSize
- "Character changed to an immediate class in Spur"
- | refPosn val |
- self assert: instSize = 1.
- refPosn := self getCurrentReference.
- self setCurrentReference: refPosn. "before recursion - not really needed for integer"
- val := self next.
- self assert: val isInteger.
- self setCurrentReference: refPosn. "before returning to next"
- ^ Character value: val.
- !
Item was changed:
----- Method: DataStream>>readInstance (in category 'write and read') -----
readInstance
"PRIVATE -- Read the contents of an arbitrary instance.
ASSUMES: readDataFrom:size: sends me beginReference: after it
instantiates the new object but before reading nested objects.
NOTE: We must restore the current reference position after
recursive calls to next.
Let the instance, not the class read the data. "
| instSize aSymbol refPosn anObject newClass |
instSize := (byteStream nextNumber: 4) - 1.
refPosn := self getCurrentReference.
aSymbol := self next.
- (aSymbol == #Character or: [aSymbol isCharacter "hack - why does this happen?"])
- ifTrue: [^ self readCharacterOfSize: instSize].
newClass := Smalltalk at: aSymbol asSymbol.
+ self setCurrentReference: refPosn. "before readDataFrom:size:"
+ anObject := newClass isImmediateClass
+ ifTrue: [newClass readImmediateFrom: self size: instSize]
+ ifFalse: [anObject := newClass isVariable "Create object here"
- anObject := newClass isVariable "Create object here"
ifFalse: [newClass basicNew]
ifTrue: [newClass basicNew: instSize - (newClass instSize)].
+ anObject readDataFrom: self size: instSize].
- self setCurrentReference: refPosn. "before readDataFrom:size:"
- anObject := anObject readDataFrom: self size: instSize.
self setCurrentReference: refPosn. "before returning to next"
^ anObject!
Item was changed:
----- Method: SmartRefStream>>readInstanceSize:clsname:refPosn: (in category 'read write') -----
readInstanceSize: instSize clsname: className refPosn: refPosn
"The common code to read the contents of an arbitrary instance.
ASSUMES: readDataFrom:size: sends me beginReference: after it
instantiates the new object but before reading nested objects.
NOTE: We must restore the current reference position after
recursive calls to next.
Three cases for files from older versions of the system:
1) Class has not changed shape, read it straight.
2) Class has changed instance variables (or needs fixup). Call a particular method to do it.
3) There is a new class instead. Find it, call a particular method to read.
All classes used to construct the structures dictionary *itself* need to be in 'steady' and they must not change!! See setStream:"
| anObject newName newClass dict oldInstVars isMultiSymbol |
self flag: #bobconv.
self setCurrentReference: refPosn. "remember pos before readDataFrom:size:"
newName := renamed at: className ifAbsent: [className].
- newName == #Character
- ifTrue: [^ self readCharacterOfSize: instSize].
isMultiSymbol := newName = #MultiSymbol or: [newName = #WideSymbol].
"isMultiSymbol ifTrue: [self halt]."
newClass := Smalltalk at: newName asSymbol.
(steady includes: newClass) & (newName == className) ifTrue: [
+ anObject := newClass isImmediateClass
+ ifTrue: [newClass readImmediateFrom: self size: instSize]
+ ifFalse: [anObject := newClass isVariable "Create object here"
+ ifFalse: [newClass basicNew]
+ ifTrue: [newClass basicNew: instSize - (newClass instSize)].
+ anObject readDataFrom: self size: instSize].
+
- anObject := newClass isVariable "Create it here"
- ifFalse: [newClass basicNew]
- ifTrue: [newClass basicNew: instSize - (newClass instSize)].
-
- anObject := anObject readDataFrom: self size: instSize.
self setCurrentReference: refPosn. "before returning to next"
isMultiSymbol ifTrue: [^ Symbol intern: anObject asString].
^ anObject].
oldInstVars := structures at: className ifAbsent: [
self error: 'class is not in structures list']. "Missing in object file"
anObject := newClass createFrom: self size: instSize version: oldInstVars.
"only create the instance"
self beginReference: anObject.
dict := self catalogValues: oldInstVars size: instSize.
"indexed vars as (1 -> val) etc."
dict at: #ClassName put: className. "so conversion method can know it"
"Give each superclass a chance to make its changes"
self storeInstVarsIn: anObject from: dict. "ones with the same names"
anObject := self applyConversionMethodsTo: anObject className: className varMap: dict.
self setCurrentReference: refPosn. "before returning to next"
isMultiSymbol ifTrue: [^ Symbol intern: anObject asString].
^ anObject!
Bert Freudenberg uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-bf.914.mcz
==================== Summary ====================
Name: System-bf.914
Author: bf
Time: 8 September 2016, 9:49:26.777611 pm
UUID: 5fae5167-168c-4c08-8f4f-a624c6f39fb5
Ancestors: System-cmm.913
Fix DataStream reading of Characters on Spur.
=============== Diff against System-cmm.913 ===============
Item was changed:
----- Method: DataStream>>readCharacterOfSize: (in category 'write and read') -----
readCharacterOfSize: instSize
+ "Character changed to an immediate class in Spur"
| refPosn val |
self assert: instSize = 1.
refPosn := self getCurrentReference.
+ self setCurrentReference: refPosn. "before recursion - not really needed for integer"
- self setCurrentReference: refPosn.
val := self next.
+ self assert: val isInteger.
+ self setCurrentReference: refPosn. "before returning to next"
^ Character value: val.
!
Item was changed:
----- Method: DataStream>>readInstance (in category 'write and read') -----
readInstance
"PRIVATE -- Read the contents of an arbitrary instance.
ASSUMES: readDataFrom:size: sends me beginReference: after it
instantiates the new object but before reading nested objects.
NOTE: We must restore the current reference position after
recursive calls to next.
Let the instance, not the class read the data. "
| instSize aSymbol refPosn anObject newClass |
instSize := (byteStream nextNumber: 4) - 1.
refPosn := self getCurrentReference.
aSymbol := self next.
+ (aSymbol == #Character or: [aSymbol isCharacter "hack - why does this happen?"])
- aSymbol == #Character
ifTrue: [^ self readCharacterOfSize: instSize].
newClass := Smalltalk at: aSymbol asSymbol.
anObject := newClass isVariable "Create object here"
ifFalse: [newClass basicNew]
ifTrue: [newClass basicNew: instSize - (newClass instSize)].
self setCurrentReference: refPosn. "before readDataFrom:size:"
anObject := anObject readDataFrom: self size: instSize.
self setCurrentReference: refPosn. "before returning to next"
^ anObject!
Item was changed:
----- Method: DataStream>>vacantRef (in category 'other') -----
vacantRef
"Answer the magic 32-bit constant we use ***ON DISK*** as a stream 'reference
position' to identify a reference that's not yet filled in. This must be a
value that won't be used as an ordinary reference. Cf. outputReference: and
readReference. --
NOTE: We could use a different type ID for vacant-refs rather than writing
object-references with a magic value. (The type ID and value are
overwritten by ordinary object-references when weak refs are fullfilled.)"
+ ^1073741823 "Hardcode former SmallInteger maxVal"!
- ^ SmallInteger maxVal!