Generates a wrapper for native __dunder__ methods to be able to fit into the mapping protocol slot. This specifically means that the arguments are taken as *PyObjects and returned as *PyObjects.
(cl: ClassIR, fn: FuncIR, emitter: Emitter)
| 288 | |
| 289 | |
| 290 | def generate_dunder_wrapper(cl: ClassIR, fn: FuncIR, emitter: Emitter) -> str: |
| 291 | """Generates a wrapper for native __dunder__ methods to be able to fit into the mapping |
| 292 | protocol slot. This specifically means that the arguments are taken as *PyObjects and returned |
| 293 | as *PyObjects. |
| 294 | """ |
| 295 | gen = WrapperGenerator(cl, emitter) |
| 296 | gen.set_target(fn) |
| 297 | gen.emit_header() |
| 298 | gen.emit_arg_processing() |
| 299 | gen.emit_call() |
| 300 | gen.finish() |
| 301 | return gen.wrapper_name() |
| 302 | |
| 303 | |
| 304 | def generate_ipow_wrapper(cl: ClassIR, fn: FuncIR, emitter: Emitter) -> str: |
nothing calls this directly
no test coverage detected
searching dependent graphs…