Re: [RFC 04/14] Remove =? and >=? aliases

"Jose E. Marchesi via Cgen" <[email protected]> Sun, 20 Aug 2023 10:15:17 +0200
Newsgroups gmane.comp.tools.cgen.devel
Message-ID <[email protected]>
OK.  Thanks.

> =? and >=? are aliases for = and >=.  Remove these and update the few
> users.
> ---
>  enum.scm     | 2 +-
>  guile.scm    | 4 ----
>  opcodes.scm  | 4 ++--
>  sim-test.scm | 4 ++--
>  4 files changed, 5 insertions(+), 9 deletions(-)
>
> diff --git a/enum.scm b/enum.scm
> index 1faeb5f..5390e08 100644
> --- a/enum.scm
> +++ b/enum.scm
> @@ -278,7 +278,7 @@
>  				  "sanitize-"
>  				  san-code " */")
>  		   "")
> -	       (if (or san? (=? (remainder n 4) 0))
> +	       (if (or san? (= (remainder n 4) 0))
>  		   "\n "
>  		   "")
>  	       (if (= n 0)
> diff --git a/guile.scm b/guile.scm
> index d2b8d8d..85c37d4 100644
> --- a/guile.scm
> +++ b/guile.scm
> @@ -37,10 +37,6 @@
>        )
>  )
>  
> -; FIXME: to be deleted
> -(define =? =)
> -(define >=? >=)
> -
>  (if (not (symbol-bound? #f '%stat))
>      (begin
>        (define %stat stat)
> diff --git a/opcodes.scm b/opcodes.scm
> index 66ce9dd..1644fcd 100644
> --- a/opcodes.scm
> +++ b/opcodes.scm
> @@ -771,12 +771,12 @@
>  			   (begin
>  			     (close-port port)
>  			     ; End of file, did we find the text?
> -			     (if (=? start -1)
> +			     (if (= start -1)
>  				 ""
>  				 (substring result start index))))
>  			  ((char=? char #\newline)
>  			   ; Check for start delim or end delim?
> -			   (if (=? start -1)
> +			   (if (= start -1)
>  			       (if (string=? (substring result line
>  							(+ (string-length start-delim)
>  							   line))
> diff --git a/sim-test.scm b/sim-test.scm
> index 8176070..3029105 100644
> --- a/sim-test.scm
> +++ b/sim-test.scm
> @@ -106,8 +106,8 @@
>    (let ((test-data (map (lambda (op) (operand-test-data op n)) op-list))
>  	(len (length op-list)))
>      ; FIXME: Make slicker later.
> -    (cond ((=? len 0) (list (list)))
> -	  ((=? len 1) test-data)
> +    (cond ((= len 0) (list (list)))
> +	  ((= len 1) test-data)
>  	  (else (list (map car test-data)))))
>  )