@@ -1344,7 +1344,7 @@ impl Module {
1344
1344
1345
1345
// Returns the index to the translated type in the to-be type section, and the reference to
1346
1346
// the type itself.
1347
- let mut make_func_type = |parsed_sig_idx : u32 | {
1347
+ let mut make_func_type = |module : & Self , parsed_sig_idx : u32 | {
1348
1348
let serialized_sig_idx = match available_types. get_mut ( parsed_sig_idx as usize ) {
1349
1349
None => panic ! ( "signature index refers to a type out of bounds" ) ,
1350
1350
Some ( ( _, Some ( idx) ) ) => * idx as usize ,
@@ -1367,8 +1367,7 @@ impl Module {
1367
1367
. collect ( ) ,
1368
1368
} ) ;
1369
1369
index_store. replace ( new_index as u32 ) ;
1370
- let shared =
1371
- self . config . shared_everything_threads_enabled && u. arbitrary ( ) . ok ( ) ?;
1370
+ let shared = module. arbitrary_shared ( u) . ok ( ) ?;
1372
1371
new_types. push ( SubType {
1373
1372
is_final : true ,
1374
1373
supertype : None ,
@@ -1392,7 +1391,7 @@ impl Module {
1392
1391
wasmparser:: TypeRef :: Func ( sig_idx) => {
1393
1392
if self . funcs . len ( ) >= self . config . max_funcs {
1394
1393
continue ;
1395
- } else if let Some ( ( sig_idx, func_type) ) = make_func_type ( * sig_idx) {
1394
+ } else if let Some ( ( sig_idx, func_type) ) = make_func_type ( & self , * sig_idx) {
1396
1395
let entity = EntityType :: Func ( sig_idx as u32 , Rc :: clone ( & func_type) ) ;
1397
1396
if type_size_budget < entity. size ( ) {
1398
1397
continue ;
@@ -1408,7 +1407,8 @@ impl Module {
1408
1407
let can_add_tag = self . tags . len ( ) < self . config . max_tags ;
1409
1408
if !self . config . exceptions_enabled || !can_add_tag {
1410
1409
continue ;
1411
- } else if let Some ( ( sig_idx, func_type) ) = make_func_type ( * func_type_idx) {
1410
+ } else if let Some ( ( sig_idx, func_type) ) = make_func_type ( & self , * func_type_idx)
1411
+ {
1412
1412
let tag_type = TagType {
1413
1413
func_type_idx : sig_idx,
1414
1414
func_type,
0 commit comments