[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 01/08: Fix error when argument to < not a real
From: |
Andy Wingo |
Subject: |
[Guile-commits] 01/08: Fix error when argument to < not a real |
Date: |
Mon, 26 Apr 2021 11:04:10 -0400 (EDT) |
wingo pushed a commit to branch wip-inlinable-exports
in repository guile.
commit e0d022c347a9eb9835c6b0ac6e5fabc50e77ff69
Author: Andy Wingo <wingo@pobox.com>
AuthorDate: Mon Apr 26 12:26:33 2021 +0200
Fix error when argument to < not a real
* libguile/intrinsics.c (less_p): scm_nan_p raises an error if arg is
not a real; guard.
---
libguile/intrinsics.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libguile/intrinsics.c b/libguile/intrinsics.c
index 10f897a..8ad64fa 100644
--- a/libguile/intrinsics.c
+++ b/libguile/intrinsics.c
@@ -291,7 +291,8 @@ less_p (SCM a, SCM b)
return a_bits < b_bits ? SCM_F_COMPARE_LESS_THAN : SCM_F_COMPARE_NONE;
}
- if (scm_is_true (scm_nan_p (a)) || scm_is_true (scm_nan_p (b)))
+ if ((SCM_REALP (a) && scm_is_true (scm_nan_p (a)))
+ || (SCM_REALP (b) && scm_is_true (scm_nan_p (b))))
return SCM_F_COMPARE_INVALID;
else if (scm_is_true (scm_less_p (a, b)))
return SCM_F_COMPARE_LESS_THAN;
- [Guile-commits] branch wip-inlinable-exports updated (163e1f5 -> b07b2b7), Andy Wingo, 2021/04/26
- [Guile-commits] 02/08: Fix CPS optimizations to allow callk in front half, Andy Wingo, 2021/04/26
- [Guile-commits] 04/08: Allow contification for $callk, Andy Wingo, 2021/04/26
- [Guile-commits] 07/08: Add support for recording inlinable module exports, Andy Wingo, 2021/04/26
- [Guile-commits] 05/08: Letrectify links module defs with uses, Andy Wingo, 2021/04/26
- [Guile-commits] 06/08: Add pass to resolve free toplevel references in declarative modules, Andy Wingo, 2021/04/26
- [Guile-commits] 08/08: Implement cross-module inlining, Andy Wingo, 2021/04/26
- [Guile-commits] 01/08: Fix error when argument to < not a real,
Andy Wingo <=
- [Guile-commits] 03/08: CPS conversion calls module variables through trampolines, Andy Wingo, 2021/04/26