aboutsummaryrefslogtreecommitdiff
path: root/Spv.Generator
diff options
context:
space:
mode:
Diffstat (limited to 'Spv.Generator')
-rw-r--r--Spv.Generator/Instruction.cs12
-rw-r--r--Spv.Generator/InstructionOperands.cs2
2 files changed, 7 insertions, 7 deletions
diff --git a/Spv.Generator/Instruction.cs b/Spv.Generator/Instruction.cs
index 92299404..27190f05 100644
--- a/Spv.Generator/Instruction.cs
+++ b/Spv.Generator/Instruction.cs
@@ -46,7 +46,7 @@ namespace Spv.Generator
result += _resultType.WordCount;
}
- Span<Operand> operands = _operands.ToSpan();
+ Span<Operand> operands = _operands.AsSpan();
for (int i = 0; i < operands.Length; i++)
{
result += operands[i].WordCount;
@@ -120,7 +120,7 @@ namespace Spv.Generator
writer.Write(Id);
}
- Span<Operand> operands = _operands.ToSpan();
+ Span<Operand> operands = _operands.AsSpan();
for (int i = 0; i < operands.Length; i++)
{
operands[i].WriteOperand(writer);
@@ -185,8 +185,8 @@ namespace Spv.Generator
public bool EqualsContent(Instruction cmpObj)
{
- Span<Operand> thisOperands = _operands.ToSpan();
- Span<Operand> cmpOperands = cmpObj._operands.ToSpan();
+ Span<Operand> thisOperands = _operands.AsSpan();
+ Span<Operand> cmpOperands = cmpObj._operands.AsSpan();
if (thisOperands.Length != cmpOperands.Length)
{
@@ -211,7 +211,7 @@ namespace Spv.Generator
public int GetHashCodeContent()
{
- return DeterministicHashCode.Combine<Operand>(_operands.ToSpan());
+ return DeterministicHashCode.Combine<Operand>(_operands.AsSpan());
}
public int GetHashCodeResultType()
@@ -221,7 +221,7 @@ namespace Spv.Generator
public override int GetHashCode()
{
- return DeterministicHashCode.Combine(Opcode, Id, _resultType, DeterministicHashCode.Combine<Operand>(_operands.ToSpan()));
+ return DeterministicHashCode.Combine(Opcode, Id, _resultType, DeterministicHashCode.Combine<Operand>(_operands.AsSpan()));
}
public bool Equals(Operand obj)
diff --git a/Spv.Generator/InstructionOperands.cs b/Spv.Generator/InstructionOperands.cs
index c7170ec1..a349827a 100644
--- a/Spv.Generator/InstructionOperands.cs
+++ b/Spv.Generator/InstructionOperands.cs
@@ -15,7 +15,7 @@ namespace Spv.Generator
public Operand Operand5;
public Operand[] Overflow;
- public Span<Operand> ToSpan()
+ public Span<Operand> AsSpan()
{
if (Count > InternalCount)
{