projects
/
jscl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6221b6a
)
Migrate FUNCTIONP, %WRITE-STRING and /DEBUG
author
David Vázquez
<davazp@gmail.com>
Sun, 23 Jun 2013 19:44:51 +0000
(21:44 +0200)
committer
David Vázquez
<davazp@gmail.com>
Sun, 23 Jun 2013 19:44:51 +0000
(21:44 +0200)
src/compiler.lisp
patch
|
blob
|
history
diff --git
a/src/compiler.lisp
b/src/compiler.lisp
index
57a7e79
..
3d31ab2
100644
(file)
--- a/
src/compiler.lisp
+++ b/
src/compiler.lisp
@@
-1228,16
+1228,16
@@
`(code "globalEval(xstring(" ,string "))")))
(define-builtin %throw (string)
`(code "globalEval(xstring(" ,string "))")))
(define-builtin %throw (string)
- (js!selfcall "throw " string ";" ))
+ (js!selfcall* `(throw ,string)))
(define-builtin functionp (x)
(define-builtin functionp (x)
- (js!bool `(code "(typeof " ,x " == 'function')")))
+ (js!bool `(=== (typeof ,x) "function")))
(define-builtin %write-string (x)
(define-builtin %write-string (x)
- `(code "lisp.write(" ,x ")"))
+ `(call (get |lisp| "write") ,x))
(define-builtin /debug (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
;;; Storage vectors. They are used to implement arrays and (in the