Class IrFunction
Represents an entry or user-defined function in portable MuLang IR.
public sealed record IrFunction : IEquatable<IrFunction>
- Inheritance
-
IrFunction
- Implements
- Inherited Members
Constructors
IrFunction(string, TypeSymbol, int, IReadOnlyList<IrSlot>, IReadOnlyList<IrBasicBlock>)
Initializes a new instance of the IrFunction class using a root lifetime region.
[Obsolete("Use the constructor that includes lifetime and exception regions.")]
public IrFunction(string Id, TypeSymbol ReturnType, int EntryBlock, IReadOnlyList<IrSlot> Slots, IReadOnlyList<IrBasicBlock> Blocks)
Parameters
IdstringThe function identifier.
ReturnTypeTypeSymbolThe declared return type.
EntryBlockintThe identifier of the entry block.
SlotsIReadOnlyList<IrSlot>The slots available to the function.
BlocksIReadOnlyList<IrBasicBlock>The function basic blocks.
IrFunction(string, TypeSymbol, int, IReadOnlyList<IrSlot>, IReadOnlyList<IrBasicBlock>, IReadOnlyList<IrLifetimeRegion>)
Initializes a new instance of the IrFunction class without exception regions.
[Obsolete("Use the constructor that includes exception regions.")]
public IrFunction(string id, TypeSymbol returnType, int entryBlock, IReadOnlyList<IrSlot> slots, IReadOnlyList<IrBasicBlock> blocks, IReadOnlyList<IrLifetimeRegion> lifetimeRegions)
Parameters
idstringThe function identifier.
returnTypeTypeSymbolThe declared return type.
entryBlockintThe identifier of the entry block.
slotsIReadOnlyList<IrSlot>The slots available to the function.
blocksIReadOnlyList<IrBasicBlock>The function basic blocks.
lifetimeRegionsIReadOnlyList<IrLifetimeRegion>The function lifetime regions.
IrFunction(string, TypeSymbol, int, IReadOnlyList<IrSlot>, IReadOnlyList<IrBasicBlock>, IReadOnlyList<IrLifetimeRegion>, IReadOnlyList<IrExceptionRegion>)
Represents an entry or user-defined function in portable MuLang IR.
public IrFunction(string Id, TypeSymbol ReturnType, int EntryBlock, IReadOnlyList<IrSlot> Slots, IReadOnlyList<IrBasicBlock> Blocks, IReadOnlyList<IrLifetimeRegion> LifetimeRegions, IReadOnlyList<IrExceptionRegion> ExceptionRegions)
Parameters
IdstringThe function identifier.
ReturnTypeTypeSymbolThe declared return type.
EntryBlockintThe identifier of the entry block.
SlotsIReadOnlyList<IrSlot>The slots available to the function.
BlocksIReadOnlyList<IrBasicBlock>The function basic blocks.
LifetimeRegionsIReadOnlyList<IrLifetimeRegion>The function lifetime regions.
ExceptionRegionsIReadOnlyList<IrExceptionRegion>The function exception regions.
Properties
Blocks
The function basic blocks.
public IReadOnlyList<IrBasicBlock> Blocks { get; init; }
Property Value
EntryBlock
The identifier of the entry block.
public int EntryBlock { get; init; }
Property Value
ExceptionRegions
The function exception regions.
public IReadOnlyList<IrExceptionRegion> ExceptionRegions { get; init; }
Property Value
Id
The function identifier.
public string Id { get; init; }
Property Value
LifetimeRegions
The function lifetime regions.
public IReadOnlyList<IrLifetimeRegion> LifetimeRegions { get; init; }
Property Value
ReturnType
The declared return type.
public TypeSymbol ReturnType { get; init; }
Property Value
Slots
The slots available to the function.
public IReadOnlyList<IrSlot> Slots { get; init; }
Property Value
Methods
Deconstruct(out string, out TypeSymbol, out int, out IReadOnlyList<IrSlot>, out IReadOnlyList<IrBasicBlock>)
Deconstructs the function using the legacy component shape.
[Obsolete("Use the deconstruction shape that includes lifetime and exception regions.")]
public void Deconstruct(out string Id, out TypeSymbol ReturnType, out int EntryBlock, out IReadOnlyList<IrSlot> Slots, out IReadOnlyList<IrBasicBlock> Blocks)
Parameters
IdstringThe function identifier.
ReturnTypeTypeSymbolThe declared return type.
EntryBlockintThe identifier of the entry block.
SlotsIReadOnlyList<IrSlot>The slots available to the function.
BlocksIReadOnlyList<IrBasicBlock>The function basic blocks.
Deconstruct(out string, out TypeSymbol, out int, out IReadOnlyList<IrSlot>, out IReadOnlyList<IrBasicBlock>, out IReadOnlyList<IrLifetimeRegion>, out IReadOnlyList<IrExceptionRegion>)
public void Deconstruct(out string Id, out TypeSymbol ReturnType, out int EntryBlock, out IReadOnlyList<IrSlot> Slots, out IReadOnlyList<IrBasicBlock> Blocks, out IReadOnlyList<IrLifetimeRegion> LifetimeRegions, out IReadOnlyList<IrExceptionRegion> ExceptionRegions)
Parameters
IdstringReturnTypeTypeSymbolEntryBlockintSlotsIReadOnlyList<IrSlot>BlocksIReadOnlyList<IrBasicBlock>LifetimeRegionsIReadOnlyList<IrLifetimeRegion>ExceptionRegionsIReadOnlyList<IrExceptionRegion>
Equals(IrFunction?)
public bool Equals(IrFunction? other)
Parameters
otherIrFunction
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(IrFunction?, IrFunction?)
public static bool operator ==(IrFunction? left, IrFunction? right)
Parameters
leftIrFunctionrightIrFunction
Returns
operator !=(IrFunction?, IrFunction?)
public static bool operator !=(IrFunction? left, IrFunction? right)
Parameters
leftIrFunctionrightIrFunction