code_native takes a tuple of types that are used to find the method to be 
compiled / displayed.

But how does those types work for keyword arguments?  I am getting "ERROR: 
no method found for the specified argument types".

I have tried omitting the types altogether, or specifying them in the order 
declared.

Here's a simple example:

julia> function bar(a)
       a
       end
bar (generic function with 1 method)

julia> code_native(bar, (Int,))
        .text
Filename: none
Source line: 2
        push    RBP
        mov     RBP, RSP
Source line: 2
        mov     RAX, RDI
        pop     RBP
        ret

julia> function baz(a; b=0)
       a
       end
baz (generic function with 1 method)

julia> code_native(baz, (Int,))
Warning: Unable to find function pointer
ERROR: no method found for the specified argument types
 in _dump_function at reflection.jl:134
 in code_native at reflection.jl:140

julia> code_native(baz, (Int, Int))
ERROR: no method found for the specified argument types
 in _dump_function at reflection.jl:134
 in code_native at reflection.jl:140

Thanks,
Andrew

Reply via email to