Skip to content

Commit 066a2ea

Browse files
committed
wip
1 parent 1531992 commit 066a2ea

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/sci/impl/namespaces.cljc

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -592,12 +592,14 @@
592592
`(clojure.core/refer '~'clojure.core ~@filters))
593593

594594
(defn sci-ns-resolve
595-
([sci-ctx ns sym]
596-
(sci.impl.vars/with-bindings {sci.impl.utils/current-ns (sci-the-ns sci-ctx ns)}
597-
(sci-resolve sci-ctx sym)))
598-
([sci-ctx ns env sym]
599-
(sci.impl.vars/with-bindings {sci.impl.utils/current-ns (sci-the-ns sci-ctx ns)}
600-
(sci-resolve sci-ctx env sym))))
595+
([ns sym]
596+
(let [ctx (store/get-ctx)]
597+
(sci.impl.vars/with-bindings {sci.impl.utils/current-ns (sci-the-ns ctx ns)}
598+
(sci-resolve ctx sym))))
599+
([ns env sym]
600+
(let [ctx (store/get-ctx)]
601+
(sci.impl.vars/with-bindings {sci.impl.utils/current-ns (sci-the-ns ctx ns)}
602+
(sci-resolve ctx env sym)))))
601603

602604
(defn sci-requiring-resolve
603605
([sci-ctx sym]
@@ -727,11 +729,11 @@
727729

728730
;;;; Macroexpand
729731

730-
(defn macroexpand* [ctx expr]
731-
(@sci.impl.utils/macroexpand* ctx expr))
732+
(defn macroexpand* [expr]
733+
(@sci.impl.utils/macroexpand* (store/get-ctx) expr))
732734

733-
(defn macroexpand-1* [ctx expr]
734-
(@sci.impl.utils/macroexpand-1* ctx expr))
735+
(defn macroexpand-1* [expr]
736+
(@sci.impl.utils/macroexpand-1* (store/get-ctx) expr))
735737

736738
;;;;
737739

@@ -1441,10 +1443,8 @@
14411443
'longs (copy-core-var longs)
14421444
'list* (copy-core-var list*)
14431445
'long-array (copy-core-var long-array)
1444-
'macroexpand (copy-var macroexpand* clojure-core-ns {:name 'macroexpand
1445-
:ctx true})
1446-
'macroexpand-1 (copy-var macroexpand-1* clojure-core-ns {:name 'macroexpand-1
1447-
:ctx true})
1446+
'macroexpand (copy-var macroexpand* clojure-core-ns {:name 'macroexpand})
1447+
'macroexpand-1 (copy-var macroexpand-1* clojure-core-ns {:name 'macroexpand-1})
14481448
'make-array (copy-core-var make-array)
14491449
'make-hierarchy (copy-core-var make-hierarchy)
14501450
'map (copy-core-var map)
@@ -1478,7 +1478,7 @@
14781478
'nil? (copy-core-var nil?)
14791479
'nat-int? (copy-core-var nat-int?)
14801480
'ns (macrofy 'ns ns*)
1481-
'ns-resolve (copy-var sci-ns-resolve clojure-core-ns {:ctx true :name 'ns-resolve})
1481+
'ns-resolve (copy-var sci-ns-resolve clojure-core-ns {:name 'ns-resolve})
14821482
'number? (copy-core-var number?)
14831483
'not-empty (copy-core-var not-empty)
14841484
'not-any? (copy-core-var not-any?)

0 commit comments

Comments
 (0)