From: David Vázquez Date: Mon, 24 Jun 2013 01:04:12 +0000 (+0200) Subject: Migrate STRINGP X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=0965c7f2cbc0491cd56054ac7e7f096edce0a391;p=jscl.git Migrate STRINGP --- diff --git a/src/compiler.lisp b/src/compiler.lisp index f58fe1a..d8e9b6d 100644 --- 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