v8/test/mjsunit/regress/regress-1380398.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
555 B
JavaScript
Raw Normal View History

// Copyright 2022 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.
// Flags: --allow-natives-syntax --turbofan --harmony-rab-gsab
function test() {
const ab = new ArrayBuffer(2996, { maxByteLength: 8588995 });
const dv = new DataView(ab);
const len = dv.byteLength;
return len >= 255;
}
%PrepareFunctionForOptimization(test);
assertTrue(test());
assertTrue(test());
%OptimizeFunctionOnNextCall(test);
assertTrue(test());
assertOptimized(test);