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 7var dummy = new Int32Array(100); 8var array = new Int32Array(128); 9function fun(base) { 10 array[base - 95] = 1; 11 array[base - 99] = 2; 12 array[base + 4] = 3; 13} 14fun(100); 15%OptimizeFunctionOnNextCall(fun); 16fun(0); 17 18for (var i = 0; i < dummy.length; i++) { 19 assertEquals(0, dummy[i]); 20} 21