Lines 322–328 at 129 (were 322–328 at 128)
322322 this.#holdersPages = storedLists<AtomId>(storage, "holders", (key) => key); 323323 this.#dependentsPages = storedLists<AtomId>(storage, "dependents"); 324324 this.#resolversPages = storedLists<AtomId>(storage, "resolvers"); 325− this.#together = storedMap(storage, "together");
325+ this.#togetherPages = storedLists<TogetherLink>(storage, "together"); 326326 this.#fileAtomPages = storedLists<AtomId>(storage, "file-atoms"); 327327 this.#runStarts = storedMap(storage, "run-starts"); 328328 this.#relocationPages = storedLists<RelocationInfo>(storage, "relocations"); Lines 436–442 at 129 (were 436–441 at 128)
436436 #resolvers: StateMap<AtomId, AtomId | AtomId[]> = new Map(); 437437 #resolversPages: ReturnType<typeof storedLists<AtomId>> | undefined; 438438 #together: StateMap<AtomId, TogetherLink[]> = new Map(); 439+ #togetherPages: ReturnType<typeof storedLists<TogetherLink>> | undefined; 439440 #fileAtoms: StateMap<string, AtomId[]> = new Map(); 440441 #fileAtomPages: ReturnType<typeof storedLists<AtomId>> | undefined; 441442 /** First lines of runs (their n), by the node they were written after: a line's n, or -1 - a path's index. */ Lines 834–845 at 129 (were 833–840 at 128)
834835 /** `together` reasons touching this atom, in either direction. */ 835836 togetherLinks(id: AtomId): readonly TogetherLink[] { 836− return this.#together.get(id) ?? EMPTY;
837+ return [...this.eachTogetherLink(id)]; 839+ *eachTogetherLink(id: AtomId): IterableIterator<TogetherLink> { 840+ if (this.#togetherPages) yield* this.#togetherPages.values(id); 841+ else yield* this.#together.get(id) ?? EMPTY; 840845 * The atom plus everything it depends on, transitively. Computed on demand Lines 1073–1088 at 129 (were 1068–1075 at 128)
10691074 for (const r of frozen.reasons) { 10701075 if (r.kind !== "together" || r.to === frozen.id) continue; 1071− pushIndex(this.#together, frozen.id, { other: r.to, text: r.text, from: frozen.id });
1072− pushIndex(this.#together, r.to, { other: frozen.id, text: r.text, from: frozen.id });
1077+ const forward = { other: r.to, text: r.text, from: frozen.id }; 1078+ const reverse = { other: frozen.id, text: r.text, from: frozen.id }; 1079+ if (this.#togetherPages) { 1080+ this.#togetherPages.append(frozen.id, forward); 1081+ this.#togetherPages.append(r.to, reverse); 1083+ pushIndex(this.#together, frozen.id, forward); 1084+ pushIndex(this.#together, r.to, reverse);