mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SIL: Track target formal type for casts
SIL type lowering erases DynamicSelfType, so we generate incorrect code when casting to DynamicSelfType. Fixing this requires a fair amount of plumbing, but most of the changes are mechanical. Note that the textual SIL syntax for casts has changed slightly; the target type is now a formal type without a '$', not a SIL type. Also, the unconditional_checked_cast_value and checked_cast_value_br instructions now take the _source_ formal type as well, just like the *_addr forms they are intended to replace.
This commit is contained in:
@@ -771,7 +771,6 @@ void Serializer::writeBlockInfoBlock() {
|
||||
BLOCK_RECORD(sil_block, SIL_VTABLE);
|
||||
BLOCK_RECORD(sil_block, SIL_VTABLE_ENTRY);
|
||||
BLOCK_RECORD(sil_block, SIL_GLOBALVAR);
|
||||
BLOCK_RECORD(sil_block, SIL_INST_CAST);
|
||||
BLOCK_RECORD(sil_block, SIL_INIT_EXISTENTIAL);
|
||||
BLOCK_RECORD(sil_block, SIL_WITNESS_TABLE);
|
||||
BLOCK_RECORD(sil_block, SIL_WITNESS_METHOD_ENTRY);
|
||||
|
||||
Reference in New Issue
Block a user