From f11d94960bc28406e009d39161ea93b89888cdb5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20V=C3=A1zquez?= Date: Mon, 22 Apr 2013 21:11:18 +0100 Subject: [PATCH] Fix FFI contributions --- ecmalisp.js | 15 +++++++++++---- ecmalisp.lisp | 12 ++++++------ 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/ecmalisp.js b/ecmalisp.js index ce395aa..59c8aa1 100644 --- a/ecmalisp.js +++ b/ecmalisp.js @@ -2832,6 +2832,13 @@ var l155 = {name: "EXPORT"}; ((v318)["value"] = v318); return l155.fvalue(pv, l47.fvalue(pv, v318), v313); })() : l5.value); + (((v313 === l136.fvalue(pv, "JS"))?l4.value: l5.value) !== l5.value ? (function(){ + (v318).fvalue = (function (values){ + checkArgsAtMost(arguments, 1); + return l111.fvalue(values, "testing"); + }); + return l155.fvalue(pv, l47.fvalue(pv, v318), v313); + })() : l5.value); ((v317)[v311] = v318); return values(v318, l5.value); })((function(){ @@ -3773,9 +3780,9 @@ var l183 = {name: "READ-SYMBOL"}; })()) : l5.value); (v422 = l136.fvalue(pv, v422)); return ((function(v426){ - return (v426 !== l5.value ? v426 : ((v422 === (function(v427){ - return (v427 !== l5.value ? v427 : l136.fvalue(pv, "JS")); - })(l136.fvalue(pv, "KEYWORD")))?l4.value: l5.value)); + return (v426 !== l5.value ? v426 : (function(v427){ + return (v427 !== l5.value ? v427 : ((v422 === l136.fvalue(pv, "JS"))?l4.value: l5.value)); + })(((v422 === l136.fvalue(pv, "KEYWORD"))?l4.value: l5.value))); })(v424) !== l5.value ? l154.fvalue(values, v423, v422) : l150.fvalue(values, v423, v422)); })(l75.fvalue(pv, v420),l5.value,l5.value,l5.value,l5.value); })(); @@ -9903,7 +9910,7 @@ var l369 = {name: "VALUES-ARRAY"}; return l120; })(); var l370 = {name: "COMPILE-FUNCALL"}; -var l371 = {name: "G868"}; +var l371 = {name: "G907"}; (function(){ (l370).fvalue = (function(v1170){ ((v1170)["fname"] = "COMPILE-FUNCALL"); diff --git a/ecmalisp.lisp b/ecmalisp.lisp index 9f3e726..6dac3fb 100644 --- a/ecmalisp.lisp +++ b/ecmalisp.lisp @@ -818,10 +818,9 @@ (oset symbol "value" symbol) (export (list symbol) package)) (when (eq package (find-package "JS")) - (in-package :js - `(defun ,symbol (args) - (apply #'%js-call ,(symbol-name symbol) - args))) + (fset symbol (lambda (&rest args) + ;; call to %js-call here! + )) (export (list symbol) package)) (oset symbols name symbol) (values symbol nil))))))) @@ -1124,8 +1123,9 @@ (setq package (find-package package)) ;; TODO: PACKAGE:SYMBOL should signal error if SYMBOL is not an ;; external symbol from PACKAGE. - (if (or internalp (eq package (or (find-package "KEYWORD") - (find-package "JS")))) + (if (or internalp + (eq package (find-package "KEYWORD")) + (eq package (find-package "JS"))) (intern name package) (find-symbol name package)))) -- 1.7.10.4