diff options
author | Andy Wingo <wingo@pobox.com> | 2009-12-29 21:17:07 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2009-12-29 21:17:07 +0100 |
commit | 7abb7efd319526bb2260fdcc35440a31dfd5cf51 (patch) | |
tree | fce2afeda54eda22dc196d96ab2821933650ca41 /libguile/frames.c | |
parent | 9274c3dd4058b3f63ba97570fc2f1598debbc03d (diff) | |
download | guile-7abb7efd319526bb2260fdcc35440a31dfd5cf51.tar.gz |
frames.c no longer exports frame-source -- frame.scm does so already
* libguile/frames.c (scm_frame_source): No longer exported to Scheme
via init's call to scm_init_frames; in fact just calls the Scheme
version. Perhaps this function is on its way out, though :)
Diffstat (limited to 'libguile/frames.c')
-rw-r--r-- | libguile/frames.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/libguile/frames.c b/libguile/frames.c index 5d390ab60..5077d8e4f 100644 --- a/libguile/frames.c +++ b/libguile/frames.c @@ -97,24 +97,17 @@ SCM_DEFINE (scm_frame_arguments, "frame-arguments", 1, 0, 0, } #undef FUNC_NAME -SCM_DEFINE (scm_frame_source, "frame-source", 1, 0, 0, - (SCM frame), - "") -#define FUNC_NAME s_scm_frame_source +SCM +scm_frame_source (SCM frame) { - SCM *fp; - struct scm_objcode *bp; + static SCM var = SCM_BOOL_F; - SCM_VALIDATE_VM_FRAME (1, frame); - - fp = SCM_VM_FRAME_FP (frame); - bp = SCM_PROGRAM_DATA (SCM_FRAME_PROGRAM (fp)); + if (scm_is_false (var)) + var = scm_c_module_lookup (scm_c_resolve_module ("system vm frame"), + "frame-source"); - return scm_c_program_source (SCM_FRAME_PROGRAM (fp), - SCM_VM_FRAME_IP (frame) - - SCM_C_OBJCODE_BASE (bp)); + return scm_call_1 (SCM_VARIABLE_REF (var), frame); } -#undef FUNC_NAME /* The number of locals would be a simple thing to compute, if it weren't for the presence of not-yet-active frames on the stack. So we have a cheap |