(builder: IRBuilder, func_name: str, fullname: str | None, line: int)
| 947 | |
| 948 | |
| 949 | def load_func(builder: IRBuilder, func_name: str, fullname: str | None, line: int) -> Value: |
| 950 | if fullname and not fullname.startswith(builder.current_module): |
| 951 | # we're calling a function in a different module |
| 952 | |
| 953 | # We can't use load_module_attr_by_fullname here because we need to load the function using |
| 954 | # func_name, not the name specified by fullname (which can be different for underscore |
| 955 | # function) |
| 956 | module = fullname.rsplit(".")[0] |
| 957 | loaded_module = builder.load_module(module) |
| 958 | |
| 959 | func = builder.py_get_attr(loaded_module, func_name, line) |
| 960 | else: |
| 961 | func = builder.load_global_str(func_name, line) |
| 962 | return func |
| 963 | |
| 964 | |
| 965 | def generate_singledispatch_dispatch_function( |
no test coverage detected
searching dependent graphs…