@@ -371,23 +371,11 @@ function exportRuntime() {
371
371
const EXPORTED_RUNTIME_METHODS_SET = new Set ( EXPORTED_RUNTIME_METHODS ) ;
372
372
373
373
// optionally export something.
374
- // in ASSERTIONS mode we show a useful error if it is used without
375
- // being exported. how we show the message depends on whether it's
376
- // a function (almost all of them) or a number.
377
374
function maybeExport ( name ) {
378
- // HEAP objects are exported separately in updateMemoryViews
379
- if ( name . startsWith ( 'HEAP' ) ) {
380
- return ;
381
- }
382
- // if requested to be exported, export it
383
- if ( EXPORTED_RUNTIME_METHODS_SET . has ( name ) ) {
384
- let exported = name ;
385
- // the exported name may differ from the internal name
386
- if ( exported . startsWith ( 'FS_' ) ) {
387
- // this is a filesystem value, FS.x exported as FS_x
388
- exported = 'FS.' + exported . substr ( 3 ) ;
389
- }
390
- return `Module['${ name } '] = ${ exported } ;` ;
375
+ // If requested to be exported, export it. HEAP objects are exported
376
+ // separately in updateMemoryViews
377
+ if ( EXPORTED_RUNTIME_METHODS_SET . has ( name ) && ! name . startsWith ( 'HEAP' ) ) {
378
+ return `Module['${ name } '] = ${ name } ;` ;
391
379
}
392
380
}
393
381
@@ -401,12 +389,6 @@ function exportRuntime() {
401
389
'addOnPostRun' ,
402
390
'addRunDependency' ,
403
391
'removeRunDependency' ,
404
- 'FS_createFolder' ,
405
- 'FS_createPath' ,
406
- 'FS_createLazyFile' ,
407
- 'FS_createLink' ,
408
- 'FS_createDevice' ,
409
- 'FS_readFile' ,
410
392
'out' ,
411
393
'err' ,
412
394
'callMain' ,
@@ -500,6 +482,8 @@ function exportRuntime() {
500
482
const results = exports . filter ( ( name ) => name ) ;
501
483
502
484
if ( ASSERTIONS && ! EXPORT_ALL ) {
485
+ // in ASSERTIONS mode we show a useful error if it is used without being
486
+ // exported. See `unexportedRuntimeSymbol` in runtime_debug.js.
503
487
const unusedLibSymbols = getUnusedLibrarySymbols ( ) ;
504
488
if ( unusedLibSymbols . size ) {
505
489
results . push ( addMissingLibraryStubs ( unusedLibSymbols ) ) ;
0 commit comments