@@ -1653,8 +1653,11 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor<ASRToLLVMVisitor>
1653
1653
this ->visit_expr (*x.m_left );
1654
1654
llvm::Value *left = tmp;
1655
1655
ptr_loads = ptr_loads_copy;
1656
+ llvm::Value *capacity = LLVM::CreateLoad (*builder,
1657
+ llvm_utils->dict_api ->get_pointer_to_capacity (right));
1658
+ llvm::Value *key_hash = llvm_utils->dict_api ->get_key_hash (capacity, left, dict_type->m_key_type , *module );
1656
1659
1657
- tmp = llvm_utils->dict_api ->is_key_present (right, left, dict_type , *module );
1660
+ tmp = llvm_utils->dict_api ->resolve_collision_for_read_with_bound_check (right, key_hash, left , *module , dict_type-> m_key_type , dict_type-> m_value_type , true );
1658
1661
}
1659
1662
1660
1663
void visit_SetContains (const ASR::SetContains_t &x) {
@@ -1672,8 +1675,11 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor<ASRToLLVMVisitor>
1672
1675
this ->visit_expr (*x.m_left );
1673
1676
llvm::Value *left = tmp;
1674
1677
ptr_loads = ptr_loads_copy;
1678
+ llvm::Value *capacity = LLVM::CreateLoad (*builder,
1679
+ llvm_utils->set_api ->get_pointer_to_capacity (right));
1680
+ llvm::Value *el_hash = llvm_utils->set_api ->get_el_hash (capacity, left, el_type, *module );
1675
1681
1676
- tmp = llvm_utils->set_api ->is_el_present (right, left, *module , el_type);
1682
+ tmp = llvm_utils->set_api ->resolve_collision_for_read_with_bound_check (right, el_hash, left, *module , el_type, false , true );
1677
1683
}
1678
1684
1679
1685
void visit_DictLen (const ASR::DictLen_t& x) {
0 commit comments