From f53d22e57df71e1d5116cae604acf3c438bcd514 Mon Sep 17 00:00:00 2001 From: Juanjo Garcia-Ripoll Date: Thu, 31 May 2012 10:50:24 +0200 Subject: [PATCH] New function C:INSTALL-C-COMPILER restores the C compiler once the bytecodes compiler has been activated --- src/cmp/cmpmain.lsp | 13 +++++++++++++ src/cmp/cmppackage.lsp | 1 + 2 files changed, 14 insertions(+) diff --git a/src/cmp/cmpmain.lsp b/src/cmp/cmpmain.lsp index bd37beb57..e428d3ec4 100755 --- a/src/cmp/cmpmain.lsp +++ b/src/cmp/cmpmain.lsp @@ -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) diff --git a/src/cmp/cmppackage.lsp b/src/cmp/cmppackage.lsp index ff46865fe..ad5990d49 100644 --- a/src/cmp/cmppackage.lsp +++ b/src/cmp/cmppackage.lsp @@ -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"