Skip to content

Complete bytes analysis with compiler-based function identities - #10

Merged
cppbear merged 1 commit into
mainfrom
perf/bytes-analysis
Oct 7, 2026
Merged

cppbear merged 1 commit into
mainfrom
perf/bytes-analysis

Conversation

@cppbear

@cppbear cppbear commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

utgen analyze exported 663 bytes functions but only 226 context files, then failed validation. Trait-default contexts were never written; short-name matching conflated generic/reference impls; forwarding-macro methods were absent from the source AST.

  • Bind source functions to compiler identities using function and enclosing-impl source positions. Keep distinct generic trait instantiations and reference receivers separate, and exclude inactive method bodies.
  • Reuse parseable method source already exported by rustc for missing forwarding methods in an existing source impl. Write trait-default contexts through the normal path.
  • Buffer recursive dependency JSON reads. Report analysis-stage timings and identify missing contexts in errors.
  • Add a real analysis regression covering method identity, source preservation, and two independent bytes copies; document the acceptance criteria and measured baseline.

Local validation passed: release and debug workspace builds; 30 workspace tests (one live-model test ignored); the minimal generation/repair/coverage pipeline; and the method-identity fixture. Both bytes copies passed with all 663 branch records, dependency records, compiler identities, and contexts aligned, in 34.632 s and 34.747 s. The previous release baseline failed after 43.714 s with only 226 contexts; these figures are not a speedup benchmark because successful work differs.

Both the branch CI and PR CI passed, including the existing coverage/scheduling regressions and the new release analysis check. On the PR runner, the bytes copies completed in 25.401 s and 24.551 s, with all artifact, identity, and source-preservation assertions passing. No model service is required for the bytes check. The scope is the pinned bytes default configuration; recovering parseable method source does not implement general macro expansion or validate bytes model-generation quality.

@cppbear
cppbear marked this pull request as ready for review October 7, 2026 18:47
@cppbear
cppbear merged commit be6fef6 into main Oct 7, 2026
2 checks passed
@cppbear
cppbear deleted the perf/bytes-analysis branch October 11, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant