@@ -368,13 +368,11 @@ function addMissingLibraryStubs(unusedLibSymbols) {
368368
369369// export parts of the JS runtime that the user asked for
370370function exportRuntime ( ) {
371- const EXPORTED_RUNTIME_METHODS_SET = new Set ( EXPORTED_RUNTIME_METHODS ) ;
372-
373371 // optionally export something.
374372 function maybeExport ( name ) {
375373 // If requested to be exported, export it. HEAP objects are exported
376374 // separately in updateMemoryViews
377- if ( EXPORTED_RUNTIME_METHODS_SET . has ( name ) && ! name . startsWith ( 'HEAP' ) ) {
375+ if ( EXPORTED_RUNTIME_METHODS . has ( name ) && ! name . startsWith ( 'HEAP' ) ) {
378376 return `Module['${ name } '] = ${ name } ;` ;
379377 }
380378 }
@@ -449,7 +447,7 @@ function exportRuntime() {
449447 // dynCall_* methods are not hardcoded here, as they
450448 // depend on the file being compiled. check for them
451449 // and add them.
452- for ( const name of EXPORTED_RUNTIME_METHODS_SET ) {
450+ for ( const name of EXPORTED_RUNTIME_METHODS ) {
453451 if ( / ^ d y n C a l l _ / . test ( name ) ) {
454452 // a specific dynCall; add to the list
455453 runtimeElements . push ( name ) ;
@@ -472,7 +470,7 @@ function exportRuntime() {
472470
473471 // check all exported things exist, warn about typos
474472 runtimeElementsSet = new Set ( runtimeElements ) ;
475- for ( const name of EXPORTED_RUNTIME_METHODS_SET ) {
473+ for ( const name of EXPORTED_RUNTIME_METHODS ) {
476474 if ( ! runtimeElementsSet . has ( name ) ) {
477475 warn ( `invalid item in EXPORTED_RUNTIME_METHODS: ${ name } ` ) ;
478476 }
@@ -491,7 +489,7 @@ function exportRuntime() {
491489
492490 const unexported = [ ] ;
493491 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 ) ) {
495493 unexported . push ( name ) ;
496494 }
497495 }
0 commit comments