Re: [swift-dev] Question about size of Character type

2016-08-23 Thread Jordan Rose via swift-dev
> On Aug 19, 2016, at 18:22, Slava Pestov wrote: > >> >> On Aug 19, 2016, at 2:04 PM, Jordan Rose via swift-dev > > wrote: >> >> We have an old Radar about this, rdar://problem/16754935 >> . It's probably just a case we're missing in enum >> layout. My guess is th

Re: [swift-dev] Question about size of Character type

2016-08-22 Thread gian enrico conti via swift-dev
As been as old as Quinn, I got the exact SAME impression! :) > On 22 Aug 2016, at 11:03, Quinn The Eskimo! via swift-dev > wrote: > > > On 21 Aug 2016, at 02:25, Chris Lattner via swift-dev > wrote: > >> ARM64 even has a hardware feature for this, called “top byte ignored” (TBI) >> which

Re: [swift-dev] Question about size of Character type

2016-08-22 Thread Quinn "The Eskimo!" via swift-dev
On 21 Aug 2016, at 02:25, Chris Lattner via swift-dev wrote: > ARM64 even has a hardware feature for this, called “top byte ignored” (TBI) > which means you don’t even have to do the masking. Urgh, horrible flashbacks to the “32-bit clean” effort during the late 80s: Currently the Macint

Re: [swift-dev] Question about size of Character type

2016-08-20 Thread Chris Lattner via swift-dev
> On Aug 19, 2016, at 6:22 PM, Slava Pestov via swift-dev > wrote: > > >> On Aug 19, 2016, at 2:04 PM, Jordan Rose via swift-dev > > wrote: >> >> We have an old Radar about this, rdar://problem/16754935 >> . It's probably just a case we're missing in enum >> layo

Re: [swift-dev] Question about size of Character type

2016-08-19 Thread Slava Pestov via swift-dev
> On Aug 19, 2016, at 2:04 PM, Jordan Rose via swift-dev > wrote: > > We have an old Radar about this, rdar://problem/16754935 > . It's probably just a case we're missing in enum > layout. My guess is that it's because we don't have a whole spare bit in a > RawPointer, but we should be able

Re: [swift-dev] Question about size of Character type

2016-08-19 Thread Ole Begemann via swift-dev
Thanks Jordan! > On 19 Aug 2016, at 23:04, Jordan Rose wrote: > > We have an old Radar about this, rdar://problem/16754935 > . It's probably just a case we're missing in enum > layout. My guess is that it's because we don't have a whole spare bit in a > RawPointer, but we should be able to pi

Re: [swift-dev] Question about size of Character type

2016-08-19 Thread Jordan Rose via swift-dev
We have an old Radar about this, rdar://problem/16754935 . It's probably just a case we're missing in enum layout. My guess is that it's because we don't have a whole spare bit in a RawPointer, but we should be able to pick some up either from alignment or from ABI knowledge. Jordan > On Aug

[swift-dev] Question about size of Character type

2016-08-19 Thread Ole Begemann via swift-dev
The Character type is essentially defined like this [1]: struct Character { enum Representation { // A _StringBuffer whose first grapheme cluster is self. // NOTE: may be more than 1 Character long. case large(_StringBuffer._Storage) case small(Builtin.Int63)