summaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2017-03-13 22:16:56 +0100
committerAndy Wingo <wingo@pobox.com>2017-03-13 22:20:16 +0100
commit0543ec96b22001d884fa444f55807825c70fa719 (patch)
tree0e3eb07c64bc1e116a8a476bb40975088c8a00ed /module
parentc9910c604279f438728cd268272e1839cbc53835 (diff)
Nonlocal prompt returns cause all effects
* module/language/cps/effects-analysis.scm (expression-effects): Prompts cause &all-effects. I tried to limit this change to CSE but it was actually LICM that was borked, so better to be conservative * test-suite/tests/control.test ("escape-only continuations"): Add test.
Diffstat (limited to 'module')
-rw-r--r--module/language/cps/effects-analysis.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/module/language/cps/effects-analysis.scm b/module/language/cps/effects-analysis.scm
index f1833bbb5..4eff0d261 100644
--- a/module/language/cps/effects-analysis.scm
+++ b/module/language/cps/effects-analysis.scm
@@ -517,7 +517,10 @@ is or might be a read or a write to the same location as A."
((or ($ $fun) ($ $rec) ($ $closure))
(&allocate &unknown-memory-kinds))
(($ $prompt)
- (&write-object &prompt))
+ ;; Although the "main" path just writes &prompt, we don't know what
+ ;; nonlocal predecessors of the handler do, so we conservatively
+ ;; assume &all-effects.
+ &all-effects)
((or ($ $call) ($ $callk))
&all-effects)
(($ $branch k exp)