From 587d21c0521468b08f1e1b045f2d08a3a93873a5 Mon Sep 17 00:00:00 2001 From: Owen Rodley Date: Mon, 8 Jul 2013 09:32:54 +1200 Subject: [PATCH] RPLAC[AD] should return their first argument, not the second --- src/compiler.lisp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/compiler.lisp b/src/compiler.lisp index 1c0bad1..51fb547 100644 --- a/src/compiler.lisp +++ b/src/compiler.lisp @@ -1003,10 +1003,16 @@ (get tmp "cdr"))))) (define-builtin rplaca (x new) - `(= (get ,x "car") ,new)) + `(selfcall + (var (tmp ,x)) + (= (get tmp "car") ,new) + (return tmp))) (define-builtin rplacd (x new) - `(= (get ,x "cdr") ,new)) + `(selfcall + (var (tmp ,x)) + (= (get tmp "cdr") ,new) + (return tmp))) (define-builtin symbolp (x) `(bool (instanceof ,x |Symbol|))) -- 1.7.10.4