diff --git a/src/TruffleSqueak-Core.package/ForeignObject.class/instance/printOnTitle.st b/src/TruffleSqueak-Core.package/ForeignObject.class/instance/printOnTitle.st index 3ac76767c..e79902b08 100644 --- a/src/TruffleSqueak-Core.package/ForeignObject.class/instance/printOnTitle.st +++ b/src/TruffleSqueak-Core.package/ForeignObject.class/instance/printOnTitle.st @@ -1,24 +1,19 @@ printing printOnTitle - | arraySize memberSize properties name | - (Interop isNull: self) ifTrue: [ ^ 'ForeignNil' ]. - (Interop isString: self) ifTrue: [ ^ 'ForeignString[', self asString, ']' ]. - (Interop fitsInLong: self) ifTrue: [ ^ 'ForeignInteger[', (Interop asLong: self), ']' ]. - (Interop fitsInDouble: self) ifTrue: [ ^ 'ForeignFloat[', (Interop asDouble: self), ']' ]. + | properties | properties := OrderedCollection new. - arraySize := (Interop hasArrayElements: self) - ifTrue: [ Interop getArraySize: self ] ifFalse: [ 0 ]. - memberSize := (Interop hasMembers: self) - ifTrue: [ Interop getMemberSize: self ] ifFalse: [ 0 ]. - arraySize > 0 ifTrue: [ properties add: 'arraySize=', arraySize ]. - memberSize > 0 ifTrue: [ properties add: 'memberSize=', memberSize ]. + (Interop isNull: self) ifTrue: [ properties add: 'nil' ]. + (Interop isHostObject: self) ifTrue: [ properties add: 'host' ]. + (Interop isString: self) ifTrue: [ properties add: 'string' ]. + (Interop fitsInLong: self) ifTrue: [ properties add: (Interop asLong: self) asString ]. + (Interop fitsInDouble: self) ifTrue: [ properties add: (Interop asDouble: self) asString ]. + (Interop isMetaObject: self) ifTrue: [ properties add: 'meta' ]. (Interop isInstantiable: self) ifTrue: [ properties add: 'instantiable' ]. (Interop isExecutable: self) ifTrue: [ properties add: 'executable' ]. (Interop isMetaObject: self) ifTrue: [ properties add: 'meta' ]. (Interop hasIdentity: self) ifTrue: [ properties add: 'identity' ]. - name := (Interop isHostObject: self) - ifTrue: [ 'HostObject' ] - ifFalse: [ 'ForeignObject' ]. + (Interop hasArrayElements: self) ifTrue: [ properties add: 'arraySize=', (Interop getArraySize: self) ]. + (Interop hasMembers: self) ifTrue: [ properties add: 'memberSize=', (Interop getMemberSize: self) ]. ^ properties - ifEmpty: [ name ] - ifNotEmpty: [ name, '[', (properties joinSeparatedBy: ','), ']' ] \ No newline at end of file + ifEmpty: [ 'ForeignObject' ] + ifNotEmpty: [ 'ForeignObject[', (properties joinSeparatedBy: ','), ']' ] \ No newline at end of file diff --git a/src/TruffleSqueak-Core.package/ForeignObject.class/methodProperties.json b/src/TruffleSqueak-Core.package/ForeignObject.class/methodProperties.json index 432abdd71..bd5e84018 100644 --- a/src/TruffleSqueak-Core.package/ForeignObject.class/methodProperties.json +++ b/src/TruffleSqueak-Core.package/ForeignObject.class/methodProperties.json @@ -65,7 +65,7 @@ "or:" : "fn 2/11/2021 10:35", "postCopy" : "fn 8/2/2019 16:59", "printOn:" : "fn 4/13/2019 20:45", - "printOnTitle" : "fn 2/19/2021 13:18", + "printOnTitle" : "fn 3/11/2021 14:26", "shallowCopy" : "fn 8/2/2019 16:59", "size" : "fn 11/11/2019 22:08", "value" : "fn 2/4/2020 00:11",