RFR: C2: fix call with __Value arguments

Roland Westrelin rwestrel at redhat.com
Tue Jun 20 16:25:22 UTC 2017


Thanks for looking at this, Tobias.

>> http://cr.openjdk.java.net/~roland/valhalla/__Value_args_cast/webrev.00/
>
> This looks good to me but shouldn't we also cast the receiver?

Then we would have a method on __Value that does something useful. We
don't have any at this point AFAICT.

> Were you able to write a test for this? If so, it would be good to add
> it to our test bench.

Here is a new webrev with a couple test cases:

http://cr.openjdk.java.net/~roland/valhalla/__Value_args_cast/webrev.01/

I made another fix to type.cpp for a bug I found with the new tests.

>> I suppose if we hit the opposite situation (call site's
>> signature uses a specific value type, callee uses __Value) we need a
>> reference to the value and have to store it to memory. This mirrors what
>> happens without value types where C2 casts arguments.
>
> Do you know how this can happen?

I'm not sure it can happen. I removed the code and replaced with an
assert.

Roland.


More information about the valhalla-dev mailing list