Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What's the difference between sly-list-callers and sly-who-calls? #371

Closed
Ambrevar opened this issue Nov 15, 2020 · 3 comments · Fixed by #372
Closed

What's the difference between sly-list-callers and sly-who-calls? #371

Ambrevar opened this issue Nov 15, 2020 · 3 comments · Fixed by #372

Comments

@Ambrevar
Copy link
Contributor

Ambrevar commented Nov 15, 2020

I guess the same question applies to the difference between sly-calls-who and sly-list-callees, except that sly-calls-who seems to only work on LispWorks while sly-list-callees works anywhere.

@PuercoPop
Copy link
Contributor

afaiu

  • sly-calls-who should return a list of the functions that call the function named by the symbol.
  • sly-list-callees should list all the call-sites of the function named by the symbol.

@joaotavora
Copy link
Owner

sly-calls-who should return a list of the functions that call the function named by the symbol.

No,that's sly-who-calls. But you'd be forgiven for mixing it up, since the docstring in slynk-backend.lisp is broken, it is exactly the same for the two interfaces.

There are indeed two functions that do the same for every operations: callers or callees. The difference between the two inside each pair is where they gather information. As explained in slynk-backend.lisp, who-calls and calls-who use some implementations's xref mechanism (LispWorks and Allegro CL have one), whereas list-callers and list-callees use "lower-level grovelling". I don't know any more details. This was inherited straight from SLIME>

@Ambrevar
Copy link
Contributor Author

Ambrevar commented Nov 16, 2020 via email

joaotavora pushed a commit that referenced this issue Jan 14, 2021
* sly.el (sly-who-calls): Mention `sly-list-callers' in the docstring.
(sly-calls-who): Mention `sly-list-callees' in the docstring.
(sly-list-callers): Mention `sly-who-calls' in the docstring.
(sly-list-callees): Mention `sly-calls-who' in the docstring.

* slynk/slynk-backend.lisp (calls-who): Fix docstring.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants