mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 03:30:27 +02:00
Fixed a stack leak. Now observing actual performance.
* src/*.[ch]: Replaced `scm_mem2symbol' by `scm_from_locale_symboln' and `scm_ulong2num' by `scm_from_ulong'. * src/vm_system.c (tail-call): Fixed stack leak (SP lacked decrement by one more Scheme object in the tail-recursive case). * benchmark/measure.scm (measure): Make sure we are using the compiled procedure (i.e. a program object) when measuring. This yields better results than before. :-) * doc/guile-vm.texi: Augmented the instruction set documentation with branch instructions, `call' and `tail-call'. git-archimport-id: lcourtes@laas.fr--2004-libre/guile-vm--revival--0.6--patch-7
This commit is contained in:
parent
2d80426a3e
commit
f41cb00ce2
10 changed files with 149 additions and 38 deletions
|
@ -214,6 +214,7 @@
|
|||
|
||||
#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 POP(x) do { x = *sp; DROP (); } while (0)
|
||||
|
||||
/* A fast CONS. This has to be fast since its used, for instance, by
|
||||
|
@ -227,8 +228,11 @@
|
|||
x = scm_cell (SCM_UNPACK (y), SCM_UNPACK (z)); \
|
||||
}
|
||||
|
||||
/* Pop the N objects on top of the stack and push a list that contains
|
||||
them. */
|
||||
#define POP_LIST(n) \
|
||||
do { \
|
||||
do \
|
||||
{ \
|
||||
int i; \
|
||||
SCM l = SCM_EOL; \
|
||||
sp -= n; \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue