-
Notifications
You must be signed in to change notification settings - Fork 689
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
Improve docs on proper tail call. #190
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,13 +50,19 @@ possible to use a non-standard ABI for specialized purposes. | |
Some types of control flow (especially irreducible and indirect) cannot be | ||
expressed with maximum efficiency in WebAssembly without patterned output by the | ||
relooper and [jump-threading](https://en.wikipedia.org/wiki/Jump_threading) | ||
optimizations in the engine. | ||
optimizations in the engine. Targets uses for more expressive control flow are: | ||
* Language interpreters, which often use computed-`goto`. | ||
* Functional language support, where guarantee tail call optimization is | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: "guaranteed" |
||
expected for correctness and performance. | ||
|
||
Options under consideration: | ||
* No action, `while` and `switch` combined with jump-threading are enough. | ||
* Just add `goto` (direct and indirect). | ||
* Add [signature-restricted Proper Tail Calls](FutureFeatures.md#signature-restricted-proper-tail-calls). | ||
* Add new control-flow primitives that address common patterns. | ||
* Add signature-restricted Proper Tail Calls. | ||
* Proper tail call, expanding upon signature-restricted proper tail calls, and | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe change this to "Add proper tail calls, ...". Currently the wording is kind of ambiguous in context of the previous point as to whether this is a distinct new point or it's a further explanation of the previous one. My language parser had to do some backtracking to realize this was not a continuation. |
||
making it easier to support other languages, especially functional programming | ||
languages. | ||
|
||
## GC/DOM Integration | ||
|
||
|
@@ -116,11 +122,6 @@ Useful properties of signature-restricted PTCs: | |
ordering of arguments in the PTC signature. | ||
|
||
[asm.js RFC]: http://discourse.specifiction.org/t/request-for-comments-add-a-restricted-subset-of-proper-tail-calls-to-asm-js | ||
|
||
## Proper Tail Calls | ||
|
||
Expands upon signature-restricted Proper Tail Calls, and makes it easier to | ||
support other languages, especially functional programming languages. | ||
|
||
## Asynchronous Signals | ||
|
||
|
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.
nit: "Target"