effekt-lang / effekt-lang/effekt

Every phase ought to have textual output for debugging

Open
#935 2 comments 0 reactions 0 assignees View on GitHub
feature quality-of-life
Dominant language
Scala
Stars
469
Forks
41
Avg merge
1d 16h
Merged PRs (30d)
23

Description

As far as I can tell, currently `--ir-write-all` prints:
- core (optimized or not depends on an optimization toggle)
- target
- machine (if relevant for the given target)

I'd like a much more fine-grained solution. For many bugs, it would be much easier if we could print the current state before/after every phase like:
- before/after Polymorphism Boxing
- before/after individual optimization/normalization passes
- before/after CPS on JS backend
- before all core optimizations and after all core optimizations
- etc

My goal is to be able to call some `--ir-write-all-yes-really` and get 382 files (one for each nanopass) I can binary search through in order to determine what went wrong in which phase, without needing to modify the compiler, sparkling debug prints everywhere.
An example is #934 — I think I know where the issue is, but I really don't want to ad hoc trace the whole JS backend code...

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.