unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Po Lu <luangruo@yahoo.com>
To: emacs-devel@gnu.org
Cc: Vibhav Pant <vibhavp@gmail.com>
Subject: Re: scratch/comp-static-data 82226254c86: Use ephemeral and staticvec vectors to refer to allocated objects.
Date: Thu, 09 Mar 2023 09:26:13 +0800	[thread overview]
Message-ID: <87lek6lnpm.fsf@yahoo.com> (raw)
In-Reply-To: <20230308132710.49F02C13A84@vcs2.savannah.gnu.org> (Vibhav Pant's message of "Wed, 8 Mar 2023 08:27:10 -0500 (EST)")

Vibhav Pant <vibhavp@gmail.com> writes:

> +static void
> +alloc_class_check (Lisp_Object alloc_class)
> +{
> +  bool valid = EQ (alloc_class, Qd_default) ||
> +    EQ (alloc_class, Qd_impure) ||
> +    EQ (alloc_class, Qd_ephemeral);
> +  if (!valid)
> +    {
> +      xsignal2 (Qnative_ice,
> +		build_string ("invalid lisp data allocation class"),
> +		alloc_class);
> +      assume (false);
> +    }
> +}

You wrote this wrong again; it should be:

  bool valid = (EQ (alloc_class, Qd_default)
  		|| EQ (alloc_class, Qd_impure)
                || EQ (alloc_class, Qd_epemeral))

the `eassume (false)' is redundant, as xsignal2 is noreturn.  And
perhaps it would be better to move valid into the if condition entirely.

Thanks.



           reply	other threads:[~2023-03-09  1:26 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20230308132710.49F02C13A84@vcs2.savannah.gnu.org>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lek6lnpm.fsf@yahoo.com \
    --to=luangruo@yahoo.com \
    --cc=emacs-devel@gnu.org \
    --cc=vibhavp@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).