@@ -514,7 +514,7 @@ ChainedHashTable<IsGlobal>::~ChainedHashTable()
514
514
Var<Ptr<void >> bucket_it (Ptr<void >(*it.to <uint32_t *>()));
515
515
WHILE (not bucket_it.is_nullptr ()) { // another entry in collision list
516
516
const Var<Ptr<void >> tmp (bucket_it);
517
- bucket_it = Ptr<void >(*(bucket_it + ptr_offset_in_bytes_).to <uint32_t *>());
517
+ bucket_it = Ptr<void >(*(bucket_it + ptr_offset_in_bytes_).template to <uint32_t *>());
518
518
Module::Allocator ().deallocate (tmp, entry_size_in_bytes_);
519
519
}
520
520
it += int32_t (sizeof (uint32_t ));
@@ -605,7 +605,7 @@ void ChainedHashTable<IsGlobal>::teardown()
605
605
Var<Ptr<void >> bucket_it (Ptr<void >(*it.to <uint32_t *>()));
606
606
WHILE (not bucket_it.is_nullptr ()) { // another entry in collision list
607
607
const Var<Ptr<void >> tmp (bucket_it);
608
- bucket_it = Ptr<void >(*(bucket_it + ptr_offset_in_bytes_).to <uint32_t *>());
608
+ bucket_it = Ptr<void >(*(bucket_it + ptr_offset_in_bytes_).template to <uint32_t *>());
609
609
Module::Allocator ().deallocate (tmp, entry_size_in_bytes_);
610
610
}
611
611
it += int32_t (sizeof (uint32_t ));
@@ -662,7 +662,7 @@ void ChainedHashTable<IsGlobal>::clear()
662
662
Module::Allocator().deallocate(tmp, entry_size_in_bytes_); // free collision list entry
663
663
}
664
664
#endif
665
- *(it + ptr_offset_in_bytes_).to <uint32_t *>() = 0U ; // set to nullptr
665
+ *(it + ptr_offset_in_bytes_).template to <uint32_t *>() = 0U ; // set to nullptr
666
666
it += int32_t (sizeof (uint32_t ));
667
667
}
668
668
}
@@ -732,7 +732,7 @@ HashTable::entry_t ChainedHashTable<IsGlobal>::emplace_without_rehashing(std::ve
732
732
Var<Ptr<void >> entry = Module::Allocator ().allocate (entry_size_in_bytes_, entry_max_alignment_in_bytes_);
733
733
734
734
/* ----- Iff no predication is used or predicate is fulfilled, insert entry at collision list's front. -----*/
735
- *(entry + ptr_offset_in_bytes_).to <uint32_t *>() = *bucket.to <uint32_t *>();
735
+ *(entry + ptr_offset_in_bytes_).template to <uint32_t *>() = *bucket.to <uint32_t *>();
736
736
*bucket.to <uint32_t *>() = pred ? Select (*pred, entry.to <uint32_t >(), *bucket.to <uint32_t *>())
737
737
: entry.to <uint32_t >(); // FIXME: entry memory never freed iff predicate is not fulfilled
738
738
@@ -784,13 +784,15 @@ std::pair<HashTable::entry_t, Boolx1> ChainedHashTable<IsGlobal>::try_emplace(st
784
784
} ELSE {
785
785
LOOP () {
786
786
GOTO (equal_key (bucket_it, clone (key)), insert_entry); // clone key (see above)
787
- const Var<Ptr<void >> next_bucket_it (Ptr<void >(*(bucket_it + ptr_offset_in_bytes_).to <uint32_t *>()));
787
+ const Var<Ptr<void >> next_bucket_it (
788
+ Ptr<void >(*(bucket_it + ptr_offset_in_bytes_).template to <uint32_t *>())
789
+ );
788
790
BREAK (next_bucket_it.is_nullptr ());
789
791
bucket_it = next_bucket_it;
790
792
CONTINUE ();
791
793
}
792
794
};
793
- Wasm_insist (Ptr<void >(*(bucket_it + ptr_offset_in_bytes_).to <uint32_t *>()).is_nullptr ());
795
+ Wasm_insist (Ptr<void >(*(bucket_it + ptr_offset_in_bytes_).template to <uint32_t *>()).is_nullptr ());
794
796
if (pred)
795
797
Wasm_insist (*pred or bucket_it == bucket - ptr_offset_in_bytes_,
796
798
" predication dummy must always contain an empty collision list" );
@@ -802,8 +804,8 @@ std::pair<HashTable::entry_t, Boolx1> ChainedHashTable<IsGlobal>::try_emplace(st
802
804
Var<Ptr<void >> entry = Module::Allocator ().allocate (entry_size_in_bytes_, entry_max_alignment_in_bytes_);
803
805
804
806
/* ----- Iff no predication is used or predicate is fulfilled, insert entry at the collision list's end. -----*/
805
- *(bucket_it + ptr_offset_in_bytes_).to <uint32_t *>() = pred ? Select (*pred, entry.to <uint32_t >(), 0U )
806
- : entry.to <uint32_t >(); // FIXME: entry memory never freed iff predicate is not fulfilled
807
+ *(bucket_it + ptr_offset_in_bytes_).template to <uint32_t *>() = pred ? Select (*pred, entry.to <uint32_t >(), 0U )
808
+ : entry.to <uint32_t >(); // FIXME: entry memory never freed iff predicate is not fulfilled
807
809
808
810
/* ----- Set bucket iterator to inserted entry. -----*/
809
811
bucket_it = entry;
@@ -843,7 +845,7 @@ std::pair<HashTable::entry_t, Boolx1> ChainedHashTable<IsGlobal>::find(std::vect
843
845
Var<Ptr<void >> bucket_it (Ptr<void >(*bucket.to <uint32_t *>()));
844
846
WHILE (not bucket_it.is_nullptr ()) { // another entry in collision list
845
847
BREAK (equal_key (bucket_it, std::move (key))); // move key at last use
846
- bucket_it = Ptr<void >(*(bucket_it + ptr_offset_in_bytes_).to <uint32_t *>());
848
+ bucket_it = Ptr<void >(*(bucket_it + ptr_offset_in_bytes_).template to <uint32_t *>());
847
849
}
848
850
849
851
/* ----- Key is found iff end of collision list is not yet reached. -----*/
@@ -863,7 +865,7 @@ void ChainedHashTable<IsGlobal>::for_each(callback_t Pipeline) const
863
865
Var<Ptr<void >> bucket_it (Ptr<void >(*it.to <uint32_t *>()));
864
866
WHILE (not bucket_it.is_nullptr ()) { // another entry in collision list
865
867
Pipeline (entry (bucket_it));
866
- bucket_it = Ptr<void >(*(bucket_it + ptr_offset_in_bytes_).to <uint32_t *>());
868
+ bucket_it = Ptr<void >(*(bucket_it + ptr_offset_in_bytes_).template to <uint32_t *>());
867
869
}
868
870
it += int32_t (sizeof (uint32_t ));
869
871
}
@@ -899,7 +901,7 @@ void ChainedHashTable<IsGlobal>::for_each_in_equal_range(std::vector<SQL_t> key,
899
901
Pipeline (entry (bucket_it));
900
902
};
901
903
}
902
- bucket_it = Ptr<void >(*(bucket_it + ptr_offset_in_bytes_).to <uint32_t *>());
904
+ bucket_it = Ptr<void >(*(bucket_it + ptr_offset_in_bytes_).template to <uint32_t *>());
903
905
}
904
906
}
905
907
@@ -1207,10 +1209,10 @@ void ChainedHashTable<IsGlobal>::rehash()
1207
1209
const Var<Ptr<void >> bucket (hash_to_bucket (std::move (key)));
1208
1210
1209
1211
/* ----- Store next entry's address in old collision list (since it will be overwritten). -----*/
1210
- const Var<Ptr<void >> tmp (Ptr<void >(*(bucket_it + ptr_offset_in_bytes_).to <uint32_t *>()));
1212
+ const Var<Ptr<void >> tmp (Ptr<void >(*(bucket_it + ptr_offset_in_bytes_).template to <uint32_t *>()));
1211
1213
1212
1214
/* ----- Insert old entry at new collision list's front. No reallocation of the entry is needed. -----*/
1213
- *(bucket_it + ptr_offset_in_bytes_).to <uint32_t *>() = *bucket.to <uint32_t *>();
1215
+ *(bucket_it + ptr_offset_in_bytes_).template to <uint32_t *>() = *bucket.to <uint32_t *>();
1214
1216
*bucket.to <uint32_t *>() = bucket_it.to <uint32_t >();
1215
1217
1216
1218
/* ----- Advance to next entry in old collision list. -----*/
0 commit comments