There is an undocumented invariant that function arguments can only
described by a either a dbg.value or a dbg.declare. In the Dwarf backend
function arguments are inserted into an array that is indexed by ArgNo and
if more than one description exist it will overwrite the previous one, and
the previous DbgVariable will become an orphan as detected by the
assertion.
<rdar://problem/17315406>
Swift SVN r18903
Mandatory-inlined (aka transparent functions) are still treated as if they
had the location and scope of the call site. <rdar://problem/14845844>
Support inline scopes once we have an optimizing SIL-based inliner
Patch by Adrian Prantl.
Swift SVN r18835
Add objc_metatype_to_object and objc_existential_metatype_to_object to convert metatypes to AnyObject, and objc_protocol to get a reference to an @objc protocol descriptor as a Protocol class instance.
Swift SVN r18824
put the result in a different place.
WIP: no IRGen support yet.
This will eventually be the required form when casting
to an address-only type; the existing instructions will
have only scalar outputs.
Swift SVN r18780
dynamicCastClass assumes that the destination type is a
Swift class type.
dynamicCastObjCClass assumes that the destination type is
an ObjC class type (represented as ObjC metadata, not type
metadata).
dynamicCastUnknownClass assumes only that the destination
type is some kind of class.
Swift SVN r18776
- Continue adding support for checked downcasts of array types (rdar://problem/16535104)
- Fix non-bridged array conversions post-r17868
- Fix rdar://problem/16773693
- Add tests for NSArray coercions to and from Array<T>
Swift SVN r17957
tuples and structs that are passed to a function by value.
<rdar://problem/15928331> Need to support DW_OP_piece for multi-Value variables/arguments
<rdar://problem/16599747> Variables not displayed at all in SwiftDemo02b_Closure (back again)
Swift SVN r17923
This preserves more of source info (e.g. API name location) and simplifies things since
we don't have to construct ParamDecls for the unnamed parameters later on.
Swift SVN r17828
This mostly falls out from the metatype cast infrastructure, but we need to generalize some Sema and SILGen code to accept AnyMetatypeType. Concrete-to-existential metatypes will need more runtime checking that isn't implemented, so raise a 'not implemented' error on those for now.
Swift SVN r17798
When we partially apply an inner-pointer method or property, the thunk or partial_apply that applies "self" needs to be the one that handles lifetime-extending "self". Verify that a partial_apply-ed inner pointer method is not inner pointer and implement lifetime extension in the partial apply thunk. Fixes <rdar://problem/16803701>.
Swift SVN r17321
Move the lowering for IndexAddrInst into a TypeInfo method so it can be used in other places. Change it to emit 'mul nsw' instead of 'mul nuw' so that it tolerates negative indices.
Swift SVN r16998
An unsafe cast from a base to a derived class isn't really all that different from one from Builtin.NativeObject to an arbitrary class, so relax this pair of instructions to allow an arbitrary bitcast. This only combines the instructions; it doesn't attempt to simplify any codegen that was emitting round-trip casts before yet.
Swift SVN r16736
This allows the payload for a loadable enum to be unsafely projected without branching, enabling more enum optimizations when switch branches can be culled or when indirect enum code can be promoted.
Swift SVN r16729
This was part of the original weak design that
there was never any particular reason to rush the
implementation for. It's convenient to do this now
so that we can use it to implement Unmanaged<T> for
importing CF types.
Swift SVN r16693
Give us a way to formally represent autoreleases in SIL separate from autoreleased returns, allowing us to lifetime-extend inner pointer parameters the lazy way and hopefully clean up some asmname hacks in the stdlib implementation too.
Swift SVN r16632
Implement the init_block_storage_header SIL instruction by teaching IRGen how to produce block descriptors, including copy/dispose helpers and block signatures.
Swift SVN r16478
Add project_block_storage, to project the capture storage from within a block_storage, and init_block_storage_header, to represent filling out the block header.
Swift SVN r16358
by not doing various dumb things that break it.
Specifically, directly return the result of
objc_autoreleaseReturnValue (so that we can actually
tail call it) and substitute the result of
objc_retainAutoreleasedReturnValue for the call result
(so that we don't have instructions saving the call
result interfering with the pattern being sniffed).
I found both of those bugs by educated inspection, then
spent a while debugging why it wasn't making my test case
successfully reclaim. It turns out that the first
autorelease reclaim attempt will always fail on x86-64
because the sniffing code finds the dyld stub; the
optimization only actually works after
objc_retainAutoreleaseReturnValue has been called at
least once in that shared object. Fun times.
rdar://16565958
Swift SVN r16351
Formatting names into strings repeatedly, and using those for semantic
analysis, is generally considered poor form. Additionally, use the
camelCase utilities to perform the string manipulation we need, and
cache results on the ObjCAttr so we don't repeatedly do string
manipulation.
Swift SVN r16334
These bits are orthogonal to each other, so combine them into one, and diagnose attempts to produce a type that's both. Spot-fix a bunch of places this revealed by inspection that we would have crashed in SILGen or IRGen if blocks were be handled.
Swift SVN r16088