several new FIXME notes

This commit is contained in:
ESL 2024-07-12 23:33:43 -04:00
parent 42fef5bc42
commit 7bc927bb44

View file

@ -680,8 +680,14 @@
(define (not-pat-literal? id) (not (pat-literal? id))) (define (not-pat-literal? id) (not (pat-literal? id)))
(define (ellipsis-pair? x) (define (ellipsis-pair? x)
(and (pair? x) (ellipsis? (car x)))) (and (pair? x) (ellipsis? (car x))))
; FIXME: we need undrscore? test for _ pattern to make sure it isn't bound
; FIXME: template of the form (... <templ>) must disable ellipsis? in <templ>
; FIXME: here we have a major problem: to determine if some id is an ellipsis
; we look it up in mac-env for free-id=? purposes that can ony work
; if we allocate denotations in use-env AND in mac-env(= root env?),
; which by design has to keep only very important ids, not random junk!
(define (ellipsis-denotation? den) (define (ellipsis-denotation? den)
(eq? (location-val den) '...)) ; fixme: need eq? with correct #&... (eq? (location-val den) '...)) ; FIXME: need eq? with correct location!
(define (ellipsis? x) (define (ellipsis? x)
(if ellipsis (if ellipsis
(eq? x ellipsis) (eq? x ellipsis)
@ -703,7 +709,7 @@
; Returns #f or an alist mapping each pattern var to a part of ; Returns #f or an alist mapping each pattern var to a part of
; the input. Ellipsis vars are mapped to lists of parts (or ; the input. Ellipsis vars are mapped to lists of parts (or
; lists of lists ...). ; lists of lists ...)
(define (match-pattern pat use use-env) (define (match-pattern pat use use-env)
(call-with-current-continuation (call-with-current-continuation
(lambda (return) (lambda (return)
@ -714,6 +720,9 @@
(cond (cond
[(id? pat) [(id? pat)
(if (pat-literal? pat) (if (pat-literal? pat)
; FIXME: another use of mav-env for free-id=? purposes that can ony work
; if we allocate denotations in use-env AND in mac-env(= root env?),
; which by design has to keep only very important ids, not random junk!
(continue-if (continue-if
(and (id? sexp) (eq? (xenv-ref use-env sexp) (xenv-ref mac-env pat)))) (and (id? sexp) (eq? (xenv-ref use-env sexp) (xenv-ref mac-env pat))))
(cons (cons pat sexp) bindings))] (cons (cons pat sexp) bindings))]
@ -1676,7 +1685,7 @@
; hacks for locating library files ; hacks for locating library files
(define *library-path-list* '("./")) ; will do for now (define *library-path-list* '("./")) ; will do for now; FIXME: get access to real separator!
(define (add-library-path! path) (define (add-library-path! path)
(if (base-path-separator path) (if (base-path-separator path)
@ -2099,6 +2108,7 @@
; initialization code got to be run, so we may as well do it right now ; initialization code got to be run, so we may as well do it right now
(compile-and-run-core-expr (car ic&eal)) ; defined below, value(s) ignored (compile-and-run-core-expr (car ic&eal)) ; defined below, value(s) ignored
; now just wrap the regisry in read-only env and be done with it ; now just wrap the regisry in read-only env and be done with it
; note: lookup of listnames is disabled -- this env is not for imports/d-ls
(make-readonly-environment ir #f)) (make-readonly-environment ir #f))
@ -2198,7 +2208,7 @@
; public interface to eval as per r7rs ; public interface to eval as per r7rs
; another disgusting expand-tome -- run-time barrier breaker ; another disgusting breaker of expand-time -- run-time barrier
(define (eval expr . ?env) (define (eval expr . ?env)
(define env (if (pair? ?env) (car ?env) (interaction-environment))) (define env (if (pair? ?env) (car ?env) (interaction-environment)))
(evaluate-top-form expr env)) (evaluate-top-form expr env))