From: Chris Hanson Date: Wed, 10 Jan 2018 04:25:25 +0000 (-0800) Subject: Eliminate unused (and not fully thought out) unregister-predicate!. X-Git-Tag: mit-scheme-pucked-x11-0.3.1~7^2~387 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=bca1599e101cb93d50fb24bab803cf4da2d6762c;p=mit-scheme.git Eliminate unused (and not fully thought out) unregister-predicate!. --- diff --git a/src/runtime/predicate-metadata.scm b/src/runtime/predicate-metadata.scm index 4574de8ed..c4c97fc7e 100644 --- a/src/runtime/predicate-metadata.scm +++ b/src/runtime/predicate-metadata.scm @@ -44,14 +44,12 @@ USA. (define get-predicate-tag) (define set-predicate-tag!) -(define delete-predicate-tag!) (add-boot-init! (lambda () (let ((table (make-hashed-metadata-table))) (set! predicate? (table 'has?)) (set! get-predicate-tag (table 'get)) (set! set-predicate-tag! (table 'put!)) - (set! delete-predicate-tag! (table 'delete!)) (set! register-predicate! register-predicate!/after-boot) unspecific))) @@ -91,9 +89,6 @@ USA. (set-tag<=! (predicate->tag predicate 'set-predicate<=!) (predicate->tag superset 'set-predicate<=!))) -(define (unregister-predicate! predicate) - (delete-tag! (predicate->tag predicate))) - (define (predicate->tag predicate #!optional caller) (let ((tag (get-predicate-tag predicate #f))) (if (not tag) @@ -164,7 +159,7 @@ USA. (subsets tag-subsets) (supersets tag-supersets)) -(set-record-type-unparser-method! +(define-unparser-method tag? (simple-unparser-method 'tag (lambda (tag) (list (tag-name tag))))) @@ -188,23 +183,6 @@ USA. (event-distributor/invoke! event:predicate-metadata 'set-tag<=! tag superset) (%link! tag superset)) -(define (delete-tag! tag) - (event-distributor/invoke! event:predicate-metadata 'delete-tag! tag) - ;; Directly link subsets to supersets. - (for-each (lambda (subset) - (for-each (lambda (superset) - (%link! subset superset)) - (get-tag-supersets tag))) - (get-tag-subsets tag)) - ;; Delete this tag from subsets and supersets. - (for-each (lambda (subset) - (hash-table-delete! (tag-supersets subset) tag)) - (get-tag-subsets tag)) - (for-each (lambda (superset) - (hash-table-delete! (tag-subsets superset) tag)) - (get-tag-supersets tag)) - (delete-predicate-tag! tag)) - (define (%link! subset superset) (hash-table-set! (tag-subsets superset) subset subset) (hash-table-set! (tag-supersets subset) superset superset)) diff --git a/src/runtime/runtime.pkg b/src/runtime/runtime.pkg index da18d4764..f9c7eff66 100644 --- a/src/runtime/runtime.pkg +++ b/src/runtime/runtime.pkg @@ -1823,10 +1823,8 @@ USA. predicate-untagger predicate? register-predicate! - set-predicate<=! - unregister-predicate!) + set-predicate<=!) (export (runtime) - delete-tag! event:predicate-metadata get-tag-subsets get-tag-supersets