You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following 4 code changes have allowed me to do something like (sc.api/defsc :brk-1) in ClojureScript, which pages in the scope prevailing at the last call to (sc.api/spy {:sc/cs-label :brk-1} ...). I argue that the proposed code changes do not alter the behaviour of scope-capture in any way, as they are basically only switching functions to multimethods.
I did three things in sc.impl:
in the map of function make-cs-data I added a key-value pair :sc.cs/label (get opts :sc/cs-label nil)
out of function find-ep I made a (defmulti find-ep #(type %2)) (plus defmethod :default)
out of function resolve-code-site I also made a multimethod (dispatch function type)
In sc.api I
4 . removed the line ep-id (i/resolve-ep-id ep-id) from macro defsc.
This line is rudundant, as the check (validate-ep-identifier ep-id) is triggered by the immediate above call to our (default) resolve-code-site, and the subsequent call to our find-ep does resolve-ep-id ep-id on its own.
With additional definitions of find-ep and resolve-code-site multimethods in my own codebase (here and here), I am able to introduce breakpoints in Clojurescript in the sense described at the beginning.
The text was updated successfully, but these errors were encountered:
The following 4 code changes have allowed me to do something like
(sc.api/defsc :brk-1)
in ClojureScript, which pages in the scope prevailing at the last call to(sc.api/spy {:sc/cs-label :brk-1} ...)
. I argue that the proposed code changes do not alter the behaviour of scope-capture in any way, as they are basically only switching functions to multimethods.I did three things in sc.impl:
:sc.cs/label (get opts :sc/cs-label nil)
find-ep
I made a(defmulti find-ep #(type %2))
(plus defmethod :default)resolve-code-site
I also made a multimethod (dispatch functiontype
)In sc.api I
4 . removed the line
ep-id (i/resolve-ep-id ep-id)
from macrodefsc
.This line is rudundant, as the check
(validate-ep-identifier ep-id)
is triggered by the immediate above call to our (default)resolve-code-site
, and the subsequent call to ourfind-ep
doesresolve-ep-id ep-id
on its own.With additional definitions of
find-ep
andresolve-code-site
multimethods in my own codebase (here and here), I am able to introduce breakpoints in Clojurescript in the sense described at the beginning.The text was updated successfully, but these errors were encountered: