Boost logo

Boost :

Subject: Re: [boost] [xint] Third release is ready, requesting preliminary review
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2010-05-03 01:28:36


----- Original Message -----
From: "Chad Nelson" <chad.thecomfychair_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Monday, May 03, 2010 1:00 AM
Subject: Re: [boost] [xint] Third release is ready, requesting preliminary review

>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 05/02/2010 05:21 PM, vicente.botet wrote:
>
>> Could you confirm that this are the only data stored on xint::integer?
>>
>> flag_t flags;
>> data_t *data;
>
> Yes, that's it, at the moment.
>
>> What is the meaning of flags
>> static const flag_t flag_negative = 0x01;
>> static const flag_t flag_readonly = 0x02;
>> static const flag_t flag_fixedlength = 0x04;
>
> The first is used (in the 'flags' bitfield) to denote a negative number.
> The second identifies data_t items that are meant to never be modified
> (the zero items assigned when new integers are created without
> specifying a value, for instance). The third is used on fixed_integer
> types, to tell the base_integer allocation code to use some special
> handling for them.
>
>> Is the flags field needed when COW is not used?
>
> Yes. I don't think any of those three flags are specific to
> copy-on-write, except maybe flag_readonly (which prevents the code from
> writing to a shared zero, for example).

I don't understand why any of these informations is not stored on data_t.
In addition no information must be stored on base integer that concerns fixed_integer. This is a bad design option, IMHO.

Best,
Vicente


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk