Table of Contents

Class IrInstruction.GetElement

Namespace
MuLang.IR
Assembly
MuLang.IR.dll

Reads an indexed element or dynamic object property.

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

Constructors

GetElement(TextSpan, int, int, int, bool, bool)

Reads an indexed element or dynamic object property.

public GetElement(TextSpan Span, int Destination, int Target, int Index, bool IsObjectAccess, bool IsOptional)

Parameters

Span TextSpan

The source span.

Destination int

The destination slot.

Target int

The target slot.

Index int

The index or key slot.

IsObjectAccess bool

Whether the target is an object.

IsOptional bool

Whether null propagates through the access.

Properties

Destination

The destination slot.

public int Destination { get; init; }

Property Value

int

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

Index

The index or key slot.

public int Index { get; init; }

Property Value

int

IsObjectAccess

Whether the target is an object.

public bool IsObjectAccess { get; init; }

Property Value

bool

IsOptional

Whether null propagates through the access.

public bool IsOptional { get; init; }

Property Value

bool

Target

The target slot.

public int Target { get; init; }

Property Value

int

Methods

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

public void Deconstruct(out TextSpan Span, out int Destination, out int Target, out int Index, out bool IsObjectAccess, out bool IsOptional)

Parameters

Span TextSpan
Destination int
Target int
Index int
IsObjectAccess bool
IsOptional bool

Equals(IrInstruction?)

public override sealed bool Equals(IrInstruction? other)

Parameters

other IrInstruction

Returns

bool

Equals(GetElement?)

public bool Equals(IrInstruction.GetElement? other)

Parameters

other IrInstruction.GetElement

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

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

Parameters

left IrInstruction.GetElement
right IrInstruction.GetElement

Returns

bool

operator !=(GetElement?, GetElement?)

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

Parameters

left IrInstruction.GetElement
right IrInstruction.GetElement

Returns

bool