projects
/
jscl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Beginnings of the new compiler
[jscl.git]
/
src
/
ffi.lisp
diff --git
a/src/ffi.lisp
b/src/ffi.lisp
index
73d95a0
..
29862a8
100644
(file)
--- a/
src/ffi.lisp
+++ b/
src/ffi.lisp
@@
-16,9
+16,6
@@
(defvar *js-package*
(make-package "JS"))
(defvar *js-package*
(make-package "JS"))
-(defun lisp-to-js (x) (%lisp-to-js x))
-(defun js-to-list (x) (%js-to-lisp x))
-
(defun ffi-intern-hook (symbol)
(when (eq (symbol-package symbol) *js-package*)
(let ((sym-name (symbol-name symbol))
(defun ffi-intern-hook (symbol)
(when (eq (symbol-package symbol) *js-package*)
(let ((sym-name (symbol-name symbol))
@@
-29,10
+26,7
@@
;; provide a special lambda keyword
;; cl::&rest-vector to avoid list argument
;; consing, as well as allow inline declarations.
;; provide a special lambda keyword
;; cl::&rest-vector to avoid list argument
;; consing, as well as allow inline declarations.
- (fset symbol
- (eval `(lambda (&rest ,args)
- (let ((,args (list-to-vector (mapcar #'lisp-to-js ,args))))
- (js-to-list (%js-call (%js-vref ,sym-name) ,args))))))
+ (fset symbol (eval `(%js-vref ,sym-name)))
;; Define it as a symbol macro to access to the
;; Javascript variable literally.
(%define-symbol-macro symbol `(%js-vref ,(string symbol))))))
;; Define it as a symbol macro to access to the
;; Javascript variable literally.
(%define-symbol-macro symbol `(%js-vref ,(string symbol))))))