From: Taylor R Campbell Date: Wed, 28 Nov 2018 03:48:20 +0000 (+0000) Subject: Explain what commute-flonum-predicate is doing. X-Git-Tag: mit-scheme-pucked-10.1.7~3^2~160 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=f6d21b2fa378830653b34d6ce73dd54759e4e309;p=mit-scheme.git Explain what commute-flonum-predicate is doing. --- diff --git a/src/compiler/machines/x86-64/rulflo.scm b/src/compiler/machines/x86-64/rulflo.scm index 3cdebd196..c0ad9be80 100644 --- a/src/compiler/machines/x86-64/rulflo.scm +++ b/src/compiler/machines/x86-64/rulflo.scm @@ -318,6 +318,10 @@ USA. (flonum-source-reference! source) operand)))) +;;; For predicate giving (if (predicate x y) a b), return the +;;; equivalent (if (predicate* y x) a b). The unary predicates are +;;; treated as if y = 0. (XXX Separate this into another function.) + (define (commute-flonum-predicate predicate) (case predicate ((FLONUM-EQUAL? FLONUM-ZERO?) 'FLONUM-EQUAL?)