@@ -393,13 +393,12 @@ addToLibrary({
393393 // Used to implement the native `abort` symbol. Note that we use the
394394 // JavaScript `abort` helper in order to implement this function, but we use a
395395 // distinct name here to avoid confusing the two.
396- _abort_js : ( ) => {
396+ _abort_js : ( ) =>
397397#if ASSERTIONS
398- abort ( 'native code called abort()' ) ;
398+ abort ( 'native code called abort()' ) ,
399399#else
400- abort ( '' ) ;
400+ abort ( '' ) ,
401401#endif
402- } ,
403402#endif
404403
405404 // This object can be modified by the user during startup, which affects
@@ -443,9 +442,8 @@ addToLibrary({
443442 // assert.h
444443 // ==========================================================================
445444
446- __assert_fail : ( condition , filename , line , func ) = > {
447- abort ( `Assertion failed: ${ UTF8ToString ( condition ) } , at: ` + [ filename ? UTF8ToString ( filename ) : 'unknown filename' , line , func ? UTF8ToString ( func ) : 'unknown function' ] ) ;
448- } ,
445+ __assert_fail : ( condition , filename , line , func ) = >
446+ abort ( `Assertion failed: ${ UTF8ToString ( condition ) } , at: ` + [ filename ? UTF8ToString ( filename ) : 'unknown filename' , line , func ? UTF8ToString ( func ) : 'unknown function' ] ) ,
449447#endif
450448
451449#if STACK_OVERFLOW_CHECK >= 2
@@ -662,9 +660,7 @@ addToLibrary({
662660 $strError : ( errno ) => errno + '' ,
663661#else
664662 $strError__deps : [ 'strerror' , '$UTF8ToString' ] ,
665- $strError : ( errno ) => {
666- return UTF8ToString ( _strerror ( errno ) ) ;
667- } ,
663+ $strError : ( errno ) => UTF8ToString ( _strerror ( errno ) ) ,
668664#endif
669665
670666#if PROXY_POSIX_SOCKETS == 0
@@ -681,9 +677,8 @@ addToLibrary({
681677 }
682678 return ( b [ 0 ] | ( b [ 1 ] << 8 ) | ( b [ 2 ] << 16 ) | ( b [ 3 ] << 24 ) ) >>> 0 ;
683679 } ,
684- $inetNtop4 : ( addr ) => {
685- return ( addr & 0xff ) + '.' + ( ( addr >> 8 ) & 0xff ) + '.' + ( ( addr >> 16 ) & 0xff ) + '.' + ( ( addr >> 24 ) & 0xff )
686- } ,
680+ $inetNtop4 : ( addr ) =>
681+ ( addr & 0xff ) + '.' + ( ( addr >> 8 ) & 0xff ) + '.' + ( ( addr >> 16 ) & 0xff ) + '.' + ( ( addr >> 24 ) & 0xff ) ,
687682 $inetPton6__deps : [ 'htons' , '$jstoi_q' ] ,
688683 $inetPton6 : ( str ) => {
689684 var words ;
@@ -1743,18 +1738,18 @@ addToLibrary({
17431738 } ,
17441739#endif
17451740
1746- $getExecutableName : ( ) = > {
17471741#if MINIMAL_RUNTIME // MINIMAL_RUNTIME does not have a global runtime variable thisProgram
1742+ $getExecutableName : ( ) = > {
17481743#if ENVIRONMENT_MAY_BE_NODE
17491744 if ( ENVIRONMENT_IS_NODE && process . argv . length > 1 ) {
17501745 return process . argv [ 1 ] . replace ( / \\ / g, '/' ) ;
17511746 }
17521747#endif
17531748 return "./this.program" ;
1749+ } ,
17541750#else
1755- return thisProgram || './this.program' ;
1751+ $getExecutableName : ( ) => thisProgram || './this.program' ,
17561752#endif
1757- } ,
17581753
17591754 $listenOnce : ( object , event , func ) => {
17601755#if MIN_CHROME_VERSION < 55 || MIN_FIREFOX_VERSION < 50 // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
@@ -1999,9 +1994,7 @@ addToLibrary({
19991994 // Use program_invocation_short_name and program_invocation_name in compiled
20001995 // programs. This function is for implementing them.
20011996 _emscripten_get_progname__deps : [ '$getExecutableName' , '$stringToUTF8' ] ,
2002- _emscripten_get_progname : ( str , len ) = > {
2003- stringToUTF8 ( getExecutableName ( ) , str , len ) ;
2004- } ,
1997+ _emscripten_get_progname : ( str , len ) = > stringToUTF8 ( getExecutableName ( ) , str , len ) ,
20051998
20061999 emscripten_console_log : ( str ) = > {
20072000#if ASSERTIONS
0 commit comments