Expand description
Salsa-based incremental computation layer.
Phase A scaffold: defines the RootDatabase, a SourceFile input, and a
trivial parsed_doc query that wraps diagnostics::parse_document. Not yet
wired into Backend — this exists so downstream phases can grow queries on
top of it incrementally.
Re-exports§
pub use analysis::AnalysisHost;pub use analysis::RootDatabase;pub use input::FileId;pub use input::SourceFile;pub use input::Workspace;
Modules§
- analysis
- Database + Analysis/AnalysisHost split (rust-analyzer pattern).
- codebase
codebasesalsa query — aggregates every file’sStubSliceinto a finalizedmir_codebase::Codebaseviacodebase_from_parts.- definitions
file_definitionssalsa query — runsDefinitionCollector::collect_sliceunder salsa memoization, producing a pureStubSlicevalue per file.- index
file_indexsalsa query — derives a compactFileIndexfrom a parsed document. Depends onparsed_doc, so editing a file reparses once and the index re-extracts from the new AST.- input
- Salsa inputs.
- method_
returns method_returnssalsa query — derives the per-file map ofclass_name -> method_name -> return_class_name. Depends onparsed_doc.- parse
- The
parsed_docsalsa query: parses aSourceFileinto anArc<ParsedDoc>under salsa memoization. Downstream queries (file_index, method_returns, semantic diagnostics) depend on this one, so each file is parsed at most once per revision. - refs
file_refs/symbol_refssalsa queries — Phase D.- semantic
semantic_issuessalsa query — runsmir_analyzerPass-2 body analysis on a single file against the finalized workspace codebase. Depends oncodebase(ws)andparsed_doc(file), so invalidation happens automatically when the file’s text or any file that contributes to the shared codebase changes.- workspace_
index workspace_indexsalsa query — aggregates every file’sFileIndexinto a single structure with pre-built reverse maps.