Commits

John McCall committed 169e4fe3199
Add Builtin.UnsafeValueBuffer, which provides opaque storage for arbitrary values. A buffer doesn't provide any way to identify the type of value it stores, and so it cannot be copied, moved, or destroyed independently; thus it's not available as a first-class type in Swift, which is why I've labelled it Unsafe. But it does allow an efficient means of opaquely preserving information between two cooperating functions. This will be useful for the adjustments I need to make to materializeForSet to support safe addressors. I considered making this a SIL type category instead, like $@value_buffer T. This is an attractive idea because it's generally better-typed. The disadvantages are that: - it would need its own address_to_pointer equivalents and - alloc_stack doesn't know what type will be stored in any particular buffer, so there still needs to be something opaque. This representation is a bit gross, but it'll do. Swift SVN r23903