Good news, bad news
Charles Oliver Nutter
headius at headius.com
Thu May 26 09:53:24 PDT 2011
On Thu, May 26, 2011 at 6:18 AM, Rémi Forax <forax at univ-mlv.fr> wrote:
> For the metaclass, the idea is to not retrieve the metaclass in the fast
> path,
> if you have one Java class for one ruby class and a 1 to 1 relation between
> a class and a metaclass, checking the class and the SwitchPoint of the
> metaclass
> is sufficient (because you can bind the switch point).
Right, this would work if all classes defined in Ruby were 1:1 with a
class in Java. This is not the case in JRuby; user-defined classes are
rarely backed by a new JVM class, and usually just use RubyObject as
their JVM representation.
I will likely use this strategy for core JRuby classes, however, by
making sure that RubyObject, RubyString, etc are not used as the
backing store for user-defined classes, and instead having
RubyInheritedObject, RubyInheritedString (or something) for that
purpose.
- Charlie
More information about the mlvm-dev
mailing list