- ;; Set the initial global environment to be equal to the host global
- ;; environment at this point of the compilation.
- (eval-when-compile
- (let ((tmp (ls-compile
- `(progn
- (setq *environment* ',*environment*)
- (setq *variable-counter* ',*variable-counter*)
- (setq *function-counter* ',*function-counter*)
- (setq *literal-counter* ',*literal-counter*)
- (setq *gensym-counter* ',*gensym-counter*)
- (setq *block-counter* ',*block-counter*)
- ,@(mapcar (lambda (s)
- `(oset *package* ,(symbol-name (car s))
- (js-vref ,(cdr s))))
- *literal-symbols*)))))
- (setq *toplevel-compilations*
- (append *toplevel-compilations* (list tmp)))))
-