// The nested loop satisfies YieldAnalyzer (js/src/jit/BytecodeAnalysis.cpp) // which only allows Ion compilation of a yielding loop when it contains an // inner loop or sufficient bytecode. function* gen() { for (let i = 0; i < 1; i++) { for (let j = 0; j < 0; j++) {}
yield i;
}
}
async function* asyncGen() { for (let i = 0; i < 1; i++) { for (let j = 0; j < 0; j++) {}
yield i;
}
}
for (let i = 0; i < 10; i++) {
gen().next();
}
useCounters = getUseCounterResults();
// Use-counters deduplicate per-document in product code, so we only // check that the counter has fired.
assertEq(useCounters.GeneratorFunctionIonEligible >= 1, true);
for (let i = 0; i < 10; i++) {
asyncGen().next();
}
useCounters = getUseCounterResults();
assertEq(useCounters.AsyncGeneratorFunctionIonEligible >= 1, true);
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.17 Sekunden
(vorverarbeitet am 2026-08-25)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.