/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// [SMDOC] WebAssembly feature gating // // Declarative listing of WebAssembly optional features. This macro is used to // generate most of the feature gating code in a centralized manner. See // 'Adding a feature' below for the exact steps needed to add a new feature. // // # Adding a feature // // 1. Add a configure switch for the feature in js/moz.configure // 2. Add a WASM_FEATURE_ENABLED #define below // 3. Add the feature to JS_FOR_WASM_FEATURES // a. capitalized name: Used for naming of feature functions, including // wasmFeatureEnabled shell function. // b. lower case name: Used for naming of feature flag variables, including // in wasm::FeatureArgs. // c. compile predicate: Set to WASM_FEATURE_ENABLED // d. compiler predicate: Expression of compilers that this feature depends // on. // e. flag predicate: Expression used to predicate enablement of feature // flag. Useful for disabling a feature when dependent feature is not // enabled or if we are fuzzing. // f. preference name: The stem of the browser preference. Will be expanded // to `javascript.options.wasm-FEATURE`. // 4. Add the preference to module/libpref/init/StaticPrefList.yaml // a. Set `set_spidermonkey_pref: startup` // b. Set value to 'true' for default features, @IS_NIGHTLY_BUILD@ for // tentative features, and 'false' for experimental features. // 5. Update the jit-test/tests/wasm/directiveless/features.js test to include // this feature. // 6. [fuzzing] Add the feature to gluesmith/src/lib.rs, if wasm-smith has // support for it.
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.