[squeak-dev] FFI: FFI-Kernel-mt.193.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Aug 9 17:13:56 UTC 2021
Marcel Taeumel uploaded a new version of FFI-Kernel to project FFI:
http://source.squeak.org/FFI/FFI-Kernel-mt.193.mcz
==================== Summary ====================
Name: FFI-Kernel-mt.193
Author: mt
Time: 9 August 2021, 7:13:55.720391 pm
UUID: 57c1d500-fd24-7c40-adfb-767cdd35e6da
Ancestors: FFI-Kernel-mt.192
Fix bug in compilation order of ExternalStructure fields.
=============== Diff against FFI-Kernel-mt.192 ===============
Item was changed:
----- Method: ExternalStructure class>>allStructuresInCompilationOrder (in category 'system startup') -----
allStructuresInCompilationOrder
"Answers a list of all known structure (and packed structures and unions) in ascending order of field compilation."
| unordered ordered |
self == ExternalStructure
ifFalse: [self error: 'Correct compilation order cannot be guaranteed for a partial list of structure classes.'].
unordered := self allSubclasses reject: [:ea | ea isSkipped].
ordered := OrderedCollection new: unordered size.
[unordered notEmpty] whileTrue:
[ | structClass prevStructClass references |
structClass := unordered anyOne.
[references := structClass referencedTypeNames.
+ references := references collect: [:ea | ea copyWithoutAll: '([0123456789])*'].
prevStructClass := unordered detect: [:c | c ~~ structClass and: [references includes: c name]] ifNone: [nil].
prevStructClass isNil]
whileFalse: [structClass := prevStructClass].
"we found a structure/alias which does not depend on other structures/aliases"
ordered add: (unordered remove: structClass)].
^ ordered!
More information about the Squeak-dev
mailing list
|