X Tutup
Skip to content

Commit 755dd9a

Browse files
committed
Merge branch 'dev'
2 parents 393d061 + ed1c77d commit 755dd9a

File tree

5 files changed

+39
-28
lines changed

5 files changed

+39
-28
lines changed
Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
initialization
22
initialize
3-
Latin1ToUtf8Encodings := (Array new: 256).
4-
1 to: 256 do:[ :index | index > 128 ifTrue: [Latin1ToUtf8Encodings at: index put: (String with: (Character codePoint: index - 1)) encodeAsUTF8 asString] ]
3+
"self initialize"
4+
5+
Latin1ToUtf8Encodings := Array new: 256.
6+
1 to: 256 do: [ :index |
7+
index > 128
8+
ifTrue: [
9+
Latin1ToUtf8Encodings
10+
at: index
11+
put:
12+
(String with: (Character codePoint: index - 1)) encodeAsUTF8intoString ] ]
Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
streaming
22
nextPut: aCharacter
3-
"old implementation is very slow !!"
4-
" self nextPutAll: (String with: aCharacter)"
5-
| codePoint |
6-
codePoint := aCharacter codePoint.
7-
codePoint > 127
3+
"old implementation is very slow !!"
4+
5+
" self nextPutAll: (String with: aCharacter)"
6+
7+
| codePoint |
8+
codePoint := aCharacter codePoint.
9+
codePoint > 127
10+
ifTrue: [
11+
codePoint > 255
812
ifTrue: [
9-
codePoint > 255
10-
ifTrue: [ | enc str |
11-
enc := (String with: aCharacter) encodeAsUTF8.
12-
str := String new: enc size.
13-
1 to: enc size do: [:idx | str at: idx put: (Character value: (enc at: idx)) ].
14-
stream nextPutAll: str ]
15-
ifFalse: [ stream nextPutAll: (Latin1ToUtf8Encodings at: codePoint + 1) ] ]
16-
ifFalse: [ stream nextPut: aCharacter ]
13+
| str |
14+
str := (String with: aCharacter) encodeAsUTF8intoString.
15+
stream nextPutAll: str ]
16+
ifFalse: [ stream nextPutAll: (Latin1ToUtf8Encodings at: codePoint + 1) ] ]
17+
ifFalse: [ stream nextPut: aCharacter ]
Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
streaming
22
nextPutAll: aString
3-
"conversion of smaller string is faster if not using the changeClassTo: trick"
4-
binary
5-
ifTrue: [ stream nextPutAll: aString asString ]
6-
ifFalse: [ aString size > 8
7-
ifTrue: [ stream nextPutAll: (aString encodeAsUTF8 changeClassTo: String) ]
8-
ifFalse: [ | enc str | enc := aString encodeAsUTF8.
9-
str := String new: enc size.
10-
1 to: enc size do: [:idx | str at: idx put: (Character value: (enc at: idx)) ].
11-
stream nextPutAll: str ] ]
3+
"conversion of smaller string is faster if not using the changeClassTo: trick"
4+
5+
binary
6+
ifTrue: [ stream nextPutAll: aString asString ]
7+
ifFalse: [
8+
aString size > 8
9+
ifTrue: [ stream nextPutAll: (aString encodeAsUTF8 changeClassTo: String) ]
10+
ifFalse: [
11+
| str |
12+
str := aString encodeAsUTF8intoString.
13+
stream nextPutAll: str ] ]
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"class" : {
3-
"initialize" : "JohanBrichau 10/19/2014 08:31" },
3+
"initialize" : "dkh 06/15/2015 10:48" },
44
"instance" : {
55
"crlf" : "dkh 11/06/2009 08:45",
66
"invalidUtf8" : "dkh 11/06/2009 08:45",
77
"next:" : "DaleHenrichs 08/27/2010 10:45",
8-
"nextPut:" : "JohanBrichau 10/19/2014 08:31",
9-
"nextPutAll:" : "JohanBrichau 10/19/2014 08:31" } }
8+
"nextPut:" : "dkh 06/15/2015 10:44",
9+
"nextPutAll:" : "dkh 06/15/2015 10:45" } }

repository/Grease-GemStone300-Core.package/monticello.meta/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
(name 'Grease-GemStone300-Core-JohanBrichau.5' message 'Fix for slow handling of utf8 encoding in GS3.x (see https://github.com/GsDevKit/Grease/issues/2 )' id 'a1323a4e-ce99-4e85-bf25-ffeaaa9463f5' date '10/19/2014' time '08:40:18' author 'JohanBrichau' ancestors ((name 'Grease-GemStone300-Core-dkh.4' message '1.0.6.1 (dkh.159):- GemStone 3.0.1 fix for Issue 130: remote breakpoints don''''t work http://code.google.com/p/glassdb/issues/detail?id=130' id '5c8d2bf0-4319-4099-b4b1-83abcc7195b0' date '10/14/2011' time '17:52:12' author 'dkh' ancestors ((name 'Grease-GemStone300-Core-dkh.3' message '1.0.6.1 (dkh.159):- port to GemStone 3.0.1 (#generatehardBreak changed for 3.0)' id '2c389d30-c4d2-4def-b488-82d82b241d1d' date '10/14/2011' time '17:04:58' author 'dkh' ancestors ((name 'Grease-GemStone300-Core-DaleHenrichs.2' message '- pick up some missing methods' id 'a36f8f57-31fc-4a76-84d8-d68331d70935' date '07/22/1910' time '16:42:48' author 'DaleHenrichs' ancestors ((name 'Grease-GemStone300-Core-DaleHenrichs.1' message '- Exception>>greaseString is gemstone version specific' id '0a2c8aaf-061e-45b6-8070-54e4b203adf3' date '07/22/1910' time '14:18:53' author 'DaleHenrichs' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())
1+
(name 'Grease-GemStone300-Core-dkh.6' message 'Missed some spots in Grease relating to the fix for https://github.com/GsDevKit/GsDevKit/issues/27' id 'af0b39f3-714b-4b01-9c72-7536a3c128e8' date '06/15/2015' time '10:56:56' author 'dkh' ancestors ((name 'Grease-GemStone300-Core-JohanBrichau.5' message 'Fix for slow handling of utf8 encoding in GS3.x (see https://github.com/GsDevKit/Grease/issues/2 )' id 'a1323a4e-ce99-4e85-bf25-ffeaaa9463f5' date '10/19/2014' time '08:40:18' author 'JohanBrichau' ancestors ((name 'Grease-GemStone300-Core-dkh.4' message '1.0.6.1 (dkh.159):- GemStone 3.0.1 fix for Issue 130: remote breakpoints don''''t work http://code.google.com/p/glassdb/issues/detail?id=130' id '5c8d2bf0-4319-4099-b4b1-83abcc7195b0' date '10/14/2011' time '17:52:12' author 'dkh' ancestors ((name 'Grease-GemStone300-Core-dkh.3' message '1.0.6.1 (dkh.159):- port to GemStone 3.0.1 (#generatehardBreak changed for 3.0)' id '2c389d30-c4d2-4def-b488-82d82b241d1d' date '10/14/2011' time '17:04:58' author 'dkh' ancestors ((name 'Grease-GemStone300-Core-DaleHenrichs.2' message '- pick up some missing methods' id 'a36f8f57-31fc-4a76-84d8-d68331d70935' date '07/22/1910' time '16:42:48' author 'DaleHenrichs' ancestors ((name 'Grease-GemStone300-Core-DaleHenrichs.1' message '- Exception>>greaseString is gemstone version specific' id '0a2c8aaf-061e-45b6-8070-54e4b203adf3' date '07/22/1910' time '14:18:53' author 'DaleHenrichs' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())

0 commit comments

Comments
 (0)
X Tutup