Skip to content

Commit

Permalink
Revert "Don't emit unnecessary form-id for expr and returns"
Browse files Browse the repository at this point in the history
This reverts commit 2908954.
  • Loading branch information
jpmonettas committed Dec 21, 2023
1 parent f258731 commit 0e4bdb4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
3 changes: 1 addition & 2 deletions script/build
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ CLJS_SCRIPT_MVN_OPTS=${CLJS_SCRIPT_MVN_OPTS:-""}
MAJOR="1"
MINOR="11"
REVISION="60"
PATCH="8"

PATCH="5"
# Extract the version number from the string.
# REVISION_REGEX="v[0-9]*\.[0-9]*-([0-9]*)-.*"
# if [[ $REVISION =~ $REVISION_REGEX ]]
Expand Down
8 changes: 4 additions & 4 deletions src/main/cljs/cljs/storm/tracer.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
(when trace-fn-call-fn
(trace-fn-call-fn nil fn-ns fn-name fn-args form-id)))

(defn trace-expr [val coord]
(defn trace-expr [val coord form-id]
#_(dbg "trace-expr" [val coord form-id])
(when trace-expr-fn
(trace-expr-fn nil val coord 0))
(trace-expr-fn nil val coord form-id))
val)

(defn trace-fn-return [ret-val coord]
(defn trace-fn-return [ret-val coord form-id]
#_(dbg "trace-fn-return" [ret-val coord form-id])
(when trace-fn-return-fn
(trace-fn-return-fn nil ret-val coord 0))
(trace-fn-return-fn nil ret-val coord form-id))
ret-val)

(defn trace-bind [val coord sym-name]
Expand Down
7 changes: 4 additions & 3 deletions src/main/clojure/cljs/compiler.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,8 @@
(and (#{:statement :expr} (:context env#))
(:cljs.storm/coord env#))))
(let [coord# (str/join "," (or (:cljs.storm/coord env#)
(:cljs.storm/wrapping-fn-coord env#)))]
(:cljs.storm/wrapping-fn-coord env#)))
form-id# (:cljs.storm/form-id env#)]

(case (:context env#)
:return (if (:cljs.storm/skip-fn-trace? env#)
Expand All @@ -524,7 +525,7 @@
;; (could be let or loop) trace it like a expression
"cljs.storm.tracer.trace_expr( "))
~@body
(emits ",\"" coord# "\")" )))
(emits ",\"" coord# "\"," form-id# ")" )))
(:expr :statement) (if (:cljs.storm/skip-expr-instrumentation? env#)
(do ~@body)

Expand All @@ -533,7 +534,7 @@
(do
(emits "cljs.storm.tracer.trace_expr( ")
~@body
(emits ",\"" coord# "\")" ))) ))
(emits ",\"" coord# "\"," form-id# ")" ))) ))

;; if instrumentation isn't enable or we don't have a coord
;; just don't instrument anything
Expand Down

0 comments on commit 0e4bdb4

Please sign in to comment.