commit 83ed6516f3f9b7fe544ce3b9d29f45e5a5b96f9d
parent 7eda02f7fdcd4da74dbaa3707f132b16f610d717
Author: Julien Pages <jpages@mozilla.com>
Date: Tue, 16 Dec 2025 21:13:52 +0000
Bug 1950729 - Release wasm branch hinting. r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D251054
Diffstat:
3 files changed, 17 insertions(+), 20 deletions(-)
diff --git a/js/moz.configure b/js/moz.configure
@@ -1022,29 +1022,21 @@ set_define("ENABLE_WASM_MEMORY_CONTROL", wasm_memory_control)
# ===========================
-@depends(milestone.is_nightly)
-def default_wasm_branch_hinting(is_nightly):
- if is_nightly:
- return True
-
-
option(
- "--enable-wasm-branch-hinting",
- default=default_wasm_branch_hinting,
- help="{Enable|Disable} WebAssembly Branch hints",
+ "--disable-wasm-branch-hinting",
+ default=True,
+ help="{Enable|Disable} WebAssembly branch hinting",
)
+set_config(
+ "ENABLE_WASM_BRANCH_HINTING",
+ depends_if("--enable-wasm-branch-hinting")(lambda x: True),
+)
+set_define(
+ "ENABLE_WASM_BRANCH_HINTING",
+ depends_if("--enable-wasm-branch-hinting")(lambda x: True),
+)
-@depends("--enable-wasm-branch-hinting", "--wasm-no-experimental")
-def wasm_branch_hinting(value, no_experimental):
- if no_experimental or not value:
- return
-
- return True
-
-
-set_config("ENABLE_WASM_BRANCH_HINTING", wasm_branch_hinting)
-set_define("ENABLE_WASM_BRANCH_HINTING", wasm_branch_hinting)
# Support for WebAssembly Custom Page Sizes
# =====================================================
diff --git a/js/src/jit-test/tests/wasm/features.js b/js/src/jit-test/tests/wasm/features.js
@@ -65,6 +65,11 @@ for (let [name, enabled, test] of releasedFeaturesMaybeDisabledAnyway) {
let releasedFeatures = [
['threads', wasmThreadsEnabled(), `(module (memory 1 1 shared))`],
+ ['branch-hinting', wasmBranchHintingEnabled(),
+ `(func
+ i32.const 0
+ (@metadata.code.branch_hint "\\00") if
+ end)`],
];
for (let [name, enabled, test, options] of releasedFeatures) {
diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml
@@ -9262,7 +9262,7 @@
- name: javascript.options.wasm_branch_hinting
type: bool
#if defined(ENABLE_WASM_BRANCH_HINTING)
- value: @IS_NIGHTLY_BUILD@
+ value: true
#else
value: false
#endif