Gah, _really_ a new PROCEDURE-TABLES library...I can't believe I forgot to 'cvs add' it before committing.
This commit is contained in:
		
							parent
							
								
									4ee8b293ce
								
							
						
					
					
						commit
						ddcfe68390
					
				|  | @ -0,0 +1 @@ | |||
| Taylor Campbell | ||||
|  | @ -0,0 +1 @@ | |||
| procedure-tables: PROCEDURE-HASH and MAKE-PROCEDURE-TABLE for tables whose keys are procedures | ||||
|  | @ -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. | ||||
|  | @ -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)))) | ||||
|  | @ -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)) | ||||
|  | @ -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))))) | ||||
|  | @ -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)) | ||||
		Loading…
	
		Reference in New Issue
	
	 Taylor R. Campbell
						Taylor R. Campbell