Re: [swift-dev] Understanding runtime entry points

2016-01-06 Thread Joe Groff via swift-dev
> On Jan 6, 2016, at 12:46 PM, Austin Zheng wrote: > > Thanks Joe, this is incredibly helpful, especially the note about how enums > are passed in 'piecewise'. To clarify, what you're seeing in EnumMirror is not the enum itself, but the _EnumMirror structure, which is itself designed to be bi

Re: [swift-dev] Understanding runtime entry points

2016-01-06 Thread Slava Pestov via swift-dev
> On Jan 6, 2016, at 12:57 PM, Austin Zheng wrote: > > Hey Slava, > > Thanks a lot for your detailed responses; it definitely helps to understand > how structs are passed to the C++ function. > > In a separate email, Joe Groff mentioned that there was a difference between > passing the enum

Re: [swift-dev] Understanding runtime entry points

2016-01-06 Thread Austin Zheng via swift-dev
Hey Slava, Thanks a lot for your detailed responses; it definitely helps to understand how structs are passed to the C++ function. In a separate email, Joe Groff mentioned that there was a difference between passing the enum value and passing a pointer to it. I think that might be the root of my

Re: [swift-dev] Understanding runtime entry points

2016-01-06 Thread Austin Zheng via swift-dev
Thanks Joe, this is incredibly helpful, especially the note about how enums are passed in 'piecewise'. re. your question: I was indeed calling the C++ function from Swift and directly passing in the enum (in pseudo-Swift): let myEnum : SomeEnumType = ... cplusplusFunction(value: myEnum, type: Some

Re: [swift-dev] Understanding runtime entry points

2016-01-06 Thread Joe Groff via swift-dev
> On Jan 1, 2016, at 10:58 PM, Austin Zheng via swift-dev > wrote: > > Hello, > > I'm trying to better understand how calls are made between the Swift standard > library code and the runtime entry points. I've read through most of the > documentation in the repo but still have some questions

Re: [swift-dev] Understanding runtime entry points

2016-01-06 Thread Slava Pestov via swift-dev
Hi Austin, > On Jan 1, 2016, at 10:58 PM, Austin Zheng via swift-dev > wrote: > > Hello, > > I'm trying to better understand how calls are made between the Swift standard > library code and the runtime entry points. I've read through most of the > documentation in the repo but still have som