processSsa method

  1. @override
Map<Logic, Logic> processSsa(
  1. Map<Logic, Logic> currentMappings, {
  2. required int context,
})
override

Given existing currentMappings, connects drivers and receivers accordingly to SsaLogics and returns an updated set of mappings.

This function may add new Conditionals to existing Conditionals.

This is used for Combinational.ssa.

Implementation

@override
Map<Logic, Logic> processSsa(Map<Logic, Logic> currentMappings,
    {required int context}) {
  Conditional.connectSsaDriverFromMappings(driver, currentMappings,
      context: context);

  final newMappings = <Logic, Logic>{...currentMappings};
  // if the receiver is an ssa node, then update the mapping
  if (receiver is SsaLogic) {
    newMappings[(receiver as SsaLogic).ref] = receiver;
  }

  return newMappings;
}