From 7abb7efd319526bb2260fdcc35440a31dfd5cf51 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Tue, 29 Dec 2009 21:17:07 +0100 Subject: 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 :) --- libguile/frames.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'libguile/frames.c') 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 -- cgit v1.2.3