misc: chore: Fix object creation in ARMeilleure

This commit is contained in:
Evan Husted 2025-01-26 15:17:12 -06:00
parent 3cdaaa0b69
commit 15d1528774
16 changed files with 30 additions and 30 deletions

View file

@ -13,7 +13,7 @@ namespace ARMeilleure.CodeGen.Arm64
public static void RunPass(ControlFlowGraph cfg)
{
Dictionary<ulong, Operand> constants = new Dictionary<ulong, Operand>();
Dictionary<ulong, Operand> constants = new();
Operand GetConstantCopy(BasicBlock block, Operation operation, Operand source)
{

View file

@ -10,7 +10,7 @@ namespace ARMeilleure.CodeGen.Linking
/// <summary>
/// Gets an empty <see cref="RelocInfo"/>.
/// </summary>
public static RelocInfo Empty { get; } = new RelocInfo(null);
public static RelocInfo Empty { get; } = new(null);
private readonly RelocEntry[] _entries;

View file

@ -115,7 +115,7 @@ namespace ARMeilleure.CodeGen.RegisterAllocators
{
NumberLocals(cfg, regMasks.RegistersCount);
AllocationContext context = new AllocationContext(stackAlloc, regMasks, _intervals.Count);
AllocationContext context = new(stackAlloc, regMasks, _intervals.Count);
BuildIntervals(cfg, context);
@ -839,7 +839,7 @@ namespace ARMeilleure.CodeGen.RegisterAllocators
{
dest.NumberLocal(_intervals.Count);
LiveInterval interval = new LiveInterval(dest);
LiveInterval interval = new(dest);
_intervals.Add(interval);
SetVisited(dest);

View file

@ -1412,7 +1412,7 @@ namespace ARMeilleure.CodeGen.X86
_stream.Seek(0, SeekOrigin.Begin);
using RecyclableMemoryStream codeStream = MemoryStreamManager.Shared.GetStream();
Assembler assembler = new Assembler(codeStream, HasRelocs);
Assembler assembler = new(codeStream, HasRelocs);
bool hasRelocs = HasRelocs;
int relocIndex = 0;
@ -1471,7 +1471,7 @@ namespace ARMeilleure.CodeGen.X86
_stream.CopyTo(codeStream);
byte[] code = codeStream.ToArray();
RelocInfo relocInfo = new RelocInfo(relocEntries);
RelocInfo relocInfo = new(relocEntries);
return (code, relocInfo);
}

View file

@ -13,7 +13,7 @@ namespace ARMeilleure.CodeGen.X86
public static void RunPass(ControlFlowGraph cfg)
{
Dictionary<ulong, Operand> constants = new Dictionary<ulong, Operand>();
Dictionary<ulong, Operand> constants = new();
Operand GetConstantCopy(BasicBlock block, Operation operation, Operand source)
{