projects
/
jscl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6c4af9e
)
Migrate CONS
author
David Vázquez
<davazp@gmail.com>
Fri, 5 Jul 2013 02:38:56 +0000
(
04:38
+0200)
committer
David Vázquez
<davazp@gmail.com>
Fri, 5 Jul 2013 02:38:56 +0000
(
04:38
+0200)
src/compiler.lisp
patch
|
blob
|
history
diff --git
a/src/compiler.lisp
b/src/compiler.lisp
index
d939651
..
6d24adf
100644
(file)
--- a/
src/compiler.lisp
+++ b/
src/compiler.lisp
@@
-1071,9
+1071,10
@@
(define-builtin consp (x)
(js!bool
- (js!selfcall
- "var tmp = " x ";"
- "return (typeof tmp == 'object' && 'car' in tmp);" )))
+ (js!selfcall*
+ `(var (tmp ,x))
+ `(return (and (== (typeof tmp) "object")
+ (in "car" tmp))))))
(define-builtin car (x)
(js!selfcall*