diff options
author | Andy Wingo <wingo@pobox.com> | 2008-09-13 14:14:20 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2008-09-13 14:19:30 +0200 |
commit | 93d197be984c2732e08f1c271d8127886142f953 (patch) | |
tree | 8097056cf9cc5495815dd221049dd2bd8107e027 /libguile/vm-i-scheme.c | |
parent | 0ba8bb7143204fb8f2b99c80ff62b16bed4b56fd (diff) | |
download | guile-93d197be984c2732e08f1c271d8127886142f953.tar.gz |
readability improvement in vm-i-scheme
* libguile/vm-engine.h:
* libguile/vm-i-scheme.c: Move some helper macros closer to their use
sites.
Diffstat (limited to 'libguile/vm-i-scheme.c')
-rw-r--r-- | libguile/vm-i-scheme.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libguile/vm-i-scheme.c b/libguile/vm-i-scheme.c index 5c4dae17f..912c91bf2 100644 --- a/libguile/vm-i-scheme.c +++ b/libguile/vm-i-scheme.c @@ -46,6 +46,12 @@ * Predicates */ +#define ARGS1(a1) SCM a1 = sp[0]; +#define ARGS2(a1,a2) SCM a1 = sp[-1], a2 = sp[0]; sp--; +#define ARGS3(a1,a2,a3) SCM a1 = sp[-2], a2 = sp[-1], a3 = sp[0]; sp -= 2; + +#define RETURN(x) do { *sp = x; NEXT; } while (0) + VM_DEFINE_FUNCTION (not, "not", 1) { ARGS1 (x); |