public void PopMemory(Kernel k, bool clearPush = true) { if(clearPush && pushed <= 0) throw new InvalidOperationException("Unbalanced memory pop; compiler bug?"); if (clearPush) pushed--; if (this.MemorySpace == 0) return; k.EmitPush(this.MemorySpace.ToString() + "u"); k.Emit(Opcode.PMMX); k.Emit(Opcode.ASUB); k.Emit(Opcode.SMMX).SetDebug(k.FileStack.Peek(), -1, -1, DebugType.PopMem, this.Name); }
public void PushMemory(Kernel k) { pushed++; if (this.MemorySpace == 0) return; k.Emit(Opcode.PMMX); k.EmitPush(this.MemorySpace.ToString() + "u"); k.Emit(Opcode.AADD); k.Emit(Opcode.SMMX).SetDebug(k.FileStack.Peek(), -1, -1, DebugType.PushMem, this.Name); }