1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 03:30:27 +02:00

re-enable computed goto; fix ,help in the repl; subr dispatch optimizations

* m4/labels-as-values.m4: New file, checks for computed goto.

* configure.in: Use AC_C_LABELS_AS_VALUES.

* module/system/repl/command.scm (procedure-documentation): Extend the
  core's procedure-documentation in an ad-hoc way, so that ,help works.

* module/system/vm/core.scm (program-properties): New function.
  (program-documentation): New function.

* src/vm_engine.h (DROP, DROPN): Decrement sp before checking for
  underflow.

* src/vm_system.c (call, tail-call): Add some optimized dispatch for some
  C functions, so that we can avoid consing and the interpreter if
  possible. However currently it seems that I'm always getting the
  scm_call_* trampolines back.
This commit is contained in:
Andy Wingo 2008-08-05 01:03:17 +02:00
parent fbde2b915b
commit 659b4611b6
6 changed files with 137 additions and 15 deletions

View file

@ -222,13 +222,13 @@
if (sp > stack_limit) \
goto vm_error_stack_overflow
#define CHECK_UNDERFLOW() \
if (sp < stack_base) \
#define CHECK_UNDERFLOW() \
if (sp < stack_base) \
goto vm_error_stack_underflow
#define PUSH(x) do { sp++; CHECK_OVERFLOW (); *sp = x; } while (0)
#define DROP() do { CHECK_UNDERFLOW (); sp--; } while (0)
#define DROPN(_n) do { CHECK_UNDERFLOW (); sp -= (_n); } while (0)
#define DROP() do { sp--; CHECK_UNDERFLOW (); } while (0)
#define DROPN(_n) do { sp -= (_n); CHECK_UNDERFLOW (); } while (0)
#define POP(x) do { x = *sp; DROP (); } while (0)
/* A fast CONS. This has to be fast since its used, for instance, by