From d537b422f2b831001fc01d85cc612173432a4c93 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20V=C3=A1zquez?= Date: Fri, 5 Jul 2013 04:38:56 +0200 Subject: [PATCH] Migrate CONS --- src/compiler.lisp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/compiler.lisp b/src/compiler.lisp index d939651..6d24adf 100644 --- 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* -- 1.7.10.4