( roots: readonly BaseNode[], occurrencesById: Record<NodeId, number>, opts: UnitOptions )
| 947 | } |
| 948 | |
| 949 | const nameReferences = ( |
| 950 | roots: readonly BaseNode[], |
| 951 | occurrencesById: Record<NodeId, number>, |
| 952 | opts: UnitOptions |
| 953 | ): ContentNamingState => { |
| 954 | const s: ContentNamingState = { |
| 955 | byId: {}, |
| 956 | reached: [], |
| 957 | stack: [], |
| 958 | components: [], |
| 959 | opts, |
| 960 | valueIndices: new Map(), |
| 961 | names: {}, |
| 962 | inputsByHash: {}, |
| 963 | occurrencesById, |
| 964 | identityNamed: new Set(), |
| 965 | written: writtenOf(opts) |
| 966 | } |
| 967 | for (const root of roots) if (!s.byId[root.id]) nameReference(s, root) |
| 968 | return s |
| 969 | } |
| 970 | |
| 971 | // content-equal nodes a cycle keys by id are numbered apart |
| 972 | const occurrencesOfResolutions = ( |
no test coverage detected