From 1e29ad51a06db2849362c8881f1f009c8906e019 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Mon, 15 Sep 2014 16:00:19 +0900 Subject: [PATCH] update benz. (parameterize, object dictionary) --- docs/libs.rst | 4 ++-- extlib/benz | 2 +- piclib/picrin/base.scm | 5 +---- piclib/scheme/base.scm | 13 ------------- 4 files changed, 4 insertions(+), 20 deletions(-) diff --git a/docs/libs.rst b/docs/libs.rst index d7de4e89..bd87e98b 100644 --- a/docs/libs.rst +++ b/docs/libs.rst @@ -229,7 +229,7 @@ Technically, picrin's array is implemented as a ring-buffer, effective double-en (picrin dictionary) ------------------- -Symbol to Object table. Internally it is implemented on hash-table. +Object-to-object table. Internally it is implemented on hash-table. Equivalence is tested with equal? procedure. Note that dictionary is not a weak map; if you are going to make a highly memory-consuming program with dictionaries, you should know that dictionaries keep their bound objects and never let them free until you explicitly deletes bindings. @@ -243,7 +243,7 @@ Note that dictionary is not a weak map; if you are going to make a highly memory - **(dictionary-ref dict key)** - Look up dictionary dict for a value associated with symbol key. It returns two values: first is the associated value if exists, and second is a boolean of lookup result. + Look up dictionary dict for a value associated with key. It returns two values: first is the associated value if exists, and second is a boolean of lookup result. - **(dictionary-set! dict key obj)** diff --git a/extlib/benz b/extlib/benz index b20a97ed..678d2484 160000 --- a/extlib/benz +++ b/extlib/benz @@ -1 +1 @@ -Subproject commit b20a97ed9fbc3bfcbf12158f4c2001d983e50c2d +Subproject commit 678d2484ec989b082d0db2dffda5d0a391cecc50 diff --git a/piclib/picrin/base.scm b/piclib/picrin/base.scm index ec0f1140..5e55885c 100644 --- a/piclib/picrin/base.scm +++ b/piclib/picrin/base.scm @@ -239,10 +239,7 @@ flush-output-port) (export make-parameter - parameter-ref - parameter-set! - parameter-push! - parameter-pop!) + parameterize) (export identifier? identifier=? diff --git a/piclib/scheme/base.scm b/piclib/scheme/base.scm index e7032687..b2ac7c48 100644 --- a/piclib/scheme/base.scm +++ b/piclib/scheme/base.scm @@ -69,19 +69,6 @@ ;; 4.2.6. Dynamic bindings - (define-syntax parameterize - (ir-macro-transformer - (lambda (form inject compare) - (let ((formal (car (cdr form))) - (body (cdr (cdr form)))) - (let ((vars (map car formal)) - (vals (map cadr formal))) - `(begin - ,@(map (lambda (var val) `(parameter-push! ,var ,val)) vars vals) - (let ((result (begin ,@body))) - ,@(map (lambda (var) `(parameter-pop! ,var)) vars) - result))))))) - (export make-parameter parameterize)