Codebase list cafeobj / b20123f
delete .hash-size. which is useless. Toshimi Sawada 5 years ago
2 changed file(s) with 9 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
6969 (parse-begin-time 0)
7070 (time-for-parsing 0.0)
7171 (rewrite-begin-time 0)
72 (time-for-rewriting 0.0)
73 (.hash-size. 0))
72 (time-for-rewriting 0.0))
7473 (declare (special *m-pattern-subst*
7574 .rwl-context-stack.
7675 .rwl-states-so-far.
8887 $$cond
8988 $$target-term
9089 $$norm
91 *do-empty-match*
92 .hash-size.))
90 *do-empty-match*))
9391 (declare (type (or null t) *perform-on-demand-reduction* *do-empty-match*)
9492 (type fixnum *steps-to-be-done* $$matches *rule-count* .rwl-states-so-far.
9593 *term-memo-hash-hit*)
131129 *term-memo-hash-hit*)
132130
133131 (defun number-hash-size ()
134 .hash-size.)
132 ;; .hash-size.
133 (hash-table-count *term-memo-table*))
135134 ;;
136135 (defun clear-rewriting-fc (module mode)
137136 (setf *m-pattern-subst* nil
174173 (defun reset-rewrite-counters ()
175174 (setf $$matches 0
176175 *rule-count* 0
177 *term-memo-hash-hit* 0
178 .hash-size. 0))
176 *term-memo-hash-hit* 0))
179177
180178 ;; reset-term-memo-table
181179 (defun reset-term-memo-table (module)
182180 (when (or *clean-memo-in-normalize*
183181 (not (eq module *memoized-module*)))
184182 (clear-term-memo-table *term-memo-table*)
185 (when *clean-memo-in-normalize*
186 (setq .hash-size. (hash-table-count *term-memo-table*)))
187183 (setq *memoized-module* module)))
188184
189185 ;; prepare-reduction-env
152152 (declaim (inline set-hashed-term))
153153 (defun set-hashed-term (term-id term-hash-table value)
154154 (setf (gethash term-id term-hash-table) value)
155 (incf (the fixnum .hash-size.)))
155 ;; (incf (the fixnum .hash-size.))
156 )
156157
157158 ;;; BASIC COMMON ROUTINES FOR REWRITING
158159
953954 ;; compute the normal form of "term"
954955 (reduce-term term strategy)
955956 (when (and term-id
956 (<= (the fixnum (hash-table-count *term-memo-table*))
957 (the fixnum *hash-count-limit*)))
957 (< (the fixnum (hash-table-count *term-memo-table*))
958 (the fixnum *hash-count-limit*)))
958959 (set-hashed-term term-id *term-memo-table* term))
959960 term))))
960961