Skip to content

refactor: track typed codegen values - #605

Draft
baszalmstra wants to merge 1 commit into
bas/explicit-abi-irfrom
bas/typed-codegen-values
Draft

refactor: track typed codegen values#605
baszalmstra wants to merge 1 commit into
bas/explicit-abi-irfrom
bas/typed-codegen-values

Conversation

@baszalmstra

Copy link
Copy Markdown
Collaborator

Why

BasicValueEnum and PointerValue lose the Mun type that determines how a value may be loaded, stored, or projected. Keeping that information beside the LLVM handle makes invalid combinations visible before the opaque-pointer migration removes pointee types from LLVM pointers.

What

  • add Operand, Place, and PlaceValue newtypes with narrow responsibilities
  • retain Mun and LLVM pointee types across local allocation, load, store, and assignment
  • assert type agreement in debug builds without changing generated IR

Testing

  • pixi run check with RUSTFLAGS=-Dwarnings
  • pixi run cargo test -p mun_codegen --lib

@codecov

codecov Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.95833% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 87.32%. Comparing base (3d0a396) to head (bd9624a).

Files with missing lines Patch % Lines
crates/mun_codegen/src/ir/body.rs 97.72% 1 Missing ⚠️
Additional details and impacted files
@@                   Coverage Diff                   @@
##           bas/explicit-abi-ir     #605      +/-   ##
=======================================================
+ Coverage                86.42%   87.32%   +0.90%     
=======================================================
  Files                      253      254       +1     
  Lines                    26837    26933      +96     
=======================================================
+ Hits                     23193    23520     +327     
+ Misses                    3644     3413     -231     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@baszalmstra
baszalmstra marked this pull request as draft September 6, 2026 13:27
@baszalmstra
baszalmstra force-pushed the bas/typed-codegen-values branch 2 times, most recently from 8b35a30 to 333cff2 Compare September 6, 2026 14:27
@baszalmstra
baszalmstra force-pushed the bas/typed-codegen-values branch from 333cff2 to bd9624a Compare September 6, 2026 15: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.

1 participant