Record attribute binary format

forax at forax at
Fri Oct 11 21:19:48 UTC 2019

----- Mail original -----
> De: "Brian Goetz" <brian.goetz at>
> À: "Remi Forax" <forax at>, "amber-spec-experts" <amber-spec-experts at>
> Envoyé: Vendredi 11 Octobre 2019 22:57:23
> Objet: Re: Record attribute binary format

> No need.  Varargs-ness is reified with the (mandated) canonical ctor.

hum, this looks like a hack, it means you can not just read the Record attribute, you have to crawle all the methods to find the primary constructor.

and if we take a look to the past, we have added access flags to methods, fields and classes, so there is a non negligible chance that we will want to do the same to record components in the future.  


> On 10/11/2019 4:43 PM, Remi Forax wrote:
>> It seems we have to add an access_flag for each record component because we have
>> to mark if the record component is a varargs or not.
>> So the format should be
>> Record_attribute {
>>    u2 attribute_name_index;
>>    u4 attribute_length;
>>    u2 number_of_record_components;
>>    {   u2 component_access_flags;
>>        u2 component_name_index;
>>        u2 component_descriptor_index;
>>        u2 attribute_count;
>>        attribute_info attributes[attributes_count];
>>    }
>> }
>> with the component_access_flags allowing ACC_VARARGS.
> > Rémi

More information about the amber-spec-experts mailing list