RFR: 8183546: [MVT] cleanup/improve vreturn convention implementation

Tobias Hartmann tobias.hartmann at oracle.com
Thu Jul 6 09:37:22 UTC 2017

Hi Roland,

this looks good to me!

One minor suggestion: I would prefer to use mask macros to make the "& 1" and "& ~1L" operations more explicit.

Best regards,

On 05.07.2017 09:33, Roland Westrelin wrote:
> http://cr.openjdk.java.net/~roland/valhalla/vreturn-improv/webrev.00/
> This patch:
> - reworks the verification logic in
>   SharedRuntime::store_value_type_fields_to_buf() to address the crash
>   that Paul encountered
> - changes the vreturn convention so if we return the klass pointer +
>   fields, the klass pointer is tagged by setting its least significant
>   bit. This way it's cheaper for the caller to detect if it's getting an
>   oop, a buffered value or a list of fields back from the callee. (this
>   is based on a discussion with Fred)
> - stores precomputed extended signature and vreturn registers in the
>   ValueKlass to not have to compute them every time they are
>   needed. This is also something Fred suggested. I considered
>   initializaing those fields on first use but came to the conclusion it
>   would make things too complicated. For instance the vreturn registers
>   are sometimes use at a point where the thread can't safepoint making
>   it impossible to use a metadata Array.
> Roland.

More information about the valhalla-dev mailing list