delete what nothing calls

walk-generic-toplevel and non-empty-list? had no caller left, a type
variable's id was never read, and every expression's type was recorded
in a table nothing looked up.
This commit is contained in:
2026-10-20 12:19:41 +03:00
parent eb5bf3688b
commit d2f36d35c6
4 changed files with 3 additions and 33 deletions

View File

@@ -1181,16 +1181,12 @@
;;; member access.
;;; The type of an expression as a surface type, or #f when nothing
;;; here can say. Every form it visits is recorded in `form-type', so
;;; asking once types the whole subtree.
;;; here can say.
;;;
;;; 42 -> int (. p x) -> that field's type
;;; "hi" -> (* const char) (& p) -> (* (struct point))
;;; (area 3 4) -> what `area' returns
(define (expression-type expr env)
(set-form-type! expr (compute-expression-type expr env)))
(define (compute-expression-type expr env)
(cond
((and (number? expr) (exact? expr)) 'int)
((number? expr) 'double)
@@ -1948,9 +1944,6 @@
form))
;;; Utils
(define (non-empty-list? form)
(and (list? form)
(not (null? form))))
(define (sex-fn? form)
"The `form` must be toplevel.