misc: chore: Use explicit types in ARMeilleure project

This commit is contained in:
Evan Husted 2025-01-25 14:01:13 -06:00
parent be3bd0bcb5
commit e0567c5ce9
37 changed files with 109 additions and 106 deletions

View file

@ -222,7 +222,7 @@ namespace ARMeilleure.Translation
internal TranslatedFunction Translate(ulong address, ExecutionMode mode, bool highCq, bool singleStep = false)
{
var context = new ArmEmitterContext(
ArmEmitterContext context = new ArmEmitterContext(
Memory,
CountTable,
FunctionTable,
@ -259,10 +259,10 @@ namespace ARMeilleure.Translation
Logger.EndPass(PassName.RegisterUsage);
var retType = OperandType.I64;
var argTypes = new OperandType[] { OperandType.I64 };
OperandType retType = OperandType.I64;
OperandType[] argTypes = new OperandType[] { OperandType.I64 };
var options = highCq ? CompilerOptions.HighCq : CompilerOptions.None;
CompilerOptions options = highCq ? CompilerOptions.HighCq : CompilerOptions.None;
if (context.HasPtc && !singleStep)
{
@ -521,7 +521,7 @@ namespace ARMeilleure.Translation
List<TranslatedFunction> functions = Functions.AsList();
foreach (var func in functions)
foreach (TranslatedFunction func in functions)
{
JitCache.Unmap(func.FuncPointer);
@ -530,7 +530,7 @@ namespace ARMeilleure.Translation
Functions.Clear();
while (_oldFuncs.TryDequeue(out var kv))
while (_oldFuncs.TryDequeue(out KeyValuePair<ulong, TranslatedFunction> kv))
{
JitCache.Unmap(kv.Value.FuncPointer);
@ -551,7 +551,7 @@ namespace ARMeilleure.Translation
{
while (Queue.Count > 0 && Queue.TryDequeue(out RejitRequest request))
{
if (Functions.TryGetValue(request.Address, out var func) && func.CallCounter != null)
if (Functions.TryGetValue(request.Address, out TranslatedFunction func) && func.CallCounter != null)
{
Volatile.Write(ref func.CallCounter.Value, 0);
}