From c26d6b762ec8713d869b003619d733748045d132 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20V=C3=A1zquez?= Date: Sun, 23 Jun 2013 02:24:44 +0200 Subject: [PATCH] Migrate some more primitives --- src/compiler.lisp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler.lisp b/src/compiler.lisp index 36eac60..224d237 100644 --- a/src/compiler.lisp +++ b/src/compiler.lisp @@ -1326,16 +1326,16 @@ "return tmp === undefined? " (ls-compile nil) " : tmp;" ))) (define-raw-builtin oget (object key &rest keys) - `(code "js_to_lisp(" ,(ls-compile `(oget* ,object ,key ,@keys)) ")")) + `(call js_to_lisp ,(ls-compile `(oget* ,object ,key ,@keys)))) (define-raw-builtin oset (value object key &rest keys) (ls-compile `(oset* (lisp-to-js ,value) ,object ,key ,@keys))) (define-builtin objectp (x) - (js!bool `(code "(typeof (" ,x ") === 'object')"))) + (js!bool `(=== (typeof ,x) "object"))) -(define-builtin lisp-to-js (x) `(code "lisp_to_js(" ,x ")")) -(define-builtin js-to-lisp (x) `(code "js_to_lisp(" ,x ")")) +(define-builtin lisp-to-js (x) `(call lisp_to_js ,x)) +(define-builtin js-to-lisp (x) `(code js_to_lisp ,x)) (define-builtin in (key object) -- 1.7.10.4