@@ -775,10 +775,10 @@ var LibraryEmbind = {
775
775
var isClassMethodFunc = ( argTypes [ 1 ] !== null && classType !== null ) ;
776
776
777
777
// Free functions with signature "void function()" do not need an invoker that marshalls between wire types.
778
- // TODO: This omits argument count check - enable only at -O3 or similar.
779
- // if (ENABLE_UNSAFE_OPTS && argCount == 2 && argTypes[0].name == "void" && !isClassMethodFunc) {
780
- // return FUNCTION_TABLE[fn];
781
- // }
778
+ // TODO: This omits argument count check - enable only at -O3 or similar.
779
+ // if (ENABLE_UNSAFE_OPTS && argCount == 2 && argTypes[0].name == "void" && !isClassMethodFunc) {
780
+ // return FUNCTION_TABLE[fn];
781
+ // }
782
782
783
783
784
784
// Determine if we need to use a dynamic stack to store the destructors for the function parameters.
@@ -851,36 +851,36 @@ var LibraryEmbind = {
851
851
return onDone ( rv ) ;
852
852
} ;
853
853
#else
854
- // Builld the arguments that will be passed into the closure around the invoker
855
- // function.
856
- var closureArgs = [ humanName , throwBindingError , cppInvokerFunc , cppTargetFunc , runDestructors , argTypes [ 0 ] , argTypes [ 1 ] ] ;
854
+ // Builld the arguments that will be passed into the closure around the invoker
855
+ // function.
856
+ var closureArgs = [ humanName , throwBindingError , cppInvokerFunc , cppTargetFunc , runDestructors , argTypes [ 0 ] , argTypes [ 1 ] ] ;
857
857
#if EMSCRIPTEN_TRACING
858
- closureArgs . push ( Module ) ;
858
+ closureArgs . push ( Module ) ;
859
859
#endif
860
- for ( var i = 0 ; i < argCount - 2 ; ++ i ) {
861
- closureArgs . push ( argTypes [ i + 2 ] ) ;
862
- }
860
+ for ( var i = 0 ; i < argCount - 2 ; ++ i ) {
861
+ closureArgs . push ( argTypes [ i + 2 ] ) ;
862
+ }
863
863
#if ASYNCIFY == 1
864
- closureArgs . push ( Asyncify ) ;
864
+ closureArgs . push ( Asyncify ) ;
865
865
#endif
866
- if ( ! needsDestructorStack ) {
867
- for ( var i = isClassMethodFunc ?1 :2 ; i < argTypes . length ; ++ i ) { // Skip return value at index 0 - it's not deleted here. Also skip class type if not a method.
868
- if ( argTypes [ i ] . destructorFunction !== null ) {
869
- closureArgs . push ( argTypes [ i ] . destructorFunction ) ;
866
+ if ( ! needsDestructorStack ) {
867
+ for ( var i = isClassMethodFunc ?1 :2 ; i < argTypes . length ; ++ i ) { // Skip return value at index 0 - it's not deleted here. Also skip class type if not a method.
868
+ if ( argTypes [ i ] . destructorFunction !== null ) {
869
+ closureArgs . push ( argTypes [ i ] . destructorFunction ) ;
870
+ }
870
871
}
871
872
}
872
- }
873
873
#if ASSERTIONS
874
- closureArgs . push ( checkArgCount , minArgs , expectedArgCount ) ;
874
+ closureArgs . push ( checkArgCount , minArgs , expectedArgCount ) ;
875
875
#endif
876
876
877
877
#if EMBIND_AOT
878
- var signature = createJsInvokerSignature ( argTypes , isClassMethodFunc , returns , isAsync ) ;
879
- var invokerFn = InvokerFunctions [ signature ] ( ...closureArgs ) ;
878
+ var signature = createJsInvokerSignature ( argTypes , isClassMethodFunc , returns , isAsync ) ;
879
+ var invokerFn = InvokerFunctions [ signature ] ( ...closureArgs ) ;
880
880
#else
881
- let [ args , invokerFnBody ] = createJsInvoker ( argTypes , isClassMethodFunc , returns , isAsync ) ;
882
- args . push ( invokerFnBody ) ;
883
- var invokerFn = newFunc ( Function , args ) ( ...closureArgs ) ;
881
+ let [ args , invokerFnBody ] = createJsInvoker ( argTypes , isClassMethodFunc , returns , isAsync ) ;
882
+ args . push ( invokerFnBody ) ;
883
+ var invokerFn = newFunc ( Function , args ) ( ...closureArgs ) ;
884
884
#endif
885
885
#endif
886
886
return createNamedFunction ( humanName , invokerFn ) ;
0 commit comments