From f17769b11a9bb22773bf9278644a03399eef9abf Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Sun, 18 Mar 2018 15:01:00 +0100 Subject: [PATCH] Remove ##core#aliased marking This is no longer needed, as all lookups are done either through the syntax environment or via fully qualified symbols; there are no more unqualified global symbols around. This also brings us closer towards fixing #1131 --- modules.scm | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/modules.scm b/modules.scm index 1a88dc92..df1fe24a 100644 --- a/modules.scm +++ b/modules.scm @@ -34,8 +34,8 @@ (fixnum) (not inline ##sys#alias-global-hook) (hide check-for-redef find-export find-module/import-library - mark-imported-symbols match-functor-argument merge-se - module-indirect-exports module-rename register-undefined)) + match-functor-argument merge-se module-indirect-exports + module-rename register-undefined)) (import scheme chicken.base @@ -251,14 +251,6 @@ (set! ##sys#module-table (cons (cons name mod) ##sys#module-table)) mod) ) -(define (mark-imported-symbols se) - (for-each - (lambda (imp) - (when (and (symbol? (cdr imp)) (not (eq? (car imp) (cdr imp)))) - (dm `(MARKING: ,(cdr imp))) - (putp (cdr imp) '##core#aliased #t))) - se)) - (define (module-indirect-exports mod) (let ((exports (module-export-list mod)) (mname (module-name mod)) @@ -382,7 +374,6 @@ (##sys#macro-environment) (##sys#current-environment) iexps vexports sexps nexps))) - (mark-imported-symbols iexps) (for-each (lambda (sexp) (set-car! (cdr sexp) (merge-se (or (cadr sexp) '()) senv))) @@ -533,7 +524,6 @@ (##sys#macro-environment) (##sys#current-environment) iexports vexports sexports sdlist))) - (mark-imported-symbols iexports) (for-each (lambda (m) (let ((se (merge-se (cadr m) new-se))) ;XXX needed? @@ -720,7 +710,6 @@ (dd `(IMPORT: ,loc)) (dd `(V: ,(if cm (module-name cm) ') ,(map-se vsv))) (dd `(S: ,(if cm (module-name cm) ') ,(map-se vss))) - (mark-imported-symbols vsv) ; mark imports as ##core#aliased (for-each (lambda (imp) (and-let* ((id (car imp)) @@ -778,9 +767,6 @@ (module-rename sym (module-name mod)))) (else sym))) (cond ((##sys#qualified-symbol? sym) sym) - ((getp sym '##core#aliased) - (dm "(ALIAS) marked: " sym) - sym) ((namespaced-symbol? sym) sym) ((assq sym ((##sys#active-eval-environment))) => (lambda (a) -- 2.11.0