julia
b24014ae - InteractiveUtils: Support callable objects as functions in introspection macros (#58905)

Commit
113 days ago
InteractiveUtils: Support callable objects as functions in introspection macros (#58905) Follow-up to the follow-up https://github.com/JuliaLang/julia/pull/57911, building on the changes to introspection functions to support signature tuples being provided as a single argument. This enables support for calls of the form ```julia @code_typed (::Returns{Int})(1) @code_llvm (::Base.Fix2{typeof(+), Float64})(::Int) ``` by providing an extra `use_signature_tuple::Bool = false` parameter in `gen_call_with_extracted_types`. Setting this parameter to true changes the code generation from `$fcn(f, Tuple{argtypes...})` to `$fcn(Tuple{f, argtypes...})` (where `$fcn` can be e.g. `code_typed`, `code_llvm` etc).
Author
Parents
Loading