Skip to content

Commit

Permalink
AnnotatedBytecodeReference equality
Browse files Browse the repository at this point in the history
  • Loading branch information
ike709 committed Oct 19, 2024
1 parent 97929f3 commit 260c10e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions DMCompiler/Optimizer/AnnotatedBytecode.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Diagnostics.Contracts;
using DMCompiler.Bytecode;
using DMCompiler.DM;

Expand Down Expand Up @@ -612,4 +613,9 @@ public void SetLocation(Location loc) {
public Location GetLocation() {
return Location;
}

[Pure]
public bool Equals(AnnotatedBytecodeReference other) {
return RefType == other.RefType && Index == other.Index;
}
}

0 comments on commit 260c10e

Please sign in to comment.