mirror of
https://github.com/facebookarchive/prepack.git
synced 2024-10-26 23:32:02 +03:00
8b75241959
Summary: Release notes: stop abstract loops from getting stuck in infinite loops when body contains a return, throw or break completion Fixes https://github.com/facebook/prepack/issues/2053. This PR adds logic to "for loops" where they might get stuck in an infinite loop when there is no incrementor but there is a return, throw or break completion in the loop body. We check this via a new function `andfailIfContainsBreakOrReturnOrThrowCompletion` and only do this after `100` iterations of evaluating the loop body. I was thinking of making the iteration count configurable but wanted feedback on the approach first. I tried `1000` iterations, but it actually ended up taking about 2 minutes to evaluate the test case :/ Pull Request resolved: https://github.com/facebook/prepack/pull/2247 Differential Revision: D8827425 Pulled By: trueadm fbshipit-source-id: d05f539e2c8a6dce15b7f23c1b76e89087437738 |
||
---|---|---|
.. | ||
error-handler | ||
node-cli | ||
react | ||
residual | ||
serializer | ||
source-maps | ||
std-in | ||
test262@e9a5a7f918 |