From: David Vázquez Date: Sun, 7 Jul 2013 23:30:40 +0000 (-0700) Subject: Merge pull request #135 from orodley/rplac-fix X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=d03a858c0defd88b02406faf82b5fd38268927bf;hp=4bdb55688ed34edd92f10defe1d98f51631b58e7;p=jscl.git Merge pull request #135 from orodley/rplac-fix RPLAC[AD] should return their first argument, not the second --- 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|)))