SynthBuilder constructor Null safety
- Module top,
- Synthesizer synthesizer
Constructs a SynthBuilder based on the top module and using synthesizer for generating outputs.
Implementation
SynthBuilder(this.top, this.synthesizer) {
final modulesToParse = <Module>[top];
for (var i = 0; i < modulesToParse.length; i++) {
final moduleI = modulesToParse[i];
if (!synthesizer.generatesDefinition(moduleI)) {
continue;
}
modulesToParse.addAll(moduleI.subModules);
}
// go backwards to start from the bottom (...now we're here)
// critical to go in this order for caching to work properly
for (final module in modulesToParse.reversed) {
if (synthesizer.generatesDefinition(module)) {
_getInstanceType(module);
}
}
}