File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 66* Add support for custom index objects via the ` LocalIndex ` protocol
77* Generate default constructor for : abstract classes too if one not provided
88* Support passing parameter and return types separately when defining methods
9- * Experimental new map compilation facilitated by ` :seq- emit-fn ` .
9+ * Experimental new map compilation facilitated by ` :emit-seq -fn ` .
1010
1111## 0.5.4 (2022-04-14)
1212
Original file line number Diff line number Diff line change 6969
7070 :debug string of arbitrary debug information - optional.
7171
72- :seq- emit-fn fn to call with each bytecode seq. This is an advanced
72+ :emit-seq -fn fn to call with each bytecode seq. This is an advanced
7373 option and, if present, will be passed both the ASM
7474 MethodVisitor and the raw (possibly nested) :emit op
7575 seq for each method. Can be used to support new op
200200 :emit [[:aload 0 ]
201201 [:invokespecial :super :init [:void ]]
202202 [:return ]]}))
203- seq- emit (:seq- emit-fn t op/emit-seq)]
203+ emit-seq (:emit-seq -fn t op/emit-seq)]
204204 (binding [util/*this* this
205205 util/*super* super]
206206 (doseq [f (:fields t)]
207207 (visit-field cv f))
208208 (doseq [m (:methods t)]
209- (visit-method cv m seq- emit))
209+ (visit-method cv m emit-seq ))
210210 (doto cv
211211 (ann/visit (:annotations t))
212212 .visitEnd))
225225 (ann/visit fv (:annotations f))
226226 (.visitEnd fv)))
227227
228- (defn- visit-method [^ClassVisitor cv m seq- emit]
228+ (defn- visit-method [^ClassVisitor cv m emit-seq ]
229229 (let [mname (util/method-name (:name m))
230230 clinit? (= mname " <clinit>" )
231231 init? (= mname " <init>" )
255255 (binding [util/*labels* (atom {})]
256256 (if (fn? emit)
257257 (emit mv)
258- (seq- emit mv emit)))
258+ (emit-seq mv emit)))
259259 (ann/visit mv (:annotations m))
260260 (doseq [[i anns] (or (:parameter-annotations m) (:param-annotations m))]
261261 (ann/visit mv i anns))
Original file line number Diff line number Diff line change 407407 :type (.getReturnType m)
408408 :anns (map #(.annotationType %) (aget (.getParameterAnnotations m) 0 ))})))))
409409
410- (deftest test-seq- emit-fn
411- (let [t {:seq- emit-fn op-map/emit-seq
410+ (deftest test-emit-seq -fn
411+ (let [t {:emit-seq -fn op-map/emit-seq
412412 :methods [{:name :init :params []
413413 :emit [{:op :aload :index 0 }
414414 {:op :invokespecial :class :super :name :init }
You can’t perform that action at this time.
0 commit comments