From 37ef6e1464cf2b7847739aa8fd90d9ed7cc46819 Mon Sep 17 00:00:00 2001 From: crc Date: Tue, 11 Feb 2020 21:36:16 +0000 Subject: [PATCH] retro.forth: smaller a:index-of, a:index-of-string FossilOrigin-Name: ad35a890a5f73cf68a8dd25f4f3d8f4ea1d3d44fb3dadeb49c8f46487db040e1 --- image/retro.forth | 4 +- ngaImage | Bin 37844 -> 37796 bytes vm/nga-c/retro-image.c | 712 ++++++++++++++++++++--------------------- 3 files changed, 358 insertions(+), 358 deletions(-) diff --git a/image/retro.forth b/image/retro.forth index e4da62b..8b30f3c 100644 --- a/image/retro.forth +++ b/image/retro.forth @@ -1456,8 +1456,8 @@ array. 'Location var :prepare swap #-1 !Location ; :next @Location n:negative? [ &Location v:dec ] if ; - :match? over eq? [ @Location n:negative? ] [ FALSE ] choose ; - :match-str? over s:eq? [ @Location n:negative? ] [ FALSE ] choose ; + :match? over eq? dup [ drop @Location n:negative? ] if ; + :match-str? over s:eq? dup [ drop @Location n:negative? ] if ; :update @Location n:abs n:dec !Location ; ---reveal--- :a:index-of (an-n) diff --git a/ngaImage b/ngaImage index 508c610b514a9820f6d7d9003a8c47ec938a09ec..d29c71a9490865856c0abf4931797fede21053b4 100644 GIT binary patch delta 2127 zcmZuyZA@EL7`~_FRyruGG^KO3&{D9nqKu%z7zkU*mf5kfY;I0*N|ZQ^#B3Tjj0Fme z^0Cpv8?s~p35g6w_Cr!XGf6=IZ2U1ZGiGsQL9>YAhZ2*SEOYq0?YV%2o1DDQ`@GNl zan8B7y)~x$bWCRwk15JBo}aT7Wnt2EtU$E@Wku@??)p=7ilVUK)l5avD|8^R)%+5m z5%eakJ-`j*2-xZKK=z8baaH{O8u9DEA@?TjE^$n+4HfQbFzk3^H1qF zuwAM7JJ(dF!6{^JajOQWq9jsnhDGS8s>P!W*F4)_ju(hzIL|9j2jHpLz*slJ2#(SqFf4cs?=KT!lYJ zfwpq>N1#QTY0EeK2K2y5_uF1jIh;g0+C9cOAl{RO9Or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