78
78
from mypyc .irbuild .targets import AssignmentTarget
79
79
from mypyc .primitives .dict_ops import (
80
80
dict_new_op ,
81
- true_dict_get_method_with_none ,
82
- true_dict_set_item_op ,
81
+ exact_dict_get_method_with_none ,
82
+ exact_dict_set_item_op ,
83
83
)
84
84
from mypyc .primitives .generic_ops import py_setattr_op
85
85
from mypyc .primitives .misc_ops import register_function
@@ -128,7 +128,7 @@ def transform_decorator(builder: IRBuilder, dec: Decorator) -> None:
128
128
if decorated_func is not None :
129
129
# Set the callable object representing the decorated function as a global.
130
130
builder .primitive_op (
131
- true_dict_set_item_op ,
131
+ exact_dict_set_item_op ,
132
132
[builder .load_globals_dict (), builder .load_str (dec .func .name ), decorated_func ],
133
133
decorated_func .line ,
134
134
)
@@ -805,7 +805,7 @@ def generate_singledispatch_dispatch_function(
805
805
)
806
806
call_find_impl , use_cache , call_func = BasicBlock (), BasicBlock (), BasicBlock ()
807
807
get_result = builder .primitive_op (
808
- true_dict_get_method_with_none , [dispatch_cache , arg_type ], line
808
+ exact_dict_get_method_with_none , [dispatch_cache , arg_type ], line
809
809
)
810
810
is_not_none = builder .translate_is_op (get_result , builder .none_object (), "is not" , line )
811
811
impl_to_use = Register (object_rprimitive )
@@ -819,7 +819,7 @@ def generate_singledispatch_dispatch_function(
819
819
find_impl = builder .load_module_attr_by_fullname ("functools._find_impl" , line )
820
820
registry = load_singledispatch_registry (builder , dispatch_func_obj , line )
821
821
uncached_impl = builder .py_call (find_impl , [arg_type , registry ], line )
822
- builder .primitive_op (true_dict_set_item_op , [dispatch_cache , arg_type , uncached_impl ], line )
822
+ builder .primitive_op (exact_dict_set_item_op , [dispatch_cache , arg_type , uncached_impl ], line )
823
823
builder .assign (impl_to_use , uncached_impl , line )
824
824
builder .goto (call_func )
825
825
@@ -996,7 +996,7 @@ def maybe_insert_into_registry_dict(builder: IRBuilder, fitem: FuncDef) -> None:
996
996
registry = load_singledispatch_registry (builder , dispatch_func_obj , line )
997
997
for typ in types :
998
998
loaded_type = load_type (builder , typ , None , line )
999
- builder .primitive_op (true_dict_set_item_op , [registry , loaded_type , to_insert ], line )
999
+ builder .primitive_op (exact_dict_set_item_op , [registry , loaded_type , to_insert ], line )
1000
1000
dispatch_cache = builder .builder .get_attr (
1001
1001
dispatch_func_obj , "dispatch_cache" , exact_dict_rprimitive , line
1002
1002
)
0 commit comments