diff --git a/bin/libgcirpc-3.5.5-32.dll b/bin/libgcirpc-3.5.5-32.dll new file mode 100755 index 00000000..a4448920 Binary files /dev/null and b/bin/libgcirpc-3.5.5-32.dll differ diff --git a/bin/libssl-3.5.5-32.dll b/bin/libssl-3.5.5-32.dll new file mode 100755 index 00000000..fc02802d Binary files /dev/null and b/bin/libssl-3.5.5-32.dll differ diff --git a/sources/GemStone C Interface.pax b/sources/GemStone C Interface.pax index 76143ad5..c5bf0658 100644 --- a/sources/GemStone C Interface.pax +++ b/sources/GemStone C Interface.pax @@ -77,6 +77,7 @@ package classNames add: #LibGciRpc64_3_5_2; add: #LibGciRpc64_3_5_3; add: #LibGciRpc64_3_5_4; + add: #LibGciRpc64_3_5_5; add: #LibGciRpc64_3_6_0; add: #LibGciTs_3_3; add: #OopType32; @@ -431,6 +432,11 @@ LibGciRpc64_3_4_0 subclass: #LibGciRpc64_3_5_4 classVariableNames: '' poolDictionaries: '' classInstanceVariableNames: ''! +LibGciRpc64_3_4_0 subclass: #LibGciRpc64_3_5_5 + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + classInstanceVariableNames: ''! LibGciRpc64_3_4_0 subclass: #LibGciRpc64_3_6_0 instanceVariableNames: '' classVariableNames: '' diff --git a/sources/JadeImageStripper.cls b/sources/JadeImageStripper.cls index d91613da..d9198edd 100644 --- a/sources/JadeImageStripper.cls +++ b/sources/JadeImageStripper.cls @@ -53,7 +53,7 @@ createVersionResource at: '040904b0' put: (LookupTable new at: 'CompanyName' put: 'Foster Agile LLC'; - at: 'FileDescription' put: 'IDE for GemStone/S'; + at: 'FileDescription' put: 'Jade - IDE for GemStone/S'; at: 'FileVersion' put: versionString; at: 'InternalName' put: 'Jade'; at: 'LegalCopyright' put: 'Copyright © James Foster 2001-2021'; diff --git a/sources/JadeSessionManager.cls b/sources/JadeSessionManager.cls index 74ee578a..ae45d6a0 100644 --- a/sources/JadeSessionManager.cls +++ b/sources/JadeSessionManager.cls @@ -53,10 +53,23 @@ getVersion " JadeSessionManager getVersion. " - | string | + | string1 string2 | File workingDirectory: SessionManager current imageBase. - string := [SessionManager current class git: 'describe'] on: ExternalProcessExecuteError do: [:ex | ^'?<' , ex description , '>?']. - ^(ReadStream on: string) nextLine + string1 := [self gitDescribe: '.'] on: ExternalProcessExecuteError do: [:ex | ex return: '???']. + string2 := [self gitDescribe: '..'] on: ExternalProcessExecuteError do: [:ex | ex return: '???']. + ^(ReadStream on: string1) nextLine , ' (Dolphin ' , (ReadStream on: string2) nextLine , ')' +! + +gitDescribe: directoryString + + | outputPipe process | + process := ExternalProcess new. + process directory: directoryString. + process commandLine: 'git describe'. + outputPipe := process stdoutPipe. + process executeSync. + [process isTerminated] whileFalse: []. + ^outputPipe readStream contents ! mainShellClass @@ -75,6 +88,7 @@ version ifFalse: ['Development']. ! ! !JadeSessionManager class categoriesFor: #getVersion!public! ! +!JadeSessionManager class categoriesFor: #gitDescribe:!public! ! !JadeSessionManager class categoriesFor: #mainShellClass!public! ! !JadeSessionManager class categoriesFor: #setVersion!public! ! !JadeSessionManager class categoriesFor: #version!public! ! diff --git a/sources/LibGciRpc64.cls b/sources/LibGciRpc64.cls index 9e2162d9..e6256603 100644 --- a/sources/LibGciRpc64.cls +++ b/sources/LibGciRpc64.cls @@ -413,18 +413,10 @@ oopZero specialFromOop: anOop - anOop isBoolean ifTrue: [ - ^anOop = self oopTrue. - ]. - anOop isCharacter ifTrue: [ - ^Character value: (self gciOopToChr: anOop). - ]. - anOop isSmallInteger ifTrue: [ - ^anOop asSmallInteger. - ]. - anOop isSmallDouble ifTrue: [ - ^anOop smallDoubleAsFloat. - ]. + anOop isBoolean ifTrue: [^anOop = self oopTrue]. + anOop isCharacter ifTrue: [^Character value: (self gciOopToChr: anOop)]. + anOop isSmallInteger ifTrue: [^anOop asSmallInteger]. + anOop isSmallDouble ifTrue: [^anOop smallDoubleAsFloat]. ^nil. ! ! !LibGciRpc64 categoriesFor: #errorStructureClass!private! ! diff --git a/sources/LibGciRpc64_3_3_0.cls b/sources/LibGciRpc64_3_3_0.cls index ae2d508a..ef6e90d8 100755 --- a/sources/LibGciRpc64_3_3_0.cls +++ b/sources/LibGciRpc64_3_3_0.cls @@ -168,9 +168,7 @@ session: anInteger oopForString: aString specialFromOop: anOop - anOop isSmallFraction ifTrue: [ - ^anOop asFraction. - ]. + anOop isSmallFraction ifTrue: [^anOop asFraction]. ^super specialFromOop: anOop ! diff --git a/sources/LibGciRpc64_3_5_5.cls b/sources/LibGciRpc64_3_5_5.cls new file mode 100755 index 00000000..5562eb38 --- /dev/null +++ b/sources/LibGciRpc64_3_5_5.cls @@ -0,0 +1,10 @@ +"Filed out from Dolphin Smalltalk 7"! + +LibGciRpc64_3_4_0 subclass: #LibGciRpc64_3_5_5 + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + classInstanceVariableNames: ''! +LibGciRpc64_3_5_5 guid: (GUID fromString: '{3ec23701-b628-4aca-82cb-95a84118acf6}')! +LibGciRpc64_3_5_5 comment: ''! +!LibGciRpc64_3_5_5 categoriesForClass!Unclassified! ! diff --git a/sources/LibGciRpc64_3_6_0.cls b/sources/LibGciRpc64_3_6_0.cls index 0f4acc55..258f40be 100755 --- a/sources/LibGciRpc64_3_6_0.cls +++ b/sources/LibGciRpc64_3_6_0.cls @@ -8,3 +8,15 @@ LibGciRpc64_3_4_0 subclass: #LibGciRpc64_3_6_0 LibGciRpc64_3_6_0 guid: (GUID fromString: '{11934b97-bac4-4eb9-8a55-2080654d1d72}')! LibGciRpc64_3_6_0 comment: ''! !LibGciRpc64_3_6_0 categoriesForClass!Unclassified! ! +!LibGciRpc64_3_6_0 methodsFor! + +specialFromOop: anOop + + anOop isSmallScaledDecimal ifTrue: [^anOop asScaledDecimal ]. + anOop isSmallDateAndTime ifTrue: [^anOop asDateAndTime ]. + anOop isSmallTime ifTrue: [^anOop asTime ]. + anOop isSmallDate ifTrue: [^anOop asDate ]. + ^super specialFromOop: anOop +! ! +!LibGciRpc64_3_6_0 categoriesFor: #specialFromOop:!public! ! + diff --git a/sources/OopType64.cls b/sources/OopType64.cls index 457c5eed..4c6b216a 100644 --- a/sources/OopType64.cls +++ b/sources/OopType64.cls @@ -29,6 +29,64 @@ OopType64 comment: '#define OOP_TAG_RAM_OOP 0x0 /* 2r000 memory pointer Obj self value = anOopType64 value] "Don't use == since OopType might not be a SmallInteger" ! +asDate + "Delegate is assumed to represent a server SmallDate. + Answer the corresponding local Date. + + SmallDate represents instances of Date with year representable in 47 bits + The bit format of an instance is + yyyyyyyy|yyyyyyyy|yyyyyyyy|yyyyyyyy|yyyyyyyy|yyyyyyyd|dddddddd|01001100 + bits d 9 bits unsigned integer dayOfYear + bits y 47 bits signed, holding a 31 bit signed integer year. + + This means that oop byte 1 can be ignored, since it just contains redundant sign bits." + + | myBytes highByte splitByte day year | + myBytes := bytes reverse. + highByte := myBytes at: 2. "If the sign bit is negative, start it with a pre-shifted -1, otherwise with a pre-shifted 0, which is 0" + splitByte := myBytes at: 6. + year := ((((highByte ~~ 0 ifTrue: [-16r1] ifFalse: [0]) * 16r100 + + (myBytes at: 3)) * 16r100 + + (myBytes at: 4)) * 16r100 + + (myBytes at: 5)) * 16r80 + + (splitByte bitShift: -1). + day := (splitByte bitAnd: 16r1) * 16r100 + (myBytes at: 7). + ^Date newDay: day year: year. +! + +asDateAndTime + "OOP is assumed to represent a server SmallDateAndTime. + Answer the corresponding local DateAndTime. + + A SmallDateAndTime is a DateAndTime whose offset in hours is in the range -16..15 + and whose time is in the range 2001 to 2072 . + The resolution is 1 microsecond. + + The bit format of an instance is + tttttttt|tttttttt|tttttttt|tttttttt|tttttttt|tttttttt|tttooooo|00111100 + bits o 5 bits signed offset from UTC in hours + bits t 51 bits unsigned time since 2001 in units of microseconds." + + | myBytes oneCenturyMilliseconds microseconds byte0 offset | + myBytes := bytes reverse. + oneCenturyMilliseconds := 3155760000000000. "100 y x 365.25d/y x 86400 s/d x 1000000 ms/s" + byte0 := myBytes at: 7. + offset := byte0 bitAnd: 2r11111. + "Convert 5 bits two's complement back to signed integer." + offset > 15 ifTrue: [offset := (offset - 1 bitXor: 2r11111) negated]. + microseconds := (((((( + (myBytes at: 1)) * 16r100 + + (myBytes at: 2)) * 16r100 + + (myBytes at: 3)) * 16r100 + + (myBytes at: 4)) * 16r100 + + (myBytes at: 5)) * 16r100 + + (myBytes at: 6)) * 16r8 + + (byte0 bitShift: -5). + ^DateAndTime + utcSeconds: microseconds + oneCenturyMilliseconds / 1000000 + offset: offset * 3600. +! + asFraction "SmallFractions are special objects that can represent Fractions with -268435456 <= numerator <= 268435455 @@ -55,6 +113,34 @@ asFraction ^fraction ! +asScaledDecimal + "Oop is assumed to represent a server SmallScaledDecimal. + Answer the corresponding local ScaledDecimal. + + SmallScaledDecimal is used to represent ScaledDecimals that have + scale <= 31 and mantissa in the range -1125899906842624..1125899906842623 . + The bit format of an instances is + mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmmmmmm|mmmsssss|00110100 + bits m 51 bit signed integer mantissa + s 5 bit unsigned scale." + + | myBytes highByte lowByte mantissa scale | + myBytes := bytes reverse. + highByte := myBytes at: 1. "If the sign bit is negative, start it with a pre-shifted -1, otherwise with a pre-shifted 0, which is 0" + lowByte := myBytes at: 7. + mantissa := ((((((((highByte bitAnd: 16r80) ~~ 0 + ifTrue: [-16r100] + ifFalse: [0]) + highByte) + * 16r100 + (myBytes at: 2)) + * 16r100 + (myBytes at: 3)) + * 16r100 + (myBytes at: 4)) + * 16r100 + (myBytes at: 5)) + * 16r100 + (myBytes at: 6)) + * 16r8 + (lowByte bitShift: -5). + scale := lowByte bitAnd: 16r1F. + ^ScaledDecimal newFromNumber: mantissa / (10 raisedTo: scale) scale: scale +! + asSmallInteger | value myBytes | @@ -67,6 +153,27 @@ asSmallInteger ^value >> 3. ! +asTime + "OOP is assumed to represent a server SmallTime. + Answer the corresponding local Time. + + The bit format of an instance is + tttttttt|tttttttt|tttttttt|tttttttt|tttttttt |tttttttt|tttttttt| 01000100 + bits t 56 bits unsigned integer , local time since midnight , units microseconds + The maximum value of local time is 86399999999 . + + Thus, the upper two bytes will always be zero and can be ignored here." + + | myBytes microseconds | + myBytes := bytes reverse. + microseconds := ((( + (myBytes at: 3) * 16r100 + + (myBytes at: 4)) * 16r100 + + (myBytes at: 5)) * 16r100 + + (myBytes at: 6)) * 16r100 + + (myBytes at: 7). + ^Time fromSeconds: microseconds / 1000000! + isBoolean "#define OOP_FALSE ((OopType)0x0C) #define OOP_TRUE ((OopType)0x10C) @@ -93,6 +200,16 @@ isOopIllegal ^self value = 1. ! +isSmallDate + + ^(self value bitAnd: 16rFF) = 2r01001100 +! + +isSmallDateAndTime + + ^(self value bitAnd: 16rFF) = 2r00111100 +! + isSmallDouble ^(self value bitAnd: 7) = 6. @@ -100,7 +217,7 @@ isSmallDouble isSmallFraction - ^(self value bitAnd: 16rFF) = 16r2C. + ^(self value bitAnd: 16rFF) = 2r00101100 "16r2C" ! isSmallInteger @@ -109,6 +226,16 @@ isSmallInteger ! +isSmallScaledDecimal + + ^(self value bitAnd: 16rFF) = 2r00110100 +! + +isSmallTime + + ^(self value bitAnd: 16rFF) = 2r01000100 +! + isSpecial "true,false,nil, Char, JISChar" @@ -143,19 +270,27 @@ smallDoubleAsFloat ^(frac + 16r8000000000000 / 16r8000000000000 * (2 raisedTo: expn - 127) * sign) asFloat. ! ! !OopType64 categoriesFor: #=!public! ! -!OopType64 categoriesFor: #asFraction!public! ! -!OopType64 categoriesFor: #asSmallInteger!public! ! -!OopType64 categoriesFor: #isBoolean!public! ! -!OopType64 categoriesFor: #isCharacter!public! ! -!OopType64 categoriesFor: #isGsNil!public! ! -!OopType64 categoriesFor: #isImmediate!public! ! -!OopType64 categoriesFor: #isOopIllegal!public! ! -!OopType64 categoriesFor: #isSmallDouble!public! ! -!OopType64 categoriesFor: #isSmallFraction!public! ! -!OopType64 categoriesFor: #isSmallInteger!public! ! -!OopType64 categoriesFor: #isSpecial!public! ! +!OopType64 categoriesFor: #asDate!converting!public! ! +!OopType64 categoriesFor: #asDateAndTime!converting!public! ! +!OopType64 categoriesFor: #asFraction!converting!public! ! +!OopType64 categoriesFor: #asScaledDecimal!converting!public! ! +!OopType64 categoriesFor: #asSmallInteger!converting!public! ! +!OopType64 categoriesFor: #asTime!converting!public! ! +!OopType64 categoriesFor: #isBoolean!public!testing! ! +!OopType64 categoriesFor: #isCharacter!public!testing! ! +!OopType64 categoriesFor: #isGsNil!public!testing! ! +!OopType64 categoriesFor: #isImmediate!public!testing! ! +!OopType64 categoriesFor: #isOopIllegal!public!testing! ! +!OopType64 categoriesFor: #isSmallDate!public!testing! ! +!OopType64 categoriesFor: #isSmallDateAndTime!public!testing! ! +!OopType64 categoriesFor: #isSmallDouble!public!testing! ! +!OopType64 categoriesFor: #isSmallFraction!public!testing! ! +!OopType64 categoriesFor: #isSmallInteger!public!testing! ! +!OopType64 categoriesFor: #isSmallScaledDecimal!public!testing! ! +!OopType64 categoriesFor: #isSmallTime!public!testing! ! +!OopType64 categoriesFor: #isSpecial!public!testing! ! !OopType64 categoriesFor: #objectInfo!accessing!public! ! !OopType64 categoriesFor: #objectInfo:!accessing!public! ! !OopType64 categoriesFor: #printOn:!public! ! -!OopType64 categoriesFor: #smallDoubleAsFloat!public! ! +!OopType64 categoriesFor: #smallDoubleAsFloat!converting!public! !