-
Notifications
You must be signed in to change notification settings - Fork 988
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
restore
(debug-level 2)
behavior, but reduce its guarantees (#834)
When `debug-level` is 2 or more, optimization is supposed to refrain from moving a call to an error function into tail position of the enclosing function. (That's a stronger guarantee than the usual one of not moving an expression into tail position if there's potentially a way to detect the movement through continuation marks.) An earlier commit 6a73b9e strengthened movement of error calls in a way that did not preserve this `(debug-level 2)` constraint, so this commit primarily adjusts those changes. Also, the earlier commit 19af32e allowed the compiler to move an error call out of tail position, and that transformation is now suppressed when `debug-level` is 2 or more. These changes are meant to help with debugging, but they're not enough to implement the previously specified behavior of `debug-level`. It turns out that Chez Scheme v9.x didn't implement the specified behavior, either, because it would convert `(let ([x (error ...)]) x)` to just `(error ...)`, for example. The old specification seems too strong, and so part of the revision here is to change the specificaton to be encouraging a particular interaction of errors and continuaton-inspection results, but not guaranteeing it. Meanwhile, when well-defined reflection on continuations is needed, continuation marks provide that functionality.
- Loading branch information
Showing
5 changed files
with
133 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters