From 7a9dab741bc788b38c4308ee2c72a189f36cdf2b Mon Sep 17 00:00:00 2001 From: Slavomir Kucera Date: Fri, 14 Nov 2025 09:34:51 +0100 Subject: [PATCH 1/2] fix: Big-endian support does not work with optimizations --- tools/acorn-optimizer.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/acorn-optimizer.mjs b/tools/acorn-optimizer.mjs index fdc2306649a26..11a9d2c401ce1 100755 --- a/tools/acorn-optimizer.mjs +++ b/tools/acorn-optimizer.mjs @@ -1219,9 +1219,10 @@ function isGrowHEAPAccess(node) { if ( node.type !== 'MemberExpression' || !node.computed || // notice a[X] but not a.X - node.object.type !== 'ParenthesizedExpression') + (node.object.type !== 'ParenthesizedExpression' && node.object.type !== 'SequenceExpression') + ) return false; - const obj = node.object.expression; + const obj = node.object.type === 'ParenthesizedExpression' ? node.object.expression : node.object; return ( obj.type === 'SequenceExpression' && obj.expressions.length === 2 && From 7254efb93b927221817173b178c4ecfdf4e19c95 Mon Sep 17 00:00:00 2001 From: Slavomir Kucera Date: Tue, 25 Nov 2025 12:24:31 +0100 Subject: [PATCH 2/2] provide default --- src/lib/liblittle_endian_heap.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/liblittle_endian_heap.js b/src/lib/liblittle_endian_heap.js index 1f97eb6530010..8a2ba67c8af2a 100644 --- a/src/lib/liblittle_endian_heap.js +++ b/src/lib/liblittle_endian_heap.js @@ -109,11 +109,11 @@ function LE_HEAP_UPDATE() { const res = order(Atomics.sub(heap, offset, order(value))); return heap.unsigned ? heap.unsigned(res) : res; }, - $LE_ATOMICS_WAIT: (heap, offset, value, timeout) => { + $LE_ATOMICS_WAIT: (heap, offset, value, timeout = Infinity) => { const order = LE_ATOMICS_NATIVE_BYTE_ORDER[heap.BYTES_PER_ELEMENT - 1]; return Atomics.wait(heap, offset, order(value), timeout); }, - $LE_ATOMICS_WAITASYNC: (heap, offset, value, timeout) => { + $LE_ATOMICS_WAITASYNC: (heap, offset, value, timeout = Infinity) => { const order = LE_ATOMICS_NATIVE_BYTE_ORDER[heap.BYTES_PER_ELEMENT - 1]; return Atomics.waitAsync(heap, offset, order(value), timeout); },