Implement the dispatch half of switch_union for no-payload and singleton unions, lowering them respectively to an integer switch or a simple branch. We don't yet bind the argument payload in the destination branches or handle multi-payload cases.
Swift SVN r7327
the new LoadableTypeInfo refinement interface.
This protects against bugs which would introduce unbalanced
allocations of temporary memory.
Swift SVN r7227
The current implementation of dealloc_stack in IR-gen is a
no-op, but that's very much wrong for types with non-trivial
local allocation requirements, e.g. archetypes. So we need
to be able to do non-trivial code here. However, that means
modeling both the buffer pointer and the allocated address
in SIL.
To make this more type-safe, introduce a SIL-specific
'[local_storage] T' type that represents the required
allocation for locally storing a T. alloc_stack now returns
one of those in additon to a *T, and dealloc_stack expects
the former.
IR-gen still implements dealloc_stack as a no-op, but
that's now easy to fix.
Swift SVN r6937
capture analysis is gone. This functionality is subsumed by SIL passes,
which turn boxes into stack allocations.
One minor detail of this is that dealloc_ref isn't implemented yet in IRGen
(rdar://14648382) and SILGen produces it for destructors (e.g. see
test/SILGen/lifetime.swift). To unblock progress, I just removed the
llvm_unreachable in IRGen.
Swift SVN r6890
Have project_existential return $*This instead of $Builtin.OpaquePointer, and have protocol_method do the same for methods of opaque protocols. This makes it easier for passes to reason about the semantics of the projected address, since it's restricted by the semantics of SIL addresses.
Swift SVN r6872
We haven't fully updated references to union cases, and enums still are not
their own thing yet, but "oneof" is gone. Long live "union"!
Swift SVN r6783
"SILConstant" doesn't really describe its role in SIL anymore, which is to provide a reference to a Swift declaration in a SIL instruction, such as a method or nominal type field.
Swift SVN r6559
These still need to be serialized, because they are one-to-one with the
type's protocol list, but don't actually require any data. Found on
attempting to emit a module for the standard library.
Most of the churn here is moving Interleave.h to a more general STLExtras.h.
Swift SVN r6167
their types.
- DebugTypeInfo holds all type info we need to emit debug information.
- Type info is limited to name, location, and storage size.
- As a side-effect: verbose LLVM IR allocas in debug builds!
Swift SVN r5980
Until we get a proper dataflow pass to statically catch fall-off-the-end bugs, going into outer space is an awful UX for our library writers. Insert an llvm.trap() call when we emit SIL "unreachable" instructions.
Swift SVN r5953