Re: [swift-dev] SILNode versus C++

2017-12-16 Thread John McCall via swift-dev
> On Dec 16, 2017, at 9:08 AM, David Zarzycki via swift-dev > wrote: > > Hello, > > I’m trying to improve SILNode memory layout density by adopting the AST > bitfield macros. Unfortunately, multiple inheritance doesn’t seem to get > along with anonymous/unnamed unions. Here is a distillation

Re: [swift-dev] SILNode versus C++

2017-12-16 Thread Jonathan Prescott via swift-dev
This is expected. The inheritance chain ultimately ends up a B in both cases, so the reference to j is ambiguous, and the compiler can’t resolve which B is meant. This works. class B { protected: int i; union { int j; }; }; class C { protected:

[swift-dev] SILNode versus C++

2017-12-16 Thread David Zarzycki via swift-dev
Hello, I’m trying to improve SILNode memory layout density by adopting the AST bitfield macros. Unfortunately, multiple inheritance doesn’t seem to get along with anonymous/unnamed unions. Here is a distillation of the problem: class B { protected: int i; union { int j; }; }; class X :

Re: [swift-dev] [PITCH] Improve Optional Chain Assignment on Tuple Assignment

2017-12-16 Thread Kevin Nattinger via swift-dev
> On Dec 15, 2017, at 11:24 PM, John McCall via swift-dev > wrote: > > >> On Dec 16, 2017, at 2:21 AM, Cao, Jiannan via swift-dev > > wrote: >> >> Hi all, >> >> I have come up an improvement point about Optional Chain Assignment >> >> 1. Optional Chain Assignment