From f6d21b2fa378830653b34d6ce73dd54759e4e309 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Wed, 28 Nov 2018 03:48:20 +0000 Subject: [PATCH] Explain what commute-flonum-predicate is doing. --- src/compiler/machines/x86-64/rulflo.scm | 4 ++++ 1 file changed, 4 insertions(+) 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?) -- 2.25.1