| Index: test/mjsunit/regress/regress-crbug-514268.js
|
| diff --git a/test/mjsunit/regress/regress-crbug-514268.js b/test/mjsunit/regress/regress-crbug-514268.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..75d9970eed7d3af02432f82d592e3a55a32d2669
|
| --- /dev/null
|
| +++ b/test/mjsunit/regress/regress-crbug-514268.js
|
| @@ -0,0 +1,23 @@
|
| +// Copyright 2015 the V8 project authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +// Flags: --allow-natives-syntax
|
| +
|
| +function bar(a) {
|
| + a.pop();
|
| +}
|
| +function foo(a) {
|
| + assertEquals(2, a.length);
|
| + var d;
|
| + for (d in a) {
|
| + bar(a);
|
| + }
|
| + // If this fails, bar was not called exactly once.
|
| + assertEquals(1, a.length);
|
| +}
|
| +
|
| +foo([1,2]);
|
| +foo([2,3]);
|
| +%OptimizeFunctionOnNextCall(foo);
|
| +foo([1,2]);
|
|
|