in core/src/main/kotlin/motif/core/State.kt [50:60]
fun addSink(sink: Sink) {
if (sinkToSources.containsKey(sink)) {
throw IllegalStateException("Sink already added.")
}
sinkToSources[sink] = LinkedHashSet()
visibleSinks[sink] = LinkedHashSet()
sinks.computeIfAbsent(sink.type) { LinkedHashSet() }.add(sink)
irTypeToSinks.computeIfAbsent(sink.type.type) { LinkedHashSet() }.add(sink)
unsatisfied.add(sink)
}