Skip to content

Commit 240ffac

Browse files
committed
Update closure-compiler. NFC
1 parent f939429 commit 240ffac

File tree

90 files changed

+264
-265
lines changed

Some content is hidden

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

90 files changed

+264
-265
lines changed

package-lock.json

Lines changed: 114 additions & 109 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"@babel/core": "^7.28.0",
2222
"@babel/preset-env": "^7.28.0",
2323
"acorn": "^8.15.0",
24-
"google-closure-compiler": "20240317.0.0",
24+
"google-closure-compiler": "20250701.0.0",
2525
"html-minifier-terser": "7.2.0"
2626
},
2727
"scripts": {

src/closure-externs/closure-externs.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,6 @@ Atomics.store = function() {};
7373
* @suppress {duplicate, checkTypes}
7474
*/
7575
var WebAssembly = {};
76-
/**
77-
* @constructor
78-
* @param {Object} globalDescriptor
79-
* @param {*=} value
80-
*/
81-
WebAssembly.Global = function(globalDescriptor, value) {};
8276
/**
8377
* @param {!WebAssembly.Tag} tag
8478
* @param {number} index

test/code_size/audio_worklet_wasm.js

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
var k = globalThis.Module || "undefined" != typeof Module ? Module : {}, p = "em-ww" == globalThis.name, q = "undefined" !== typeof AudioWorkletGlobalScope, r, v, L, M, G, I, C, X, J, E, D, Y, Z;
1+
var k = globalThis.Module || typeof Module != "undefined" ? Module : {}, p = globalThis.name == "em-ww", q = typeof AudioWorkletGlobalScope !== "undefined", r, v, L, M, G, I, C, X, J, E, D, Y, Z;
22

33
q && (p = !0);
44

55
function u(a) {
66
r = a;
7-
v = a.I;
7+
v = a.J;
88
x();
99
k ||= {};
10-
k.wasm = a.C;
10+
k.wasm = a.D;
1111
y();
12-
a.C = a.J = 0;
12+
a.D = a.K = 0;
1313
}
1414

1515
p && !q && (onmessage = a => {
@@ -23,38 +23,38 @@ if (q) {
2323
constructor(e) {
2424
super();
2525
e = e.processorOptions;
26-
this.u = C.get(e.u);
27-
this.v = e.v;
28-
this.s = e.s;
26+
this.v = C.get(e.v);
27+
this.A = e.A;
28+
this.u = e.u;
2929
}
3030
static get parameterDescriptors() {
3131
return c;
3232
}
3333
process(e, h, f) {
34-
let m = e.length, w = h.length, F = 0, l, z, n, t = 4 * this.s, g = 12 * (m + w), W = D(), A, H, B;
34+
let m = e.length, w = h.length, F = 0, l, z, n, t = this.u * 4, g = (m + w) * 12, W = D(), A, H, B;
3535
for (l of e) g += l.length * t;
3636
for (l of h) g += l.length * t;
3737
for (l in f) g += f[l].byteLength + 8, ++F;
3838
A = E(g);
3939
g = A >> 2;
40-
n = A + 12 * m;
40+
n = A + m * 12;
4141
for (l of e) {
4242
G[g] = l.length;
43-
G[g + 1] = this.s;
43+
G[g + 1] = this.u;
4444
G[g + 2] = n;
4545
g += 3;
4646
for (z of l) I.set(z, n >> 2), n += t;
4747
}
4848
H = n;
4949
g = H >> 2;
50-
e = (n += 12 * w) >> 2;
51-
for (l of h) G[g] = l.length, G[g + 1] = this.s, G[g + 2] = n, g += 3, n += t * l.length;
50+
e = (n += w * 12) >> 2;
51+
for (l of h) G[g] = l.length, G[g + 1] = this.u, G[g + 2] = n, g += 3, n += t * l.length;
5252
t = n;
5353
g = t >> 2;
54-
n += 8 * F;
54+
n += F * 8;
5555
for (l = 0; B = f[l++]; ) G[g] = B.length, G[g + 1] = n, g += 2, I.set(B, n >> 2),
56-
n += 4 * B.length;
57-
if (f = this.u(m, A, w, H, F, t, this.v)) for (l of h) for (z of l) for (g = 0; g < this.s; ++g) z[g] = I[e++];
56+
n += B.length * 4;
57+
if (f = this.v(m, A, w, H, F, t, this.A)) for (l of h) for (z of l) for (g = 0; g < this.u; ++g) z[g] = I[e++];
5858
J(W);
5959
return !!f;
6060
}
@@ -69,10 +69,10 @@ if (q) {
6969
K = this.port;
7070
K.onmessage = async d => {
7171
d = d.data;
72-
d._wpn ? (registerProcessor(d._wpn, a(d.D)), K.postMessage({
73-
_wsc: d.u,
74-
A: [ d.F, 1, d.v ]
75-
})) : d._wsc && C.get(d._wsc)(...d.A);
72+
d._wpn ? (registerProcessor(d._wpn, a(d.F)), K.postMessage({
73+
_wsc: d.v,
74+
B: [ d.G, 1, d.A ]
75+
})) : d._wsc && C.get(d._wsc)(...d.B);
7676
};
7777
}
7878
process() {}
@@ -103,17 +103,17 @@ var N = [], O = a => {
103103
}, Q = a => J(a), R = () => D(), aa = (a, b, c, d) => {
104104
b = S[b];
105105
S[a].connect(b.destination || b, c, d);
106-
}, S = {}, T = 0, U = "undefined" != typeof TextDecoder ? new TextDecoder : void 0, V = (a = 0) => {
106+
}, S = {}, T = 0, U = typeof TextDecoder != "undefined" ? new TextDecoder : void 0, V = (a = 0) => {
107107
for (var b = L, c = a, d = c + void 0; b[c] && !(c >= d); ) ++c;
108-
if (16 < c - a && b.buffer && U) return U.decode(b.slice(a, c));
108+
if (c - a > 16 && b.buffer && U) return U.decode(b.slice(a, c));
109109
for (d = ""; a < c; ) {
110110
var e = b[a++];
111111
if (e & 128) {
112112
var h = b[a++] & 63;
113-
if (192 == (e & 224)) d += String.fromCharCode((e & 31) << 6 | h); else {
113+
if ((e & 224) == 192) d += String.fromCharCode((e & 31) << 6 | h); else {
114114
var f = b[a++] & 63;
115-
e = 224 == (e & 240) ? (e & 15) << 12 | h << 6 | f : (e & 7) << 18 | h << 12 | f << 6 | b[a++] & 63;
116-
65536 > e ? d += String.fromCharCode(e) : (e -= 65536, d += String.fromCharCode(55296 | e >> 10, 56320 | e & 1023));
115+
e = (e & 240) == 224 ? (e & 15) << 12 | h << 6 | f : (e & 7) << 18 | h << 12 | f << 6 | b[a++] & 63;
116+
e < 65536 ? d += String.fromCharCode(e) : (e -= 65536, d += String.fromCharCode(55296 | e >> 10, 56320 | e & 1023));
117117
}
118118
} else d += String.fromCharCode(e);
119119
}
@@ -144,9 +144,9 @@ var N = [], O = a => {
144144
numberOfOutputs: f,
145145
outputChannelCount: m,
146146
processorOptions: {
147-
u: d,
148-
v: e,
149-
s: 128
147+
v: d,
148+
A: e,
149+
u: 128
150150
}
151151
};
152152
} else d = void 0;
@@ -163,36 +163,36 @@ var N = [], O = a => {
163163
maxValue: I[f++],
164164
automationRate: [ "a", "k" ][G[f++]] + "-rate"
165165
});
166-
h = S[a].audioWorklet.B.port;
166+
h = S[a].audioWorklet.C.port;
167167
f = h.postMessage;
168168
b = (b = G[b]) ? V(b) : "";
169169
f.call(h, {
170170
_wpn: b,
171-
D: e,
172-
F: a,
173-
u: c,
174-
v: d
171+
F: e,
172+
G: a,
173+
v: c,
174+
A: d
175175
});
176176
}, ea = () => !1, fa = 1, ha = a => {
177177
a = a.data;
178178
let b = a._wsc;
179-
b && C.get(b)(...a.A);
179+
b && C.get(b)(...a.B);
180180
}, ia = a => E(a), ja = (a, b, c, d, e) => {
181181
let h = S[a], f = h.audioWorklet, m = () => {
182182
C.get(d)(a, 0, e);
183183
};
184184
if (!f) return m();
185185
f.addModule(k.js).then((() => {
186-
f.B = new AudioWorkletNode(h, "em-bootstrap", {
186+
f.C = new AudioWorkletNode(h, "em-bootstrap", {
187187
processorOptions: {
188-
K: fa++,
189-
C: k.wasm,
190-
I: v,
191-
G: b,
192-
H: c
188+
L: fa++,
189+
D: k.wasm,
190+
J: v,
191+
H: b,
192+
I: c
193193
}
194194
});
195-
f.B.port.onmessage = ha;
195+
f.C.port.onmessage = ha;
196196
C.get(d)(a, 1, e);
197197
})).catch(m);
198198
};
@@ -203,7 +203,7 @@ function ka(a) {
203203
document.body.appendChild(b);
204204
a = S[a];
205205
b.onclick = () => {
206-
"running" != a.state ? a.resume() : a.suspend();
206+
a.state != "running" ? a.resume() : a.suspend();
207207
};
208208
}
209209

@@ -232,7 +232,7 @@ function y() {
232232
k.stackAlloc = ia;
233233
k.stackRestore = Q;
234234
k.wasmTable = C;
235-
p ? (Y(r.G, r.H), "undefined" === typeof AudioWorkletGlobalScope && (removeEventListener("message", P),
235+
p ? (Y(r.H, r.I), typeof AudioWorkletGlobalScope === "undefined" && (removeEventListener("message", P),
236236
N = N.forEach(O), addEventListener("message", O))) : a.i();
237237
p || X();
238238
}));

test/code_size/audio_worklet_wasm.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"a.html": 519,
33
"a.html.gz": 357,
44
"a.js": 3853,
5-
"a.js.gz": 2045,
5+
"a.js.gz": 2048,
66
"a.wasm": 1288,
77
"a.wasm.gz": 860,
88
"total": 5660,
9-
"total_gz": 3262
9+
"total_gz": 3265
1010
}

test/code_size/embind_hello_wasm.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"a.html": 552,
33
"a.html.gz": 373,
4-
"a.js": 7255,
5-
"a.js.gz": 3313,
4+
"a.js": 7256,
5+
"a.js.gz": 3320,
66
"a.wasm": 7294,
77
"a.wasm.gz": 3339,
8-
"total": 15101,
9-
"total_gz": 7025
8+
"total": 15102,
9+
"total_gz": 7032
1010
}

test/code_size/embind_val_wasm.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"a.html": 552,
33
"a.html.gz": 373,
4-
"a.js": 5356,
5-
"a.js.gz": 2526,
4+
"a.js": 5361,
5+
"a.js.gz": 2523,
66
"a.wasm": 7468,
77
"a.wasm.gz": 3461,
8-
"total": 13376,
9-
"total_gz": 6360
8+
"total": 13381,
9+
"total_gz": 6357
1010
}

test/code_size/hello_wasm_worker_wasm.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var b = Module, c = "em-ww" == globalThis.name, e, f, l, x, y, z;
1+
var b = Module, c = globalThis.name == "em-ww", e, f, l, x, y, z;
22

33
c && (onmessage = a => {
44
onmessage = null;
@@ -8,7 +8,7 @@ c && (onmessage = a => {
88
b ||= {};
99
b.wasm = a.j;
1010
h();
11-
a.j = a.s = 0;
11+
a.j = a.u = 0;
1212
});
1313

1414
function g() {}
@@ -30,7 +30,7 @@ var k = [], n = a => {
3030
name: "em-ww"
3131
});
3232
m.postMessage({
33-
u: r,
33+
v: r,
3434
j: b.wasm,
3535
o: f,
3636
l: a,

test/code_size/hello_wasm_worker_wasm.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"a.html": 519,
33
"a.html.gz": 357,
44
"a.js": 830,
5-
"a.js.gz": 525,
5+
"a.js.gz": 524,
66
"a.wasm": 1885,
77
"a.wasm.gz": 1072,
88
"total": 3234,
9-
"total_gz": 1954
9+
"total_gz": 1953
1010
}

test/code_size/hello_webgl2_wasm.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"a.html": 454,
33
"a.html.gz": 321,
44
"a.js": 4386,
5-
"a.js.gz": 2247,
5+
"a.js.gz": 2250,
66
"a.wasm": 8278,
77
"a.wasm.gz": 5620,
88
"total": 13118,
9-
"total_gz": 8188
9+
"total_gz": 8191
1010
}

0 commit comments

Comments
 (0)