From: Chris Hanson Date: Wed, 28 Feb 2018 06:27:22 +0000 (-0800) Subject: Add weak-pair support to equal?. X-Git-Tag: mit-scheme-pucked-x11-0.3.1~7^2~224 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=4b71c8283e44426859c74b0eb08e59d6c6b3b783;p=mit-scheme.git Add weak-pair support to equal?. --- diff --git a/src/runtime/equals.scm b/src/runtime/equals.scm index 6a738d696..b407177cb 100644 --- a/src/runtime/equals.scm +++ b/src/runtime/equals.scm @@ -62,6 +62,10 @@ USA. ((string? x) (and (string? y) (string=? x y))) + ((weak-pair? x) + (and (weak-pair? y) + (equal? (%weak-car x) (%weak-car y)) + (equal? (weak-cdr x) (weak-cdr y)))) ((cell? x) (and (cell? y) (equal? (cell-contents x) diff --git a/src/runtime/runtime.pkg b/src/runtime/runtime.pkg index 8c7bf7cce..778019633 100644 --- a/src/runtime/runtime.pkg +++ b/src/runtime/runtime.pkg @@ -207,6 +207,8 @@ USA. add-boot-init! defer-boot-action run-deferred-boot-actions) + (export (runtime equality) + %weak-car) (export (runtime predicate) set-predicate-tag!) (export (runtime rep)