From 77f1c7b075b0e2f59e7591735780bc6ef3e4b55b Mon Sep 17 00:00:00 2001 From: Douglas Katzman Date: Fri, 7 Jul 2017 09:25:20 -0400 Subject: [PATCH] Remove redundant SPECIAL declaims. OAOO and all that --- src/compiler/ir1tran.lisp | 16 ---------------- src/compiler/macros.lisp | 14 ++++++++++++++ src/compiler/main.lisp | 14 ++------------ 3 files changed, 16 insertions(+), 28 deletions(-) diff --git a/src/compiler/ir1tran.lisp b/src/compiler/ir1tran.lisp index 0c845d943..97d3b2cdd 100644 --- a/src/compiler/ir1tran.lisp +++ b/src/compiler/ir1tran.lisp @@ -21,20 +21,6 @@ (declaim (type index *current-form-number*)) (defvar *current-form-number*) -;;; *SOURCE-PATHS* is a hashtable from source code forms to the path -;;; taken through the source to reach the form. This provides a way to -;;; keep track of the location of original source forms, even when -;;; macroexpansions and other arbitary permutations of the code -;;; happen. This table is initialized by calling FIND-SOURCE-PATHS on -;;; the original source. -;;; -;;; It is fairly useless to store symbols, characters, or fixnums in -;;; this table, as 42 is EQ to 42 no matter where in the source it -;;; appears. GET-SOURCE-PATH and NOTE-SOURCE-PATH functions should be -;;; always used to access this table. -(declaim (hash-table *source-paths*)) -(defvar *source-paths*) - (declaim (inline source-form-has-path-p)) (defun source-form-has-path-p (form) (not (typep form '(or symbol fixnum character)))) @@ -99,8 +85,6 @@ gives non-ANSI, early-CMU-CL behavior. It can be useful for improving the efficiency of stable code.") -(defvar *fun-names-in-this-file* nil) - (defvar *post-binding-variable-lexenv* nil) ;;;; namespace management utilities diff --git a/src/compiler/macros.lisp b/src/compiler/macros.lisp index 69fe42910..860270acb 100644 --- a/src/compiler/macros.lisp +++ b/src/compiler/macros.lisp @@ -707,6 +707,20 @@ ,node #'closure-needing-ir1-environment-from-node))) +;;; *SOURCE-PATHS* is a hashtable from source code forms to the path +;;; taken through the source to reach the form. This provides a way to +;;; keep track of the location of original source forms, even when +;;; macroexpansions and other arbitary permutations of the code +;;; happen. This table is initialized by calling FIND-SOURCE-PATHS on +;;; the original source. +;;; +;;; It is fairly useless to store symbols, characters, or fixnums in +;;; this table, as 42 is EQ to 42 no matter where in the source it +;;; appears. GET-SOURCE-PATH and NOTE-SOURCE-PATH functions should be +;;; always used to access this table. +(declaim (hash-table *source-paths*)) +(defvar *source-paths*) + (defmacro with-source-paths (&body forms) (with-unique-names (source-paths) `(let* ((,source-paths (make-hash-table :test 'eq)) diff --git a/src/compiler/main.lisp b/src/compiler/main.lisp index 72d674f6b..49b68394f 100644 --- a/src/compiler/main.lisp +++ b/src/compiler/main.lisp @@ -13,18 +13,6 @@ (in-package "SB!C") -;;; FIXME: Doesn't this belong somewhere else, like early-c.lisp? -(declaim (special *constants* *free-vars* *component-being-compiled* - *free-funs* *source-paths* - *undefined-warnings* *compiler-error-count* - *compiler-warning-count* *compiler-style-warning-count* - *compiler-note-count* - *compiler-error-bailout* - *last-format-string* *last-format-args* - *last-message-count* *last-error-context* - *lexenv* *fun-names-in-this-file* - *allow-instrumenting*)) - ;;; Whether reference to a thing which cannot be defined causes a full ;;; warning. (defvar *flame-on-necessarily-undefined-thing* nil) @@ -1698,6 +1686,8 @@ necessary, since type inference may take arbitrarily long to converge.") (lexenv-handled-conditions *lexenv*)))) (and ctype (handle-p condition (car ctype)))))) +(defvar *fun-names-in-this-file* nil) + ;;; Read all forms from INFO and compile them, with output to ;;; *COMPILE-OBJECT*. Return (VALUES ABORT-P WARNINGS-P FAILURE-P). (defun sub-compile-file (info) -- 2.11.4.GIT