1// 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]));
16