so I took the liberty to 'privatize' them with a leading underscore.
This also completely removes '_ArrayBody' from the public interface.
Should be NFC, apart from the public interface change.
Swift SVN r18625
Before this change, the dispatching hacks sent convertFromArrayLiteral
through the "Sequence" path, wherein we could not assume the ability to
non-destructively measure the length of the Sequence before beginning to
add the elements, which resulted in buffer reallocations as elements
were added. Now we the sequence is measured and storage is
pre-allocated.
Swift SVN r18603
and alignment for the purposes of deallocation.
If a class contains a method named __getInstanceSizeAndAlignMask,
and it takes no arguments and returns a pair of words, call
that method directly in order to get the size and alignment
mask instead of trusting the class's formal size and alignment.
This is not a replacement for a proper language solution for
custom allocation, but it'll suffice to fix some immediate
problems with HeapBufferStorage.
If we decide we like this approach, we should really raise
the deallocating destructor up to SIL.
rdar://16979846
Swift SVN r18485
Added a workaround for <rdar://problem/16953026> that allows them to
pass and flipped the sense of a test that was failing because we can now
downcast an Array that we couldn't downcast before.
Swift SVN r18319
assert() and fatalError()
These functions are meant to be used in user code. They are enabled in debug
mode and disabled in release or fast mode.
_precondition() and _preconditionFailure()
These functions are meant to be used in library code to check preconditions at
the api boundry. They are enabled in debug mode (with a verbose message) and
release mode (trap). In fast mode they are disabled.
_debugPrecondition() and _debugPreconditionFailure()
These functions are meant to be used in library code to check preconditions that
are not neccesarily comprehensive for safety (UnsafePointer can be null or an
invalid pointer but we can't check both). They are enabled only in debug mode.
_sanityCheck() and _fatalError()
These are meant to be used for internal consistency checks. They are only
enabled when the library is build with -DSWIFT_STDLIB_INTERNAL_CHECKS=ON.
I modified the code in the standard library to the best of my judgement.
rdar://16477198
Swift SVN r18212