Re: [swift-dev] A constraint system / type variable question

2017-09-26 Thread Joe Groff via swift-dev
> On Sep 25, 2017, at 7:53 PM, David Zarzycki wrote: > > > >> On Sep 25, 2017, at 21:59, Joe Groff via swift-dev >> wrote: >> >> >> >> On Sep 25, 2017, at 3:41 PM, David Zarzycki wrote: >> >>> >>> On Sep 25, 2017, at 18:23, Joe

Re: [swift-dev] A constraint system / type variable question

2017-09-25 Thread David Zarzycki via swift-dev
> On Sep 25, 2017, at 18:23, Joe Groff wrote: > > > >> On Sep 25, 2017, at 1:04 PM, David Zarzycki wrote: >> >> >> >>> On Sep 25, 2017, at 14:37, Joe Groff wrote: >>> >>> >>> On Sep 23, 2017, at 10:36 PM, Robert Widmann via

Re: [swift-dev] A constraint system / type variable question

2017-09-25 Thread Joe Groff via swift-dev
> On Sep 25, 2017, at 1:04 PM, David Zarzycki wrote: > > > >> On Sep 25, 2017, at 14:37, Joe Groff wrote: >> >> >> >>> On Sep 23, 2017, at 10:36 PM, Robert Widmann via swift-dev >>> wrote: >>> >>> Why is the arrow carrying the “Has

Re: [swift-dev] A constraint system / type variable question

2017-09-25 Thread David Zarzycki via swift-dev
> On Sep 25, 2017, at 14:37, Joe Groff wrote: > > > >> On Sep 23, 2017, at 10:36 PM, Robert Widmann via swift-dev >> wrote: >> >> Why is the arrow carrying the “Has Value Semantics Bit” rather than it being >> part of a protocol composition on an

Re: [swift-dev] A constraint system / type variable question

2017-09-25 Thread Joe Groff via swift-dev
> On Sep 23, 2017, at 10:36 PM, Robert Widmann via swift-dev > wrote: > > Why is the arrow carrying the “Has Value Semantics Bit” rather than it being > part of a protocol composition on an argument type, or a convention bit on > the parameter like ‘inout’? Value

Re: [swift-dev] A constraint system / type variable question

2017-09-25 Thread David Zarzycki via swift-dev
Thanks John! I’ll find a workaround or just punt on this QoI work for now. Dave > On Sep 24, 2017, at 23:06, John McCall wrote: > >> On Sep 24, 2017, at 1:13 AM, David Zarzycki via swift-dev >> > wrote: >> Hi Robert, >> >>

Re: [swift-dev] A constraint system / type variable question

2017-09-24 Thread John McCall via swift-dev
> On Sep 24, 2017, at 1:13 AM, David Zarzycki via swift-dev > wrote: > Hi Robert, > > As a prerequisite to some other hacking I’m doing, I have an experimental > implementation of value semantics; where (among other details), all functions > have a bit in ExtInfo that

Re: [swift-dev] A constraint system / type variable question

2017-09-24 Thread Robert Widmann via swift-dev
Then the split you want isn’t at the level of the ClosureExpr, it’s at the level of the ApplyExpr. You should take a look at CSRanking and penalize/remove overloads that have arguments whose “I have value semantics” bits don’t match. ~Robert Widmann > On Sep 24, 2017, at 8:01 AM, David

Re: [swift-dev] A constraint system / type variable question

2017-09-24 Thread David Zarzycki via swift-dev
Well, for starters, a function with zero arguments/parameters can be value semantic. For example: func getMagicNumber() -> UInt64 { return 0x3A4B1C7539DA4922 } Dave > On Sep 24, 2017, at 01:36, Robert Widmann via swift-dev > wrote: > > Why is the arrow carrying the

Re: [swift-dev] A constraint system / type variable question

2017-09-23 Thread Robert Widmann via swift-dev
Why is the arrow carrying the “Has Value Semantics Bit” rather than it being part of a protocol composition on an argument type, or a convention bit on the parameter like ‘inout’? ~Robert Widmann > On Sep 24, 2017, at 1:12 AM, David Zarzycki wrote: > > Hi Robert, > > As a

Re: [swift-dev] A constraint system / type variable question

2017-09-23 Thread David Zarzycki via swift-dev
Hi Robert, As a prerequisite to some other hacking I’m doing, I have an experimental implementation of value semantics; where (among other details), all functions have a bit in ExtInfo that denotes whether the function has enforced value semantics or not. As a matter of polish, I’d like the

Re: [swift-dev] A constraint system / type variable question

2017-09-23 Thread Robert Widmann via swift-dev
> On Sep 23, 2017, at 3:39 PM, David Zarzycki via swift-dev > wrote: > > Hello, > > I’m trying to replace the explicit FunctionType returned by > visitClosureExpr() in CSGen.cpp with a type variable; and ultimately a > disjunction of two FunctionTypes with different

[swift-dev] A constraint system / type variable question

2017-09-23 Thread David Zarzycki via swift-dev
Hello, I’m trying to replace the explicit FunctionType returned by visitClosureExpr() in CSGen.cpp with a type variable; and ultimately a disjunction of two FunctionTypes with different ExtInfo flags set (one favored, one not). After reviewing the code and making a few attempts, I haven’t been