[self-interest] Digest Number 219
mario.wolczko at sun.com
Mon Feb 11 19:55:09 UTC 2002
> Here is an idea that I just had to filter out useless customization (it
> probably has lots of flaws...):
> When the NIC first generates code for a given source method, all the
> call sites are initialized with inline caches instead of PICs.
When first generated, all call sites call the inline-cache-miss code;
a transition to a PIC takes place only when after this code has been
replaced with an inline cache, and then _that_ has missed.
> What if
> the second time the NIC had to generate code for the same source method
> (different receiver "type") we just made a link to the same code? This
> code would be shared until any one of the ICs misses. Then we copy the
> code, set its IC to the new value and let each customized version go on
> its own path from now on.
> The SIC could check this sharing as a hint that it might not want to
> customize a given method. Obviously, any method that has aquired one or
> more PICs must be customized.
> This still generates some identical copies, but at least it doesn't
> need more checking than we already have.
That sounds quite plausible to me. It's an alternative to the
implementation I was pursuing, which never customizes NIC code, but
uses PICs within NIC methods.
More information about the Self-interest