.net 9 analysis

This commit is contained in:
Adrian Conlon 2024-10-12 12:26:21 +01:00
parent 691b800d1a
commit 4839f3fc04
6 changed files with 6 additions and 8 deletions

View File

@ -1,6 +1,5 @@
namespace M6502.Symbols
{
using System.Collections;
using System.Diagnostics;
public class IdentifiableSection : Section

View File

@ -23,6 +23,7 @@
protected static ReflectedSectionProperties GetSectionProperties(System.Type type)
{
ArgumentNullException.ThrowIfNull(type);
var obtained = SectionPropertiesCache.TryGetValue(type, out var properties);
Debug.Assert(obtained, $"Section properties for {type.Name} have not been built");
Debug.Assert(properties is not null);

View File

@ -1,7 +1,5 @@
namespace M6502.Symbols
{
using System.Collections.Generic;
// sym id = 16, name = "solve", addrsize = absolute, size = 274, scope = 0, def = 94,ref=144+17+351,val=0xF314,seg=6,type=lab
[Section("symbol", "Symbols")]
public sealed class Symbol(Parser container) : NamedSection(container)

View File

@ -11,7 +11,7 @@ namespace M6502.Test
using System.Text;
using System.Threading.Tasks;
internal class Board : Bus
internal sealed class Board : Bus
{
private readonly Configuration configuration;
private readonly Ram ram = new(0x10000);

View File

@ -33,15 +33,15 @@ namespace Z80.FuseTest
private readonly TestEvents actualEvents = new();
private readonly EightBit.Ram ram = new(0x10000);
private readonly EightBit.InputOutput ports = new();
private readonly Z80.Z80 cpu;
private readonly Z80 cpu;
private readonly Disassembler disassembler;
private int totalCycles;
public TestRunner(Test<RegisterState> test, Result<RegisterState> result)
{
this.cpu = new EightBit.Z80(this, this.ports);
this.disassembler = new EightBit.Disassembler(this);
this.cpu = new Z80(this, this.ports);
this.disassembler = new Disassembler(this);
this.test = test ?? throw new ArgumentNullException(nameof(test));
this.result = result ?? throw new ArgumentNullException(nameof(result));

View File

@ -110,6 +110,6 @@ namespace Z80.Test
private void CPU_LoweredHALT(object? sender, System.EventArgs e) => this.LowerPOWER();
private void CPU_ExecutingInstruction_Debug(object? sender, System.EventArgs e) => System.Console.Error.WriteLine($"{Z80.Disassembler.State(this.CPU)}\t{this.disassembler.Disassemble(this.CPU)}");
private void CPU_ExecutingInstruction_Debug(object? sender, System.EventArgs e) => System.Console.Error.WriteLine($"{Disassembler.State(this.CPU)}\t{this.disassembler.Disassemble(this.CPU)}");
}
}