Re: [swift-dev] Reconsidering the global uniqueness of type metadata and protocol conformance instances

2017-07-29 Thread John McCall via swift-dev
> On Jul 29, 2017, at 12:48 AM, Andrew Trick wrote: >> On Jul 28, 2017, at 8:13 PM, John McCall > > wrote: >>> On Jul 28, 2017, at 11:11 PM, John McCall via swift-dev >>> mailto:swift-dev@swift.org>> wrote: On Jul 28, 2017, at 10:38 PM, Andrew Trick >>>

Re: [swift-dev] Reconsidering the global uniqueness of type metadata and protocol conformance instances

2017-07-29 Thread Chris Lattner via swift-dev
> On Jul 28, 2017, at 3:59 PM, Jordan Rose via swift-dev > wrote: > >>> So generic code to instantiate type metadata would have to construct these >>> mangled strings eagerly? >> >> We already do exactly that for the ObjC runtime name of generic class >> instantiations, for what it's worth,

Re: [swift-dev] Reconsidering the global uniqueness of type metadata and protocol conformance instances

2017-07-29 Thread Chris Lattner via swift-dev
On Jul 28, 2017, at 2:20 PM, Joe Groff via swift-dev wrote: > > Overall, my intuition is that the tradeoffs come out in favor for nonunique > metadata objects, but what do you all think? Is there anything I'm missing? I think your proposal makes sense, particularly when we start caring about

Re: [swift-dev] Reconsidering the global uniqueness of type metadata and protocol conformance instances

2017-07-29 Thread John McCall via swift-dev
> On Jul 29, 2017, at 4:24 PM, Chris Lattner via swift-dev > wrote: > > On Jul 28, 2017, at 2:20 PM, Joe Groff via swift-dev > wrote: >> >> Overall, my intuition is that the tradeoffs come out in favor for nonunique >> metadata objects, but what do you all think? Is there anything I'm missin

Re: [swift-dev] Reconsidering the global uniqueness of type metadata and protocol conformance instances

2017-07-29 Thread Chris Lattner via swift-dev
> On Jul 29, 2017, at 1:32 PM, John McCall wrote: > >> On Jul 29, 2017, at 4:24 PM, Chris Lattner via swift-dev >> wrote: >> >> On Jul 28, 2017, at 2:20 PM, Joe Groff via swift-dev >> wrote: >>> >>> Overall, my intuition is that the tradeoffs come out in favor for nonunique >>> metadata o

Re: [swift-dev] Reconsidering the global uniqueness of type metadata and protocol conformance instances

2017-07-29 Thread John McCall via swift-dev
> On Jul 29, 2017, at 4:33 PM, Chris Lattner wrote: >> On Jul 29, 2017, at 1:32 PM, John McCall wrote: >> >>> On Jul 29, 2017, at 4:24 PM, Chris Lattner via swift-dev >>> wrote: >>> >>> On Jul 28, 2017, at 2:20 PM, Joe Groff via swift-dev >>> wrote: Overall, my intuition is that

Re: [swift-dev] Reconsidering the global uniqueness of type metadata and protocol conformance instances

2017-07-29 Thread Slava Pestov via swift-dev
> On Jul 29, 2017, at 12:53 PM, John McCall via swift-dev > wrote: > >> On Jul 29, 2017, at 12:48 AM, Andrew Trick > > wrote: >>> On Jul 28, 2017, at 8:13 PM, John McCall >> > wrote: On Jul 28, 2017, at 11:11 PM, John McCall via swift-dev

Re: [swift-dev] Reconsidering the global uniqueness of type metadata and protocol conformance instances

2017-07-29 Thread Slava Pestov via swift-dev
> On Jul 28, 2017, at 4:07 PM, Jordan Rose via swift-dev > wrote: > > My point is we can't use our usual mangling in the string, because that > contains type names. > We could invent a ‘mangling’ format (either using the existing demangler with a special flag or something else) where types