From 1def21c9d1fcb70d810ad488479b67a711559c5d Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Mon, 11 Mar 2024 08:56:50 -0700 Subject: [PATCH] Remove unused genArgSequence and needsQuoting. NFC The usage of genArgSequence removed in #17420. The usage of needsQuoting was removed in #17462 --- src/modules.js | 9 --------- src/parseTools.js | 7 ------- 2 files changed, 16 deletions(-) diff --git a/src/modules.js b/src/modules.js index 20202bd0e42c..65e2d3990dd5 100644 --- a/src/modules.js +++ b/src/modules.js @@ -8,15 +8,6 @@ // Various namespace-like modules -// Constructs an array ['a0', 'a1', 'a2', ..., 'a(n-1)'] -function genArgSequence(n) { - const args = []; - for (let i = 0; i < n; ++i) { - args.push('a' + i); - } - return args; -} - // List of symbols that were added from the library. globalThis.librarySymbols = []; diff --git a/src/parseTools.js b/src/parseTools.js index fa89005f0c65..eacd9cc50cc6 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -167,13 +167,6 @@ function isNiceIdent(ident, loose) { return /^\(?[$_]+[\w$_\d ]*\)?$/.test(ident); } -// Simple variables or numbers, or things already quoted, do not need to be quoted -function needsQuoting(ident) { - if (/^[-+]?[$_]?[\w$_\d]*$/.test(ident)) return false; // number or variable - if (ident[0] === '(' && ident[ident.length - 1] === ')' && ident.indexOf('(', 1) < 0) return false; // already fully quoted - return true; -} - globalThis.POINTER_SIZE = MEMORY64 ? 8 : 4; globalThis.POINTER_MAX = MEMORY64 ? 'Number.MAX_SAFE_INTEGER' : '0xFFFFFFFF'; globalThis.STACK_ALIGN = 16;