You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 12, 2024. It is now read-only.
Use different functions for table entries than for resolved calls.
The real method body goes to a method used for statically resolved
calls. That method can take the real `this` type as argument.
For table entries, which need to use `(ref any)` as receiver type,
we generate a separate function. That bridge function casts down
the receiver then performs a tail call to the real function.
With this strategy, we do not need to cast down `this` values
every time we use them. Since most calls as statically resolved,
this also means we don't need any cast at all. For dynamically
resolved calls, the overhead should be small thanks to the tail
call.
This change causes a 30% code size regression for fastLink, but
only 6% in fullLink. We should be able to optimize it further by
only emitting bridges for methods that actually appear in at
least one dispatch table.
0 commit comments