Eliot Miranda uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-eem.395.mcz
==================== Summary ====================
Name: Compiler-eem.395
Author: eem
Time: 15 October 2018, 12:37:16.203042 pm
UUID: 2f7c8f3a-4e2d-413b-8651-b05b5683f89d
Ancestors: Compiler-eem.394
Implement markerOrNil: for the SistaV1 bytecode set and firm up both implementations so that e.g.
aMethod
self fooClass new
is not interpreted as a marker method (because #new is a special selector and hence does not cayse a literal to be allocated).
=============== Diff against Compiler-eem.394 ===============
Item was added:
+ ----- Method: EncoderForSistaV1 class>>markerOrNilFor: (in category 'compiled method support') -----
+ markerOrNilFor: aMethod
+ "If aMethod is a marker method, answer the symbol used to mark it. Otherwise
+ answer nil. What is a marker method? It is method with body like
+ 'self subclassResponsibility' or '^ self subclassResponsibility'
+ used to indicate ('mark') a special property.
+
+ Marker methods compile to two bytecode forms, this:
+ self
+ send: <literal 1>
+ pop
+ returnSelf
+ or this:
+ self
+ send: <literal 1>
+ returnTop"
+ | expectedHeaderPlusLliteralSize e byte |
+ expectedHeaderPlusLliteralSize := Smalltalk wordSize * 4.
+ ^(((e := aMethod endPC - expectedHeaderPlusLliteralSize) = 3 or: [e = 4])
+ and: [aMethod numLiterals = 3
+ and: [(aMethod at: expectedHeaderPlusLliteralSize + 1) = 16r4C "push self"
+ and: [(aMethod at: expectedHeaderPlusLliteralSize + 2) = 16r80
+ and: [(byte := aMethod at: expectedHeaderPlusLliteralSize + 3) = 16rD8 or: [byte = 16r5C]]]]]) "pop or returnSelf"
+ ifTrue: [aMethod literalAt: 1]!
Item was changed:
----- Method: EncoderForV3 class>>markerOrNilFor: (in category 'compiled method support') -----
markerOrNilFor: aMethod
"If aMethod is a marker method, answer the symbol used to mark it. Otherwise
answer nil. What is a marker method? It is method with body like
'self subclassResponsibility' or '^ self subclassResponsibility'
used to indicate ('mark') a special property.
Marker methods compile to two bytecode forms, this:
self
send: <literal 1>
pop
returnSelf
or this:
self
send: <literal 1>
returnTop"
+ | expectedHeaderPlusLliteralSize e byte |
- | expectedHeaderPlusLliteralSize e |
expectedHeaderPlusLliteralSize := Smalltalk wordSize * 4.
^(((e := aMethod endPC - expectedHeaderPlusLliteralSize) = 3 or: [e = 4])
and: [aMethod numLiterals = 3
+ and: [(aMethod at: expectedHeaderPlusLliteralSize + 1) = 16r70 "push self"
+ and: [(aMethod at: expectedHeaderPlusLliteralSize + 2) = 16rD0
+ and: [(byte := aMethod at: expectedHeaderPlusLliteralSize + 3) = 16r87 or: [byte = 16r78]]]]]) "pop or returnSelf"
- and: [(aMethod at: expectedHeaderPlusLliteralSize + 1) = 16r70 "push self"
- and: [(aMethod at: expectedHeaderPlusLliteralSize + 2) = 16rD0]]]) "send <literal 1>"
ifTrue: [aMethod literalAt: 1]!
Patrick Rein uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-pre.404.mcz
==================== Summary ====================
Name: Graphics-pre.404
Author: pre
Time: 15 October 2018, 9:57:15.384742 am
UUID: a816199d-b2b6-7247-a8f8-898c605829df
Ancestors: Graphics-pre.403
Removes odd behavior of colorFromPixelValue:depth: which returns transparent instead of 32bit rgb black
=============== Diff against Graphics-pre.403 ===============
Item was changed:
----- Method: Color class>>colorFromPixelValue:depth: (in category 'instance creation') -----
colorFromPixelValue: p depth: d
"Convert a pixel value for the given display depth into a color."
"Details: For depths of 8 or less, the pixel value is simply looked up in a table. For greater depths, the color components are extracted and converted into a color."
| r g b alpha |
d = 8 ifTrue: [^ IndexedColors at: (p bitAnd: 16rFF) + 1].
d = 4 ifTrue: [^ IndexedColors at: (p bitAnd: 16r0F) + 1].
d = 2 ifTrue: [^ IndexedColors at: (p bitAnd: 16r03) + 1].
d = 1 ifTrue: [^ IndexedColors at: (p bitAnd: 16r01) + 1].
(d = 16) | (d = 15) ifTrue: [
"five bits per component"
r := (p bitShift: -10) bitAnd: 16r1F.
g := (p bitShift: -5) bitAnd: 16r1F.
b := p bitAnd: 16r1F.
(r = 0 and: [g = 0]) ifTrue: [
b = 0 ifTrue: [^Color transparent].
b = 1 ifTrue: [^Color black]].
^ Color r: r g: g b: b range: 31].
d = 32 ifTrue: [
"eight bits per component; 8 bits of alpha"
r := (p bitShift: -16) bitAnd: 16rFF.
g := (p bitShift: -8) bitAnd: 16rFF.
b := p bitAnd: 16rFF.
alpha := p bitShift: -24.
alpha = 0 ifTrue: [^Color transparent].
- (r = 0 and: [g = 0 and: [b = 0]]) ifTrue: [^Color transparent].
alpha < 255
ifTrue: [^ (Color r: r g: g b: b range: 255) alpha: (alpha asFloat / 255.0)]
ifFalse: [^ (Color r: r g: g b: b range: 255)]].
d = 12 ifTrue: [
"four bits per component"
r := (p bitShift: -8) bitAnd: 16rF.
g := (p bitShift: -4) bitAnd: 16rF.
b := p bitAnd: 16rF.
^ Color r: r g: g b: b range: 15].
d = 9 ifTrue: [
"three bits per component"
r := (p bitShift: -6) bitAnd: 16r7.
g := (p bitShift: -3) bitAnd: 16r7.
b := p bitAnd: 16r7.
^ Color r: r g: g b: b range: 7].
self error: 'unknown pixel depth: ', d printString
!
Patrick Rein uploaded a new version of GraphicsTests to project The Trunk:
http://source.squeak.org/trunk/GraphicsTests-pre.48.mcz
==================== Summary ====================
Name: GraphicsTests-pre.48
Author: pre
Time: 15 October 2018, 9:54:58.586742 am
UUID: 1033b8b9-c68e-0046-9aa5-c1a78bb4c0d4
Ancestors: GraphicsTests-pre.47
Adds a test to protect us from a regression of odd behavior of colorFromPixelValue:depth: which returns transparent for 32bit rgb black.
Recategorizes a test which remained alone in a category.
=============== Diff against GraphicsTests-pre.47 ===============
Item was added:
+ ----- Method: ColorTest>>testColorsFromPixelValue32BitBlack (in category 'tests') -----
+ testColorsFromPixelValue32BitBlack
+
+ "This is a regression test which tests for deprecated behavior of
+ colorFromPixelValue:depth: which set 32bit rgb black to transparent."
+ self assert: Color black equals: (Color colorFromPixelValue: 16rFF000000 depth: 32)!
Item was changed:
+ ----- Method: ColorTest>>testConstructorsAreConsistent (in category 'tests') -----
- ----- Method: ColorTest>>testConstructorsAreConsistent (in category 'testing') -----
testConstructorsAreConsistent
"Color seaFoam asHTMLColor".
self assert: (Color r: 0 g: 1 b: 128/255) equals: (Color fromString: '#00FF80').
self assert: (Color r: 0 g: 1 b: 128/255) equals: (Color r: 0 g: 255 b: 128 range: 255).!
Patrick Rein uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-pre.403.mcz
==================== Summary ====================
Name: Graphics-pre.403
Author: pre
Time: 15 October 2018, 9:39:42.652742 am
UUID: 95ceb538-97fd-f14a-810b-360432580bd3
Ancestors: Graphics-eem.402
Changes the an initialization method used in one of the instance creation methods to use a more general initialization method and thereby not impose any rounding
=============== Diff against Graphics-eem.402 ===============
Item was changed:
----- Method: Color>>setRed:green:blue:range: (in category 'private') -----
setRed: r green: g blue: b range: range
"Initialize this color's r, g, and b components to the given values in the range [0..r]."
+ ^ self setRed: r / range green: g / range blue: b / range!
- rgb == nil ifFalse: [self attemptToMutateError].
- rgb :=
- ((((r * ComponentMask) // range) bitAnd: ComponentMask) bitShift: RedShift) +
- ((((g * ComponentMask) // range) bitAnd: ComponentMask) bitShift: GreenShift) +
- (((b * ComponentMask) // range) bitAnd: ComponentMask).
- cachedDepth := nil.
- cachedBitPattern := nil.
- !
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.1191.mcz
==================== Summary ====================
Name: Kernel-eem.1191
Author: eem
Time: 11 October 2018, 10:52:37.059231 pm
UUID: 465e029d-66ff-492d-a465-79f2867d2d8b
Ancestors: Kernel-cmm.1190
Remove adoptInstance:'s fallback on primitiveChangeClassTo:, which obscures potential failures on Spur. Committing to Inbox; this isn't urgent but I want it in soon enough.
=============== Diff against Kernel-cmm.1190 ===============
Item was changed:
----- Method: Behavior>>adoptInstance: (in category 'instance creation') -----
adoptInstance: anInstance
+ "Change the class of anInstance to the receiver.
+ Primitive. Change the class of the argument anInstance into the receiver, provided
+ that the format of the receiver matches the format of the argument's class.
+ Fail if the argument is an immediate, or when the pointerness of the receiver is different
+ from the pointerness of the argument, or when the receiver is a fixed pointer class and
+ anInstance's size differs from the size that an instance of the receiver should have,
+ or when anInstance's size is not an integer multiple of the receiver's unit size."
- "Change the class of anInstance to me.
- Primitive (found in Cog and new VMs) follows the same rules as primitiveChangeClassTo:, but returns the class rather than the modified instance"
<primitive: 160 error: ec>
+ ^self primitiveFailed!
- anInstance primitiveChangeClassTo: self basicNew.
- ^self!
Patrick Rein uploaded a new version of Multilingual to project The Trunk:
http://source.squeak.org/trunk/Multilingual-pre.241.mcz
==================== Summary ====================
Name: Multilingual-pre.241
Author: pre
Time: 14 October 2018, 11:05:46.183278 am
UUID: 2c4d4e3f-8378-a64c-982e-39ace612766e
Ancestors: Multilingual-pre.240
Converts the line end string to be used by the TextConverter to the encoding of the converter before installing it.
=============== Diff against Multilingual-pre.240 ===============
Item was changed:
----- Method: TextConverter>>installLineEndConvention: (in category 'initialize-release') -----
installLineEndConvention: lineEndStringOrNil
latin1Map := self class latin1Map.
latin1Encodings := self class latin1Encodings.
+ lineEndStringOrNil ifNotNil: [ | convertedLineEndString |
+ latin1Encodings := latin1Encodings copy.
+ convertedLineEndString := String streamContents: [:stream |
+ lineEndStringOrNil readStream do: [:c |
+ self nextPut: c toStream: stream]].
+ latin1Encodings at: Character cr asciiValue + 1 put: convertedLineEndString.
- lineEndStringOrNil ifNotNil:
- [latin1Encodings := latin1Encodings copy.
- latin1Encodings at: Character cr asciiValue + 1 put: lineEndStringOrNil.
latin1Map := latin1Map copy.
latin1Map at: Character cr asciiValue + 1 put: 1]!
Fabio Niephaus uploaded a new version of ReleaseBuilder to project The Trunk:
http://source.squeak.org/trunk/ReleaseBuilder-fn.191.mcz
==================== Summary ====================
Name: ReleaseBuilder-fn.191
Author: fn
Time: 14 October 2018, 9:50:54.808427 am
UUID: 5599c1dd-4bf0-4421-9561-58859ae50ecd
Ancestors: ReleaseBuilder-fn.190
Bumps the image version to Squeak5.3alpha after the Squeak5.2 release.
=============== Diff against ReleaseBuilder-fn.190 ===============
Item was changed:
----- Method: ReleaseBuilder class>>initialize (in category 'class initialization') -----
initialize
QAndA ifNil: [self clearQAndA].
"We have to be after AutoStart so that Morphic is up and running."
Smalltalk addToStartUpList: ReleaseBuilder after: AutoStart.
+ SystemVersion newVersion: 'Squeak5.3alpha'!
- SystemVersion newVersion: 'Squeak5.2'!