Table of Contents

Class IrInstruction.Constant

Namespace
MuLang.IR
Assembly
MuLang.IR.dll

Loads a constant value into a slot.

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

Constructors

Constant(TextSpan, int, TypeSymbol, object?)

Loads a constant value into a slot.

public Constant(TextSpan Span, int Destination, TypeSymbol Type, object? Value)

Parameters

Span TextSpan

The source span.

Destination int

The destination slot.

Type TypeSymbol

The constant type.

Value object

The constant value.

Properties

Destination

The destination slot.

public int Destination { get; init; }

Property Value

int

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

Type

The constant type.

public TypeSymbol Type { get; init; }

Property Value

TypeSymbol

Value

The constant value.

public object? Value { get; init; }

Property Value

object

Methods

Deconstruct(out TextSpan, out int, out TypeSymbol, out object?)

public void Deconstruct(out TextSpan Span, out int Destination, out TypeSymbol Type, out object? Value)

Parameters

Span TextSpan
Destination int
Type TypeSymbol
Value object

Equals(IrInstruction?)

public override sealed bool Equals(IrInstruction? other)

Parameters

other IrInstruction

Returns

bool

Equals(Constant?)

public bool Equals(IrInstruction.Constant? other)

Parameters

other IrInstruction.Constant

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

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

Parameters

left IrInstruction.Constant
right IrInstruction.Constant

Returns

bool

operator !=(Constant?, Constant?)

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

Parameters

left IrInstruction.Constant
right IrInstruction.Constant

Returns

bool