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 7 Array.prototype[1] = "element 1"; 8 function test(a) { 9 a.shift(); 10 return a; 11 } 12 assertEquals(["element 1",{}], test([0,,{}])); 13 assertEquals(["element 1",10], test([9,,10])); 14 %OptimizeFunctionOnNextCall(test); 15 assertEquals(["element 1",10], test([9,,10])); 16