Good news, bad news
Rémi Forax
forax at univ-mlv.fr
Thu May 26 04:18:09 PDT 2011
On 05/26/2011 12:33 PM, Charles Oliver Nutter wrote:
> On Thu, May 26, 2011 at 5:25 AM, Rémi Forax<forax at univ-mlv.fr> wrote:
>> Charles,
>> why do you use IRubyObject exactly ?
>> why not using Object instead ?
>>
>> I use Object in PHP.reboot and see no problem.
> Legacy, mostly... JRuby still supports Java 5 and 6, which limits how
> specialized we can make call paths. Requiring that everything be
> IRubyObject means we always have only a single invokeinterface to
> retrieve metaclass, access "instance variables", and so on.
>
> JRuby designed from scratch today would certainly use Object.
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).
> - Charlie
Rémi
More information about the mlvm-dev
mailing list