From db8e3ece58028957b59fa44bce517e18c369215e Mon Sep 17 00:00:00 2001 From: Jerome Haltom Date: Sun, 15 Dec 2024 09:24:55 -0600 Subject: [PATCH] Use record for MethodKey. --- src/IKVM.Runtime/compiler.cs | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/src/IKVM.Runtime/compiler.cs b/src/IKVM.Runtime/compiler.cs index c815f8ef3..0b5954a2a 100644 --- a/src/IKVM.Runtime/compiler.cs +++ b/src/IKVM.Runtime/compiler.cs @@ -26,7 +26,6 @@ Jeroen Frijters using System.Diagnostics; using System.Diagnostics.SymbolStore; -using IKVM.CoreLib.Diagnostics; using IKVM.Attributes; using IKVM.ByteCode; @@ -45,36 +44,11 @@ Jeroen Frijters using LocalVariableTableEntry = IKVM.Runtime.ClassFile.Method.LocalVariableTableEntry; using Instruction = IKVM.Runtime.ClassFile.Method.Instruction; using InstructionFlags = IKVM.Runtime.ClassFile.Method.InstructionFlags; -using System.Runtime.CompilerServices; namespace IKVM.Runtime { - struct MethodKey : IEquatable - { - - readonly string className; - readonly string methodName; - readonly string methodSig; - - internal MethodKey(string className, string methodName, string methodSig) - { - this.className = className; - this.methodName = methodName; - this.methodSig = methodSig; - } - - public bool Equals(MethodKey other) - { - return className == other.className && methodName == other.methodName && methodSig == other.methodSig; - } - - public override int GetHashCode() - { - return className.GetHashCode() ^ methodName.GetHashCode() ^ methodSig.GetHashCode(); - } - - } + record struct MethodKey(string ClassName, string MethodName, string MethodSig); /// /// Manages instances of .