projects
/
jscl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a282a1d
)
Define (SETF %JS-VREF)
author
David Vázquez
<davazp@gmail.com>
Wed, 24 Apr 2013 21:52:43 +0000
(22:52 +0100)
committer
David Vázquez
<davazp@gmail.com>
Wed, 24 Apr 2013 21:52:43 +0000
(22:52 +0100)
ecmalisp.lisp
patch
|
blob
|
history
diff --git
a/ecmalisp.lisp
b/ecmalisp.lisp
index
85ca88d
..
7b82d82
100644
(file)
--- a/
ecmalisp.lisp
+++ b/
ecmalisp.lisp
@@
-2065,6
+2065,15
@@
(define-compilation %js-vset (var val)
(code "(" var " = " (ls-compile val) ")"))
+(define-setf-expander %js-vref (var)
+ (let ((new-value (gensym)))
+ (unless (stringp var)
+ (error "a string was expected"))
+ (values nil
+ (list var)
+ (list new-value)
+ `(%js-vset ,var ,new-value)
+ `(%js-vref ,var))))
;;; Backquote implementation.
;;;