BUG: SystemABI C_LONG and C_LONGLONG are the same

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Mon May 18 11:09:25 UTC 2020


On 18/05/2020 11:57, Ty Young wrote:
> In order to drop attributes you need to know which attributes to drop 
> though, right? If someone is marking a layout with their own 
> attributes willy nilly this may be impossible unless they provide the 
> key strings. I also think it's a bit dangerous simply because they 
> could mark a layout with the attributes but have the values be 
> invalid. I can already see someone using a `long` layout that has an 
> attribute "class" that points to byte.class.
>
>
> The only way I can think of solving this is by introducing 
> "ContableGroup". You could then have a method that strips a layout of 
> all attributes but those within the supplied group. Doing this also 
> has the added benefit that a signature could be added to validate who 
> the attributes belong to.

I believe we are in overthinking territory. Why would you want to 
compare layouts _and_ discard only few attributes but not all? My 
suspicion is that you would simply want to check if some layout is e.g. 
the layout for a NativeLong - in which case (by far) the easiest way to 
do that is to add a layout attribute which says 
(carrier=NativeLong.class) and then just check for that (e.g. w/o doing 
a full blown layout comparison).

Maurizio



More information about the panama-dev mailing list