On Wed, Oct 5, 2016 at 6:26 PM, Jochen Theodorou <blackd...@gmx.org> wrote:

> There is one more special problem I have though: per instance meta
> classes. So even if a x and y have the same class as per JVM, they can have
> differing meta classes. Which means a switchpoint alone is not enough...
> well, trying to get rid of that in the new MOP.

JRuby also has per-instance classes (so-called "singleton classes"). We
treat them like any other class. HOWEVER...if there's a singleton class
that does not override any methods from the original class, it shares a
SwitchPoint until such time that it is modified.

I've also considered caching singleton classes of various shapes, so we can
just choose based on known shapes...but never went further with that

- Charlie
mlvm-dev mailing list

Reply via email to