From 0c20d9f427b63a6fdc354bb917c11f382068eaec Mon Sep 17 00:00:00 2001 From: Max Graey Date: Tue, 10 Nov 2020 21:41:22 +0200 Subject: Canonicalize subtraction with constant on the right to addition (#3321) Using addition in more places is better for gzip, and helps simplify the optimizer as well. Add a FinalOptimizer phase to do optimizations like our signed LEB tweaks, to reduce binary size in the rare case when we do want a subtraction. --- test/wasm2js/emscripten.2asm.js.opt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/wasm2js/emscripten.2asm.js.opt') diff --git a/test/wasm2js/emscripten.2asm.js.opt b/test/wasm2js/emscripten.2asm.js.opt index 0e438f81d..05ecfea7d 100644 --- a/test/wasm2js/emscripten.2asm.js.opt +++ b/test/wasm2js/emscripten.2asm.js.opt @@ -201,7 +201,7 @@ for (var base64ReverseLookup = new Uint8Array(123/*'z'+1*/), i = 25; i >= 0; --i if (j < end) uint8Array[j++] = b1 << 4 | b2 >> 2; if (j < end) uint8Array[j++] = b2 << 6 | base64ReverseLookup[b64.charCodeAt(i+3)]; } - return uint8Array; + return uint8Array; } base64DecodeToExistingUint8Array(bufferView, 1024, "aGVsbG8sIHdvcmxkIQoAAJwMAAAtKyAgIDBYMHgAKG51bGwp"); base64DecodeToExistingUint8Array(bufferView, 1072, "EQAKABEREQAAAAAFAAAAAAAACQAAAAALAAAAAAAAAAARAA8KERERAwoHAAETCQsLAAAJBgsAAAsABhEAAAARERE="); -- cgit v1.2.3