Files
swift-mirror/stdlib/core/ContiguousArrayBuffer.swift
John McCall 5ddee671b6 Provide a hacky hook for specifying a class's instance size
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
2014-05-21 07:22:39 +00:00

11 KiB