Skip to content

refactor: extract partial eval dead code - #185

Merged
lbliii merged 1 commit into
mainfrom
codex/split-partial-eval-dead-code
Jul 7, 2026
Merged

refactor: extract partial eval dead code#185
lbliii merged 1 commit into
mainfrom
codex/split-partial-eval-dead-code

Conversation

@lbliii

@lbliii lbliii commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • extract const-only dead-code elimination from the partial-evaluation monolith
  • share temporary inlined-body flattening across the standalone DCE pass and the main evaluator
  • preserve the existing partial_evaluate() and eliminate_dead_code import contracts

Progresses #143.

Steward Notes

  • consulted: compiler and testing stewards
  • risk: behavior drift while moving scoping-sensitive branch elimination and temporary-node flattening
  • evidence: the full partial-evaluation suite and stability gate pass; compatibility import was verified; the implementation is a phase extraction with no semantic changes
  • unresolved tradeoffs: none in this slice; call/def inlining and loop unrolling remain in Split partial evaluation into smaller phase-owned modules #143

Verification

  • 319 passed in the focused partial-evaluation suite
  • make verify-stability (4,459 passed, 5 skipped)
  • ruff check, ruff format --check, and ty check clean
  • Python 3.14.2 free-threaded (sys._is_gil_enabled() == False) isolated before/after benchmarks: compile-pipeline medians flat-to-faster except 1% minimal-case variance; partial-eval medians stable, with one 125 ns dynamic microbenchmark shift attributable to timer quantization

Collateral

  • no docs/changelog/API collateral: this is an internal, behavior-preserving phase extraction
  • no benchmark baseline update: no reproducible regression

@lbliii
lbliii marked this pull request as ready for review July 7, 2026 16:41
Copilot AI review requested due to automatic review settings July 7, 2026 16:41
@lbliii
lbliii merged commit 0ff21e2 into main Jul 7, 2026
9 of 10 checks passed
@lbliii
lbliii deleted the codex/split-partial-eval-dead-code branch July 7, 2026 16:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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