| Index: test/mjsunit/regress/regress-crbug-135008.js
|
| diff --git a/test/mjsunit/compiler/regress-toint32.js b/test/mjsunit/regress/regress-crbug-135008.js
|
| similarity index 83%
|
| copy from test/mjsunit/compiler/regress-toint32.js
|
| copy to test/mjsunit/regress/regress-crbug-135008.js
|
| index 54c2f76dd75a3006dd0b040f0ce31c28f0a7ec29..2be396e8055a916b1f7c7370ff32ff0d40eea762 100644
|
| --- a/test/mjsunit/compiler/regress-toint32.js
|
| +++ b/test/mjsunit/regress/regress-crbug-135008.js
|
| @@ -25,21 +25,21 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -// Flags: --allow-natives-syntax --noenable-sse3
|
| +// Filler long enough to trigger lazy parsing.
|
| +var filler = "//" + new Array(1024).join('x');
|
|
|
| -var a = new Int32Array(1);
|
| -var G = 0x80000000;
|
| +var scope = { x:23 };
|
|
|
| -function f(x) {
|
| - var v = x;
|
| - v = v + 1;
|
| - a[0] = v;
|
| - v = v - 1;
|
| - return v;
|
| -}
|
| -
|
| -assertEquals(G, f(G));
|
| -assertEquals(G, f(G));
|
| -%OptimizeFunctionOnNextCall(f);
|
| -assertEquals(G, f(G));
|
| +with(scope) {
|
| + eval(
|
| + "scope.f = (function outer() {" +
|
| + " function inner() {" +
|
| + " return x;" +
|
| + " }" +
|
| + " return inner;" +
|
| + "})();" +
|
| + filler
|
| + );
|
| +};
|
|
|
| +assertSame(23, scope.f());
|
|
|