diff options
author | Andy Wingo <wingo@pobox.com> | 2008-09-13 15:41:43 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2008-09-13 15:41:43 +0200 |
commit | 28106f547dc88723e02a38de7d4dc4ffc6434590 (patch) | |
tree | 1fe4be6d8d89ba146cc97dc6f8030a6017fb4cc7 /libguile/vm-engine.h | |
parent | 1dc8f8517c4f89f7e0a330fe7f5b945f2a8e2523 (diff) | |
download | guile-28106f547dc88723e02a38de7d4dc4ffc6434590.tar.gz |
inline frame replacement in tail-call
* libguile/programs.c (program_print): Only try to lookup write-program
if the module system is booted.
* libguile/vm-engine.h (FREE_FRAME): Remove, it's now inlined everywhere.
* libguile/vm-i-system.c (tail-call): Inline FREE_FRAME, and implement
the calling bits here. Will make things more hackable.
Diffstat (limited to 'libguile/vm-engine.h')
-rw-r--r-- | libguile/vm-engine.h | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/libguile/vm-engine.h b/libguile/vm-engine.h index c86307c86..516eedcb4 100644 --- a/libguile/vm-engine.h +++ b/libguile/vm-engine.h @@ -443,35 +443,6 @@ do { \ data[0] = external; \ } -#define FREE_FRAME() \ -{ \ - SCM *last_sp = sp; \ - SCM *last_fp = fp; \ - SCM *p = fp + bp->nargs + bp->nlocs; \ - \ - /* Restore pointers */ \ - ip = SCM_FRAME_BYTE_CAST (p[3]); \ - fp = SCM_FRAME_STACK_CAST (p[2]); \ - \ - if (!SCM_FALSEP (p[1])) \ - { \ - /* Unlink the heap stack */ \ - vp->this_frame = p[1]; \ - } \ - else \ - { \ - /* Move stack items */ \ - p += 4; \ - sp = SCM_FRAME_LOWER_ADDRESS (last_fp); \ - while (p <= last_sp) \ - *sp++ = *p++; \ - sp--; \ - } \ - stack_base = fp ? \ - SCM_FRAME_UPPER_ADDRESS (fp) - 1 \ - : vp->stack_base; \ -} - #define CACHE_EXTERNAL() external = fp[bp->nargs + bp->nlocs] /* |