<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
<img id="e2ce604c-3e2b-4c01-b617-82c16fdacd72" src="cid:01c6b70c-cdc8-4456-87c5-a2149cd8aef6" width="437" height="256"></img><br><div class="mb_sig"></div>
<blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
<p style="color: #AAAAAA; margin-top: 10px;">Am 04.05.2021 10:57:32 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p><div style="font-family:Arial,Helvetica,sans-serif">Marcel Taeumel uploaded a new version of FFI-Tools to project FFI:<br>http://source.squeak.org/FFI/FFI-Tools-mt.23.mcz<br><br>==================== Summary ====================<br><br>Name: FFI-Tools-mt.23<br>Author: mt<br>Time: 4 May 2021, 10:57:22.658881 am<br>UUID: 1c015fd1-e56d-a84a-b4c8-5987e99cbcbd<br>Ancestors: FFI-Tools-mt.22<br><br>In object explorers, change the repersentation of compiledSpec to better reflect its intentions. I suppose. :-)<br><br>Note that compiledSpec is a WordArray. I changed the appearance of the words in the array to distinguish atomic type, type flags, byte size, and start/end of embedded structs.<br><br>=============== Diff against FFI-Tools-mt.22 ===============<br><br>Item was added:<br>+ ObjectExplorerWrapper subclass: #CompiledSpecWrapper<br>+ instanceVariableNames: ''<br>+ classVariableNames: ''<br>+ poolDictionaries: 'FFIConstants'<br>+ category: 'FFI-Tools'!<br><br>Item was added:<br>+ ----- Method: CompiledSpecWrapper>>contents (in category 'accessing') -----<br>+ contents<br>+ <br>+ ^ self object isInteger ifTrue: [#()] ifFalse: [ "WordArray"<br>+ Array streamContents: [:s |<br>+ self object withIndexDo: [:word :index |<br>+ s nextPut: (self class<br>+ with: word<br>+ name: index printString<br>+ model: self model)]]]!<br><br>Item was added:<br>+ ----- Method: CompiledSpecWrapper>>objectString (in category 'accessing') -----<br>+ objectString<br>+ <br>+ ^ self object isInteger<br>+ ifFalse: [self printWordArray]<br>+ ifTrue: [self printWordArrayElement]!<br><br>Item was added:<br>+ ----- Method: CompiledSpecWrapper>>print:base:group:length: (in category 'printing') -----<br>+ print: integer base: base group: group length: length<br>+ <br>+ ^ String streamContents: [:stream |<br>+ | label |<br>+ label := integer printStringBase: base.<br>+ label := label padded: #left to: length with: $0.<br>+ (1 to: label size by: group)<br>+ do: [:index |<br>+ 1 to: group do: [:gIndex |<br>+ stream nextPut: (label at: index + gIndex - 1)]]<br>+ separatedBy: [stream space]]!<br><br>Item was added:<br>+ ----- Method: CompiledSpecWrapper>>printWordArray (in category 'printing') -----<br>+ printWordArray<br>+ <br>+ ^ String streamContents: [:stream |<br>+ stream nextPutAll: '16r ['. <br>+ self object<br>+ do: [:word | stream nextPutAll: (self print: word base: 16 group: 2 length: 8)]<br>+ separatedBy: [stream nextPutAll: ' | '].<br>+ stream nextPut: $] ]!<br><br>Item was added:<br>+ ----- Method: CompiledSpecWrapper>>printWordArrayElement (in category 'printing') -----<br>+ printWordArrayElement<br>+ <br>+ ^ String streamContents: [:stream |<br>+ <br>+ | atomicType externalType byteSize isStructStart isStructEnd isHeader |<br>+ atomicType := (self object bitAnd: FFIAtomicTypeMask) >> FFIAtomicTypeShift.<br>+ externalType := (self object bitAnd: 16rFF0000) >> (FFIAtomicTypeShift - 8).<br>+ byteSize := (self object bitAnd: FFIStructSizeMask).<br>+ <br>+ isHeader := self itemName = '1'.<br>+ isStructStart := isHeader not and: [(self object anyMask: FFIFlagStructure) and: [byteSize ~= 0]].<br>+ isStructEnd := (self object anyMask: FFIFlagStructure) and: [byteSize = 0].<br>+ <br>+ stream<br>+ nextPutAll: (atomicType asString padded: #left to: 2 with: Character space);<br>+ nextPutAll: ' | ';<br>+ nextPutAll: (self print: externalType base: 2 group: 4 length: 8);<br>+ nextPutAll: ' | ';<br>+ nextPutAll: (self print: byteSize base: 16 group: 2 length: 4);<br>+ nextPutAll: ' (';<br>+ nextPutAll: byteSize asString;<br>+ nextPutAll: ' bytes)'.<br>+ isHeader ifTrue: [stream nextPutAll: ' --- HEADER'].<br>+ isStructStart ifTrue: [stream nextPutAll: ' --- STRUCT START'].<br>+ isStructEnd ifTrue: [stream nextPutAll: ' --- STRUCT END']].!<br><br>Item was added:<br>+ ----- Method: ExternalType>>explorerContents (in category '*FFI-Tools') -----<br>+ explorerContents<br>+ <br>+ | basicExplorerFields |<br>+ basicExplorerFields := super explorerContents.<br>+ basicExplorerFields do: [:explorerField |<br>+ explorerField itemName = 'compiledSpec' ifTrue: [<br>+ explorerField changeClassTo: CompiledSpecWrapper]].<br>+ ^ basicExplorerFields!<br><br><br></div></blockquote></div>