Re: [webkit-dev] Proposal about integer types used in WebKit

2009-07-25 Thread Maciej Stachowiak
On Jul 24, 2009, at 4:18 PM, Geoffrey Garen wrote: In JavaScriptCore, some structures have integer members that must be 32bits in size, regardless of processor type. In those places, int32_t and uint32_t are useful. Less clear to me is whether clients of such structures should also use

Re: [webkit-dev] Proposal about integer types used in WebKit

2009-07-25 Thread James Cloos
Geoffrey == Geoffrey Garen gga...@apple.com writes: Geoffrey So, I guess the question is, if you have a quantity that Geoffrey must be 32 bits, is it useful or harmful to specify by Geoffrey using int32_t instead of int? Do note that, pedantically speaking, int32_t is not required to be 32 bits

Re: [webkit-dev] Proposal about integer types used in WebKit

2009-07-25 Thread Peter Kasting
On Sat, Jul 25, 2009 at 5:59 PM, James Cloos cl...@jhcloos.com wrote: Do note that, pedantically speaking, int32_t is not required to be 32 bits long, just long enough to store any value which could be stored in a 32 bit integer. Ie, it is perfectly acceptable for an arch to use a 64 bit

[webkit-dev] Proposal about integer types used in WebKit

2009-07-24 Thread Darin Adler
Hi folks. The WebKit project assumes the LP64 approach to 64-bit. Roughly speaking, that means that: - int is a signed 32-bit integer - unsigned is an unsigned 32-bit integer - long long is a signed 64-bit integer - unsigned long long is an unsigned 64-bit integer And long

Re: [webkit-dev] Proposal about integer types used in WebKit

2009-07-24 Thread Peter Kasting
On Fri, Jul 24, 2009 at 12:46 PM, Darin Adler da...@apple.com wrote: Some of our code uses types like int32_t, uint32_t, int64_t, and uint64_t. I don’t see the point of doing this. I’d like to suggest that we always use int where we’d otherwise use int32_t except where there is some issue of

Re: [webkit-dev] Proposal about integer types used in WebKit

2009-07-24 Thread Geoffrey Garen
Am I missing something? Is there some real benefit to using types like int32_t instead of int in some places in our code and not others? If so, what are these critical places and what makes them different from the rest of the code? In JavaScriptCore, some structures have integer members

Re: [webkit-dev] Proposal about integer types used in WebKit

2009-07-24 Thread Jozwiak, John
To: Darin Adler Cc: WebKit Development Subject: Re: [webkit-dev] Proposal about integer types used in WebKit Am I missing something? Is there some real benefit to using types like int32_t instead of int in some places in our code and not others? If so, what are these critical places and what makes

Re: [webkit-dev] Proposal about integer types used in WebKit

2009-07-24 Thread Geoffrey Garen
In JavaScriptCore, some structures have integer members that must be 32bits in size, regardless of processor type. In those places, int32_t and uint32_t are useful. Less clear to me is whether clients of such structures should also use int32_t / uint32_t. For example: struct { int32_t i;