David T. Lewis uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-dtl.283.mcz
==================== Summary ====================
Name: MorphicExtras-dtl.283
Author: dtl
Time: 28 January 2021, 8:12:14.767195 pm
UUID: 66550323-c456-4887-8a55-25d69ad05053
Ancestors: MorphicExtras-mt.282
For reloadable Etoys per instructions at http://wiki.squeak.org/squeak/2848 section 2.1
Reclassify curvePrototype, trianglePrototype (Etoys, MorphicExtras)
=============== Diff against MorphicExtras-mt.282 ===============
Item was added:
+ ----- Method: PolygonMorph class>>curvePrototype (in category '*MorphicExtras-instance creation') -----
+ curvePrototype
+ "Answer an instance of the receiver that will serve as a prototypical curve"
+
+ | aa |
+ aa := self new.
+ aa vertices: (Array with: 0@80 with: 70@90 with: 60@0)
+ color: Color orange lighter
+ borderWidth: 4
+ borderColor: Color black.
+ aa beSmoothCurve.
+ aa setNameTo: 'Curve'.
+ aa makeForwardArrow. "is already open"
+ aa computeBounds.
+ ^ aa
+
+ "
+ PolygonMorph curvePrototype openInHand
+ "!
Item was added:
+ ----- Method: PolygonMorph class>>trianglePrototype (in category '*MorphicExtras-instance creation') -----
+ trianglePrototype
+ "Answer an instance of the receiver that will serve as a prototypical triangle"
+
+ | aa |
+ aa := self new.
+ aa vertices: {0.0(a)0.0. 138.0(a)0.0. -37.0@ -74.0}
+ color: (TranslucentColor r: 0.387 g: 1.0 b: 0.548 alpha: 0.463)
+ borderWidth: 3
+ borderColor: Color black.
+ aa setProperty: #noNewVertices toValue: true.
+ aa setNameTo: 'Triangle'.
+ aa makeForwardArrow. "is already open"
+ aa computeBounds.
+ aa addHandles.
+ ^ aa
+
+ "
+ PolygonMorph trianglePrototype openInHand
+ "!
David T. Lewis uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-dtl.445.mcz
==================== Summary ====================
Name: Graphics-dtl.445
Author: dtl
Time: 28 January 2021, 8:09:03.217107 pm
UUID: 177084b2-8451-4cb2-9f19-c3382b927242
Ancestors: Graphics-nice.444
For reloadable Etoys per instructions at http://wiki.squeak.org/squeak/2848 section 2.1
Reclassify isVirtualScreen (EToys, Graphics)
=============== Diff against Graphics-nice.444 ===============
Item was added:
+ ----- Method: Form>>isVirtualScreen (in category 'testing') -----
+ isVirtualScreen
+ "Am I a virtual display screen?"
+ ^false!
David T. Lewis uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-dtl.418.mcz
==================== Summary ====================
Name: EToys-dtl.418
Author: dtl
Time: 28 January 2021, 6:31:01.641276 pm
UUID: 27efb6c6-38aa-46df-904e-858fb4155f2b
Ancestors: EToys-eem.417
For reloadable Etoys per instructions at http://wiki.squeak.org/squeak/2848 section 2.1
Reclassify isVirtualScreen (EToys, Graphics)
Reclassify curvePrototype, trianglePrototype (Etoys, MorphicExtras)
Reclassify Inteval>>start and stop (Etoys, Collections)
=============== Diff against EToys-eem.417 ===============
Item was removed:
- ----- Method: Form>>isVirtualScreen (in category '*Etoys-OLPC-Display') -----
- isVirtualScreen
- "Am I a virtual display screen?"
- ^false!
Item was removed:
- ----- Method: Interval>>start (in category '*Etoys-Squeakland-accessing') -----
- start
- ^ start!
Item was removed:
- ----- Method: Interval>>stop (in category '*Etoys-Squeakland-accessing') -----
- stop
- ^ stop!
Item was removed:
- ----- Method: PolygonMorph class>>curvePrototype (in category '*Etoys-Squeakland-instance creation') -----
- curvePrototype
- "Answer an instance of the receiver that will serve as a prototypical curve"
-
- | aa |
- aa := self new.
- aa vertices: (Array with: 0@80 with: 70@90 with: 60@0)
- color: Color orange lighter
- borderWidth: 4
- borderColor: Color black.
- aa beSmoothCurve.
- aa setNameTo: 'Curve'.
- aa makeForwardArrow. "is already open"
- aa computeBounds.
- ^ aa
-
- "
- PolygonMorph curvePrototype openInHand
- "!
Item was removed:
- ----- Method: PolygonMorph class>>trianglePrototype (in category '*Etoys-Squeakland-instance creation') -----
- trianglePrototype
- "Answer an instance of the receiver that will serve as a prototypical triangle"
-
- | aa |
- aa := self new.
- aa vertices: {0.0(a)0.0. 138.0(a)0.0. -37.0@ -74.0}
- color: (TranslucentColor r: 0.387 g: 1.0 b: 0.548 alpha: 0.463)
- borderWidth: 3
- borderColor: Color black.
- aa setProperty: #noNewVertices toValue: true.
- aa setNameTo: 'Triangle'.
- aa makeForwardArrow. "is already open"
- aa computeBounds.
- aa addHandles.
- ^ aa
-
- "
- PolygonMorph trianglePrototype openInHand
- "!
David T. Lewis uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-dtl.923.mcz
==================== Summary ====================
Name: Collections-dtl.923
Author: dtl
Time: 28 January 2021, 8:05:25.25265 pm
UUID: 94598e44-a095-4a19-a2f5-f5630fe1dae8
Ancestors: Collections-ul.922
For reloadable Etoys per instructions at http://wiki.squeak.org/squeak/2848 section 2.1
Reclassify Inteval>>start and stop (Etoys, Collections)
=============== Diff against Collections-ul.922 ===============
Item was added:
+ ----- Method: Interval>>start (in category 'accessing') -----
+ start
+ ^ start!
Item was added:
+ ----- Method: Interval>>stop (in category 'accessing') -----
+ stop
+ ^ stop!
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.1366.mcz
==================== Summary ====================
Name: Kernel-eem.1366
Author: eem
Time: 26 January 2021, 4:27:57.204259 pm
UUID: 3a706d32-c2d6-416f-82c1-bbf735650385
Ancestors: Kernel-eem.1365
Slightly faster implementation of Context>>#isPrimFailToken:.
Improve the comments in Context>>#isHandlerContext/#isUnwindContext.
Nuke an obsolete method.
=============== Diff against Kernel-eem.1365 ===============
Item was changed:
----- Method: Context>>isHandlerContext (in category 'private-exceptions') -----
isHandlerContext
+ "Answer if the receiver is for a method that is marked as an exception handler.
+ BlockClosure>>#on:do: uses this primitive to identify itself to the VM
+ as an exception handler method, which the VM uses in primitive 197
+ Context>>#findNextHandlerContextStarting, primitiveFindHandlerContext,
+ to accelerate the search for exception handlers."
- "is this context for method that is marked?"
^method primitive = 199!
Item was changed:
----- Method: Context>>isPrimFailToken: (in category 'private') -----
isPrimFailToken: anObject
+ ^(self objectClass: anObject) isArray
- ^(self objectClass: anObject) == Array
and: [anObject size = 2
+ and: [(anObject at: 1) == PrimitiveFailToken]]!
- and: [anObject first == PrimitiveFailToken]]!
Item was changed:
----- Method: Context>>isUnwindContext (in category 'private-exceptions') -----
isUnwindContext
+ "Answer if the receiver is for a method that is marked as a non-local return/exception unwind protect.
+ BlockClosure>>#ensure: and BlockClosure>>#ifCurtailed: use this primitive to identify
+ themseves to the VM as unwind protect methods. The VM uses this in primitive 195
+ Context>>#findNextUnwindContextUpTo:, primitiveFindNextUnwindContext, to
+ accelerate the search for unwind protects."
- "is this context for method that is marked?"
^method primitive = 198!
Item was removed:
- ----- Method: Context>>tryPrimitiveFor:receiver:args: (in category 'private') -----
- tryPrimitiveFor: method receiver: receiver args: arguments
- "If this method has a primitive index, then run the primitive and return its result.
- Otherwise (and also if the primitive fails) return PrimitiveFailToken,
- as an indication that the method should be activated and run as bytecodes."
- | primIndex |
- (primIndex := method primitive) = 0 ifTrue: [^{PrimitiveFailToken. nil}].
- ^ self doPrimitive: primIndex method: method receiver: receiver args: arguments!
Levente Uzonyi uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-ul.186.mcz
==================== Summary ====================
Name: Files-ul.186
Author: ul
Time: 25 January 2021, 4:46:58.396742 pm
UUID: 2ae84c53-ba51-4aa6-9840-891243638cc6
Ancestors: Files-dtl.185
- speed up StandardFileStream >> #upToEnd by reading the remaining data all at once
=============== Diff against Files-dtl.185 ===============
Item was changed:
----- Method: StandardFileStream>>upToEnd (in category 'read, write, position') -----
upToEnd
"Answer a subcollection from the current access position through the last element of the receiver."
+ ^self next: self size - self position!
- ^self collectionSpecies streamContents: [ :newStream |
- | next |
- [ (next := self next) == nil ] whileFalse: [
- newStream nextPut: next ] ]!
Levente Uzonyi uploaded a new version of Multilingual to project The Trunk:
http://source.squeak.org/trunk/Multilingual-ul.254.mcz
==================== Summary ====================
Name: Multilingual-ul.254
Author: ul
Time: 25 January 2021, 4:45:35.267328 pm
UUID: ba4ade3a-e1eb-4bfd-b130-a46de80bfe0c
Ancestors: Multilingual-eem.253
- speed up MultiByteFileStream >> #upToEnd by processing the file in larger chunks and reusing the implementation of StandardFileStream if the stream is binary
=============== Diff against Multilingual-eem.253 ===============
Item was changed:
----- Method: MultiByteFileStream>>upToEnd (in category 'public') -----
upToEnd
+ "Answer a subcollection from the current access position through the last element of the receiver."
+ | remainingEstimate |
+ self isBinary ifTrue: [ ^super upToEnd ].
+ remainingEstimate := self size - self position.
^self collectionSpecies
+ new: remainingEstimate
- new: self size - self position
streamContents: [ :stream |
+ | elements chunkSize |
+ chunkSize := remainingEstimate min: 20000.
+ [ (elements := self next: chunkSize) isEmpty ] whileFalse: [
+ stream nextPutAll: elements ] ]!
- | element |
- [ (element := self next) == nil ] whileFalse: [
- stream nextPut: element ] ]
- !
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1718.mcz
==================== Summary ====================
Name: Morphic-mt.1718
Author: mt
Time: 25 January 2021, 4:20:06.658158 pm
UUID: 96f371e0-9b54-7949-b083-894f3322467b
Ancestors: Morphic-mt.1717
Fixes #testShrinkWrapIssue. Thanks to Javier (jdr) for pointing this out!
=============== Diff against Morphic-mt.1717 ===============
Item was changed:
----- Method: Morph>>doLayoutIn: (in category 'layout') -----
doLayoutIn: layoutBounds
"Compute a new layout based on the given layout bounds."
| box priorBounds |
"0) Quick return. No children means no effect in layout policies. Use #minWidth and #minHeight to implement #shrinkWrap for morphs without submorphs."
self hasSubmorphs ifFalse: [^ fullBounds := self outerBounds].
"X.1) Prepare redraw. Testing for #bounds or #layoutBounds would be sufficient to figure out if we need an invalidation afterwards but #outerBounds is what we need for all leaf nodes so we use that"
priorBounds := self outerBounds.
"1) Give our children a chance to manually adjust *before* layout (cell) computation. This allows morphs to layout in their owner without having to use a layout policy."
self submorphsDo: [:m | m ownerChanged].
"2) Compute the new layout. This goes down the entire morph hierarchy. See #layoutInBounds: and #minExtent, which are the usual layout-policy callbacks."
+ self layoutPolicy ifNil: [self submorphsDo: [:m | m fullBounds]] ifNotNil: [:layout |
- self layoutPolicy ifNotNil: [:layout |
"2.1) Compute the new layout."
self removeProperty: #doLayoutAgain.
layout layout: self in: layoutBounds.
"2.2) Do one additional run on the layout if requested in #layoutInBounds:."
(self hasProperty: #doLayoutAgain) ifTrue: [
self removeProperty: #doLayoutAgain.
layout flushLayoutCache.
layout layout: self in: layoutBounds].
self assert: (self hasProperty: #doLayoutAgain) not].
"3) Watch out for minimal extent and apply #shrinkWrap constraints."
self adjustLayoutBounds.
"4) Compute and set the new full bounds. IMPORTANT to finish layout computation."
fullBounds := self privateFullBounds.
"X.2) Redraw."
box := self outerBounds.
box = priorBounds ifFalse: [
self invalidRect: (priorBounds quickMerge: box)].!