> > 3. Don't worry about inlining Java code: assume the VM can do 'easy'
> >    inlining like invoking static methods.
> 
> How does that aspect matter to the VM/classlib interface?
> 

        It matters in that when defining the VM/classlib interface you 
should assume that adding a level of "easy" to inline wrapper functions 
will have zero performance impact.  Eg, Object.clone isn't directly 
declared to be a native method, it simply delegates to VMObject.clone, 
which may or may not be a native method depending on the VM 
implementation.  Trust that the JIT will inline away the trivial wrapper 
method (java.lang.Object.clone) so that delagating the real work to a 
method of VMObject won't cost you anything.

--dave

Reply via email to