Last active
December 5, 2019 02:40
-
-
Save jrevels/c29f748c9d18ad323b73399538c462d8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NOTE: Make sure to run this in a "fresh" session. If the method you're invoking | |
# has already been compiled, then the compiler might grab its old results instead | |
# of populating the cache we're constructing here. | |
mymethod = # callable value you want to check | |
mysig = Tuple{typeof(mymethod), #= types of arguments here =#} | |
p = Core.Compiler.Params(typemax(UInt)) | |
Core.Compiler.typeinf_code(methods(mymethod).ms[end], mysig, Core.svec(), false, p) | |
Core.show(map(((i, x),) -> (i, x.result, x.linfo), enumerate(p.cache))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment