Table of Contents

Class IrTerminator.Branch

Namespace
MuLang.IR
Assembly
MuLang.IR.dll

Transfers control according to a Boolean condition.

public sealed record IrTerminator.Branch : IrTerminator, IEquatable<IrTerminator>, IEquatable<IrTerminator.Branch>
Inheritance
IrTerminator.Branch
Implements
Inherited Members

Constructors

Branch(TextSpan, int, int, int)

Transfers control according to a Boolean condition.

public Branch(TextSpan Span, int Condition, int TrueBlock, int FalseBlock)

Parameters

Span TextSpan

The source span associated with the operation.

Condition int

The slot containing the condition.

TrueBlock int

The block selected when the condition is true.

FalseBlock int

The block selected when the condition is false.

Properties

Condition

The slot containing the condition.

public int Condition { get; init; }

Property Value

int

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

FalseBlock

The block selected when the condition is false.

public int FalseBlock { get; init; }

Property Value

int

TrueBlock

The block selected when the condition is true.

public int TrueBlock { get; init; }

Property Value

int

Methods

Deconstruct(out TextSpan, out int, out int, out int)

public void Deconstruct(out TextSpan Span, out int Condition, out int TrueBlock, out int FalseBlock)

Parameters

Span TextSpan
Condition int
TrueBlock int
FalseBlock int

Equals(IrTerminator?)

public override sealed bool Equals(IrTerminator? other)

Parameters

other IrTerminator

Returns

bool

Equals(Branch?)

public bool Equals(IrTerminator.Branch? other)

Parameters

other IrTerminator.Branch

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected override bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(Branch?, Branch?)

public static bool operator ==(IrTerminator.Branch? left, IrTerminator.Branch? right)

Parameters

left IrTerminator.Branch
right IrTerminator.Branch

Returns

bool

operator !=(Branch?, Branch?)

public static bool operator !=(IrTerminator.Branch? left, IrTerminator.Branch? right)

Parameters

left IrTerminator.Branch
right IrTerminator.Branch

Returns

bool