From a1d7e7b847734075bc2cf5c1e6b557367c817135 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Fri, 8 Sep 2000 15:25:04 +0000 Subject: [PATCH] * error handling fix 2000-09-08 Frank Ch. Eigler * decode.scm (-population-top-few): Signal error gracefully if decoding is about to become ambiguous. --- ChangeLog | 5 +++++ decode.scm | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8b8da39..5caefb1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-09-08 Frank Ch. Eigler + + * decode.scm (-population-top-few): Signal error gracefully if + decoding is about to become ambiguous. + 2000-09-06 Frank Ch. Eigler * doc/rtl.texi (decode-assist): Describe this field as optional. diff --git a/decode.scm b/decode.scm index 3fbda21..b3747ab 100644 --- a/decode.scm +++ b/decode.scm @@ -280,8 +280,9 @@ (cond ; No new matches? ((null? new-picks) - (begin (assert (not (null? old-picks))) - old-picks)) + (if (null? old-picks) + (logit 1 "-population-top-few: No bits left to pick from!\n")) + old-picks) ; Way too many matches? ((> (+ (length new-picks) (length old-picks)) (+ 2 size)) (list-take (+ 2 size) (append new-picks old-picks))) -- 2.43.5