Switch to id-table, Rackety.

This commit is contained in:
Sam Tobin-Hochstadt 2011-09-05 18:00:09 -04:00
parent 41bfb878c3
commit 076c0fe6d8

View File

@ -1,6 +1,6 @@
#lang scheme/base #lang racket/base
(require syntax/boundmap (for-syntax scheme/base syntax/parse)) (require syntax/id-table racket/dict (for-syntax racket/base syntax/parse))
(provide defintern hash-id) (provide defintern hash-id)
@ -34,12 +34,12 @@
(define count! (make-count!)) (define count! (make-count!))
(define id-count! (make-count!)) (define id-count! (make-count!))
(define identifier-table (make-module-identifier-mapping)) (define identifier-table (make-free-id-table))
(define (hash-id id) (define (hash-id id)
(module-identifier-mapping-get (dict-ref
identifier-table identifier-table
id id
(lambda () (let ([c (id-count!)]) (lambda () (let ([c (id-count!)])
(module-identifier-mapping-put! identifier-table id c) (dict-set! identifier-table id c)
c)))) c))))