From 7f1f97e1c08f5fe757cede721c8b666a60af317d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Tue, 14 Feb 2023 13:41:27 +0100 Subject: [PATCH] cmp: cosmetic cleanups --- src/cmp/cmpenv-declaim.lsp | 4 ++-- src/cmp/cmpenv-declare.lsp | 4 ++-- src/cmp/cmpenv-proclaim.lsp | 2 +- src/cmp/cmpglobals.lsp | 12 ++++++------ src/cmp/cmppolicy.lsp | 10 +++++----- src/cmp/cmputil.lsp | 4 ++-- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/cmp/cmpenv-declaim.lsp b/src/cmp/cmpenv-declaim.lsp index c93efbe00..33bd27b01 100644 --- a/src/cmp/cmpenv-declaim.lsp +++ b/src/cmp/cmpenv-declaim.lsp @@ -20,7 +20,7 @@ ;;;; stem from. ;;;; -(in-package #-ecl-new "COMPILER" #+ecl-new "C-ENV") +(in-package "COMPILER") (defun process-declaim-args (args) (flet ((add-variables (env types specials) @@ -29,7 +29,7 @@ do (let ((v (c1make-global-variable name :kind 'special))) (setf env (cmp-env-register-var v env nil)))) (loop for (name . type) in types - for specialp = (or (sys:specialp name) (member name specials)) + for specialp = (or (si:specialp name) (member name specials)) for kind = (if specialp 'SPECIAL 'GLOBAL) for v = (c1make-global-variable name :type type :kind kind) do (setf env (cmp-env-register-var v env nil))) diff --git a/src/cmp/cmpenv-declare.lsp b/src/cmp/cmpenv-declare.lsp index ff0a9d47e..139ee6f35 100644 --- a/src/cmp/cmpenv-declare.lsp +++ b/src/cmp/cmpenv-declare.lsp @@ -18,10 +18,10 @@ ;;;; compiled file and do not propagate beyond it. ;;;; -(in-package #-ecl-new "COMPILER" #+ecl-new "C-ENV") +(in-package "COMPILER") (defun valid-form-p (x &optional test) - (and (si::proper-list-p x) + (and (si:proper-list-p x) (or (null test) (every test x)))) diff --git a/src/cmp/cmpenv-proclaim.lsp b/src/cmp/cmpenv-proclaim.lsp index 171329502..546335a48 100644 --- a/src/cmp/cmpenv-proclaim.lsp +++ b/src/cmp/cmpenv-proclaim.lsp @@ -32,7 +32,7 @@ (cl:SPECIAL (dolist (var (cdr decl)) (if (symbolp var) - (sys:*make-special var) + (si:*make-special var) (error "Syntax error in proclamation ~s" decl)))) (cl:OPTIMIZE (dolist (x (cdr decl)) diff --git a/src/cmp/cmpglobals.lsp b/src/cmp/cmpglobals.lsp index e4ab12f33..9df876fca 100644 --- a/src/cmp/cmpglobals.lsp +++ b/src/cmp/cmpglobals.lsp @@ -51,11 +51,11 @@ (defvar *compiler-conditions* '() "This variable determines whether conditions are printed or just accumulated.") -(defvar cl:*compile-print* nil +(defvar *compile-print* nil "This variable controls whether the compiler displays messages about each form it processes. The default value is NIL.") -(defvar cl:*compile-verbose* nil +(defvar *compile-verbose* nil "This variable controls whether the compiler should display messages about its progress. The default value is T.") @@ -305,7 +305,7 @@ be deleted if they have been opened with LoadLibrary.") ;;; If (safe-compile) is ON, some kind of run-time checks are not ;;; included in the compiled code. The default value is OFF. -(defconstant +init-env-form+ +(defvar +init-env-form+ '((*gensym-counter* 0) (*compiler-in-use* t) (*compiler-phase* 't1) @@ -336,7 +336,7 @@ be deleted if they have been opened with LoadLibrary.") (*machine* (or *machine* *default-machine*)) (*optimizable-constants* (make-optimizable-constants *machine*)) (*inline-information* - (let ((r (machine-inline-information *machine*))) - (if r (si::copy-hash-table r) (make-inline-information *machine*)))) - )) + (ext:if-let ((r (machine-inline-information *machine*))) + (si:copy-hash-table r) + (make-inline-information *machine*))))) diff --git a/src/cmp/cmppolicy.lsp b/src/cmp/cmppolicy.lsp index 9ef3d738d..c24eba1c9 100644 --- a/src/cmp/cmppolicy.lsp +++ b/src/cmp/cmppolicy.lsp @@ -39,7 +39,7 @@ for fun-name = (intern (concatenate 'string "POLICY-TO-" (symbol-name name) "-LEVEL")) collect `(defun ,fun-name (policy) - (declare (declaration ext:assume-right-type)) + (declare (ext:assume-right-type)) (loop for level from 0 to 3 when (logbitp (+ level ,i) policy) return level)))) @@ -54,9 +54,9 @@ (dolist (x arguments) (let (flags name value) (cond ((symbolp x) - (setq flags (optimization-quality-switches x 3) + (setq name x value 3 - name x)) + flags (optimization-quality-switches name value))) ((or (not (consp x)) (not (consp (cdr x))) (not (numberp (second x))) @@ -64,9 +64,9 @@ (t (setf name (first x) value (second x) - flags (optimization-quality-switches name (second x))))) + flags (optimization-quality-switches name value)))) (if (null flags) - (cmpwarn "Illegal or unknown OPTIMIZE proclamation ~s" x) + (cmpwarn "Illegal or unknown OPTIMIZE proclamation ~s." x) (setf on (logior on (car flags)) off (logior off (cdr flags)))))) ;;(format t "~%*~64b" bits) diff --git a/src/cmp/cmputil.lsp b/src/cmp/cmputil.lsp index e9e154136..0efe8c84c 100644 --- a/src/cmp/cmputil.lsp +++ b/src/cmp/cmputil.lsp @@ -40,9 +40,9 @@ (when (wild-pathname-p path) (error "Cannot coerce ~A to a physical filename~%" path)) #+windows - (namestring (si::coerce-to-file-pathname path)) + (namestring (si:coerce-to-file-pathname path)) #-windows - (enough-namestring (si::coerce-to-file-pathname path))) + (enough-namestring (si:coerce-to-file-pathname path))) (defun normalize-build-target-name (target) (ecase target