mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-10 15:50:50 +02:00
* 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.
22 lines
601 B
Text
22 lines
601 B
Text
dnl check for gcc's "labels as values" feature
|
|
AC_DEFUN(AC_C_LABELS_AS_VALUES,
|
|
[AC_CACHE_CHECK([labels as values], ac_cv_labels_as_values,
|
|
[AC_TRY_COMPILE([
|
|
int foo(int);
|
|
int foo(i)
|
|
int i; {
|
|
static void *label[] = { &&l1, &&l2 };
|
|
goto *label[i];
|
|
l1: return 1;
|
|
l2: return 2;
|
|
}
|
|
],
|
|
[int i;],
|
|
ac_cv_labels_as_values=yes,
|
|
ac_cv_labels_as_values=no)])
|
|
if test "$ac_cv_labels_as_values" = yes; then
|
|
AC_DEFINE(HAVE_LABELS_AS_VALUES, [],
|
|
[Define if compiler supports gcc's "labels as values" (aka computed goto)
|
|
feature, used to speed up instruction dispatch in the interpreter.])
|
|
fi
|
|
])
|