Commit Graph

7 Commits

Author SHA1 Message Date
Nate Chandler
5881ea43e7 [DI] Fix unfailable throw during super init.
When deallocating a partially allocated class in the trapping branch of
an unfailable cast, cast back down to the subclass which is being
partially deallocated before emitting the dealloc partial ref
instruction.
2024-04-21 20:56:39 -07:00
Kavon Farvardin
a4a5d32668 suppress notes from DI about @_compilerInitialized when reasonable
Since the only user of `@_compilerInitialized` is distributed
actors, I decided to make DI's diagnostics saying that such a
var was not initialized a second-tier note. If there is some other
var associated with the same Memory that is _not_ compiler initialized
AND is also _not_ initialized, then we suppress the suggestion to initialize
the @_compilerInitialized thing, because something else is problematic. Only
when there are @_compilerInitialized things that are still not initialized,
do we emit a note talking about that.
2022-03-24 16:20:06 -07:00
Kavon Farvardin
13cbe0dd15 adding the @_compilerInitialized attribute
This attribute is designed for let-bound variables whose initializing
assignment is synthesized by the compiler. This assignment is
expected to happen at some point before DefiniteInitialization has
run, which is the pass that verifies whether the compiler truly
initialized the variable.

I generally expect that this will never be a user-facing feature, and
that the synthesized assignment happens in SILGen.
2022-03-24 16:18:49 -07:00
Michael Gottesman
3ebd8df493 [gardening] Remove unnecessary -enable-sil-ownership from tests that now just get it from their pattern.
This just eliminates -enable-sil-ownership from all target-swift-frontend and
target-swift-emit-silgen RUN lines. Both of those now include
enable-sil-ownership in their expansion.
2019-03-12 20:39:18 -07:00
Michael Gottesman
2cacbc6403 [di] Enable SIL Ownership verification on all definite init tests.
*NOTE* DefiniteInit is still running /after/ ownership is stripped. This is just
making sure that the code we are producing can actually pass the verifier.

rdar://31521023
2017-09-06 16:31:20 -07:00
Daniel Duan
ebb0c3a204 replaced single-line ++/-- with +=/-= 2015-12-15 09:05:37 -08:00
Andrew Trick
bd35b4789c Move test/SILOptimizer files to reflect lib/SILOptimizer. 2015-12-11 15:53:22 -08:00