Gah, _really_ a new PROCEDURE-TABLES library...I can't believe I forgot to 'cvs add' it before committing.

This commit is contained in:
Taylor R. Campbell 2003-10-09 18:50:19 +00:00
parent 4ee8b293ce
commit ddcfe68390
7 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1 @@
Taylor Campbell

View File

@ -0,0 +1 @@
procedure-tables: PROCEDURE-HASH and MAKE-PROCEDURE-TABLE for tables whose keys are procedures

View File

@ -0,0 +1,3 @@
PROCEDURE-HASH defines PROCEDURE-HASH, which takes a procedure and
returns its hash value. PROCEDURE-TABLES defines MAKE-PROCEDURE-TABLE,
which returns a table whose keys are procedures.

View File

@ -0,0 +1,5 @@
(define-interface procedure-hash-interface
(export (procedure-hash (proc (:procedure) :exact-integer))))
(define-interface procedure-tables-interface
(export (make-procedure-table (proc () :value))))

View File

@ -0,0 +1,14 @@
(define-structure procedure-hash procedure-hash-interface
(open scheme
more-types
loopholes
closures
disclosers
debug-data)
(files procedure-hash))
(define-structure procedure-tables procedure-tables-interface
(open scheme
tables
procedure-hash)
(files procedure-tables))

View File

@ -0,0 +1,11 @@
;;; This file is part of the Scheme Untergrund Library.
;;; Copyright (c) 2003 by Taylor Campbell
;;; For copyright information, see the file COPYING which comes with
;;; the distribution.
(define (procedure-hash proc)
(debug-data-uid
(template-debug-data
(closure-template
(loophole :closure proc)))))

View File

@ -0,0 +1,8 @@
;;; This file is part of the Scheme Untergrund Library.
;;; Copyright (c) 2003 by Taylor Campbell
;;; For copyright information, see the file COPYING which comes with
;;; the distribution.
(define make-procedure-table
(make-table-maker eq? procedure-hash))