Table of Contents

Class IrInstruction.SetElement

Namespace
MuLang.IR
Assembly
MuLang.IR.dll

Writes an indexed element or dynamic object property.

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

Constructors

SetElement(TextSpan, int, int, int, bool)

Writes an indexed element or dynamic object property.

public SetElement(TextSpan Span, int Target, int Index, int Value, bool IsObjectAccess)

Parameters

Span TextSpan

The source span.

Target int

The target slot.

Index int

The index or key slot.

Value int

The value slot.

IsObjectAccess bool

Whether the target is an object.

Properties

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

Target

The target slot.

public int Target { get; init; }

Property Value

int

Value

The value slot.

public int Value { get; init; }

Property Value

int

Methods

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

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

Parameters

Span TextSpan
Target int
Index int
Value int
IsObjectAccess bool

Equals(IrInstruction?)

public override sealed bool Equals(IrInstruction? other)

Parameters

other IrInstruction

Returns

bool

Equals(SetElement?)

public bool Equals(IrInstruction.SetElement? other)

Parameters

other IrInstruction.SetElement

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

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

Parameters

left IrInstruction.SetElement
right IrInstruction.SetElement

Returns

bool

operator !=(SetElement?, SetElement?)

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

Parameters

left IrInstruction.SetElement
right IrInstruction.SetElement

Returns

bool