Skip to content

Commit 93d2f8d

Browse files
authored
Enable WASM_BIGINT by default (#22993)
Enables by default by temporarily reducing required Safari version. Also includes bugfixes for WASM_BIGINT compatibility.
1 parent 5fe1d64 commit 93d2f8d

File tree

137 files changed

+202
-245
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+202
-245
lines changed

ChangeLog.md

Lines changed: 4 additions & 1 deletion

site/source/docs/tools_reference/settings_reference.rst

Lines changed: 1 addition & 1 deletion

src/settings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1498,7 +1498,7 @@ var DYNCALLS = false;
14981498
// i64 is used. If WASM_BIGINT is present, the default minimum supported browser
14991499
// versions will be increased to the min version that supports BigInt.
15001500
// [link]
1501-
var WASM_BIGINT = false;
1501+
var WASM_BIGINT = true;
15021502

15031503
// WebAssembly defines a "producers section" which compilers and tools can
15041504
// annotate themselves in, and LLVM emits this by default.

src/shell.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ var Module = typeof {{{ EXPORT_NAME }}} != 'undefined' ? {{{ EXPORT_NAME }}} : {
3434
#endif // USE_CLOSURE_COMPILER
3535

3636
#if POLYFILL
37-
#if WASM_BIGINT && MIN_SAFARI_VERSION < 150000
37+
#if WASM_BIGINT && MIN_SAFARI_VERSION < 140100
38+
// TODO(https://github.com/emscripten-core/emscripten/issues/23184): Fix this back to 150000
3839
// See https://caniuse.com/mdn-javascript_builtins_bigint64array
3940
#include "polyfill/bigint64array.js"
4041
#endif
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4297
1+
4380

test/code_size/embind_hello_wasm.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"a.html": 552,
33
"a.html.gz": 380,
4-
"a.js": 9593,
5-
"a.js.gz": 4230,
6-
"a.wasm": 7615,
7-
"a.wasm.gz": 3471,
8-
"total": 17760,
9-
"total_gz": 8081
4+
"a.js": 9879,
5+
"a.js.gz": 4288,
6+
"a.wasm": 7580,
7+
"a.wasm.gz": 3449,
8+
"total": 18011,
9+
"total_gz": 8117
1010
}

test/code_size/embind_val_wasm.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"a.html": 552,
33
"a.html.gz": 380,
4-
"a.js": 6724,
5-
"a.js.gz": 2900,
6-
"a.wasm": 9528,
7-
"a.wasm.gz": 4896,
8-
"total": 16804,
9-
"total_gz": 8176
4+
"a.js": 7153,
5+
"a.js.gz": 3042,
6+
"a.wasm": 9493,
7+
"a.wasm.gz": 4872,
8+
"total": 17198,
9+
"total_gz": 8294
1010
}

test/common.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
from tools.shared import get_canonical_temp_dir, path_from_root
3838
from tools.utils import MACOS, WINDOWS, read_file, read_binary, write_binary, exit_with_error
3939
from tools.settings import COMPILE_TIME_SETTINGS
40-
from tools import shared, line_endings, building, config, utils
40+
from tools import shared, feature_matrix, line_endings, building, config, utils
4141

4242
logger = logging.getLogger('common')
4343

@@ -1164,6 +1164,8 @@ def setUp(self):
11641164
if node_version < emcc_min_node_version:
11651165
self.emcc_args += building.get_emcc_node_flags(node_version)
11661166
self.emcc_args.append('-Wno-transpile')
1167+
if node_version[0] < feature_matrix.min_browser_versions[feature_matrix.Feature.JS_BIGINT_INTEGRATION]['node'] / 10000:
1168+
self.emcc_args.append('-sWASM_BIGINT=0')
11671169

11681170
self.v8_args = ['--wasm-staging']
11691171
self.env = {}

test/other/codesize/test_codesize_cxx_ctors1.exports

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ __indirect_function_table
22
__wasm_call_ctors
33
_emscripten_stack_alloc
44
_emscripten_stack_restore
5-
dynCall_iiiiiijj
6-
dynCall_iiiiij
7-
dynCall_iiiiijj
8-
dynCall_jiji
9-
dynCall_viijii
105
emscripten_stack_get_current
116
main
127
memory
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8502
1+
8352

0 commit comments

Comments
 (0)