Files
Kmake/deps/v8/test/mjsunit/regress/regress-377829476.js
2026-05-26 23:36:42 -07:00

26 lines
563 B
JavaScript

// Copyright 2024 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 --regexp-interpret-all
function f0() {
return 'aaaaaaaaaaaaaa';
}
function f1() {
return 'bbbbbbbbbbbbbb';
}
function f2() {
return f0() + f1();
}
function f3(arg) {
return arg + f2();
}
%PrepareFunctionForOptimization(f3);
f3("");
f3("");
%OptimizeFunctionOnNextCall(f3);
var foo = f3("");
foo.replace(/[\u1234]/g, "");
foo.replace(/[\u1234]/g, "");