summaryrefslogtreecommitdiff
path: root/libguile/vm-engine.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2009-12-11 10:21:31 +0100
committerAndy Wingo <wingo@pobox.com>2009-12-11 10:45:18 +0100
commite42573315bd70d514b92458a7644057cd3ac5757 (patch)
tree12bf577c718b390c1d4b290f23cc03bfd76a3d6d /libguile/vm-engine.h
parentff810079188b8d04224959d5b54254d3e142d6c3 (diff)
parent51423b018856405dfcda8db02e32467e83d84a5e (diff)
downloadguile-e42573315bd70d514b92458a7644057cd3ac5757.tar.gz
merge from master to elisp
* module/language/elisp/compile-tree-il.scm: Update for changes to tree-il (lambda-case, mainly). * module/language/elisp/spec.scm: Update GPL version to 3. Update reader for new taking a port and environment argument. * libguile/_scm.h: Bump objcode version. * libguile/vm-i-system.c: Fix conflicts. * module/Makefile.am: Fix conflicts, and add elisp modules to the build.
Diffstat (limited to 'libguile/vm-engine.h')
-rw-r--r--libguile/vm-engine.h45
1 files changed, 3 insertions, 42 deletions
diff --git a/libguile/vm-engine.h b/libguile/vm-engine.h
index 36d4d2867..ebe40b2d1 100644
--- a/libguile/vm-engine.h
+++ b/libguile/vm-engine.h
@@ -107,7 +107,6 @@
ip = vp->ip; \
sp = vp->sp; \
fp = vp->fp; \
- stack_base = fp ? SCM_FRAME_UPPER_ADDRESS (fp) - 1 : vp->stack_base; \
}
#define SYNC_REGISTER() \
@@ -209,7 +208,7 @@
#if VM_USE_HOOKS
#define RUN_HOOK(h) \
{ \
- if (SCM_UNLIKELY (!SCM_FALSEP (vp->hooks[h])))\
+ if (SCM_UNLIKELY (scm_is_true (vp->hooks[h])))\
{ \
SYNC_REGISTER (); \
vm_dispatch_hook (vp, vp->hooks[h], hook_args); \
@@ -252,11 +251,11 @@
#endif
#define CHECK_OVERFLOW() \
- if (sp > stack_limit) \
+ if (sp >= stack_limit) \
goto vm_error_stack_overflow
#define CHECK_UNDERFLOW() \
- if (sp < stack_base) \
+ if (sp < SCM_FRAME_UPPER_ADDRESS (fp)) \
goto vm_error_stack_underflow;
#define PUSH(x) do { sp++; CHECK_OVERFLOW (); *sp = x; } while (0)
@@ -336,7 +335,6 @@ do { \
#define FETCH() (*ip++)
#define FETCH_LENGTH(len) do { len=*ip++; len<<=8; len+=*ip++; len<<=8; len+=*ip++; } while (0)
-#define FETCH_WIDTH(width) do { width=*ip++; } while (0)
#undef CLOCK
#if VM_USE_CLOCK
@@ -361,46 +359,9 @@ do { \
}
-/*
- * Stack frame
- */
-
-#define INIT_ARGS() \
-{ \
- if (SCM_UNLIKELY (bp->nrest)) \
- { \
- int n = nargs - (bp->nargs - 1); \
- if (n < 0) \
- goto vm_error_wrong_num_args; \
- /* NB, can cause GC while setting up the \
- stack frame */ \
- POP_LIST (n); \
- } \
- else \
- { \
- if (SCM_UNLIKELY (nargs != bp->nargs)) \
- goto vm_error_wrong_num_args; \
- } \
-}
-
/* See frames.h for the layout of stack frames */
/* When this is called, bp points to the new program data,
and the arguments are already on the stack */
-#define INIT_FRAME() \
-{ \
- int i; \
- \
- /* New registers */ \
- sp += bp->nlocs; \
- CHECK_OVERFLOW (); \
- stack_base = sp; \
- ip = bp->base; \
- \
- /* Init local variables */ \
- for (i=bp->nlocs; i;) \
- sp[-(--i)] = SCM_UNDEFINED; \
-}
-
#define DROP_FRAME() \
{ \
sp -= 3; \