(
builder: IRBuilder, expr: CallExpr, callee: RefExpr, name: str | None, typ: RType | None = None
)
| 187 | |
| 188 | |
| 189 | def _apply_specialization( |
| 190 | builder: IRBuilder, expr: CallExpr, callee: RefExpr, name: str | None, typ: RType | None = None |
| 191 | ) -> Value | None: |
| 192 | # TODO: Allow special cases to have default args or named args. Currently they don't since |
| 193 | # they check that everything in arg_kinds is ARG_POS. |
| 194 | |
| 195 | # If there is a specializer for this function, try calling it. |
| 196 | # Return the first successful one. |
| 197 | if name and (name, typ) in specializers: |
| 198 | for specializer in specializers[name, typ]: |
| 199 | val = specializer(builder, expr, callee) |
| 200 | if val is not None: |
| 201 | return val |
| 202 | return None |
| 203 | |
| 204 | |
| 205 | def apply_function_specialization( |
no outgoing calls
no test coverage detected
searching dependent graphs…