Should `check-asm` unit tests check intermediate assembly instead of final assembly?
- Dominant language
- Rust
- Stars
- 61.4k
- Forks
- 5.4k
- Avg merge
- 3h 33m
- Merged PRs (30d)
- 4
Description
Checking intermediate assembly before register allocation and before labels are realized is easier and more robust. For example, I'm trying to write `asm` unit tests for https://github.com/FuelLabs/sway/pull/3523, but I can't really test jump offsets. If I was testing the intermediate assembly instead, I would have access to the jump labels and I would be able to write more robust tests (using regex for those labels etc.). Besides, what we really want to test here, I think, is that the assembly builder is correct. The rest of the flow can really only be tested in E2E tests for the most part.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the `check-asm` unit tests and the assembly builder involved in the issue. Compare checking intermediate assembly before register allocation and label realization with the current final-assembly checks, using the needs described for PR 3523. Done means the unit tests can inspect labels and jump-related output robustly, while the remaining flow is covered by E2E tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers, testing
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100