88var LibraryEmbind = {
99 $UnboundTypeError : class extends Error { } ,
1010 $PureVirtualError : class extends Error { } ,
11- $GenericWireTypeSize : { { { 2 * POINTER_SIZE } } } ,
1211#if EMBIND_AOT
1312 $InvokerFunctions : '<<< EMBIND_AOT_INVOKERS >>>' ,
1413#endif
1514 // If register_type is used, emval will be registered multiple times for
1615 // different type id's, but only a single type object is needed on the JS side
1716 // for all of them. Store the type for reuse.
18- $EmValType__deps : [ '_emval_decref' , '$Emval' , '$readPointer' , '$GenericWireTypeSize' ] ,
17+ $EmValType__deps : [ '_emval_decref' , '$Emval' , '$readPointer' ] ,
1918 $EmValType : `{
2019 name: 'emscripten::val',
2120 'fromWireType': (handle) => {
@@ -24,7 +23,6 @@ var LibraryEmbind = {
2423 return rv;
2524 },
2625 'toWireType': (destructors, value) => Emval.toHandle(value),
27- argPackAdvance: GenericWireTypeSize,
2826 'readValueFromPointer': readPointer,
2927 destructorFunction: null, // This type does not need a destructor
3028
@@ -199,11 +197,6 @@ var LibraryEmbind = {
199197 $registerType__deps : [ '$sharedRegisterType' ] ,
200198 $registerType__docs : '/** @param {Object=} options */' ,
201199 $registerType : function ( rawType , registeredInstance , options = { } ) {
202- #if ASSERTIONS
203- if ( registeredInstance . argPackAdvance === undefined ) {
204- throw new TypeError ( 'registerType registeredInstance requires argPackAdvance' ) ;
205- }
206- #endif
207200 return sharedRegisterType ( rawType , registeredInstance , options ) ;
208201 } ,
209202
@@ -213,15 +206,14 @@ var LibraryEmbind = {
213206 registerType ( rawType , {
214207 isVoid : true , // void return values can be optimized out sometimes
215208 name,
216- argPackAdvance : 0 ,
217209 'fromWireType' : ( ) => undefined ,
218210 // TODO: assert if anything else is given?
219211 'toWireType' : ( destructors , o ) => undefined ,
220212 } ) ;
221213 } ,
222214
223215 _embind_register_bool__docs : '/** @suppress {globalThis} */' ,
224- _embind_register_bool__deps : [ '$AsciiToString' , '$registerType' , '$GenericWireTypeSize' ] ,
216+ _embind_register_bool__deps : [ '$AsciiToString' , '$registerType' ] ,
225217 _embind_register_bool : ( rawType , name , trueValue , falseValue ) => {
226218 name = AsciiToString ( name ) ;
227219 registerType ( rawType , {
@@ -234,7 +226,6 @@ var LibraryEmbind = {
234226 'toWireType' : function ( destructors , o ) {
235227 return o ? trueValue : falseValue ;
236228 } ,
237- argPackAdvance : GenericWireTypeSize ,
238229 'readValueFromPointer' : function ( pointer ) {
239230 return this [ 'fromWireType' ] ( HEAPU8 [ pointer ] ) ;
240231 } ,
@@ -341,7 +332,6 @@ var LibraryEmbind = {
341332 // https://www.w3.org/TR/wasm-js-api-1/#towebassemblyvalue
342333 return value ;
343334 } ,
344- argPackAdvance : GenericWireTypeSize ,
345335 'readValueFromPointer' : integerReadValueFromPointer ( name , size , minRange !== 0 ) ,
346336 destructorFunction : null , // This type does not need a destructor
347337 } ) ;
@@ -393,7 +383,6 @@ var LibraryEmbind = {
393383#endif
394384 return value ;
395385 } ,
396- argPackAdvance : GenericWireTypeSize ,
397386 'readValueFromPointer' : integerReadValueFromPointer ( name , size , ! isUnsignedType ) ,
398387 destructorFunction : null , // This type does not need a destructor
399388 } ) ;
@@ -424,7 +413,6 @@ var LibraryEmbind = {
424413 // https://www.w3.org/TR/wasm-js-api-1/#towebassemblyvalue
425414 return value ;
426415 } ,
427- argPackAdvance : GenericWireTypeSize ,
428416 'readValueFromPointer' : floatReadValueFromPointer ( name , size ) ,
429417 destructorFunction : null , // This type does not need a destructor
430418 } ) ;
@@ -514,7 +502,6 @@ var LibraryEmbind = {
514502 }
515503 return base ;
516504 } ,
517- argPackAdvance : GenericWireTypeSize ,
518505 'readValueFromPointer' : readPointer ,
519506 destructorFunction ( ptr ) {
520507 _free( ptr ) ;
@@ -570,7 +557,6 @@ var LibraryEmbind = {
570557 }
571558 return ptr ;
572559 } ,
573- argPackAdvance : GenericWireTypeSize ,
574560 'readValueFromPointer' : readPointer ,
575561 destructorFunction ( ptr ) {
576562 _free ( ptr ) ;
@@ -621,7 +607,6 @@ var LibraryEmbind = {
621607 registerType ( rawType , {
622608 name,
623609 'fromWireType' : decodeMemoryView ,
624- argPackAdvance : GenericWireTypeSize ,
625610 'readValueFromPointer' : decodeMemoryView ,
626611 } , {
627612 ignoreDuplicateRegistrations : true ,
@@ -949,7 +934,6 @@ var LibraryEmbind = {
949934 }
950935 return ptr ;
951936 } ,
952- argPackAdvance : GenericWireTypeSize ,
953937 'readValueFromPointer' : readPointer ,
954938 destructorFunction : rawDestructor ,
955939 } ] ;
@@ -1060,7 +1044,6 @@ var LibraryEmbind = {
10601044 }
10611045 return ptr ;
10621046 } ,
1063- argPackAdvance : GenericWireTypeSize ,
10641047 'readValueFromPointer' : readPointer ,
10651048 destructorFunction : rawDestructor ,
10661049 } ] ;
@@ -1196,7 +1179,6 @@ var LibraryEmbind = {
11961179 '$RegisteredPointer' ,
11971180 '$readPointer' ,
11981181 '$RegisteredPointer_fromWireType' ,
1199- '$GenericWireTypeSize' ,
12001182 ] ,
12011183 $init_RegisteredPointer : ( ) = > {
12021184 Object . assign ( RegisteredPointer . prototype , {
@@ -1209,7 +1191,6 @@ var LibraryEmbind = {
12091191 destructor ( ptr ) {
12101192 this . rawDestructor ?. ( ptr ) ;
12111193 } ,
1212- argPackAdvance : GenericWireTypeSize ,
12131194 'readValueFromPointer' : readPointer ,
12141195 'fromWireType' : RegisteredPointer_fromWireType ,
12151196 } ) ;
@@ -2233,7 +2214,6 @@ var LibraryEmbind = {
22332214 return this . constructor . values [ c ] ;
22342215 } ,
22352216 'toWireType' : ( destructors , c ) => c . value ,
2236- argPackAdvance : GenericWireTypeSize ,
22372217 'readValueFromPointer' : enumReadValueFromPointer ( name , size , isSigned ) ,
22382218 destructorFunction : null ,
22392219 } ) ;
0 commit comments