Index: test/mjsunit/regress/regress-323845.js |
diff --git a/test/mjsunit/compiler/control-flow-0.js b/test/mjsunit/regress/regress-323845.js |
similarity index 87% |
copy from test/mjsunit/compiler/control-flow-0.js |
copy to test/mjsunit/regress/regress-323845.js |
index bcf4f2dc998c06f2ea1abab562e8bdf3bbc8fa75..4e81657917825d13db671922b58a05a3c7a5aa46 100644 |
--- a/test/mjsunit/compiler/control-flow-0.js |
+++ b/test/mjsunit/regress/regress-323845.js |
@@ -25,20 +25,23 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-function f() { |
- return (42 + (0 == 1 ? 1 : 2)); |
-} |
+// Regression test that breaks escape analysis because objects escape over |
+// the arguments object. |
+// Flags: --allow-natives-syntax |
-function g(x) { |
- return (x + (0 == 1 ? 1 : 2)); |
+function h() { |
+ g.arguments; |
} |
+function g(x) { |
+ h(); |
+} |
-function h(x) { |
- return ((x + 1) + (0 == 1 ? 1 : 2)); |
+function f() { |
+ g({}); |
} |
-assertEquals(44, f()); |
-assertEquals(45, g(43)); |
-assertEquals(47, h(44)); |
+f(); f(); f(); |
+%OptimizeFunctionOnNextCall(f); |
+f(); |