Table of Contents

Class IrInstruction.Binary

Namespace
MuLang.IR
Assembly
MuLang.IR.dll

Applies a binary operation.

public sealed record IrInstruction.Binary : IrInstruction, IEquatable<IrInstruction>, IEquatable<IrInstruction.Binary>
Inheritance
IrInstruction.Binary
Implements
Inherited Members

Constructors

Binary(TextSpan, int, IrBinaryOperator, int, int)

Applies a binary operation.

public Binary(TextSpan Span, int Destination, IrBinaryOperator Operator, int Left, int Right)

Parameters

Span TextSpan

The source span.

Destination int

The destination slot.

Operator IrBinaryOperator

The binary operator.

Left int

The left operand slot.

Right int

The right operand slot.

Properties

Destination

The destination slot.

public int Destination { get; init; }

Property Value

int

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

Left

The left operand slot.

public int Left { get; init; }

Property Value

int

Operator

The binary operator.

public IrBinaryOperator Operator { get; init; }

Property Value

IrBinaryOperator

Right

The right operand slot.

public int Right { get; init; }

Property Value

int

Methods

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

public void Deconstruct(out TextSpan Span, out int Destination, out IrBinaryOperator Operator, out int Left, out int Right)

Parameters

Span TextSpan
Destination int
Operator IrBinaryOperator
Left int
Right int

Equals(IrInstruction?)

public override sealed bool Equals(IrInstruction? other)

Parameters

other IrInstruction

Returns

bool

Equals(Binary?)

public bool Equals(IrInstruction.Binary? other)

Parameters

other IrInstruction.Binary

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 ==(Binary?, Binary?)

public static bool operator ==(IrInstruction.Binary? left, IrInstruction.Binary? right)

Parameters

left IrInstruction.Binary
right IrInstruction.Binary

Returns

bool

operator !=(Binary?, Binary?)

public static bool operator !=(IrInstruction.Binary? left, IrInstruction.Binary? right)

Parameters

left IrInstruction.Binary
right IrInstruction.Binary

Returns

bool