Swift SIL: add some instruction classes and APIs

* add `UnownedRetainInst` and `UnownedReleaseInst`
* add `var value` to `RetainValueInst` and `ReleaseValueInst`
* make the protocol `UnaryInstruction` be an `Instruction`
* add `var Type.isValueTypeWithDeinit`
* add `var Type.isUnownedStorageType`
* add `var OperandArray.values`
This commit is contained in:
Erik Eckstein
2023-06-06 19:12:47 +02:00
parent ae9a0c1007
commit 5325a4fe21
9 changed files with 65 additions and 2 deletions

View File

@@ -76,6 +76,10 @@ public struct OperandArray : RandomAccessCollection, CustomReflectable {
base: OptionalBridgedOperand(op: base.advancedBy(bounds.lowerBound).op),
count: bounds.upperBound - bounds.lowerBound)
}
public var values: LazyMapSequence<LazySequence<OperandArray>.Elements, Value> {
self.lazy.map { $0.value }
}
}
public struct UseList : CollectionLikeSequence {