diff options
author | Dirk Herrmann <dirk@dirk-herrmanns-seiten.de> | 2000-09-26 20:11:22 +0000 |
---|---|---|
committer | Dirk Herrmann <dirk@dirk-herrmanns-seiten.de> | 2000-09-26 20:11:22 +0000 |
commit | 74cc85038e5685aa7f9e81e0a9004b0717fb22a5 (patch) | |
tree | 8e7c69e7945286e9e7a65a473fb71fb50799fcf3 /libguile/procs.h | |
parent | 9eb364fccba89d07f1063d373df1aff911288e83 (diff) | |
download | guile-74cc85038e5685aa7f9e81e0a9004b0717fb22a5.tar.gz |
* Don't use string or vector macros when accessing compiled closures.
Diffstat (limited to 'libguile/procs.h')
-rw-r--r-- | libguile/procs.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libguile/procs.h b/libguile/procs.h index 942385d7d..0a3de0374 100644 --- a/libguile/procs.h +++ b/libguile/procs.h @@ -74,7 +74,17 @@ typedef struct #define SCM_SUBRF(x) ((SCM (*)()) SCM_CELL_WORD_1 (x)) #define SCM_SET_SUBRF(x, v) (SCM_SET_CELL_WORD_1 ((x), (v))) #define SCM_DSUBRF(x) ((double (*)()) SCM_CELL_WORD_1 (x)) -#define SCM_CCLO_SUBR(x) (SCM_VELTS(x)[0]) + +#define SCM_CCLO_LENGTH(x) (SCM_CELL_WORD_0 (x) >> 8) +#define SCM_SET_CCLO_LENGTH(x, v) (SCM_SET_CELL_WORD_0 ((x), ((v) << 8) + scm_tc7_cclo)) +#define SCM_CCLO_BASE(x) ((scm_bits_t *) SCM_CELL_WORD_1 (x)) +#define SCM_SET_CCLO_BASE(x, v) (SCM_SET_CELL_WORD_1 ((x), (v))) + +#define SCM_CCLO_REF(x, i) (SCM_PACK (SCM_CCLO_BASE (x) [i])) +#define SCM_CCLO_SET(x, i, v) (SCM_CCLO_BASE (x) [i] = SCM_UNPACK (v)) + +#define SCM_CCLO_SUBR(x) (SCM_CCLO_REF ((x), 0)) +#define SCM_SET_CCLO_SUBR(x, v) (SCM_CCLO_SET ((x), 0, (v))) #define SCM_SUBR_GENERIC(x) (SCM_SUBR_ENTRY (x).generic) #define SCM_SUBR_PROPS(x) (SCM_SUBR_ENTRY (x).properties) |