From 28a70142483b776481c771a749999dba20676357 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20V=C3=A1zquez?= Date: Sun, 23 Jun 2013 21:44:51 +0200 Subject: [PATCH] Migrate FUNCTIONP, %WRITE-STRING and /DEBUG --- src/compiler.lisp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler.lisp b/src/compiler.lisp index 57a7e79..3d31ab2 100644 --- a/src/compiler.lisp +++ b/src/compiler.lisp @@ -1228,16 +1228,16 @@ `(code "globalEval(xstring(" ,string "))"))) (define-builtin %throw (string) - (js!selfcall "throw " string ";" )) + (js!selfcall* `(throw ,string))) (define-builtin functionp (x) - (js!bool `(code "(typeof " ,x " == 'function')"))) + (js!bool `(=== (typeof ,x) "function"))) (define-builtin %write-string (x) - `(code "lisp.write(" ,x ")")) + `(call (get |lisp| "write") ,x)) (define-builtin /debug (x) - `(code "console.log(xstring(" ,x "))")) + `(call (get |console| "log") (call |xstring| ,x))) ;;; Storage vectors. They are used to implement arrays and (in the -- 1.7.10.4