diff options
author | Ludovic Courtès <ludo@gnu.org> | 2012-01-22 23:20:50 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2012-01-22 23:23:44 +0100 |
commit | 0fc9040fa248c7d964966a568749d1398a457cd8 (patch) | |
tree | 77f8d07f8c48a3eec416c73df91e65cba234d4a6 /libguile/vm.c | |
parent | 17cc6e40a9ba5db9b0ff003a9a277ba43a72a067 (diff) | |
download | guile-0fc9040fa248c7d964966a568749d1398a457cd8.tar.gz |
Parenthesize and type `SCM_FRAME' macros; check layout of `scm_vm_frame'.
* libguile/frames.c: Add compile-time assertions on the layout of
`struct scm_vm_frame'.
(RELOC): Parenthesize and type VAL.
* libguile/frames.h (SCM_FRAME_STRUCT): Write in terms of
`SCM_FRAME_DATA_ADDRESS'.
(SCM_FRAME_DATA_ADDRESS): Parenthesize and type FP.
(SCM_FRAME_SET_DYNAMIC_LINK): Write in terms of
`SCM_FRAME_DYNAMIC_LINK'.
* libguile/vm.c (RELOC): Parenthesize and type SCM_P.
Diffstat (limited to 'libguile/vm.c')
-rw-r--r-- | libguile/vm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libguile/vm.c b/libguile/vm.c index 49df5cbee..8fae65604 100644 --- a/libguile/vm.c +++ b/libguile/vm.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2009, 2010, 2011 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -280,7 +280,8 @@ vm_reinstate_partial_continuation (SCM vm, SCM cont, SCM intwinds, cp = SCM_VM_CONT_DATA (cont); base = SCM_FRAME_UPPER_ADDRESS (vp->fp) + 1; -#define RELOC(scm_p) (scm_p + cp->reloc + (base - cp->stack_base)) +#define RELOC(scm_p) \ + (((SCM *) (scm_p)) + cp->reloc + (base - cp->stack_base)) if ((base - vp->stack_base) + cp->stack_size + n + 1 > vp->stack_size) scm_misc_error ("vm-engine", |