Nicolas Cellier uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-nice.192.mcz
==================== Summary ====================
Name: Graphics-nice.192
Author: nice
Time: 20 February 2012, 7:30:30.765 pm
UUID: 47abe0e7-0db5-4c46-9fc2-b01316877379
Ancestors: Graphics-cmm.191
Fix one of the issues at http://code.google.com/p/pharo/issues/detail?id=5335
self assert: (Color fromString: 'darkGray') = Color darkGray.
=============== Diff against Graphics-cmm.191 ===============
Item was changed:
----- Method: Color class>>fromString: (in category 'instance creation') -----
fromString: aString
"for HTML color spec: #FFCCAA or white/black"
"Color fromString: '#FFCCAA'.
Color fromString: 'white'.
Color fromString: 'orange'"
| aColorHex |
aString isEmptyOrNil ifTrue: [ ^self white ].
aString first = $#
ifTrue: [ aColorHex := aString allButFirst ]
ifFalse: [ aColorHex := aString ].
(aColorHex size = 6 and: [
aColorHex allSatisfy: [ :each | '0123456789ABCDEFabcdef' includes: each ] ])
ifTrue: [
| green red blue |
red := (Integer readFrom: (aColorHex first: 2) base: 16) / 255.
green := (Integer readFrom: (aColorHex copyFrom: 3 to: 4) base: 16) / 255.
blue := (Integer readFrom: (aColorHex last: 2) base: 16) / 255.
^self r: red g: green b: blue ].
+ "try to match aColorHex with known named colors, case insensitive"
+ ^self perform: (ColorNames detect: [:colorSymbol | aColorHex sameAs: colorSymbol] ifNone: [ #white ])!
- "try to match aColorHex with known named colors"
- ^self perform: (ColorNames like: aColorHex asLowercase ifAbsent: [ #white ])!
Nicolas Cellier uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-nice.192.mcz
==================== Summary ====================
Name: Graphics-nice.192
Author: nice
Time: 20 February 2012, 7:30:30.765 pm
UUID: 47abe0e7-0db5-4c46-9fc2-b01316877379
Ancestors: Graphics-cmm.191
Fix one of the issues at http://code.google.com/p/pharo/issues/detail?id=5335
self assert: (Color fromString: 'darkGray') = Color darkGray.
=============== Diff against Graphics-cmm.191 ===============
Item was changed:
----- Method: Color class>>fromString: (in category 'instance creation') -----
fromString: aString
"for HTML color spec: #FFCCAA or white/black"
"Color fromString: '#FFCCAA'.
Color fromString: 'white'.
Color fromString: 'orange'"
| aColorHex |
aString isEmptyOrNil ifTrue: [ ^self white ].
aString first = $#
ifTrue: [ aColorHex := aString allButFirst ]
ifFalse: [ aColorHex := aString ].
(aColorHex size = 6 and: [
aColorHex allSatisfy: [ :each | '0123456789ABCDEFabcdef' includes: each ] ])
ifTrue: [
| green red blue |
red := (Integer readFrom: (aColorHex first: 2) base: 16) / 255.
green := (Integer readFrom: (aColorHex copyFrom: 3 to: 4) base: 16) / 255.
blue := (Integer readFrom: (aColorHex last: 2) base: 16) / 255.
^self r: red g: green b: blue ].
+ "try to match aColorHex with known named colors, case insensitive"
+ ^self perform: (ColorNames detect: [:colorSymbol | aColorHex sameAs: colorSymbol] ifNone: [ #white ])!
- "try to match aColorHex with known named colors"
- ^self perform: (ColorNames like: aColorHex asLowercase ifAbsent: [ #white ])!
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.670.mcz
==================== Summary ====================
Name: Kernel-eem.670
Author: eem
Time: 19 February 2012, 11:03:50.709 am
UUID: 18d57d21-e007-4be6-b076-13d011b90565
Ancestors: Kernel-eem.669
Add accessors for a CompiledsMethod header's sign bit.
The sign bit is useful for experiments but may also be used
to select an alternate bytecode set in the VM, e.g. for
supporting multiple languages or evolving the bytecode set.
=============== Diff against Kernel-eem.669 ===============
Item was added:
+ ----- Method: CompiledMethod>>clearSignFlag (in category 'accessing') -----
+ clearSignFlag
+ "Clear the sign flag bit. The sign flag bit may be
+ used by the VM to select an alternate bytecode set."
+
+ self signFlag ifTrue:
+ [self objectAt: 1 put: self header - SmallInteger minVal]!
Item was added:
+ ----- Method: CompiledMethod>>setSignFlag (in category 'accessing') -----
+ setSignFlag
+ "Set the sign flag bit. The sign flag bit may be
+ used by the VM to select an alternate bytecode set."
+
+ self signFlag ifFalse:
+ [self objectAt: 1 put: self header + SmallInteger minVal]!
Item was added:
+ ----- Method: CompiledMethod>>signFlag (in category 'accessing') -----
+ signFlag
+ "Answer the sign flag bit. The sign flag bit may be
+ used by the VM to select an alternate bytecode set."
+
+ ^self header < 0!
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.670.mcz
==================== Summary ====================
Name: Kernel-eem.670
Author: eem
Time: 19 February 2012, 11:03:50.709 am
UUID: 18d57d21-e007-4be6-b076-13d011b90565
Ancestors: Kernel-eem.669
Add accessors for a CompiledsMethod header's sign bit.
The sign bit is useful for experiments but may also be used
to select an alternate bytecode set in the VM, e.g. for
supporting multiple languages or evolving the bytecode set.
=============== Diff against Kernel-eem.669 ===============
Item was added:
+ ----- Method: CompiledMethod>>clearSignFlag (in category 'accessing') -----
+ clearSignFlag
+ "Clear the sign flag bit. The sign flag bit may be
+ used by the VM to select an alternate bytecode set."
+
+ self signFlag ifTrue:
+ [self objectAt: 1 put: self header - SmallInteger minVal]!
Item was added:
+ ----- Method: CompiledMethod>>setSignFlag (in category 'accessing') -----
+ setSignFlag
+ "Set the sign flag bit. The sign flag bit may be
+ used by the VM to select an alternate bytecode set."
+
+ self signFlag ifFalse:
+ [self objectAt: 1 put: self header + SmallInteger minVal]!
Item was added:
+ ----- Method: CompiledMethod>>signFlag (in category 'accessing') -----
+ signFlag
+ "Answer the sign flag bit. The sign flag bit may be
+ used by the VM to select an alternate bytecode set."
+
+ ^self header < 0!
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.670.mcz
==================== Summary ====================
Name: Kernel-eem.670
Author: eem
Time: 19 February 2012, 11:03:50.709 am
UUID: 18d57d21-e007-4be6-b076-13d011b90565
Ancestors: Kernel-eem.669
Add accessors for a CompiledsMethod header's sign bit.
The sign bit is useful for experiments but may also be used
to select an alternate bytecode set in the VM, e.g. for
supporting multiple languages or evolving the bytecode set.
=============== Diff against Kernel-eem.669 ===============
Item was added:
+ ----- Method: CompiledMethod>>clearSignFlag (in category 'accessing') -----
+ clearSignFlag
+ "Clear the sign flag bit. The sign flag bit may be
+ used by the VM to select an alternate bytecode set."
+
+ self signFlag ifTrue:
+ [self objectAt: 1 put: self header - SmallInteger minVal]!
Item was added:
+ ----- Method: CompiledMethod>>setSignFlag (in category 'accessing') -----
+ setSignFlag
+ "Set the sign flag bit. The sign flag bit may be
+ used by the VM to select an alternate bytecode set."
+
+ self signFlag ifFalse:
+ [self objectAt: 1 put: self header + SmallInteger minVal]!
Item was added:
+ ----- Method: CompiledMethod>>signFlag (in category 'accessing') -----
+ signFlag
+ "Answer the sign flag bit. The sign flag bit may be
+ used by the VM to select an alternate bytecode set."
+
+ ^self header < 0!