mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-13 07:10:20 +02:00
* goops/dispatch.scm (cache-hashval): Corrected termination
condition for hashval computation. (Previously, it made erroneous assumptions about the representation of environments; Thanks to Andreas Rottmann.)
This commit is contained in:
parent
0fd7dcd398
commit
1ac61c2b50
3 changed files with 10 additions and 4 deletions
1
THANKS
1
THANKS
|
@ -38,6 +38,7 @@ For fixes or providing information which led to a fix:
|
||||||
Ron Peterson
|
Ron Peterson
|
||||||
David Pirotte
|
David Pirotte
|
||||||
Ken Raeburn
|
Ken Raeburn
|
||||||
|
Andreas Rottmann
|
||||||
Kevin Ryde
|
Kevin Ryde
|
||||||
Bill Schottstaedt
|
Bill Schottstaedt
|
||||||
Greg Troxel
|
Greg Troxel
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
2003-04-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
|
||||||
|
|
||||||
|
* goops/dispatch.scm (cache-hashval): Corrected termination
|
||||||
|
condition for hashval computation. (Previously, it made erroneous
|
||||||
|
assumptions about the representation of environments; Thanks to
|
||||||
|
Andreas Rottmann.)
|
||||||
|
|
||||||
2003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
|
2003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
|
||||||
|
|
||||||
* goops.scm (compute-getters-n-setters): Check for bad init-thunk.
|
* goops.scm (compute-getters-n-setters): Check for bad init-thunk.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
;;;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
|
;;;; Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
|
||||||
;;;;
|
;;;;
|
||||||
;;;; This library is free software; you can redistribute it and/or
|
;;;; This library is free software; you can redistribute it and/or
|
||||||
;;;; modify it under the terms of the GNU Lesser General Public
|
;;;; modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -172,13 +172,11 @@
|
||||||
;;; Caching
|
;;; Caching
|
||||||
;;;
|
;;;
|
||||||
|
|
||||||
(define environment? pair?)
|
|
||||||
|
|
||||||
(define (cache-hashval hashset entry)
|
(define (cache-hashval hashset entry)
|
||||||
(let ((hashset-index (+ hashset-index hashset)))
|
(let ((hashset-index (+ hashset-index hashset)))
|
||||||
(do ((sum 0)
|
(do ((sum 0)
|
||||||
(classes entry (cdr classes)))
|
(classes entry (cdr classes)))
|
||||||
((environment? (car classes)) sum)
|
((not (struct? (car classes))) sum)
|
||||||
(set! sum (+ sum (struct-ref (car classes) hashset-index))))))
|
(set! sum (+ sum (struct-ref (car classes) hashset-index))))))
|
||||||
|
|
||||||
(define (cache-try-hash! min-misses hashset cache entries)
|
(define (cache-try-hash! min-misses hashset cache entries)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue