blob: e4749315703010a20338a4ff47873fa3012f5ae2 [file] [log] [blame]
//@ requireOptions("--useSamplingProfiler=true", "--useObjectAllocationSinking=false", "--sampleInterval=10")
// Note that original test was using --useProbeOSRExit=1
function foo(ranges) {
const CHUNK_SIZE = 95;
for (const [start, end] of ranges) {
const codePoints = [];
for (let length = 0, codePoint = start; codePoint <= end; codePoint++) {
codePoints[length++] = codePoint;
if (length === CHUNK_SIZE) {
length = 0;
codePoints.length = 0;
String.fromCodePoint(...[]);
}
}
String.fromCodePoint(...codePoints);
}
}
for (let i=0; i<3; i++) {
let x = foo([
[ 0, 10000 ],
[ 68000, 1114111 ]
]);
}