RFR (S) : 8025260 : Methodhandles/JSR292: NullPointerException (NPE) thrown instead of AbstractMethodError (AME)

John Rose john.r.rose at oracle.com
Thu Sep 26 13:48:30 PDT 2013


On Sep 26, 2013, at 12:22 PM, David Chase <david.r.chase at oracle.com> wrote:

> On 2013-09-26, at 2:30 PM, John Rose <john.r.rose at oracle.com> wrote:
>> That is, push the compare-null-and-branch code into this conditional:
>> if (!for_compiler_entry && JvmtiExport::can_post_interpreter_events()) {
>> 
>> The goal here is that vanilla compiled code should have a fast path that is as compact as possible.  Interpreted or "VerifyThread" code does not need to be compact.
> 
> That is, you want two copies of the test, one for the compiled case that is short, the other for the interpreted case that is potentially longer (and more general purpose) -- but this is a sparc-only issue, on Intel, branches is branches?

You had to ask!  Actually, x86 has jccb which is slightly preferable when it applies.  (The short branches on sparc are, I think, provide relatively more benefit on that CPU.)

Note that verify_method_pointer might some day expand to lots of code, which will break jccb.  It is good to use jccb when possible; the cost of this is to watch carefully what you are jumping over, and avoid the optimization when "verify" stuff gets in the way.  I would give it a try, but it's optional.

— John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20130926/51f532b8/attachment.html 


More information about the hotspot-compiler-dev mailing list