Closed Bug 1677204 Opened 4 years ago Closed 4 years ago

Remove feature flags for shipped features and clean up feature logic

Categories

(Core :: JavaScript: WebAssembly, task, P3)

task

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: rhunt, Assigned: rhunt)

References

Details

Attachments

(5 files)

It looks like wasm multi-value and reftypes are now supported by all compilers and we can start to remove the feature flag functionality here.

rs=me!

Summary: Remove feature flags for shipped features → Remove feature flags for shipped features and clean up feature logic

Multi-value has shipped and can remove its feature flag.

This commit adds a declarative JS_FOR_WASM_FEATURES macro which
expands for every WebAssembly proposal we are gating. Most feature
gating code is refactored to use this macro so that we have one place
we need to change to get the majority of this code working. The only
place that needs to be updated for new features is the browser pref
declaration code, as that cannot use this macro. This is documented
in the new WasmFeatures.h header.

The feature gating logic should work almost identically as before.
The changes are:

  • All browser prefs are moved to StaticPrefList.yaml
  • The code to enable a feature was conditionally compiled to not
    enable the feature at variously stages of the "flag-flow". Now
    the only place that is conditionally compiled to not work is
    in the WasmXFlag functions. This is to make the macro simpler
    and might be able to be reverted if need be.
  • The flag for gc is shortened from gcTypes to gc so that the
    existing usages of the wasmGcEnabled shell function don't have
    to change.

This commit also has the effect of giving function-references/gc/
exception-handling a proper browser pref for enabling the features.

Depends on D110819

The features.js test could use some updates for the current active/shipped
proposals.

Depends on D110820

Only allow decoding the event section when exception-handling is enabled.

Depends on D110821

Reftypes has shipped and so we can remove the feature flag.

Depends on D110822

Pushed by rhunt@eqrion.net: https://hg.mozilla.org/integration/autoland/rev/74f706489769 wasm: Remove multi-value flag. r=lth https://hg.mozilla.org/integration/autoland/rev/e4aa0aabc24d wasm: Factor out feature gating to declarative macro. r=lth https://hg.mozilla.org/integration/autoland/rev/656d9d64fee1 wasm: Expand feature enablement testing for active proposals. r=lth https://hg.mozilla.org/integration/autoland/rev/d0073c38f10b wasm: Gate event section on exception-handling flag. r=lth https://hg.mozilla.org/integration/autoland/rev/f89e1e839deb wasm: Remove reftypes flag. r=lth
Regressions: 1705446
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: