While profiling some code recently, I've been seeing some of these 'variable initialization expression' things, and I'm not sure what they're for:
Here's the struct these variables are part of. As you can see, it's generic for a given collection type, and the variables listed here are all
Range<T.Index>?. There are inlinable, member-wise initializers, and that's the only way an instance of this struct is created.
Expanding these 'variable initialization expression's, each one is full of runtime calls (despite, as the screenshot above says, this being part of a specialized static method call). I see calls to
type metadata accessor for Range, etc.
What's up with all of this? I'm initializing these values to
nil. Why do I have to go through all of this runtime stuff? I'm using a nightly toolchain from 09/09, so it's a relatively up-to-date compiler. I swear this didn't happen on the ~3-month-old nightly I was previously using.