prepack/test
Dominic Gannaway 8b75241959 Prevent loops from getting stuck in infinite loops (#2247)
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
2018-07-12 23:40:53 -07:00
..
error-handler Run Prettier for serializer tests too (#2234) 2018-07-11 03:55:11 -07:00
node-cli Run Prettier for serializer tests too (#2234) 2018-07-11 03:55:11 -07:00
react Run Prettier checks on CI (#2212) 2018-07-10 09:55:23 -07:00
residual Run Prettier for serializer tests too (#2234) 2018-07-11 03:55:11 -07:00
serializer Prevent loops from getting stuck in infinite loops (#2247) 2018-07-12 23:40:53 -07:00
source-maps Run Prettier for serializer tests too (#2234) 2018-07-11 03:55:11 -07:00
std-in fix #1239 - Command-line based syntax errors now print location 2017-12-18 13:56:26 -08:00
test262@e9a5a7f918 Update test262 submodule hash 2018-07-06 14:25:54 -07:00