2014-02-27 17:33:25 +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-02-27 17:33:25 +00:00
|
|
|
|
|
|
|
function f(a) {
|
|
|
|
a[5000000] = 256;
|
|
|
|
assertEquals(256, a[5000000]);
|
2019-06-12 14:00:50 +00:00
|
|
|
};
|
|
|
|
%PrepareFunctionForOptimization(f);
|
2014-02-27 17:33:25 +00:00
|
|
|
var v1 = new Array(5000001);
|
|
|
|
var v2 = new Array(10);
|
|
|
|
f(v1);
|
|
|
|
f(v2);
|
|
|
|
f(v2);
|
|
|
|
%OptimizeFunctionOnNextCall(f);
|
|
|
|
f(v2);
|
|
|
|
f(v1);
|