writeModuleRef method
Writes a ModuleRef
row, returning the corresponding index.
If a matching entry already exists, returns the existing index.
Implementation
ModuleRefIndex writeModuleRef({required String name}) =>
_moduleRefs.putIfAbsent(name, () {
final table = _tableStream[MetadataTableId.moduleRef];
final index = ModuleRefIndex(table.length);
table.add(ModuleRef(name: _stringHeap.insert(name)));
return index;
});