Skip to content

Commit

Permalink
Merge pull request #190 from WebAssembly/tail-call
Browse files Browse the repository at this point in the history
Improve docs on proper tail call.
  • Loading branch information
jfbastien committed Jun 19, 2015
2 parents 190cb34 + 61a634d commit 2de6e26
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions FutureFeatures.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. Target uses for more expressive control flow are:
* Language interpreters, which often use computed-`goto`.
* Functional language support, where guaranteed tail call optimization is
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.
* Add proper tail call, expanding upon signature-restricted proper tail calls, and
making it easier to support other languages, especially functional programming
languages.

## GC/DOM Integration

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 2de6e26

Please sign in to comment.