From 0965c7f2cbc0491cd56054ac7e7f096edce0a391 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20V=C3=A1zquez?= Date: Mon, 24 Jun 2013 03:04:12 +0200 Subject: [PATCH] Migrate STRINGP --- src/compiler.lisp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 -- 1.7.10.4