projects
/
jscl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
51f2f4c
)
Migrate STRINGP
author
David Vázquez
<davazp@gmail.com>
Mon, 24 Jun 2013 01:04:12 +0000
(
03:04
+0200)
committer
David Vázquez
<davazp@gmail.com>
Mon, 24 Jun 2013 01:04:12 +0000
(
03:04
+0200)
src/compiler.lisp
patch
|
blob
|
history
diff --git
a/src/compiler.lisp
b/src/compiler.lisp
index
f58fe1a
..
d8e9b6d
100644
(file)
--- a/
src/compiler.lisp
+++ b/
src/compiler.lisp
@@
-1184,9
+1184,11
@@
(define-builtin stringp (x)
(js!bool
- (js!selfcall
- "var x = " x ";"
- "return typeof(x) == 'object' && 'length' in x && x.stringp == 1;")))
+ (js!selfcall*
+ `(var (x ,x))
+ `(return (and (and (===(typeof x) "object")
+ (in "length" x))
+ (== (get x "stringp") 1))))))
(define-raw-builtin funcall (func &rest args)
(js!selfcall