setTemp method

void setTemp(
  1. int tempNum,
  2. Value? value
)

Implementation

void setTemp(int tempNum, Value? value) {
  // OFI: let each context record how many temps it will need, so we
  // can pre-allocate this list with that many and avoid having to
  // grow it later.  Also OFI: do lifetime analysis on these temps
  // and reuse ones we don't need anymore.
  temps ??= [];
  while (temps!.length <= tempNum) {
    temps!.add(null);
  }
  temps![tempNum] = value;
}