private void fillInContextGaps(Register ctxReg, RegisterValue gapValue,
			AddressSetView programMemory) {

		AddressSet area = new AddressSet(programMemory);

		RegisterValueStore store = registerValueMap.get(ctxReg);
		if (store != null) {
			AddressRangeIterator addressRangeIterator = store.getAddressRangeIterator();
			while (addressRangeIterator.hasNext()) {
				area.delete(addressRangeIterator.next());
			}
		}
		AddressRangeIterator addressRanges = area.getAddressRanges();
		while (addressRanges.hasNext()) {
			AddressRange range = addressRanges.next();
			try {
				setRegisterValue(range.getMinAddress(), range.getMaxAddress(), gapValue);
			}
			catch (ContextChangeException e) {
				throw new AssertException("Unexpected context error during language upgrade", e);
			}
		}

	}
Perform context upgrade due to a language change
@param translator language translator required by major upgrades (may be null)
@param newCompilerSpec new compiler specification
@param programMemory program memory
@param monitor task monitor
@throws CancelledException thrown if monitor cancelled
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/register/ProgramRegisterContextDB.java