Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ jobs:
strategy:
fail-fast: false
matrix:
smalltalk: [ Pharo64-9.0, Pharo64-8.0, Pharo64-7.0, Pharo-6.1, GemStone64-3.6.1, GemStone64-3.5.6, GemStone64-3.4.5, GemStone64-3.3.9, GemStone64-3.2.17, GemStone64-3.1.0.6, Squeak64-5.3, Squeak64-5.2, Squeak64-5.1 ]
smalltalk: [ Pharo64-10, Pharo64-9.0, Pharo64-8.0, Pharo64-7.0, Pharo-6.1, GemStone64-3.6.3, GemStone64-3.5.7, GemStone64-3.4.5, GemStone64-3.3.9, GemStone64-3.2.17, GemStone64-3.1.0.6, Squeak64-5.3, Squeak64-5.2, Squeak64-5.1 ]
experimental: [ false ]
include:
- smalltalk: Squeak64-trunk
experimental: true
- smalltalk: Pharo64-10
experimental: true
continue-on-error: ${{ matrix.experimental }}
name: ${{ matrix.smalltalk }}
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ baselinePharo: spec
group: 'Slime Tests' with: #('Grease-Tests-Slime') ].

spec
for: #'pharo9.x'
for: #(#'pharo9.x')
do: [
spec
package: 'Grease-Core' with: [ spec includes: #('Grease-Pharo90-Core') ];
Expand All @@ -58,6 +58,24 @@ baselinePharo: spec
package: 'Grease-Pharo90-Slime' with: [ spec requires: #('Grease-Core') ];
package: 'Grease-Tests-Slime' with: [ spec requires: #('Grease-Pharo90-Slime') ].

spec
group: 'Slime' with: #('Grease-Pharo90-Slime');
group: 'Slime Tests' with: #('Grease-Tests-Slime') ].

spec
for: #(#'pharo10.x')
do: [
spec
package: 'Grease-Core' with: [ spec includes: #('Grease-Pharo10-Core') ];
package: 'Grease-Tests-Pharo-Core' with: [ spec requires: #('Grease-Tests-Core') ];
package: 'Grease-Tests-Core'
with: [ spec
requires: #('Grease-Pharo10-Core');
includes: #('Grease-Tests-Pharo-Core') ];
package: 'Grease-Pharo10-Core' with: [ spec requires: #('Grease-Core') ];
package: 'Grease-Pharo90-Slime' with: [ spec requires: #('Grease-Core') ];
package: 'Grease-Tests-Slime' with: [ spec requires: #('Grease-Pharo90-Slime') ].

spec
group: 'Slime' with: #('Grease-Pharo90-Slime');
group: 'Slime Tests' with: #('Grease-Tests-Slime') ].
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ version info
version
"Answer the Grease version"

^ (GRVersion major: 1 minor: 7 revision: 5)
^ (GRVersion major: 1 minor: 8 revision: 0)
yourself
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"category" : "Grease-GemStone-Core",
"classinstvars" : [
"mutex",
"generator" ],
],
"classvars" : [
],
"commentStamp" : "",
Expand Down
5 changes: 5 additions & 0 deletions repository/Grease-Pharo10-Core.package/.filetree
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"separateMethodMetaAndSource" : false,
"noMethodMetaData" : true,
"useCypressPropertiesFile" : true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*Grease-Pharo10-Core
fullName
"In VW, will include the namespace"

^ self name
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "Behavior"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
*Grease-Pharo10-Core
valueWithPossibleArguments: anArray
| args |
(anArray size == self numArgs)
ifTrue: [ ^ self valueWithArguments: anArray ].
args := Array new: self numArgs.
args replaceFrom: 1
to: (anArray size min: args size)
with: anArray
startingAt: 1.
^ self valueWithArguments: args
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "BlockClosure"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*Grease-Pharo10-Core
greaseString
"ByteArrays should not automatically be converted to Strings. You should use a GRCodec for this."
^ self printString
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "ByteArray"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*Grease-Pharo10-Core
greaseInteger
"Answer an unicode code point of the receiver."
^ self charCode
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "Character"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*Grease-Pharo10-Core
any
^ self anyOne
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "Collection"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*Grease-Pharo10-Core
asHTMLColor
^'#', self asHexString
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "Color"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*Grease-Pharo10-Core
milliseconds: anInteger
^ self milliSeconds: anInteger
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*Grease-Pharo10-Core
asMilliseconds
^ self asMilliSeconds
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*Grease-Pharo10-Core
milliseconds
^ nanos quo: NanosInMillisecond
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "Duration"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*Grease-Pharo10-Core
greaseNext: anInteger putAll: aCollection startingAt: startIndex
stream greaseNext: anInteger putAll: aCollection startingAt: startIndex
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "GRDelegatingStream"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
defaults
defaultValue
^ nil
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
accessing
use: anObject during: aBlock
^ self
value: anObject
during: aBlock
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
default
^ self class defaultValue
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commentStamp" : "",
"super" : "DynamicVariable",
"category" : "Grease-Pharo10-Core",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "GRDynamicVariable",
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*Grease-Pharo10-Core
greasePharo70Core
^ self new
name: 'Grease-Pharo90-Core';
addDependency: 'Grease-Core';
url: #greaseUrl;
yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "GRPackage"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
A WAConverterCodecStream is a WACodec stream around a TextConverter. It is always in text mode.

Instance Variables
converter: <TextConverter>

converter
- the TextConverter used to do the encoding conversion
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
instance creation
on: aStream converter: aConverter
^ self basicNew initializeOn: aStream converter: aConverter
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
streaming
greaseNext: anInteger putAll: aCollection startingAt: startIndex
self nextPutAll: (aCollection copyFrom: startIndex to: startIndex + anInteger - 1)
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
initialization
initializeOn: aStream converter: aConverter
self initializeOn: aStream.
converter := aConverter
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
streaming
next: anInteger
| writeStream |
writeStream := WriteStream on: (String new: anInteger).
anInteger timesRepeat: [
writeStream nextPut: (self next
ifNil: [ ^ writeStream contents ]) ].
^ writeStream contents
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
streaming
next
| character |
character := converter nextFromStream: stream.
^ character isNil
ifFalse: [ character asCharacter ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
streaming
nextPut: aCharacter
converter nextPut: aCharacter asCharacter toStream: stream
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
streaming
nextPutAll: aString
aString asString do: [ :each | self nextPut: each ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"commentStamp" : "pmm 6/25/2012 20:22",
"super" : "GRCodecStream",
"category" : "Grease-Pharo10-Core",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [
"converter"
],
"name" : "GRPharoConverterCodecStream",
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
private
basicForEncoding: aString
^ self new
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
accessing
codecs
^ GRPlatform current utf8CodecClass == self
ifTrue:[ Array with: self new ]
ifFalse: [ Array new ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
testing
supportsEncoding: aString
^ GRPlatform current utf8CodecClass == self and: [(#('utf-8' 'UTF-8') includes: aString) or: [ UTF8TextConverter encodingNames includes: aString ] ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
convenience
decode: aString
"Convert the given string from UTF-8 using the fast path if converting to Latin-1"
| outStream byte1 byte2 byte3 byte4 unicode stream |
stream := aString readStream.
outStream := WriteStream on: (String new: aString size).
[ stream atEnd not ] whileTrue: [
byte1 := stream next asInteger.
unicode := byte1.
(byte1 bitAnd: 16rE0) = 192 ifTrue: [ "two bytes"
byte2 := stream next asInteger.
(byte2 bitAnd: 16rC0) = 16r80 ifFalse: [ self invalidUtf8 ].
unicode := ((byte1 bitAnd: 31) bitShift: 6) + (byte2 bitAnd: 63) ].
(byte1 bitAnd: 16rF0) = 224 ifTrue: [ "three bytes"
byte2 := stream next asInteger.
(byte2 bitAnd: 16rC0) = 16r80 ifFalse: [ self invalidUtf8 ].
byte3 := stream next asInteger.
(byte3 bitAnd: 16rC0) = 16r80 ifFalse: [ self invalidUtf8 ].
unicode := ((byte1 bitAnd: 15) bitShift: 12) + ((byte2 bitAnd: 63) bitShift: 6)
+ (byte3 bitAnd: 63) ].
(byte1 bitAnd: 16rF8) = 240 ifTrue: [ "four bytes"
byte2 := stream next asInteger.
(byte2 bitAnd: 16rC0) = 16r80 ifFalse: [ self invalidUtf8 ].
byte3 := stream next asInteger.
(byte3 bitAnd: 16rC0) = 16r80 ifFalse: [ self invalidUtf8 ].
byte4 := stream next asInteger.
(byte4 bitAnd: 16rC0) = 16r80 ifFalse: [ self invalidUtf8 ].
unicode := ((byte1 bitAnd: 16r7) bitShift: 18) +
((byte2 bitAnd: 63) bitShift: 12) +
((byte3 bitAnd: 63) bitShift: 6) +
(byte4 bitAnd: 63) ].
unicode ifNil: [ self invalidUtf8 ].
unicode = 16rFEFF "ignore BOM" ifFalse: [
outStream nextPut: (Character codePoint: unicode) ].
unicode := nil ].
^ outStream contents
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
convenience
decoderFor: aStream
^ GRPharoDeprecatedUtf8CodecStream
on: aStream
converter: UTF8TextConverter new
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
conversion
encodedStringClass
^ String
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
convenience
encoderFor: aStream
^ GRPharoDeprecatedUtf8CodecStream
on: aStream
converter: UTF8TextConverter new
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
convenience
invalidUtf8
^ GRInvalidUtf8Error signal: 'Invalid UTF-8 input'
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
name
^ 'utf-8'
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
url
^ self
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commentStamp" : "",
"super" : "GRCodec",
"category" : "Grease-Pharo10-Core",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "GRPharoDeprecatedUtf8Codec",
"type" : "normal"
}
Loading