File tree Expand file tree Collapse file tree 2 files changed +19
-16
lines changed
src/main/clojure/clojure/tools/emitter Expand file tree Collapse file tree 2 files changed +19
-16
lines changed Original file line number Diff line number Diff line change 924
924
925
925
; ; addAnnotations
926
926
(defmethod -emit :method
927
- [{:keys [this params name bridges tag fixed-arity variadic? body env]}
927
+ [{:keys [this params name bridges tag fixed-arity variadic? body env internal-methods ]}
928
928
{:keys [class] :as frame}]
929
929
930
930
(let [method-name name
945
945
:o-tag (or (:tag body) Object))
946
946
(assoc frame
947
947
:loop-label loop-label
948
- :loop-locals params))
948
+ :loop-locals params
949
+ :params params))
949
950
[:mark ~end-label]
950
951
[:return-value ]
951
952
[:end-method ]]]
964
965
[:load-args ]
965
966
[:invoke-virtual ~@target]
966
967
[:return-value ]
967
- [:end-method ]]}))]))
968
+ [:end-method ]]}))
969
+ ~@(when internal-methods
970
+ (emit-internal-methods internal-methods (assoc frame :params params)))]))
968
971
969
972
(defmethod -emit :local
970
973
[{:keys [to-clear? local name tag o-tag arg-id]}
Original file line number Diff line number Diff line change 15
15
{:pass-info {:walk :none :depends #{} :compiler true }} ; ; ensure it's run last
16
16
[ast]
17
17
(case (:op ast)
18
- : fn-method
19
- (binding [*internal-methods* (atom [])]
20
- (let [ast (update-children ast collect-internal-methods)]
21
- (merge ast
22
- (when-let [m (seq @*internal-methods*)]
23
- {:internal-methods m}))))
18
+ ( :method : fn-method)
19
+ (binding [*internal-methods* (atom [])]
20
+ (let [ast (update-children ast collect-internal-methods)]
21
+ (merge ast
22
+ (when-let [m (seq @*internal-methods*)]
23
+ {:internal-methods m}))))
24
24
25
- (:try :loop )
26
- (let [ast (update-children (assoc ast :internal-method-name
27
- (or (:loop-id ast) (gensym " try__" )))
28
- collect-internal-methods)]
29
- (swap! *internal-methods* conj ast)
30
- ast)
25
+ (:try :loop )
26
+ (let [ast (update-children (assoc ast :internal-method-name
27
+ (or (:loop-id ast) (gensym " try__" )))
28
+ collect-internal-methods)]
29
+ (swap! *internal-methods* conj ast)
30
+ ast)
31
31
32
- (update-children ast collect-internal-methods)))
32
+ (update-children ast collect-internal-methods)))
You can’t perform that action at this time.
0 commit comments