1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-19 03:00:25 +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

@ -24,6 +24,7 @@
:export (arity:nargs arity:nrest arity:nlocs arity:nexts
make-binding binding:name binding:extp binding:index
program-bindings program-sources
program-properties program-property program-documentation
frame-arguments frame-local-variables frame-external-variables
frame-environment
frame-variable-exists? frame-variable-ref frame-variable-set!
@ -66,10 +67,16 @@
(cond ((program-meta prog) => cadr)
(else '())))
(define (program-properties prog)
(or (and=> (program-meta prog) cddr)
'()))
(define (program-property prog prop)
(cond ((program-meta prog) => (lambda (x)
(assq-ref (cddr x) prop)))
(else '())))
(assq-ref (program-properties proc) prop))
(define (program-documentation prog)
(assq-ref (program-properties proc) 'documentation))
;;;