// About the fuzzer intercession points: If fuzzing has been selected and only a // single compiler has been selected then we will disable features that are not // supported by that single compiler. This is strictly a concession to the // fuzzer infrastructure.
// Compiler availability predicates. These must be kept in sync with the // feature predicates in the next section below. // // These can't call the feature predicates since the feature predicates call // back to these predicates. So there will be a small amount of duplicated // logic here, but as compilers reach feature parity that duplication will go // away.
// Feature predicates. These must be kept in sync with the predicates in the // section above. // // The meaning of these predicates is tricky: A predicate is true for a feature // if the feature is enabled and/or compiled-in *and* we have *at least one* // compiler that can support the feature. Subsequent compiler selection must // ensure that only compilers that actually support the feature are used.
// Test only whether the compilers are supported on the hardware, not whether // they are enabled. return BaselinePlatformSupport() || IonPlatformSupport();
}
bool wasm::HasSupport(JSContext* cx) { // If the general wasm pref is on, it's on for everything. bool prefEnabled = cx->options().wasm(); // If the general pref is off, check trusted principals. if (MOZ_UNLIKELY(!prefEnabled)) {
prefEnabled = cx->options().wasmForTrustedPrinciples() && cx->realm() &&
cx->realm()->principals() &&
cx->realm()->principals()->isSystemOrAddonPrincipal();
} // Do not check for compiler availability, as that may be run-time variant. // For HasSupport() we want a stable answer depending only on prefs. return prefEnabled && HasPlatformSupport() && EnsureFullSignalHandlers(cx);
}
bool wasm::StreamingCompilationAvailable(JSContext* cx) { // This should match EnsureStreamSupport(). return HasSupport(cx) && AnyCompilerAvailable(cx) &&
cx->runtime()->offThreadPromiseState.ref().initialized() &&
CanUseExtraThreads() && cx->runtime()->consumeStreamCallback &&
cx->runtime()->reportStreamErrorCallback;
}
bool wasm::CodeCachingAvailable(JSContext* cx) { // Fuzzilli breaks the out-of-process compilation mechanism, // so we disable it permanently in those builds. #ifdef FUZZING_JS_FUZZILLI returnfalse; #else
// TODO(bug 1913109): lazy tiering doesn't support serialization if (JS::Prefs::wasm_lazy_tiering()) { returnfalse;
}
// At the moment, we require Ion support for code caching. The main reason // for this is that wasm::CompileAndSerialize() does not have access to // information about which optimizing compiler it should use. See comments in // CompileAndSerialize(), below. return StreamingCompilationAvailable(cx) && IonAvailable(cx); #endif
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet am 2026-09-28)
¤
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.