Skip to content

Conversation

@DanilaFe
Copy link
Contributor

@DanilaFe DanilaFe commented Dec 19, 2025

Depends on #28243 only for convenience.

In investigating the bug fixed by #28226, I noticed that some of our module code relied on POI where it probably didn't intend to do so (or at least, where it seemed brittle). I adjusted the compiler to identify such cases, and found a number of generic functions that claimed to use POI that weren't actually using POI.

It turned out that Dyno was considering methods found via forwarding to be "POI". Besides being inaccurate, this tainted the resulting PoiInfo of the resolved function, thereby reducing its eligibility for being used in caching. E.g., any method that (transitively) relied on DSI methods (e.g., creating array literals, copying arrays, array indexing) was marked as "non-cache-eligible" because it "relied on POI" (even though it just used forwarding to the array instance).

It's not clear to me how impactful this issue was, since many calls remain uncacheable after this PR because they contain recursion. However, I did confirm that some uncacheable calls became cacheable after this PR. Thus, we are bound to see an improvement, if a tiny one.

Testing

  • dyno tests
  • paratest --dyno-resolve-only
  • paratest

A lot of serialization packages relied on the internal detail
that the IO module `private use`d `Reflection`. Specifically,
they used `canResolveMethod` and `canResolveTypeMethod` without
importing/using them, relying on POI w/the IO module.
This is fine, but feels brittle. In this PR, bring the required
methods in directly.

After writing some compiler scripts to identify these caes,
I've also observed similar issues with `LinearAlgebra` and
`Syncvar`, where I fixed them as well.

Signed-off-by: Danila Fedorin <[email protected]>
Signed-off-by: Danila Fedorin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant