diff options
author | Andy Wingo <wingo@pobox.com> | 2008-09-30 23:41:16 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2008-09-30 23:41:16 +0200 |
commit | 2bd859c81ac55b8f229778b0fff23a35b0d6e904 (patch) | |
tree | 74f7bd1ba7b7470b6e56fc5e20e1d49bc3c7e093 /libguile/vm-engine.h | |
parent | 887ce75ae828fabd9a76d8e719bd3070c334eb44 (diff) | |
download | guile-2bd859c81ac55b8f229778b0fff23a35b0d6e904.tar.gz |
fix compilation of quasiquote with splicing and improper lists
* libguile/vm-engine.h (POP_CONS_MARK): New macro, analagous to
POP_LIST_MARK; used in quasiquote on improper lists.
* libguile/vm-i-system.c (cons-mark): New instruction. You know the
drill, remove all your .go files please.
* module/system/il/compile.scm (codegen): Compile quasiquoted improper
lists with splices correctly. Additionally check that we don't have
slices in the CDR of an improper list.
* testsuite/t-quasiquote.scm: Add a test for unquote-splicing in improper
lists.
Diffstat (limited to 'libguile/vm-engine.h')
-rw-r--r-- | libguile/vm-engine.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libguile/vm-engine.h b/libguile/vm-engine.h index 0d0c03d8a..936bbb48b 100644 --- a/libguile/vm-engine.h +++ b/libguile/vm-engine.h @@ -356,6 +356,19 @@ do { \ PUSH (l); \ } while (0) +#define POP_CONS_MARK() \ +do { \ + SCM o, l; \ + POP (l); \ + POP (o); \ + while (!SCM_UNBNDP (o)) \ + { \ + CONS (l, o, l); \ + POP (o); \ + } \ + PUSH (l); \ +} while (0) + /* * Instruction operation |