Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

Commit f7199b3

Browse files
author
Hendrik van Antwerpen
committed
Add note about unnecessary half-open symbol stacks in the path database
1 parent 731d793 commit f7199b3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

stack-graphs/src/stitching.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ impl Database {
121121

122122
// If the partial path starts at the root node, index it by its symbol stack precondition.
123123
if graph[start_node].is_root() {
124+
// The join node is root, so there's no need to use half-open symbol stacks here, as we
125+
// do for [`PartialPath::concatenate`][].
124126
let key = SymbolStackKey::from_partial_symbol_stack(
125127
partials,
126128
self,
@@ -587,6 +589,8 @@ impl PathStitcher {
587589
copious_debugging!("--> Candidate path {}", path.display(graph, paths));
588590
self.candidate_paths.clear();
589591
if graph[path.end_node].is_root() {
592+
// The join node is root, so there's no need to use half-open symbol stacks here, as we
593+
// do for [`PartialPath::concatenate`][].
590594
let key = SymbolStackKey::from_symbol_stack(paths, db, path.symbol_stack);
591595
db.find_candidate_partial_paths_from_root(
592596
graph,
@@ -923,6 +927,8 @@ impl ForwardPartialPathStitcher {
923927
) -> usize {
924928
self.candidate_partial_paths.clear();
925929
if graph[partial_path.end_node].is_root() {
930+
// The join node is root, so there's no need to use half-open symbol stacks here, as we
931+
// do for [`PartialPath::concatenate`][].
926932
let key = SymbolStackKey::from_partial_symbol_stack(
927933
partials,
928934
db,

0 commit comments

Comments
 (0)