mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-18 01:30:27 +02:00
RTL programs print with their name
* libguile/print.c (iprin1): Use scm_i_program_print for RTL programs too. * libguile/procprop.c (scm_procedure_name): For RTL programs, call scm_i_rtl_program_name if there is no override. * libguile/programs.h: * libguile/programs.c (scm_i_rtl_program_name): New helper, dispatches to (system vm program). (scm_i_program_print): For RTL programs, the fallback prints the code pointer too. * module/system/vm/program.scm (rtl-program-name): Use the debug info to get an RTL program name. (write-program): Work with RTL programs too. * test-suite/tests/rtl.test ("procedure name"): Add test.
This commit is contained in:
parent
e2cbf527c4
commit
e65f80af42
6 changed files with 60 additions and 17 deletions
|
@ -268,3 +268,13 @@
|
|||
(lambda (pdi)
|
||||
(equal? (program-debug-info-addr pdi)
|
||||
(rtl-program-code return-3)))))))
|
||||
|
||||
(with-test-prefix "procedure name"
|
||||
(pass-if-equal 'foo
|
||||
(procedure-name
|
||||
(assemble-program
|
||||
'((begin-program foo)
|
||||
(assert-nargs-ee/locals 0 1)
|
||||
(load-constant 0 42)
|
||||
(return 0)
|
||||
(end-program))))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue