Renames swift_class_getInstanceSize to
swift_class_getInstancePositiveExtentSize to reflect that it is
the size of the object after the instance address point.
Swift SVN r23333
Found by inspection. I tried long and hard to think of a test that
would detect this bug, and even tried to write quite a few, but none
would be triggered. Bright ideas most welcome.
Commits to come, however, in the presence of this bug, cause around 25
failures in the stdlib test suite, so at least this won't regress.
Swift SVN r22984
A revamped version of HeapBuffer that doesn't allow null buffer
references. Something like this is needed for killing the null array
state.
Swift SVN r22683
Make unique reference checking available to users, making ManagedBuffer
a complete facility for building COW value types. Also rationalize the
way we name and organize the runtime primitives we ultimately call.
Swift SVN r22594
This reverts r22541. It turns out that because of the type-punning we
need in order to handle the canonical empty array buffer in Array<Int>
and Array<SomeClass>, calls through methods that could be
dynamically-dispatched (i.e. methods of classes) can't be used to access
an array buffer. So, for arrays, we need to keep the HeapBuffer
strategy wherein a struct manager object does all the address
calculations.
ManagedBuffer is still a useful tool for users though, and it fills the
role that HeapBuffer was intended to serve for them better than
HeapBuffer itself does, because it is simpler and more type-safe.
Swift SVN r22573
...at least, not without the word "unsafe." ManagedBuffer's create()
function takes a closure that creates an initial value for its "value"
property (which is technically computed but effectively stored). Before
this change, the closure had access to that property before it was
initialized. Now you can still get there, but you have to go through
"withUnsafeMutablePointer*" methods.
Swift SVN r22501