The code to copy the refcounts from the object to a new side table wasn't quite right on 32-bit. Fix it to copy the PureSwiftDealloc field, and if the object is immortal, mark the side table's refcount as immortal too.
rdar://121943608
The swift_unknown* entry points are not available on the Linux port.
Previously we would still attempt to use them in a couple of cases:
1) Foreign classes
2) Existentials and archetypes
3) Optionals of boxed existentials
Note that this patch changes IRGen to never emit the
swift_errorRelease/Retain entry points on Linux. We would like to
use them in the future if we ever adopt a tagged-pointer representation
for small errors. In this case, they can be brought back, and the
TypeInfo for optionals will need to be generalized to propagate the
reference counting of the payload type, instead of defaulting to
unknown if the payload type is not natively reference counted.
A similar change will need to be made to support blocks, if we ever
want to use the blocks runtime on Linux.
Fixes <rdar://problem/23335318>, <rdar://problem/23335537>,
<rdar://problem/23335453>.
A weak property in a struct can become nil even if the struct is immutable,
kind of as if the weak reference were actually indirected through a
(mutable) class. We might decide to disallow this someday, or formalize it
better, but as long as we allow it we shouldn't misoptimize it.
Swift SVN r32248
This prevents us from seeing a less useful error message from SILGen
further down the line.
Also fix a bug where @objc without importing Foundation was not diagnosed
after the first top-level form. Some tests were relying on this behavior,
so fix those tests, either by splitting off the objc parts of the test, or
just by passing the -disable-objc-attr-requires-foundation-module flag.
Fixes <rdar://problem/20660270>.
Swift SVN r29359
To limit user confusion when using conditional expressions of type Bool?, we've decided to remove the BooleanType (aka "LogicValue") conformance from optional types. (If users would like to use an expression of type Bool? as a conditional, they'll need to check against nil.)
Note: This change effectively regresses the "case is" pattern over types, since it currently demands a BooleanType conformance. I've filed rdar://problem/17791533 to track reinstating it if necessary.
Swift SVN r20637
This causes a regression in error reporting where there are potential fixes: <rdar://problem/17741575> Other than that, everything works.
Swift SVN r20230
This only tackles the protocol case (<rdar://problem/17510790>); it
does not yet generalize to an arbitrary "class" requirement on either
existentials or generics.
Swift SVN r19896
without the "w = nil" line that explicitly nil's out the weak pointer, that it fails.
I'm not sure what is going on here, but it looks like weak pointers are just broken.
Swift SVN r18307