-
Notifications
You must be signed in to change notification settings - Fork 38
Do not contify under reset #872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
// leads to `k_6 is not defined` when disabling optimizations on issue861.effekt | ||
// case Some(cont: ContLam) if returnsUnique && !isRecursive => | ||
// val k2 = Id("k") | ||
// given Substitution = Substitution(conts = Map(k -> ContVar(k2))) | ||
// LetCont(k2, cont, | ||
// Stmt.LetCont(id, ContLam(vparams, ks, substitute(rewrittenBody)), | ||
// contify(id, rewrittenRest))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly, we do not have a regression test since we need to disable optimizations.
Maybe a variant of #851 where we selectively run tests without optimizations would be useful (here JS backend so a lot of the reported segfaults etc. do not matter here.)
The same holds for issue842.effekt
which is a reproduction for #842 that we also should once run without optimizations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the present PR I comment this out, however this "might" have performance implications...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we're hitting the limits of the way we currently do example-based regression tests...
We have multiple axes now, but we really only cleanly account for two of them (1 & 3):
- by backend:
- JS
- LLVM
- ...
- by opts:
- with opts
- no opts
- stdlib vs compiler:
- stdlib
- compiler
- by backend-specific details:
- with valgrind
- without valgrind
I don't really know how to neatly account for also 2 and 4 without making things too confusing 🤔
This is a *continuation* of #851. We aim to fix the previously ignored tests that currently fail when being run without optimization. - [x] permute.effekt: segfault in resume->uniqueStack->copyStack since resume is called with an erased resumption stack - apparently from growing the stack via checkLimit - fixed e.g. by initial size = `shl 1, 8` instead of 7 - [x] multiple declarations (in JS) - `ascii_isalphanumeric.effekt`, `ascii_iswhitespace.effekt`, `parser.effekt`, `probabilistic.effekt` - fixed by "Do not contify under reset" (found out via bisect) - is still a problem though - [x] missing block info - [x] generator.effekt: by noting parameters for regions - [x] regions.effekt - [x] selfregion.effekt - [x] typeparametric.effekt: by returning garbage value (`undef`) - [x] issue842.effekt: by #872 - [x] issue861.effekt: by #872 - [x] top-level object definititions - if_control_effect.effekt, toplevel_objects.effekt, type_omission_op.effekt, higherorderobject.effekt, res_obj_boxed.effekt, effectfulobject.effekt --------- Co-authored-by: Philipp Schuster <[email protected]>
This is a *continuation* of effekt-lang#851. We aim to fix the previously ignored tests that currently fail when being run without optimization. - [x] permute.effekt: segfault in resume->uniqueStack->copyStack since resume is called with an erased resumption stack - apparently from growing the stack via checkLimit - fixed e.g. by initial size = `shl 1, 8` instead of 7 - [x] multiple declarations (in JS) - `ascii_isalphanumeric.effekt`, `ascii_iswhitespace.effekt`, `parser.effekt`, `probabilistic.effekt` - fixed by "Do not contify under reset" (found out via bisect) - is still a problem though - [x] missing block info - [x] generator.effekt: by noting parameters for regions - [x] regions.effekt - [x] selfregion.effekt - [x] typeparametric.effekt: by returning garbage value (`undef`) - [x] issue842.effekt: by effekt-lang#872 - [x] issue861.effekt: by effekt-lang#872 - [x] top-level object definititions - if_control_effect.effekt, toplevel_objects.effekt, type_omission_op.effekt, higherorderobject.effekt, res_obj_boxed.effekt, effectfulobject.effekt --------- Co-authored-by: Philipp Schuster <[email protected]>
This PR fixes #861 by not contifying under reset.
It also adds a pretty printer as a drive-by for easier debugging (the one from #843).