Skip to content

Commit 4c924f9

Browse files
committed
Add docstring for whichtt
1 parent 02a8d3c commit 4c924f9

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

docs/src/dev_reference.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Function reference
22

3-
## Top-level
3+
## Running the interpreter
44

55
```@docs
66
@interpret
@@ -93,4 +93,5 @@ JuliaInterpreter.linenumber
9393
JuliaInterpreter.statementnumber
9494
JuliaInterpreter.Variable
9595
JuliaInterpreter.locals
96+
JuliaInterpreter.whichtt
9697
```

src/utils.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ function to_function(@nospecialize(x))
2525
isa(x, GlobalRef) ? getfield(x.mod, x.name) : x
2626
end
2727

28+
"""
29+
method = whichtt(tt)
30+
31+
Like `which` except it operates on the complete tuple-type `tt`.
32+
"""
2833
function whichtt(@nospecialize(tt))
2934
m = ccall(:jl_gf_invoke_lookup, Any, (Any, UInt), tt, typemax(UInt))
3035
m === nothing && return nothing

0 commit comments

Comments
 (0)