summaryrefslogtreecommitdiffstats
path: root/srfi/srfi-125-impl.scm
diff options
context:
space:
mode:
authorGravatar Arvydas Silanskas 2022-02-18 10:59:13 +0200
committerGravatar Arvydas Silanskas 2022-02-18 10:59:13 +0200
commitd2585d6581793502cf89a7909732d0233ed59f25 (patch)
tree0f17035b552b445639eb17fd3529e52d1eb71d3d /srfi/srfi-125-impl.scm
parentupdate implementation dependency (diff)
make 125, 126 impure only
Diffstat (limited to '')
-rw-r--r--srfi/srfi-125-impl.scm76
1 files changed, 21 insertions, 55 deletions
diff --git a/srfi/srfi-125-impl.scm b/srfi/srfi-125-impl.scm
index a63aba9..9431de8 100644
--- a/srfi/srfi-125-impl.scm
+++ b/srfi/srfi-125-impl.scm
@@ -1,75 +1,47 @@
(define hash-table-dto
(let ()
- (define-syntax guard-immutable
- (syntax-rules ()
- ((_ table body ... final-expr)
- (if (t125-hash-table-mutable? table)
- (let ()
- body ...
- final-expr)
- (let ((table (t125-hash-table-copy table #t)))
- body ...
- (let ((table (t125-hash-table-copy table #f)))
- final-expr))))))
-
(define (t125-hash-table-pure?* dto table)
- (not (t125-hash-table-mutable? table)))
+ #f)
(define (t125-hash-table-set* dto table . obj)
- (guard-immutable table
- (apply t125-hash-table-set! (cons table obj))
- table))
+ (apply t125-hash-table-set! (cons table obj)))
(define (t125-hash-table-update* dto table key updater fail success)
- (guard-immutable table
- (t125-hash-table-update! table key updater fail success)
- table))
+ (t125-hash-table-update! table key updater fail success))
(define (t125-hash-table-update/default* dto table key proc default)
- (guard-immutable table
- (t125-hash-table-update!/default table key proc default)
- table))
+ (t125-hash-table-update!/default table key proc default))
(define (t125-hash-table-intern* dto table key failure)
- (guard-immutable table
- (define val (t125-hash-table-intern! table key failure))
- (values table val)))
+ (t125-hash-table-intern! table key failure))
(define (t125-hash-table-pop* dto table)
(if (t125-hash-table-empty? table)
(error "popped empty dictionary")
- (guard-immutable table
- (define-values
- (key value)
- (t125-hash-table-pop! table))
- (values table key value))))
+ (let ()
+ (define-values
+ (key value)
+ (t125-hash-table-pop! table))
+ (values table key value))))
(define (t125-hash-table-delete-all* dto table keys)
- (guard-immutable table
- (for-each
+ (for-each
(lambda (key)
(t125-hash-table-delete! table key))
- keys)
- table))
+ keys))
(define (t125-hash-table-map* dto proc table)
- (guard-immutable table
- (t125-hash-table-map! proc table)
- table))
+ (t125-hash-table-map! proc table))
(define (t125-hash-table-filter* dto proc table)
- (guard-immutable table
- (t125-hash-table-prune!
+ (t125-hash-table-prune!
(lambda (key value)
(not (proc key value)))
- table)
- table))
+ table))
(define (t125-hash-table-remove* dto proc table)
- (guard-immutable table
- (t125-hash-table-prune! proc table)
- table))
+ (t125-hash-table-prune! proc table))
(define (t125-hash-table-find-update* dto table key fail success)
;; instead of running immediately,
@@ -77,24 +49,18 @@
;; to guarantee call in tail position
(define (make-success-thunk value)
(define (update new-key new-value)
- (guard-immutable table
- (unless (eq? new-key key)
- (t125-hash-table-delete! table key))
- (t125-hash-table-set! table new-key new-value)
- table))
+ (unless (eq? new-key key)
+ (t125-hash-table-delete! table key))
+ (t125-hash-table-set! table new-key new-value))
(define (remove)
- (guard-immutable table
- (t125-hash-table-delete! table key)
- table))
+ (t125-hash-table-delete! table key))
(lambda ()
(success key value update remove) ))
(define (make-failure-thunk)
(define (ignore)
table)
(define (insert value)
- (guard-immutable table
- (t125-hash-table-set! table key value)
- table))
+ (t125-hash-table-set! table key value))
(lambda ()
(fail insert ignore)))
Bump up version numbers for release.Gravatar aeb 2-3/+11 2000-11-24Added libraw1394.postinst.in to list of distributed files.Gravatar aeb 3-3/+35 2000-11-23Add ldconfig in deb postinst for Debian policy conformance.Gravatar aeb 2-2/+17 2000-11-23Removed acconfig.h, which wasn't needed for some time.Gravatar aeb 1-13/+0 2000-11-22Added ieee1394.h header.Gravatar aeb 3-1/+38 2000-09-13Fix raw1394_start_iso_write() which uses wrong variable.Gravatar aeb 1-1/+1 2000-09-10Work around compiler warnings for int/ptr casts.Gravatar aeb 6-10/+20 2000-09-10Added control files for Debian packages.Gravatar aeb 6-8/+106 2000-09-01Added missing prototypes for iso send functions.Gravatar aeb 1-0/+7 2000-08-08Added raw1394_get_irm_id().Gravatar aeb 7-7/+39 2000-08-06Added support for isochronous sending.Gravatar aeb 3-0/+35 2000-07-05Added raw1394_reset_bus() call.Gravatar aeb 4-0/+23 2000-06-22- Set library version info in configure.in, use in src/Makefile.am.Gravatar aeb 4-2/+16 2000-06-15Update libtool version number.Gravatar aeb 2-2/+2 2000-06-14Added copyright headers.Gravatar aeb 6-0/+54 2000-06-11Added explicit AC_PROG_INSTALL call.Gravatar aeb 1-0/+1 2000-06-09Fix size of error field.Gravatar aeb 1-2/+2 2000-06-02Modified support for 32/64 bit environments, control struct fields have fixed...Gravatar aeb 7-43/+28 2000-05-28Added support for environments with 64 bit kernel and 32 bit userland.Gravatar aeb 8-7/+45 2000-04-27Fixed missing setting of ext code in raw1394_start_lock()Gravatar aeb 1-0/+1 2000-04-15Fixed lock transaction to actually return response value.Gravatar aeb 3-5/+11 2000-04-12Add userdata functions as news.Gravatar aeb 1-0/+4 2000-04-05Add userdata functions.Gravatar aeb 3-0/+18 2000-03-18Bump version number to 0.6.Gravatar aeb 3-5/+6 2000-03-18Mention byte order change.Gravatar aeb 1-0/+2 2000-03-18Mention SourceForge home.Gravatar aeb 1-1/+5