File tree Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change 110
110
(with-meta (cons 'cljs.core/js-obj (interleave keys args)) meta))
111
111
(emit-js-array [args meta]
112
112
(with-meta (cons 'cljs.core/array args) meta))
113
- (emit-place [ssa tag place]
114
- `(hint ~tag ~(-> ssa :places place :tag ) ~place))
113
+ (emit-place [{:keys [places]
114
+ :as ssa}
115
+ tag place]
116
+ `(hint ~tag
117
+ ~(when (contains? places place)
118
+ (-> places place :tag ))
119
+ ~place))
115
120
(instance [ast]
116
121
(or (:instance ast) (:target ast)))
117
122
(field [ast]
168
173
(dissoc m k))) m ks))
169
174
(current-block [ssa]
170
175
(sym (:prefix ssa) 'block (-> ssa :blocks count dec)))
171
- (with-place [ssa place]
176
+ (with-place [{:keys [places]
177
+ :as ssa}
178
+ place]
172
179
(let [block (current-block ssa)]
173
- (if (= block (-> ssa :places place :block ))
180
+ (if (or (not (contains? places place))
181
+ (= block (-> places place :block )))
174
182
ssa (update-in ssa [:blocks block :read ] conj-set place))))
175
183
(collect [ssa rf asts f & args]
176
184
(loop [ssa (assoc ssa :result [] :tag [])
491
499
(add-place (emit-place ssa tag place) tag))
492
500
(add-place ssa (:form ast) tag))
493
501
494
- (:const :var :js-var :quote :the-var :static-field )
502
+ :const
503
+ (assoc ssa
504
+ :result (:form ast)
505
+ :tag tag)
506
+
507
+ (:var :js-var :quote :the-var :static-field )
495
508
(add-place ssa `(hint ~tag ~(-> ast :o-tag tag->symbol) ~(:form ast)) tag)
496
509
497
510
(:fn :reify :deftype )
You can’t perform that action at this time.
0 commit comments