Skip to content

Conversation

@cristianoc
Copy link
Collaborator

  • Introduce BindingContext in DeadValue to track the current binding location during dead-code traversal, so binding context is explicit and locally encapsulated.
  • Introduce ReportingContext in DeadCommon to track, per file, the end position of the last reported value when deciding whether to suppress nested warnings.
  • Replace addValueReference_state with addValueReference ~binding, so value-reference bookkeeping is driven by an explicit binding location rather than a threaded analysis state.
  • Update dead-code value and exception handling to use the new addValueReference API.
  • Refresh DEADCODE_REFACTOR_PLAN.md to mark these state-localisation steps as completed and to narrow the remaining follow-up to making the binding context fully pure.
  • Verified with make test-analysis that behaviour and expected outputs remain unchanged.

- Introduce BindingContext in DeadValue to track the current binding location during dead-code traversal, so binding context is explicit and locally encapsulated.
- Introduce ReportingContext in DeadCommon to track, per file, the end position of the last reported value when deciding whether to suppress nested warnings.
- Replace addValueReference_state with addValueReference ~binding, so value-reference bookkeeping is driven by an explicit binding location rather than a threaded analysis state.
- Update dead-code value and exception handling to use the new addValueReference API.
- Refresh DEADCODE_REFACTOR_PLAN.md to mark these state-localisation steps as completed and to narrow the remaining follow-up to making the binding context fully pure.
- Verified with make test-analysis that behaviour and expected outputs remain unchanged.
@cristianoc cristianoc force-pushed the reanalyze-dce-local-state branch from f46e7ee to 6964134 Compare December 1, 2025 17:29
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.

2 participants