Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upImplement meaningful fn metadata #129
Conversation
arrdem
added some commits
Apr 5, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
arrdem
Apr 6, 2016
Collaborator
@Bronsa points out that, as presently implemented, calling withMeta on AFn will return a new anonymous AFn which masks all methods and uses applyTo for everything. This means that putting metadata on the Fn itself is a pretty crappy idea until fn* emission can be fixed to implement withMeta itself.
This is doable, in fact it should be a pretty simple copy/paste job from the implementation of reify* which must implement IObj in the code generator. However I'm seeing weird shit and think I may have broken AOT somehow so I'm gonna circle back to this another day.
|
@Bronsa points out that, as presently implemented, calling This is doable, in fact it should be a pretty simple copy/paste job from the implementation of |
arrdem commentedApr 6, 2016
This changeset tweaks the compiler to emit introspectable Var use set and arity information on Fns.
At present, a Fn can have the following metadata:
:uses, the set of Vars directly used by this FnOther metadata may be added in the future given more consideration.
Fixes #127
Thanks to @mikera for some prior art on this matter, and RFC on this implementation.