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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ matrix:
env: BUILD_NAME=Squeak-5.2
- smalltalk: Squeak32-5.1
env: BUILD_NAME=Squeak-5.1
- smalltalk: GemStone-3.5.2
- smalltalk: GemStone-3.5.4
env: BUILD_NAME=GemStone-3.5.2
- smalltalk: GemStone-3.4.5
env: BUILD_NAME=GemStone-3.4.5
Expand Down
5 changes: 2 additions & 3 deletions repository/BaselineOfGrease.package/.filetree
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"separateMethodMetaAndSource" : false,
"noMethodMetaData" : true,
"useCypressPropertiesFile" : true
}
"separateMethodMetaAndSource" : false,
"useCypressPropertiesFile" : true }
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ baselineGemStone: spec
requires: #('Grease-GemStone-Core');
postLoadDoIt: #'initializeLatin1ToUtf8Encodings' ] ].
spec
for: #(#'gs3.3.x' #'gs3.4.x' #'gs3.5.x' #'gs3.6.x')
for: #(#'gs3.3.x' #'gs3.4.x' #'gs3.5.x')
do: [
spec
package: 'Grease-GemStone-Core'
Expand All @@ -89,6 +89,17 @@ baselineGemStone: spec
spec
requires: #('Grease-GemStone-Core');
postLoadDoIt: #'initializeLatin1ToUtf8Encodings' ] ].
spec
for: #(#'gs3.6.x')
do: [
spec
package: 'Grease-GemStone-Core'
with: [ spec includes: #('Grease-GemStone360-Core') ];
package: 'Grease-GemStone360-Core'
with: [
spec
requires: #('Grease-GemStone-Core');
postLoadDoIt: #'initializeLatin1ToUtf8Encodings' ] ].
spec
for: #(#'gs3.2.x' #'gs3.3.x' #'gs3.4.x' #'gs3.5.x' #'gs3.6.x')
do: [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
projectClass
Smalltalk at: #'MetacelloCypressBaselineProject' ifPresent: [ :cl | ^ cl ].
^ super projectClass
^ super projectClass
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{
"commentStamp" : "",
"super" : "BaselineOf",
"category" : "BaselineOfGrease",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
],
"name" : "BaselineOfGrease",
"type" : "normal"
}
"pools" : [
],
"super" : "BaselineOf",
"type" : "normal" }
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SystemOrganization addCategory: #BaselineOfGrease!
SystemOrganization addCategory: #'BaselineOfGrease'!
3 changes: 2 additions & 1 deletion repository/BaselineOfGrease.package/properties.json
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
{ }
{
}
4 changes: 4 additions & 0 deletions repository/Grease-GemStone360-Core.package/.filetree
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"noMethodMetaData" : true,
"separateMethodMetaAndSource" : false,
"useCypressPropertiesFile" : true }
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*grease-gemstone360-core
comment
"override new 3.6.0 comment implementation (answers default GemSTone class comment for
class instead of nil) and restore pre-3.6.0 behavior (answer nil if no comment
defined)"

"https://github.com/SeasideSt/Grease/issues/111"

^ self commentForFileout
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
"name" : "Class" }
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*grease-gemstone360-core
greaseString

^self description
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*grease-gemstone360-core
messageText
"override new 3.6.0 messageText implementation to restore pre-3.6.0 behavior"
"https://github.com/SeasideSt/Grease/issues/111"
^ gsDetails
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
"name" : "Exception" }
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*grease-gemstone360-core
argumentCount

^self numArgs.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
*grease-gemstone360-core
ifCurtailed: aBlock

| wasCurtailed |
wasCurtailed := true.
[
self value.
wasCurtailed := false.
] ensure: [
wasCurtailed ifTrue: aBlock.
].
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*grease-gemstone360-core
valueWithPossibleArguments: anArray
"Evaluate the block represented by the receiver with the arguments provided."
| n args |
(n := self numArgs) == 0 ifTrue: [^self value].
args := anArray copy
size: n;
yourself.
^ self valueWithArguments: args.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
"name" : "ExecBlock" }
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*grease-gemstone360-core
gemstoneExceptionSelector

^ (ExceptionSet new) , Halt, AlmostOutOfStack, Breakpoint
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*grease-gemstone360-core
generateHardBreak
"Generate a GemStone hard break"

^Break signal: 'interrupted for Seaside debugging'
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*grease-gemstone360-core
handlesAlmostOutOfStackException: anException

^AlmostOutOfStack handles: anException
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*grease-gemstone360-core
handlesBreakpointException: anException

^Breakpoint handles: anException
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*grease-gemstone360-core
handlesHaltException: anException

^Halt handles: anException
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
"name" : "GRGemStonePlatform" }
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
initialization
initialize
"self initialize"

Latin1ToUtf8Encodings := Array new: 256.
1 to: 256 do: [ :index |
index > 128
ifTrue: [
Latin1ToUtf8Encodings
at: index
put:
(String with: (Character codePoint: index - 1)) encodeAsUTF8 asString ] ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
streaming
crlf
binary
ifTrue: [
stream nextPut: 13.
stream nextPut: 10 ]
ifFalse: [
stream nextPut: Character cr.
stream nextPut: Character lf ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
private
invalidUtf8
^GRInvalidUtf8Error signal: 'Invalid UTF-8 input'
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
streaming
next: anInteger
"Convert the given string from UTF-8 using the fast path if converting to Latin-1"
| outStream byte1 byte2 byte3 byte4 unicode count |
outStream := WriteStream on: (String new: anInteger).
count := 0.
[ count < anInteger and: [ stream atEnd not ] ] whileTrue: [
byte1 := stream next.
unicode := byte1.
(byte1 bitAnd: 16rE0) = 192 ifTrue: [ "two bytes"
byte2 := stream next.
(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.
(byte2 bitAnd: 16rC0) = 16r80 ifFalse: [ self invalidUtf8 ].
byte3 := stream next.
(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.
(byte2 bitAnd: 16rC0) = 16r80 ifFalse: [ self invalidUtf8 ].
byte3 := stream next.
(byte3 bitAnd: 16rC0) = 16r80 ifFalse: [ self invalidUtf8 ].
byte4 := stream next.
(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).
count := count + 1 ].
unicode := nil ].
^outStream contents
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
streaming
nextPut: aCharacter
"old implementation is very slow !!"

" self nextPutAll: (String with: aCharacter)"

| codePoint |
codePoint := aCharacter codePoint.
codePoint > 127
ifTrue: [
codePoint > 255
ifTrue: [
| str |
str := (String with: aCharacter) encodeAsUTF8intoString.
stream nextPutAll: str ]
ifFalse: [ stream nextPutAll: (Latin1ToUtf8Encodings at: codePoint + 1) ] ]
ifFalse: [ stream nextPut: aCharacter ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
streaming
nextPutAll: aString
binary
ifTrue: [ stream nextPutAll: aString asString ]
ifFalse: [ stream nextPutAll: aString _encodeAsUTF8intoString ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"category" : "Grease-GemStone360-Core",
"classinstvars" : [
],
"classvars" : [
"Latin1ToUtf8Encodings" ],
"commentStamp" : "",
"instvars" : [
],
"name" : "GRUtf8CodecStream",
"pools" : [
],
"super" : "GRTextOrBinaryCodecStream",
"type" : "normal" }
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SystemOrganization addCategory: #'Grease-GemStone360-Core'!
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(name 'Grease-GemStone360-Core')
2 changes: 2 additions & 0 deletions repository/Grease-GemStone360-Core.package/properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}