@@ -368,13 +368,11 @@ function addMissingLibraryStubs(unusedLibSymbols) {
368
368
369
369
// export parts of the JS runtime that the user asked for
370
370
function exportRuntime ( ) {
371
- const EXPORTED_RUNTIME_METHODS_SET = new Set ( EXPORTED_RUNTIME_METHODS ) ;
372
-
373
371
// optionally export something.
374
372
function maybeExport ( name ) {
375
373
// If requested to be exported, export it. HEAP objects are exported
376
374
// separately in updateMemoryViews
377
- if ( EXPORTED_RUNTIME_METHODS_SET . has ( name ) && ! name . startsWith ( 'HEAP' ) ) {
375
+ if ( EXPORTED_RUNTIME_METHODS . has ( name ) && ! name . startsWith ( 'HEAP' ) ) {
378
376
return `Module['${ name } '] = ${ name } ;` ;
379
377
}
380
378
}
@@ -449,7 +447,7 @@ function exportRuntime() {
449
447
// dynCall_* methods are not hardcoded here, as they
450
448
// depend on the file being compiled. check for them
451
449
// and add them.
452
- for ( const name of EXPORTED_RUNTIME_METHODS_SET ) {
450
+ for ( const name of EXPORTED_RUNTIME_METHODS ) {
453
451
if ( / ^ d y n C a l l _ / . test ( name ) ) {
454
452
// a specific dynCall; add to the list
455
453
runtimeElements . push ( name ) ;
@@ -472,7 +470,7 @@ function exportRuntime() {
472
470
473
471
// check all exported things exist, warn about typos
474
472
runtimeElementsSet = new Set ( runtimeElements ) ;
475
- for ( const name of EXPORTED_RUNTIME_METHODS_SET ) {
473
+ for ( const name of EXPORTED_RUNTIME_METHODS ) {
476
474
if ( ! runtimeElementsSet . has ( name ) ) {
477
475
warn ( `invalid item in EXPORTED_RUNTIME_METHODS: ${ name } ` ) ;
478
476
}
@@ -491,7 +489,7 @@ function exportRuntime() {
491
489
492
490
const unexported = [ ] ;
493
491
for ( const name of runtimeElements ) {
494
- if ( ! EXPORTED_RUNTIME_METHODS_SET . has ( name ) && ! unusedLibSymbols . has ( name ) ) {
492
+ if ( ! EXPORTED_RUNTIME_METHODS . has ( name ) && ! unusedLibSymbols . has ( name ) ) {
495
493
unexported . push ( name ) ;
496
494
}
497
495
}
0 commit comments