Re: [swift-dev] What can you change in a fixed-contents struct?

2017-09-06 Thread Slava Pestov via swift-dev
> On Sep 6, 2017, at 7:57 PM, Brent Royal-Gordon via swift-dev > wrote: > >> On Sep 5, 2017, at 11:59 AM, Jordan Rose via swift-dev > > wrote: >> >> Now, we don't plan to stick to C's layout for structs, even

Re: [swift-dev] What can you change in a fixed-contents struct?

2017-09-06 Thread Brent Royal-Gordon via swift-dev
> On Sep 5, 2017, at 11:59 AM, Jordan Rose via swift-dev > wrote: > > Now, we don't plan to stick to C's layout for structs, even fixed-contents > structs. We'd really like users to not worry about manually packing things > into trailing alignment space. But we still need

Re: [swift-dev] What can you change in a fixed-contents struct?

2017-09-06 Thread Slava Pestov via swift-dev
> On Sep 6, 2017, at 11:09 AM, David Zarzycki via swift-dev > wrote: > > I see. Would “@fixedSize” or “@abi(size)” be better names? In other words, > the developer promises that whatever size the struct is now, it will be that > way forever? > > Also, wouldn’t the Pair

Re: [swift-dev] [Swift CI] Build Failure: 0. OSS - Swift Incremental RA - Ubuntu 16.10 (master) #425

2017-09-06 Thread Arnold Schwaighofer via swift-dev
For example, an the same failure occurred earlier here: https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-16_10/422/console > On Sep 6, 2017, at 12:54 PM, Arnold Schwaighofer

Re: [swift-dev] [Swift CI] Build Failure: 0. OSS - Swift Incremental RA - Ubuntu 16.10 (master) #425

2017-09-06 Thread Arnold Schwaighofer via swift-dev
Cannot be related to my commit. I did however see this test failing intermittently. > On Sep 6, 2017, at 12:48 PM, Mishal Shah wrote: > > Test Case 'TestURLSession.test_concurrentRequests' started at 2017-09-06 > 19:43:55.444 >

Re: [swift-dev] [Swift CI] Build Failure: 0. OSS - Swift Incremental RA - Ubuntu 16.10 (master) #425

2017-09-06 Thread Mishal Shah via swift-dev
Test Case 'TestURLSession.test_concurrentRequests' started at 2017-09-06 19:43:55.444 /home/buildnode/jenkins/workspace/oss-swift-incremental-RA-linux-ubuntu-16_10/swift/utils/build-script-impl: line 262: 25147 Segmentation fault "$@“ Thanks, Mishal Shah > On Sep 6, 2017, at 12:43 PM,

Re: [swift-dev] Swift build on ppc64le platform

2017-09-06 Thread John McCall via swift-dev
> On Sep 6, 2017, at 3:28 AM, Meghali Dhoble wrote: > Thanks John, for the response. > We have a patch added already for ppc64 support at llvm, however still the > failures seen, > Did you change Clang? John. > I will try to opt for 2nd option and see if that helps. > >

Re: [swift-dev] What can you change in a fixed-contents struct?

2017-09-06 Thread David Zarzycki via swift-dev
Hi Jordan, Okay, I just read the Library Evolution section about @fixedContents. Ya, the name of this attribute is difficult due to the collection of goals and subtle implications. I worry that others will find it difficult too, no matter what the name. :-/ I skimmed the rest of the document

Re: [swift-dev] What can you change in a fixed-contents struct?

2017-09-06 Thread Jordan Rose via swift-dev
That's exactly why neither of those names are correct. The annotation we're describing here means "the stored properties of this struct will not change, please optimize". That gives us the actual fully-specified layout optimizations when the contents happen to be non-generic and similarly

Re: [swift-dev] What can you change in a fixed-contents struct?

2017-09-06 Thread David Zarzycki via swift-dev
I see. Would “@fixedSize” or “@abi(size)” be better names? In other words, the developer promises that whatever size the struct is now, it will be that way forever? Also, wouldn’t the Pair example below require that ‘A’ also be @fixedContents? Otherwise what does @fixedContents mean if the

Re: [swift-dev] What can you change in a fixed-contents struct?

2017-09-06 Thread Jordan Rose via swift-dev
I don't think that's the right way to think about it either. It's purely an optimization tool to say "I won't add anything else to this struct", which means the compiler can avoid indirection when manipulating the struct across module boundaries. We could implement it with dynamic offset

Re: [swift-dev] What can you change in a fixed-contents struct?

2017-09-06 Thread David Zarzycki via swift-dev
Ah, now that I see the CGPoint example, I understand. Thanks! Ya, the “hard” user-experience model I brought up feels wrong for CGPoint, etc. (For non-Apple people, CGPoint is a struct of two doubles on 64-bit machines add two floats on 32-bit machines.) It wasn’t obvious to me from context

Re: [swift-dev] What can you change in a fixed-contents struct?

2017-09-06 Thread Jordan Rose via swift-dev
I'd be okay with allowing the ABI attributes to control ordering, but I would definitely not require them on every fixed-contents struct. We hope making a struct fixed-contents isn't something people have to do too often, but we don't want to drop them all the way into "hard" land when they do

Re: [swift-dev] What can you change in a fixed-contents struct?

2017-09-06 Thread Jordan Rose via swift-dev
> On Sep 5, 2017, at 18:37, Nevin Brackett-Rozinsky via swift-dev > wrote: > > On Tue, Sep 5, 2017 at 6:08 PM, Slava Pestov via swift-dev > > wrote: > We expect that “define your struct in C” is still the way to go for

Re: [swift-dev] What can you change in a fixed-contents struct?

2017-09-06 Thread David Zarzycki via swift-dev
Hi Jordan, I really doubt that “belt and suspenders” ABI attributes would drive people to C, but reasonable people can certainly disagree on that. Bertrand, when he was at Apple, used to say that “easy things should be easy, and hard things should be possible”. I think ABI related attributes

Re: [swift-dev] how much of non-Swift in Swif

2017-09-06 Thread Alex Blewitt via swift-dev
> On 6 Sep 2017, at 10:26, blaster_in_black via swift-dev > wrote: > > 1) How much and what types of interfaces with non-Swift code is there in the > standard library and the runtime? I have seen references to the "Builtin" > class, that as I understand is directly

[swift-dev] how much of non-Swift in Swif

2017-09-06 Thread blaster_in_black via swift-dev
Hi Swift developers, nice to meet you all in this list. While having a look at Swift's source code, I am not able to really answer myself two questions: 1) How much and what types of interfaces with non-Swift code is there in the standard library and the runtime? I have seen references to the

Re: [swift-dev] Swift build on ppc64le platform

2017-09-06 Thread Meghali Dhoble via swift-dev
Thanks John, for the response. We have a patch added already for ppc64 support at llvm, however still the failures seen, I will try to opt for 2nd option and see if that helps. Thanks, Meghali From: John McCall To: Meghali Dhoble Cc: