1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-28 14:00:31 +02:00

procedure-documentation works on RTL procedures

* libguile/procprop.h:
* libguile/procprop.c (scm_procedure_documentation): Move here from
  procs.c, and to make the logic more similar to that of procedure-name,
  which allows RTL programs to dispatch to rtl-program-documentation.

* libguile/programs.c (scm_i_rtl_program_documentation):
* libguile/programs.h:
* module/system/vm/program.scm (rtl-program-documentation): New
  plumbing.

* module/system/vm/debug.scm (find-program-docstring): New interface to
  grovel ELF for a docstring.
This commit is contained in:
Andy Wingo 2013-05-16 23:38:29 +02:00
parent 9128b1a19f
commit bf8328ec16
9 changed files with 100 additions and 20 deletions

View file

@ -346,3 +346,14 @@
(return 0)
(end-arity)
(end-program))))))
(with-test-prefix "procedure docstrings"
(pass-if-equal "qux qux"
(procedure-documentation
(assemble-program
'((begin-program foo ((name . foo) (documentation . "qux qux")))
(begin-standard-arity () 1 #f)
(load-constant 0 42)
(return 0)
(end-arity)
(end-program))))))