Skip to content

Commit ac1443f

Browse files
committed
[wasm64] Remove temporary toIndexType workaround
Now the firefox and chrome both use BigInt for indexing 64-bit memories and tables this workaround is no longer needed.
1 parent d097f6d commit ac1443f

File tree

5 files changed

+4
-21
lines changed

5 files changed

+4
-21
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ commands:
106106
description: "install canary version of node"
107107
steps:
108108
- install-node-version:
109-
node_version: "23.0.0-v8-canary20240819f52f1c2f1c"
109+
node_version: "24.0.0-v8-canary20241031a6869d77cc"
110110
canary: true
111111
install-v8:
112112
description: "install v8 using jsvu"

src/parseTools.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -964,8 +964,7 @@ function from64Expr(x, assign = true) {
964964
}
965965

966966
function toIndexType(x) {
967-
if (MEMORY64 != 1) return x;
968-
return `toIndexType(${x})`;
967+
return to64(x);
969968
}
970969

971970
function to64(x) {

src/runtime_shared.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,6 @@ function updateMemoryViews() {
4747
#endif
4848
}
4949

50-
#if MEMORY64 == 1
51-
var toIndexType = (function() {
52-
// Probe for support of bigint bounds with memory64.
53-
// TODO(sbc): Remove this once all browsers start requiring bigint here.
54-
// See https://github.com/WebAssembly/memory64/issues/68
55-
var bigintMemoryBounds = 1;
56-
try {
57-
/** @suppress {checkTypes} */
58-
new WebAssembly.Memory({'initial': 1n, 'index': 'i64', 'address': 'i64'});
59-
} catch (e) {
60-
bigintMemoryBounds = 0;
61-
}
62-
return (i) => bigintMemoryBounds ? BigInt(i) : i;
63-
})();
64-
#endif
65-
6650
#if ENVIRONMENT_MAY_BE_NODE && MIN_NODE_VERSION < 160000
6751
// The performance global was added to node in v16.0.0:
6852
// https://nodejs.org/api/globals.html#performance
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1589
1+
1522
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3311
1+
3179

0 commit comments

Comments
 (0)