Skip to content

Commit

Permalink
[il] quick implementation of ILOpCode.Pop
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanpeppers committed Sep 17, 2024
1 parent 584128e commit 8a98ab0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/dotnes.tasks/Utilities/IL2NESWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ public void Write(ILOpCode code, ushort sizeOfMain)
if (Stack.Count > 0)
Stack.Push(Stack.Peek());
break;
case ILOpCode.Pop:
if (Stack.Count > 0)
Stack.Pop();
break;
case ILOpCode.Ldc_i4_0:
WriteLdc(0, sizeOfMain);
break;
Expand Down

0 comments on commit 8a98ab0

Please sign in to comment.