fix: operations polluting stack

This commit is contained in:
TopchetoEU 2024-09-21 18:42:34 +03:00
parent ee78bdc1cb
commit 9845a39e84
Signed by: topchetoeu
GPG Key ID: 6531B8583E5F6ED4

View File

@ -110,8 +110,8 @@ public class OperationNode extends Node {
arg.compile(target, true);
}
if (pollute) target.add(Instruction.operation(operation));
else target.add(Instruction.discard());
target.add(Instruction.operation(operation));
if (!pollute) target.add(Instruction.discard());
}
public OperationNode(Location loc, Operation operation, Node ...args) {