blob: 3a0afc596b11c28446870636e50143d99b95f2bc [file] [log] [blame]
Ben Murdochb8a8cc12014-11-26 15:28:44 +00001// Copyright 2014 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Flags: --allow-natives-syntax
6
7Array.prototype[1] = "element 1";
8function test(a) {
9 a.shift();
10 return a;
11}
12assertEquals(["element 1",{}], test([0,,{}]));
13assertEquals(["element 1",10], test([9,,10]));
14%OptimizeFunctionOnNextCall(test);
15assertEquals(["element 1",10], test([9,,10]));