@@ -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 ;
@@ -1724,9 +1719,7 @@ addToLibrary({
17241719 return ___cxa_throw ( ex , 0 , 0 ) ;
17251720 } ,
17261721
1727- _Unwind_DeleteException : ( ex ) => {
1728- err ( 'TODO: Unwind_DeleteException' ) ;
1729- } ,
1722+ _Unwind_DeleteException : ( ex ) => err ( 'TODO: Unwind_DeleteException' ) ,
17301723#endif
17311724
17321725 // special runtime support
@@ -1743,29 +1736,28 @@ addToLibrary({
17431736 } ,
17441737#endif
17451738
1746- $getExecutableName : ( ) = > {
17471739#if MINIMAL_RUNTIME // MINIMAL_RUNTIME does not have a global runtime variable thisProgram
1740+ $getExecutableName : ( ) = > {
17481741#if ENVIRONMENT_MAY_BE_NODE
17491742 if ( ENVIRONMENT_IS_NODE && process . argv . length > 1 ) {
17501743 return process . argv [ 1 ] . replace ( / \\ / g, '/' ) ;
17511744 }
17521745#endif
17531746 return "./this.program" ;
1747+ } ,
17541748#else
1755- return thisProgram || './this.program' ;
1749+ $getExecutableName : ( ) => thisProgram || './this.program' ,
17561750#endif
1757- } ,
17581751
1759- $listenOnce : ( object , event , func ) => {
1752+ $listenOnce : ( object , event , func ) =>
17601753#if MIN_CHROME_VERSION < 55 || MIN_FIREFOX_VERSION < 50 // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
17611754 object . addEventListener ( event , function handler ( ) {
17621755 func ( ) ;
17631756 object . removeEventListener ( event , handler ) ;
1764- } ) ;
1757+ } ) ,
17651758#else
1766- object . addEventListener ( event , func , { 'once' : true } ) ;
1759+ object . addEventListener ( event , func , { 'once' : true } ) ,
17671760#endif
1768- } ,
17691761
17701762 // Receives a Web Audio context plus a set of elements to listen for user
17711763 // input events on, and registers a context resume() for them. This lets
@@ -1999,9 +1991,7 @@ addToLibrary({
19991991 // Use program_invocation_short_name and program_invocation_name in compiled
20001992 // programs. This function is for implementing them.
20011993 _emscripten_get_progname__deps : [ '$getExecutableName' , '$stringToUTF8' ] ,
2002- _emscripten_get_progname : ( str , len ) = > {
2003- stringToUTF8 ( getExecutableName ( ) , str , len ) ;
2004- } ,
1994+ _emscripten_get_progname : ( str , len ) = > stringToUTF8 ( getExecutableName ( ) , str , len ) ,
20051995
20061996 emscripten_console_log : ( str ) = > {
20071997#if ASSERTIONS
0 commit comments