Codebase list cafeobj / 6a9c618
Delete obsolete constructs record/class. tswd 5 years ago
3 changed file(s) with 10 addition(s) and 80 deletion(s). Raw diff Collapse all Expand all
297297
298298 ;;; top level modexp printer ---------------------------------------------------
299299
300 (declaim (inline get-context-name))
300301 (defun get-context-name (obj)
301302 (let ((context-mod (get-object-context obj)))
302303 (if context-mod
986987 ;;;-----------------------------------------------------------------------------
987988 ;;; MODULE NAME
988989 ;;;-----------------------------------------------------------------------------
989
990 (declaim (inline get-module-print-name))
990991 (defun get-module-print-name (module)
991992 (unless (module-p module) (break "internal error, get-module-print-name"))
992993 (let ((name (module-name module)))
4646 ;;;*****************************
4747 ;;; Application form constructor________________________________________________
4848 ;;;*****************************
49
50 (defmacro method-is-object-constructor (__method__)
51 `(eq (method-constructor ,__method__) ':object))
52
53 (defmacro method-is-record-constructor (__method__)
54 `(eq (method-constructor ,__method__) ':record))
55
56 (defmacro make-applform-simple (_sort _meth &optional _subterms)
57 `(make-application-term ,_meth ,_sort ,_subterms))
58
49 (declaim (inline make-appl-form))
5950 (defun make-applform (sort meth &optional args)
60 (declare (type sort* sort)
61 (type method meth)
62 (type list args))
63 (make-applform-simple sort meth args))
51 (declare (optimize (speed 3) (safety 0)))
52 (make-application-term meth sort args))
6453
6554 ;;; ******************
6655 ;;; RESET-REDUCED-FLAG---------------------------------------------------------
140129 (declare (type term term)
141130 (values (or null t)))
142131 (and (term? term)
143 (let ((sort (term$sort (term-body term))))
132 (let ((sort (term-sort term)))
144133 (and (not (sort= *bottom-sort* sort))
145134 (sort<= sort *syntax-err-sort* *chaos-sort-order*)))))
146135
194183 (declare (type method head)
195184 (type list subterms)
196185 (values term))
197 (make-applform-simple *type-err-sort* head subterms))
186 (make-applform *type-err-sort* head subterms))
198187
199188 (defun make-inheritedly-ill-term (head subterms)
200189 (declare (type method head)
201190 (type list subterms)
202191 (values term))
203 (make-applform-simple *type-err-sort* head subterms))
192 (make-applform *type-err-sort* head subterms))
204193
205194 ;;; TERM-ERROR-OPERATORS&VARIABLES
206195 ;;; returns the list of error operators contained in term.
17091709 (flet ((make-form (sort method arg-list)
17101710 (make-applform sort method arg-list)))
17111711 (let ((result nil))
1712 (if *fill-rc-attribute*
1713 (let ((attrpos nil)
1714 (class nil))
1715 (if (method-is-object-constructor method)
1716 (progn (setf attrpos 2) (setf class t))
1717 (when (method-is-record-constructor method)
1718 (setf attrpos 1)))
1719 (if attrpos
1720 (let ((attrs (nth attrpos arg-list))
1721 (cr-sort (method-coarity method)))
1722 (when class
1723 (replace-class-id-with-var cr-sort arg-list))
1724 (if attrs
1725 (cond ((sort= (term-sort attrs) *attribute-list-sort*)
1726 (let* ((attr-method (term-head attrs))
1727 (sv-pairs (list-ac-subterms attrs
1728 attr-method))
1729 (flg nil))
1730 (dolist (sv-pair sv-pairs)
1731 (block next
1732 (when (sort= (term-sort sv-pair)
1733 *attribute-list-sort*)
1734 (setf flg t)
1735 (return-from next nil))
1736 ;; normal sv-pair
1737 (replace-attr-id-with-var cr-sort sv-pair)))
1738 (unless flg
1739 (when (or *parsing-axiom-lhs*
1740 *parse-lhs-attr-vars*)
1741 ;; (break "1")
1742 (setq *parse-lhs-attr-vars* t)
1743 (setf (nth attrpos arg-list)
1744 (make-right-assoc-normal-form
1745 attr-method
1746 (nconc sv-pairs
1747 (list
1748 *attribute-list-aux-variable*))))))
1749 (setq result (make-form sort method arg-list))
1750 result))
1751 (t ;; single sv-pair & not list of attribure.
1752 (replace-attr-id-with-var cr-sort attrs)
1753 (when (or *parsing-axiom-lhs*
1754 *parse-lhs-attr-vars*)
1755 ;; (break "2")
1756 (setq *parse-lhs-attr-vars* t)
1757 (setf (nth attrpos arg-list)
1758 (make-applform
1759 *attribute-list-sort*
1760 *attribute-list-constructor*
1761 (list attrs
1762 *attribute-list-aux-variable*))))
1763 (setq result (make-form sort method arg-list))
1764 result))
1765 ;; no attributes
1766 (progn
1767 (setq result (make-form sort method arg-list))
1768 )))
1769 (progn
1770 (setq result (make-form sort method arg-list))
1771 )))
1772 ;; normal term
1773 (setq result (make-form sort method arg-list)))
1712 ;; normal term
1713 (setq result (make-form sort method arg-list))
17741714 ;; special treatment of if_then_else_fi
17751715 ;; special treatment of generic operators
17761716 (when (eq (term-head result) *bool-if*)