[External] : Re: Proposal: java.lang.runtime.Carrier
Brian Goetz
brian.goetz at oracle.com
Mon Mar 7 15:08:00 UTC 2022
> Adding more information,
> we want the carrier to be a primitive type (to be able to optimize it
> away), which means that we can not use null to represent "do_not_match",
> we have to have a flag inside the carrier for that.
The alternate approach is to use a .ref class for partial patterns
(using null for "no match") and a B3 class for total patterns (since it
needs no failure channel.)
I think its pretty important that the static name of the carrier class
not appear in generated bytecode. As a result, we will have to use a
reference type (object or interface), which means we get the null
channel "for free".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/amber-spec-experts/attachments/20220307/47ba52c4/attachment-0001.htm>
More information about the amber-spec-experts
mailing list