X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Ffopcompile.lisp;h=16f9daf7ea7fcdaab61edec64f9c528e98384862;hb=2c06e3056fe6aa820817a927fa0e840eb7b8edb7;hp=3afa7afbc0f52fa57d3b6af7bd81cd1ef9f93993;hpb=8f8966edb633dabfcde5d149c3e3a7fad26b7ff2;p=sbcl.git diff --git a/src/compiler/fopcompile.lisp b/src/compiler/fopcompile.lisp index 3afa7af..16f9daf 100644 --- a/src/compiler/fopcompile.lisp +++ b/src/compiler/fopcompile.lisp @@ -182,11 +182,7 @@ ;;; Check that a literal form is fopcompilable. It would not for example ;;; when the form contains structures with funny MAKE-LOAD-FORMS. (defun constant-fopcompilable-p (constant) - (let ((things-processed nil) - (count 0)) - (declare (type (or list hash-table) things-processed) - (type (integer 0 #.(1+ list-to-hash-table-threshold)) count) - (inline member)) + (let ((xset (alloc-xset))) (labels ((grovel (value) ;; Unless VALUE is an object which which obviously ;; can't contain other objects @@ -196,22 +192,9 @@ number character string)) - (etypecase things-processed - (list - (when (member value things-processed :test #'eq) - (return-from grovel nil)) - (push value things-processed) - (incf count) - (when (> count list-to-hash-table-threshold) - (let ((things things-processed)) - (setf things-processed - (make-hash-table :test 'eq)) - (dolist (thing things) - (setf (gethash thing things-processed) t))))) - (hash-table - (when (gethash value things-processed) - (return-from grovel nil)) - (setf (gethash value things-processed) t))) + (if (xset-member-p value xset) + (return-from grovel nil) + (add-to-xset value xset)) (typecase value (cons (grovel (car value)) @@ -266,7 +249,7 @@ (fopcompile-constant form for-value-p)) ((symbolp form) (multiple-value-bind (macroexpansion macroexpanded-p) - (macroexpand form *lexenv*) + (sb!xc:macroexpand form *lexenv*) (if macroexpanded-p ;; Symbol macro (fopcompile macroexpansion path for-value-p) @@ -292,7 +275,7 @@ for-value-p)))))))))) ((listp form) (multiple-value-bind (macroexpansion macroexpanded-p) - (macroexpand form *lexenv*) + (sb!xc:macroexpand form *lexenv*) (if macroexpanded-p (fopcompile macroexpansion path for-value-p) (destructuring-bind (operator &rest args) form @@ -321,7 +304,7 @@ for-value-p))) ((if) (fopcompile-if args path for-value-p)) - ((progn) + ((progn locally) (loop for (arg . next) on args do (fopcompile arg path (if next