RFR: 8263595: Remove oop type punning in JavaCallArguments

Coleen Phillimore coleenp at openjdk.java.net
Mon Mar 15 19:02:16 UTC 2021


On Mon, 15 Mar 2021 17:55:30 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

>> src/hotspot/share/runtime/javaCalls.hpp line 110:
>> 
>>> 108:   // handle rather than the designated oop.  The handle is later
>>> 109:   // resolved to the oop by parameters().  This delays the exposure of
>>> 110:   // naked oops until it is GC-safe.
>> 
>> I thought this was the reason we had to have this ugliness.  Once you push an oop to the argument stack, you could have a GC and this was a naked oop.  By having the Handle pointer or jobject pointer, you'd get a pointer to the oop for GC to process.  Maybe this change does the same thing though, only a lot nicer. Yes, it looks like it does.  Now to have Kim point out why it's wrong :(  I hope not because I like this change.
>
> The patch does the same thing as previously, but it skips casting oop*/jobject to oop.

Ok!

-------------

PR: https://git.openjdk.java.net/jdk/pull/3014


More information about the hotspot-dev mailing list