API for clojure.tools.emitter.jvm - JVM bytecode generator 0.1.0 (in development)


Full namespace name: clojure.tools.emitter.jvm

Overview





Public Variables and Functions



eval

function
Usage: (eval form)
       (eval form {:keys [debug? emit-opts class-loader analyze-opts], :or {debug? false, emit-opts {}, analyze-opts default-passes-opts, class-loader (makeClassLoader)}, :as options})
(eval form)
 (eval form eval-options-map)

Form is a read Clojure s expression represented as a list.
Eval-options-map is a map, defaulting to the empty map, the
following values of which are significant. Returns the result of
evaling the input expression.

Options
-----------
:debug? :- (Option Bool)
  Enables or disables printing in eval. Used as the default value for
  printing in the emitter.

:emit-opts :- (Option emit-options-map)
  An options map which will be merged with the default options
  provided to emit. Keys in this map take precidence over the default
  values provided to emit. The keys which are significant in this map
  are documented in the t.e.jvm.emit/emit docstring.

:analyze-opts :- (Option analyze-options-map)
  An options map that will be passed to the analyzer. The keys which
  are significant in this map are documented in the t.a.jvm/analyze
  docstring.
Source


load

function
Usage: (load res)
       (load res {:keys [debug? eval-opts class-loader], :or {debug? false, eval-opts {}, class-loader (makeClassLoader)}, :as options})
(load resource)
 (load resource load-options-map)

Resource is a string identifier for a Clojure resource on the
classpath. Load-options is a a map, defalting to the empty map, in
which the following keys are meaningful. Returns nil.

Options
-----------
:debug? :- (Option Bool)
  Enables or disables printing in eval. Used as the default value for
  printing in the emitter.

:eval-opts  :- (Option eval-options-map)
  An options map which will be merged with the default options
  provided to eval. Keys set in this map take precidence over the
  default values supplied to eval. The keys which are significant in
  this map are documented in the t.e.jvm/eval docstring.

:class-loader :- (Option ClassLoader)
  An optional classloader into which compiled functions will be
  injected. If not provided, a new Clojure classloader will be
  used. If a class loader is provided here, one need not be provided
  in eval-opts.
Source

clojure.tools.emitter.jvm.emit





Public Variables and Functions



emit

function
Usage: (emit ast)
       (emit {:keys [env o-tag tag op type unchecked?], :as ast} frame)
(λ AST) → Bytecode
(λ AST → Options) → Bytecode

AST is an analyzed, macroexpanded t.a.jvm AST. Options is a map, the
following values of which are significant. Returns a (potentially
empty) sequence of bytecodes. *classes* must be bound before calling
emit.

Options
-----------
:debug? :- (Option bool)
  Controls development debug level printing throughout code generation.
Source


emit-classes

function
Usage: (emit-classes ast)
       (emit-classes ast opts)
(λ AST) → (Seq Class-AST)
(λ AST → Options) → (Seq Class-AST)

Compiles the given AST into potentially several classes, returning a
sequence of ASTs defining classes.

Options
-----------
:debug :- (Option bool)
  Controls developlent debug level printing throughout code generation.
Source
Logo & site design by Tom Hickey.
Clojure auto-documentation system by Tom Faulhaber.