Skip to content
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

Suggestion to make the control flow more explicit #8

Open
brabalan opened this issue Feb 20, 2017 · 0 comments
Open

Suggestion to make the control flow more explicit #8

brabalan opened this issue Feb 20, 2017 · 0 comments
Labels
future work jsexplain syntax Discussion regarding syntax for jsexplain to use. jsref Tasks impacting jsref design and codebase.

Comments

@brabalan
Copy link
Member

In JSExplain, we only use let%ret for complex control flow, when several branches can continue with the same continuation.
Example: http://www.ecma-international.org/ecma-262/7.0/index.html#sec-validateandapplypropertydescriptor

  • 1 always followed by 2
  • if … then of 2 always return, else goes to 3
  • if … then of 3 always return, else goes to 4
  • if … then of 4 always return, else goes to 5
  • else of 5 and else of 5.b go to 6

In our code, we should have an initial let%ref, a bunch of else if, and the in before step 6.

We could suggest to use this wording (start with else if if only one enter point in the control flow) for the spec.

@IgnoredAmbience IgnoredAmbience added jsexplain syntax Discussion regarding syntax for jsexplain to use. future work jsref Tasks impacting jsref design and codebase. labels Jul 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
future work jsexplain syntax Discussion regarding syntax for jsexplain to use. jsref Tasks impacting jsref design and codebase.
Projects
None yet
Development

No branches or pull requests

2 participants