Skip to content

Commit

Permalink
Update CilCodegen.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
LPeter1997 committed Oct 8, 2023
1 parent 4752f4e commit 56fcf62
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/Draco.Compiler/Internal/Codegen/CilCodegen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ internal sealed class CilCodegen

private readonly MetadataCodegen metadataCodegen;
private readonly IProcedure procedure;
private readonly ImmutableHashSet<Register>? stackifiedRegisters;
private readonly Dictionary<IBasicBlock, LabelHandle> labels = new();
private readonly Dictionary<IOperand, AllocatedLocal> allocatedLocals = new();

Expand All @@ -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();
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 56fcf62

Please sign in to comment.