lookup method

({MissStatusEntryImage<LineAddressType, TransactionTagType, MetadataType> entry, int index})? lookup(
  1. LineAddressType lineAddress
)

Finds a line miss and returns its physical index and logical state.

Implementation

({
  int index,
  MissStatusEntryImage<LineAddressType, TransactionTagType,
      MetadataType> entry
})? lookup(LineAddressType lineAddress) {
  for (var index = 0; index < capacity; index++) {
    final entry = _entries[index];
    if (entry?.lineAddress == lineAddress) {
      return (index: index, entry: entry!);
    }
  }
  return null;
}