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 --debug-code --use-gvn 6 7function f(a, base) { 8 a[base] = 1; 9 a[base + 4] = 2; 10 a[base] = 3; 11} 12var a1 = new Array(1024); 13var a2 = new Array(128); 14f(a1, 1); 15f(a2, -2); 16%OptimizeFunctionOnNextCall(f); 17f(a1, -2); 18