projects
/
jscl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
4bdb556
)
Merge pull request #135 from orodley/rplac-fix
author
David Vázquez
<davazp@gmail.com>
Sun, 7 Jul 2013 23:30:40 +0000
(16:30 -0700)
committer
David Vázquez
<davazp@gmail.com>
Sun, 7 Jul 2013 23:30:40 +0000
(16:30 -0700)
RPLAC[AD] should return their first argument, not the second
src/compiler.lisp
patch
|
blob
|
history
diff --git
a/src/compiler.lisp
b/src/compiler.lisp
index
1c0bad1
..
51fb547
100644
(file)
--- 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|)))