[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.0-169-gb1e13
From: |
Andreas Rottmann |
Subject: |
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.0-169-gb1e13fb |
Date: |
Fri, 08 Apr 2011 23:17:00 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=b1e13fb530e0f80334862e440860c054b61dbdd0
The branch, stable-2.0 has been updated
via b1e13fb530e0f80334862e440860c054b61dbdd0 (commit)
from 40c2a95a72b3a831d9de319afbc9d72a0133110e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b1e13fb530e0f80334862e440860c054b61dbdd0
Author: Andreas Rottmann <address@hidden>
Date: Fri Apr 8 23:56:30 2011 +0200
Implement R6RS' `fixnum?' in a smarter way
* module/rnrs/arithmetic/fixnums.scm (fixnum?): Implemented using
bit-twiddling, and using `define-inlinable'.
-----------------------------------------------------------------------
Summary of changes:
module/rnrs/arithmetic/fixnums.scm | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/module/rnrs/arithmetic/fixnums.scm
b/module/rnrs/arithmetic/fixnums.scm
index 03511ed..0ce2458 100644
--- a/module/rnrs/arithmetic/fixnums.scm
+++ b/module/rnrs/arithmetic/fixnums.scm
@@ -76,6 +76,7 @@
fxreverse-bit-field)
(import (only (guile) ash
cons*
+ define-inlinable
inexact->exact
logand
logbit?
@@ -84,7 +85,8 @@
lognot
logxor
most-positive-fixnum
- most-negative-fixnum)
+ most-negative-fixnum
+ object-address)
(ice-9 optargs)
(rnrs base (6))
(rnrs control (6))
@@ -99,12 +101,9 @@
(define (greatest-fixnum) most-positive-fixnum)
(define (least-fixnum) most-negative-fixnum)
-
- (define (fixnum? obj)
- (and (integer? obj)
- (exact? obj)
- (>= obj most-negative-fixnum)
- (<= obj most-positive-fixnum)))
+
+ (define-inlinable (fixnum? obj)
+ (not (= 0 (logand 2 (object-address obj)))))
(define-syntax assert-fixnum
(syntax-rules ()
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.0-169-gb1e13fb,
Andreas Rottmann <=