mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Introduce a new null_class SIL instruction for forming a null pointer
reference to something of class type. This is required to model RebindSelfInConstructorExpr correctly to DI, since in the class case, self.init and super.init *take* a value out of class box so that it can pass the +1 value without performing an extra retain. Nothing else in the compiler uninitializes a DI-controlled memory object like this, so nothing else needs this. DI really doesn't like something going from initialized to uninitialized. Yes, I feel super-gross about this and am really unhappy about it. I may end up reverting this if I can find an alternate solution to this problem. Swift SVN r27525
This commit is contained in:
@@ -92,6 +92,7 @@ static bool isTransitiveEscapeInst(SILInstruction *Inst) {
|
||||
case ValueKind::DeinitExistentialAddrInst:
|
||||
case ValueKind::UnreachableInst:
|
||||
case ValueKind::IsNonnullInst:
|
||||
case ValueKind::NullClassInst:
|
||||
case ValueKind::CondFailInst:
|
||||
case ValueKind::DynamicMethodBranchInst:
|
||||
case ValueKind::ReturnInst:
|
||||
|
||||
Reference in New Issue
Block a user