2014-03-06 16:22:47 +00:00
|
|
|
// Copyright 2014 the V8 project authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2017-07-13 11:22:37 +00:00
|
|
|
// Flags: --allow-natives-syntax --debug-code
|
2014-03-06 16:22:47 +00:00
|
|
|
|
|
|
|
function f(a, base) {
|
|
|
|
a[base] = 1;
|
|
|
|
a[base + 4] = 2;
|
|
|
|
a[base] = 3;
|
|
|
|
}
|
|
|
|
var a1 = new Array(1024);
|
|
|
|
var a2 = new Array(128);
|
|
|
|
f(a1, 1);
|
|
|
|
f(a2, -2);
|
|
|
|
%OptimizeFunctionOnNextCall(f);
|
|
|
|
f(a1, -2);
|