Skip to content

Commit

Permalink
Locking macro (#949)
Browse files Browse the repository at this point in the history
  • Loading branch information
borkdude authored Nov 23, 2024
1 parent a8ee100 commit 5ae0dde
Show file tree
Hide file tree
Showing 4 changed files with 336 additions and 305 deletions.
5 changes: 3 additions & 2 deletions deps.edn
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{:paths ["resources" "src"]
:deps {borkdude/edamame {:mvn/version "1.4.27"}
borkdude/sci.impl.reflector {:mvn/version "0.0.3"}
org.babashka/sci.impl.types {:mvn/version "0.0.2"}}
org.babashka/sci.impl.types {:mvn/version "0.0.2"}
borkdude/graal.locking {:mvn/version "0.0.2"}}
:aliases
{:examples {:extra-paths ["examples"]}
:dev {:extra-deps {org.clojure/clojure {:mvn/version "1.12.0"}}
Expand All @@ -11,7 +12,7 @@
org.clojure/clojurescript {:mvn/version "1.11.132"}
clj-commons/conch {:mvn/version "0.9.2"}
funcool/promesa {:mvn/version "8.0.450"}}}
:shadow {:extra-deps {thheller/shadow-cljs {:mvn/version "2.28.16"}}}
:shadow {:extra-deps {thheller/shadow-cljs {:mvn/version "2.28b.16"}}}
:cljs {:extra-deps {org.clojure/clojurescript {:mvn/version "1.11.54"}}}
:clj-test-runner
{:extra-deps {com.cognitect/test-runner
Expand Down
3 changes: 2 additions & 1 deletion project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
:dependencies [[org.clojure/clojure "1.9.0"]
[borkdude/sci.impl.reflector "0.0.3"]
[borkdude/edamame "1.4.27"]
[org.babashka/sci.impl.types "0.0.2"]]
[org.babashka/sci.impl.types "0.0.2"]
[borkdude/graal.locking "0.0.2"]]
:plugins [[lein-codox "0.10.7"]]
:profiles {:clojure-1.9.0 {:dependencies [[org.clojure/clojure "1.9.0"]]}
:clojure-1.10.3 {:depdencies [[org.clojure/clojure "1.10.3"]]}
Expand Down
5 changes: 4 additions & 1 deletion src/sci/impl/copy_vars.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@
[sym]
`(copy-var ~sym clojure-core-ns {:copy-meta-from ~(core-sym sym)}))

)
(defmacro avoid-method-too-large [v]
(macros/? :clj
`(deref (delay ~v))
:cljs v)))

(defn macrofy*
([f] (vary-meta f #(assoc % :sci/macro true)))
Expand Down
Loading

0 comments on commit 5ae0dde

Please sign in to comment.