Skip to content

Commit 9a6d9c7

Browse files
committed
rename to externalExports
1 parent 9cf25b1 commit 9a6d9c7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/wasm/WebAssemblyGenerator.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,14 +258,14 @@ const rewriteImportedGlobals = state => bin => {
258258
* @param {Object} state state
259259
* @param {Object} state.ast Module's ast
260260
* @param {Module} state.module Module
261-
* @param {Set<string>} state.invalidExports Module
261+
* @param {Set<string>} state.externalExports Module
262262
* @returns {ArrayBufferTransform} transform
263263
*/
264-
const rewriteExportNames = ({ ast, module, invalidExports }) => bin => {
264+
const rewriteExportNames = ({ ast, module, externalExports }) => bin => {
265265
return editWithAST(ast, bin, {
266266
ModuleExport(path) {
267-
const isInvalid = invalidExports.has(path.node.name);
268-
if (isInvalid) {
267+
const isExternal = externalExports.has(path.node.name);
268+
if (isExternal) {
269269
path.remove();
270270
return;
271271
}
@@ -413,7 +413,7 @@ class WebAssemblyGenerator extends Generator {
413413
const nextTypeIndex = getNextTypeIndex(ast);
414414

415415
const usedDependencyMap = getUsedDependencyMap(module);
416-
const invalidExports = new Set(
416+
const externalExports = new Set(
417417
module.dependencies
418418
.filter(d => d instanceof WebAssemblyExportImportedDependency)
419419
.map(d => d.exportName)
@@ -426,7 +426,7 @@ class WebAssemblyGenerator extends Generator {
426426
rewriteExportNames({
427427
ast,
428428
module,
429-
invalidExports
429+
externalExports
430430
}),
431431

432432
removeStartFunc({ ast }),

0 commit comments

Comments
 (0)