feat: Implement efficient node lookup table using node indices (#463)

Major Changes:
- Add generic Lookup<T> structure for efficient O(1) module-level data access
- Combine separate scope and order lookups into unified QuerySchedule structure
- Add query_schedule field to Interpreter for dedicated user query scheduling
- Refactor loop hoising to separate module
- Use efficient lookup for loop vars
- Also added more tests for loops

Key Concept:
- Ensure module context and indexing stay synchronized during function calls

Testing:
- All scheduler and interpreter tests passing

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
Anand Krishnamoorthi
2025-08-26 15:01:45 -05:00
committed by GitHub
parent c43c94559a
commit 85753aaf37
8 changed files with 599 additions and 322 deletions

View File

@@ -1972,4 +1972,14 @@ impl<'source> Parser<'source> {
}
Ok(query)
}
pub fn num_expressions(&self) -> u32 {
self.eidx
}
pub fn num_statements(&self) -> u32 {
self.sidx
}
pub fn num_queries(&self) -> u32 {
self.qidx
}
}