diff options
author | Andy Wingo <wingo@pobox.com> | 2013-05-17 22:10:16 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2013-06-09 23:59:19 +0200 |
commit | c4c098e355bd2edcd3bc66eb7041c5f9cdeefef0 (patch) | |
tree | c1a55d1fc2dbe44b4201e3eaa076561e20d6fa05 /libguile | |
parent | bf8328ec16cbe76b7af9703bb41e964865034561 (diff) | |
download | guile-c4c098e355bd2edcd3bc66eb7041c5f9cdeefef0.tar.gz |
procedure-properties for RTL functions
* module/system/vm/assembler.scm (link-procprops, link-objects): Arrange
to write procedure property links out to a separate section.
* libguile/procprop.c (scm_procedure_properties):
* libguile/programs.h:
* libguile/programs.c (scm_i_rtl_program_properties):
* module/system/vm/debug.scm (find-program-properties): Wire up
procedure-properties for RTL procedures. Yeah! Fistpumps! :)
* module/system/vm/debug.scm (find-program-debug-info): Return #f if the
string is "", as it is if we don't have a name. Perhaps
elf-symbol-name should return #f in that case...
* test-suite/tests/rtl.test: Add some tests.
Diffstat (limited to 'libguile')
-rw-r--r-- | libguile/procprop.c | 2 | ||||
-rw-r--r-- | libguile/programs.c | 12 | ||||
-rw-r--r-- | libguile/programs.h | 1 |
3 files changed, 15 insertions, 0 deletions
diff --git a/libguile/procprop.c b/libguile/procprop.c index d7ce09b95..2d9e6550b 100644 --- a/libguile/procprop.c +++ b/libguile/procprop.c @@ -146,6 +146,8 @@ SCM_DEFINE (scm_procedure_properties, "procedure-properties", 1, 0, 0, { if (SCM_PROGRAM_P (proc)) ret = scm_i_program_properties (proc); + else if (SCM_RTL_PROGRAM_P (proc)) + ret = scm_i_rtl_program_properties (proc); else ret = SCM_EOL; } diff --git a/libguile/programs.c b/libguile/programs.c index 567708a51..d8dd3783b 100644 --- a/libguile/programs.c +++ b/libguile/programs.c @@ -136,6 +136,18 @@ scm_i_rtl_program_documentation (SCM program) return scm_call_1 (scm_variable_ref (rtl_program_documentation), program); } +SCM +scm_i_rtl_program_properties (SCM program) +{ + static SCM rtl_program_properties = SCM_BOOL_F; + + if (scm_is_false (rtl_program_properties) && scm_module_system_booted_p) + rtl_program_properties = + scm_c_private_variable ("system vm program", "rtl-program-properties"); + + return scm_call_1 (scm_variable_ref (rtl_program_properties), program); +} + void scm_i_program_print (SCM program, SCM port, scm_print_state *pstate) { diff --git a/libguile/programs.h b/libguile/programs.h index 175059fbc..e42a76e41 100644 --- a/libguile/programs.h +++ b/libguile/programs.h @@ -46,6 +46,7 @@ SCM_INTERNAL SCM scm_rtl_program_code (SCM program); SCM_INTERNAL SCM scm_i_rtl_program_name (SCM program); SCM_INTERNAL SCM scm_i_rtl_program_documentation (SCM program); +SCM_INTERNAL SCM scm_i_rtl_program_properties (SCM program); /* * Programs |