METHOD-CALL JS macro
[jscl.git] / src / toplevel.lisp
index a396554..7dddf6e 100644 (file)
 ;; You should have received a copy of the GNU General Public License
 ;; along with JSCL.  If not, see <http://www.gnu.org/licenses/>.
 
+(/debug "loading toplevel.lisp!")
 
 (defun eval (x)
-  (js-eval (ls-compile-toplevel x t)))
+  (js-eval (compile-toplevel x t)))
 
 (defvar * nil)
 (defvar ** nil)
 
 (setq *package* *user-package*)
 
+(defvar *root* (%js-vref "window"))
+
 ;;; Set some external entry point to the Lisp implementation to the
 ;;; console. It would not be necessary when FFI is finished.
 (let ((*root* #j:lisp))
   (setf #j:read #'ls-read-from-string)
   (setf #j:print #'prin1-to-string)
   (setf #j:eval #'eval)
-  (setf #j:compile (lambda (s) (ls-compile-toplevel s t)))
+  (setf #j:compile (lambda (s) (compile-toplevel s t)))
   (setf #j:evalString (lambda (str) (eval (ls-read-from-string str))))
   (setf #j:evalInput (lambda (str) (eval-interactive (ls-read-from-string str))))
-  (setf #j:compileString (lambda (str) (ls-compile-toplevel (ls-read-from-string str) t))))
+  (setf #j:compileString (lambda (str) (compile-toplevel (ls-read-from-string str) t))))