Bug in UnifiedFFI: 1. Pharo Image
• You are subscribed to this case
Right now, uFFI compiles a new version of the method when doing a callout for the first time. When doing so, it stores in the newly compiled method the selector that was originally used to create the callout (ffiCall: nbffi:, etc), so it would appear in further searches for senders.
However, to extract that selector it is actually using `thisContext sender sender messageSends first selector` when it could use just `thisContext sender selector`.
The problem with the first one is that it forces a creation of the sender sender AST node and look it for the source code. This may produce further problems like infinite recurssions: - when doing an ffi call, the ffi call requires the source code to get the AST - to get the source code, some ffi calls may be required to get its location (e.g, the HOME env var) - and loop