From 56fcf6273c92ad6b5bad271f85c9f237284ee308 Mon Sep 17 00:00:00 2001 From: LPeter1997 Date: Sun, 8 Oct 2023 13:11:25 +0200 Subject: [PATCH] Update CilCodegen.cs --- src/Draco.Compiler/Internal/Codegen/CilCodegen.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/Draco.Compiler/Internal/Codegen/CilCodegen.cs b/src/Draco.Compiler/Internal/Codegen/CilCodegen.cs index f9499c782..4c9d46f6f 100644 --- a/src/Draco.Compiler/Internal/Codegen/CilCodegen.cs +++ b/src/Draco.Compiler/Internal/Codegen/CilCodegen.cs @@ -35,7 +35,6 @@ internal sealed class CilCodegen private readonly MetadataCodegen metadataCodegen; private readonly IProcedure procedure; - private readonly ImmutableHashSet? stackifiedRegisters; private readonly Dictionary labels = new(); private readonly Dictionary allocatedLocals = new(); @@ -59,7 +58,6 @@ public CilCodegen(MetadataCodegen metadataCodegen, IProcedure procedure) { this.metadataCodegen = metadataCodegen; this.procedure = procedure; - this.stackifiedRegisters = Stackifier.Stackify(procedure); var codeBuilder = new BlobBuilder(); var controlFlowBuilder = new ControlFlowBuilder(); @@ -446,8 +444,6 @@ private void LoadLocal(Local local) private void LoadLocal(Register register) { - // Register got stackified - if (this.stackifiedRegisters?.Contains(register) ?? false) return; var index = this.GetRegisterIndex(register); if (index is null) return; this.InstructionEncoder.LoadLocal(index.Value); @@ -462,8 +458,6 @@ private void StoreLocal(Local local) private void StoreLocal(Register register) { - // Register got stackified - if (this.stackifiedRegisters?.Contains(register) ?? false) return; var index = this.GetRegisterIndex(register); if (index is null) return; this.InstructionEncoder.StoreLocal(index.Value);