New function C:INSTALL-C-COMPILER restores the C compiler once the bytecodes compiler has been activated

This commit is contained in:
Juanjo Garcia-Ripoll 2012-05-31 10:50:24 +02:00
parent 59d3706594
commit f53d22e57d
2 changed files with 14 additions and 0 deletions

View file

@ -956,4 +956,17 @@ from the C language code. NIL means \"do not create the file\"."
(setf *features* (delete :ecl-bytecmp *features*))
(let* ((compile #'compile)
(disassemble #'disassemble)
(compile-file #'compile-file)
(compile-file-pathname #'compile-file-pathname))
(defun install-c-compiler ()
(ext::package-lock (find-package :cl) nil)
(setf *features* (delete :ecl-bytecmp *features*))
(setf (fdefinition 'disassemble) disassemble
(fdefinition 'compile) compile
(fdefinition 'compile-file) #'compile-file
(fdefinition 'compile-file-pathname) #'compile-file-pathname)
(ext::package-lock (find-package :cl) t)))
(provide 'cmp)

View file

@ -47,6 +47,7 @@
"*SUPPRESS-COMPILER-WARNINGS*"
"*SUPPRESS-COMPILER-NOTES*"
"*SUPPRESS-COMPILER-MESSAGES*"
"INSTALL-C-COMPILER"
"UPDATE-COMPILER-FEATURES")
(:import-from "SI" "GET-SYSPROP" "PUT-SYSPROP" "REM-SYSPROP" "MACRO"
"*COMPILER-CONSTANTS*" "REGISTER-GLOBAL" "CMP-ENV-REGISTER-MACROLET"