Class IrInstruction.Constant
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
SpanTextSpanThe source span.
DestinationintThe destination slot.
TypeTypeSymbolThe constant type.
ValueobjectThe constant value.
Properties
Destination
The destination slot.
public int Destination { get; init; }
Property Value
EqualityContract
protected override Type EqualityContract { get; }
Property Value
Type
The constant type.
public TypeSymbol Type { get; init; }
Property Value
Value
The constant value.
public object? Value { get; init; }
Property Value
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
SpanTextSpanDestinationintTypeTypeSymbolValueobject
Equals(IrInstruction?)
public override sealed bool Equals(IrInstruction? other)
Parameters
otherIrInstruction
Returns
Equals(Constant?)
public bool Equals(IrInstruction.Constant? other)
Parameters
otherIrInstruction.Constant
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected override bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(Constant?, Constant?)
public static bool operator ==(IrInstruction.Constant? left, IrInstruction.Constant? right)
Parameters
leftIrInstruction.ConstantrightIrInstruction.Constant
Returns
operator !=(Constant?, Constant?)
public static bool operator !=(IrInstruction.Constant? left, IrInstruction.Constant? right)
Parameters
leftIrInstruction.ConstantrightIrInstruction.Constant