(undo: number)
| 1935 | |
| 1936 | // Undoes the binding changes made since `undo` was the length of the log |
| 1937 | private restore(undo: number): void { |
| 1938 | while (this.undoPrefixes.length > undo) { |
| 1939 | const prefix = this.undoPrefixes.pop()! |
| 1940 | // The binding in scope is the one this element made, which ends with it |
| 1941 | const size = prefix.length + (this.bindings.get(prefix)?.uri.length ?? 0) |
| 1942 | this.openDeclarationSize -= size |
| 1943 | this.releasedDeclarationSize += size |
| 1944 | this.bindings.set(prefix, this.undoBindings.pop()) |
| 1945 | } |
| 1946 | if (this.releasedDeclarationSize > this.openDeclarationSize + compactDeclarationSize) this.compact() |
| 1947 | } |
| 1948 | |
| 1949 | // Rebuilds the maps from the bindings in use. Their entries come from |
| 1950 | // declarations that are open or were released since the last rebuild, and |
no test coverage detected