Skip to content

Commit

Permalink
Improve module instantiation/evaluation, especially around errors
Browse files Browse the repository at this point in the history
This builds on tc39/ecma262#916, in which the
JavaScript specification remembers errors during module instantiation
and evaluation. That allows us to stop our error-prone approach of
doing bottom-up instantiation (which currently fails for cyclic graphs;
see whatwg#2629), and obviates the consequent need to propagate errors (which
is also buggy; see whatwg#2630). Finally, it makes certain edge cases during
evaluation nicer; see
whatwg#2595 (comment).

For background on why we originally went with a bottom-up approach, see
whatwg#1545. At the time we didn't seem to believe changing the JavaScript
spec was an option, but since then we've learned that doing so is the
most reasonable way to go.

There may be more work to do here in certain error-related edge cases,
or to make potential optimizations more obvious. But now at least the
setup is implementable and reasonable.

Closes whatwg#2629. Closes whatwg#2630.
  • Loading branch information
domenic authored and Alice Boxhall committed Jan 7, 2019
1 parent f2602a3 commit 9988580
Showing 1 changed file with 177 additions and 250 deletions.
Loading

0 comments on commit 9988580

Please sign in to comment.