pushPseudoReturn method Null safety

void pushPseudoReturn(
  1. Model<ProgramOperation> m
)

Implementation

void pushPseudoReturn(Model m) {
  final program = m.memory.program;
  if (program.returnStackPos >= program._returnStack.length) {
    throw CalculatorError(5);
  }
  if (program._returnStackPos == -1) {
    program._returnStackPos = 0;
  } else {
    program._returnStack[program._returnStackPos++] = pseudoReturnAddress;
  }
}