Skip to content

Add analyzed IR output with Nanopass traversal - #19

Closed
RomarQ wants to merge 6 commits into
mainfrom
codex/simplify-analyzed-ir
Closed

RomarQ wants to merge 6 commits into
mainfrom
codex/simplify-analyzed-ir

Conversation

@RomarQ

@RomarQ RomarQ commented Aug 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Add --analyzed-ir to write the analyzed program as one S-expression.
  • Add Lanalyzed, an artifact language that extends Lloweredemit.
  • Use Nanopass to copy unchanged forms through the new language.
  • Keep custom extraction for artifact metadata and expanded VM instructions.
  • Add a focused artifact snapshot test.

Comparison

This draft targets main. It is a complete alternative to #16.

The automatic traversal reduces the extractor from 315 lines in #16 to 184 lines here. Both PRs can be reviewed independently before one goes upstream.

Behavior

The artifact shape matches #16. Identifier suffixes change because this pass first prints identifiers in artifact order. All references remain consistent.

Tests

  • nix develop /tmp/compact-simplify-analyzed-ir.EqtD3l --command ./compiler/go
  • The full Scheme and JavaScript compiler suite passes.
  • The analyzed IR artifact snapshot passes.

RomarQ added 6 commits August 18, 2026 15:38
Signed-off-by: Rodrigo Quelhas <rodrigo_quelhas@outlook.pt>
Signed-off-by: Rodrigo Quelhas <rodrigo_quelhas@outlook.pt>
Signed-off-by: Rodrigo Quelhas <rodrigo_quelhas@outlook.pt>
Signed-off-by: Rodrigo Quelhas <rodrigo_quelhas@outlook.pt>
Signed-off-by: Rodrigo Quelhas <rodrigo_quelhas@outlook.pt>
Signed-off-by: Rodrigo Quelhas <rodrigo_quelhas@outlook.pt>
@github-actions

Copy link
Copy Markdown

Plugin Test Summary

 1 files  ±0   3 suites  ±0   1s ⏱️ ±0s
21 tests ±0  21 ✅ ±0  0 💤 ±0  0 ❌ ±0 
23 runs  ±0  23 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 8172b35. ± Comparison against base commit 5a5673e.

@RomarQ RomarQ changed the title Simplify analyzed IR extraction with Nanopass Add analyzed IR output with Nanopass traversal Aug 18, 2026
@RomarQ
RomarQ changed the base branch from rp/normalized-ir to main August 18, 2026 16:02
@RomarQ RomarQ closed this Aug 18, 2026
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