This repository has been archived by the owner on Jan 28, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Conversation
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
- Factor some initialization stuff more nicely - Move doc/arglist initialization into core with others
Normalize whitespace, remove commented code, this patch does it all
Previously, Namespaces as values would be emitted using read-eval. This patch generates the obvious Namespace.findOrCreate code path instead.
This is an implementation detail which lets clients disable fancy metadata on emitted fns. Needed for fixing lazy-seq serialization.
Vars don't serialize and it makes no sense to serialize them, so since lazy-seq fns are closed over and can't really be captured as values and introspected just suppress metadata emission on them.
arrdem
force-pushed
the
feature/fn-metadata
branch
from
April 6, 2016 21:30
8351243
to
b5fbda7
Compare
arrdem
force-pushed
the
feature/fn-metadata
branch
from
April 6, 2016 22:05
b5fbda7
to
cec8af9
Compare
@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 |
Does away with the old `AFunction.withMeta()` implementation which operates by adding a wrapper Fn object which calls applyTo on the wrapped Fn, and instead uses the existing compiler code path for emitting appropriate `Fn.meta()` and `Fn.withMeta()` implementations.
arrdem
added a commit
that referenced
this pull request
Apr 9, 2016
Vist 0.2.0 upon the world This release focuses on fleshing Jaunt out as a separate platform atop Clojure, adding support for the `.jnt` file extension and the `:jnt` reader conditional directive. Other changes include the deprecation and automatic refactoring hinting of `use` and `refer`, the addition of `^:uses` metadata fo `AFn` instances in support of future static analysis work and migration to JDK8 for the entire project although few JDK8 features are used at this time. - [#131](#131) Add support for `.jnt` files (@arrdem). - `load-file` now chooses the first file of `.class`, `.jnt`, `.clj`, `.cljc`. - [#129](#129) Emit `^:uses` metadata on `Fn` instances (@arrdem). - [#126](#126) Add reader support for `Infinity`, `NaN` (@arrdem). - [#123](#123) Add support for `:jnt` in reader conditionals (@arrdem). - Update to Java 1.8 - Implement `java.lang.Iterable` over `clojure.lang.Seqable` using a Java 8 interface default method - Add `clojure.lang.RT.union(set, seq):set` - [#122](#122) Catch and print exceptions encountered loading `user.clj` (@arrdem). - [#116](#116) Deprecate `clojure.core/refer` (@arrdem). - Deprecate `clojure.core/refer` - Refactor `clojure.core/refer` to emit a warning describing how to rewrite refer into require. - [#117](#117) Fix typo in arglists (@arrdem). - [#112](#112) Self-refactoring use (@arrdem). - Add `clojure.core/sift`. - Refactor `clojure.core/use` to emit a warning describing how to rewrite use into require/refer. - Refactor out uses of `use`. - [#111](#111) Add a warning when expanding deprecated macros (@arrdem).
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.