This builds on the infrastructure we have for liveness tracking, by tracking
the "super.init'd" state as another faux memory object that has a liveness.
Each escape/base class use requires super.init to have happened, and super.init
requires super.init to NOT have happened. This gives us pretty great QoI,
full fidelity to the model, and is pretty simple.
This implements:
<rdar://problem/15579247> We need to validate super.init() invariants in initializers
Swift SVN r11073
Remove the initialize_var instruction now that DI fully diagnoses initialization problems. Change String-to-NSString bridging to explicitly invoke String's default constructor; it was the last remaining user of initialize_var. Remove dead code to emit an implicit default constructor without a body.
Swift SVN r11066
t.swift:10:5: error: instance variable 'self.y' not initialized at super.init call
super.init()
^
<unknown>:0: note: variable defined here
t.swift:15:5: error: use of base object 'SomeClass' before super.init call initializes it
x = 17
^
instead of:
variable 'self.y' captured by a closure before being initialized
for each of them. <unknown> is in the crosshairs next.
Swift SVN r11036
the MarkUninitialized instruction. The ugliness here is that
'self' is stuck in a box (not promoted to a value) by SILGen
because super.init can change it. This requires some ugly but
effective pattern matching to be able to look through the loads
and stores involved.
Swift SVN r11023
canonicalization. However, structs will soon be modeled as multi-element
accesses (and we don't want to scalarize them), so we have to handle
non-scalarized versions of these. NFC.
Swift SVN r10828
analyzed, and use it as common currency between the element use
collector and its clients. Element collection is about to become
more nuanced. NFC.
Swift SVN r10781
separate passes. Start splitting some utility functions out,
and rearranging code a bit. While I'm at it, rename some bits
to make more sense now that their purpose has settled.
Swift SVN r10719