|  | 
| 76 | 76 | ) | 
| 77 | 77 | from mypyc.irbuild.generator import gen_generator_func, gen_generator_func_body | 
| 78 | 78 | from mypyc.irbuild.targets import AssignmentTarget | 
| 79 |  | -from mypyc.primitives.dict_ops import dict_get_method_with_none, dict_new_op, dict_set_item_op | 
|  | 79 | +from mypyc.primitives.dict_ops import ( | 
|  | 80 | +    dict_get_method_with_none, | 
|  | 81 | +    dict_new_op, | 
|  | 82 | +    exact_dict_set_item_op, | 
|  | 83 | +) | 
| 80 | 84 | from mypyc.primitives.generic_ops import py_setattr_op | 
| 81 | 85 | from mypyc.primitives.misc_ops import register_function | 
| 82 | 86 | from mypyc.primitives.registry import builtin_names | 
| @@ -123,8 +127,8 @@ def transform_decorator(builder: IRBuilder, dec: Decorator) -> None: | 
| 123 | 127 | 
 | 
| 124 | 128 |     if decorated_func is not None: | 
| 125 | 129 |         # Set the callable object representing the decorated function as a global. | 
| 126 |  | -        builder.primitive_op( | 
| 127 |  | -            dict_set_item_op, | 
|  | 130 | +        builder.call_c( | 
|  | 131 | +            exact_dict_set_item_op, | 
| 128 | 132 |             [builder.load_globals_dict(), builder.load_str(dec.func.name), decorated_func], | 
| 129 | 133 |             decorated_func.line, | 
| 130 | 134 |         ) | 
| @@ -826,7 +830,7 @@ def generate_singledispatch_dispatch_function( | 
| 826 | 830 |     find_impl = builder.load_module_attr_by_fullname("functools._find_impl", line) | 
| 827 | 831 |     registry = load_singledispatch_registry(builder, dispatch_func_obj, line) | 
| 828 | 832 |     uncached_impl = builder.py_call(find_impl, [arg_type, registry], line) | 
| 829 |  | -    builder.primitive_op(dict_set_item_op, [dispatch_cache, arg_type, uncached_impl], line) | 
|  | 833 | +    builder.call_c(exact_dict_set_item_op, [dispatch_cache, arg_type, uncached_impl], line) | 
| 830 | 834 |     builder.assign(impl_to_use, uncached_impl, line) | 
| 831 | 835 |     builder.goto(call_func) | 
| 832 | 836 | 
 | 
| @@ -1003,7 +1007,7 @@ def maybe_insert_into_registry_dict(builder: IRBuilder, fitem: FuncDef) -> None: | 
| 1003 | 1007 |         registry = load_singledispatch_registry(builder, dispatch_func_obj, line) | 
| 1004 | 1008 |         for typ in types: | 
| 1005 | 1009 |             loaded_type = load_type(builder, typ, None, line) | 
| 1006 |  | -            builder.primitive_op(dict_set_item_op, [registry, loaded_type, to_insert], line) | 
|  | 1010 | +            builder.call_c(exact_dict_set_item_op, [registry, loaded_type, to_insert], line) | 
| 1007 | 1011 |         dispatch_cache = builder.builder.get_attr( | 
| 1008 | 1012 |             dispatch_func_obj, "dispatch_cache", dict_rprimitive, line | 
| 1009 | 1013 |         ) | 
|  | 
0 commit comments