Access
public struct Access : RegionEntry
extension Access: ReifiableAccess
extension Access: LifetimeExtender
extension Access: CustomStringConvertible
Creates an access on an object.
IR generation sometimes cannot determine the capability used to access an object, as this
information is kept implicit in Hylo sources. For example, a let-binding declaration will
actually request a sink capability on its right hand side if the binding escapes. In these
cases, IR generation will emit access instructions with the set capabilities that may be
inferred from the syntax. These instructions are expected to be “reifed” during IR analysis
so that only a single capability is requested.
-
Declaration
Swift
public typealias Exit = EndAccess -
The capabilities of the access.
Requires
Must be non-empty.Declaration
Swift
public let capabilities: AccessEffectSet -
The type of the accessed type.
Declaration
Swift
public let accessedType: AnyType -
The address from which the capability is borrowed.
Declaration
Swift
public private(set) var source: Operand { get } -
The binding in source program to which the instruction corresponds, if any.
Declaration
Swift
public let binding: VarDecl.ID? -
The site of the code corresponding to that instruction.
Declaration
Swift
public let site: SourceRange -
Creates an instance with the given properties.
Declaration
Swift
fileprivate init( capabilities: AccessEffectSet, accessedType: AnyType, source: Operand, binding: VarDecl.ID?, site: SourceRange ) -
Declaration
Swift
public var result: IR.Type? { get } -
Declaration
Swift
public var operands: [Operand] { get } -
Declaration
Swift
public mutating func replaceOperand(at i: Int, with new: Operand) -
Declaration
Swift
public var description: String { get }
View on GitHub