Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-nice.2680.mcz==================== Summary ====================
Name: VMMaker.oscog-nice.2680
Author: nice
Time: 29 January 2020, 12:54:21.034743 am
UUID: 7b4cd0a1-bf1a-4904-8410-d6018e71336b
Ancestors: VMMaker.oscog-nice.2679
Fix the non inlining of ffiCalloutTo:SpecOnStack:in: by explicitely telling that recursive function has to <inline: false> (obviously).
Now the FFI tests pass on X64SysV both fast and debug.
=============== Diff against VMMaker.oscog-nice.2679 ===============
Item was changed:
----- Method: ThreadedFFIPlugin>>alignmentOfStructSpec:OfLength:StartingAt: (in category 'marshalling-struct') -----
alignmentOfStructSpec: specs OfLength: specSize StartingAt: indexPtr
"Answer with the alignment requirement for a structure/union.
Note that indexPtr is a pointer so as to be changed on return.
+ On input, the index points to the structure header (the one with FFIFlagStructure + structSize).
- On input, the index points to the structure header (the one with FFIFlagStructure + structSize)
On output, the index points the the structure trailer (the FFIFlagStructure)."
| spec byteAlignment thisAlignment |
<var: #specs type: #'unsigned int*'>
<var: #indexPtr type: #'unsigned int*'>
+ <inline: false>
spec := specs at: (indexPtr at: 0).
self assert: (spec bitAnd: FFIFlagPointer + FFIFlagAtomic + FFIFlagStructure) = FFIFlagStructure.
byteAlignment := 1.
[indexPtr at: 0 put: (indexPtr at: 0) + 1.
(indexPtr at: 0) < specSize]
whileTrue:
[spec := specs at: (indexPtr at: 0).
spec = FFIFlagStructure
ifTrue: [^byteAlignment].
thisAlignment := (spec anyMask: FFIFlagPointer)
ifTrue: [BytesPerWord]
ifFalse: [(spec anyMask: FFIFlagStructure)
ifTrue: [self alignmentOfStructSpec: specs OfLength: specSize StartingAt: indexPtr]
ifFalse: [spec bitAnd: FFIStructSizeMask]].
byteAlignment := byteAlignment max: thisAlignment].
self assert: false. "should not reach here"
^-1!