From e1669916f60d279ec1edd3e7edd95b960ea2840a Mon Sep 17 00:00:00 2001 From: Matthew Willis Date: Sun, 25 May 2008 12:00:55 -0700 Subject: [PATCH] add invalidate-memoized to extra/memoize so that specific entries can be removed from the memoization cache. This is used in cached-cairo ungraft* to ensure that textures re-rendered. --- extra/memoize/memoize.factor | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extra/memoize/memoize.factor b/extra/memoize/memoize.factor index 4136f9eaff..6a223fdc7e 100755 --- a/extra/memoize/memoize.factor +++ b/extra/memoize/memoize.factor @@ -52,3 +52,6 @@ M: memoized definition "memo-quot" word-prop ; : reset-memoized ( word -- ) "memoize" word-prop clear-assoc ; + +: invalidate-memoized ! ( inputs... word ) + [ #in packer call ] [ "memoize" word-prop delete-at ] bi ;