summaryrefslogtreecommitdiff
path: root/libguile/frames.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2013-11-08 18:28:24 +0100
committerAndy Wingo <wingo@pobox.com>2013-11-08 18:28:24 +0100
commit1c33be992e8120abd20add8021e4d91d226f5b6a (patch)
tree71f78961b6a29aa1e342049419f402af555e6f20 /libguile/frames.c
parent84680d238299c3b2c8be42b16a8be0ff6e02ba5c (diff)
downloadguile-1c33be992e8120abd20add8021e4d91d226f5b6a.tar.gz
Remove stack programs, objcode, and the old VM.
* libguile/Makefile.am: * libguile/vm-i-loader.c: * libguile/vm-i-scheme.c: * libguile/vm-i-system.c: Remove the old VM files, and the rules to build the .i files. * libguile/vm-engine.c: * libguile/vm.c: Remove the old VM. Woot! * libguile/_scm.h (SCM_OBJCODE_COOKIE, SCM_OBJCODE_ENDIANNESS_OFFSET) (SCM_OBJCODE_WORD_SIZE_OFFSET): Remove. * libguile/evalext.c (scm_self_evaluating_p): Remove objcode and program cases. * libguile/frames.c (scm_frame_num_locals, scm_frame_previous): Remove program cases. * libguile/gc.c (scm_i_tag_name): Remove objcode case. * libguile/goops.c (scm_class_of, create_standard_classes): Remove objcode and program cases. * libguile/instructions.h: * libguile/instructions.c (scm_instruction_list, scm_instruction_p) (scm_instruction_length, scm_instruction_pops, scm_instruction_pushes) (scm_instruction_to_opcode, scm_opcode_to_instruction): Remove old VM code. * libguile/objcodes.h: * libguile/objcodes.c: Remove the objcode data type, and handling for objcode files. * libguile/print.c: Remove objcode and program printers. * libguile/procprop.c: Remove program cases. * libguile/procs.c: * libguile/programs.h: * libguile/programs.c: Remove old program code. * libguile/smob.c: Remove objcodes include. * libguile/snarf.h: Remove static program defines. * libguile/stacks.c: Remove program case. * libguile/tags.h: Remove program and objcode tc7s. * module/ice-9/session.scm (procedure-arguments) * module/language/tree-il/analyze.scm (validate-arity) * module/statprof.scm (get-call-data, procedure=?) * module/system/vm/frame.scm (frame-bindings) (frame-call-representation): Remove old program cases. * module/system/repl/debug.scm (frame->module): Add a FIXME. * module/system/vm/instruction.scm: Remove old exports. * module/system/vm/program.scm: Remove old program code.
Diffstat (limited to 'libguile/frames.c')
-rw-r--r--libguile/frames.c30
1 files changed, 6 insertions, 24 deletions
diff --git a/libguile/frames.c b/libguile/frames.c
index d32f8374c..ce671b889 100644
--- a/libguile/frames.c
+++ b/libguile/frames.c
@@ -120,35 +120,18 @@ SCM_DEFINE (scm_frame_num_locals, "frame-num-locals", 1, 0, 0,
"")
#define FUNC_NAME s_scm_frame_num_locals
{
- SCM *fp, *sp, *p;
+ SCM *sp, *p;
unsigned int n = 0;
SCM_VALIDATE_VM_FRAME (1, frame);
- fp = SCM_VM_FRAME_FP (frame);
sp = SCM_VM_FRAME_SP (frame);
p = SCM_FRAME_STACK_ADDRESS (SCM_VM_FRAME_FP (frame));
- if (SCM_RTL_PROGRAM_P (fp[-1]))
- /* The frame size of an RTL program is fixed, except in the case of
- passing a wrong number of arguments to the program. So we do
- need to use an SP for determining the number of locals. */
- return scm_from_ptrdiff_t (sp + 1 - p);
-
- sp = SCM_VM_FRAME_SP (frame);
- p = SCM_FRAME_STACK_ADDRESS (SCM_VM_FRAME_FP (frame));
- while (p <= sp)
- {
- if (SCM_UNPACK (p[0]) == 0)
- /* skip over not-yet-active frame */
- p += 3;
- else
- {
- p++;
- n++;
- }
- }
- return scm_from_uint (n);
+ /* The frame size of an RTL program is fixed, except in the case of
+ passing a wrong number of arguments to the program. So we do
+ need to use an SP for determining the number of locals. */
+ return scm_from_ptrdiff_t (sp + 1 - p);
}
#undef FUNC_NAME
@@ -311,8 +294,7 @@ SCM_DEFINE (scm_frame_previous, "frame-previous", 1, 0, 0,
SCM_VM_FRAME_OFFSET (frame));
proc = scm_frame_procedure (frame);
- if ((SCM_PROGRAM_P (proc) || SCM_RTL_PROGRAM_P (proc))
- && SCM_PROGRAM_IS_BOOT (proc))
+ if (SCM_RTL_PROGRAM_P (proc) && SCM_PROGRAM_IS_BOOT (proc))
goto again;
else
return frame;