Repository navigation
Conversation
Co-authored-by: Copilot <[email protected]> Copilot-Session: 2b06b427-750d-4b6d-8a11-3f23fd8be98f
Co-authored-by: Copilot <[email protected]> Copilot-Session: 2b06b427-750d-4b6d-8a11-3f23fd8be98f
Co-authored-by: Copilot <[email protected]> Copilot-Session: 2b06b427-750d-4b6d-8a11-3f23fd8be98f
Co-authored-by: Copilot <[email protected]> Copilot-Session: 2b06b427-750d-4b6d-8a11-3f23fd8be98f
Stop each corpus project after its first mismatch on valid Swift. Record swift-syntax validity in reference JSON, skip invalid corpus files, and preserve exhaustive fixture and reference-generation runs.\n\nRemove recursive submodule initialization from corpus checkouts. Co-authored-by: Copilot <[email protected]> Copilot-Session: 7a84baa3-dfce-406e-ac22-03e2ce08f78e
Add recursive-descent parsing with bottom-up syntax sinks, operator folding, recovery, and oracle-backed fixtures. Co-authored-by: Copilot <[email protected]> Copilot-Session: f0ffa64f-7391-43d6-9745-52745351435a
Handle key paths, regex and multiline literals, conditional attributes, closures, macros, and modern type syntax with corpus-driven fixtures. Co-authored-by: Copilot <[email protected]> Copilot-Session: f0ffa64f-7391-43d6-9745-52745351435a
Parse ownership and pack syntax, structured attributes, macros, module selectors, inline arrays, and context-sensitive declarations and closures. Co-authored-by: Copilot <[email protected]> Copilot-Session: f0ffa64f-7391-43d6-9745-52745351435a
Match the Swift compiler corpus with corrected operator folding, contextual syntax, literals, attributes, and type parsing. Add focused oracle fixtures and optional diagnostic selectors while preserving exhaustive corpus defaults. Co-authored-by: Copilot <[email protected]> Copilot-Session: f0ffa64f-7391-43d6-9745-52745351435a
Compare raw syntax trees and trivia without constructing desugared AST snapshots or loading desugaring rules. Co-authored-by: Copilot <[email protected]> Copilot-Session: f0ffa64f-7391-43d6-9745-52745351435a
Add a reusable in-memory parser benchmark and safe hyperfine helpers for direct extraction without database creation. Co-authored-by: Copilot <[email protected]> Copilot-Session: f0ffa64f-7391-43d6-9745-52745351435a
Reuse child buffers across productions and bypass expression stacks when there is no operator. Fast-path ASCII lexing and inline cursor predicates without changing emitted syntax or the public sink contract. Cache the immutable standard operator table and clone it only when a source may declare custom infix operators or precedence groups. Validate against all 59 corpus projects: 65,658 passed, no failures, and 8,376 invalid-source skips. Existing extractor integration tests pass. Co-authored-by: Copilot <[email protected]> Copilot-Session: f0ffa64f-7391-43d6-9745-52745351435a
Select the Rust backend by default in Cargo and Bazel, retaining explicit swift-syntax opt-in and Rust precedence when both Cargo features are enabled. Forward Cargo options through the pack builder for fallback builds. Keep mapped AST corpus checks enabled for both backends. Check and regenerate swift-syntax-specific raw snapshots only with swift-syntax, and document backend selection. Co-authored-by: Copilot <[email protected]> Copilot-Session: f0ffa64f-7391-43d6-9745-52745351435a
Document native Rust defaults and explicit SwiftSyntax fallback flags for Cargo and Bazel. Co-authored-by: Copilot <[email protected]> Copilot-Session: f0ffa64f-7391-43d6-9745-52745351435a
Match SwiftSyntax's variable binding disambiguation: braces on the next line after an initializer start a separate closure unless they introduce observing accessors. Keep same-line accessors and uninitialized computed properties unchanged. Add an oracle-generated parser fixture covering nested shadowing, initialized bindings, same-line accessor recovery, and multiline observing and computed accessors. Reproduce the local-name-binding CodeQL regression with the old native pack, then verify the rebuilt native pack passes the focused test, all 85 parser fixtures, all 59 extractor tests, and all 106 locally available CI-equivalent QL checks. Co-authored-by: Copilot <[email protected]> Copilot-Session: f0ffa64f-7391-43d6-9745-52745351435a
SwiftSyntax → native Rust: 15-project production benchmarkThe fixed CI candidate
Summed project medians: extraction 452.10 → 77.52 s (5.83×), full database creation 560.35 → 192.55 s (2.91×). These weighted totals are distinct from the equal-project geometric means. Largest project-median extractor RSS fell from 3,646 to 1,990 MiB; every project used less extractor RSS. Method: Apple M3 Max, two workers; two repetitions per backend/project, alternating backend order and reversing it for repetition two; two discarded warmups; warm source caches but a fresh database for every run. Production extractor timings include parsing, AST mapping/desugaring, TRAP compression and source archival; full creation additionally includes CodeQL/JVM orchestration, import and finalization. This compares parser backends, not just the later parser-internal optimizations. All 60 measured databases finalized and passed dataset/coverage checks, with zero diagnostics. All 18,026 selected Swift inputs were covered; 72,104 archived-input hash checks passed. These checks establish database health and input coverage, not independent AST equality. All pre-fix measurements were excluded and the full paired trial restarted. Limitations: shared workstation, only two observations per condition, substantial background-noise variance. Small projects were essentially unchanged end-to-end; JBird and DVIA were slightly slower on the native median. This is a directional result, not a precise universal speedup. The uncached, tuple-counting, QL-submodule-override DCA was started after CI passed: github/codeql-dca-main#40671. DCA results remain pending. |
Summary
Validation
Performance
DCA