;;; Loads ECL's separate compiler and linker where it is not built-in. ;;; Remove the `nil' and adjust the path for ECL if necessary. #+(and nil ecl (not osx)) (require "/usr/local/lib/ecl/cmp") (pushnew :method-profiling *features*) ;;; Set up `readable-gensyms'. (defvar *gensym-counter* 0) (defun %gensym () (intern (format nil "~~~A" (incf *gensym-counter*)))) (setf *compile-verbose* nil) (setf *compile-print* nil) ; Sets speed/safety options for the compiler. This notice heads each file to be ; sure. If there are problems, comment them out. (declaim (optimize (speed 3) (safety 1))) ; Unlocks CLISP's package `SOCKET' for sockets and `CL' for file-position #+clisp (eval-when (compile load eval) (when (>= (read-from-string (lisp-implementation-version) :end 4) 2.29) (pushnew :clisp-2.29 *features*))) #+clisp-2.29 (setf (ext:package-lock '("SOCKET" "COMMON-LISP")) nil) ; Works around Corman Lisp weirdness and bugs #+cormanlisp (defun to-string (array) (let ((string (make-string (length array)))) (dotimes (n (length array) string) (setf (char string n) (elt array n))))) (defvar +proj-dir+ "~/slate/") #+openmcl (setf +proj-dir+ (ccl::current-directory-name)) ;;; Uncomment the following 2 lines to gain access to `subjective-dispatch'. ;;; They can work separately or together. ;(pushnew :subjective-slate *features*) ;(pushnew :layered-slate *features*) ;;; What files constitute the compiler. (defconstant +files+ '("object" "cache" "compiler" "syntax" "prims" "repl")) ;;; Compile the files. (handler-bind ((warning #'muffle-warning) (style-warning #'muffle-warning) #+sbcl (sb-ext:compiler-note #'muffle-warning)) (let ((cmp (or #+ecl (lambda (name) (compile-file name :system-p t)) (lambda (name) (compile-file name))))) (mapc #'load +files+) (mapc cmp +files+))) ;;; Load the standard library (makes printing work): (invoke-method '|fileIn| nil "src/init.slate") ;;; Output the binary/image: (invoke-method '|saveImageNamed:| nil *lobby* "slate")