Commit b24014a
authored
InteractiveUtils: Support callable objects as functions in introspection macros (JuliaLang#58905)
Follow-up to the follow-up
JuliaLang#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).1 parent 566ee44 commit b24014a
File tree
3 files changed
+335
-153
lines changed- doc/src/base
- stdlib/InteractiveUtils
- src
- test
3 files changed
+335
-153
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | | - | |
90 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
0 commit comments